From aa0e9c5706705089db801a305e7a44a498699f8a Mon Sep 17 00:00:00 2001 From: Alexander Wunschik Date: Sat, 5 Nov 2016 15:59:47 +0100 Subject: [PATCH 1/3] updated folders 'dist', 'docs' and 'examples' from master --- dist/img/timeline/delete.png | Bin 665 -> 0 bytes dist/vis-graph3d.min.js | 18 +- dist/vis-network.min.css | 1 + dist/vis-network.min.js | 34 +- dist/vis-timeline-graph2d.min.css | 1 + dist/vis-timeline-graph2d.min.js | 30 +- dist/vis.css | 1367 +-- dist/vis.js | 8007 ++++++++++------- dist/vis.map | 1 - dist/vis.min.css | 2 +- dist/vis.min.js | 44 +- docs/data/dataset.html | 9 +- docs/data/dataview.html | 3 +- docs/data/index.html | 3 +- docs/graph2d/index.html | 9 +- docs/graph3d/index.html | 14 +- docs/network/configure.html | 1 + docs/network/edges.html | 13 +- docs/network/groups.html | 3 +- docs/network/index.html | 107 +- docs/network/interaction.html | 3 +- docs/network/layout.html | 7 +- docs/network/manipulation.html | 3 +- docs/network/nodes.html | 3 +- docs/network/physics.html | 3 +- docs/old/dataset.html | 949 -- docs/old/dataview.html | 338 - docs/old/graph3d.html | 673 -- docs/old/index.html | 225 - docs/old/lib/prettify/lang-apollo.js | 2 - docs/old/lib/prettify/lang-css.js | 2 - docs/old/lib/prettify/lang-hs.js | 2 - docs/old/lib/prettify/lang-lisp.js | 2 - docs/old/lib/prettify/lang-lua.js | 2 - docs/old/lib/prettify/lang-ml.js | 2 - docs/old/lib/prettify/lang-proto.js | 1 - docs/old/lib/prettify/lang-scala.js | 2 - docs/old/lib/prettify/lang-sql.js | 2 - docs/old/lib/prettify/lang-vb.js | 2 - docs/old/lib/prettify/lang-vhdl.js | 3 - docs/old/lib/prettify/lang-wiki.js | 2 - docs/old/lib/prettify/lang-yaml.js | 2 - docs/old/lib/prettify/prettify.css | 1 - docs/old/lib/prettify/prettify.js | 33 - docs/old/old_graph2d.html | 1165 --- docs/old/old_network.html | 2625 ------ docs/old/old_network/canvas.html | 210 - docs/old/old_network/clustering.html | 181 - docs/old/old_network/rendering.html | 126 - docs/old/old_network/selection.html | 134 - docs/old/old_network/view.html | 159 - docs/old/old_timeline.html | 1510 ---- docs/timeline/index.html | 145 +- examples/graph2d/01_basic.html | 2 +- examples/graph2d/02_bars.html | 2 +- examples/graph2d/03_groups.html | 2 +- examples/graph2d/04_rightAxis.html | 2 +- examples/graph2d/05_bothAxis.html | 2 +- examples/graph2d/06_interpolation.html | 2 +- examples/graph2d/07_scrollingAndSorting.html | 2 +- examples/graph2d/08_performance.html | 2 +- examples/graph2d/09_external_legend.html | 6 +- examples/graph2d/10_barsSideBySide.html | 2 +- examples/graph2d/11_barsSideBySideGroups.html | 2 +- examples/graph2d/12_customRange.html | 2 +- examples/graph2d/13_localization.html | 2 +- examples/graph2d/14_toggleGroups.html | 2 +- examples/graph2d/15_streaming_data.html | 2 +- examples/graph2d/16_bothAxisTitles.html | 2 +- examples/graph2d/17_dynamicStyling.html | 2 +- examples/graph2d/18_scatterplot.html | 2 +- examples/graph2d/19_labels.html | 2 +- examples/graph2d/20_shading.html | 2 +- examples/graph3d/11_tooltips.html | 24 +- examples/graph3d/playground/index.html | 4 + examples/graph3d/playground/playground.js | 1 + examples/network/basicUsage.html | 2 +- examples/network/data/datasets.html | 2 +- .../network/data/dotLanguage/dotLanguage.html | 2 +- .../data/dotLanguage/dotPlayground.html | 2 +- examples/network/data/dynamicData.html | 2 +- examples/network/data/importingFromGephi.html | 2 +- examples/network/data/scalingCustom.html | 2 +- examples/network/data/scalingNodesEdges.html | 2 +- .../network/data/scalingNodesEdgesLabels.html | 2 +- examples/network/edgeStyles/arrowTypes.html | 55 + examples/network/edgeStyles/arrows.html | 2 +- examples/network/edgeStyles/colors.html | 2 +- examples/network/edgeStyles/dashes.html | 2 +- examples/network/edgeStyles/smooth.html | 2 +- .../network/edgeStyles/smoothWorldCup.html | 2 +- .../network/events/interactionEvents.html | 2 +- examples/network/events/physicsEvents.html | 2 +- examples/network/events/renderEvents.html | 2 +- .../disassemblerExample.html | 2 +- .../exampleApplications/lesMiserables.html | 2 +- .../exampleApplications/loadingBar.html | 2 +- .../neighbourhoodHighlight.html | 2 +- .../exampleApplications/nodeLegend.html | 2 +- .../worldCupPerformance.html | 2 +- examples/network/labels/labelAlignment.html | 2 +- examples/network/labels/labelBackground.html | 2 +- .../network/labels/labelColorAndSize.html | 2 +- examples/network/labels/labelStroke.html | 2 +- examples/network/labels/multilineText.html | 2 +- .../network/layout/hierarchicalLayout.html | 2 +- .../layout/hierarchicalLayoutMethods.html | 2 +- .../layout/hierarchicalLayoutUserdefined.html | 2 +- .../hierarchicalLayoutWithoutPhysics.html | 2 +- examples/network/layout/randomSeed.html | 2 +- examples/network/nodeStyles/HTMLInNodes.html | 9 +- .../network/nodeStyles/circularImages.html | 2 +- examples/network/nodeStyles/colors.html | 2 +- examples/network/nodeStyles/customGroups.html | 2 +- examples/network/nodeStyles/groups.html | 2 +- examples/network/nodeStyles/icons.html | 2 +- examples/network/nodeStyles/images.html | 2 +- .../network/nodeStyles/imagesWithBorders.html | 2 +- examples/network/nodeStyles/shadows.html | 2 +- examples/network/nodeStyles/shapes.html | 21 +- .../nodeStyles/shapesWithDashedBorders.html | 2 +- examples/network/other/animationShowcase.html | 2 +- .../other/changingClusteredEdgesNodes.html | 107 + examples/network/other/clustering.html | 2 +- examples/network/other/clusteringByZoom.html | 2 +- .../network/other/clustersOfclusters.html | 75 + examples/network/other/configuration.html | 2 +- examples/network/other/manipulation.html | 29 +- examples/network/other/navigation.html | 4 +- examples/network/other/performance.html | 2 +- examples/network/other/saveAndLoad.html | 177 + .../network/physics/physicsConfiguration.html | 2 +- examples/timeline/basicUsage.html | 2 +- .../dataHandling/dataSerialization.html | 21 +- .../dataHandling/loadExternalData.html | 2 +- .../editing/customSnappingOfItems.html | 2 +- examples/timeline/editing/editingItems.html | 2 +- .../editing/editingItemsCallbacks.html | 2 +- .../editing/individualEditableItems.html | 2 +- .../timeline/editing/tooltipOnItemChange.html | 130 + .../timeline/editing/updateDataOnEvent.html | 2 +- examples/timeline/groups/groups.html | 2 +- examples/timeline/groups/groupsEditable.html | 2 +- examples/timeline/groups/groupsOrdering.html | 2 +- examples/timeline/groups/subgroups.html | 2 +- .../timeline/groups/verticalItemsHide.html | 126 + .../timeline/interaction/animateWindow.html | 2 +- examples/timeline/interaction/clickToUse.html | 2 +- .../timeline/interaction/eventListeners.html | 17 +- .../interaction/limitMoveAndZoom.html | 2 +- .../timeline/interaction/navigationMenu.html | 22 +- .../timeline/interaction/setSelection.html | 2 +- examples/timeline/items/backgroundAreas.html | 2 +- .../items/backgroundAreasWithGroups.html | 2 +- examples/timeline/items/htmlContents.html | 2 +- examples/timeline/items/itemOrdering.html | 2 +- examples/timeline/items/pointItems.html | 4 +- .../timeline/items/rangeOverflowItem.html | 2 +- examples/timeline/other/customTimeBars.html | 2 +- examples/timeline/other/dataAttributes.html | 2 +- .../timeline/other/dataAttributesAll.html | 2 +- examples/timeline/other/drag&drop.html | 131 + .../timeline/other/functionLabelFormats.html | 141 + .../timeline/other/groupsPerformance.html | 2 +- examples/timeline/other/hidingPeriods.html | 2 +- examples/timeline/other/horizontalScroll.html | 77 + examples/timeline/other/localization.html | 6 +- examples/timeline/other/performance.html | 2 +- .../other/requirejs/requirejs_example.html | 2 +- examples/timeline/other/rtl.html | 57 +- examples/timeline/other/timezone.html | 2 +- examples/timeline/other/usingReact.html | 123 + examples/timeline/other/verticalScroll.html | 93 + .../timeline/styling/axisOrientation.html | 2 +- examples/timeline/styling/customCss.html | 2 +- examples/timeline/styling/gridStyling.html | 2 +- examples/timeline/styling/itemClassNames.html | 4 +- examples/timeline/styling/itemTemplates.html | 4 +- 178 files changed, 7262 insertions(+), 12588 deletions(-) delete mode 100644 dist/img/timeline/delete.png create mode 100644 dist/vis-network.min.css create mode 100644 dist/vis-timeline-graph2d.min.css delete mode 100644 dist/vis.map delete mode 100644 docs/old/dataset.html delete mode 100644 docs/old/dataview.html delete mode 100644 docs/old/graph3d.html delete mode 100644 docs/old/index.html delete mode 100644 docs/old/lib/prettify/lang-apollo.js delete mode 100644 docs/old/lib/prettify/lang-css.js delete mode 100644 docs/old/lib/prettify/lang-hs.js delete mode 100644 docs/old/lib/prettify/lang-lisp.js delete mode 100644 docs/old/lib/prettify/lang-lua.js delete mode 100644 docs/old/lib/prettify/lang-ml.js delete mode 100644 docs/old/lib/prettify/lang-proto.js delete mode 100644 docs/old/lib/prettify/lang-scala.js delete mode 100644 docs/old/lib/prettify/lang-sql.js delete mode 100644 docs/old/lib/prettify/lang-vb.js delete mode 100644 docs/old/lib/prettify/lang-vhdl.js delete mode 100644 docs/old/lib/prettify/lang-wiki.js delete mode 100644 docs/old/lib/prettify/lang-yaml.js delete mode 100644 docs/old/lib/prettify/prettify.css delete mode 100644 docs/old/lib/prettify/prettify.js delete mode 100644 docs/old/old_graph2d.html delete mode 100644 docs/old/old_network.html delete mode 100644 docs/old/old_network/canvas.html delete mode 100644 docs/old/old_network/clustering.html delete mode 100644 docs/old/old_network/rendering.html delete mode 100644 docs/old/old_network/selection.html delete mode 100644 docs/old/old_network/view.html delete mode 100644 docs/old/old_timeline.html create mode 100644 examples/network/edgeStyles/arrowTypes.html create mode 100644 examples/network/other/changingClusteredEdgesNodes.html create mode 100644 examples/network/other/clustersOfclusters.html create mode 100644 examples/network/other/saveAndLoad.html create mode 100644 examples/timeline/editing/tooltipOnItemChange.html create mode 100644 examples/timeline/groups/verticalItemsHide.html create mode 100644 examples/timeline/other/drag&drop.html create mode 100644 examples/timeline/other/functionLabelFormats.html create mode 100644 examples/timeline/other/horizontalScroll.html create mode 100644 examples/timeline/other/usingReact.html create mode 100644 examples/timeline/other/verticalScroll.html diff --git a/dist/img/timeline/delete.png b/dist/img/timeline/delete.png deleted file mode 100644 index d54d0e06fc2047fb34cf420a6edaeefa52fde987..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 665 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;x#X;^) z4C~IxyaaL-l0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=YPV z+ueoXKL{?^yL>WGgtNdSvY3H^TNs2H8D`Cq011{AIHm(>utOMPj;%cmv@^uh#WBR< zbm`@TUebXgY!C92?nJxf7HQv47WvUWTvf7cP^tlX`(c^5al_?F77?z^hEw4tDn@4V^@0w-8rRM%jRv+ zj+riJ^ZmV$uG{m)H6f<+*?!2D#&7OCpL9h3()<-#K@Uv-J&^dvbhs@wc6x=<11Hv2m#DR)bL5fm(AhS~;3Rt5&&p1M9m(U6;;l9^VCTSNPfzfnL944$rjF6*2UngF*N B__6>1 diff --git a/dist/vis-graph3d.min.js b/dist/vis-graph3d.min.js index 21aea6fc..04da1297 100644 --- a/dist/vis-graph3d.min.js +++ b/dist/vis-graph3d.min.js @@ -4,8 +4,8 @@ * * A dynamic, browser-based visualization library. * - * @version 4.16.1 - * @date 2016-04-18 + * @version 4.17.0 + * @date 2016-11-05 * * @license * Copyright (C) 2011-2016 Almende B.V, http://almende.com @@ -22,12 +22,12 @@ * * Vis.js may be distributed under either license. */ -"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(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.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(7),e.DataSet=i(8),e.DataView=i(10),e.Queue=i(9),e.Graph3d=i(11),e.graph3d={Camera:i(15),Filter:i(16),Point2d:i(14),Point3d:i(13),Slider:i(17),StepNumber:i(18)},e.moment=i(2),e.Hammer=i(19),e.keycharm=i(22)},function(t,e,i){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=i(2),s=i(6);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)e.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},e.giveRange=function(t,e,i,n){if(e==t)return.5;var r=1/(e-t);return Math.max(0,(n-t)*r)},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=o.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){return s.v4()},e.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!==n(t[i])&&(t[i]=e)},e.fillIfDefined=function(t,i){var r=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];for(var s in t)void 0!==i[s]&&("object"!==n(i[s])?void 0!==i[s]&&null!==i[s]||void 0===t[s]||r!==!0?t[s]=i[s]:delete t[s]:"object"===n(t[s])&&e.fillIfDefined(t[s],i[s],r))},e.protoExtend=function(t,e){for(var i=1;ii;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var n;if(void 0!==t){if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(r.isMoment(t))return new Date(t.valueOf());if(e.isString(t))return n=o.exec(t),n?new Date(Number(n[1])):r(t).toDate();throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return r(t);if(t instanceof Date)return r(t.valueOf());if(r.isMoment(t))return r(t);if(e.isString(t))return n=o.exec(t),r(n?Number(n[1]):t);throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(r.isMoment(t))return t.toDate().toISOString();if(e.isString(t))return n=o.exec(t),n?new Date(Number(n[1])).toISOString():new Date(t).toISOString();throw new Error("Cannot convert object of type "+e.getType(t)+" to type ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(e.isString(t)){n=o.exec(t);var s;return s=n?new Date(Number(n[1])).valueOf():new Date(t).valueOf(),"/Date("+s+")/"}throw new Error("Cannot convert object of type "+e.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+i+'"')}}};var o=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e="undefined"==typeof t?"undefined":n(t);return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},e.copyAndExtendArray=function(t,e){for(var i=[],n=0;ni;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},e.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},e.updateProperty=function(t,e,i){return t[e]!==i?(t[e]=i,!0):!1},e.throttle=function(t,e){var i=null,n=!1;return function r(){i?n=!0:(n=!1,t(),i=setTimeout(function(){i=null,n&&r()},e))}},e.addEventListener=function(t,e,i,n){t.addEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,n)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,n){t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,n)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,n){return e+e+i+i+n+n});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(-1!=t.indexOf("rgba"))return t;if(-1!=t.indexOf("rgb")){var n=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+n[0]+","+n[1]+","+n[2]+","+i+")"}var n=e.hexToRGB(t);return null==n?t:"rgba("+n.r+","+n.g+","+n.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var n=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(n[0],n[1],n[2])}if(e.isValidHex(t)===!0){var r=e.hexToHSV(t),s={h:r.h,s:.8*r.s,v:Math.min(1,1.02*r.v)},o={h:r.h,s:Math.min(1,1.25*r.s),v:.8*r.v},a=e.HSVToHex(o.h,o.s,o.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,Math.min(e,i)),r=Math.max(t,Math.max(e,i));if(n==r)return{h:0,s:0,v:n};var s=t==n?e-i:i==n?t-e:i-t,o=t==n?3:i==n?1:5,a=60*(o-s/(r-n))/360,h=(r-n)/r,l=r;return{h:a,s:h,v:l}};var a={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),n=i[0].trim(),r=i[1].trim();e[n]=r}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var n=a.split(t.style.cssText),r=a.split(i),s=e.extend(n,r);t.style.cssText=a.join(s)},e.removeCssText=function(t,e){var i=a.split(t.style.cssText),n=a.split(e);for(var r in n)n.hasOwnProperty(r)&&delete i[r];t.style.cssText=a.join(i)},e.HSVToRGB=function(t,e,i){var n,r,s,o=Math.floor(6*t),a=6*t-o,h=i*(1-e),l=i*(1-a*e),u=i*(1-(1-a)*e);switch(o%6){case 0:n=i,r=u,s=h;break;case 1:n=l,r=i,s=h;break;case 2:n=h,r=i,s=u;break;case 3:n=h,r=l,s=i;break;case 4:n=u,r=h,s=i;break;case 5:n=i,r=h,s=l}return{r:Math.floor(255*n),g:Math.floor(255*r),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,n){var r=e.HSVToRGB(t,i,n);return e.RGBToHex(r.r,r.g,r.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==("undefined"==typeof i?"undefined":n(i))){for(var r=Object.create(i),s=0;s0&&e(n,t[r-1])<0;r--)t[r]=t[r-1];t[r]=n}return t},e.mergeOptions=function(t,e,i){var n=(arguments.length<=3||void 0===arguments[3]?!1:arguments[3],arguments.length<=4||void 0===arguments[4]?{}:arguments[4]);if(null===e[i])t[i]=Object.create(n[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var r in e[i])e[i].hasOwnProperty(r)&&(t[i][r]=e[i][r])}},e.binarySearchCustom=function(t,e,i,n){for(var r=1e4,s=0,o=0,a=t.length-1;a>=o&&r>s;){var h=Math.floor((o+a)/2),l=t[h],u=void 0===n?l[i]:l[i][n],d=e(u);if(0==d)return h;-1==d?o=h+1:a=h-1,s++}return-1},e.binarySearchValue=function(t,e,i,n,r){for(var s,o,a,h,l=1e4,u=0,d=0,c=t.length-1,r=void 0!=r?r:function(t,e){return t==e?0:e>t?-1:1};c>=d&&l>u;){if(h=Math.floor(.5*(c+d)),s=t[Math.max(0,h-1)][i],o=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==r(o,e))return h;if(r(s,e)<0&&r(o,e)>0)return"before"==n?Math.max(0,h-1):h;if(r(o,e)<0&&r(a,e)>0)return"before"==n?h:Math.min(t.length-1,h+1);r(o,e)<0?d=h+1:c=h-1,u++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return an.apply(null,arguments)}function i(t){an=t}function n(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var i,n=[];for(i=0;i0)for(i in ln)n=ln[i],r=e[n],f(r)||(t[n]=r);return t}function m(t){p(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),un===!1&&(un=!0,e.updateOffset(this),un=!1)}function v(t){return t instanceof m||null!=t&&null!=t._isAMomentObject}function y(t){return 0>t?Math.ceil(t):Math.floor(t)}function g(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=y(e)),i}function _(t,e,i){var n,r=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),o=0;for(n=0;r>n;n++)(i&&t[n]!==e[n]||!i&&g(t[n])!==g(e[n]))&&o++;return o+s}function x(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function w(t,i){var n=!0;return a(function(){return null!=e.deprecationHandler&&e.deprecationHandler(null,t),n&&(x(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),n=!1),i.apply(this,arguments)},i)}function b(t,i){null!=e.deprecationHandler&&e.deprecationHandler(t,i),dn[t]||(x(i),dn[t]=!0)}function M(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function S(t){return"[object Object]"===Object.prototype.toString.call(t)}function T(t){var e,i;for(i in t)e=t[i],M(e)?this[i]=e:this["_"+i]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function D(t,e){var i,n=a({},t);for(i in e)o(e,i)&&(S(t[i])&&S(e[i])?(n[i]={},a(n[i],t[i]),a(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);return n}function k(t){null!=t&&this.set(t)}function C(t){return t?t.toLowerCase().replace("_","-"):t}function O(t){for(var e,i,n,r,s=0;s0;){if(n=P(r.slice(0,e).join("-")))return n;if(i&&i.length>=e&&_(r,i,!0)>=e-1)break;e--}s++}return null}function P(e){var i=null;if(!mn[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=fn._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),E(i)}catch(n){}return mn[e]}function E(t,e){var i;return t&&(i=f(e)?A(t):L(t,e),i&&(fn=i)),fn._abbr}function L(t,e){return null!==e?(e.abbr=t,null!=mn[t]?(b("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=D(mn[t]._config,e)):null!=e.parentLocale&&(null!=mn[e.parentLocale]?e=D(mn[e.parentLocale]._config,e):b("parentLocaleUndefined","specified parentLocale is not defined yet")),mn[t]=new k(e),E(t),mn[t]):(delete mn[t],null)}function Y(t,e){if(null!=e){var i;null!=mn[t]&&(e=D(mn[t]._config,e)),i=new k(e),i.parentLocale=mn[t],mn[t]=i,E(t)}else null!=mn[t]&&(null!=mn[t].parentLocale?mn[t]=mn[t].parentLocale:null!=mn[t]&&delete mn[t]);return mn[t]}function A(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return fn;if(!n(t)){if(e=P(t))return e;t=[t]}return O(t)}function R(){return cn(mn)}function I(t,e){var i=t.toLowerCase();vn[i]=vn[i+"s"]=vn[e]=t}function z(t){return"string"==typeof t?vn[t]||vn[t.toLowerCase()]:void 0}function W(t){var e,i,n={};for(i in t)o(t,i)&&(e=z(i),e&&(n[e]=t[i]));return n}function N(t,i){return function(n){return null!=n?(V(this,t,n),e.updateOffset(this,i),this):F(this,t)}}function F(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function V(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function B(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=z(t),M(this[t]))return this[t](e);return this}function U(t,e,i){var n=""+Math.abs(t),r=e-n.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function H(t,e,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),t&&(xn[t]=r),e&&(xn[e[0]]=function(){return U(r.apply(this,arguments),e[1],e[2])}),i&&(xn[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function j(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function G(t){var e,i,n=t.match(yn);for(e=0,i=n.length;i>e;e++)xn[n[e]]?n[e]=xn[n[e]]:n[e]=j(n[e]);return function(e){var r,s="";for(r=0;i>r;r++)s+=n[r]instanceof Function?n[r].call(e,t):n[r];return s}}function X(t,e){return t.isValid()?(e=Z(e,t.localeData()),_n[e]=_n[e]||G(e),_n[e](t)):t.localeData().invalidDate()}function Z(t,e){function i(t){return e.longDateFormat(t)||t}var n=5;for(gn.lastIndex=0;n>=0&&gn.test(t);)t=t.replace(gn,i),gn.lastIndex=0,n-=1;return t}function q(t,e,i){Wn[t]=M(e)?e:function(t,n){return t&&i?i:e}}function Q(t,e){return o(Wn,t)?Wn[t](e._strict,e._locale):new RegExp($(t))}function $(t){return J(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,r){return e||i||n||r}))}function J(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function K(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(n=function(t,i){i[e]=g(t)}),i=0;in;++n)s=h([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===e?(r=pn.call(this._shortMonthsParse,o),-1!==r?r:null):(r=pn.call(this._longMonthsParse,o),-1!==r?r:null):"MMM"===e?(r=pn.call(this._shortMonthsParse,o),-1!==r?r:(r=pn.call(this._longMonthsParse,o),-1!==r?r:null)):(r=pn.call(this._longMonthsParse,o),-1!==r?r:(r=pn.call(this._shortMonthsParse,o),-1!==r?r:null))}function ot(t,e,i){var n,r,s;if(this._monthsParseExact)return st.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;12>n;n++){if(r=h([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}}function at(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=g(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return i=Math.min(t.date(),it(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function ht(t){return null!=t?(at(this,t),e.updateOffset(this,!0),this):F(this,"Month")}function lt(){return it(this.year(),this.month())}function ut(t){return this._monthsParseExact?(o(this,"_monthsRegex")||ct.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function dt(t){return this._monthsParseExact?(o(this,"_monthsRegex")||ct.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function ct(){function t(t,e){return e.length-t.length}var e,i,n=[],r=[],s=[];for(e=0;12>e;e++)i=h([2e3,e]),n.push(this.monthsShort(i,"")),r.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(n.sort(t),r.sort(t),s.sort(t),e=0;12>e;e++)n[e]=J(n[e]),r[e]=J(r[e]),s[e]=J(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function ft(t){var e,i=t._a;return i&&-2===u(t).overflow&&(e=i[Vn]<0||i[Vn]>11?Vn:i[Bn]<1||i[Bn]>it(i[Fn],i[Vn])?Bn:i[Un]<0||i[Un]>24||24===i[Un]&&(0!==i[Hn]||0!==i[jn]||0!==i[Gn])?Un:i[Hn]<0||i[Hn]>59?Hn:i[jn]<0||i[jn]>59?jn:i[Gn]<0||i[Gn]>999?Gn:-1,u(t)._overflowDayOfYear&&(Fn>e||e>Bn)&&(e=Bn),u(t)._overflowWeeks&&-1===e&&(e=Xn),u(t)._overflowWeekday&&-1===e&&(e=Zn),u(t).overflow=e),t}function pt(t){var e,i,n,r,s,o,a=t._i,h=tr.exec(a)||er.exec(a);if(h){for(u(t).iso=!0,e=0,i=nr.length;i>e;e++)if(nr[e][1].exec(h[1])){r=nr[e][0],n=nr[e][2]!==!1;break}if(null==r)return void(t._isValid=!1);if(h[3]){for(e=0,i=rr.length;i>e;e++)if(rr[e][1].exec(h[3])){s=(h[2]||" ")+rr[e][0];break}if(null==s)return void(t._isValid=!1)}if(!n&&null!=s)return void(t._isValid=!1);if(h[4]){if(!ir.exec(h[4]))return void(t._isValid=!1);o="Z"}t._f=r+(s||"")+(o||""),Ot(t)}else t._isValid=!1}function mt(t){var i=sr.exec(t._i);return null!==i?void(t._d=new Date(+i[1])):(pt(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function vt(t,e,i,n,r,s,o){var a=new Date(t,e,i,n,r,s,o);return 100>t&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function yt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function gt(t){return _t(t)?366:365}function _t(t){return t%4===0&&t%100!==0||t%400===0}function xt(){return _t(this.year())}function wt(t,e,i){var n=7+e-i,r=(7+yt(t,0,n).getUTCDay()-e)%7;return-r+n-1}function bt(t,e,i,n,r){var s,o,a=(7+i-n)%7,h=wt(t,n,r),l=1+7*(e-1)+a+h;return 0>=l?(s=t-1,o=gt(s)+l):l>gt(t)?(s=t+1,o=l-gt(t)):(s=t,o=l),{year:s,dayOfYear:o}}function Mt(t,e,i){var n,r,s=wt(t.year(),e,i),o=Math.floor((t.dayOfYear()-s-1)/7)+1;return 1>o?(r=t.year()-1,n=o+St(r,e,i)):o>St(t.year(),e,i)?(n=o-St(t.year(),e,i),r=t.year()+1):(r=t.year(),n=o),{week:n,year:r}}function St(t,e,i){var n=wt(t,e,i),r=wt(t+1,e,i);return(gt(t)-n+r)/7}function Tt(t,e,i){return null!=t?t:null!=e?e:i}function Dt(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function kt(t){var e,i,n,r,s=[];if(!t._d){for(n=Dt(t),t._w&&null==t._a[Bn]&&null==t._a[Vn]&&Ct(t),t._dayOfYear&&(r=Tt(t._a[Fn],n[Fn]),t._dayOfYear>gt(r)&&(u(t)._overflowDayOfYear=!0),i=yt(r,0,t._dayOfYear),t._a[Vn]=i.getUTCMonth(),t._a[Bn]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=n[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Un]&&0===t._a[Hn]&&0===t._a[jn]&&0===t._a[Gn]&&(t._nextDay=!0,t._a[Un]=0),t._d=(t._useUTC?yt:vt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Un]=24)}}function Ct(t){var e,i,n,r,s,o,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,o=4,i=Tt(e.GG,t._a[Fn],Mt(zt(),1,4).year),n=Tt(e.W,1),r=Tt(e.E,1),(1>r||r>7)&&(h=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,i=Tt(e.gg,t._a[Fn],Mt(zt(),s,o).year),n=Tt(e.w,1),null!=e.d?(r=e.d,(0>r||r>6)&&(h=!0)):null!=e.e?(r=e.e+s,(e.e<0||e.e>6)&&(h=!0)):r=s),1>n||n>St(i,s,o)?u(t)._overflowWeeks=!0:null!=h?u(t)._overflowWeekday=!0:(a=bt(i,n,r,s,o),t._a[Fn]=a.year,t._dayOfYear=a.dayOfYear)}function Ot(t){if(t._f===e.ISO_8601)return void pt(t);t._a=[],u(t).empty=!0;var i,n,r,s,o,a=""+t._i,h=a.length,l=0;for(r=Z(t._f,t._locale).match(yn)||[],i=0;i0&&u(t).unusedInput.push(o),a=a.slice(a.indexOf(n)+n.length),l+=n.length),xn[s]?(n?u(t).empty=!1:u(t).unusedTokens.push(s),et(s,n,t)):t._strict&&!n&&u(t).unusedTokens.push(s);u(t).charsLeftOver=h-l,a.length>0&&u(t).unusedInput.push(a),u(t).bigHour===!0&&t._a[Un]<=12&&t._a[Un]>0&&(u(t).bigHour=void 0),u(t).parsedDateParts=t._a.slice(0),u(t).meridiem=t._meridiem,t._a[Un]=Pt(t._locale,t._a[Un],t._meridiem),kt(t),ft(t)}function Pt(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(n=t.isPM(i),n&&12>e&&(e+=12),n||12!==e||(e=0),e):e}function Et(t){var e,i,n,r,s;if(0===t._f.length)return u(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rs)&&(n=s,i=e));a(t,i||e)}function Lt(t){if(!t._d){var e=W(t._i);t._a=s([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),kt(t)}}function Yt(t){var e=new m(ft(At(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function At(t){var e=t._i,i=t._f;return t._locale=t._locale||A(t._l),null===e||void 0===i&&""===e?c({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),v(e)?new m(ft(e)):(n(i)?Et(t):i?Ot(t):r(e)?t._d=e:Rt(t),d(t)||(t._d=null),t))}function Rt(t){var i=t._i;void 0===i?t._d=new Date(e.now()):r(i)?t._d=new Date(i.valueOf()):"string"==typeof i?mt(t):n(i)?(t._a=s(i.slice(0),function(t){return parseInt(t,10)}),kt(t)):"object"==typeof i?Lt(t):"number"==typeof i?t._d=new Date(i):e.createFromInputFallback(t)}function It(t,e,i,n,r){var s={};return"boolean"==typeof i&&(n=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=r,s._l=i,s._i=t,s._f=e,s._strict=n,Yt(s)}function zt(t,e,i,n){return It(t,e,i,n,!1)}function Wt(t,e){var i,r;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return zt();for(i=e[0],r=1;rt&&(t=-t,i="-"),i+U(~~(t/60),2)+e+U(~~t%60,2)})}function Ht(t,e){var i=(e||"").match(t)||[],n=i[i.length-1]||[],r=(n+"").match(ur)||["-",0,0],s=+(60*r[1])+g(r[2]);return"+"===r[0]?s:-s}function jt(t,i){var n,s;return i._isUTC?(n=i.clone(),s=(v(t)||r(t)?t.valueOf():zt(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),e.updateOffset(n,!1),n):zt(t).local()}function Gt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Xt(t,i){var n,r=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Ht(Rn,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&i&&(n=Gt(this)),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==t&&(!i||this._changeInProgress?ue(this,re(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:Gt(this):null!=t?this:NaN}function Zt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function qt(t){return this.utcOffset(0,t)}function Qt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Gt(this),"m")),this}function $t(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ht(An,this._i)),this}function Jt(t){return this.isValid()?(t=t?zt(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Kt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function te(){if(!f(this._isDSTShifted))return this._isDSTShifted;var t={};if(p(t,this),t=At(t),t._a){var e=t._isUTC?h(t._a):zt(t._a);this._isDSTShifted=this.isValid()&&_(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function ee(){return this.isValid()?!this._isUTC:!1}function ie(){return this.isValid()?this._isUTC:!1}function ne(){return this.isValid()?this._isUTC&&0===this._offset:!1}function re(t,e){var i,n,r,s=t,a=null;return Bt(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(a=dr.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:g(a[Bn])*i,h:g(a[Un])*i,m:g(a[Hn])*i,s:g(a[jn])*i,ms:g(a[Gn])*i}):(a=cr.exec(t))?(i="-"===a[1]?-1:1,s={y:se(a[2],i),M:se(a[3],i),w:se(a[4],i),d:se(a[5],i),h:se(a[6],i),m:se(a[7],i),s:se(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=ae(zt(s.from),zt(s.to)),s={},s.ms=r.milliseconds,s.M=r.months),n=new Vt(s),Bt(t)&&o(t,"_locale")&&(n._locale=t._locale),n}function se(t,e){var i=t&&parseFloat(t.replace(",",".")); -return(isNaN(i)?0:i)*e}function oe(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function ae(t,e){var i;return t.isValid()&&e.isValid()?(e=jt(e,t),t.isBefore(e)?i=oe(t,e):(i=oe(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function he(t){return 0>t?-1*Math.round(-1*t):Math.round(t)}function le(t,e){return function(i,n){var r,s;return null===n||isNaN(+n)||(b(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=i,i=n,n=s),i="string"==typeof i?+i:i,r=re(i,n),ue(this,r,t),this}}function ue(t,i,n,r){var s=i._milliseconds,o=he(i._days),a=he(i._months);t.isValid()&&(r=null==r?!0:r,s&&t._d.setTime(t._d.valueOf()+s*n),o&&V(t,"Date",F(t,"Date")+o*n),a&&at(t,F(t,"Month")+a*n),r&&e.updateOffset(t,o||a))}function de(t,e){var i=t||zt(),n=jt(i,this).startOf("day"),r=this.diff(n,"days",!0),s=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse",o=e&&(M(e[s])?e[s]():e[s]);return this.format(o||this.localeData().calendar(s,this,zt(i)))}function ce(){return new m(this)}function fe(t,e){var i=v(t)?t:zt(t);return this.isValid()&&i.isValid()?(e=z(f(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()e-s?(i=t.clone().add(r-1,"months"),n=(e-s)/(s-i)):(i=t.clone().add(r+1,"months"),n=(e-s)/(i-s)),-(r+n)||0}function we(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function be(){var t=this.clone().utc();return 0s&&(e=s),Ze.call(this,t,e,i,n,r))}function Ze(t,e,i,n,r){var s=bt(t,e,i,n,r),o=yt(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function qe(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Qe(t){return Mt(t,this._week.dow,this._week.doy).week}function $e(){return this._week.dow}function Je(){return this._week.doy}function Ke(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function ti(t){var e=Mt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function ei(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function ii(t,e){return n(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function ni(t){return this._weekdaysShort[t.day()]}function ri(t){return this._weekdaysMin[t.day()]}function si(t,e,i){var n,r,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;7>n;++n)s=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?(r=pn.call(this._weekdaysParse,o),-1!==r?r:null):"ddd"===e?(r=pn.call(this._shortWeekdaysParse,o),-1!==r?r:null):(r=pn.call(this._minWeekdaysParse,o),-1!==r?r:null):"dddd"===e?(r=pn.call(this._weekdaysParse,o),-1!==r?r:(r=pn.call(this._shortWeekdaysParse,o),-1!==r?r:(r=pn.call(this._minWeekdaysParse,o),-1!==r?r:null))):"ddd"===e?(r=pn.call(this._shortWeekdaysParse,o),-1!==r?r:(r=pn.call(this._weekdaysParse,o),-1!==r?r:(r=pn.call(this._minWeekdaysParse,o),-1!==r?r:null))):(r=pn.call(this._minWeekdaysParse,o),-1!==r?r:(r=pn.call(this._weekdaysParse,o),-1!==r?r:(r=pn.call(this._shortWeekdaysParse,o),-1!==r?r:null)))}function oi(t,e,i){var n,r,s;if(this._weekdaysParseExact)return si.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;7>n;n++){if(r=h([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}}function ai(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ei(t,this.localeData()),this.add(t-e,"d")):e}function hi(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function li(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function ui(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||fi.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex}function di(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||fi.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function ci(t){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||fi.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function fi(){function t(t,e){return e.length-t.length}var e,i,n,r,s,o=[],a=[],l=[],u=[];for(e=0;7>e;e++)i=h([2e3,1]).day(e),n=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),s=this.weekdays(i,""),o.push(n),a.push(r),l.push(s),u.push(n),u.push(r),u.push(s);for(o.sort(t),a.sort(t),l.sort(t),u.sort(t),e=0;7>e;e++)a[e]=J(a[e]),l[e]=J(l[e]),u[e]=J(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function pi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function mi(){return this.hours()%12||12}function vi(){return this.hours()||24}function yi(t,e){H(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function gi(t,e){return e._meridiemParse}function _i(t){return"p"===(t+"").toLowerCase().charAt(0)}function xi(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function wi(t,e){e[Gn]=g(1e3*("0."+t))}function bi(){return this._isUTC?"UTC":""}function Mi(){return this._isUTC?"Coordinated Universal Time":""}function Si(t){return zt(1e3*t)}function Ti(){return zt.apply(null,arguments).parseZone()}function Di(t,e,i){var n=this._calendar[t];return M(n)?n.call(e,i):n}function ki(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function Ci(){return this._invalidDate}function Oi(t){return this._ordinal.replace("%d",t)}function Pi(t){return t}function Ei(t,e,i,n){var r=this._relativeTime[i];return M(r)?r(t,e,i,n):r.replace(/%d/i,t)}function Li(t,e){var i=this._relativeTime[t>0?"future":"past"];return M(i)?i(e):i.replace(/%s/i,e)}function Yi(t,e,i,n){var r=A(),s=h().set(n,e);return r[i](s,t)}function Ai(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Yi(t,e,i,"month");var n,r=[];for(n=0;12>n;n++)r[n]=Yi(t,n,i,"month");return r}function Ri(t,e,i,n){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var r=A(),s=t?r._week.dow:0;if(null!=i)return Yi(e,(i+s)%7,n,"day");var o,a=[];for(o=0;7>o;o++)a[o]=Yi(e,(o+s)%7,n,"day");return a}function Ii(t,e){return Ai(t,e,"months")}function zi(t,e){return Ai(t,e,"monthsShort")}function Wi(t,e,i){return Ri(t,e,i,"weekdays")}function Ni(t,e,i){return Ri(t,e,i,"weekdaysShort")}function Fi(t,e,i){return Ri(t,e,i,"weekdaysMin")}function Vi(){var t=this._data;return this._milliseconds=Nr(this._milliseconds),this._days=Nr(this._days),this._months=Nr(this._months),t.milliseconds=Nr(t.milliseconds),t.seconds=Nr(t.seconds),t.minutes=Nr(t.minutes),t.hours=Nr(t.hours),t.months=Nr(t.months),t.years=Nr(t.years),this}function Bi(t,e,i,n){var r=re(e,i);return t._milliseconds+=n*r._milliseconds,t._days+=n*r._days,t._months+=n*r._months,t._bubble()}function Ui(t,e){return Bi(this,t,e,1)}function Hi(t,e){return Bi(this,t,e,-1)}function ji(t){return 0>t?Math.floor(t):Math.ceil(t)}function Gi(){var t,e,i,n,r,s=this._milliseconds,o=this._days,a=this._months,h=this._data;return s>=0&&o>=0&&a>=0||0>=s&&0>=o&&0>=a||(s+=864e5*ji(Zi(a)+o),o=0,a=0),h.milliseconds=s%1e3,t=y(s/1e3),h.seconds=t%60,e=y(t/60),h.minutes=e%60,i=y(e/60),h.hours=i%24,o+=y(i/24),r=y(Xi(o)),a+=r,o-=ji(Zi(r)),n=y(a/12),a%=12,h.days=o,h.months=a,h.years=n,this}function Xi(t){return 4800*t/146097}function Zi(t){return 146097*t/4800}function qi(t){var e,i,n=this._milliseconds;if(t=z(t),"month"===t||"year"===t)return e=this._days+n/864e5,i=this._months+Xi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Zi(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}}function Qi(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*g(this._months/12)}function $i(t){return function(){return this.as(t)}}function Ji(t){return t=z(t),this[t+"s"]()}function Ki(t){return function(){return this._data[t]}}function tn(){return y(this.days()/7)}function en(t,e,i,n,r){return r.relativeTime(e||1,!!i,t,n)}function nn(t,e,i){var n=re(t).abs(),r=es(n.as("s")),s=es(n.as("m")),o=es(n.as("h")),a=es(n.as("d")),h=es(n.as("M")),l=es(n.as("y")),u=r=s&&["m"]||s=o&&["h"]||o=a&&["d"]||a=h&&["M"]||h=l&&["y"]||["yy",l];return u[2]=e,u[3]=+t>0,u[4]=i,en.apply(null,u)}function rn(t,e){return void 0===is[t]?!1:void 0===e?is[t]:(is[t]=e,!0)}function sn(t){var e=this.localeData(),i=nn(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function on(){var t,e,i,n=ns(this._milliseconds)/1e3,r=ns(this._days),s=ns(this._months);t=y(n/60),e=y(t/60),n%=60,t%=60,i=y(s/12),s%=12;var o=i,a=s,h=r,l=e,u=t,d=n,c=this.asSeconds();return c?(0>c?"-":"")+"P"+(o?o+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(l||u||d?"T":"")+(l?l+"H":"")+(u?u+"M":"")+(d?d+"S":""):"P0D"}var an,hn;hn=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;i>n;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var ln=e.momentProperties=[],un=!1,dn={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var cn;cn=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)o(t,e)&&i.push(e);return i};var fn,pn,mn={},vn={},yn=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,gn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,_n={},xn={},wn=/\d/,bn=/\d\d/,Mn=/\d{3}/,Sn=/\d{4}/,Tn=/[+-]?\d{6}/,Dn=/\d\d?/,kn=/\d\d\d\d?/,Cn=/\d\d\d\d\d\d?/,On=/\d{1,3}/,Pn=/\d{1,4}/,En=/[+-]?\d{1,6}/,Ln=/\d+/,Yn=/[+-]?\d+/,An=/Z|[+-]\d\d:?\d\d/gi,Rn=/Z|[+-]\d\d(?::?\d\d)?/gi,In=/[+-]?\d+(\.\d{1,3})?/,zn=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Wn={},Nn={},Fn=0,Vn=1,Bn=2,Un=3,Hn=4,jn=5,Gn=6,Xn=7,Zn=8;pn=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e=t?""+t:"+"+t}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),I("year","y"),q("Y",Yn),q("YY",Dn,bn),q("YYYY",Pn,Sn),q("YYYYY",En,Tn),q("YYYYYY",En,Tn),K(["YYYYY","YYYYYY"],Fn),K("YYYY",function(t,i){i[Fn]=2===t.length?e.parseTwoDigitYear(t):g(t)}),K("YY",function(t,i){i[Fn]=e.parseTwoDigitYear(t)}),K("Y",function(t,e){e[Fn]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return g(t)+(g(t)>68?1900:2e3)};var or=N("FullYear",!0);e.ISO_8601=function(){};var ar=w("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=zt.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:c()}),hr=w("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=zt.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:c()}),lr=function(){return Date.now?Date.now():+new Date};Ut("Z",":"),Ut("ZZ",""),q("Z",Rn),q("ZZ",Rn),K(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Ht(Rn,t)});var ur=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var dr=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,cr=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;re.fn=Vt.prototype;var fr=le(1,"add"),pr=le(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var mr=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Be("gggg","weekYear"),Be("ggggg","weekYear"),Be("GGGG","isoWeekYear"),Be("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),q("G",Yn),q("g",Yn),q("GG",Dn,bn),q("gg",Dn,bn),q("GGGG",Pn,Sn),q("gggg",Pn,Sn),q("GGGGG",En,Tn),q("ggggg",En,Tn),tt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=g(t)}),tt(["gg","GG"],function(t,i,n,r){i[r]=e.parseTwoDigitYear(t)}),H("Q",0,"Qo","quarter"),I("quarter","Q"),q("Q",wn),K("Q",function(t,e){e[Vn]=3*(g(t)-1)}),H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),q("w",Dn),q("ww",Dn,bn),q("W",Dn),q("WW",Dn,bn),tt(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=g(t)});var vr={dow:0,doy:6};H("D",["DD",2],"Do","date"),I("date","D"),q("D",Dn),q("DD",Dn,bn),q("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),K(["D","DD"],Bn),K("Do",function(t,e){e[Bn]=g(t.match(Dn)[0],10)});var yr=N("Date",!0);H("d",0,"do","day"),H("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),H("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),H("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),q("d",Dn),q("e",Dn),q("E",Dn),q("dd",function(t,e){return e.weekdaysMinRegex(t)}),q("ddd",function(t,e){return e.weekdaysShortRegex(t)}),q("dddd",function(t,e){return e.weekdaysRegex(t)}),tt(["dd","ddd","dddd"],function(t,e,i,n){var r=i._locale.weekdaysParse(t,n,i._strict);null!=r?e.d=r:u(i).invalidWeekday=t}),tt(["d","e","E"],function(t,e,i,n){e[n]=g(t)});var gr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),_r="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),wr=zn,br=zn,Mr=zn;H("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),q("DDD",On),q("DDDD",Mn),K(["DDD","DDDD"],function(t,e,i){i._dayOfYear=g(t)}),H("H",["HH",2],0,"hour"),H("h",["hh",2],0,mi),H("k",["kk",2],0,vi),H("hmm",0,0,function(){return""+mi.apply(this)+U(this.minutes(),2)}),H("hmmss",0,0,function(){return""+mi.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),yi("a",!0),yi("A",!1),I("hour","h"),q("a",gi),q("A",gi),q("H",Dn),q("h",Dn),q("HH",Dn,bn),q("hh",Dn,bn),q("hmm",kn),q("hmmss",Cn),q("Hmm",kn),q("Hmmss",Cn),K(["H","HH"],Un),K(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),K(["h","hh"],function(t,e,i){e[Un]=g(t),u(i).bigHour=!0}),K("hmm",function(t,e,i){var n=t.length-2;e[Un]=g(t.substr(0,n)),e[Hn]=g(t.substr(n)),u(i).bigHour=!0}),K("hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[Un]=g(t.substr(0,n)),e[Hn]=g(t.substr(n,2)),e[jn]=g(t.substr(r)),u(i).bigHour=!0}),K("Hmm",function(t,e,i){var n=t.length-2;e[Un]=g(t.substr(0,n)),e[Hn]=g(t.substr(n))}),K("Hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[Un]=g(t.substr(0,n)),e[Hn]=g(t.substr(n,2)),e[jn]=g(t.substr(r))});var Sr=/[ap]\.?m?\.?/i,Tr=N("Hours",!0);H("m",["mm",2],0,"minute"),I("minute","m"),q("m",Dn),q("mm",Dn,bn),K(["m","mm"],Hn);var Dr=N("Minutes",!1);H("s",["ss",2],0,"second"),I("second","s"),q("s",Dn),q("ss",Dn,bn),K(["s","ss"],jn);var kr=N("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),q("S",On,wn),q("SS",On,bn),q("SSS",On,Mn);var Cr;for(Cr="SSSS";Cr.length<=9;Cr+="S")q(Cr,Ln);for(Cr="S";Cr.length<=9;Cr+="S")K(Cr,wi);var Or=N("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var Pr=m.prototype;Pr.add=fr,Pr.calendar=de,Pr.clone=ce,Pr.diff=_e,Pr.endOf=Ee,Pr.format=Me,Pr.from=Se,Pr.fromNow=Te,Pr.to=De,Pr.toNow=ke,Pr.get=B,Pr.invalidAt=Fe,Pr.isAfter=fe,Pr.isBefore=pe,Pr.isBetween=me,Pr.isSame=ve,Pr.isSameOrAfter=ye,Pr.isSameOrBefore=ge,Pr.isValid=We,Pr.lang=mr,Pr.locale=Ce,Pr.localeData=Oe,Pr.max=hr,Pr.min=ar,Pr.parsingFlags=Ne,Pr.set=B,Pr.startOf=Pe,Pr.subtract=pr,Pr.toArray=Re,Pr.toObject=Ie,Pr.toDate=Ae,Pr.toISOString=be,Pr.toJSON=ze,Pr.toString=we,Pr.unix=Ye,Pr.valueOf=Le,Pr.creationData=Ve,Pr.year=or,Pr.isLeapYear=xt,Pr.weekYear=Ue,Pr.isoWeekYear=He,Pr.quarter=Pr.quarters=qe,Pr.month=ht,Pr.daysInMonth=lt,Pr.week=Pr.weeks=Ke,Pr.isoWeek=Pr.isoWeeks=ti,Pr.weeksInYear=Ge,Pr.isoWeeksInYear=je,Pr.date=yr,Pr.day=Pr.days=ai,Pr.weekday=hi,Pr.isoWeekday=li,Pr.dayOfYear=pi,Pr.hour=Pr.hours=Tr,Pr.minute=Pr.minutes=Dr,Pr.second=Pr.seconds=kr,Pr.millisecond=Pr.milliseconds=Or,Pr.utcOffset=Xt,Pr.utc=qt,Pr.local=Qt,Pr.parseZone=$t,Pr.hasAlignedHourOffset=Jt,Pr.isDST=Kt,Pr.isDSTShifted=te,Pr.isLocal=ee,Pr.isUtcOffset=ie,Pr.isUtc=ne,Pr.isUTC=ne,Pr.zoneAbbr=bi,Pr.zoneName=Mi,Pr.dates=w("dates accessor is deprecated. Use date instead.",yr),Pr.months=w("months accessor is deprecated. Use month instead",ht),Pr.years=w("years accessor is deprecated. Use year instead",or),Pr.zone=w("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Zt);var Er=Pr,Lr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Yr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Ar="Invalid date",Rr="%d",Ir=/\d{1,2}/,zr={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Wr=k.prototype;Wr._calendar=Lr,Wr.calendar=Di,Wr._longDateFormat=Yr,Wr.longDateFormat=ki,Wr._invalidDate=Ar,Wr.invalidDate=Ci,Wr._ordinal=Rr,Wr.ordinal=Oi,Wr._ordinalParse=Ir,Wr.preparse=Pi,Wr.postformat=Pi,Wr._relativeTime=zr,Wr.relativeTime=Ei,Wr.pastFuture=Li,Wr.set=T,Wr.months=nt,Wr._months=Qn,Wr.monthsShort=rt,Wr._monthsShort=$n,Wr.monthsParse=ot,Wr._monthsRegex=Kn,Wr.monthsRegex=dt,Wr._monthsShortRegex=Jn,Wr.monthsShortRegex=ut,Wr.week=Qe,Wr._week=vr,Wr.firstDayOfYear=Je,Wr.firstDayOfWeek=$e,Wr.weekdays=ii,Wr._weekdays=gr,Wr.weekdaysMin=ri,Wr._weekdaysMin=xr,Wr.weekdaysShort=ni,Wr._weekdaysShort=_r,Wr.weekdaysParse=oi,Wr._weekdaysRegex=wr,Wr.weekdaysRegex=ui,Wr._weekdaysShortRegex=br,Wr.weekdaysShortRegex=di,Wr._weekdaysMinRegex=Mr,Wr.weekdaysMinRegex=ci,Wr.isPM=_i,Wr._meridiemParse=Sr,Wr.meridiem=xi,E("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===g(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=w("moment.lang is deprecated. Use moment.locale instead.",E),e.langData=w("moment.langData is deprecated. Use moment.localeData instead.",A);var Nr=Math.abs,Fr=$i("ms"),Vr=$i("s"),Br=$i("m"),Ur=$i("h"),Hr=$i("d"),jr=$i("w"),Gr=$i("M"),Xr=$i("y"),Zr=Ki("milliseconds"),qr=Ki("seconds"),Qr=Ki("minutes"),$r=Ki("hours"),Jr=Ki("days"),Kr=Ki("months"),ts=Ki("years"),es=Math.round,is={s:45,m:45,h:22,d:26,M:11},ns=Math.abs,rs=Vt.prototype;rs.abs=Vi,rs.add=Ui,rs.subtract=Hi,rs.as=qi,rs.asMilliseconds=Fr,rs.asSeconds=Vr,rs.asMinutes=Br,rs.asHours=Ur,rs.asDays=Hr,rs.asWeeks=jr,rs.asMonths=Gr,rs.asYears=Xr,rs.valueOf=Qi,rs._bubble=Gi,rs.get=Ji,rs.milliseconds=Zr,rs.seconds=qr,rs.minutes=Qr,rs.hours=$r,rs.days=Jr,rs.weeks=tn,rs.months=Kr,rs.years=ts,rs.humanize=sn,rs.toISOString=on,rs.toString=on,rs.toJSON=on,rs.locale=Ce,rs.localeData=Oe,rs.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",on),rs.lang=mr,H("X",0,0,"unix"),H("x",0,0,"valueOf"),q("x",Yn),q("X",In),K("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),K("x",function(t,e,i){i._d=new Date(g(t))}),e.version="2.13.0",i(zt),e.fn=Er,e.min=Nt,e.max=Ft,e.now=lr,e.utc=h,e.unix=Si,e.months=Ii,e.isDate=r,e.locale=E,e.invalid=c,e.duration=re,e.isMoment=v,e.weekdays=Wi,e.parseZone=Ti,e.localeData=A,e.isDuration=Bt,e.monthsShort=zi,e.weekdaysMin=Fi,e.defineLocale=L,e.updateLocale=Y,e.locales=R,e.weekdaysShort=Ni,e.normalizeUnits=z,e.relativeTimeThreshold=rn,e.prototype=Er;var ss=e;return ss})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var n=e&&i||0,r=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>r&&(e[n+r++]=d[t])});16>r;)e[n+r++]=0;return e}function n(t,e){var i=e||0,n=u;return n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]}function r(t,e,i){var r=e&&i||0,s=e||[];t=t||{};var o=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:y+1,l=a-v+(h-y)/1e4;if(0>l&&void 0===t.clockseq&&(o=o+1&16383),(0>l||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,y=h,m=o,a+=122192928e5;var u=(1e4*(268435455&a)+h)%4294967296;s[r++]=u>>>24&255,s[r++]=u>>>16&255,s[r++]=u>>>8&255,s[r++]=255&u;var d=a/4294967296*1e4&268435455;s[r++]=d>>>8&255,s[r++]=255&d,s[r++]=d>>>24&15|16,s[r++]=d>>>16&255,s[r++]=o>>>8|128,s[r++]=255&o;for(var c=t.node||p,f=0;6>f;f++)s[r+f]=c[f];return e?e:n(s)}function s(t,e,i){var r=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||o)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;16>a;a++)e[r+a]=s[a];return e||n(s)}var o,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);o=function(){return crypto.getRandomValues(h),h}}if(!o){var l=new Array(16);o=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),l[e]=t>>>((3&e)<<3)&255;return l}}for(var u=[],d={},c=0;256>c;c++)u[c]=(c+256).toString(16).substr(1),d[u[c]]=c;var f=o(),p=[1|f[0],f[1],f[2],f[3],f[4],f[5]],m=16383&(f[6]<<8|f[7]),v=0,y=0,g=s;g.v1=r,g.v4=s,g.parse=i,g.unparse=n,t.exports=g}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(n)):(n=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n},e.getDOMElement=function(t,e,i,n){var r;return e.hasOwnProperty(t)?e[t].redundant.length>0?(r=e[t].redundant[0],e[t].redundant.shift()):(r=document.createElement(t),void 0!==n?i.insertBefore(r,n):i.appendChild(r)):(r=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==n?i.insertBefore(r,n):i.appendChild(r)),e[t].used.push(r),r},e.drawPoint=function(t,i,n,r,s,o){var a;if("circle"==n.style?(a=e.getSVGElement("circle",r,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*n.size)):(a=e.getSVGElement("rect",r,s),a.setAttributeNS(null,"x",t-.5*n.size),a.setAttributeNS(null,"y",i-.5*n.size),a.setAttributeNS(null,"width",n.size),a.setAttributeNS(null,"height",n.size)),void 0!==n.styles&&a.setAttributeNS(null,"style",n.styles),a.setAttributeNS(null,"class",n.className+" vis-point"),o){var h=e.getSVGElement("text",r,s);o.xOffset&&(t+=o.xOffset),o.yOffset&&(i+=o.yOffset), -o.content&&(h.textContent=o.content),o.className&&h.setAttributeNS(null,"class",o.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,n,r,s,o,a,h){if(0!=r){0>r&&(r*=-1,i-=r);var l=e.getSVGElement("rect",o,a);l.setAttributeNS(null,"x",t-.5*n),l.setAttributeNS(null,"y",i),l.setAttributeNS(null,"width",n),l.setAttributeNS(null,"height",r),l.setAttributeNS(null,"class",s),h&&l.setAttributeNS(null,"style",h)}}},function(t,e,i){function n(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),n=0,r=i.length;r>n;n++){var s=i[n],o=this._options.type[s];"Date"==o||"ISODate"==o||"ASPDate"==o?this._type[s]="Date":this._type[s]=o}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),o=i(9);n.prototype.setOptions=function(t){t&&void 0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=o.extend(this,{replace:["add","update","remove"]})),"object"===r(t.queue)&&this._queue.setOptions(t.queue)))},n.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},n.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},n.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},n.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},n.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var n=[];t in this._subscribers&&(n=n.concat(this._subscribers[t])),"*"in this._subscribers&&(n=n.concat(this._subscribers["*"]));for(var r=0,s=n.length;s>r;r++){var o=n[r];o.callback&&o.callback(t,e,i||null)}},n.prototype.add=function(t,e){var i,n=[],r=this;if(Array.isArray(t))for(var s=0,o=t.length;o>s;s++)i=r._addItem(t[s]),n.push(i);else{if(!(t instanceof Object))throw new Error("Unknown dataType");i=r._addItem(t),n.push(i)}return n.length&&this._trigger("add",{items:n},e),n},n.prototype.update=function(t,e){var i=[],n=[],r=[],o=[],a=this,h=a._fieldId,l=function(t){var e=t[h];if(a._data[e]){var l=s.extend({},a._data[e]);e=a._updateItem(t),n.push(e),o.push(t),r.push(l)}else e=a._addItem(t),i.push(e)};if(Array.isArray(t))for(var u=0,d=t.length;d>u;u++)t[u]instanceof Object?l(t[u]):console.warn("Ignoring input item, which is not an object at index "+u);else{if(!(t instanceof Object))throw new Error("Unknown dataType");l(t)}if(i.length&&this._trigger("add",{items:i},e),n.length){var c={items:n,oldData:r,data:o};this._trigger("update",c,e)}return i.concat(n)},n.prototype.get=function(t){var e,i,n,r=this,o=s.getType(arguments[0]);"String"==o||"Number"==o?(e=arguments[0],n=arguments[1]):"Array"==o?(i=arguments[0],n=arguments[1]):n=arguments[0];var a;if(n&&n.returnType){var h=["Array","Object"];a=-1==h.indexOf(n.returnType)?"Array":n.returnType}else a="Array";var l,u,d,c,f,p=n&&n.type||this._options.type,m=n&&n.filter,v=[];if(void 0!=e)l=r._getItem(e,p),l&&m&&!m(l)&&(l=null);else if(void 0!=i)for(c=0,f=i.length;f>c;c++)l=r._getItem(i[c],p),m&&!m(l)||v.push(l);else for(u=Object.keys(this._data),c=0,f=u.length;f>c;c++)d=u[c],l=r._getItem(d,p),m&&!m(l)||v.push(l);if(n&&n.order&&void 0==e&&this._sort(v,n.order),n&&n.fields){var y=n.fields;if(void 0!=e)l=this._filterFields(l,y);else for(c=0,f=v.length;f>c;c++)v[c]=this._filterFields(v[c],y)}if("Object"==a){var g,_={};for(c=0,f=v.length;f>c;c++)g=v[c],_[g.id]=g;return _}return void 0!=e?l:v},n.prototype.getIds=function(t){var e,i,n,r,s,o=this._data,a=t&&t.filter,h=t&&t.order,l=t&&t.type||this._options.type,u=Object.keys(o),d=[];if(a)if(h){for(s=[],e=0,i=u.length;i>e;e++)n=u[e],r=this._getItem(n,l),a(r)&&s.push(r);for(this._sort(s,h),e=0,i=s.length;i>e;e++)d.push(s[e][this._fieldId])}else for(e=0,i=u.length;i>e;e++)n=u[e],r=this._getItem(n,l),a(r)&&d.push(r[this._fieldId]);else if(h){for(s=[],e=0,i=u.length;i>e;e++)n=u[e],s.push(o[n]);for(this._sort(s,h),e=0,i=s.length;i>e;e++)d.push(s[e][this._fieldId])}else for(e=0,i=u.length;i>e;e++)n=u[e],r=o[n],d.push(r[this._fieldId]);return d},n.prototype.getDataSet=function(){return this},n.prototype.forEach=function(t,e){var i,n,r,s,o=e&&e.filter,a=e&&e.type||this._options.type,h=this._data,l=Object.keys(h);if(e&&e.order){var u=this.get(e);for(i=0,n=u.length;n>i;i++)r=u[i],s=r[this._fieldId],t(r,s)}else for(i=0,n=l.length;n>i;i++)s=l[i],r=this._getItem(s,a),o&&!o(r)||t(r,s)},n.prototype.map=function(t,e){var i,n,r,s,o=e&&e.filter,a=e&&e.type||this._options.type,h=[],l=this._data,u=Object.keys(l);for(i=0,n=u.length;n>i;i++)r=u[i],s=this._getItem(r,a),o&&!o(s)||h.push(t(s,r));return e&&e.order&&this._sort(h,e.order),h},n.prototype._filterFields=function(t,e){if(!t)return t;var i,n,r={},s=Object.keys(t),o=s.length;if(Array.isArray(e))for(i=0;o>i;i++)n=s[i],-1!=e.indexOf(n)&&(r[n]=t[n]);else for(i=0;o>i;i++)n=s[i],e.hasOwnProperty(n)&&(r[e[n]]=t[n]);return r},n.prototype._sort=function(t,e){if(s.isString(e)){var i=e;t.sort(function(t,e){var n=t[i],r=e[i];return n>r?1:r>n?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},n.prototype.remove=function(t,e){var i,n,r,s=[];if(Array.isArray(t))for(i=0,n=t.length;n>i;i++)r=this._remove(t[i]),null!=r&&s.push(r);else r=this._remove(t),null!=r&&s.push(r);return s.length&&this._trigger("remove",{items:s},e),s},n.prototype._remove=function(t){if(s.isNumber(t)||s.isString(t)){if(this._data[t])return delete this._data[t],this.length--,t}else if(t instanceof Object){var e=t[this._fieldId];if(void 0!==e&&this._data[e])return delete this._data[e],this.length--,e}return null},n.prototype.clear=function(t){var e=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:e},t),e},n.prototype.max=function(t){var e,i,n=this._data,r=Object.keys(n),s=null,o=null;for(e=0,i=r.length;i>e;e++){var a=r[e],h=n[a],l=h[t];null!=l&&(!s||l>o)&&(s=h,o=l)}return s},n.prototype.min=function(t){var e,i,n=this._data,r=Object.keys(n),s=null,o=null;for(e=0,i=r.length;i>e;e++){var a=r[e],h=n[a],l=h[t];null!=l&&(!s||o>l)&&(s=h,o=l)}return s},n.prototype.distinct=function(t){var e,i,n,r=this._data,o=Object.keys(r),a=[],h=this._options.type&&this._options.type[t]||null,l=0;for(e=0,n=o.length;n>e;e++){var u=o[e],d=r[u],c=d[t],f=!1;for(i=0;l>i;i++)if(a[i]==c){f=!0;break}f||void 0===c||(a[l]=c,l++)}if(h)for(e=0,n=a.length;n>e;e++)a[e]=s.convert(a[e],h);return a},n.prototype._addItem=function(t){var e=t[this._fieldId];if(void 0!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" already exists")}else e=s.randomUUID(),t[this._fieldId]=e;var i,n,r={},o=Object.keys(t);for(i=0,n=o.length;n>i;i++){var a=o[i],h=this._type[a];r[a]=s.convert(t[a],h)}return this._data[e]=r,this.length++,e},n.prototype._getItem=function(t,e){var i,n,r,o,a=this._data[t];if(!a)return null;var h={},l=Object.keys(a);if(e)for(r=0,o=l.length;o>r;r++)i=l[r],n=a[i],h[i]=s.convert(n,e[i]);else for(r=0,o=l.length;o>r;r++)i=l[r],n=a[i],h[i]=n;return h},n.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 0==e)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var n=Object.keys(t),r=0,o=n.length;o>r;r++){var a=n[r],h=this._type[a];i[a]=s.convert(t[a],h)}return e},t.exports=n},function(t,e){function i(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}i.prototype.setOptions=function(t){t&&"undefined"!=typeof t.delay&&(this.delay=t.delay),t&&"undefined"!=typeof t.max&&(this.max=t.max),this._flushIfNeeded()},i.extend=function(t,e){var n=new i(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){n.flush()};var r=[{name:"flush",original:void 0}];if(e&&e.replace)for(var s=0;sthis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function n(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var r=i(1),s=i(8);n.prototype.setData=function(t){var e,i,n,r;if(this._data&&(this._data.off&&this._data.off("*",this.listener),e=Object.keys(this._ids),this._ids={},this.length=0,this._trigger("remove",{items:e})),this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),n=0,r=e.length;r>n;n++)i=e[n],this._ids[i]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},n.prototype.refresh=function(){var t,e,i,n=this._data.getIds({filter:this._options&&this._options.filter}),r=Object.keys(this._ids),s={},o=[],a=[];for(e=0,i=n.length;i>e;e++)t=n[e],s[t]=!0,this._ids[t]||(o.push(t),this._ids[t]=!0);for(e=0,i=r.length;i>e;e++)t=r[e],s[t]||(a.push(t),delete this._ids[t]);this.length+=o.length-a.length,o.length&&this._trigger("add",{items:o}),a.length&&this._trigger("remove",{items:a})},n.prototype.get=function(t){var e,i,n,s=this,o=r.getType(arguments[0]);"String"==o||"Number"==o||"Array"==o?(e=arguments[0],i=arguments[1],n=arguments[2]):(i=arguments[0],n=arguments[1]);var a=r.extend({},this._options,i);this._options.filter&&i&&i.filter&&(a.filter=function(t){return s._options.filter(t)&&i.filter(t)});var h=[];return void 0!=e&&h.push(e),h.push(a),h.push(n),this._data&&this._data.get.apply(this._data,h)},n.prototype.getIds=function(t){var e;if(this._data){var i,n=this._options.filter;i=t&&t.filter?n?function(e){return n(e)&&t.filter(e)}:t.filter:n,e=this._data.getIds({filter:i,order:t&&t.order})}else e=[];return e},n.prototype.map=function(t,e){var i=[];if(this._data){var n,r=this._options.filter;n=e&&e.filter?r?function(t){return r(t)&&e.filter(t)}:e.filter:r,i=this._data.map(t,{filter:n,order:e&&e.order})}else i=[];return i},n.prototype.getDataSet=function(){for(var t=this;t instanceof n;)t=t._data;return t||null},n.prototype._onEvent=function(t,e,i){var n,r,s,o,a=e&&e.items,h=this._data,l=[],u=[],d=[],c=[];if(a&&h){switch(t){case"add":for(n=0,r=a.length;r>n;n++)s=a[n],o=this.get(s),o&&(this._ids[s]=!0,u.push(s));break;case"update":for(n=0,r=a.length;r>n;n++)s=a[n],o=this.get(s),o?this._ids[s]?(d.push(s),l.push(e.data[n])):(this._ids[s]=!0,u.push(s)):this._ids[s]&&(delete this._ids[s],c.push(s));break;case"remove":for(n=0,r=a.length;r>n;n++)s=a[n],this._ids[s]&&(delete this._ids[s],c.push(s))}this.length+=u.length-c.length,u.length&&this._trigger("add",{items:u},i),d.length&&this._trigger("update",{items:d,data:l},i),c.length&&this._trigger("remove",{items:c},i)}},n.prototype.on=s.prototype.on,n.prototype.off=s.prototype.off,n.prototype._trigger=s.prototype._trigger,n.prototype.subscribe=n.prototype.on,n.prototype.unsubscribe=n.prototype.off,t.exports=n},function(t,e,i){function n(t,e,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.width="400px",this.height="400px",this.margin=10,this.defaultXCenter="55%",this.defaultYCenter="50%",this.xLabel="x",this.yLabel="y",this.zLabel="z";var r=function(t){return t};this.xValueLabel=r,this.yValueLabel=r,this.zValueLabel=r,this.filterLabel="time",this.legendLabel="value",this.style=n.STYLE.DOT,this.showPerspective=!0,this.showGrid=!0,this.keepAspectRatio=!0,this.showShadow=!1,this.showGrayBottom=!1,this.showTooltip=!1,this.verticalRatio=.5,this.animationInterval=1e3,this.animationPreload=!1,this.camera=new f,this.camera.setArmRotation(1,.5),this.camera.setArmLength(1.7),this.eye=new d(0,0,-1),this.dataTable=null,this.dataPoints=null,this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.colFilter=void 0,this.xMin=0,this.xStep=void 0,this.xMax=1,this.yMin=0,this.yStep=void 0,this.yMax=1,this.zMin=0,this.zStep=void 0,this.zMax=1,this.valueMin=0,this.valueMax=1,this.xBarWidth=1,this.yBarWidth=1,this.axisColor="#4D4D4D",this.gridColor="#D3D3D3",this.dataColor={fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},this.dotSizeRatio=.02,this.create(),this.setOptions(i),e&&this.setData(e)}function r(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=i(12),h=i(8),l=i(10),u=i(1),d=i(13),c=i(14),f=i(15),p=i(16),m=i(17),v=i(18);a(n.prototype),n.prototype._setScale=function(){this.scale=new d(1/(this.xMax-this.xMin),1/(this.yMax-this.yMin),1/(this.zMax-this.zMin)),this.keepAspectRatio&&(this.scale.x3&&(this.colFilter=3);else{if(this.style!==n.STYLE.DOTCOLOR&&this.style!==n.STYLE.DOTSIZE&&this.style!==n.STYLE.BARCOLOR&&this.style!==n.STYLE.BARSIZE)throw'Unknown style "'+this.style+'"';this.colX=0,this.colY=1,this.colZ=2,this.colValue=3,t.getNumberOfColumns()>4&&(this.colFilter=4)}},n.prototype.getNumberOfRows=function(t){return t.length},n.prototype.getNumberOfColumns=function(t){var e=0;for(var i in t[0])t[0].hasOwnProperty(i)&&e++;return e},n.prototype.getDistinctValues=function(t,e){for(var i=[],n=0;nt[n][e]&&(i.min=t[n][e]),i.maxt;t++){var p=(t-c)/(f-c),m=240*p,y=this._hsv2rgb(m,1,1);d.strokeStyle=y,d.beginPath(),d.moveTo(h,o+t),d.lineTo(a,o+t),d.stroke()}d.strokeStyle=this.axisColor,d.strokeRect(h,o,i,s)}if(this.style===n.STYLE.DOTSIZE&&(d.strokeStyle=this.axisColor,d.fillStyle=this.dataColor.fill,d.beginPath(),d.moveTo(h,o),d.lineTo(a,o),d.lineTo(a-i+e,l),d.lineTo(h,l),d.closePath(),d.fill(),d.stroke()),this.style===n.STYLE.DOTCOLOR||this.style===n.STYLE.DOTSIZE){var g=5,_=new v(this.valueMin,this.valueMax,(this.valueMax-this.valueMin)/5,!0);for(_.start(),_.getCurrent()0?this.yMin:this.yMax,r=this._convert3Dto2D(new d(w,o,this.zMin)),Math.cos(2*x)>0?(m.textAlign="center",m.textBaseline="top",r.y+=_):Math.sin(2*x)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.xValueLabel(i.getCurrent())+" ",r.x,r.y),i.next()}for(m.lineWidth=1,n=void 0===this.defaultYStep,i=new v(this.yMin,this.yMax,this.yStep,n),i.start(),i.getCurrent()0?this.xMin:this.xMax,r=this._convert3Dto2D(new d(s,i.getCurrent(),this.zMin)),Math.cos(2*x)<0?(m.textAlign="center",m.textBaseline="top",r.y+=_):Math.sin(2*x)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.yValueLabel(i.getCurrent())+" ",r.x,r.y),i.next();for(m.lineWidth=1,n=void 0===this.defaultZStep,i=new v(this.zMin,this.zMax,this.zStep,n),i.start(),i.getCurrent()0?this.xMin:this.xMax,o=Math.sin(x)<0?this.yMin:this.yMax;!i.end();)t=this._convert3Dto2D(new d(s,o,i.getCurrent())),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(t.x-_,t.y),m.stroke(),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(this.zValueLabel(i.getCurrent())+" ",t.x-5,t.y),i.next();m.lineWidth=1,t=this._convert3Dto2D(new d(s,o,this.zMin)),e=this._convert3Dto2D(new d(s,o,this.zMax)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),m.lineWidth=1,c=this._convert3Dto2D(new d(this.xMin,this.yMin,this.zMin)),f=this._convert3Dto2D(new d(this.xMax,this.yMin,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(c.x,c.y),m.lineTo(f.x,f.y),m.stroke(),c=this._convert3Dto2D(new d(this.xMin,this.yMax,this.zMin)),f=this._convert3Dto2D(new d(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(c.x,c.y),m.lineTo(f.x,f.y),m.stroke(),m.lineWidth=1,t=this._convert3Dto2D(new d(this.xMin,this.yMin,this.zMin)),e=this._convert3Dto2D(new d(this.xMin,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),t=this._convert3Dto2D(new d(this.xMax,this.yMin,this.zMin)),e=this._convert3Dto2D(new d(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke();var b=this.xLabel;b.length>0&&(u=.1/this.scale.y,s=(this.xMin+this.xMax)/2,o=Math.cos(x)>0?this.yMin-u:this.yMax+u,r=this._convert3Dto2D(new d(s,o,this.zMin)),Math.cos(2*x)>0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*x)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(b,r.x,r.y));var M=this.yLabel;M.length>0&&(l=.1/this.scale.x,s=Math.sin(x)>0?this.xMin-l:this.xMax+l,o=(this.yMin+this.yMax)/2,r=this._convert3Dto2D(new d(s,o,this.zMin)),Math.cos(2*x)<0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*x)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(M,r.x,r.y));var S=this.zLabel;S.length>0&&(h=30,s=Math.cos(x)>0?this.xMin:this.xMax,o=Math.sin(x)<0?this.yMin:this.yMax,a=(this.zMin+this.zMax)/2,r=this._convert3Dto2D(new d(s,o,a)),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(S,r.x-h,r.y))},n.prototype._hsv2rgb=function(t,e,i){var n,r,s,o,a,h;switch(o=i*e,a=Math.floor(t/60),h=o*(1-Math.abs(t/60%2-1)),a){case 0:n=o,r=h,s=0;break;case 1:n=h,r=o,s=0;break;case 2:n=0,r=o,s=h;break;case 3:n=0,r=h,s=o;break;case 4:n=h,r=0,s=o;break;case 5:n=o,r=0,s=h;break;default:n=0,r=0,s=0}return"RGB("+parseInt(255*n)+","+parseInt(255*r)+","+parseInt(255*s)+")"},n.prototype._redrawDataGrid=function(){var t,e,i,r,s,o,a,h,l,u,c,f,p=this.frame.canvas,m=p.getContext("2d");if(m.lineJoin="round",m.lineCap="round",!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(s=0;s0}else o=!0;o?(f=(t.point.z+e.point.z+i.point.z+r.point.z)/4,l=240*(1-(f-this.zMin)*this.scale.z/this.verticalRatio),u=1,this.showShadow?(c=Math.min(1+b.x/M/2,1),a=this._hsv2rgb(l,u,c),h=a):(c=1,a=this._hsv2rgb(l,u,c),h=this.axisColor)):(a="gray",h=this.axisColor),m.lineWidth=this._getStrokeWidth(t),m.fillStyle=a,m.strokeStyle=h,m.beginPath(),m.moveTo(t.screen.x,t.screen.y),m.lineTo(e.screen.x,e.screen.y),m.lineTo(r.screen.x,r.screen.y),m.lineTo(i.screen.x,i.screen.y),m.closePath(),m.fill(),m.stroke()}}else for(s=0;sc&&(c=0);var f,p,m;this.style===n.STYLE.DOTCOLOR?(f=240*(1-(l.point.value-this.valueMin)*this.scale.value),p=this._hsv2rgb(f,1,1),m=this._hsv2rgb(f,1,.8)):this.style===n.STYLE.DOTSIZE?(p=this.dataColor.fill,m=this.dataColor.stroke):(f=240*(1-(l.point.z-this.zMin)*this.scale.z/this.verticalRatio),p=this._hsv2rgb(f,1,1),m=this._hsv2rgb(f,1,.8)),i.lineWidth=this._getStrokeWidth(l),i.strokeStyle=m,i.fillStyle=p,i.beginPath(),i.arc(l.screen.x,l.screen.y,c,0,2*Math.PI,!0),i.fill(),i.stroke()}}},n.prototype._redrawDataBar=function(){var t,e,i,r,s=this.frame.canvas,o=s.getContext("2d");if(!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(t=0;t0){for(t=this.dataPoints[0],n.lineWidth=this._getStrokeWidth(t),n.lineJoin="round",n.lineCap="round",n.strokeStyle=this.dataColor.stroke,n.beginPath(),n.moveTo(t.screen.x,t.screen.y),e=1;e0?1:0>t?-1:0}var n=e[0],r=e[1],s=e[2],o=i((r.x-n.x)*(t.y-n.y)-(r.y-n.y)*(t.x-n.x)),a=i((s.x-r.x)*(t.y-r.y)-(s.y-r.y)*(t.x-r.x)),h=i((n.x-s.x)*(t.y-s.y)-(n.y-s.y)*(t.x-s.x));return!(0!=o&&0!=a&&o!=a||0!=a&&0!=h&&a!=h||0!=o&&0!=h&&o!=h)},n.prototype._dataPointFromXY=function(t,e){var i,r=100,s=null,o=null,a=null,h=new c(t,e);if(this.style===n.STYLE.BAR||this.style===n.STYLE.BARCOLOR||this.style===n.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){s=this.dataPoints[i];var l=s.surfaces;if(l)for(var u=l.length-1;u>=0;u--){var d=l[u],f=d.corners,p=[f[0].screen,f[1].screen,f[2].screen],m=[f[2].screen,f[3].screen,f[0].screen];if(this._insideTriangle(h,p)||this._insideTriangle(h,m))return s}}else for(i=0;i_)&&r>_&&(a=_,o=s)}}return o},n.prototype._showTooltip=function(t){var e,i,n;this.tooltip?(e=this.tooltip.dom.content,i=this.tooltip.dom.line,n=this.tooltip.dom.dot):(e=document.createElement("div"),e.style.position="absolute",e.style.padding="10px",e.style.border="1px solid #4d4d4d",e.style.color="#1a1a1a",e.style.background="rgba(255,255,255,0.7)",e.style.borderRadius="2px",e.style.boxShadow="5px 5px 10px rgba(128,128,128,0.5)",i=document.createElement("div"),i.style.position="absolute",i.style.height="40px",i.style.width="0",i.style.borderLeft="1px solid #4d4d4d",n=document.createElement("div"),n.style.position="absolute",n.style.height="0",n.style.width="0",n.style.border="5px solid #4d4d4d",n.style.borderRadius="5px",this.tooltip={dataPoint:null,dom:{content:e,line:i,dot:n}}),this._hideTooltip(),this.tooltip.dataPoint=t,"function"==typeof this.showTooltip?e.innerHTML=this.showTooltip(t.point):e.innerHTML="
"+this.xLabel+":"+t.point.x+"
"+this.yLabel+":"+t.point.y+"
"+this.zLabel+":"+t.point.z+"
",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(n);var r=e.offsetWidth,s=e.offsetHeight,o=i.offsetHeight,a=n.offsetWidth,h=n.offsetHeight,l=t.screen.x-r/2;l=Math.min(Math.max(l,10),this.frame.clientWidth-10-r),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-o+"px",e.style.left=l+"px",e.style.top=t.screen.y-o-s+"px",n.style.left=t.screen.x-a/2+"px",n.style.top=t.screen.y-h/2+"px"},n.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},t.exports=n},function(t,e){function i(t){return t?n(t):void 0}function n(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){n.off(t,i),e.apply(this,arguments)}var n=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var n,r=0;rn;++n)i[n].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){function i(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}i.subtract=function(t,e){var n=new i;return n.x=t.x-e.x,n.y=t.y-e.y,n.z=t.z-e.z,n},i.add=function(t,e){var n=new i;return n.x=t.x+e.x,n.y=t.y+e.y,n.z=t.z+e.z,n},i.avg=function(t,e){return new i((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},i.crossProduct=function(t,e){var n=new i;return n.x=t.y*e.z-t.z*e.y,n.y=t.z*e.x-t.x*e.z,n.z=t.x*e.y-t.y*e.x,n},i.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=i},function(t,e){function i(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=i},function(t,e,i){function n(){this.armLocation=new r,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0,this.armLength=1.7,this.cameraLocation=new r,this.cameraRotation=new r(.5*Math.PI,0,0),this.calculateCameraOrientation()}var r=i(13);n.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},n.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},n.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},n.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},n.prototype.getArmLength=function(){return this.armLength},n.prototype.getCameraLocation=function(){return this.cameraLocation},n.prototype.getCameraRotation=function(){return this.cameraRotation},n.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=n},function(t,e,i){function n(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return t>e?1:e>t?-1:0}),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var r=i(10);n.prototype.isLoaded=function(){return this.loaded},n.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},n.prototype.getLabel=function(){return this.graph.filterLabel},n.prototype.getColumn=function(){return this.column},n.prototype.getSelectedValue=function(){return void 0!==this.index?this.values[this.index]:void 0},n.prototype.getValues=function(){return this.values},n.prototype.getValue=function(t){if(t>=this.values.length)throw"Error: index out of range";return this.values[t]},n.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 n=new r(this.data,{filter:function(t){return t[i.column]==i.value}}).get();e=this.graph._getDataPoints(n),this.dataPoints[t]=e}return e},n.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},n.prototype.selectValue=function(t){if(t>=this.values.length)throw"Error: index out of range";this.index=t,this.value=this.values[t]},n.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t0&&(t--,this.setIndex(t))},n.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},n.prototype.setIndex=function(t){if(!(tn&&(n=0),n>this.values.length-1&&(n=this.values.length-1),n},n.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,n=i+3;return n},n.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,n=this.leftToIndex(i);this.setIndex(n),r.preventDefault()},n.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",r.removeEventListener(document,"mousemove",this.onmousemove),r.removeEventListener(document,"mouseup",this.onmouseup),r.preventDefault()},t.exports=n},function(t,e){function i(t,e,i,n){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,n)}i.prototype.setRange=function(t,e,i,n){this._start=t?t:0,this._end=e?e:0,this.setStep(i,n)},i.prototype.setStep=function(t,e){void 0===t||0>=t||(void 0!==e&&(this.prettyStep=e),this.prettyStep===!0?this._step=i.calculatePrettyStep(t):this._step=t)},i.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),n=2*Math.pow(10,Math.round(e(t/2))),r=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(n-t)<=Math.abs(s-t)&&(s=n),Math.abs(r-t)<=Math.abs(s-t)&&(s=r),0>=s&&(s=1),s},i.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},i.prototype.getStep=function(){return this._step},i.prototype.start=function(){this._current=this._start-this._start%this._step},i.prototype.next=function(){this._current+=this._step},i.prototype.end=function(){return this._current>this._end},t.exports=i},function(t,e,i){if("undefined"!=typeof window){var n=i(20),r=window.Hammer||i(21);t.exports=n(r,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var n,r,s;!function(i){r=[],n=i,s="function"==typeof n?n.apply(e,r):n,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i,n){function r(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var n=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof n&&(e.srcEvent.stopPropagation=function(){n(),e.stopPropagation()}),e.firstTarget=t;for(var r=t;r&&!i;){var s=r.hammer;if(s)for(var o,a=0;a0?l._handlers[t]=n:(i.off(t,s),delete l._handlers[t]))}),l},l.emit=function(e,n){t=n.target,i.emit(e,n)},l.destroy=function(){var t=i.element.hammer,e=t.indexOf(l);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,l._handlers={},i.destroy()},l}})},function(t,e,i){var n;/*! Hammer.JS - v2.0.6 - 2015-12-23 +"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(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,e),r.loaded=!0,r.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(7),e.DataSet=i(8),e.DataView=i(10),e.Queue=i(9),e.Graph3d=i(11),e.graph3d={Camera:i(15),Filter:i(16),Point2d:i(14),Point3d:i(13),Slider:i(17),StepNumber:i(18)},e.moment=i(2),e.Hammer=i(21),e.keycharm=i(24)},function(t,e,i){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=i(2),o=i(6);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)e.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},e.giveRange=function(t,e,i,n){if(e==t)return.5;var r=1/(e-t);return Math.max(0,(n-t)*r)},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=s.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){return o.v4()},e.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!==n(t[i])&&(t[i]=e)},e.fillIfDefined=function(t,i){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var o in t)void 0!==i[o]&&("object"!==n(i[o])?void 0!==i[o]&&null!==i[o]||void 0===t[o]||r!==!0?t[o]=i[o]:delete t[o]:"object"===n(t[o])&&e.fillIfDefined(t[o],i[o],r))},e.protoExtend=function(t,e){for(var i=1;i3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(n))throw new TypeError("Arrays are not supported by deepExtend");for(var o=2;o3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(n))throw new TypeError("Arrays are not supported by deepExtend");for(var o in n)if(n.hasOwnProperty(o)&&t.indexOf(o)==-1)if(n[o]&&n[o].constructor===Object)void 0===i[o]&&(i[o]={}),i[o].constructor===Object?e.deepExtend(i[o],n[o]):null===n[o]&&void 0!==i[o]&&r===!0?delete i[o]:i[o]=n[o];else if(Array.isArray(n[o])){i[o]=[];for(var s=0;s=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,n)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,n){t.removeEventListener?(void 0===n&&(n=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,n)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,n){return e+e+i+i+n+n});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(t.indexOf("rgba")!=-1)return t;if(t.indexOf("rgb")!=-1){var n=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+n[0]+","+n[1]+","+n[2]+","+i+")"}var n=e.hexToRGB(t);return null==n?t:"rgba("+n.r+","+n.g+","+n.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var n=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(n[0],n[1],n[2])}if(e.isValidHex(t)===!0){var r=e.hexToHSV(t),o={h:r.h,s:.8*r.s,v:Math.min(1,1.02*r.v)},s={h:r.h,s:Math.min(1,1.25*r.s),v:.8*r.v},a=e.HSVToHex(s.h,s.s,s.v),h=e.HSVToHex(o.h,o.s,o.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var n=Math.min(t,Math.min(e,i)),r=Math.max(t,Math.max(e,i));if(n==r)return{h:0,s:0,v:n};var o=t==n?e-i:i==n?t-e:i-t,s=t==n?3:i==n?1:5,a=60*(s-o/(r-n))/360,h=(r-n)/r,l=r;return{h:a,s:h,v:l}};var a={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),n=i[0].trim(),r=i[1].trim();e[n]=r}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var n=a.split(t.style.cssText),r=a.split(i),o=e.extend(n,r);t.style.cssText=a.join(o)},e.removeCssText=function(t,e){var i=a.split(t.style.cssText),n=a.split(e);for(var r in n)n.hasOwnProperty(r)&&delete i[r];t.style.cssText=a.join(i)},e.HSVToRGB=function(t,e,i){var n,r,o,s=Math.floor(6*t),a=6*t-s,h=i*(1-e),l=i*(1-a*e),u=i*(1-(1-a)*e);switch(s%6){case 0:n=i,r=u,o=h;break;case 1:n=l,r=i,o=h;break;case 2:n=h,r=i,o=u;break;case 3:n=h,r=l,o=i;break;case 4:n=u,r=h,o=i;break;case 5:n=i,r=h,o=l}return{r:Math.floor(255*n),g:Math.floor(255*r),b:Math.floor(255*o)}},e.HSVToHex=function(t,i,n){var r=e.HSVToRGB(t,i,n);return e.RGBToHex(r.r,r.g,r.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==("undefined"==typeof i?"undefined":n(i))){for(var r=Object.create(i),o=0;o0&&e(n,t[r-1])<0;r--)t[r]=t[r-1];t[r]=n}return t},e.mergeOptions=function(t,e,i){var n=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]?arguments[4]:{});if(null===e[i])t[i]=Object.create(n[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var r in e[i])e[i].hasOwnProperty(r)&&(t[i][r]=e[i][r])}},e.binarySearchCustom=function(t,e,i,n){for(var r=1e4,o=0,s=0,a=t.length-1;s<=a&&o0)return"before"==n?Math.max(0,h-1):h;if(r(s,e)<0&&r(a,e)>0)return"before"==n?h:Math.min(t.length-1,h+1);r(s,e)<0?d=h+1:c=h-1,u++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},e.getScrollBarWidth=function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;return i==n&&(n=e.clientWidth),document.body.removeChild(e),i-n}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return pn.apply(null,arguments)}function i(t){pn=t}function n(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t){var e;for(e in t)return!1;return!0}function s(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function a(t,e){var i,n=[];for(i=0;i0)for(i in vn)n=vn[i],r=e[n],m(r)||(t[n]=r);return t}function y(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),yn===!1&&(yn=!0,e.updateOffset(this),yn=!1)}function g(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function _(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=_(e)),i}function x(t,e,i){var n,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(n=0;n0?"future":"past"];return D(i)?i(e):i.replace(/%s/i,e)}function A(t,e){var i=t.toLowerCase();Mn[i]=Mn[i+"s"]=Mn[e]=t}function I(t){return"string"==typeof t?Mn[t]||Mn[t.toLowerCase()]:void 0}function W(t){var e,i,n={};for(i in t)h(t,i)&&(e=I(i),e&&(n[e]=t[i]));return n}function z(t,e){Cn[t]=e}function N(t){var e=[];for(var i in t)e.push({unit:i,priority:Cn[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function F(t,i){return function(n){return null!=n?(j(this,t,n),e.updateOffset(this,i),this):G(this,t)}}function G(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function j(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function V(t){return t=I(t),D(this[t])?this[t]():this}function B(t,e){if("object"==typeof t){t=W(t);for(var i=N(t),n=0;n=0;return(o?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function H(t,e,i,n){var r=n;"string"==typeof n&&(r=function(){return this[n]()}),t&&(Ln[t]=r),e&&(Ln[e[0]]=function(){return U(r.apply(this,arguments),e[1],e[2])}),i&&(Ln[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function X(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function Z(t){var e,i,n=t.match(En);for(e=0,i=n.length;e=0&&On.test(t);)t=t.replace(On,i),On.lastIndex=0,n-=1;return t}function $(t,e,i){Qn[t]=D(e)?e:function(t,n){return t&&i?i:e}}function J(t,e){return h(Qn,t)?Qn[t](e._strict,e._locale):new RegExp(K(t))}function K(t){return tt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,r){return e||i||n||r}))}function tt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function et(t,e){var i,n=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(n=function(t,i){i[e]=w(t)}),i=0;i=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function _t(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function wt(t,e,i){var n=7+e-i,r=(7+_t(t,0,n).getUTCDay()-e)%7;return-r+n-1}function xt(t,e,i,n,r){var o,s,a=(7+i-n)%7,h=wt(t,n,r),l=1+7*(e-1)+a+h;return l<=0?(o=t-1,s=mt(o)+l):l>mt(t)?(o=t+1,s=l-mt(t)):(o=t,s=l),{year:o,dayOfYear:s}}function bt(t,e,i){var n,r,o=wt(t.year(),e,i),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?(r=t.year()-1,n=s+St(r,e,i)):s>St(t.year(),e,i)?(n=s-St(t.year(),e,i),r=t.year()+1):(r=t.year(),n=s),{week:n,year:r}}function St(t,e,i){var n=wt(t,e,i),r=wt(t+1,e,i);return(mt(t)-n+r)/7}function Tt(t){return bt(t,this._week.dow,this._week.doy).week}function Dt(){return this._week.dow}function kt(){return this._week.doy}function Mt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ct(t){var e=bt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Et(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Ot(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Pt(t,e){return t?n(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:this._weekdays}function Lt(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Rt(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Yt(t,e,i){var n,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=u([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return i?"dddd"===e?(r=wn.call(this._weekdaysParse,s),r!==-1?r:null):"ddd"===e?(r=wn.call(this._shortWeekdaysParse,s),r!==-1?r:null):(r=wn.call(this._minWeekdaysParse,s),r!==-1?r:null):"dddd"===e?(r=wn.call(this._weekdaysParse,s),r!==-1?r:(r=wn.call(this._shortWeekdaysParse,s),r!==-1?r:(r=wn.call(this._minWeekdaysParse,s),r!==-1?r:null))):"ddd"===e?(r=wn.call(this._shortWeekdaysParse,s),r!==-1?r:(r=wn.call(this._weekdaysParse,s),r!==-1?r:(r=wn.call(this._minWeekdaysParse,s),r!==-1?r:null))):(r=wn.call(this._minWeekdaysParse,s),r!==-1?r:(r=wn.call(this._weekdaysParse,s),r!==-1?r:(r=wn.call(this._shortWeekdaysParse,s),r!==-1?r:null)))}function At(t,e,i){var n,r,o;if(this._weekdaysParseExact)return Yt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(r=u([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}}function It(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Et(t,this.localeData()),this.add(t-e,"d")):e}function Wt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function zt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Ot(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Nt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||jt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=yr),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ft(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||jt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=gr),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Gt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||jt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_r),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function jt(){function t(t,e){return e.length-t.length}var e,i,n,r,o,s=[],a=[],h=[],l=[];for(e=0;e<7;e++)i=u([2e3,1]).day(e),n=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),o=this.weekdays(i,""),s.push(n),a.push(r),h.push(o),l.push(n),l.push(r),l.push(o);for(s.sort(t),a.sort(t),h.sort(t),l.sort(t),e=0;e<7;e++)a[e]=tt(a[e]),h[e]=tt(h[e]),l[e]=tt(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Vt(){return this.hours()%12||12}function Bt(){return this.hours()||24}function Ut(t,e){H(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ht(t,e){return e._meridiemParse}function Xt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Zt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function qt(t){return t?t.toLowerCase().replace("_","-"):t}function Qt(t){for(var e,i,n,r,o=0;o0;){if(n=$t(r.slice(0,e).join("-")))return n;if(i&&i.length>=e&&x(r,i,!0)>=e-1)break;e--}o++}return null}function $t(e){var i=null;if(!Tr[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=wr._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),Jt(i)}catch(t){}return Tr[e]}function Jt(t,e){var i;return t&&(i=m(e)?ee(t):Kt(t,e),i&&(wr=i)),wr._abbr}function Kt(t,e){if(null!==e){var i=Sr;return e.abbr=t,null!=Tr[t]?(T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Tr[t]._config):null!=e.parentLocale&&(null!=Tr[e.parentLocale]?i=Tr[e.parentLocale]._config:T("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),Tr[t]=new C(M(i,e)),Jt(t),Tr[t]}return delete Tr[t],null}function te(t,e){if(null!=e){var i,n=Sr;null!=Tr[t]&&(n=Tr[t]._config),e=M(n,e),i=new C(e),i.parentLocale=Tr[t],Tr[t]=i,Jt(t)}else null!=Tr[t]&&(null!=Tr[t].parentLocale?Tr[t]=Tr[t].parentLocale:null!=Tr[t]&&delete Tr[t]);return Tr[t]}function ee(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return wr;if(!n(t)){if(e=$t(t))return e;t=[t]}return Qt(t)}function ie(){return _n(Tr)}function ne(t){var e,i=t._a;return i&&c(t).overflow===-2&&(e=i[Kn]<0||i[Kn]>11?Kn:i[tr]<1||i[tr]>rt(i[Jn],i[Kn])?tr:i[er]<0||i[er]>24||24===i[er]&&(0!==i[ir]||0!==i[nr]||0!==i[rr])?er:i[ir]<0||i[ir]>59?ir:i[nr]<0||i[nr]>59?nr:i[rr]<0||i[rr]>999?rr:-1,c(t)._overflowDayOfYear&&(etr)&&(e=tr),c(t)._overflowWeeks&&e===-1&&(e=or), +c(t)._overflowWeekday&&e===-1&&(e=sr),c(t).overflow=e),t}function re(t){var e,i,n,r,o,s,a=t._i,h=Dr.exec(a)||kr.exec(a);if(h){for(c(t).iso=!0,e=0,i=Cr.length;emt(r)&&(c(t)._overflowDayOfYear=!0),i=_t(r,0,t._dayOfYear),t._a[Kn]=i.getUTCMonth(),t._a[tr]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=n[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[er]&&0===t._a[ir]&&0===t._a[nr]&&0===t._a[rr]&&(t._nextDay=!0,t._a[er]=0),t._d=(t._useUTC?_t:gt).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[er]=24)}}function le(t){var e,i,n,r,o,s,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,s=4,i=se(e.GG,t._a[Jn],bt(ge(),1,4).year),n=se(e.W,1),r=se(e.E,1),(r<1||r>7)&&(h=!0)):(o=t._locale._week.dow,s=t._locale._week.doy,i=se(e.gg,t._a[Jn],bt(ge(),o,s).year),n=se(e.w,1),null!=e.d?(r=e.d,(r<0||r>6)&&(h=!0)):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(h=!0)):r=o),n<1||n>St(i,o,s)?c(t)._overflowWeeks=!0:null!=h?c(t)._overflowWeekday=!0:(a=xt(i,n,r,o,s),t._a[Jn]=a.year,t._dayOfYear=a.dayOfYear)}function ue(t){if(t._f===e.ISO_8601)return void re(t);t._a=[],c(t).empty=!0;var i,n,r,o,s,a=""+t._i,h=a.length,l=0;for(r=Q(t._f,t._locale).match(En)||[],i=0;i0&&c(t).unusedInput.push(s),a=a.slice(a.indexOf(n)+n.length),l+=n.length),Ln[o]?(n?c(t).empty=!1:c(t).unusedTokens.push(o),nt(o,n,t)):t._strict&&!n&&c(t).unusedTokens.push(o);c(t).charsLeftOver=h-l,a.length>0&&c(t).unusedInput.push(a),t._a[er]<=12&&c(t).bigHour===!0&&t._a[er]>0&&(c(t).bigHour=void 0),c(t).parsedDateParts=t._a.slice(0),c(t).meridiem=t._meridiem,t._a[er]=de(t._locale,t._a[er],t._meridiem),he(t),ne(t)}function de(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(n=t.isPM(i),n&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function ce(t){var e,i,n,r,o;if(0===t._f.length)return c(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ie(){if(!m(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),t=me(t),t._a){var e=t._isUTC?u(t._a):ge(t._a);this._isDSTShifted=this.isValid()&&x(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function We(){return!!this.isValid()&&!this._isUTC}function ze(){return!!this.isValid()&&this._isUTC}function Ne(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Fe(t,e){var i,n,r,o=t,s=null;return Se(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(s=Ar.exec(t))?(i="-"===s[1]?-1:1,o={y:0,d:w(s[tr])*i,h:w(s[er])*i,m:w(s[ir])*i,s:w(s[nr])*i,ms:w(Te(1e3*s[rr]))*i}):(s=Ir.exec(t))?(i="-"===s[1]?-1:1,o={y:Ge(s[2],i),M:Ge(s[3],i),w:Ge(s[4],i),d:Ge(s[5],i),h:Ge(s[6],i),m:Ge(s[7],i),s:Ge(s[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=Ve(ge(o.from),ge(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),n=new be(o),Se(t)&&h(t,"_locale")&&(n._locale=t._locale),n}function Ge(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function je(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ve(t,e){var i;return t.isValid()&&e.isValid()?(e=Me(e,t),t.isBefore(e)?i=je(t,e):(i=je(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Be(t,e){return function(i,n){var r,o;return null===n||isNaN(+n)||(T(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=i,i=n,n=o),i="string"==typeof i?+i:i,r=Fe(i,n),Ue(this,r,t),this}}function Ue(t,i,n,r){var o=i._milliseconds,s=Te(i._days),a=Te(i._months);t.isValid()&&(r=null==r||r,o&&t._d.setTime(t._d.valueOf()+o*n),s&&j(t,"Date",G(t,"Date")+s*n),a&<(t,G(t,"Month")+a*n),r&&e.updateOffset(t,s||a))}function He(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Xe(t,i){var n=t||ge(),r=Me(n,this).startOf("day"),o=e.calendarFormat(this,r)||"sameElse",s=i&&(D(i[o])?i[o].call(this,n):i[o]);return this.format(s||this.localeData().calendar(o,this,ge(n)))}function Ze(){return new y(this)}function qe(t,e){var i=g(t)?t:ge(t);return!(!this.isValid()||!i.isValid())&&(e=I(m(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()o&&(e=o),Oi.call(this,t,e,i,n,r))}function Oi(t,e,i,n,r){var o=xt(t,e,i,n,r),s=_t(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Pi(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Li(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Ri(t,e){e[rr]=w(1e3*("0."+t))}function Yi(){return this._isUTC?"UTC":""}function Ai(){return this._isUTC?"Coordinated Universal Time":""}function Ii(t){return ge(1e3*t)}function Wi(){return ge.apply(null,arguments).parseZone()}function zi(t){return t}function Ni(t,e,i,n){var r=ee(),o=u().set(n,e);return r[i](o,t)}function Fi(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Ni(t,e,i,"month");var n,r=[];for(n=0;n<12;n++)r[n]=Ni(t,n,i,"month");return r}function Gi(t,e,i,n){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var r=ee(),o=t?r._week.dow:0;if(null!=i)return Ni(e,(i+o)%7,n,"day");var s,a=[];for(s=0;s<7;s++)a[s]=Ni(e,(s+o)%7,n,"day");return a}function ji(t,e){return Fi(t,e,"months")}function Vi(t,e){return Fi(t,e,"monthsShort")}function Bi(t,e,i){return Gi(t,e,i,"weekdays")}function Ui(t,e,i){return Gi(t,e,i,"weekdaysShort")}function Hi(t,e,i){return Gi(t,e,i,"weekdaysMin")}function Xi(){var t=this._data;return this._milliseconds=Zr(this._milliseconds),this._days=Zr(this._days),this._months=Zr(this._months),t.milliseconds=Zr(t.milliseconds),t.seconds=Zr(t.seconds),t.minutes=Zr(t.minutes),t.hours=Zr(t.hours),t.months=Zr(t.months),t.years=Zr(t.years),this}function Zi(t,e,i,n){var r=Fe(e,i);return t._milliseconds+=n*r._milliseconds,t._days+=n*r._days,t._months+=n*r._months,t._bubble()}function qi(t,e){return Zi(this,t,e,1)}function Qi(t,e){return Zi(this,t,e,-1)}function $i(t){return t<0?Math.floor(t):Math.ceil(t)}function Ji(){var t,e,i,n,r,o=this._milliseconds,s=this._days,a=this._months,h=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*$i(tn(a)+s),s=0,a=0),h.milliseconds=o%1e3,t=_(o/1e3),h.seconds=t%60,e=_(t/60),h.minutes=e%60,i=_(e/60),h.hours=i%24,s+=_(i/24),r=_(Ki(s)),a+=r,s-=$i(tn(r)),n=_(a/12),a%=12,h.days=s,h.months=a,h.years=n,this}function Ki(t){return 4800*t/146097}function tn(t){return 146097*t/4800}function en(t){var e,i,n=this._milliseconds;if(t=I(t),"month"===t||"year"===t)return e=this._days+n/864e5,i=this._months+Ki(e),"month"===t?i:i/12;switch(e=this._days+Math.round(tn(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}}function nn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)}function rn(t){return function(){return this.as(t)}}function on(t){return t=I(t),this[t+"s"]()}function sn(t){return function(){return this._data[t]}}function an(){return _(this.days()/7)}function hn(t,e,i,n,r){return r.relativeTime(e||1,!!i,t,n)}function ln(t,e,i){var n=Fe(t).abs(),r=uo(n.as("s")),o=uo(n.as("m")),s=uo(n.as("h")),a=uo(n.as("d")),h=uo(n.as("M")),l=uo(n.as("y")),u=r0,u[4]=i,hn.apply(null,u)}function un(t){return void 0===t?uo:"function"==typeof t&&(uo=t,!0)}function dn(t,e){return void 0!==co[t]&&(void 0===e?co[t]:(co[t]=e,!0))}function cn(t){var e=this.localeData(),i=ln(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function fn(){var t,e,i,n=fo(this._milliseconds)/1e3,r=fo(this._days),o=fo(this._months);t=_(n/60),e=_(t/60),n%=60,t%=60,i=_(o/12),o%=12;var s=i,a=o,h=r,l=e,u=t,d=n,c=this.asSeconds();return c?(c<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(l||u||d?"T":"")+(l?l+"H":"")+(u?u+"M":"")+(d?d+"S":""):"P0D"}var pn,mn;mn=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n68?1900:2e3)};var cr=F("FullYear",!0);H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),z("week",5),z("isoWeek",5),$("w",zn),$("ww",zn,Yn),$("W",zn),$("WW",zn,Yn),it(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=w(t)});var fr={dow:0,doy:6};H("d",0,"do","day"),H("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),H("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),H("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),z("day",11),z("weekday",11),z("isoWeekday",11),$("d",zn),$("e",zn),$("E",zn),$("dd",function(t,e){return e.weekdaysMinRegex(t)}),$("ddd",function(t,e){return e.weekdaysShortRegex(t)}),$("dddd",function(t,e){return e.weekdaysRegex(t)}),it(["dd","ddd","dddd"],function(t,e,i,n){var r=i._locale.weekdaysParse(t,n,i._strict);null!=r?e.d=r:c(i).invalidWeekday=t}),it(["d","e","E"],function(t,e,i,n){e[n]=w(t)});var pr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),mr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),vr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),yr=qn,gr=qn,_r=qn;H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Vt),H("k",["kk",2],0,Bt),H("hmm",0,0,function(){return""+Vt.apply(this)+U(this.minutes(),2)}),H("hmmss",0,0,function(){return""+Vt.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Ut("a",!0),Ut("A",!1),A("hour","h"),z("hour",13),$("a",Ht),$("A",Ht),$("H",zn),$("h",zn),$("HH",zn,Yn),$("hh",zn,Yn),$("hmm",Nn),$("hmmss",Fn),$("Hmm",Nn),$("Hmmss",Fn),et(["H","HH"],er),et(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),et(["h","hh"],function(t,e,i){e[er]=w(t),c(i).bigHour=!0}),et("hmm",function(t,e,i){var n=t.length-2;e[er]=w(t.substr(0,n)),e[ir]=w(t.substr(n)),c(i).bigHour=!0}),et("hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[er]=w(t.substr(0,n)),e[ir]=w(t.substr(n,2)),e[nr]=w(t.substr(r)),c(i).bigHour=!0}),et("Hmm",function(t,e,i){var n=t.length-2;e[er]=w(t.substr(0,n)),e[ir]=w(t.substr(n))}),et("Hmmss",function(t,e,i){var n=t.length-4,r=t.length-2;e[er]=w(t.substr(0,n)),e[ir]=w(t.substr(n,2)),e[nr]=w(t.substr(r))});var wr,xr=/[ap]\.?m?\.?/i,br=F("Hours",!0),Sr={calendar:xn,longDateFormat:bn,invalidDate:Sn,ordinal:Tn,ordinalParse:Dn,relativeTime:kn,months:hr,monthsShort:lr,week:fr,weekdays:pr,weekdaysMin:vr,weekdaysShort:mr,meridiemParse:xr},Tr={},Dr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,kr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Mr=/Z|[+-]\d\d(?::?\d\d)?/,Cr=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Er=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Or=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=S("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),e.ISO_8601=function(){};var Pr=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ge.apply(null,arguments);return this.isValid()&&t.isValid()?tthis?this:t:p()}),Rr=function(){return Date.now?Date.now():+new Date};De("Z",":"),De("ZZ",""),$("Z",Xn),$("ZZ",Xn),et(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=ke(Xn,t)});var Yr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Ar=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ir=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Fe.fn=be.prototype;var Wr=Be(1,"add"),zr=Be(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Nr=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ti("gggg","weekYear"),Ti("ggggg","weekYear"),Ti("GGGG","isoWeekYear"),Ti("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),z("weekYear",1),z("isoWeekYear",1),$("G",Un),$("g",Un),$("GG",zn,Yn),$("gg",zn,Yn),$("GGGG",jn,In),$("gggg",jn,In),$("GGGGG",Vn,Wn),$("ggggg",Vn,Wn),it(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=w(t)}),it(["gg","GG"],function(t,i,n,r){i[r]=e.parseTwoDigitYear(t)}),H("Q",0,"Qo","quarter"),A("quarter","Q"),z("quarter",7),$("Q",Rn),et("Q",function(t,e){e[Kn]=3*(w(t)-1)}),H("D",["DD",2],"Do","date"),A("date","D"),z("date",9),$("D",zn),$("DD",zn,Yn),$("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),et(["D","DD"],tr),et("Do",function(t,e){e[tr]=w(t.match(zn)[0],10)});var Fr=F("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),z("dayOfYear",4),$("DDD",Gn),$("DDDD",An),et(["DDD","DDDD"],function(t,e,i){i._dayOfYear=w(t)}),H("m",["mm",2],0,"minute"),A("minute","m"),z("minute",14),$("m",zn),$("mm",zn,Yn),et(["m","mm"],ir);var Gr=F("Minutes",!1);H("s",["ss",2],0,"second"),A("second","s"),z("second",15),$("s",zn),$("ss",zn,Yn),et(["s","ss"],nr);var jr=F("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),z("millisecond",16),$("S",Gn,Rn),$("SS",Gn,Yn),$("SSS",Gn,An);var Vr;for(Vr="SSSS";Vr.length<=9;Vr+="S")$(Vr,Bn);for(Vr="S";Vr.length<=9;Vr+="S")et(Vr,Ri);var Br=F("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var Ur=y.prototype;Ur.add=Wr,Ur.calendar=Xe,Ur.clone=Ze,Ur.diff=ei,Ur.endOf=fi,Ur.format=oi,Ur.from=si,Ur.fromNow=ai,Ur.to=hi,Ur.toNow=li,Ur.get=V,Ur.invalidAt=bi,Ur.isAfter=qe,Ur.isBefore=Qe,Ur.isBetween=$e,Ur.isSame=Je,Ur.isSameOrAfter=Ke,Ur.isSameOrBefore=ti,Ur.isValid=wi,Ur.lang=Nr,Ur.locale=ui,Ur.localeData=di,Ur.max=Lr,Ur.min=Pr,Ur.parsingFlags=xi,Ur.set=B,Ur.startOf=ci,Ur.subtract=zr,Ur.toArray=yi,Ur.toObject=gi,Ur.toDate=vi,Ur.toISOString=ri,Ur.toJSON=_i,Ur.toString=ni,Ur.unix=mi,Ur.valueOf=pi,Ur.creationData=Si,Ur.year=cr,Ur.isLeapYear=yt,Ur.weekYear=Di,Ur.isoWeekYear=ki,Ur.quarter=Ur.quarters=Pi,Ur.month=ut,Ur.daysInMonth=dt,Ur.week=Ur.weeks=Mt,Ur.isoWeek=Ur.isoWeeks=Ct,Ur.weeksInYear=Ci,Ur.isoWeeksInYear=Mi,Ur.date=Fr,Ur.day=Ur.days=It,Ur.weekday=Wt,Ur.isoWeekday=zt,Ur.dayOfYear=Li,Ur.hour=Ur.hours=br,Ur.minute=Ur.minutes=Gr,Ur.second=Ur.seconds=jr,Ur.millisecond=Ur.milliseconds=Br,Ur.utcOffset=Ee,Ur.utc=Pe,Ur.local=Le,Ur.parseZone=Re,Ur.hasAlignedHourOffset=Ye,Ur.isDST=Ae,Ur.isLocal=We,Ur.isUtcOffset=ze,Ur.isUtc=Ne,Ur.isUTC=Ne,Ur.zoneAbbr=Yi,Ur.zoneName=Ai,Ur.dates=S("dates accessor is deprecated. Use date instead.",Fr),Ur.months=S("months accessor is deprecated. Use month instead",ut),Ur.years=S("years accessor is deprecated. Use year instead",cr),Ur.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Oe),Ur.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Ie);var Hr=Ur,Xr=C.prototype;Xr.calendar=E,Xr.longDateFormat=O,Xr.invalidDate=P,Xr.ordinal=L,Xr.preparse=zi,Xr.postformat=zi,Xr.relativeTime=R,Xr.pastFuture=Y,Xr.set=k,Xr.months=ot,Xr.monthsShort=st,Xr.monthsParse=ht,Xr.monthsRegex=ft,Xr.monthsShortRegex=ct,Xr.week=Tt,Xr.firstDayOfYear=kt,Xr.firstDayOfWeek=Dt,Xr.weekdays=Pt,Xr.weekdaysMin=Rt,Xr.weekdaysShort=Lt,Xr.weekdaysParse=At,Xr.weekdaysRegex=Nt,Xr.weekdaysShortRegex=Ft,Xr.weekdaysMinRegex=Gt,Xr.isPM=Xt,Xr.meridiem=Zt,Jt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=S("moment.lang is deprecated. Use moment.locale instead.",Jt),e.langData=S("moment.langData is deprecated. Use moment.localeData instead.",ee);var Zr=Math.abs,qr=rn("ms"),Qr=rn("s"),$r=rn("m"),Jr=rn("h"),Kr=rn("d"),to=rn("w"),eo=rn("M"),io=rn("y"),no=sn("milliseconds"),ro=sn("seconds"),oo=sn("minutes"),so=sn("hours"),ao=sn("days"),ho=sn("months"),lo=sn("years"),uo=Math.round,co={s:45,m:45,h:22,d:26,M:11},fo=Math.abs,po=be.prototype;po.abs=Xi,po.add=qi,po.subtract=Qi,po.as=en,po.asMilliseconds=qr,po.asSeconds=Qr,po.asMinutes=$r,po.asHours=Jr,po.asDays=Kr,po.asWeeks=to,po.asMonths=eo,po.asYears=io,po.valueOf=nn,po._bubble=Ji,po.get=on,po.milliseconds=no,po.seconds=ro,po.minutes=oo,po.hours=so,po.days=ao,po.weeks=an,po.months=ho,po.years=lo,po.humanize=cn,po.toISOString=fn,po.toString=fn,po.toJSON=fn,po.locale=ui,po.localeData=di,po.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",fn),po.lang=Nr,H("X",0,0,"unix"),H("x",0,0,"valueOf"),$("x",Un),$("X",Zn),et("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),et("x",function(t,e,i){i._d=new Date(w(t))}),e.version="2.15.2",i(ge),e.fn=Hr,e.min=we,e.max=xe,e.now=Rr,e.utc=u,e.unix=Ii,e.months=ji,e.isDate=s,e.locale=Jt,e.invalid=p,e.duration=Fe,e.isMoment=g,e.weekdays=Bi,e.parseZone=Wi,e.localeData=ee,e.isDuration=Se,e.monthsShort=Vi,e.weekdaysMin=Hi,e.defineLocale=Kt,e.updateLocale=te,e.locales=ie,e.weekdaysShort=Ui,e.normalizeUnits=I,e.relativeTimeRounding=un,e.relativeTimeThreshold=dn,e.calendarFormat=He,e.prototype=Hr;var mo=e;return mo})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var n=e&&i||0,r=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){r<16&&(e[n+r++]=d[t])});r<16;)e[n+r++]=0;return e}function n(t,e){var i=e||0,n=u;return n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+"-"+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]+n[t[i++]]}function r(t,e,i){var r=e&&i||0,o=e||[];t=t||{};var s=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:y+1,l=a-v+(h-y)/1e4;if(l<0&&void 0===t.clockseq&&(s=s+1&16383),(l<0||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,y=h,m=s,a+=122192928e5;var u=(1e4*(268435455&a)+h)%4294967296;o[r++]=u>>>24&255,o[r++]=u>>>16&255,o[r++]=u>>>8&255,o[r++]=255&u;var d=a/4294967296*1e4&268435455;o[r++]=d>>>8&255,o[r++]=255&d,o[r++]=d>>>24&15|16, +o[r++]=d>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(var c=t.node||p,f=0;f<6;f++)o[r+f]=c[f];return e?e:n(o)}function o(t,e,i){var r=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var o=t.random||(t.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;a++)e[r+a]=o[a];return e||n(o)}var s,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);s=function(){return crypto.getRandomValues(h),h}}if(!s){var l=new Array(16);s=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),l[e]=t>>>((3&e)<<3)&255;return l}}for(var u=[],d={},c=0;c<256;c++)u[c]=(c+256).toString(16).substr(1),d[u[c]]=c;var f=s(),p=[1|f[0],f[1],f[2],f[3],f[4],f[5]],m=16383&(f[6]<<8|f[7]),v=0,y=0,g=o;g.v1=r,g.v4=o,g.parse=i,g.unparse=n,t.exports=g}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(n)):(n=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(n)),e[t].used.push(n),n},e.getDOMElement=function(t,e,i,n){var r;return e.hasOwnProperty(t)?e[t].redundant.length>0?(r=e[t].redundant[0],e[t].redundant.shift()):(r=document.createElement(t),void 0!==n?i.insertBefore(r,n):i.appendChild(r)):(r=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==n?i.insertBefore(r,n):i.appendChild(r)),e[t].used.push(r),r},e.drawPoint=function(t,i,n,r,o,s){var a;if("circle"==n.style?(a=e.getSVGElement("circle",r,o),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*n.size)):(a=e.getSVGElement("rect",r,o),a.setAttributeNS(null,"x",t-.5*n.size),a.setAttributeNS(null,"y",i-.5*n.size),a.setAttributeNS(null,"width",n.size),a.setAttributeNS(null,"height",n.size)),void 0!==n.styles&&a.setAttributeNS(null,"style",n.styles),a.setAttributeNS(null,"class",n.className+" vis-point"),s){var h=e.getSVGElement("text",r,o);s.xOffset&&(t+=s.xOffset),s.yOffset&&(i+=s.yOffset),s.content&&(h.textContent=s.content),s.className&&h.setAttributeNS(null,"class",s.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,n,r,o,s,a,h){if(0!=r){r<0&&(r*=-1,i-=r);var l=e.getSVGElement("rect",s,a);l.setAttributeNS(null,"x",t-.5*n),l.setAttributeNS(null,"y",i),l.setAttributeNS(null,"width",n),l.setAttributeNS(null,"height",r),l.setAttributeNS(null,"class",o),h&&l.setAttributeNS(null,"style",h)}}},function(t,e,i){function n(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),n=0,r=i.length;nr?1:ns)&&(o=h,s=l)}return o},n.prototype.min=function(t){var e,i,n=this._data,r=Object.keys(n),o=null,s=null;for(e=0,i=r.length;ethis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function n(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var r=i(1),o=i(8);n.prototype.setData=function(t){var e,i,n,r,o;if(this._data){for(this._data.off&&this._data.off("*",this.listener),e=this._data.getIds({filter:this._options&&this._options.filter}),o=[],n=0,r=e.length;n0&&(h[r-1].pointNext=s),h.push(s);return h},n.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"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas);var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t),this.frame.filter=document.createElement("div"),this.frame.filter.style.position="absolute",this.frame.filter.style.bottom="0px",this.frame.filter.style.left="0px",this.frame.filter.style.width="100%",this.frame.appendChild(this.frame.filter);var e=this,i=function(t){e._onMouseDown(t)},n=function(t){e._onTouchStart(t)},r=function(t){e._onWheel(t)},o=function(t){e._onTooltip(t)};l.addEventListener(this.frame.canvas,"keydown",onkeydown),l.addEventListener(this.frame.canvas,"mousedown",i),l.addEventListener(this.frame.canvas,"touchstart",n),l.addEventListener(this.frame.canvas,"mousewheel",r),l.addEventListener(this.frame.canvas,"mousemove",o),this.containerElement.appendChild(this.frame)},n.prototype.setSize=function(t,e){this.frame.style.width=t,this.frame.style.height=e,this._resizeCanvas()},n.prototype._resizeCanvas=function(){this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=this.frame.canvas.clientWidth,this.frame.canvas.height=this.frame.canvas.clientHeight,this.frame.filter.style.width=this.frame.canvas.clientWidth-20+"px"},n.prototype.animationStart=function(){if(!this.frame.filter||!this.frame.filter.slider)throw new Error("No animation available");this.frame.filter.slider.play()},n.prototype.animationStop=function(){this.frame.filter&&this.frame.filter.slider&&this.frame.filter.slider.stop()},n.prototype._resizeCenter=function(){"%"===this.xCenter.charAt(this.xCenter.length-1)?this.currentXCenter=parseFloat(this.xCenter)/100*this.frame.canvas.clientWidth:this.currentXCenter=parseFloat(this.xCenter),"%"===this.yCenter.charAt(this.yCenter.length-1)?this.currentYCenter=parseFloat(this.yCenter)/100*(this.frame.canvas.clientHeight-this.frame.filter.clientHeight):this.currentYCenter=parseFloat(this.yCenter)},n.prototype.getCameraPosition=function(){var t=this.camera.getArmRotation();return t.distance=this.camera.getArmLength(),t},n.prototype._readData=function(t){this._dataInitialize(t,this.style),this.dataFilter?this.dataPoints=this.dataFilter._getDataPoints():this.dataPoints=this._getDataPoints(this.dataTable),this._redrawFilter()},n.prototype.setData=function(t){this._readData(t),this.redraw(),this.animationAutoStart&&this.dataFilter&&this.animationStart()},n.prototype.setOptions=function(t){this.animationStop(),v.setOptions(t,this),this.setPointDrawingMethod(),this.setSize(this.width,this.height),this.dataTable&&this.setData(this.dataTable),this.animationAutoStart&&this.dataFilter&&this.animationStart()},n.prototype.setPointDrawingMethod=function(){var t=void 0;switch(this.style){case n.STYLE.BAR:t=n.prototype._redrawBarGraphPoint;break;case n.STYLE.BARCOLOR:t=n.prototype._redrawBarColorGraphPoint;break;case n.STYLE.BARSIZE:t=n.prototype._redrawBarSizeGraphPoint;break;case n.STYLE.DOT:t=n.prototype._redrawDotGraphPoint;break;case n.STYLE.DOTLINE:t=n.prototype._redrawDotLineGraphPoint;break;case n.STYLE.DOTCOLOR:t=n.prototype._redrawDotColorGraphPoint;break;case n.STYLE.DOTSIZE:t=n.prototype._redrawDotSizeGraphPoint;break;case n.STYLE.SURFACE:t=n.prototype._redrawSurfaceGraphPoint;break;case n.STYLE.GRID:t=n.prototype._redrawGridGraphPoint;break;case n.STYLE.LINE:t=n.prototype._redrawLineGraphPoint;break;default:throw new Error("Can not determine point drawing method for graph style '"+this.style+"'")}this._pointDrawingMethod=t},n.prototype.redraw=function(){if(void 0===this.dataPoints)throw new Error("Graph data not initialized");this._resizeCanvas(),this._resizeCenter(),this._redrawSlider(),this._redrawClear(),this._redrawAxis(),this._redrawDataGraph(),this._redrawInfo(),this._redrawLegend()},n.prototype._getContext=function(){var t=this.frame.canvas,e=t.getContext("2d");return e.lineJoin="round",e.lineCap="round",e},n.prototype._redrawClear=function(){var t=this.frame.canvas,e=t.getContext("2d");e.clearRect(0,0,t.width,t.height)},n.prototype._dotSize=function(){return this.frame.clientWidth*this.dotSizeRatio},n.prototype._getLegendWidth=function(){var t;if(this.style===n.STYLE.DOTSIZE){var e=this._dotSize();t=e/2+2*e}else t=this.style===n.STYLE.BARSIZE?this.xBarWidth:20;return t},n.prototype._redrawLegend=function(){if(this.showLegend===!0&&this.style!==n.STYLE.LINE&&this.style!==n.STYLE.BARSIZE){var t=this.style===n.STYLE.BARSIZE||this.style===n.STYLE.DOTSIZE,e=this.style===n.STYLE.DOTSIZE||this.style===n.STYLE.DOTCOLOR||this.style===n.STYLE.BARCOLOR,i=Math.max(.25*this.frame.clientHeight,100),r=this.margin,o=this._getLegendWidth(),s=this.frame.clientWidth-this.margin,a=s-o,h=r+i,l=this._getContext();if(l.lineWidth=1,l.font="14px arial",t===!1){var u,c=0,f=i;for(u=c;u0?(t.textAlign="center",t.textBaseline="top",o.y+=r):Math.sin(2*n)<0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,o.x,o.y)},n.prototype.drawAxisLabelY=function(t,e,i,n,r){void 0===r&&(r=0);var o=this._convert3Dto2D(e);Math.cos(2*n)<0?(t.textAlign="center",t.textBaseline="top",o.y+=r):Math.sin(2*n)>0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,o.x,o.y)},n.prototype.drawAxisLabelZ=function(t,e,i,n){void 0===n&&(n=0);var r=this._convert3Dto2D(e);t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(i,r.x-n,r.y)},n.prototype._line3d=function(t,e,i,n){var r=this._convert3Dto2D(e),o=this._convert3Dto2D(i);this._line(t,r,o,n)},n.prototype._redrawAxis=function(){var t,e,i,n,r,o,s,a,h,l,c,f=this._getContext();f.font=24/this.camera.getArmLength()+"px arial";var m=.025/this.scale.x,v=.025/this.scale.y,y=5/this.camera.getArmLength(),g=this.camera.getArmRotation().horizontal,_=new d(Math.cos(g),Math.sin(g)),w=this.xRange,x=this.yRange,b=this.zRange;for(f.lineWidth=1,n=void 0===this.defaultXStep,i=new p(w.min,w.max,this.xStep,n),i.start(!0);!i.end();){var S=i.getCurrent();this.showGrid?(t=new u(S,x.min,b.min),e=new u(S,x.max,b.min),this._line3d(f,t,e,this.gridColor)):(t=new u(S,x.min,b.min),e=new u(S,x.min+m,b.min),this._line3d(f,t,e,this.axisColor),t=new u(S,x.max,b.min),e=new u(S,x.max-m,b.min),this._line3d(f,t,e,this.axisColor)),s=_.x>0?x.min:x.max;var T=new u(S,s,b.min),D=" "+this.xValueLabel(S)+" ";this.drawAxisLabelX(f,T,D,g,y),i.next()}for(f.lineWidth=1,n=void 0===this.defaultYStep,i=new p(x.min,x.max,this.yStep,n),i.start(!0);!i.end();){var k=i.getCurrent();this.showGrid?(t=new u(w.min,k,b.min),e=new u(w.max,k,b.min),this._line3d(f,t,e,this.gridColor)):(t=new u(w.min,k,b.min),e=new u(w.min+v,k,b.min),this._line3d(f,t,e,this.axisColor),t=new u(w.max,k,b.min),e=new u(w.max-v,k,b.min),this._line3d(f,t,e,this.axisColor)),o=_.y>0?w.min:w.max,T=new u(o,k,b.min);var D=" "+this.yValueLabel(k)+" ";this.drawAxisLabelY(f,T,D,g,y),i.next()}for(f.lineWidth=1,n=void 0===this.defaultZStep,i=new p(b.min,b.max,this.zStep,n),i.start(!0),o=_.x>0?w.min:w.max,s=_.y<0?x.min:x.max;!i.end();){ +var M=i.getCurrent(),C=new u(o,s,M),E=this._convert3Dto2D(C);e=new d(E.x-y,E.y),this._line(f,E,e,this.axisColor);var D=this.zValueLabel(M)+" ";this.drawAxisLabelZ(f,C,D,5),i.next()}f.lineWidth=1,t=new u(o,s,b.min),e=new u(o,s,b.max),this._line3d(f,t,e,this.axisColor);var O,P;f.lineWidth=1,O=new u(w.min,x.min,b.min),P=new u(w.max,x.min,b.min),this._line3d(f,O,P,this.axisColor),O=new u(w.min,x.max,b.min),P=new u(w.max,x.max,b.min),this._line3d(f,O,P,this.axisColor),f.lineWidth=1,t=new u(w.min,x.min,b.min),e=new u(w.min,x.max,b.min),this._line3d(f,t,e,this.axisColor),t=new u(w.max,x.min,b.min),e=new u(w.max,x.max,b.min),this._line3d(f,t,e,this.axisColor);var L=this.xLabel;L.length>0&&(c=.1/this.scale.y,o=w.center()/2,s=_.x>0?x.min-c:x.max+c,r=new u(o,s,b.min),this.drawAxisLabelX(f,r,L,g));var R=this.yLabel;R.length>0&&(l=.1/this.scale.x,o=_.y>0?w.min-l:w.max+l,s=x.center()/2,r=new u(o,s,b.min),this.drawAxisLabelY(f,r,R,g));var Y=this.zLabel;Y.length>0&&(h=30,o=_.x>0?w.min:w.max,s=_.y<0?x.min:x.max,a=b.center()/2,r=new u(o,s,a),this.drawAxisLabelZ(f,r,Y,h))},n.prototype._hsv2rgb=function(t,e,i){var n,r,o,s,a,h;switch(s=i*e,a=Math.floor(t/60),h=s*(1-Math.abs(t/60%2-1)),a){case 0:n=s,r=h,o=0;break;case 1:n=h,r=s,o=0;break;case 2:n=0,r=s,o=h;break;case 3:n=0,r=h,o=s;break;case 4:n=h,r=0,o=s;break;case 5:n=s,r=0,o=h;break;default:n=0,r=0,o=0}return"RGB("+parseInt(255*n)+","+parseInt(255*r)+","+parseInt(255*o)+")"},n.prototype._getStrokeWidth=function(t){return void 0!==t?this.showPerspective?1/-t.trans.z*this.dataColor.strokeWidth:-(this.eye.z/this.camera.getArmLength())*this.dataColor.strokeWidth:this.dataColor.strokeWidth},n.prototype._redrawBar=function(t,e,i,n,r,o){var s,a,h=this,l=e.point,d=this.zRange.min,c=[{point:new u(l.x-i,l.y-n,l.z)},{point:new u(l.x+i,l.y-n,l.z)},{point:new u(l.x+i,l.y+n,l.z)},{point:new u(l.x-i,l.y+n,l.z)}],f=[{point:new u(l.x-i,l.y-n,d)},{point:new u(l.x+i,l.y-n,d)},{point:new u(l.x+i,l.y+n,d)},{point:new u(l.x-i,l.y+n,d)}];c.forEach(function(t){t.screen=h._convert3Dto2D(t.point)}),f.forEach(function(t){t.screen=h._convert3Dto2D(t.point)});var p=[{corners:c,center:u.avg(f[0].point,f[2].point)},{corners:[c[0],c[1],f[1],f[0]],center:u.avg(f[1].point,f[0].point)},{corners:[c[1],c[2],f[2],f[1]],center:u.avg(f[2].point,f[1].point)},{corners:[c[2],c[3],f[3],f[2]],center:u.avg(f[3].point,f[2].point)},{corners:[c[3],c[0],f[0],f[3]],center:u.avg(f[0].point,f[3].point)}];for(e.surfaces=p,s=0;s0}if(a){var f,p=(e.point.z+i.point.z+n.point.z+r.point.z)/4,m=240*(1-(p-this.zRange.min)*this.scale.z/this.verticalRatio),v=1;this.showShadow?(f=Math.min(1+d.x/c/2,1),o=this._hsv2rgb(m,v,f),s=o):(f=1,o=this._hsv2rgb(m,v,f),s=this.axisColor)}else o="gray",s=this.axisColor;t.lineWidth=this._getStrokeWidth(e);var y=[e,i,r,n];this._polygon(t,y,o,s)}},n.prototype._drawGridLine=function(t,e,i){if(void 0!==e&&void 0!==i){var n=(e.point.z+i.point.z)/2,r=240*(1-(n-this.zRange.min)*this.scale.z/this.verticalRatio);t.lineWidth=2*this._getStrokeWidth(e),t.strokeStyle=this._hsv2rgb(r,1,1),this._line(t,e.screen,i.screen)}},n.prototype._redrawGridGraphPoint=function(t,e){this._drawGridLine(t,e,e.pointRight),this._drawGridLine(t,e,e.pointTop)},n.prototype._redrawLineGraphPoint=function(t,e){void 0!==e.pointNext&&(t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=this.dataColor.stroke,this._line(t,e.screen,e.pointNext.screen))},n.prototype._redrawDataGraph=function(){var t,e=this._getContext();if(!(void 0===this.dataPoints||this.dataPoints.length<=0))for(this._calcTranslations(this.dataPoints),t=0;t0?1:t<0?-1:0}var n=e[0],r=e[1],o=e[2],s=i((r.x-n.x)*(t.y-n.y)-(r.y-n.y)*(t.x-n.x)),a=i((o.x-r.x)*(t.y-r.y)-(o.y-r.y)*(t.x-r.x)),h=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x));return!(0!=s&&0!=a&&s!=a||0!=a&&0!=h&&a!=h||0!=s&&0!=h&&s!=h)},n.prototype._dataPointFromXY=function(t,e){var i,r=100,o=null,s=null,a=null,h=new d(t,e);if(this.style===n.STYLE.BAR||this.style===n.STYLE.BARCOLOR||this.style===n.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){o=this.dataPoints[i];var l=o.surfaces;if(l)for(var u=l.length-1;u>=0;u--){var c=l[u],f=c.corners,p=[f[0].screen,f[1].screen,f[2].screen],m=[f[2].screen,f[3].screen,f[0].screen];if(this._insideTriangle(h,p)||this._insideTriangle(h,m))return o}}else for(i=0;i"+this.xLabel+":"+t.point.x+""+this.yLabel+":"+t.point.y+""+this.zLabel+":"+t.point.z+"",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(n);var r=e.offsetWidth,o=e.offsetHeight,s=i.offsetHeight,a=n.offsetWidth,h=n.offsetHeight,l=t.screen.x-r/2;l=Math.min(Math.max(l,10),this.frame.clientWidth-10-r),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-s+"px",e.style.left=l+"px",e.style.top=t.screen.y-s-o+"px",n.style.left=t.screen.x-a/2+"px",n.style.top=t.screen.y-h/2+"px"},n.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},n.prototype.setCameraPosition=function(t){v.setCameraPosition(t,this),this.redraw()},t.exports=n},function(t,e){function i(t){if(t)return n(t)}function n(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){n.off(t,i),e.apply(this,arguments)}var n=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var n,r=0;r.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},n.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},n.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},n.prototype.getArmLength=function(){return this.armLength},n.prototype.getCameraLocation=function(){return this.cameraLocation},n.prototype.getCameraRotation=function(){return this.cameraRotation},n.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=n},function(t,e,i){function n(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return t>e?1:t0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var r=i(10);n.prototype.isLoaded=function(){return this.loaded},n.prototype.getLoadedProgress=function(){for(var t=this.values.length,e=0;this.dataPoints[e];)e++;return Math.round(e/t*100)},n.prototype.getLabel=function(){return this.graph.filterLabel},n.prototype.getColumn=function(){return this.column},n.prototype.getSelectedValue=function(){if(void 0!==this.index)return this.values[this.index]},n.prototype.getValues=function(){return this.values},n.prototype.getValue=function(t){if(t>=this.values.length)throw new Error("Index out of range");return this.values[t]},n.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 n=new r(this.data,{filter:function(t){return t[i.column]==i.value}}).get();e=this.graph._getDataPoints(n),this.dataPoints[t]=e}return e},n.prototype.setOnLoadCallback=function(t){this.onLoadCallback=t},n.prototype.selectValue=function(t){if(t>=this.values.length)throw new Error("Index out of range");this.index=t,this.value=this.values[t]},n.prototype.loadInBackground=function(t){void 0===t&&(t=0);var e=this.graph.frame;if(t0&&(t--,this.setIndex(t))},n.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},n.prototype.setIndex=function(t){if(!(tthis.values.length-1&&(n=this.values.length-1),n},n.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,n=i+3;return n},n.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,n=this.leftToIndex(i);this.setIndex(n),r.preventDefault()},n.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",r.removeEventListener(document,"mousemove",this.onmousemove),r.removeEventListener(document,"mouseup",this.onmouseup),r.preventDefault()},t.exports=n},function(t,e){function i(t,e,i,n){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,n)}i.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.prototype.setRange=function(t,e,i,n){if(!this.isNumeric(t))throw new Error("Parameter 'start' is not numeric; value: "+t);if(!this.isNumeric(e))throw new Error("Parameter 'end' is not numeric; value: "+t);if(!this.isNumeric(i))throw new Error("Parameter 'step' is not numeric; value: "+t);this._start=t?t:0,this._end=e?e:0,this.setStep(i,n)},i.prototype.setStep=function(t,e){void 0===t||t<=0||(void 0!==e&&(this.prettyStep=e),this.prettyStep===!0?this._step=i.calculatePrettyStep(t):this._step=t)},i.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),n=2*Math.pow(10,Math.round(e(t/2))),r=5*Math.pow(10,Math.round(e(t/5))),o=i;return Math.abs(n-t)<=Math.abs(o-t)&&(o=n),Math.abs(r-t)<=Math.abs(o-t)&&(o=r),o<=0&&(o=1),o},i.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},i.prototype.getStep=function(){return this._step},i.prototype.start=function(t){void 0===t&&(t=!1),this._current=this._start-this._start%this._step,t&&this.getCurrent()this._end},t.exports=i},function(t,e){function i(){this.min=void 0,this.max=void 0}i.prototype.adjust=function(t){void 0!==t&&((void 0===this.min||this.min>t)&&(this.min=t),(void 0===this.max||this.maxi)throw new Error("Passed expansion value makes range invalid");this.min=e,this.max=i}},i.prototype.range=function(){return this.max-this.min},i.prototype.center=function(){return(this.min+this.max)/2},t.exports=i},function(t,e,i){function n(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function r(t){return void 0===t||""===t?t:t.charAt(0).toUpperCase()+t.slice(1)}function o(t,e){return void 0===t||""===t?e:t+r(e)}function s(t,e,i,n){var r,s;for(var a in i)r=i[a],s=o(n,r),e[s]=t[r]}function a(t,e,i,n){var r,s;for(var a in i)r=i[a],void 0!==t[r]&&(s=o(n,r),e[s]=t[r])}function h(t,e){if(void 0===t||n(t))throw new Error("No DEFAULTS passed");if(void 0===e)throw new Error("No dst passed");D=t,s(t,e,S),s(t,e,T,"default"),u(t,e),e.margin=10,e.showGrayBottom=!1,e.showTooltip=!1,e.eye=new w(0,0,-1)}function l(t,e){if(void 0!==t){if(void 0===e)throw new Error("No dst passed");if(void 0===D||n(D))throw new Error("DEFAULTS not set for module Settings");a(t,e,S),a(t,e,T,"default"),u(t,e)}}function u(t,e){void 0!==t.backgroundColor&&m(t.backgroundColor,e),v(t.dataColor,e),p(t.style,e),d(t.showLegend,e),y(t.cameraPosition,e),void 0!==t.tooltip&&(e.showTooltip=t.tooltip)}function d(t,e){if(void 0===t){var i=void 0===D.showLegend;if(i){var n=e.style===x.DOTCOLOR||e.style===x.DOTSIZE;e.showLegend=n}}else e.showLegend=t}function c(t){var e=b[t];return void 0===e?-1:e}function f(t){var e=!1;for(var i in x)if(x[i]===t){e=!0;break}return e}function p(t,e){if(void 0!==t){var i;if("string"==typeof t){if(i=c(t),i===-1)throw new Error("Style '"+t+"' is invalid")}else{if(!f(t))throw new Error("Style '"+t+"' is invalid");i=t}e.style=i}}function m(t,e){var i="white",n="gray",r=1;if("string"==typeof t)i=t,n="none",r=0;else{if("object"!==("undefined"==typeof t?"undefined":g(t)))throw new Error("Unsupported type of backgroundColor");void 0!==t.fill&&(i=t.fill),void 0!==t.stroke&&(n=t.stroke),void 0!==t.strokeWidth&&(r=t.strokeWidth)}e.frame.style.backgroundColor=i,e.frame.style.borderColor=n,e.frame.style.borderWidth=r+"px",e.frame.style.borderStyle="solid"}function v(t,e){void 0!==t&&(void 0===e.dataColor&&(e.dataColor={}),"string"==typeof t?(e.dataColor.fill=t,e.dataColor.stroke=t):(t.fill&&(e.dataColor.fill=t.fill),t.stroke&&(e.dataColor.stroke=t.stroke),void 0!==t.strokeWidth&&(e.dataColor.strokeWidth=t.strokeWidth)))}function y(t,e){var i=t;void 0!==i&&(void 0===e.camera&&(e.camera=new _),e.camera.setArmRotation(i.horizontal,i.vertical),e.camera.setArmLength(i.distance))}var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_=i(15),w=i(13),x={BAR:0,BARCOLOR:1,BARSIZE:2,DOT:3,DOTLINE:4,DOTCOLOR:5,DOTSIZE:6,GRID:7,LINE:8,SURFACE:9},b={dot:x.DOT,"dot-line":x.DOTLINE,"dot-color":x.DOTCOLOR,"dot-size":x.DOTSIZE,line:x.LINE,grid:x.GRID,surface:x.SURFACE,bar:x.BAR,"bar-color":x.BARCOLOR,"bar-size":x.BARSIZE},S=["width","height","filterLabel","legendLabel","xLabel","yLabel","zLabel","xValueLabel","yValueLabel","zValueLabel","showGrid","showPerspective","showShadow","keepAspectRatio","verticalRatio","dotSizeRatio","showAnimationControls","animationInterval","animationPreload","animationAutoStart","axisColor","gridColor","xCenter","yCenter"],T=["xBarWidth","yBarWidth","valueMin","valueMax","xMin","xMax","xStep","yMin","yMax","yStep","zMin","zMax","zStep"],D=void 0;t.exports.STYLE=x,t.exports.setDefaults=h,t.exports.setOptions=l,t.exports.setCameraPosition=y},function(t,e,i){if("undefined"!=typeof window){var n=i(22),r=window.Hammer||i(23);t.exports=n(r,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var n,r,o;!function(i){r=[],n=i,o="function"==typeof n?n.apply(e,r):n,!(void 0!==o&&(t.exports=o))}(function(){var t=null;return function e(i,n){function r(t){return t.match(/[^ ]+/g)}function o(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var n=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof n&&(e.srcEvent.stopPropagation=function(){n(),e.stopPropagation()}),e.firstTarget=t;for(var r=t;r&&!i;){var o=r.hammer;if(o)for(var s,a=0;a0?l._handlers[t]=n:(i.off(t,o),delete l._handlers[t]))}),l},l.emit=function(e,n){t=n.target,i.emit(e,n)},l.destroy=function(){var t=i.element.hammer,e=t.indexOf(l);e!==-1&&t.splice(e,1),t.length||delete i.element.hammer,l._handlers={},i.destroy()},l}})},function(t,e,i){var n;/*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * - * Copyright (c) 2015 Jorik Tangelder; - * Licensed under the license */ -!function(r,s,o,a){function h(t,e,i){return setTimeout(f(t,i),e)}function l(t,e,i){return Array.isArray(t)?(u(t,i[e],i),!0):!1}function u(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(n=0;n\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=r.console&&(r.console.warn||r.console.log);return s&&s.call(r.console,n,i),t.apply(this,arguments)}}function c(t,e,i){var n,r=e.prototype;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,i&&dt(n,i)}function f(t,e){return function(){return t.apply(e,arguments)}}function p(t,e){return typeof t==pt?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function v(t,e,i){u(x(e),function(e){t.addEventListener(e,i,!1)})}function y(t,e,i){u(x(e),function(e){t.removeEventListener(e,i,!1)})}function g(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function _(t,e){return t.indexOf(e)>-1}function x(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function S(t,e){for(var i,n,r=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=Y(e):1===r&&(i.firstMultiple=!1);var s=i.firstInput,o=i.firstMultiple,a=o?o.center:s.center,h=e.center=A(n);e.timeStamp=yt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=W(a,h),e.distance=z(a,h),E(i,e),e.offsetDirection=I(e.deltaX,e.deltaY);var l=R(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=vt(l.x)>vt(l.y)?l.x:l.y,e.scale=o?F(o.pointers,n):1,e.rotation=o?N(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,L(i,e);var u=t.element;g(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function E(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Pt&&s.eventType!==Lt||(r=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}function L(t,e){var i,n,r,s,o=t.lastInterval||e,h=e.timeStamp-o.timeStamp;if(e.eventType!=Yt&&(h>Ot||o.velocity===a)){var l=e.deltaX-o.deltaX,u=e.deltaY-o.deltaY,d=R(h,l,u);n=d.x,r=d.y,i=vt(d.x)>vt(d.y)?d.x:d.y,s=I(l,u),t.lastInterval=e}else i=o.velocity,n=o.velocityX,r=o.velocityY,s=o.direction;e.velocity=i,e.velocityX=n,e.velocityY=r,e.direction=s}function Y(t){for(var e=[],i=0;ir;)i+=t[r].clientX,n+=t[r].clientY,r++;return{x:mt(i/e),y:mt(n/e)}}function R(t,e,i){return{x:e/t||0,y:i/t||0}}function I(t,e){return t===e?At:vt(t)>=vt(e)?0>t?Rt:It:0>e?zt:Wt}function z(t,e,i){i||(i=Bt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function W(t,e,i){i||(i=Bt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function N(t,e){return W(e[1],e[0],Ut)+W(t[1],t[0],Ut)}function F(t,e){return z(e[0],e[1],Ut)/z(t[0],t[1],Ut)}function V(){this.evEl=jt,this.evWin=Gt,this.allow=!0,this.pressed=!1,k.apply(this,arguments)}function B(){this.evEl=qt,this.evWin=Qt,k.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function U(){this.evTarget=Jt,this.evWin=Kt,this.started=!1,k.apply(this,arguments)}function H(t,e){var i=b(t.touches),n=b(t.changedTouches);return e&(Lt|Yt)&&(i=M(i.concat(n),"identifier",!0)),[i,n]}function j(){this.evTarget=ee,this.targetIds={},k.apply(this,arguments)}function G(t,e){var i=b(t.touches),n=this.targetIds;if(e&(Pt|Et)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,s,o=b(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return g(t.target,h)}),e===Pt)for(r=0;ra&&(e.push(t),a=e.length-1):r&(Lt|Yt)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var $t={touchstart:Pt,touchmove:Et,touchend:Lt,touchcancel:Yt},Jt="touchstart",Kt="touchstart touchmove touchend touchcancel";c(U,k,{handler:function(t){var e=$t[t.type];if(e===Pt&&(this.started=!0),this.started){var i=H.call(this,t,e);e&(Lt|Yt)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Tt,srcEvent:t})}}});var te={touchstart:Pt,touchmove:Et,touchend:Lt,touchcancel:Yt},ee="touchstart touchmove touchend touchcancel";c(j,k,{handler:function(t){var e=te[t.type],i=G.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Tt,srcEvent:t})}}),c(X,k,{handler:function(t,e,i){var n=i.pointerType==Tt,r=i.pointerType==kt;if(n)this.mouse.allow=!1;else if(r&&!this.mouse.allow)return;e&(Lt|Yt)&&(this.mouse.allow=!0),this.callback(t,e,i)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ie=S(ft.style,"touchAction"),ne=ie!==a,re="compute",se="auto",oe="manipulation",ae="none",he="pan-x",le="pan-y";Z.prototype={set:function(t){t==re&&(t=this.compute()),ne&&this.manager.element.style&&(this.manager.element.style[ie]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return u(this.manager.recognizers,function(e){p(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),q(t.join(" "))},preventDefaults:function(t){if(!ne){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var n=this.actions,r=_(n,ae),s=_(n,le),o=_(n,he);if(r){var a=1===t.pointers.length,h=t.distance<2,l=t.deltaTime<250;if(a&&h&&l)return}if(!o||!s)return r||s&&i&Nt||o&&i&Ft?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ue=1,de=2,ce=4,fe=8,pe=fe,me=16,ve=32;Q.prototype={defaults:{},set:function(t){return dt(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(l(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=K(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return l(t,"dropRecognizeWith",this)?this:(t=K(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(l(t,"requireFailure",this))return this;var e=this.requireFail;return t=K(t,this),-1===w(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(l(t,"dropRequireFailure",this))return this;t=K(t,this);var e=w(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;fe>n&&e(i.options.event+$(n)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),n>=fe&&e(i.options.event+$(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ve)},canEmit:function(){for(var t=0;ts?Rt:It,i=s!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?At:0>o?zt:Wt,i=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,i&&n>e.threshold&&r&e.direction},attrTest:function(t){return tt.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=J(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},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(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(nt,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(Lt|Yt)&&!r)this.reset();else if(t.eventType&Pt)this.reset(),this._timer=h(function(){this.state=pe,this.tryEmit()},e.time,this);else if(t.eventType&Lt)return pe;return ve},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===pe&&(t&&t.eventType&Lt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=yt(),this.manager.emit(this.options.event,this._input)))}}),c(rt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&de)}}),c(st,tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Nt|Ft,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Nt|Ft)?e=t.overallVelocity:i&Nt?e=t.overallVelocityX:i&Ft&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&vt(e)>this.options.velocity&&t.eventType&Lt},emit:function(t){var e=J(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(ot,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance=e;e++)o[String.fromCharCode(e)]={code:65+(e-97),shift:!1};for(e=65;90>=e;e++)o[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;9>=e;e++)o[""+e]={code:48+e,shift:!1};for(e=1;12>=e;e++)o["F"+e]={code:111+e,shift:!1};for(e=0;9>=e;e++)o["num"+e]={code:96+e,shift:!1};o["num*"]={code:106,shift:!1},o["num+"]={code:107,shift:!1},o["num-"]={code:109,shift:!1},o["num/"]={code:111,shift:!1},o["num."]={code:110,shift:!1},o.left={code:37,shift:!1},o.up={code:38,shift:!1},o.right={code:39,shift:!1},o.down={code:40,shift:!1},o.space={code:32,shift:!1},o.enter={code:13,shift:!1},o.shift={code:16,shift:void 0},o.esc={code:27,shift:!1},o.backspace={code:8,shift:!1},o.tab={code:9,shift:!1},o.ctrl={code:17,shift:!1},o.alt={code:18,shift:!1},o["delete"]={code:46,shift:!1},o.pageup={code:33,shift:!1},o.pagedown={code:34,shift:!1},o["="]={code:187,shift:!1},o["-"]={code:189,shift:!1},o["]"]={code:221,shift:!1},o["["]={code:219,shift:!1};var a=function(t){l(t,"keydown")},h=function(t){l(t,"keyup")},l=function(t,e){if(void 0!==s[e][t.keyCode]){for(var n=s[e][t.keyCode],r=0;r\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,n,i),t.apply(this,arguments)}}function c(t,e,i){var n,r=e.prototype;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,i&&mt(n,i)}function f(t,e){return function(){return t.apply(e,arguments)}}function p(t,e){return typeof t==gt?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function v(t,e,i){u(w(e),function(e){t.addEventListener(e,i,!1)})}function y(t,e,i){u(w(e),function(e){t.removeEventListener(e,i,!1)})}function g(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function _(t,e){return t.indexOf(e)>-1}function w(t){return t.trim().split(/\s+/g)}function x(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;ni[e]}):n.sort()),n}function T(t,e){for(var i,n,r=e[0].toUpperCase()+e.slice(1),o=0;o1&&!i.firstMultiple?i.firstMultiple=R(e):1===r&&(i.firstMultiple=!1);var o=i.firstInput,s=i.firstMultiple,a=s?s.center:o.center,h=e.center=Y(n);e.timeStamp=xt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=z(a,h),e.distance=W(a,h),P(i,e),e.offsetDirection=I(e.deltaX,e.deltaY);var l=A(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=wt(l.x)>wt(l.y)?l.x:l.y,e.scale=s?F(s.pointers,n):1,e.rotation=s?N(s.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,L(i,e);var u=t.element;g(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function P(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==Yt&&o.eventType!==It||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}function L(t,e){var i,n,r,o,s=t.lastInterval||e,h=e.timeStamp-s.timeStamp;if(e.eventType!=Wt&&(h>Rt||s.velocity===a)){var l=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,d=A(h,l,u);n=d.x,r=d.y,i=wt(d.x)>wt(d.y)?d.x:d.y,o=I(l,u),t.lastInterval=e}else i=s.velocity,n=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=i,e.velocityX=n,e.velocityY=r,e.direction=o}function R(t){for(var e=[],i=0;i=wt(e)?t<0?Nt:Ft:e<0?Gt:jt}function W(t,e,i){i||(i=Ht);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function z(t,e,i){i||(i=Ht);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function N(t,e){return z(e[1],e[0],Xt)+z(t[1],t[0],Xt)}function F(t,e){return W(e[0],e[1],Xt)/W(t[0],t[1],Xt)}function G(){this.evEl=qt,this.evWin=Qt,this.pressed=!1,M.apply(this,arguments)}function j(){this.evEl=Kt,this.evWin=te,M.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function V(){this.evTarget=ie,this.evWin=ne,this.started=!1,M.apply(this,arguments)}function B(t,e){var i=b(t.touches),n=b(t.changedTouches);return e&(It|Wt)&&(i=S(i.concat(n),"identifier",!0)),[i,n]}function U(){this.evTarget=oe,this.targetIds={},M.apply(this,arguments)}function H(t,e){var i=b(t.touches),n=this.targetIds;if(e&(Yt|At)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,o,s=b(t.changedTouches),a=[],h=this.target;if(o=i.filter(function(t){return g(t.target,h)}),e===Yt)for(r=0;r-1&&n.splice(t,1)};setTimeout(r,se)}}function Q(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;n=we&&e(i.options.event+et(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=Se)},canEmit:function(){for(var t=0;te.threshold&&r&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&ge||!(this.state&ge)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=it(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(st,rt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[fe]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ge)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(at,tt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[de]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancee.time;if(this._input=t,!n||!i||t.eventType&(It|Wt)&&!r)this.reset();else if(t.eventType&Yt)this.reset(),this._timer=h(function(){this.state=xe,this.tryEmit()},e.time,this);else if(t.eventType&It)return xe;return Se},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===xe&&(t&&t.eventType&It?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=xt(),this.manager.emit(this.options.event,this._input)))}}),c(ht,rt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[fe]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ge)}}),c(lt,rt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Vt|Bt,pointers:1},getTouchAction:function(){return ot.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Vt|Bt)?e=t.overallVelocity:i&Vt?e=t.overallVelocityX:i&Bt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&wt(e)>this.options.velocity&&t.eventType&It},emit:function(t){var e=it(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(ut,tt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distancei;i++)if(e[i]!=t[i])return!1;return!0},t.convert=function(e,i){var o;if(void 0!==e){if(null===e)return null;if(!i)return e;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(e);case"number":case"Number":return Number(e.valueOf());case"string":case"String":return String(e);case"Date":if(t.isNumber(e))return new Date(e);if(e instanceof Date)return new Date(e.valueOf());if(n.isMoment(e))return new Date(e.valueOf());if(t.isString(e))return o=r.exec(e),o?new Date(Number(o[1])):n(e).toDate();throw new Error("Cannot convert object of type "+t.getType(e)+" to type Date");case"Moment":if(t.isNumber(e))return n(e);if(e instanceof Date)return n(e.valueOf());if(n.isMoment(e))return n(e);if(t.isString(e))return o=r.exec(e),n(o?Number(o[1]):e);throw new Error("Cannot convert object of type "+t.getType(e)+" to type Date");case"ISODate":if(t.isNumber(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(n.isMoment(e))return e.toDate().toISOString();if(t.isString(e))return o=r.exec(e),o?new Date(Number(o[1])).toISOString():new Date(e).toISOString();throw new Error("Cannot convert object of type "+t.getType(e)+" to type ISODate");case"ASPDate":if(t.isNumber(e))return"/Date("+e+")/";if(e instanceof Date)return"/Date("+e.valueOf()+")/";if(t.isString(e)){o=r.exec(e);var s;return s=o?new Date(Number(o[1])).valueOf():new Date(e).valueOf(),"/Date("+s+")/"}throw new Error("Cannot convert object of type "+t.getType(e)+" to type ASPDate");default:throw new Error('Unknown type "'+i+'"')}}};var r=/^\/?Date\((\-?\d+)/i;t.getType=function(e){var t="undefined"==typeof e?"undefined":o(e);return"object"==t?null===e?"null":e instanceof Boolean?"Boolean":e instanceof Number?"Number":e instanceof String?"String":Array.isArray(e)?"Array":e instanceof Date?"Date":"Object":"number"==t?"Number":"boolean"==t?"Boolean":"string"==t?"String":void 0===t?"undefined":t},t.copyAndExtendArray=function(e,t){for(var i=[],o=0;oi;i++)t(e[i],i,e);else for(i in e)e.hasOwnProperty(i)&&t(e[i],i,e)},t.toArray=function(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(e[i]);return t},t.updateProperty=function(e,t,i){return e[t]!==i?(e[t]=i,!0):!1},t.throttle=function(e,t){var i=null,o=!1;return function n(){i?o=!0:(o=!1,e(),i=setTimeout(function(){i=null,o&&n()},t))}},t.addEventListener=function(e,t,i,o){e.addEventListener?(void 0===o&&(o=!1),"mousewheel"===t&&navigator.userAgent.indexOf("Firefox")>=0&&(t="DOMMouseScroll"),e.addEventListener(t,i,o)):e.attachEvent("on"+t,i)},t.removeEventListener=function(e,t,i,o){e.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===t&&navigator.userAgent.indexOf("Firefox")>=0&&(t="DOMMouseScroll"),e.removeEventListener(t,i,o)):e.detachEvent("on"+t,i)},t.preventDefault=function(e){e||(e=window.event),e.preventDefault?e.preventDefault():e.returnValue=!1},t.getTarget=function(e){e||(e=window.event);var t;return e.target?t=e.target:e.srcElement&&(t=e.srcElement),void 0!=t.nodeType&&3==t.nodeType&&(t=t.parentNode),t},t.hasParent=function(e,t){for(var i=e;i;){if(i===t)return!0;i=i.parentNode}return!1},t.option={},t.option.asBoolean=function(e,t){return"function"==typeof e&&(e=e()),null!=e?0!=e:t||null},t.option.asNumber=function(e,t){return"function"==typeof e&&(e=e()),null!=e?Number(e)||t||null:t||null},t.option.asString=function(e,t){return"function"==typeof e&&(e=e()),null!=e?String(e):t||null},t.option.asSize=function(e,i){return"function"==typeof e&&(e=e()),t.isString(e)?e:t.isNumber(e)?e+"px":i||null},t.option.asElement=function(e,t){return"function"==typeof e&&(e=e()),e||t||null},t.hexToRGB=function(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,i,o){return t+t+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},t.overrideOpacity=function(e,i){if(-1!=e.indexOf("rgba"))return e;if(-1!=e.indexOf("rgb")){var o=e.substr(e.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=t.hexToRGB(e);return null==o?e:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},t.RGBToHex=function(e,t,i){return"#"+((1<<24)+(e<<16)+(t<<8)+i).toString(16).slice(1)},t.parseColor=function(e){var i;if(t.isString(e)===!0){if(t.isValidRGB(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",").map(function(e){return parseInt(e)});e=t.RGBToHex(o[0],o[1],o[2])}if(t.isValidHex(e)===!0){var n=t.hexToHSV(e),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=t.HSVToHex(r.h,r.s,r.v),h=t.HSVToHex(s.h,s.s,s.v);i={background:e,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else i={},i.background=e.background||void 0,i.border=e.border||void 0,t.isString(e.highlight)?i.highlight={border:e.highlight,background:e.highlight}:(i.highlight={},i.highlight.background=e.highlight&&e.highlight.background||void 0,i.highlight.border=e.highlight&&e.highlight.border||void 0),t.isString(e.hover)?i.hover={border:e.hover,background:e.hover}:(i.hover={},i.hover.background=e.hover&&e.hover.background||void 0,i.hover.border=e.hover&&e.hover.border||void 0);return i},t.RGBToHSV=function(e,t,i){e/=255,t/=255,i/=255;var o=Math.min(e,Math.min(t,i)),n=Math.max(e,Math.max(t,i));if(o==n)return{h:0,s:0,v:o};var s=e==o?t-i:i==o?e-t:i-e,r=e==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var a={split:function(e){var t={};return e.split(";").forEach(function(e){if(""!=e.trim()){var i=e.split(":"),o=i[0].trim(),n=i[1].trim();t[o]=n}}),t},join:function(e){return Object.keys(e).map(function(t){return t+": "+e[t]}).join("; ")}};t.addCssText=function(e,i){var o=a.split(e.style.cssText),n=a.split(i),s=t.extend(o,n);e.style.cssText=a.join(s)},t.removeCssText=function(e,t){var i=a.split(e.style.cssText),o=a.split(t);for(var n in o)o.hasOwnProperty(n)&&delete i[n];e.style.cssText=a.join(i)},t.HSVToRGB=function(e,t,i){var o,n,s,r=Math.floor(6*e),a=6*e-r,h=i*(1-t),d=i*(1-a*t),l=i*(1-(1-a)*t);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},t.HSVToHex=function(e,i,o){var n=t.HSVToRGB(e,i,o);return t.RGBToHex(n.r,n.g,n.b)},t.hexToHSV=function(e){var i=t.hexToRGB(e);return t.RGBToHSV(i.r,i.g,i.b)},t.isValidHex=function(e){var t=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e);return t},t.isValidRGB=function(e){e=e.replace(" ","");var t=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(e);return t},t.isValidRGBA=function(e){e=e.replace(" ","");var t=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(e);return t},t.selectiveBridgeObject=function(e,i){if("object"==("undefined"==typeof i?"undefined":o(i))){for(var n=Object.create(i),s=0;s0&&t(o,e[n-1])<0;n--)e[n]=e[n-1];e[n]=o}return e},t.mergeOptions=function(e,t,i){var o=(arguments.length<=3||void 0===arguments[3]?!1:arguments[3],arguments.length<=4||void 0===arguments[4]?{}:arguments[4]);if(null===t[i])e[i]=Object.create(o[i]);else if(void 0!==t[i])if("boolean"==typeof t[i])e[i].enabled=t[i];else{void 0===t[i].enabled&&(e[i].enabled=!0);for(var n in t[i])t[i].hasOwnProperty(n)&&(e[i][n]=t[i][n])}},t.binarySearchCustom=function(e,t,i,o){for(var n=1e4,s=0,r=0,a=e.length-1;a>=r&&n>s;){var h=Math.floor((r+a)/2),d=e[h],l=void 0===o?d[i]:d[i][o],c=t(l);if(0==c)return h;-1==c?r=h+1:a=h-1,s++}return-1},t.binarySearchValue=function(e,t,i,o,n){for(var s,r,a,h,d=1e4,l=0,c=0,u=e.length-1,n=void 0!=n?n:function(e,t){return e==t?0:t>e?-1:1};u>=c&&d>l;){if(h=Math.floor(.5*(u+c)),s=e[Math.max(0,h-1)][i],r=e[h][i],a=e[Math.min(e.length-1,h+1)][i],0==n(r,t))return h;if(n(s,t)<0&&n(r,t)>0)return"before"==o?Math.max(0,h-1):h;if(n(r,t)<0&&n(a,t)>0)return"before"==o?h:Math.min(e.length-1,h+1);n(r,t)<0?c=h+1:u=h-1,l++}return-1},t.easingFunctions={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return.5>e?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return.5>e?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return.5>e?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return.5>e?16*e*e*e*e*e:1+16*--e*e*e*e*e}}},function(e,t,i){e.exports="undefined"!=typeof window&&window.moment||i(3)},function(e,t,i){(function(e){!function(t,i){e.exports=i()}(this,function(){function t(){return ro.apply(null,arguments)}function i(e){ro=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function n(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function s(e,t){var i,o=[];for(i=0;i0)for(i in ho)o=ho[i],n=t[o],f(n)||(e[o]=n);return e}function v(e){p(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),lo===!1&&(lo=!0,t.updateOffset(this),lo=!1)}function y(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function g(e){return 0>e?Math.ceil(e):Math.floor(e)}function b(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=g(t)),i}function m(e,t,i){var o,n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),r=0;for(o=0;n>o;o++)(i&&e[o]!==t[o]||!i&&b(e[o])!==b(t[o]))&&r++;return r+s}function _(e){t.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function w(e,i){var o=!0;return a(function(){return null!=t.deprecationHandler&&t.deprecationHandler(null,e),o&&(_(e+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),o=!1),i.apply(this,arguments)},i)}function k(e,i){null!=t.deprecationHandler&&t.deprecationHandler(e,i),co[e]||(_(i),co[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e){return"[object Object]"===Object.prototype.toString.call(e)}function E(e){var t,i;for(i in e)t=e[i],x(t)?this[i]=t:this["_"+i]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function M(e,t){var i,o=a({},e);for(i in t)r(t,i)&&(O(e[i])&&O(t[i])?(o[i]={},a(o[i],e[i]),a(o[i],t[i])):null!=t[i]?o[i]=t[i]:delete o[i]);return o}function D(e){null!=e&&this.set(e)}function S(e){return e?e.toLowerCase().replace("_","-"):e}function C(e){for(var t,i,o,n,s=0;s0;){if(o=T(n.slice(0,t).join("-")))return o;if(i&&i.length>=t&&m(n,i,!0)>=t-1)break;t--}s++}return null}function T(t){var i=null;if(!vo[t]&&"undefined"!=typeof e&&e&&e.exports)try{i=fo._abbr,!function(){var e=new Error('Cannot find module "./locale"');throw e.code="MODULE_NOT_FOUND",e}(),P(i)}catch(o){}return vo[t]}function P(e,t){var i;return e&&(i=f(t)?I(e):B(e,t),i&&(fo=i)),fo._abbr}function B(e,t){return null!==t?(t.abbr=e,null!=vo[e]?(k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),t=M(vo[e]._config,t)):null!=t.parentLocale&&(null!=vo[t.parentLocale]?t=M(vo[t.parentLocale]._config,t):k("parentLocaleUndefined","specified parentLocale is not defined yet")),vo[e]=new D(t),P(e),vo[e]):(delete vo[e],null)}function F(e,t){if(null!=t){var i;null!=vo[e]&&(t=M(vo[e]._config,t)),i=new D(t),i.parentLocale=vo[e],vo[e]=i,P(e)}else null!=vo[e]&&(null!=vo[e].parentLocale?vo[e]=vo[e].parentLocale:null!=vo[e]&&delete vo[e]);return vo[e]}function I(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return fo;if(!o(e)){if(t=T(e))return t;e=[e]}return C(e)}function j(){return uo(vo)}function N(e,t){var i=e.toLowerCase();yo[i]=yo[i+"s"]=yo[t]=e}function z(e){return"string"==typeof e?yo[e]||yo[e.toLowerCase()]:void 0}function R(e){var t,i,o={};for(i in e)r(e,i)&&(t=z(i),t&&(o[t]=e[i]));return o}function A(e,i){return function(o){return null!=o?(H(this,e,o),t.updateOffset(this,i),this):L(this,e)}}function L(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function H(e,t,i){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](i)}function W(e,t){var i;if("object"==typeof e)for(i in e)this.set(i,e[i]);else if(e=z(e),x(this[e]))return this[e](t);return this}function Y(e,t,i){var o=""+Math.abs(e),n=t-o.length,s=e>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function U(e,t,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),e&&(_o[e]=n),t&&(_o[t[0]]=function(){return Y(n.apply(this,arguments),t[1],t[2])}),i&&(_o[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function V(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function q(e){var t,i,o=e.match(go);for(t=0,i=o.length;i>t;t++)_o[o[t]]?o[t]=_o[o[t]]:o[t]=V(o[t]);return function(t){var n,s="";for(n=0;i>n;n++)s+=o[n]instanceof Function?o[n].call(t,e):o[n];return s}}function G(e,t){return e.isValid()?(t=X(t,e.localeData()),mo[t]=mo[t]||q(t),mo[t](e)):e.localeData().invalidDate()}function X(e,t){function i(e){return t.longDateFormat(e)||e}var o=5;for(bo.lastIndex=0;o>=0&&bo.test(e);)e=e.replace(bo,i),bo.lastIndex=0,o-=1;return e}function K(e,t,i){Ro[e]=x(t)?t:function(e,o){return e&&i?i:t}}function Z(e,t){return r(Ro,e)?Ro[e](t._strict,t._locale):new RegExp(Q(e))}function Q(e){return J(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,o,n){return t||i||o||n}))}function J(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(e,t){var i,o=t;for("string"==typeof e&&(e=[e]),"number"==typeof t&&(o=function(e,i){i[t]=b(e)}),i=0;io;++o)s=h([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===t?(n=po.call(this._shortMonthsParse,r),-1!==n?n:null):(n=po.call(this._longMonthsParse,r),-1!==n?n:null):"MMM"===t?(n=po.call(this._shortMonthsParse,r),-1!==n?n:(n=po.call(this._longMonthsParse,r),-1!==n?n:null)):(n=po.call(this._longMonthsParse,r),-1!==n?n:(n=po.call(this._shortMonthsParse,r),-1!==n?n:null))}function re(e,t,i){var o,n,s;if(this._monthsParseExact)return se.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;12>o;o++){if(n=h([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),i||this._monthsParse[o]||(s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[o].test(e))return o;if(i&&"MMM"===t&&this._shortMonthsParse[o].test(e))return o;if(!i&&this._monthsParse[o].test(e))return o}}function ae(e,t){var i;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=b(t);else if(t=e.localeData().monthsParse(t),"number"!=typeof t)return e;return i=Math.min(e.date(),ie(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,i),e}function he(e){return null!=e?(ae(this,e),t.updateOffset(this,!0),this):L(this,"Month")}function de(){return ie(this.year(),this.month())}function le(e){return this._monthsParseExact?(r(this,"_monthsRegex")||ue.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex}function ce(e){return this._monthsParseExact?(r(this,"_monthsRegex")||ue.call(this),e?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex}function ue(){function e(e,t){return t.length-e.length}var t,i,o=[],n=[],s=[];for(t=0;12>t;t++)i=h([2e3,t]),o.push(this.monthsShort(i,"")),n.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(o.sort(e),n.sort(e),s.sort(e),t=0;12>t;t++)o[t]=J(o[t]),n[t]=J(n[t]),s[t]=J(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function fe(e){var t,i=e._a;return i&&-2===l(e).overflow&&(t=i[Ho]<0||i[Ho]>11?Ho:i[Wo]<1||i[Wo]>ie(i[Lo],i[Ho])?Wo:i[Yo]<0||i[Yo]>24||24===i[Yo]&&(0!==i[Uo]||0!==i[Vo]||0!==i[qo])?Yo:i[Uo]<0||i[Uo]>59?Uo:i[Vo]<0||i[Vo]>59?Vo:i[qo]<0||i[qo]>999?qo:-1,l(e)._overflowDayOfYear&&(Lo>t||t>Wo)&&(t=Wo),l(e)._overflowWeeks&&-1===t&&(t=Go),l(e)._overflowWeekday&&-1===t&&(t=Xo),l(e).overflow=t),e}function pe(e){var t,i,o,n,s,r,a=e._i,h=en.exec(a)||tn.exec(a);if(h){for(l(e).iso=!0,t=0,i=nn.length;i>t;t++)if(nn[t][1].exec(h[1])){n=nn[t][0],o=nn[t][2]!==!1;break}if(null==n)return void(e._isValid=!1);if(h[3]){for(t=0,i=sn.length;i>t;t++)if(sn[t][1].exec(h[3])){s=(h[2]||" ")+sn[t][0];break}if(null==s)return void(e._isValid=!1)}if(!o&&null!=s)return void(e._isValid=!1);if(h[4]){if(!on.exec(h[4]))return void(e._isValid=!1);r="Z"}e._f=n+(s||"")+(r||""),Ce(e)}else e._isValid=!1}function ve(e){var i=rn.exec(e._i);return null!==i?void(e._d=new Date(+i[1])):(pe(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function ye(e,t,i,o,n,s,r){var a=new Date(e,t,i,o,n,s,r);return 100>e&&e>=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function ge(e){var t=new Date(Date.UTC.apply(null,arguments));return 100>e&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function be(e){return me(e)?366:365}function me(e){return e%4===0&&e%100!==0||e%400===0}function _e(){return me(this.year())}function we(e,t,i){var o=7+t-i,n=(7+ge(e,0,o).getUTCDay()-t)%7;return-n+o-1}function ke(e,t,i,o,n){var s,r,a=(7+i-o)%7,h=we(e,o,n),d=1+7*(t-1)+a+h;return 0>=d?(s=e-1,r=be(s)+d):d>be(e)?(s=e+1,r=d-be(e)):(s=e,r=d),{year:s,dayOfYear:r}}function xe(e,t,i){var o,n,s=we(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return 1>r?(n=e.year()-1,o=r+Oe(n,t,i)):r>Oe(e.year(),t,i)?(o=r-Oe(e.year(),t,i),n=e.year()+1):(n=e.year(),o=r),{week:o,year:n}}function Oe(e,t,i){var o=we(e,t,i),n=we(e+1,t,i);return(be(e)-o+n)/7}function Ee(e,t,i){return null!=e?e:null!=t?t:i}function Me(e){var i=new Date(t.now());return e._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function De(e){var t,i,o,n,s=[];if(!e._d){for(o=Me(e),e._w&&null==e._a[Wo]&&null==e._a[Ho]&&Se(e),e._dayOfYear&&(n=Ee(e._a[Lo],o[Lo]),e._dayOfYear>be(n)&&(l(e)._overflowDayOfYear=!0),i=ge(n,0,e._dayOfYear),e._a[Ho]=i.getUTCMonth(),e._a[Wo]=i.getUTCDate()),t=0;3>t&&null==e._a[t];++t)e._a[t]=s[t]=o[t];for(;7>t;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Yo]&&0===e._a[Uo]&&0===e._a[Vo]&&0===e._a[qo]&&(e._nextDay=!0,e._a[Yo]=0),e._d=(e._useUTC?ge:ye).apply(null,s),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Yo]=24)}}function Se(e){var t,i,o,n,s,r,a,h;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(s=1,r=4,i=Ee(t.GG,e._a[Lo],xe(ze(),1,4).year),o=Ee(t.W,1),n=Ee(t.E,1),(1>n||n>7)&&(h=!0)):(s=e._locale._week.dow,r=e._locale._week.doy,i=Ee(t.gg,e._a[Lo],xe(ze(),s,r).year),o=Ee(t.w,1),null!=t.d?(n=t.d,(0>n||n>6)&&(h=!0)):null!=t.e?(n=t.e+s,(t.e<0||t.e>6)&&(h=!0)):n=s),1>o||o>Oe(i,s,r)?l(e)._overflowWeeks=!0:null!=h?l(e)._overflowWeekday=!0:(a=ke(i,o,n,s,r),e._a[Lo]=a.year,e._dayOfYear=a.dayOfYear)}function Ce(e){if(e._f===t.ISO_8601)return void pe(e);e._a=[],l(e).empty=!0;var i,o,n,s,r,a=""+e._i,h=a.length,d=0;for(n=X(e._f,e._locale).match(go)||[],i=0;i0&&l(e).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),_o[s]?(o?l(e).empty=!1:l(e).unusedTokens.push(s),te(s,o,e)):e._strict&&!o&&l(e).unusedTokens.push(s);l(e).charsLeftOver=h-d,a.length>0&&l(e).unusedInput.push(a),l(e).bigHour===!0&&e._a[Yo]<=12&&e._a[Yo]>0&&(l(e).bigHour=void 0),l(e).parsedDateParts=e._a.slice(0),l(e).meridiem=e._meridiem,e._a[Yo]=Te(e._locale,e._a[Yo],e._meridiem),De(e),fe(e)}function Te(e,t,i){var o;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?(o=e.isPM(i),o&&12>t&&(t+=12),o||12!==t||(t=0),t):t}function Pe(e){var t,i,o,n,s;if(0===e._f.length)return l(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;ns)&&(o=s,i=t));a(e,i||t)}function Be(e){if(!e._d){var t=R(e._i);e._a=s([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),De(e)}}function Fe(e){var t=new v(fe(Ie(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ie(e){var t=e._i,i=e._f;return e._locale=e._locale||I(e._l),null===t||void 0===i&&""===t?u({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),y(t)?new v(fe(t)):(o(i)?Pe(e):i?Ce(e):n(t)?e._d=t:je(e),c(e)||(e._d=null),e))}function je(e){var i=e._i;void 0===i?e._d=new Date(t.now()):n(i)?e._d=new Date(i.valueOf()):"string"==typeof i?ve(e):o(i)?(e._a=s(i.slice(0),function(e){return parseInt(e,10)}),De(e)):"object"==typeof i?Be(e):"number"==typeof i?e._d=new Date(i):t.createFromInputFallback(e)}function Ne(e,t,i,o,n){var s={};return"boolean"==typeof i&&(o=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=n,s._l=i,s._i=e,s._f=t,s._strict=o,Fe(s)}function ze(e,t,i,o){return Ne(e,t,i,o,!1)}function Re(e,t){var i,n;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return ze();for(i=t[0],n=1;ne&&(e=-e,i="-"),i+Y(~~(e/60),2)+t+Y(~~e%60,2)})}function Ue(e,t){var i=(t||"").match(e)||[],o=i[i.length-1]||[],n=(o+"").match(cn)||["-",0,0],s=+(60*n[1])+b(n[2]);return"+"===n[0]?s:-s}function Ve(e,i){var o,s;return i._isUTC?(o=i.clone(),s=(y(e)||n(e)?e.valueOf():ze(e).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+s),t.updateOffset(o,!1),o):ze(e).local()}function qe(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Ge(e,i){var o,n=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=Ue(jo,e):Math.abs(e)<16&&(e=60*e),!this._isUTC&&i&&(o=qe(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),n!==e&&(!i||this._changeInProgress?lt(this,nt(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:qe(this):null!=e?this:NaN}function Xe(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Ke(e){return this.utcOffset(0,e)}function Ze(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(qe(this),"m")),this}function Qe(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ue(Io,this._i)),this}function Je(e){return this.isValid()?(e=e?ze(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function $e(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function et(){if(!f(this._isDSTShifted))return this._isDSTShifted;var e={};if(p(e,this),e=Ie(e),e._a){var t=e._isUTC?h(e._a):ze(e._a);this._isDSTShifted=this.isValid()&&m(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function tt(){return this.isValid()?!this._isUTC:!1}function it(){return this.isValid()?this._isUTC:!1}function ot(){return this.isValid()?this._isUTC&&0===this._offset:!1}function nt(e,t){var i,o,n,s=e,a=null;return We(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(s={},t?s[t]=e:s.milliseconds=e):(a=un.exec(e))?(i="-"===a[1]?-1:1,s={y:0,d:b(a[Wo])*i,h:b(a[Yo])*i,m:b(a[Uo])*i,s:b(a[Vo])*i,ms:b(a[qo])*i}):(a=fn.exec(e))?(i="-"===a[1]?-1:1,s={y:st(a[2],i),M:st(a[3],i),w:st(a[4],i),d:st(a[5],i),h:st(a[6],i),m:st(a[7],i),s:st(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=at(ze(s.from),ze(s.to)),s={}, -s.ms=n.milliseconds,s.M=n.months),o=new He(s),We(e)&&r(e,"_locale")&&(o._locale=e._locale),o}function st(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function rt(e,t){var i={milliseconds:0,months:0};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function at(e,t){var i;return e.isValid()&&t.isValid()?(t=Ve(t,e),e.isBefore(t)?i=rt(e,t):(i=rt(t,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function ht(e){return 0>e?-1*Math.round(-1*e):Math.round(e)}function dt(e,t){return function(i,o){var n,s;return null===o||isNaN(+o)||(k(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=nt(i,o),lt(this,n,e),this}}function lt(e,i,o,n){var s=i._milliseconds,r=ht(i._days),a=ht(i._months);e.isValid()&&(n=null==n?!0:n,s&&e._d.setTime(e._d.valueOf()+s*o),r&&H(e,"Date",L(e,"Date")+r*o),a&&ae(e,L(e,"Month")+a*o),n&&t.updateOffset(e,r||a))}function ct(e,t){var i=e||ze(),o=Ve(i,this).startOf("day"),n=this.diff(o,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse",r=t&&(x(t[s])?t[s]():t[s]);return this.format(r||this.localeData().calendar(s,this,ze(i)))}function ut(){return new v(this)}function ft(e,t){var i=y(e)?e:ze(e);return this.isValid()&&i.isValid()?(t=z(f(t)?"millisecond":t),"millisecond"===t?this.valueOf()>i.valueOf():i.valueOf()t-s?(i=e.clone().add(n-1,"months"),o=(t-s)/(s-i)):(i=e.clone().add(n+1,"months"),o=(t-s)/(i-s)),-(n+o)||0}function wt(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function kt(){var e=this.clone().utc();return 0s&&(t=s),Xt.call(this,e,t,i,o,n))}function Xt(e,t,i,o,n){var s=ke(e,t,i,o,n),r=ge(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Kt(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Zt(e){return xe(e,this._week.dow,this._week.doy).week}function Qt(){return this._week.dow}function Jt(){return this._week.doy}function $t(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function ei(e){var t=xe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function ti(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function ii(e,t){return o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]}function oi(e){return this._weekdaysShort[e.day()]}function ni(e){return this._weekdaysMin[e.day()]}function si(e,t,i){var o,n,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;7>o;++o)s=h([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?(n=po.call(this._weekdaysParse,r),-1!==n?n:null):"ddd"===t?(n=po.call(this._shortWeekdaysParse,r),-1!==n?n:null):(n=po.call(this._minWeekdaysParse,r),-1!==n?n:null):"dddd"===t?(n=po.call(this._weekdaysParse,r),-1!==n?n:(n=po.call(this._shortWeekdaysParse,r),-1!==n?n:(n=po.call(this._minWeekdaysParse,r),-1!==n?n:null))):"ddd"===t?(n=po.call(this._shortWeekdaysParse,r),-1!==n?n:(n=po.call(this._weekdaysParse,r),-1!==n?n:(n=po.call(this._minWeekdaysParse,r),-1!==n?n:null))):(n=po.call(this._minWeekdaysParse,r),-1!==n?n:(n=po.call(this._weekdaysParse,r),-1!==n?n:(n=po.call(this._shortWeekdaysParse,r),-1!==n?n:null)))}function ri(e,t,i){var o,n,s;if(this._weekdaysParseExact)return si.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;7>o;o++){if(n=h([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[o].test(e))return o;if(i&&"ddd"===t&&this._shortWeekdaysParse[o].test(e))return o;if(i&&"dd"===t&&this._minWeekdaysParse[o].test(e))return o;if(!i&&this._weekdaysParse[o].test(e))return o}}function ai(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=ti(e,this.localeData()),this.add(e-t,"d")):t}function hi(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function di(e){return this.isValid()?null==e?this.day()||7:this.day(this.day()%7?e:e-7):null!=e?this:NaN}function li(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||fi.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex}function ci(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||fi.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function ui(e){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||fi.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function fi(){function e(e,t){return t.length-e.length}var t,i,o,n,s,r=[],a=[],d=[],l=[];for(t=0;7>t;t++)i=h([2e3,1]).day(t),o=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(o),a.push(n),d.push(s),l.push(o),l.push(n),l.push(s);for(r.sort(e),a.sort(e),d.sort(e),l.sort(e),t=0;7>t;t++)a[t]=J(a[t]),d[t]=J(d[t]),l[t]=J(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function pi(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function vi(){return this.hours()%12||12}function yi(){return this.hours()||24}function gi(e,t){U(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function bi(e,t){return t._meridiemParse}function mi(e){return"p"===(e+"").toLowerCase().charAt(0)}function _i(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}function wi(e,t){t[qo]=b(1e3*("0."+e))}function ki(){return this._isUTC?"UTC":""}function xi(){return this._isUTC?"Coordinated Universal Time":""}function Oi(e){return ze(1e3*e)}function Ei(){return ze.apply(null,arguments).parseZone()}function Mi(e,t,i){var o=this._calendar[e];return x(o)?o.call(t,i):o}function Di(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])}function Si(){return this._invalidDate}function Ci(e){return this._ordinal.replace("%d",e)}function Ti(e){return e}function Pi(e,t,i,o){var n=this._relativeTime[i];return x(n)?n(e,t,i,o):n.replace(/%d/i,e)}function Bi(e,t){var i=this._relativeTime[e>0?"future":"past"];return x(i)?i(t):i.replace(/%s/i,t)}function Fi(e,t,i,o){var n=I(),s=h().set(o,t);return n[i](s,e)}function Ii(e,t,i){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return Fi(e,t,i,"month");var o,n=[];for(o=0;12>o;o++)n[o]=Fi(e,o,i,"month");return n}function ji(e,t,i,o){"boolean"==typeof e?("number"==typeof t&&(i=t,t=void 0),t=t||""):(t=e,i=t,e=!1,"number"==typeof t&&(i=t,t=void 0),t=t||"");var n=I(),s=e?n._week.dow:0;if(null!=i)return Fi(t,(i+s)%7,o,"day");var r,a=[];for(r=0;7>r;r++)a[r]=Fi(t,(r+s)%7,o,"day");return a}function Ni(e,t){return Ii(e,t,"months")}function zi(e,t){return Ii(e,t,"monthsShort")}function Ri(e,t,i){return ji(e,t,i,"weekdays")}function Ai(e,t,i){return ji(e,t,i,"weekdaysShort")}function Li(e,t,i){return ji(e,t,i,"weekdaysMin")}function Hi(){var e=this._data;return this._milliseconds=Ln(this._milliseconds),this._days=Ln(this._days),this._months=Ln(this._months),e.milliseconds=Ln(e.milliseconds),e.seconds=Ln(e.seconds),e.minutes=Ln(e.minutes),e.hours=Ln(e.hours),e.months=Ln(e.months),e.years=Ln(e.years),this}function Wi(e,t,i,o){var n=nt(t,i);return e._milliseconds+=o*n._milliseconds,e._days+=o*n._days,e._months+=o*n._months,e._bubble()}function Yi(e,t){return Wi(this,e,t,1)}function Ui(e,t){return Wi(this,e,t,-1)}function Vi(e){return 0>e?Math.floor(e):Math.ceil(e)}function qi(){var e,t,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||0>=s&&0>=r&&0>=a||(s+=864e5*Vi(Xi(a)+r),r=0,a=0),h.milliseconds=s%1e3,e=g(s/1e3),h.seconds=e%60,t=g(e/60),h.minutes=t%60,i=g(t/60),h.hours=i%24,r+=g(i/24),n=g(Gi(r)),a+=n,r-=Vi(Xi(n)),o=g(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function Gi(e){return 4800*e/146097}function Xi(e){return 146097*e/4800}function Ki(e){var t,i,o=this._milliseconds;if(e=z(e),"month"===e||"year"===e)return t=this._days+o/864e5,i=this._months+Gi(t),"month"===e?i:i/12;switch(t=this._days+Math.round(Xi(this._months)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return 24*t+o/36e5;case"minute":return 1440*t+o/6e4;case"second":return 86400*t+o/1e3;case"millisecond":return Math.floor(864e5*t)+o;default:throw new Error("Unknown unit "+e)}}function Zi(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*b(this._months/12)}function Qi(e){return function(){return this.as(e)}}function Ji(e){return e=z(e),this[e+"s"]()}function $i(e){return function(){return this._data[e]}}function eo(){return g(this.days()/7)}function to(e,t,i,o,n){return n.relativeTime(t||1,!!i,e,o)}function io(e,t,i){var o=nt(e).abs(),n=is(o.as("s")),s=is(o.as("m")),r=is(o.as("h")),a=is(o.as("d")),h=is(o.as("M")),d=is(o.as("y")),l=n=s&&["m"]||s=r&&["h"]||r=a&&["d"]||a=h&&["M"]||h=d&&["y"]||["yy",d];return l[2]=t,l[3]=+e>0,l[4]=i,to.apply(null,l)}function oo(e,t){return void 0===os[e]?!1:void 0===t?os[e]:(os[e]=t,!0)}function no(e){var t=this.localeData(),i=io(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)}function so(){var e,t,i,o=ns(this._milliseconds)/1e3,n=ns(this._days),s=ns(this._months);e=g(o/60),t=g(e/60),o%=60,e%=60,i=g(s/12),s%=12;var r=i,a=s,h=n,d=t,l=e,c=o,u=this.asSeconds();return u?(0>u?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||c?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var ro,ao;ao=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),i=t.length>>>0,o=0;i>o;o++)if(o in t&&e.call(this,t[o],o,t))return!0;return!1};var ho=t.momentProperties=[],lo=!1,co={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var uo;uo=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)r(e,t)&&i.push(t);return i};var fo,po,vo={},yo={},go=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,bo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,mo={},_o={},wo=/\d/,ko=/\d\d/,xo=/\d{3}/,Oo=/\d{4}/,Eo=/[+-]?\d{6}/,Mo=/\d\d?/,Do=/\d\d\d\d?/,So=/\d\d\d\d\d\d?/,Co=/\d{1,3}/,To=/\d{1,4}/,Po=/[+-]?\d{1,6}/,Bo=/\d+/,Fo=/[+-]?\d+/,Io=/Z|[+-]\d\d:?\d\d/gi,jo=/Z|[+-]\d\d(?::?\d\d)?/gi,No=/[+-]?\d+(\.\d{1,3})?/,zo=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ro={},Ao={},Lo=0,Ho=1,Wo=2,Yo=3,Uo=4,Vo=5,qo=6,Go=7,Xo=8;po=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=e?""+e:"+"+e}),U(0,["YY",2],0,function(){return this.year()%100}),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),N("year","y"),K("Y",Fo),K("YY",Mo,ko),K("YYYY",To,Oo),K("YYYYY",Po,Eo),K("YYYYYY",Po,Eo),$(["YYYYY","YYYYYY"],Lo),$("YYYY",function(e,i){i[Lo]=2===e.length?t.parseTwoDigitYear(e):b(e)}),$("YY",function(e,i){i[Lo]=t.parseTwoDigitYear(e)}),$("Y",function(e,t){t[Lo]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return b(e)+(b(e)>68?1900:2e3)};var an=A("FullYear",!0);t.ISO_8601=function(){};var hn=w("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var e=ze.apply(null,arguments);return this.isValid()&&e.isValid()?this>e?this:e:u()}),dn=w("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var e=ze.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:u()}),ln=function(){return Date.now?Date.now():+new Date};Ye("Z",":"),Ye("ZZ",""),K("Z",jo),K("ZZ",jo),$(["Z","ZZ"],function(e,t,i){i._useUTC=!0,i._tzm=Ue(jo,e)});var cn=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var un=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,fn=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;nt.fn=He.prototype;var pn=dt(1,"add"),vn=dt(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var yn=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Wt("gggg","weekYear"),Wt("ggggg","weekYear"),Wt("GGGG","isoWeekYear"),Wt("GGGGG","isoWeekYear"),N("weekYear","gg"),N("isoWeekYear","GG"),K("G",Fo),K("g",Fo),K("GG",Mo,ko),K("gg",Mo,ko),K("GGGG",To,Oo),K("gggg",To,Oo),K("GGGGG",Po,Eo),K("ggggg",Po,Eo),ee(["gggg","ggggg","GGGG","GGGGG"],function(e,t,i,o){t[o.substr(0,2)]=b(e)}),ee(["gg","GG"],function(e,i,o,n){i[n]=t.parseTwoDigitYear(e)}),U("Q",0,"Qo","quarter"),N("quarter","Q"),K("Q",wo),$("Q",function(e,t){t[Ho]=3*(b(e)-1)}),U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),N("week","w"),N("isoWeek","W"),K("w",Mo),K("ww",Mo,ko),K("W",Mo),K("WW",Mo,ko),ee(["w","ww","W","WW"],function(e,t,i,o){t[o.substr(0,1)]=b(e)});var gn={dow:0,doy:6};U("D",["DD",2],"Do","date"),N("date","D"),K("D",Mo),K("DD",Mo,ko),K("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),$(["D","DD"],Wo),$("Do",function(e,t){t[Wo]=b(e.match(Mo)[0],10)});var bn=A("Date",!0);U("d",0,"do","day"),U("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),U("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),U("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),N("day","d"),N("weekday","e"),N("isoWeekday","E"),K("d",Mo),K("e",Mo),K("E",Mo),K("dd",function(e,t){return t.weekdaysMinRegex(e)}),K("ddd",function(e,t){return t.weekdaysShortRegex(e)}),K("dddd",function(e,t){return t.weekdaysRegex(e)}),ee(["dd","ddd","dddd"],function(e,t,i,o){var n=i._locale.weekdaysParse(e,o,i._strict);null!=n?t.d=n:l(i).invalidWeekday=e}),ee(["d","e","E"],function(e,t,i,o){t[o]=b(e)});var mn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),_n="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),wn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),kn=zo,xn=zo,On=zo;U("DDD",["DDDD",3],"DDDo","dayOfYear"),N("dayOfYear","DDD"),K("DDD",Co),K("DDDD",xo),$(["DDD","DDDD"],function(e,t,i){i._dayOfYear=b(e)}),U("H",["HH",2],0,"hour"),U("h",["hh",2],0,vi),U("k",["kk",2],0,yi),U("hmm",0,0,function(){return""+vi.apply(this)+Y(this.minutes(),2)}),U("hmmss",0,0,function(){return""+vi.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+Y(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)}),gi("a",!0),gi("A",!1),N("hour","h"),K("a",bi),K("A",bi),K("H",Mo),K("h",Mo),K("HH",Mo,ko),K("hh",Mo,ko),K("hmm",Do),K("hmmss",So),K("Hmm",Do),K("Hmmss",So),$(["H","HH"],Yo),$(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),$(["h","hh"],function(e,t,i){t[Yo]=b(e),l(i).bigHour=!0}),$("hmm",function(e,t,i){var o=e.length-2;t[Yo]=b(e.substr(0,o)),t[Uo]=b(e.substr(o)),l(i).bigHour=!0}),$("hmmss",function(e,t,i){var o=e.length-4,n=e.length-2;t[Yo]=b(e.substr(0,o)),t[Uo]=b(e.substr(o,2)),t[Vo]=b(e.substr(n)),l(i).bigHour=!0}),$("Hmm",function(e,t,i){var o=e.length-2;t[Yo]=b(e.substr(0,o)),t[Uo]=b(e.substr(o))}),$("Hmmss",function(e,t,i){var o=e.length-4,n=e.length-2;t[Yo]=b(e.substr(0,o)),t[Uo]=b(e.substr(o,2)),t[Vo]=b(e.substr(n))});var En=/[ap]\.?m?\.?/i,Mn=A("Hours",!0);U("m",["mm",2],0,"minute"),N("minute","m"),K("m",Mo),K("mm",Mo,ko),$(["m","mm"],Uo);var Dn=A("Minutes",!1);U("s",["ss",2],0,"second"),N("second","s"),K("s",Mo),K("ss",Mo,ko),$(["s","ss"],Vo);var Sn=A("Seconds",!1);U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),N("millisecond","ms"),K("S",Co,wo),K("SS",Co,ko),K("SSS",Co,xo);var Cn;for(Cn="SSSS";Cn.length<=9;Cn+="S")K(Cn,Bo);for(Cn="S";Cn.length<=9;Cn+="S")$(Cn,wi);var Tn=A("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var Pn=v.prototype;Pn.add=pn,Pn.calendar=ct,Pn.clone=ut,Pn.diff=mt,Pn.endOf=Pt,Pn.format=xt,Pn.from=Ot,Pn.fromNow=Et,Pn.to=Mt,Pn.toNow=Dt,Pn.get=W,Pn.invalidAt=Lt,Pn.isAfter=ft,Pn.isBefore=pt,Pn.isBetween=vt,Pn.isSame=yt,Pn.isSameOrAfter=gt,Pn.isSameOrBefore=bt,Pn.isValid=Rt,Pn.lang=yn,Pn.locale=St,Pn.localeData=Ct,Pn.max=dn,Pn.min=hn,Pn.parsingFlags=At,Pn.set=W,Pn.startOf=Tt,Pn.subtract=vn,Pn.toArray=jt,Pn.toObject=Nt,Pn.toDate=It,Pn.toISOString=kt,Pn.toJSON=zt,Pn.toString=wt,Pn.unix=Ft,Pn.valueOf=Bt,Pn.creationData=Ht,Pn.year=an,Pn.isLeapYear=_e,Pn.weekYear=Yt,Pn.isoWeekYear=Ut,Pn.quarter=Pn.quarters=Kt,Pn.month=he,Pn.daysInMonth=de,Pn.week=Pn.weeks=$t,Pn.isoWeek=Pn.isoWeeks=ei,Pn.weeksInYear=qt,Pn.isoWeeksInYear=Vt,Pn.date=bn,Pn.day=Pn.days=ai,Pn.weekday=hi,Pn.isoWeekday=di,Pn.dayOfYear=pi,Pn.hour=Pn.hours=Mn,Pn.minute=Pn.minutes=Dn,Pn.second=Pn.seconds=Sn,Pn.millisecond=Pn.milliseconds=Tn,Pn.utcOffset=Ge,Pn.utc=Ke,Pn.local=Ze,Pn.parseZone=Qe,Pn.hasAlignedHourOffset=Je,Pn.isDST=$e,Pn.isDSTShifted=et,Pn.isLocal=tt,Pn.isUtcOffset=it,Pn.isUtc=ot,Pn.isUTC=ot,Pn.zoneAbbr=ki,Pn.zoneName=xi,Pn.dates=w("dates accessor is deprecated. Use date instead.",bn),Pn.months=w("months accessor is deprecated. Use month instead",he),Pn.years=w("years accessor is deprecated. Use year instead",an),Pn.zone=w("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Xe);var Bn=Pn,Fn={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},In={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},jn="Invalid date",Nn="%d",zn=/\d{1,2}/,Rn={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},An=D.prototype;An._calendar=Fn,An.calendar=Mi,An._longDateFormat=In,An.longDateFormat=Di,An._invalidDate=jn,An.invalidDate=Si,An._ordinal=Nn,An.ordinal=Ci,An._ordinalParse=zn,An.preparse=Ti,An.postformat=Ti,An._relativeTime=Rn,An.relativeTime=Pi,An.pastFuture=Bi,An.set=E,An.months=oe,An._months=Zo,An.monthsShort=ne,An._monthsShort=Qo,An.monthsParse=re,An._monthsRegex=$o,An.monthsRegex=ce,An._monthsShortRegex=Jo,An.monthsShortRegex=le,An.week=Zt,An._week=gn,An.firstDayOfYear=Jt,An.firstDayOfWeek=Qt,An.weekdays=ii,An._weekdays=mn,An.weekdaysMin=ni,An._weekdaysMin=wn,An.weekdaysShort=oi,An._weekdaysShort=_n,An.weekdaysParse=ri,An._weekdaysRegex=kn,An.weekdaysRegex=li,An._weekdaysShortRegex=xn,An.weekdaysShortRegex=ci,An._weekdaysMinRegex=On,An.weekdaysMinRegex=ui,An.isPM=mi,An._meridiemParse=En,An.meridiem=_i,P("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=1===b(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}}),t.lang=w("moment.lang is deprecated. Use moment.locale instead.",P),t.langData=w("moment.langData is deprecated. Use moment.localeData instead.",I);var Ln=Math.abs,Hn=Qi("ms"),Wn=Qi("s"),Yn=Qi("m"),Un=Qi("h"),Vn=Qi("d"),qn=Qi("w"),Gn=Qi("M"),Xn=Qi("y"),Kn=$i("milliseconds"),Zn=$i("seconds"),Qn=$i("minutes"),Jn=$i("hours"),$n=$i("days"),es=$i("months"),ts=$i("years"),is=Math.round,os={s:45,m:45,h:22,d:26,M:11},ns=Math.abs,ss=He.prototype;ss.abs=Hi,ss.add=Yi,ss.subtract=Ui,ss.as=Ki,ss.asMilliseconds=Hn,ss.asSeconds=Wn,ss.asMinutes=Yn,ss.asHours=Un,ss.asDays=Vn,ss.asWeeks=qn,ss.asMonths=Gn,ss.asYears=Xn,ss.valueOf=Zi,ss._bubble=qi,ss.get=Ji,ss.milliseconds=Kn,ss.seconds=Zn,ss.minutes=Qn,ss.hours=Jn,ss.days=$n,ss.weeks=eo,ss.months=es,ss.years=ts,ss.humanize=no,ss.toISOString=so,ss.toString=so,ss.toJSON=so,ss.locale=St,ss.localeData=Ct,ss.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",so),ss.lang=yn,U("X",0,0,"unix"),U("x",0,0,"valueOf"),K("x",Fo),K("X",No),$("X",function(e,t,i){i._d=new Date(1e3*parseFloat(e,10))}),$("x",function(e,t,i){i._d=new Date(b(e))}),t.version="2.13.0",i(ze),t.fn=Bn,t.min=Ae,t.max=Le,t.now=ln,t.utc=h,t.unix=Oi,t.months=Ni,t.isDate=n,t.locale=P,t.invalid=u,t.duration=nt,t.isMoment=y,t.weekdays=Ri,t.parseZone=Ei,t.localeData=I,t.isDuration=We,t.monthsShort=zi,t.weekdaysMin=Li,t.defineLocale=B,t.updateLocale=F,t.locales=j,t.weekdaysShort=Ai,t.normalizeUnits=z,t.relativeTimeThreshold=oo,t.prototype=Bn;var rs=t;return rs})}).call(t,i(4)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){function i(e){throw new Error("Cannot find module '"+e+"'.")}i.keys=function(){return[]},i.resolve=i,e.exports=i,i.id=5},function(e,t){(function(t){function i(e,t,i){var o=t&&i||0,n=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>n&&(t[o+n++]=c[e])});16>n;)t[o+n++]=0;return t}function o(e,t){var i=t||0,o=l;return o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]}function n(e,t,i){var n=t&&i||0,s=t||[];e=e||{};var r=void 0!==e.clockseq?e.clockseq:v,a=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:g+1,d=a-y+(h-g)/1e4;if(0>d&&void 0===e.clockseq&&(r=r+1&16383),(0>d||a>y)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y=a,g=h,v=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var c=a/4294967296*1e4&268435455;s[n++]=c>>>8&255,s[n++]=255&c,s[n++]=c>>>24&15|16,s[n++]=c>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var u=e.node||p,f=0;6>f;f++)s[n+f]=u[f];return t?t:o(s)}function s(e,t,i){var n=t&&i||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;16>a;a++)t[n+a]=s[a];return t||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof t?t:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var e,t=0;16>t;t++)0===(3&t)&&(e=4294967296*Math.random()),d[t]=e>>>((3&t)<<3)&255;return d}}for(var l=[],c={},u=0;256>u;u++)l[u]=(u+256).toString(16).substr(1),c[l[u]]=u;var f=r(),p=[1|f[0],f[1],f[2],f[3],f[4],f[5]],v=16383&(f[6]<<8|f[7]),y=0,g=0,b=s;b.v1=n,b.v4=s,b.parse=i,b.unparse=o,e.exports=b}).call(t,function(){return this}())},function(e,t){t.prepareElements=function(e){for(var t in e)e.hasOwnProperty(t)&&(e[t].redundant=e[t].used,e[t].used=[])},t.cleanupElements=function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t].redundant){for(var i=0;i0?(o=t[e].redundant[0],t[e].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",e),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",e),t[e]={used:[],redundant:[]},i.appendChild(o)),t[e].used.push(o),o},t.getDOMElement=function(e,t,i,o){var n;return t.hasOwnProperty(e)?t[e].redundant.length>0?(n=t[e].redundant[0],t[e].redundant.shift()):(n=document.createElement(e),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(e),t[e]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),t[e].used.push(n),n},t.drawPoint=function(e,i,o,n,s,r){var a;if("circle"==o.style?(a=t.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",e),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=t.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",e-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles), -a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=t.getSVGElement("text",n,s);r.xOffset&&(e+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",e),h.setAttributeNS(null,"y",i)}return a},t.drawBar=function(e,i,o,n,s,r,a,h){if(0!=n){0>n&&(n*=-1,i-=n);var d=t.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",e-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(e,t,i){function o(e,t){if(e&&!Array.isArray(e)&&(t=e,e=null),this._options=t||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;n>o;o++){var s=i[o],r=this._options.type[s];"Date"==r||"ISODate"==r||"ASPDate"==r?this._type[s]="Date":this._type[s]=r}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},e&&this.add(e),this.setOptions(t)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=i(1),r=i(9);o.prototype.setOptions=function(e){e&&void 0!==e.queue&&(e.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=r.extend(this,{replace:["add","update","remove"]})),"object"===n(e.queue)&&this._queue.setOptions(e.queue)))},o.prototype.on=function(e,t){var i=this._subscribers[e];i||(i=[],this._subscribers[e]=i),i.push({callback:t})},o.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},o.prototype.off=function(e,t){var i=this._subscribers[e];i&&(this._subscribers[e]=i.filter(function(e){return e.callback!=t}))},o.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},o.prototype._trigger=function(e,t,i){if("*"==e)throw new Error("Cannot trigger event *");var o=[];e in this._subscribers&&(o=o.concat(this._subscribers[e])),"*"in this._subscribers&&(o=o.concat(this._subscribers["*"]));for(var n=0,s=o.length;s>n;n++){var r=o[n];r.callback&&r.callback(e,t,i||null)}},o.prototype.add=function(e,t){var i,o=[],n=this;if(Array.isArray(e))for(var s=0,r=e.length;r>s;s++)i=n._addItem(e[s]),o.push(i);else{if(!(e instanceof Object))throw new Error("Unknown dataType");i=n._addItem(e),o.push(i)}return o.length&&this._trigger("add",{items:o},t),o},o.prototype.update=function(e,t){var i=[],o=[],n=[],r=[],a=this,h=a._fieldId,d=function(e){var t=e[h];if(a._data[t]){var d=s.extend({},a._data[t]);t=a._updateItem(e),o.push(t),r.push(e),n.push(d)}else t=a._addItem(e),i.push(t)};if(Array.isArray(e))for(var l=0,c=e.length;c>l;l++)e[l]instanceof Object?d(e[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!(e instanceof Object))throw new Error("Unknown dataType");d(e)}if(i.length&&this._trigger("add",{items:i},t),o.length){var u={items:o,oldData:n,data:r};this._trigger("update",u,t)}return i.concat(o)},o.prototype.get=function(e){var t,i,o,n=this,r=s.getType(arguments[0]);"String"==r||"Number"==r?(t=arguments[0],o=arguments[1]):"Array"==r?(i=arguments[0],o=arguments[1]):o=arguments[0];var a;if(o&&o.returnType){var h=["Array","Object"];a=-1==h.indexOf(o.returnType)?"Array":o.returnType}else a="Array";var d,l,c,u,f,p=o&&o.type||this._options.type,v=o&&o.filter,y=[];if(void 0!=t)d=n._getItem(t,p),d&&v&&!v(d)&&(d=null);else if(void 0!=i)for(u=0,f=i.length;f>u;u++)d=n._getItem(i[u],p),v&&!v(d)||y.push(d);else for(l=Object.keys(this._data),u=0,f=l.length;f>u;u++)c=l[u],d=n._getItem(c,p),v&&!v(d)||y.push(d);if(o&&o.order&&void 0==t&&this._sort(y,o.order),o&&o.fields){var g=o.fields;if(void 0!=t)d=this._filterFields(d,g);else for(u=0,f=y.length;f>u;u++)y[u]=this._filterFields(y[u],g)}if("Object"==a){var b,m={};for(u=0,f=y.length;f>u;u++)b=y[u],m[b.id]=b;return m}return void 0!=t?d:y},o.prototype.getIds=function(e){var t,i,o,n,s,r=this._data,a=e&&e.filter,h=e&&e.order,d=e&&e.type||this._options.type,l=Object.keys(r),c=[];if(a)if(h){for(s=[],t=0,i=l.length;i>t;t++)o=l[t],n=this._getItem(o,d),a(n)&&s.push(n);for(this._sort(s,h),t=0,i=s.length;i>t;t++)c.push(s[t][this._fieldId])}else for(t=0,i=l.length;i>t;t++)o=l[t],n=this._getItem(o,d),a(n)&&c.push(n[this._fieldId]);else if(h){for(s=[],t=0,i=l.length;i>t;t++)o=l[t],s.push(r[o]);for(this._sort(s,h),t=0,i=s.length;i>t;t++)c.push(s[t][this._fieldId])}else for(t=0,i=l.length;i>t;t++)o=l[t],n=r[o],c.push(n[this._fieldId]);return c},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(e,t){var i,o,n,s,r=t&&t.filter,a=t&&t.type||this._options.type,h=this._data,d=Object.keys(h);if(t&&t.order){var l=this.get(t);for(i=0,o=l.length;o>i;i++)n=l[i],s=n[this._fieldId],e(n,s)}else for(i=0,o=d.length;o>i;i++)s=d[i],n=this._getItem(s,a),r&&!r(n)||e(n,s)},o.prototype.map=function(e,t){var i,o,n,s,r=t&&t.filter,a=t&&t.type||this._options.type,h=[],d=this._data,l=Object.keys(d);for(i=0,o=l.length;o>i;i++)n=l[i],s=this._getItem(n,a),r&&!r(s)||h.push(e(s,n));return t&&t.order&&this._sort(h,t.order),h},o.prototype._filterFields=function(e,t){if(!e)return e;var i,o,n={},s=Object.keys(e),r=s.length;if(Array.isArray(t))for(i=0;r>i;i++)o=s[i],-1!=t.indexOf(o)&&(n[o]=e[o]);else for(i=0;r>i;i++)o=s[i],t.hasOwnProperty(o)&&(n[t[o]]=e[o]);return n},o.prototype._sort=function(e,t){if(s.isString(t)){var i=t;e.sort(function(e,t){var o=e[i],n=t[i];return o>n?1:n>o?-1:0})}else{if("function"!=typeof t)throw new TypeError("Order must be a function or a string");e.sort(t)}},o.prototype.remove=function(e,t){var i,o,n,s=[];if(Array.isArray(e))for(i=0,o=e.length;o>i;i++)n=this._remove(e[i]),null!=n&&s.push(n);else n=this._remove(e),null!=n&&s.push(n);return s.length&&this._trigger("remove",{items:s},t),s},o.prototype._remove=function(e){if(s.isNumber(e)||s.isString(e)){if(this._data[e])return delete this._data[e],this.length--,e}else if(e instanceof Object){var t=e[this._fieldId];if(void 0!==t&&this._data[t])return delete this._data[t],this.length--,t}return null},o.prototype.clear=function(e){var t=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:t},e),t},o.prototype.max=function(e){var t,i,o=this._data,n=Object.keys(o),s=null,r=null;for(t=0,i=n.length;i>t;t++){var a=n[t],h=o[a],d=h[e];null!=d&&(!s||d>r)&&(s=h,r=d)}return s},o.prototype.min=function(e){var t,i,o=this._data,n=Object.keys(o),s=null,r=null;for(t=0,i=n.length;i>t;t++){var a=n[t],h=o[a],d=h[e];null!=d&&(!s||r>d)&&(s=h,r=d)}return s},o.prototype.distinct=function(e){var t,i,o,n=this._data,r=Object.keys(n),a=[],h=this._options.type&&this._options.type[e]||null,d=0;for(t=0,o=r.length;o>t;t++){var l=r[t],c=n[l],u=c[e],f=!1;for(i=0;d>i;i++)if(a[i]==u){f=!0;break}f||void 0===u||(a[d]=u,d++)}if(h)for(t=0,o=a.length;o>t;t++)a[t]=s.convert(a[t],h);return a},o.prototype._addItem=function(e){var t=e[this._fieldId];if(void 0!=t){if(this._data[t])throw new Error("Cannot add item: item with id "+t+" already exists")}else t=s.randomUUID(),e[this._fieldId]=t;var i,o,n={},r=Object.keys(e);for(i=0,o=r.length;o>i;i++){var a=r[i],h=this._type[a];n[a]=s.convert(e[a],h)}return this._data[t]=n,this.length++,t},o.prototype._getItem=function(e,t){var i,o,n,r,a=this._data[e];if(!a)return null;var h={},d=Object.keys(a);if(t)for(n=0,r=d.length;r>n;n++)i=d[n],o=a[i],h[i]=s.convert(o,t[i]);else for(n=0,r=d.length;r>n;n++)i=d[n],o=a[i],h[i]=o;return h},o.prototype._updateItem=function(e){var t=e[this._fieldId];if(void 0==t)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(e)+")");var i=this._data[t];if(!i)throw new Error("Cannot update item: no item with id "+t+" found");for(var o=Object.keys(e),n=0,r=o.length;r>n;n++){var a=o[n],h=this._type[a];i[a]=s.convert(e[a],h)}return t},e.exports=o},function(e,t){function i(e){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(e)}i.prototype.setOptions=function(e){e&&"undefined"!=typeof e.delay&&(this.delay=e.delay),e&&"undefined"!=typeof e.max&&(this.max=e.max),this._flushIfNeeded()},i.extend=function(e,t){var o=new i(t);if(void 0!==e.flush)throw new Error("Target object already has a property flush");e.flush=function(){o.flush()};var n=[{name:"flush",original:void 0}];if(t&&t.replace)for(var s=0;sthis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var e=this;this._timeout=setTimeout(function(){e.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var e=this._queue.shift();e.fn.apply(e.context||e.fn,e.args||[])}},e.exports=i},function(e,t,i){function o(e,t){this._data=null,this._ids={},this.length=0,this._options=t||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(e)}var n=i(1),s=i(8);o.prototype.setData=function(e){var t,i,o,n;if(this._data&&(this._data.off&&this._data.off("*",this.listener),t=Object.keys(this._ids),this._ids={},this.length=0,this._trigger("remove",{items:t})),this._data=e,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",t=this._data.getIds({filter:this._options&&this._options.filter}),o=0,n=t.length;n>o;o++)i=t[o],this._ids[i]=!0;this.length=t.length,this._trigger("add",{items:t}),this._data.on&&this._data.on("*",this.listener)}},o.prototype.refresh=function(){var e,t,i,o=this._data.getIds({filter:this._options&&this._options.filter}),n=Object.keys(this._ids),s={},r=[],a=[];for(t=0,i=o.length;i>t;t++)e=o[t],s[e]=!0,this._ids[e]||(r.push(e),this._ids[e]=!0);for(t=0,i=n.length;i>t;t++)e=n[t],s[e]||(a.push(e),delete this._ids[e]);this.length+=r.length-a.length,r.length&&this._trigger("add",{items:r}),a.length&&this._trigger("remove",{items:a})},o.prototype.get=function(e){var t,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r||"Array"==r?(t=arguments[0],i=arguments[1],o=arguments[2]):(i=arguments[0],o=arguments[1]);var a=n.extend({},this._options,i);this._options.filter&&i&&i.filter&&(a.filter=function(e){return s._options.filter(e)&&i.filter(e)});var h=[];return void 0!=t&&h.push(t),h.push(a),h.push(o),this._data&&this._data.get.apply(this._data,h)},o.prototype.getIds=function(e){var t;if(this._data){var i,o=this._options.filter;i=e&&e.filter?o?function(t){return o(t)&&e.filter(t)}:e.filter:o,t=this._data.getIds({filter:i,order:e&&e.order})}else t=[];return t},o.prototype.map=function(e,t){var i=[];if(this._data){var o,n=this._options.filter;o=t&&t.filter?n?function(e){return n(e)&&t.filter(e)}:t.filter:n,i=this._data.map(e,{filter:o,order:t&&t.order})}else i=[];return i},o.prototype.getDataSet=function(){for(var e=this;e instanceof o;)e=e._data;return e||null},o.prototype._onEvent=function(e,t,i){var o,n,s,r,a=t&&t.items,h=this._data,d=[],l=[],c=[],u=[];if(a&&h){switch(e){case"add":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r&&(this._ids[s]=!0,l.push(s));break;case"update":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r?this._ids[s]?(c.push(s),d.push(t.data[o])):(this._ids[s]=!0,l.push(s)):this._ids[s]&&(delete this._ids[s],u.push(s));break;case"remove":for(o=0,n=a.length;n>o;o++)s=a[o],this._ids[s]&&(delete this._ids[s],u.push(s))}this.length+=l.length-u.length,l.length&&this._trigger("add",{items:l},i),c.length&&this._trigger("update",{items:c,data:d},i),u.length&&this._trigger("remove",{items:u},i)}},o.prototype.on=s.prototype.on,o.prototype.off=s.prototype.off,o.prototype._trigger=s.prototype._trigger,o.prototype.subscribe=o.prototype.on,o.prototype.unsubscribe=o.prototype.off,e.exports=o},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t,i){var o=this;if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:Y,clickToUse:!1},A.extend(this.options,this.defaultOptions),this.body={container:e,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this),once:this.once.bind(this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}}},this.bindEventListeners(),this.images=new r["default"](function(){return o.body.emitter.emit("_requestRedraw")}),this.groups=new h["default"],this.canvas=new _["default"](this.body),this.selectionHandler=new M["default"](this.body,this.canvas),this.interactionHandler=new O["default"](this.body,this.canvas,this.selectionHandler),this.view=new k["default"](this.body,this.canvas),this.renderer=new b["default"](this.body,this.canvas),this.physics=new p["default"](this.body),this.layoutEngine=new S["default"](this.body),this.clustering=new y["default"](this.body),this.manipulation=new T["default"](this.body,this.canvas,this.selectionHandler),this.nodesHandler=new l["default"](this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new u["default"](this.body,this.images,this.groups),this.body.modules.kamadaKawai=new z["default"](this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(i),this.setData(t)}var s=i(12),r=o(s),a=i(13),h=o(a),d=i(14),l=o(d),c=i(35),u=o(c),f=i(44),p=o(f),v=i(53),y=o(v),g=i(56),b=o(g),m=i(57),_=o(m),w=i(62),k=o(w),x=i(63),O=o(x),E=i(67),M=o(E),D=i(68),S=o(D),C=i(69),T=o(C),P=i(70),B=o(P),F=i(34),I=o(F),j=i(72),N=i(73),z=o(N);i(75);var R=i(76),A=i(1),L=(i(8),i(10),i(77)),H=i(78),W=i(79),Y=i(80);R(n.prototype),n.prototype.setOptions=function(e){var t=this;if(void 0!==e){var i=I["default"].validate(e,j.allOptions);i===!0&&console.log("%cErrors have been found in the supplied options object.",F.printStyle);var o=["locale","locales","clickToUse"];if(A.selectiveDeepExtend(o,this.options,e),e=this.layoutEngine.setOptions(e.layout,e),this.canvas.setOptions(e),this.groups.setOptions(e.groups),this.nodesHandler.setOptions(e.nodes),this.edgesHandler.setOptions(e.edges),this.physics.setOptions(e.physics),this.manipulation.setOptions(e.manipulation,e,this.options),this.interactionHandler.setOptions(e.interaction),this.renderer.setOptions(e.interaction),this.selectionHandler.setOptions(e.interaction),void 0!==e.groups&&this.body.emitter.emit("refreshNodes"),"configure"in e&&(this.configurator||(this.configurator=new B["default"](this,this.body.container,j.configureOptions,this.canvas.pixelRatio)),this.configurator.setOptions(e.configure)),this.configurator&&this.configurator.options.enabled===!0){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};A.deepExtend(n.nodes,this.nodesHandler.options),A.deepExtend(n.edges,this.edgesHandler.options),A.deepExtend(n.layout,this.layoutEngine.options),A.deepExtend(n.interaction,this.selectionHandler.options),A.deepExtend(n.interaction,this.renderer.options),A.deepExtend(n.interaction,this.interactionHandler.options),A.deepExtend(n.manipulation,this.manipulation.options),A.deepExtend(n.physics,this.physics.options),A.deepExtend(n.global,this.canvas.options),A.deepExtend(n.global,this.options),this.configurator.setModuleOptions(n)}void 0!==e.clickToUse?e.clickToUse===!0?void 0===this.activator&&(this.activator=new W(this.canvas.frame),this.activator.on("change",function(){t.body.emitter.emit("activate")})):(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")}},n.prototype._updateVisibleIndices=function(){var e=this.body.nodes,t=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var i in e)e.hasOwnProperty(i)&&e[i].options.hidden===!1&&this.body.nodeIndices.push(e[i].id);for(var o in t)t.hasOwnProperty(o)&&t[o].options.hidden===!1&&this.body.edgeIndices.push(t[o].id)},n.prototype.bindEventListeners=function(){var e=this;this.body.emitter.on("_dataChanged",function(){e._updateVisibleIndices(),e.body.emitter.emit("_requestRedraw"),e.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){e._updateValueRange(e.body.nodes),e._updateValueRange(e.body.edges),e.body.emitter.emit("startSimulation"),e.body.emitter.emit("_requestRedraw")})},n.prototype.setData=function(e){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),e&&e.dot&&(e.nodes||e.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(e&&e.options),e&&e.dot){console.log("The dot property has been depricated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var t=L.DOTToGraph(e.dot);return void this.setData(t)}if(e&&e.gephi){console.log("The gephi property has been depricated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var i=H.parseGephi(e.gephi);return void this.setData(i)}this.nodesHandler.setData(e&&e.nodes,!0),this.edgesHandler.setData(e&&e.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")},n.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var e in this.body.nodes)delete this.body.nodes[e];for(var t in this.body.edges)delete this.body.edges[t];A.recursiveDOMDelete(this.body.container)},n.prototype._updateValueRange=function(e){var t,i=void 0,o=void 0,n=0;for(t in e)if(e.hasOwnProperty(t)){var s=e[t].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(t in e)e.hasOwnProperty(t)&&e[t].setValueRange(i,o,n)},n.prototype.isActive=function(){return!this.activator||this.activator.active},n.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},n.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},n.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},n.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},n.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},n.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},n.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},n.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},n.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},n.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},n.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},n.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},n.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},n.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},n.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},n.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},n.prototype.editNodeMode=function(){return console.log("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},n.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},n.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},n.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},n.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},n.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},n.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},n.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},n.prototype.getConnectedNodes=function(e){return void 0!==this.body.nodes[e]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},n.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},n.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},n.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},n.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},n.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},n.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},n.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodes.apply(this.selectionHandler,arguments)},n.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdges.apply(this.selectionHandler,arguments)},n.prototype.getNodeAt=function(){var e=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==e&&void 0!==e.id?e.id:e},n.prototype.getEdgeAt=function(){var e=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==e&&void 0!==e.id?e.id:e},n.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},n.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},n.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.redraw()},n.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},n.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},n.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},n.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},n.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},n.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},n.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},n.prototype.getOptionsFromConfigurator=function(){var e={};return this.configurator&&(e=this.configurator.getOptions.apply(this.configurator)),e},e.exports=n},function(e,t){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,t={},t.color=this.groups[this.groupsArray[i]],this.groups[e]=t}else{var o=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,t={},t.color=this.defaultGroups[o],this.groups[e]=t}return t}},{key:"add",value:function(e,t){return this.groups[e]=t,this.groupsArray.push(e),t}}]),e}();t["default"]=r},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;ie.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"parseOptions",value:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["color","font","fixed","shadow"];if(z.selectiveNotDeepExtend(n,e,t,i),z.mergeOptions(e,t,"shadow",i,o),void 0!==t.color&&null!==t.color){var s=z.parseColor(t.color);z.fillIfDefined(e.color,s)}else i===!0&&null===t.color&&(e.color=z.bridgeObject(o.color));void 0!==t.fixed&&null!==t.fixed&&("boolean"==typeof t.fixed?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(void 0!==t.fixed.x&&"boolean"==typeof t.fixed.x&&(e.fixed.x=t.fixed.x),void 0!==t.fixed.y&&"boolean"==typeof t.fixed.y&&(e.fixed.y=t.fixed.y))),void 0!==t.font&&null!==t.font?a["default"].parseOptions(e.font,t):i===!0&&null===t.font&&(e.font=z.bridgeObject(o.font)),void 0!==t.scaling&&z.mergeOptions(e.scaling,t.scaling,"label",i,o.scaling)}}]),e}();t["default"]=R},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=function(){function e(e,t){for(var i=0;i=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);var h=this.size.yLine,d=this._getColor(a),l=n(d,2),c=l[0],u=l[1],f=this._setAlignment(e,i,h,s),p=n(f,2);i=p[0],h=p[1],e.font=(t&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,e.fillStyle=c,this.isEdgeLabel||"left"!==this.fontOptions.align?e.textAlign="center":(e.textAlign=this.fontOptions.align,i-=.5*this.size.width),this.fontOptions.strokeWidth>0&&(e.lineWidth=this.fontOptions.strokeWidth,e.strokeStyle=u,e.lineJoin="round");for(var v=0;v0&&e.strokeText(this.lines[v],i,h),e.fillText(this.lines[v],i,h),h+=r}},{key:"_setAlignment",value:function(e,t,i,o){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){t=0,i=0;var n=2;"top"===this.fontOptions.align?(e.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(e.textBaseline="hanging",i+=2*n):e.textBaseline="middle"}else e.textBaseline=o;return[t,i]}},{key:"_getColor",value:function(e){var t=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(e<=this.nodeOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-e)));t=a.overrideOpacity(t,o),i=a.overrideOpacity(i,o)}return[t,i]}},{key:"getTextSize",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i={width:this._processLabel(e,t),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};return i}},{key:"calculateLabelSize",value:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3],n=arguments.length<=4||void 0===arguments[4]?"middle":arguments[4];this.labelDirty===!0&&(this.size.width=this._processLabel(e,t)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(e,t){var i=0,o=[""],n=0;if(void 0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,e.font=(t&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=e.measureText(o[0]).width;for(var s=1;n>s;s++){var r=e.measureText(o[s]).width;i=r>i?r:i}}return this.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if("string"==typeof t.font){var o=t.font.split(" ");e.size=o[0].replace("px",""),e.face=o[1],e.color=o[2]}else"object"===s(t.font)&&a.fillIfDefined(e,t.font,i);e.size=Number(e.size)}}]),e}();t["default"]=h},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),this.updateBoundingBox(t,i,e,o),this.labelModule.draw(e,t,i,o)}},{key:"updateBoundingBox",value:function(e,t,i,o){this.resize(i,o),this.left=e-.5*this.width,this.top=t-.5*this.height;var n=this.options.shapeProperties.borderRadius;this.boundingBox.left=this.left-n,this.boundingBox.top=this.top-n,this.boundingBox.bottom=this.top+this.height+n,this.boundingBox.right=this.left+this.width+n}},{key:"distanceToBorder",value:function(e,t){this.resize(e);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}}]),t}(d["default"]);t["default"]=l},function(e,t){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;ithis.imageObj.height?(o=this.imageObj.width/this.imageObj.height,t=2*this.options.size*o||this.imageObj.width,i=2*this.options.size||this.imageObj.height):(o=this.imageObj.width&&this.imageObj.height?this.imageObj.height/this.imageObj.width:1,t=2*this.options.size,i=2*this.options.size*o):(t=this.imageObj.width,i=this.imageObj.height),this.width=t,this.height=i,this.radius=.5*this.width}}},{key:"_drawRawCircle",value:function(e,t,i,o,n,s){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;e.lineWidth=Math.min(this.width,h),e.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,e.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,e.circle(t,i,s),this.enableShadow(e),e.fill(),this.disableShadow(e),e.save(),h>0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore()}},{key:"_drawImageAtPosition",value:function(e){if(0!=this.imageObj.width){e.globalAlpha=1,this.enableShadow(e);var t=this.imageObj.width/this.width/this.body.view.scale;if(t>2&&this.options.shapeProperties.interpolation===!0){var i=this.imageObj.width,o=this.imageObj.height,n=document.createElement("canvas");n.width=i,n.height=i;var s=n.getContext("2d");t*=.5,i*=.5,o*=.5,s.drawImage(this.imageObj,0,0,i,o);for(var r=0,a=1;t>2&&4>a;)s.drawImage(n,r,0,i,o,r+i,0,i/2,o/2),r+=i,t*=.5,i*=.5,o*=.5,a+=1;e.drawImage(n,r,0,i,o,this.left,this.top,this.width,this.height)}else e.drawImage(this.imageObj,this.left,this.top,this.width,this.height);this.disableShadow(e)}}},{key:"_drawImageLabel",value:function(e,t,i,o){var n,s=0;if(void 0!==this.height){s=.5*this.height;var r=this.labelModule.getTextSize(e);r.lineCount>=1&&(s+=r.height/2)}n=i+s,this.options.label&&(this.labelOffset=s),this.labelModule.draw(e,t,n,o,"hanging")}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),this.updateBoundingBox(t,i,e,o),this.labelModule.draw(e,t,i,o)}},{key:"updateBoundingBox",value:function(e,t,i,o){this.resize(i,o),this.left=e-.5*this.width,this.top=t-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height, -this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),void 0!==this.options.label){var l=n+.5*this.height+3;this.labelModule.draw(e,o,l,s,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+3))}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),this.updateBoundingBox(t,i,e,o),this.labelModule.draw(e,t,i,o)}},{key:"updateBoundingBox",value:function(e,t,i,o){this.resize(i,o),this.left=e-.5*this.width,this.top=t-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(e,t){this.resize(e);var i=.5*this.width,o=.5*this.height,n=Math.sin(t)*i,s=Math.cos(t)*o;return i*o/Math.sqrt(n*n+s*s)}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0){var i=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+i)}}},{key:"_icon",value:function(e,t,i,o){var n=Number(this.options.icon.size);void 0!==this.options.icon.code?(e.font=(o?"bold ":"")+n+"px "+this.options.icon.face,e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e),e.fillText(this.options.icon.code,t,i),this.disableShadow(e)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),e.closePath()}this._drawImageAtPosition(e),this._drawImageLabel(e,t,i,o||n),this.updateBoundingBox(t,i)}},{key:"updateBoundingBox",value:function(e,t){this.resize(),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.top=this.top,this.boundingBox.left=this.left,this.boundingBox.right=this.left+this.width,this.boundingBox.bottom=this.top+this.height,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;is.distance?console.log('%cUnknown option detected: "'+t+'" in '+e.printLocation(n.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+e.printLocation(s.path,s.closestMatch,""),d):n.distance<=r?console.log('%cUnknown option detected: "'+t+'". Did you mean "'+n.closestMatch+'"?'+e.printLocation(n.path,t),d):console.log('%cUnknown option detected: "'+t+'". Did you mean one of these: '+e.print(Object.keys(i))+e.printLocation(o,t),d),a=!0}},{key:"findInOptions",value:function(t,i,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],s=1e9,a="",h=[],d=t.toLowerCase(),l=void 0;for(var c in i){var u=void 0;if(void 0!==i[c].__type__&&n===!0){var f=e.findInOptions(t,i[c],r.copyAndExtendArray(o,c));s>f.distance&&(a=f.closestMatch,h=f.path,s=f.distance,l=f.indexMatch)}else-1!==c.toLowerCase().indexOf(d)&&(l=c),u=e.levenshteinDistance(t,c),s>u&&(a=c,h=r.copyArray(o),s=u)}return{closestMatch:a,path:h,distance:s,indexMatch:l}}},{key:"printLocation",value:function(e,t){for(var i=arguments.length<=2||void 0===arguments[2]?"Problem value found at: \n":arguments[2],o="\n\n"+i+"options = {\n",n=0;ns;s++)o+=" ";o+=e[n]+": {\n"}for(var r=0;ri.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),s=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(e,s.x,s.y,n)}}}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=10,i=this.from.x,o=this.from.y,n=this.to.x,s=this.to.y,r=e.left,a=e.top,h=this.edgeType.getDistanceToEdge(i,o,n,s,r,a);return t>h}return!1}},{key:"_rotateForLabelAlignment",value:function(e){var t=this.from.y-this.to.y,i=this.from.x-this.to.x,o=Math.atan2(t,i);(-1>o&&0>i||o>0&&0>i)&&(o+=Math.PI),e.rotate(o)}},{key:"_pointOnCircle",value:function(e,t,i,o){var n=2*o*Math.PI;return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}}],[{key:"parseOptions",value:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["arrowStrikethrough","id","from","hidden","hoverWidth","label","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width"];if(g.selectiveDeepExtend(n,e,t,i),g.mergeOptions(e,t,"smooth",i,o),g.mergeOptions(e,t,"shadow",i,o),void 0!==t.dashes&&null!==t.dashes?e.dashes=t.dashes:i===!0&&null===t.dashes&&(e.dashes=Object.create(o.dashes)),void 0!==t.scaling&&null!==t.scaling?(void 0!==t.scaling.min&&(e.scaling.min=t.scaling.min),void 0!==t.scaling.max&&(e.scaling.max=t.scaling.max),g.mergeOptions(e.scaling,t.scaling,"label",i,o.scaling)):i===!0&&null===t.scaling&&(e.scaling=Object.create(o.scaling)),void 0!==t.arrows&&null!==t.arrows)if("string"==typeof t.arrows){var r=t.arrows.toLowerCase();e.arrows.to.enabled=-1!=r.indexOf("to"),e.arrows.middle.enabled=-1!=r.indexOf("middle"),e.arrows.from.enabled=-1!=r.indexOf("from")}else{if("object"!==s(t.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+JSON.stringify(t.arrows));g.mergeOptions(e.arrows,t.arrows,"to",i,o.arrows),g.mergeOptions(e.arrows,t.arrows,"middle",i,o.arrows),g.mergeOptions(e.arrows,t.arrows,"from",i,o.arrows)}else i===!0&&null===t.arrows&&(e.arrows=Object.create(o.arrows));if(void 0!==t.color&&null!==t.color)if(e.color=g.deepExtend({},e.color,!0),g.isString(t.color))e.color.color=t.color,e.color.highlight=t.color,e.color.hover=t.color,e.color.inherit=!1;else{var a=!1;void 0!==t.color.color&&(e.color.color=t.color.color,a=!0),void 0!==t.color.highlight&&(e.color.highlight=t.color.highlight,a=!0),void 0!==t.color.hover&&(e.color.hover=t.color.hover,a=!0),void 0!==t.color.inherit&&(e.color.inherit=t.color.inherit),void 0!==t.color.opacity&&(e.color.opacity=Math.min(1,Math.max(0,t.color.opacity))),void 0===t.color.inherit&&a===!0&&(e.color.inherit=!1)}else i===!0&&null===t.color&&(e.color=g.bridgeObject(o.color));void 0!==t.font&&null!==t.font?h["default"].parseOptions(e.font,t):i===!0&&null===t.font&&(e.font=g.bridgeObject(o.font))}}]),e}();t["default"]=b},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function e(e,t){for(var i=0;iMath.abs(t)||this.options.smooth.forceDirection===!0||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*e,n=this.to.x+r*e):(o=this.from.y-r*t,s=this.to.y+r*t,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t)}},{key:"_getDistanceToEdge",value:function(e,t,i,o,n,s){var r=arguments.length<=6||void 0===arguments[6]?this._getViaCoordinates():arguments[6],h=a(r,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(e,t,i,o,n,s,d,l)}},{key:"getPoint",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?this._getViaCoordinates():arguments[1],i=a(t,2),o=i[0],n=i[1],s=e,r=[];r[0]=Math.pow(1-s,3),r[1]=3*s*Math.pow(1-s,2),r[2]=3*Math.pow(s,2)*(1-s),r[3]=Math.pow(s,3);var h=r[0]*this.fromPoint.x+r[1]*o.x+r[2]*n.x+r[3]*this.toPoint.x,d=r[0]*this.fromPoint.y+r[1]*o.y+r[2]*n.y+r[3]*this.toPoint.y;return{x:h,y:d}}}]),t}(l["default"]);t["default"]=c},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;il;l++)c=.1*l,y[0]=Math.pow(1-c,3),y[1]=3*c*Math.pow(1-c,2),y[2]=3*Math.pow(c,2)*(1-c),y[3]=Math.pow(c,3),u=y[0]*e+y[1]*r.x+y[2]*a.x+y[3]*i,f=y[0]*t+y[1]*r.y+y[2]*a.y+y[3]*o,l>0&&(d=this._getDistanceToLine(p,v,u,f,n,s),h=h>d?d:h),p=u,v=f;return h}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i=l&&h>d;){var v=.5*(l+c);if(i=this.getPoint(v,a),o=Math.atan2(f.y-i.y,f.x-i.x),n=f.distanceToBorder(t,o),s=Math.sqrt(Math.pow(i.x-f.x,2)+Math.pow(i.y-f.y,2)),r=n-s,Math.abs(r)r?p===!1?l=v:c=v:p===!1?c=v:l=v,d++}return i.t=v,i}},{key:"_getDistanceToBezierEdge",value:function(e,t,i,o,n,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,c=void 0,u=void 0,f=e,p=t;for(d=1;10>d;d++)l=.1*d,c=Math.pow(1-l,2)*e+2*l*(1-l)*r.x+Math.pow(l,2)*i,u=Math.pow(1-l,2)*t+2*l*(1-l)*r.y+Math.pow(l,2)*o,d>0&&(h=this._getDistanceToLine(f,p,c,u,n,s),a=a>h?h:a),f=c,p=u;return a}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function e(e,t){for(var i=0;io.shape.height?(t=o.x+.5*o.shape.width,i=o.y-n):(t=o.x+n,i=o.y-.5*o.shape.height),[t,i,n]}},{key:"_pointOnCircle",value:function(e,t,i,o){var n=2*o*Math.PI;return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(e,t,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=10,d=0,l=this.options.selfReferenceSize,c=void 0,u=void 0,f=void 0,p=void 0,v=void 0,y=.05,g=.5*(s+r);r>=s&&h>d&&(g=.5*(s+r),c=this._pointOnCircle(o,n,l,g),u=Math.atan2(e.y-c.y,e.x-c.x),f=e.distanceToBorder(t,u),p=Math.sqrt(Math.pow(c.x-e.x,2)+Math.pow(c.y-e.y,2)),v=f-p,!(Math.abs(v)0?a>0?s=g:r=g:a>0?r=g:s=g,d++;return c.t=g,c}},{key:"getLineWidth",value:function(e,t){return e===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(e,t,i){var o=this.options.color;if(o.inherit!==!1){if("both"===o.inherit&&this.from.id!==this.to.id){var n=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,a=void 0;return s=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(s=r.overrideOpacity(this.from.options.color.border,this.options.color.opacity),a=r.overrideOpacity(this.to.options.color.border,this.options.color.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,a),n}this.colorDirty===!0&&("to"===o.inherit?(this.color.highlight=this.to.options.color.highlight.border,this.color.hover=this.to.options.color.hover.border,this.color.color=r.overrideOpacity(this.to.options.color.border,o.opacity)):(this.color.highlight=this.from.options.color.highlight.border,this.color.hover=this.from.options.color.hover.border,this.color.color=r.overrideOpacity(this.from.options.color.border,o.opacity)))}else this.colorDirty===!0&&(this.color.highlight=o.highlight,this.color.hover=o.hover,this.color.color=r.overrideOpacity(o.color,o.opacity));return this.colorDirty=!1,t===!0?this.color.highlight:i===!0?this.color.hover:this.color.color}},{key:"_circle",value:function(e,t,i,o){this.enableShadow(e),e.beginPath(),e.arc(t,i,o,0,2*Math.PI,!1),e.stroke(),this.disableShadow(e)}},{key:"getDistanceToEdge",value:function(e,t,i,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(e,t,i,o,s,r,a);else{var d=this._getCircleData(),l=n(d,3),c=l[0],u=l[1],f=l[2],p=c-s,v=u-r;h=Math.abs(Math.sqrt(p*p+v*v)-f)}return this.labelModule.size.lefts&&this.labelModule.size.topr?0:h}},{key:"_getDistanceToLine",value:function(e,t,i,o,n,s){var r=i-e,a=o-t,h=r*r+a*a,d=((n-e)*r+(s-t)*a)/h;d>1?d=1:0>d&&(d=0);var l=e+d*r,c=t+d*a,u=l-n,f=c-s;return Math.sqrt(u*u+f*f)}},{key:"getArrowData",value:function(e,t,i,o,s){var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,c=void 0,u=this.getLineWidth(o,s);if("from"===t?(h=this.from,d=this.to,l=.1,c=this.options.arrows.from.scaleFactor):"to"===t?(h=this.to,d=this.from,l=-.1,c=this.options.arrows.to.scaleFactor):(h=this.to,d=this.from,c=this.options.arrows.middle.scaleFactor),h!=d)if("middle"!==t)if(this.options.smooth.enabled===!0){a=this.findBorderPosition(h,e,{via:i});var f=this.getPoint(Math.max(0,Math.min(1,a.t+l)),i);r=Math.atan2(a.y-f.y,a.x-f.x)}else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.findBorderPosition(h,e);else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.getPoint(.5,i);else{var p=this._getCircleData(e),v=n(p,3),y=v[0],g=v[1],b=v[2];"from"===t?(a=this.findBorderPosition(this.from,e,{x:y,y:g,low:.25,high:.6,direction:-1}),r=-2*a.t*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===t?(a=this.findBorderPosition(this.from,e,{x:y,y:g,low:.6,high:1,direction:1}),r=-2*a.t*Math.PI+1.5*Math.PI-1.1*Math.PI):(a=this._pointOnCircle(y,g,b,.175),r=3.9269908169872414)}var m=15*c+3*u,_=a.x-.9*m*Math.cos(r),w=a.y-.9*m*Math.sin(r),k={x:_,y:w};return{point:a,core:k,angle:r,length:m}}},{key:"drawArrowHead",value:function(e,t,i,o){e.strokeStyle=this.getColor(e,t,i),e.fillStyle=e.strokeStyle,e.lineWidth=this.getLineWidth(t,i),e.arrow(o.point.x,o.point.y,o.angle,o.length),this.enableShadow(e),e.fill(),this.disableShadow(e)}},{key:"enableShadow",value:function(e){this.options.shadow.enabled===!0&&(e.shadowColor=this.options.shadow.color,e.shadowBlur=this.options.shadow.size,e.shadowOffsetX=this.options.shadow.x,e.shadowOffsetY=this.options.shadow.y)}},{key:"disableShadow",value:function(e){this.options.shadow.enabled===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}}]),e}();t["default"]=a},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i=this.to.y?this.from.x<=this.to.x?(e=this.from.x+i*s,t=this.from.y-i*s):this.from.x>this.to.x&&(e=this.from.x-i*s,t=this.from.y-i*s):this.from.ythis.to.x&&(e=this.from.x-i*s,t=this.from.y+i*s)),"discrete"===o&&(e=i*s>n?this.from.x:e)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(e=this.from.x+i*n,t=this.from.y-i*n):this.from.x>this.to.x&&(e=this.from.x-i*n,t=this.from.y-i*n):this.from.ythis.to.x&&(e=this.from.x-i*n,t=this.from.y+i*n)),"discrete"===o&&(t=i*n>s?this.from.y:t));else if("straightCross"===o)Math.abs(this.from.x-this.to.x)<=Math.abs(this.from.y-this.to.y)?(e=this.from.x,t=this.from.yMath.abs(this.from.y-this.to.y)&&(e=this.from.x=this.to.y?this.from.x<=this.to.x?(e=this.from.x+i*s,t=this.from.y-i*s,e=this.to.xthis.to.x&&(e=this.from.x-i*s,t=this.from.y-i*s,e=this.to.x>e?this.to.x:e):this.from.ythis.to.x&&(e=this.from.x-i*s,t=this.from.y+i*s,e=this.to.x>e?this.to.x:e)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(e=this.from.x+i*n,t=this.from.y-i*n,t=this.to.y>t?this.to.y:t):this.from.x>this.to.x&&(e=this.from.x-i*n,t=this.from.y-i*n,t=this.to.y>t?this.to.y:t):this.from.ythis.to.x&&(e=this.from.x-i*n,t=this.from.y+i*n,t=this.to.y1||this.startedStabilization===!0)&&setTimeout(function(){e.body.emitter.emit("stabilized",{iterations:t}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsTick",value:function(){if(this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0),this.stabilized===!1){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var e=1.2;this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.calculateForces(),this.moveNodes(),this.revert(),this.timestep=.5*this.timestep,this.calculateForces(),this.moveNodes(),this.calculateForces(),this.moveNodes(),this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/es))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=this.options.maxVelocity?this.options.maxVelocity:1e9,i=0,o=0,n=5,s=0;st?s[e].x>0?t:-t:s[e].x,i.x+=s[e].x*o}else n[e].x=0,s[e].x=0;if(i.options.fixed.y===!1){var h=this.modelOptions.damping*s[e].y,d=(n[e].y-h)/i.options.mass;s[e].y+=d*o,s[e].y=Math.abs(s[e].y)>t?s[e].y>0?t:-t:s[e].y,i.y+=s[e].y*o}else n[e].y=0,s[e].y=0;var l=Math.sqrt(Math.pow(s[e].x,2)+Math.pow(s[e].y,2));return l}},{key:"calculateForces",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve()}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var t in e)e.hasOwnProperty(t)&&e[t].x&&e[t].y&&(this.freezeCache[t]={x:e[t].options.fixed.x,y:e[t].options.fixed.y},e[t].options.fixed.x=!0,e[t].options.fixed.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var t in e)e.hasOwnProperty(t)&&void 0!==this.freezeCache[t]&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?this.options.stabilization.iterations:arguments[0];return"number"!=typeof t&&(console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",this.options.stabilization.iterations),t=this.options.stabilization.iterations),0===this.physicsBody.physicsNodeIndices.length?void(this.ready=!0):(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=t,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,void setTimeout(function(){return e._stabilizationBatch()},0))}},{key:"_stabilizationBatch",value:function(){this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0);for(var e=0;this.stabilized===!1&&e0){var e=void 0,t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(t,i);this.barnesHutTree=n;for(var s=0;o>s;s++)e=t[i[s]],e.options.mass>0&&(this._getForceContribution(n.root.children.NW,e),this._getForceContribution(n.root.children.NE,e),this._getForceContribution(n.root.children.SW,e),this._getForceContribution(n.root.children.SE,e))}}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=e.centerOfMass.x-t.x,o=e.centerOfMass.y-t.y,n=Math.sqrt(i*i+o*o),n*e.calcSize>this.thetaInversed?this._calculateForces(n,i,o,t,e):4===e.childrenCount?(this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)):e.children.data.id!=t.id&&this._calculateForces(n,i,o,t,e)}}},{key:"_calculateForces",value:function(e,t,i,o,n){0===e&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&(e=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,e-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(e,3),r=t*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(e,t){for(var i=void 0,o=t.length,n=e[t[0]].x,s=e[t[0]].y,r=e[t[0]].x,a=e[t[0]].y,h=1;o>h;h++){var d=e[t[h]].x,l=e[t[h]].y;e[t[h]].options.mass>0&&(n>d&&(n=d),d>r&&(r=d),s>l&&(s=l),l>a&&(a=l))}var c=Math.abs(r-n)-Math.abs(a-s);c>0?(s-=.5*c,a+=.5*c):(n+=.5*c,r-=.5*c);var u=1e-5,f=Math.max(u,Math.abs(r-n)),p=.5*f,v=.5*(n+r),y=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:v-p,maxX:v+p,minY:y-p,maxY:y+p},size:f,calcSize:1/f,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var b=0;o>b;b++)i=e[t[b]],i.options.mass>0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(e,t){var i=e.mass+t.options.mass,o=1/i;e.centerOfMass.x=e.centerOfMass.x*e.mass+t.x*t.options.mass,e.centerOfMass.x*=o,e.centerOfMass.y=e.centerOfMass.y*e.mass+t.y*t.options.mass,e.centerOfMass.y*=o,e.mass=i;var n=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?e.children.NW.range.maxY>t.y?this._placeInRegion(e,t,"NW"):this._placeInRegion(e,t,"SW"):e.children.NW.range.maxY>t.y?this._placeInRegion(e,t,"NE"):this._placeInRegion(e,t,"SE")}},{key:"_placeInRegion",value:function(e,t,i){switch(e.children[i].childrenCount){case 0:e.children[i].children.data=t,e.children[i].childrenCount=1,this._updateBranchMass(e.children[i],t);break;case 1:e.children[i].children.data.x===t.x&&e.children[i].children.data.y===t.y?(t.x+=this.seededRandom(),t.y+=this.seededRandom()):(this._splitBranch(e.children[i]),this._placeInTree(e.children[i],t));break;case 4:this._placeInTree(e.children[i],t)}}},{key:"_splitBranch",value:function(e){var t=null;1===e.childrenCount&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),null!=t&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*e.size;switch(t){case"NW":i=e.range.minX,o=e.range.minX+r,n=e.range.minY,s=e.range.minY+r;break;case"NE":i=e.range.minX+r,o=e.range.maxX,n=e.range.minY,s=e.range.minY+r;break;case"SW":i=e.range.minX,o=e.range.minX+r,n=e.range.minY+r,s=e.range.maxY;break;case"SE":i=e.range.minX+r,o=e.range.maxX,n=e.range.minY+r,s=e.range.maxY}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){void 0!==this.barnesHutTree&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,i){void 0===i&&(i="#FF0000"),4===e.childrenCount&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),e}();t["default"]=n},function(e,t){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;ii&&(s=.5*c>i?1:u*i+f,s/=i,o=e*s,n=t*s,l[r.id].x-=o,l[r.id].y-=n,l[a.id].x+=o,l[a.id].y+=n)}}}]),e}();t["default"]=n},function(e,t){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;ii?-Math.pow(p*i,2)+Math.pow(p*f,2):0,0===i?i=.01:s/=i,o=e*s,n=t*s,u[r.id].x-=o,u[r.id].y-=n,u[a.id].x+=o,u[a.id].y+=n}}}]),e}();t["default"]=n},function(e,t){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=t*r,o[n.id].y=i*r}}}]),t}(d["default"]);t["default"]=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=function(){function e(e,t){for(var i=0;i=e&&i.push(n.id)}for(var r=0;r0&&Object.keys(f).length>0&&v===!0&&o.push({nodes:u,edges:f})}}}for(var m=0;mo?r.x:o,n=r.ys?r.y:s;return{x:.5*(i+o),y:.5*(n+s)}}},{key:"openCluster",value:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?!0:arguments[2];if(void 0===e)throw new Error("No clusterNodeId supplied to openCluster.");if(void 0===this.body.nodes[e])throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(void 0===this.body.nodes[e].containedNodes)return void console.log("The node:"+e+" is not a cluster.");var o=this.body.nodes[e],n=o.containedNodes,s=o.containedEdges;if(void 0!==t&&void 0!==t.releaseFunction&&"function"==typeof t.releaseFunction){var r={},a={x:o.x,y:o.y};for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];r[d]={x:l.x,y:l.y}}var u=t.releaseFunction(a,r);for(var f in n)if(n.hasOwnProperty(f)){var p=this.body.nodes[f];void 0!==u[f]&&(p.x=void 0===u[f].x?o.x:u[f].x,p.y=void 0===u[f].y?o.y:u[f].y)}}else for(var v in n)if(n.hasOwnProperty(v)){var y=this.body.nodes[v];y=n[v],y.options.fixed.x===!1&&(y.x=o.x),y.options.fixed.y===!1&&(y.y=o.y)}for(var g in n)if(n.hasOwnProperty(g)){var b=this.body.nodes[g];b.vx=o.vx,b.vy=o.vy,b.setOptions({hidden:!1,physics:!0}),delete this.clusteredNodes[g]}for(var m=[],_=0;_o;)t.push(this.body.nodes[e].id),e=this.clusteredNodes[e].clusterId,o++;return t.push(this.body.nodes[e].id),t.reverse(),t}},{key:"_getConnectedId",value:function(e,t){return e.toId!=t?e.toId:e.fromId!=t?e.fromId:e.fromId}},{key:"_getHubSize",value:function(){for(var e=0,t=0,i=0,o=0,n=0;no&&(o=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),i+=1}e/=i,t/=i;var r=t-Math.pow(e,2),a=Math.sqrt(r),h=Math.floor(e+2*a);return h>o&&(h=o),h}}]),e}();t["default"]=u},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i0)for(var a=0;at.shape.boundingBox.left&&(s=t.shape.boundingBox.left),rt.shape.boundingBox.top&&(o=t.shape.boundingBox.top),n0)for(var a=0;at.x&&(s=t.x),rt.y&&(o=t.y),n0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(void 0!==e){var t=["hideEdgesOnDrag","hideNodesOnDrag"];s.selectiveDeepExtend(t,this.options,e)}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&void 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.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(function(){e._redraw(!1)},0):window.requestAnimationFrame(function(){e._redraw(!1)}))}},{key:"_redraw",value:function(){var e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var t=this.canvas.frame.canvas.getContext("2d");0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(t.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale),t.beginPath(),this.body.emitter.emit("beforeDrawing",t),t.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&this._drawEdges(t),(this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1)&&this._drawNodes(t,e),t.beginPath(),this.body.emitter.emit("afterDrawing",t),t.closePath(),t.restore(),e===!0&&t.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){var e=this.canvas.frame.canvas.getContext("2d");void 0===this.pixelRatio&&(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),e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);var t=this.body.nodes,i=void 0;for(var o in t)t.hasOwnProperty(o)&&(i=t[o],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=20,a=this.canvas.DOMtoCanvas({x:-r,y:-r}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+r,y:this.canvas.frame.canvas.clientHeight+r}),d={top:a.y,left:a.x,bottom:h.y,right:h.x},l=0;l0){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=e&&1!=t?i=.5*this.cameraState.scale*(e+t):1!=e?i=this.cameraState.scale*e:1!=t&&(i=this.cameraState.scale*t),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if("number"==typeof e)return e+"px";if("string"==typeof e){if(-1!==e.indexOf("%")||-1!==e.indexOf("px"))return e;if(-1===e.indexOf("%"))return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext){var e=this.frame.canvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.frame.canvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var e=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:s.DIRECTION_ALL}),r.onTouch(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("mousewheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new s(this.frame),r.onRelease(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length<=0||void 0===arguments[0]?this.options.width:arguments[0],t=arguments.length<=1||void 0===arguments[1]?this.options.height:arguments[1];e=this._prepareValue(e),t=this._prepareValue(t);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.frame.canvas.getContext("2d"),r=this.pixelRatio;return this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t?(this._getCameraState(r),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,i=!0):(this.frame.canvas.width==Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&this.frame.canvas.height==Math.round(this.frame.canvas.clientHeight*this.pixelRatio)||this._getCameraState(r),this.frame.canvas.width!=Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&(this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=!0),this.frame.canvas.height!=Math.round(this.frame.canvas.clientHeight*this.pixelRatio)&&(this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),i=!0)),i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),e}();t["default"]=h},function(e,t,i){if("undefined"!=typeof window){var o=i(59),n=window.Hammer||i(60);e.exports=o(n,{preventDefault:"mouse"})}else e.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(e,t,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(t,n):o,!(void 0!==s&&(e.exports=s))}(function(){var e=null;return function t(i,o){function n(e){return e.match(/[^ ]+/g)}function s(t){if("hammer.input"!==t.type){if(t.srcEvent._handled||(t.srcEvent._handled={}),t.srcEvent._handled[t.type])return;t.srcEvent._handled[t.type]=!0}var i=!1;t.stopPropagation=function(){i=!0};var o=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof o&&(t.srcEvent.stopPropagation=function(){o(),t.stopPropagation()}),t.firstTarget=e;for(var n=e;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[e]=o:(i.off(e,s),delete d._handlers[e]))}),d},d.emit=function(t,o){e=o.target,i.emit(t,o)},d.destroy=function(){var e=i.element.hammer,t=e.indexOf(d);-1!==t&&e.splice(t,1),e.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(e,t,i){var o;/*! Hammer.JS - v2.0.6 - 2015-12-23 +"use strict";!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vis=t():e.vis=t()}(this,function(){return function(e){function t(o){if(i[o])return i[o].exports;var n=i[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){t.util=i(1),t.DOMutil=i(7),t.DataSet=i(8),t.DataView=i(10),t.Queue=i(9),t.Network=i(11),t.network={Images:i(12),dotparser:i(77),gephiParser:i(78),allOptions:i(72)},t.network.convertDot=function(e){return t.network.dotparser.DOTToGraph(e)},t.network.convertGephi=function(e,i){return t.network.gephiParser.parseGephi(e,i)},t.moment=i(2),t.Hammer=i(58),t.keycharm=i(65)},function(e,t,i){var o="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},n=i(2),s=i(6);t.isNumber=function(e){return e instanceof Number||"number"==typeof e},t.recursiveDOMDelete=function(e){if(e)for(;e.hasChildNodes()===!0;)t.recursiveDOMDelete(e.firstChild),e.removeChild(e.firstChild)},t.giveRange=function(e,t,i,o){if(t==e)return.5;var n=1/(t-e);return Math.max(0,(o-e)*n)},t.isString=function(e){return e instanceof String||"string"==typeof e},t.isDate=function(e){if(e instanceof Date)return!0;if(t.isString(e)){var i=r.exec(e);if(i)return!0;if(!isNaN(Date.parse(e)))return!0}return!1},t.randomUUID=function(){return s.v4()},t.assignAllKeys=function(e,t){for(var i in e)e.hasOwnProperty(i)&&"object"!==o(e[i])&&(e[i]=t)},t.fillIfDefined=function(e,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var s in e)void 0!==i[s]&&("object"!==o(i[s])?void 0!==i[s]&&null!==i[s]||void 0===e[s]||n!==!0?e[s]=i[s]:delete e[s]:"object"===o(e[s])&&t.fillIfDefined(e[s],i[s],n))},t.protoExtend=function(e,t){for(var i=1;i3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s=2;s3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s in o)if(o.hasOwnProperty(s)&&e.indexOf(s)==-1)if(o[s]&&o[s].constructor===Object)void 0===i[s]&&(i[s]={}),i[s].constructor===Object?t.deepExtend(i[s],o[s]):null===o[s]&&void 0!==i[s]&&n===!0?delete i[s]:i[s]=o[s];else if(Array.isArray(o[s])){i[s]=[];for(var r=0;r=0&&(t="DOMMouseScroll"),e.addEventListener(t,i,o)):e.attachEvent("on"+t,i)},t.removeEventListener=function(e,t,i,o){e.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===t&&navigator.userAgent.indexOf("Firefox")>=0&&(t="DOMMouseScroll"),e.removeEventListener(t,i,o)):e.detachEvent("on"+t,i)},t.preventDefault=function(e){e||(e=window.event),e.preventDefault?e.preventDefault():e.returnValue=!1},t.getTarget=function(e){e||(e=window.event);var t;return e.target?t=e.target:e.srcElement&&(t=e.srcElement),void 0!=t.nodeType&&3==t.nodeType&&(t=t.parentNode),t},t.hasParent=function(e,t){for(var i=e;i;){if(i===t)return!0;i=i.parentNode}return!1},t.option={},t.option.asBoolean=function(e,t){return"function"==typeof e&&(e=e()),null!=e?0!=e:t||null},t.option.asNumber=function(e,t){return"function"==typeof e&&(e=e()),null!=e?Number(e)||t||null:t||null},t.option.asString=function(e,t){return"function"==typeof e&&(e=e()),null!=e?String(e):t||null},t.option.asSize=function(e,i){return"function"==typeof e&&(e=e()),t.isString(e)?e:t.isNumber(e)?e+"px":i||null},t.option.asElement=function(e,t){return"function"==typeof e&&(e=e()),e||t||null},t.hexToRGB=function(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,i,o){return t+t+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},t.overrideOpacity=function(e,i){if(e.indexOf("rgba")!=-1)return e;if(e.indexOf("rgb")!=-1){var o=e.substr(e.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=t.hexToRGB(e);return null==o?e:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},t.RGBToHex=function(e,t,i){return"#"+((1<<24)+(e<<16)+(t<<8)+i).toString(16).slice(1)},t.parseColor=function(e){var i;if(t.isString(e)===!0){if(t.isValidRGB(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",").map(function(e){return parseInt(e)});e=t.RGBToHex(o[0],o[1],o[2])}if(t.isValidHex(e)===!0){var n=t.hexToHSV(e),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=t.HSVToHex(r.h,r.s,r.v),h=t.HSVToHex(s.h,s.s,s.v);i={background:e,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else i={},i.background=e.background||void 0,i.border=e.border||void 0,t.isString(e.highlight)?i.highlight={border:e.highlight,background:e.highlight}:(i.highlight={},i.highlight.background=e.highlight&&e.highlight.background||void 0,i.highlight.border=e.highlight&&e.highlight.border||void 0),t.isString(e.hover)?i.hover={border:e.hover,background:e.hover}:(i.hover={},i.hover.background=e.hover&&e.hover.background||void 0,i.hover.border=e.hover&&e.hover.border||void 0);return i},t.RGBToHSV=function(e,t,i){e/=255,t/=255,i/=255;var o=Math.min(e,Math.min(t,i)),n=Math.max(e,Math.max(t,i));if(o==n)return{h:0,s:0,v:o};var s=e==o?t-i:i==o?e-t:i-e,r=e==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var a={split:function(e){var t={};return e.split(";").forEach(function(e){if(""!=e.trim()){var i=e.split(":"),o=i[0].trim(),n=i[1].trim();t[o]=n}}),t},join:function(e){return Object.keys(e).map(function(t){return t+": "+e[t]}).join("; ")}};t.addCssText=function(e,i){var o=a.split(e.style.cssText),n=a.split(i),s=t.extend(o,n);e.style.cssText=a.join(s)},t.removeCssText=function(e,t){var i=a.split(e.style.cssText),o=a.split(t);for(var n in o)o.hasOwnProperty(n)&&delete i[n];e.style.cssText=a.join(i)},t.HSVToRGB=function(e,t,i){var o,n,s,r=Math.floor(6*e),a=6*e-r,h=i*(1-t),d=i*(1-a*t),l=i*(1-(1-a)*t);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},t.HSVToHex=function(e,i,o){var n=t.HSVToRGB(e,i,o);return t.RGBToHex(n.r,n.g,n.b)},t.hexToHSV=function(e){var i=t.hexToRGB(e);return t.RGBToHSV(i.r,i.g,i.b)},t.isValidHex=function(e){var t=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e);return t},t.isValidRGB=function(e){e=e.replace(" ","");var t=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(e);return t},t.isValidRGBA=function(e){e=e.replace(" ","");var t=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(e);return t},t.selectiveBridgeObject=function(e,i){if("object"==("undefined"==typeof i?"undefined":o(i))){for(var n=Object.create(i),s=0;s0&&t(o,e[n-1])<0;n--)e[n]=e[n-1];e[n]=o}return e},t.mergeOptions=function(e,t,i){var o=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]?arguments[4]:{});if(null===t[i])e[i]=Object.create(o[i]);else if(void 0!==t[i])if("boolean"==typeof t[i])e[i].enabled=t[i];else{void 0===t[i].enabled&&(e[i].enabled=!0);for(var n in t[i])t[i].hasOwnProperty(n)&&(e[i][n]=t[i][n])}},t.binarySearchCustom=function(e,t,i,o){for(var n=1e4,s=0,r=0,a=e.length-1;r<=a&&s0)return"before"==o?Math.max(0,h-1):h;if(n(r,t)<0&&n(a,t)>0)return"before"==o?h:Math.min(e.length-1,h+1);n(r,t)<0?c=h+1:u=h-1,l++}return-1},t.easingFunctions={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}},t.getScrollBarWidth=function(){var e=document.createElement("p");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t);var i=e.offsetWidth;t.style.overflow="scroll";var o=e.offsetWidth;return i==o&&(o=t.clientWidth),document.body.removeChild(t),i-o}},function(e,t,i){e.exports="undefined"!=typeof window&&window.moment||i(3)},function(e,t,i){(function(e){!function(t,i){e.exports=i()}(this,function(){function t(){return po.apply(null,arguments)}function i(e){po=e}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function n(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){var t;for(t in e)return!1;return!0}function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function a(e,t){var i,o=[];for(i=0;i0)for(i in yo)o=yo[i],n=t[o],v(n)||(e[o]=n);return e}function g(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),go===!1&&(go=!0,t.updateOffset(this),go=!1)}function b(e){return e instanceof g||null!=e&&null!=e._isAMomentObject}function m(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function _(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=m(t)),i}function w(e,t,i){var o,n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),r=0;for(o=0;o0?"future":"past"];return E(i)?i(t):i.replace(/%s/i,t)}function j(e,t){var i=e.toLowerCase();Co[i]=Co[i+"s"]=Co[t]=e}function N(e){return"string"==typeof e?Co[e]||Co[e.toLowerCase()]:void 0}function z(e){var t,i,o={};for(i in e)h(e,i)&&(t=N(i),t&&(o[t]=e[i]));return o}function R(e,t){So[e]=t}function A(e){var t=[];for(var i in e)t.push({unit:i,priority:So[i]});return t.sort(function(e,t){return e.priority-t.priority}),t}function L(e,i){return function(o){return null!=o?(W(this,e,o),t.updateOffset(this,i),this):H(this,e)}}function H(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function W(e,t,i){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](i)}function Y(e){return e=N(e),E(this[e])?this[e]():this}function U(e,t){if("object"==typeof e){e=z(e);for(var i=A(e),o=0;o=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function q(e,t,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),e&&(Bo[e]=n),t&&(Bo[t[0]]=function(){return V(n.apply(this,arguments),t[1],t[2])}),i&&(Bo[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function G(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function X(e){var t,i,o=e.match(Do);for(t=0,i=o.length;t=0&&To.test(e);)e=e.replace(To,i),To.lastIndex=0,o-=1;return e}function Q(e,t,i){Zo[e]=E(t)?t:function(e,o){return e&&i?i:t}}function J(e,t){return h(Zo,e)?Zo[e](t._strict,t._locale):new RegExp($(e))}function $(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,o,n){return t||i||o||n}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var i,o=t;for("string"==typeof e&&(e=[e]),"number"==typeof t&&(o=function(e,i){i[t]=_(e)}),i=0;i=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function me(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function _e(e,t,i){var o=7+t-i,n=(7+me(e,0,o).getUTCDay()-t)%7;return-n+o-1}function we(e,t,i,o,n){var s,r,a=(7+i-o)%7,h=_e(e,o,n),d=1+7*(t-1)+a+h;return d<=0?(s=e-1,r=ve(s)+d):d>ve(e)?(s=e+1,r=d-ve(e)):(s=e,r=d),{year:s,dayOfYear:r}}function ke(e,t,i){var o,n,s=_e(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return r<1?(n=e.year()-1,o=r+xe(n,t,i)):r>xe(e.year(),t,i)?(o=r-xe(e.year(),t,i),n=e.year()+1):(n=e.year(),o=r),{week:o,year:n}}function xe(e,t,i){var o=_e(e,t,i),n=_e(e+1,t,i);return(ve(e)-o+n)/7}function Oe(e){return ke(e,this._week.dow,this._week.doy).week}function Ee(){return this._week.dow}function Me(){return this._week.doy}function Ce(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Se(e){var t=ke(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function De(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Te(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Pe(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function Be(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Fe(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ie(e,t,i){var o,n,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)s=l([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===t?(n=_o.call(this._weekdaysParse,r),n!==-1?n:null):"ddd"===t?(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:null):(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null):"dddd"===t?(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null))):"ddd"===t?(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null))):(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:null)))}function je(e,t,i){var o,n,s;if(this._weekdaysParseExact)return Ie.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(n=l([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[o].test(e))return o;if(i&&"ddd"===t&&this._shortWeekdaysParse[o].test(e))return o;if(i&&"dd"===t&&this._minWeekdaysParse[o].test(e))return o;if(!i&&this._weekdaysParse[o].test(e))return o}}function Ne(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=De(e,this.localeData()),this.add(e-t,"d")):t}function ze(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Re(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Te(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Ae(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||We.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=bn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Le(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||We.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=mn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function He(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||We.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_n),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function We(){function e(e,t){return t.length-e.length}var t,i,o,n,s,r=[],a=[],h=[],d=[];for(t=0;t<7;t++)i=l([2e3,1]).day(t),o=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(o),a.push(n),h.push(s),d.push(o),d.push(n),d.push(s);for(r.sort(e),a.sort(e),h.sort(e),d.sort(e),t=0;t<7;t++)a[t]=ee(a[t]),h[t]=ee(h[t]),d[t]=ee(d[t]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ye(){return this.hours()%12||12}function Ue(){return this.hours()||24}function Ve(e,t){q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function qe(e,t){return t._meridiemParse}function Ge(e){return"p"===(e+"").toLowerCase().charAt(0)}function Xe(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"}function Ke(e){return e?e.toLowerCase().replace("_","-"):e}function Ze(e){for(var t,i,o,n,s=0;s0;){if(o=Qe(n.slice(0,t).join("-")))return o;if(i&&i.length>=t&&w(n,i,!0)>=t-1)break;t--}s++}return null}function Qe(t){var i=null;if(!En[t]&&"undefined"!=typeof e&&e&&e.exports)try{i=wn._abbr,!function(){var e=new Error('Cannot find module "./locale"');throw e.code="MODULE_NOT_FOUND",e}(),Je(i)}catch(e){}return En[t]}function Je(e,t){var i;return e&&(i=v(t)?tt(e):$e(e,t),i&&(wn=i)),wn._abbr}function $e(e,t){if(null!==t){var i=On;return t.abbr=e,null!=En[e]?(O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=En[e]._config):null!=t.parentLocale&&(null!=En[t.parentLocale]?i=En[t.parentLocale]._config:O("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),En[e]=new S(C(i,t)),Je(e),En[e]}return delete En[e],null}function et(e,t){if(null!=t){var i,o=On;null!=En[e]&&(o=En[e]._config),t=C(o,t),i=new S(t),i.parentLocale=En[e],En[e]=i,Je(e)}else null!=En[e]&&(null!=En[e].parentLocale?En[e]=En[e].parentLocale:null!=En[e]&&delete En[e]);return En[e]}function tt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return wn;if(!o(e)){if(t=Qe(e))return t;e=[e]}return Ze(e)}function it(){return mo(En)}function ot(e){var t,i=e._a;return i&&u(e).overflow===-2&&(t=i[$o]<0||i[$o]>11?$o:i[en]<1||i[en]>ne(i[Jo],i[$o])?en:i[tn]<0||i[tn]>24||24===i[tn]&&(0!==i[on]||0!==i[nn]||0!==i[sn])?tn:i[on]<0||i[on]>59?on:i[nn]<0||i[nn]>59?nn:i[sn]<0||i[sn]>999?sn:-1, +u(e)._overflowDayOfYear&&(ten)&&(t=en),u(e)._overflowWeeks&&t===-1&&(t=rn),u(e)._overflowWeekday&&t===-1&&(t=an),u(e).overflow=t),e}function nt(e){var t,i,o,n,s,r,a=e._i,h=Mn.exec(a)||Cn.exec(a);if(h){for(u(e).iso=!0,t=0,i=Dn.length;tve(n)&&(u(e)._overflowDayOfYear=!0),i=me(n,0,e._dayOfYear),e._a[$o]=i.getUTCMonth(),e._a[en]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=o[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[tn]&&0===e._a[on]&&0===e._a[nn]&&0===e._a[sn]&&(e._nextDay=!0,e._a[tn]=0),e._d=(e._useUTC?me:be).apply(null,s),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[tn]=24)}}function dt(e){var t,i,o,n,s,r,a,h;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(s=1,r=4,i=rt(t.GG,e._a[Jo],ke(bt(),1,4).year),o=rt(t.W,1),n=rt(t.E,1),(n<1||n>7)&&(h=!0)):(s=e._locale._week.dow,r=e._locale._week.doy,i=rt(t.gg,e._a[Jo],ke(bt(),s,r).year),o=rt(t.w,1),null!=t.d?(n=t.d,(n<0||n>6)&&(h=!0)):null!=t.e?(n=t.e+s,(t.e<0||t.e>6)&&(h=!0)):n=s),o<1||o>xe(i,s,r)?u(e)._overflowWeeks=!0:null!=h?u(e)._overflowWeekday=!0:(a=we(i,o,n,s,r),e._a[Jo]=a.year,e._dayOfYear=a.dayOfYear)}function lt(e){if(e._f===t.ISO_8601)return void nt(e);e._a=[],u(e).empty=!0;var i,o,n,s,r,a=""+e._i,h=a.length,d=0;for(n=Z(e._f,e._locale).match(Do)||[],i=0;i0&&u(e).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),Bo[s]?(o?u(e).empty=!1:u(e).unusedTokens.push(s),oe(s,o,e)):e._strict&&!o&&u(e).unusedTokens.push(s);u(e).charsLeftOver=h-d,a.length>0&&u(e).unusedInput.push(a),e._a[tn]<=12&&u(e).bigHour===!0&&e._a[tn]>0&&(u(e).bigHour=void 0),u(e).parsedDateParts=e._a.slice(0),u(e).meridiem=e._meridiem,e._a[tn]=ct(e._locale,e._a[tn],e._meridiem),ht(e),ot(e)}function ct(e,t,i){var o;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?(o=e.isPM(i),o&&t<12&&(t+=12),o||12!==t||(t=0),t):t}function ut(e){var t,i,o,n,s;if(0===e._f.length)return u(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Nt(){if(!v(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),e=vt(e),e._a){var t=e._isUTC?l(e._a):bt(e._a);this._isDSTShifted=this.isValid()&&w(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function zt(){return!!this.isValid()&&!this._isUTC}function Rt(){return!!this.isValid()&&this._isUTC}function At(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Lt(e,t){var i,o,n,s=e,r=null;return xt(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(s={},t?s[t]=e:s.milliseconds=e):(r=Nn.exec(e))?(i="-"===r[1]?-1:1,s={y:0,d:_(r[en])*i,h:_(r[tn])*i,m:_(r[on])*i,s:_(r[nn])*i,ms:_(Ot(1e3*r[sn]))*i}):(r=zn.exec(e))?(i="-"===r[1]?-1:1,s={y:Ht(r[2],i),M:Ht(r[3],i),w:Ht(r[4],i),d:Ht(r[5],i),h:Ht(r[6],i),m:Ht(r[7],i),s:Ht(r[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=Yt(bt(s.from),bt(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new kt(s),xt(e)&&h(e,"_locale")&&(o._locale=e._locale),o}function Ht(e,t){var i=e&&parseFloat(e.replace(",","."));return(isNaN(i)?0:i)*t}function Wt(e,t){var i={milliseconds:0,months:0};return i.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(i.months,"M").isAfter(t)&&--i.months,i.milliseconds=+t-+e.clone().add(i.months,"M"),i}function Yt(e,t){var i;return e.isValid()&&t.isValid()?(t=Ct(t,e),e.isBefore(t)?i=Wt(e,t):(i=Wt(t,e),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Ut(e,t){return function(i,o){var n,s;return null===o||isNaN(+o)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=Lt(i,o),Vt(this,n,e),this}}function Vt(e,i,o,n){var s=i._milliseconds,r=Ot(i._days),a=Ot(i._months);e.isValid()&&(n=null==n||n,s&&e._d.setTime(e._d.valueOf()+s*o),r&&W(e,"Date",H(e,"Date")+r*o),a&&de(e,H(e,"Month")+a*o),n&&t.updateOffset(e,r||a))}function qt(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function Gt(e,i){var o=e||bt(),n=Ct(o,this).startOf("day"),s=t.calendarFormat(this,n)||"sameElse",r=i&&(E(i[s])?i[s].call(this,o):i[s]);return this.format(r||this.localeData().calendar(s,this,bt(o)))}function Xt(){return new g(this)}function Kt(e,t){var i=b(e)?e:bt(e);return!(!this.isValid()||!i.isValid())&&(t=N(v(t)?"millisecond":t),"millisecond"===t?this.valueOf()>i.valueOf():i.valueOf()s&&(t=s),Ti.call(this,e,t,i,o,n))}function Ti(e,t,i,o,n){var s=we(e,t,i,o,n),r=me(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Pi(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Bi(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Fi(e,t){t[sn]=_(1e3*("0."+e))}function Ii(){return this._isUTC?"UTC":""}function ji(){return this._isUTC?"Coordinated Universal Time":""}function Ni(e){return bt(1e3*e)}function zi(){return bt.apply(null,arguments).parseZone()}function Ri(e){return e}function Ai(e,t,i,o){var n=tt(),s=l().set(o,t);return n[i](s,e)}function Li(e,t,i){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return Ai(e,t,i,"month");var o,n=[];for(o=0;o<12;o++)n[o]=Ai(e,o,i,"month");return n}function Hi(e,t,i,o){"boolean"==typeof e?("number"==typeof t&&(i=t,t=void 0),t=t||""):(t=e,i=t,e=!1,"number"==typeof t&&(i=t,t=void 0),t=t||"");var n=tt(),s=e?n._week.dow:0;if(null!=i)return Ai(t,(i+s)%7,o,"day");var r,a=[];for(r=0;r<7;r++)a[r]=Ai(t,(r+s)%7,o,"day");return a}function Wi(e,t){return Li(e,t,"months")}function Yi(e,t){return Li(e,t,"monthsShort")}function Ui(e,t,i){return Hi(e,t,i,"weekdays")}function Vi(e,t,i){return Hi(e,t,i,"weekdaysShort")}function qi(e,t,i){return Hi(e,t,i,"weekdaysMin")}function Gi(){var e=this._data;return this._milliseconds=Kn(this._milliseconds),this._days=Kn(this._days),this._months=Kn(this._months),e.milliseconds=Kn(e.milliseconds),e.seconds=Kn(e.seconds),e.minutes=Kn(e.minutes),e.hours=Kn(e.hours),e.months=Kn(e.months),e.years=Kn(e.years),this}function Xi(e,t,i,o){var n=Lt(t,i);return e._milliseconds+=o*n._milliseconds,e._days+=o*n._days,e._months+=o*n._months,e._bubble()}function Ki(e,t){return Xi(this,e,t,1)}function Zi(e,t){return Xi(this,e,t,-1)}function Qi(e){return e<0?Math.floor(e):Math.ceil(e)}function Ji(){var e,t,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*Qi(eo(a)+r),r=0,a=0),h.milliseconds=s%1e3,e=m(s/1e3),h.seconds=e%60,t=m(e/60),h.minutes=t%60,i=m(t/60),h.hours=i%24,r+=m(i/24),n=m($i(r)),a+=n,r-=Qi(eo(n)),o=m(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function $i(e){return 4800*e/146097}function eo(e){return 146097*e/4800}function to(e){var t,i,o=this._milliseconds;if(e=N(e),"month"===e||"year"===e)return t=this._days+o/864e5,i=this._months+$i(t),"month"===e?i:i/12;switch(t=this._days+Math.round(eo(this._months)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return 24*t+o/36e5;case"minute":return 1440*t+o/6e4;case"second":return 86400*t+o/1e3;case"millisecond":return Math.floor(864e5*t)+o;default:throw new Error("Unknown unit "+e)}}function io(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function oo(e){return function(){return this.as(e)}}function no(e){return e=N(e),this[e+"s"]()}function so(e){return function(){return this._data[e]}}function ro(){return m(this.days()/7)}function ao(e,t,i,o,n){return n.relativeTime(t||1,!!i,e,o)}function ho(e,t,i){var o=Lt(e).abs(),n=cs(o.as("s")),s=cs(o.as("m")),r=cs(o.as("h")),a=cs(o.as("d")),h=cs(o.as("M")),d=cs(o.as("y")),l=n0,l[4]=i,ao.apply(null,l)}function lo(e){return void 0===e?cs:"function"==typeof e&&(cs=e,!0)}function co(e,t){return void 0!==us[e]&&(void 0===t?us[e]:(us[e]=t,!0))}function uo(e){var t=this.localeData(),i=ho(this,!e,t);return e&&(i=t.pastFuture(+this,i)),t.postformat(i)}function fo(){var e,t,i,o=fs(this._milliseconds)/1e3,n=fs(this._days),s=fs(this._months);e=m(o/60),t=m(e/60),o%=60,e%=60,i=m(s/12),s%=12;var r=i,a=s,h=n,d=t,l=e,c=o,u=this.asSeconds();return u?(u<0?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||c?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var po,vo;vo=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),i=t.length>>>0,o=0;o68?1900:2e3)};var fn=L("FullYear",!0);q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),j("week","w"),j("isoWeek","W"),R("week",5),R("isoWeek",5),Q("w",Ro),Q("ww",Ro,Io),Q("W",Ro),Q("WW",Ro,Io),ie(["w","ww","W","WW"],function(e,t,i,o){t[o.substr(0,1)]=_(e)});var pn={dow:0,doy:6};q("d",0,"do","day"),q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),j("day","d"),j("weekday","e"),j("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),Q("d",Ro),Q("e",Ro),Q("E",Ro),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ie(["dd","ddd","dddd"],function(e,t,i,o){var n=i._locale.weekdaysParse(e,o,i._strict);null!=n?t.d=n:u(i).invalidWeekday=e}),ie(["d","e","E"],function(e,t,i,o){t[o]=_(e)});var vn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),yn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),gn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),bn=Ko,mn=Ko,_n=Ko;q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Ye),q("k",["kk",2],0,Ue),q("hmm",0,0,function(){return""+Ye.apply(this)+V(this.minutes(),2)}),q("hmmss",0,0,function(){return""+Ye.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Ve("a",!0),Ve("A",!1),j("hour","h"),R("hour",13),Q("a",qe),Q("A",qe),Q("H",Ro),Q("h",Ro),Q("HH",Ro,Io),Q("hh",Ro,Io),Q("hmm",Ao),Q("hmmss",Lo),Q("Hmm",Ao),Q("Hmmss",Lo),te(["H","HH"],tn),te(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),te(["h","hh"],function(e,t,i){t[tn]=_(e),u(i).bigHour=!0}),te("hmm",function(e,t,i){var o=e.length-2;t[tn]=_(e.substr(0,o)),t[on]=_(e.substr(o)),u(i).bigHour=!0}),te("hmmss",function(e,t,i){var o=e.length-4,n=e.length-2;t[tn]=_(e.substr(0,o)),t[on]=_(e.substr(o,2)),t[nn]=_(e.substr(n)),u(i).bigHour=!0}),te("Hmm",function(e,t,i){var o=e.length-2;t[tn]=_(e.substr(0,o)),t[on]=_(e.substr(o))}),te("Hmmss",function(e,t,i){var o=e.length-4,n=e.length-2;t[tn]=_(e.substr(0,o)),t[on]=_(e.substr(o,2)),t[nn]=_(e.substr(n))});var wn,kn=/[ap]\.?m?\.?/i,xn=L("Hours",!0),On={calendar:wo,longDateFormat:ko,invalidDate:xo,ordinal:Oo,ordinalParse:Eo,relativeTime:Mo,months:dn,monthsShort:ln,week:pn,weekdays:vn,weekdaysMin:gn,weekdaysShort:yn,meridiemParse:kn},En={},Mn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Cn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,Dn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Tn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Pn=/^\/?Date\((\-?\d+)/i;t.createFromInputFallback=x("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),t.ISO_8601=function(){};var Bn=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=bt.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:p()}),In=function(){return Date.now?Date.now():+new Date};Et("Z",":"),Et("ZZ",""),Q("Z",Go),Q("ZZ",Go),te(["Z","ZZ"],function(e,t,i){i._useUTC=!0,i._tzm=Mt(Go,e)});var jn=/([\+\-]|\d\d)/gi;t.updateOffset=function(){};var Nn=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,zn=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Lt.fn=kt.prototype;var Rn=Ut(1,"add"),An=Ut(-1,"subtract");t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ln=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Oi("gggg","weekYear"),Oi("ggggg","weekYear"),Oi("GGGG","isoWeekYear"),Oi("GGGGG","isoWeekYear"),j("weekYear","gg"),j("isoWeekYear","GG"),R("weekYear",1),R("isoWeekYear",1),Q("G",Vo),Q("g",Vo),Q("GG",Ro,Io),Q("gg",Ro,Io),Q("GGGG",Wo,No),Q("gggg",Wo,No),Q("GGGGG",Yo,zo),Q("ggggg",Yo,zo),ie(["gggg","ggggg","GGGG","GGGGG"],function(e,t,i,o){t[o.substr(0,2)]=_(e)}),ie(["gg","GG"],function(e,i,o,n){i[n]=t.parseTwoDigitYear(e)}),q("Q",0,"Qo","quarter"),j("quarter","Q"),R("quarter",7),Q("Q",Fo),te("Q",function(e,t){t[$o]=3*(_(e)-1)}),q("D",["DD",2],"Do","date"),j("date","D"),R("date",9),Q("D",Ro),Q("DD",Ro,Io),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),te(["D","DD"],en),te("Do",function(e,t){t[en]=_(e.match(Ro)[0],10)});var Hn=L("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),j("dayOfYear","DDD"),R("dayOfYear",4),Q("DDD",Ho),Q("DDDD",jo),te(["DDD","DDDD"],function(e,t,i){i._dayOfYear=_(e)}),q("m",["mm",2],0,"minute"),j("minute","m"),R("minute",14),Q("m",Ro),Q("mm",Ro,Io),te(["m","mm"],on);var Wn=L("Minutes",!1);q("s",["ss",2],0,"second"),j("second","s"),R("second",15),Q("s",Ro),Q("ss",Ro,Io),te(["s","ss"],nn);var Yn=L("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),j("millisecond","ms"),R("millisecond",16),Q("S",Ho,Fo),Q("SS",Ho,Io),Q("SSS",Ho,jo);var Un;for(Un="SSSS";Un.length<=9;Un+="S")Q(Un,Uo);for(Un="S";Un.length<=9;Un+="S")te(Un,Fi);var Vn=L("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var qn=g.prototype;qn.add=Rn,qn.calendar=Gt,qn.clone=Xt,qn.diff=ti,qn.endOf=fi,qn.format=si,qn.from=ri,qn.fromNow=ai,qn.to=hi,qn.toNow=di,qn.get=Y,qn.invalidAt=ki,qn.isAfter=Kt,qn.isBefore=Zt,qn.isBetween=Qt,qn.isSame=Jt,qn.isSameOrAfter=$t,qn.isSameOrBefore=ei,qn.isValid=_i,qn.lang=Ln,qn.locale=li,qn.localeData=ci,qn.max=Fn,qn.min=Bn,qn.parsingFlags=wi,qn.set=U,qn.startOf=ui,qn.subtract=An,qn.toArray=gi,qn.toObject=bi,qn.toDate=yi,qn.toISOString=ni,qn.toJSON=mi,qn.toString=oi,qn.unix=vi,qn.valueOf=pi,qn.creationData=xi,qn.year=fn,qn.isLeapYear=ge,qn.weekYear=Ei,qn.isoWeekYear=Mi,qn.quarter=qn.quarters=Pi,qn.month=le,qn.daysInMonth=ce,qn.week=qn.weeks=Ce,qn.isoWeek=qn.isoWeeks=Se,qn.weeksInYear=Si,qn.isoWeeksInYear=Ci,qn.date=Hn,qn.day=qn.days=Ne,qn.weekday=ze,qn.isoWeekday=Re,qn.dayOfYear=Bi,qn.hour=qn.hours=xn,qn.minute=qn.minutes=Wn,qn.second=qn.seconds=Yn,qn.millisecond=qn.milliseconds=Vn,qn.utcOffset=Dt,qn.utc=Pt,qn.local=Bt,qn.parseZone=Ft,qn.hasAlignedHourOffset=It,qn.isDST=jt,qn.isLocal=zt,qn.isUtcOffset=Rt,qn.isUtc=At,qn.isUTC=At,qn.zoneAbbr=Ii,qn.zoneName=ji,qn.dates=x("dates accessor is deprecated. Use date instead.",Hn),qn.months=x("months accessor is deprecated. Use month instead",le),qn.years=x("years accessor is deprecated. Use year instead",fn),qn.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Tt),qn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Nt);var Gn=qn,Xn=S.prototype;Xn.calendar=D,Xn.longDateFormat=T,Xn.invalidDate=P,Xn.ordinal=B,Xn.preparse=Ri,Xn.postformat=Ri,Xn.relativeTime=F,Xn.pastFuture=I,Xn.set=M,Xn.months=se,Xn.monthsShort=re,Xn.monthsParse=he,Xn.monthsRegex=fe,Xn.monthsShortRegex=ue,Xn.week=Oe,Xn.firstDayOfYear=Me,Xn.firstDayOfWeek=Ee,Xn.weekdays=Pe,Xn.weekdaysMin=Fe,Xn.weekdaysShort=Be,Xn.weekdaysParse=je,Xn.weekdaysRegex=Ae,Xn.weekdaysShortRegex=Le,Xn.weekdaysMinRegex=He,Xn.isPM=Ge,Xn.meridiem=Xe,Je("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,i=1===_(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+i}}),t.lang=x("moment.lang is deprecated. Use moment.locale instead.",Je),t.langData=x("moment.langData is deprecated. Use moment.localeData instead.",tt);var Kn=Math.abs,Zn=oo("ms"),Qn=oo("s"),Jn=oo("m"),$n=oo("h"),es=oo("d"),ts=oo("w"),is=oo("M"),os=oo("y"),ns=so("milliseconds"),ss=so("seconds"),rs=so("minutes"),as=so("hours"),hs=so("days"),ds=so("months"),ls=so("years"),cs=Math.round,us={s:45,m:45,h:22,d:26,M:11},fs=Math.abs,ps=kt.prototype;ps.abs=Gi,ps.add=Ki,ps.subtract=Zi,ps.as=to,ps.asMilliseconds=Zn,ps.asSeconds=Qn,ps.asMinutes=Jn,ps.asHours=$n,ps.asDays=es,ps.asWeeks=ts,ps.asMonths=is,ps.asYears=os,ps.valueOf=io,ps._bubble=Ji,ps.get=no,ps.milliseconds=ns,ps.seconds=ss,ps.minutes=rs,ps.hours=as,ps.days=hs,ps.weeks=ro,ps.months=ds,ps.years=ls,ps.humanize=uo,ps.toISOString=fo,ps.toString=fo,ps.toJSON=fo,ps.locale=li,ps.localeData=ci,ps.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",fo),ps.lang=Ln,q("X",0,0,"unix"),q("x",0,0,"valueOf"),Q("x",Vo),Q("X",Xo),te("X",function(e,t,i){i._d=new Date(1e3*parseFloat(e,10))}),te("x",function(e,t,i){i._d=new Date(_(e))}),t.version="2.15.2",i(bt),t.fn=Gn,t.min=_t,t.max=wt,t.now=In,t.utc=l,t.unix=Ni,t.months=Wi,t.isDate=r,t.locale=Je,t.invalid=p,t.duration=Lt,t.isMoment=b,t.weekdays=Ui,t.parseZone=zi,t.localeData=tt,t.isDuration=xt,t.monthsShort=Yi,t.weekdaysMin=qi,t.defineLocale=$e,t.updateLocale=et,t.locales=it,t.weekdaysShort=Vi,t.normalizeUnits=N,t.relativeTimeRounding=lo,t.relativeTimeThreshold=co,t.calendarFormat=qt,t.prototype=Gn;var vs=t;return vs})}).call(t,i(4)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t){function i(e){throw new Error("Cannot find module '"+e+"'.")}i.keys=function(){return[]},i.resolve=i,e.exports=i,i.id=5},function(e,t){(function(t){function i(e,t,i){var o=t&&i||0,n=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){n<16&&(t[o+n++]=c[e])});n<16;)t[o+n++]=0;return t}function o(e,t){var i=t||0,o=l;return o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+"-"+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]+o[e[i++]]}function n(e,t,i){var n=t&&i||0,s=t||[];e=e||{};var r=void 0!==e.clockseq?e.clockseq:v,a=void 0!==e.msecs?e.msecs:(new Date).getTime(),h=void 0!==e.nsecs?e.nsecs:g+1,d=a-y+(h-g)/1e4;if(d<0&&void 0===e.clockseq&&(r=r+1&16383),(d<0||a>y)&&void 0===e.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y=a,g=h,v=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l; +var c=a/4294967296*1e4&268435455;s[n++]=c>>>8&255,s[n++]=255&c,s[n++]=c>>>24&15|16,s[n++]=c>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var u=e.node||p,f=0;f<6;f++)s[n+f]=u[f];return t?t:o(s)}function s(e,t,i){var n=t&&i||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var s=e.random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;a++)t[n+a]=s[a];return t||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof t?t:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var e,t=0;t<16;t++)0===(3&t)&&(e=4294967296*Math.random()),d[t]=e>>>((3&t)<<3)&255;return d}}for(var l=[],c={},u=0;u<256;u++)l[u]=(u+256).toString(16).substr(1),c[l[u]]=u;var f=r(),p=[1|f[0],f[1],f[2],f[3],f[4],f[5]],v=16383&(f[6]<<8|f[7]),y=0,g=0,b=s;b.v1=n,b.v4=s,b.parse=i,b.unparse=o,e.exports=b}).call(t,function(){return this}())},function(e,t){t.prepareElements=function(e){for(var t in e)e.hasOwnProperty(t)&&(e[t].redundant=e[t].used,e[t].used=[])},t.cleanupElements=function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t].redundant){for(var i=0;i0?(o=t[e].redundant[0],t[e].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",e),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",e),t[e]={used:[],redundant:[]},i.appendChild(o)),t[e].used.push(o),o},t.getDOMElement=function(e,t,i,o){var n;return t.hasOwnProperty(e)?t[e].redundant.length>0?(n=t[e].redundant[0],t[e].redundant.shift()):(n=document.createElement(e),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(e),t[e]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),t[e].used.push(n),n},t.drawPoint=function(e,i,o,n,s,r){var a;if("circle"==o.style?(a=t.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",e),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=t.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",e-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=t.getSVGElement("text",n,s);r.xOffset&&(e+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",e),h.setAttributeNS(null,"y",i)}return a},t.drawBar=function(e,i,o,n,s,r,a,h){if(0!=n){n<0&&(n*=-1,i-=n);var d=t.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",e-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(e,t,i){function o(e,t){if(e&&!Array.isArray(e)&&(t=e,e=null),this._options=t||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;on?1:or)&&(s=h,r=d)}return s},o.prototype.min=function(e){var t,i,o=this._data,n=Object.keys(o),s=null,r=null;for(t=0,i=n.length;tthis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var e=this;this._timeout=setTimeout(function(){e.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var e=this._queue.shift();e.fn.apply(e.context||e.fn,e.args||[])}},e.exports=i},function(e,t,i){function o(e,t){this._data=null,this._ids={},this.length=0,this._options=t||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(e)}var n=i(1),s=i(8);o.prototype.setData=function(e){var t,i,o,n,s;if(this._data){for(this._data.off&&this._data.off("*",this.listener),t=this._data.getIds({filter:this._options&&this._options.filter}),s=[],o=0,n=t.length;o0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,t={},t.color=this.groups[this.groupsArray[i]],this.groups[e]=t}else{var o=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,t={},t.color=this.defaultGroups[o],this.groups[e]=t}return t}},{key:"add",value:function(e,t){return this.groups[e]=t,this.groupsArray.push(e),t}}]),e}();t.default=r},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i1&&void 0!==arguments[1]&&arguments[1],o=this.body.data.nodes;if(e instanceof c||e instanceof u)this.body.data.nodes=e;else if(Array.isArray(e))this.body.data.nodes=new c,this.body.data.nodes.add(e);else{if(e)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new c}o&&l.forEach(this.nodesListeners,function(e,t){o.off(t,e)}),this.body.nodes={},this.body.data.nodes&&!function(){var e=t;l.forEach(t.nodesListeners,function(t,i){e.body.data.nodes.on(i,t)});var i=t.body.data.nodes.getIds();t.add(i,!0)}(),i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:a.default;return new t(e,this.body,this.images,this.groups,this.options)}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.body.nodes;for(var i in t){var o=void 0;t.hasOwnProperty(i)&&(o=t[i]);var n=this.body.data.nodes._data[i];void 0!==o&&void 0!==n&&(e===!0&&o.setOptions({x:null,y:null}),o.setOptions({fixed:!1}),o.setOptions(n))}}},{key:"getPositions",value:function(e){var t={};if(void 0!==e){if(Array.isArray(e)===!0){for(var i=0;ie.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"parseOptions",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=["color","font","fixed","shadow"];if(z.selectiveNotDeepExtend(n,e,t,i),z.mergeOptions(e,t,"shadow",i,o),void 0!==t.color&&null!==t.color){var s=z.parseColor(t.color);z.fillIfDefined(e.color,s)}else i===!0&&null===t.color&&(e.color=z.bridgeObject(o.color));void 0!==t.fixed&&null!==t.fixed&&("boolean"==typeof t.fixed?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(void 0!==t.fixed.x&&"boolean"==typeof t.fixed.x&&(e.fixed.x=t.fixed.x),void 0!==t.fixed.y&&"boolean"==typeof t.fixed.y&&(e.fixed.y=t.fixed.y))),void 0!==t.font&&null!==t.font?a.default.parseOptions(e.font,t):i===!0&&null===t.font&&(e.font=z.bridgeObject(o.font)),void 0!==t.scaling&&z.mergeOptions(e.scaling,t.scaling,"label",i,o.scaling)}}]),e}();t.default=R},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){n=!0,s=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),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=function(){function e(e,t){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2];o(this,e),this.body=t,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(i),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}return r(e,[{key:"setOptions",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.nodeOptions=t,this.fontOptions=a.deepExtend({},t.font,!0),void 0!==t.label&&(this.labelDirty=!0),void 0!==t.font&&(e.parseOptions(this.fontOptions,t,i),"string"==typeof t.font?this.baseSize=this.fontOptions.size:"object"===s(t.font)&&void 0!==t.font.size&&(this.baseSize=t.font.size))}},{key:"draw",value:function(e,t,i,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"middle";if(void 0!==this.nodeOptions.label){var s=this.fontOptions.size*this.body.view.scale;this.nodeOptions.label&&s4&&void 0!==arguments[4]?arguments[4]:"middle",r=this.fontOptions.size,a=r*this.body.view.scale;a>=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);var h=this.size.yLine,d=this._getColor(a),l=n(d,2),c=l[0],u=l[1],f=this._setAlignment(e,i,h,s),p=n(f,2);i=p[0],h=p[1],e.font=(t&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,e.fillStyle=c,this.isEdgeLabel||"left"!==this.fontOptions.align?e.textAlign="center":(e.textAlign=this.fontOptions.align,i-=.5*this.size.width),this.fontOptions.strokeWidth>0&&(e.lineWidth=this.fontOptions.strokeWidth,e.strokeStyle=u,e.lineJoin="round");for(var v=0;v0&&e.strokeText(this.lines[v],i,h),e.fillText(this.lines[v],i,h),h+=r}},{key:"_setAlignment",value:function(e,t,i,o){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){t=0,i=0;var n=2;"top"===this.fontOptions.align?(e.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(e.textBaseline="hanging",i+=2*n):e.textBaseline="middle"}else e.textBaseline=o;return[t,i]}},{key:"_getColor",value:function(e){var t=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(e<=this.nodeOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-e)));t=a.overrideOpacity(t,o),i=a.overrideOpacity(i,o)}return[t,i]}},{key:"getTextSize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={width:this._processLabel(e,t),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};return i}},{key:"calculateLabelSize",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"middle";this.labelDirty===!0&&(this.size.width=this._processLabel(e,t)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(e,t){var i=0,o=[""],n=0;if(void 0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,e.font=(t&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=e.measureText(o[0]).width;for(var s=1;si?r:i}}return this.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"==typeof t.font){var o=t.font.split(" ");e.size=o[0].replace("px",""),e.face=o[1],e.color=o[2]}else"object"===s(t.font)&&a.fillIfDefined(e,t.font,i);e.size=Number(e.size)}}]),e}();t.default=h},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),this.updateBoundingBox(t,i,e,o),this.labelModule.draw(e,t,i,o)}},{key:"updateBoundingBox",value:function(e,t,i,o){this.resize(i,o),this.left=e-.5*this.width,this.top=t-.5*this.height;var n=this.options.shapeProperties.borderRadius;this.boundingBox.left=this.left-n,this.boundingBox.top=this.top-n,this.boundingBox.bottom=this.top+this.height+n,this.boundingBox.right=this.left+this.width+n}},{key:"distanceToBorder",value:function(e,t){this.resize(e);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+i}}]),t}(d.default);t.default=l},function(e,t){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;ithis.imageObj.height?(o=this.imageObj.width/this.imageObj.height,t=2*this.options.size*o||this.imageObj.width,i=2*this.options.size||this.imageObj.height):(o=this.imageObj.width&&this.imageObj.height?this.imageObj.height/this.imageObj.width:1,t=2*this.options.size,i=2*this.options.size*o):(t=this.imageObj.width,i=this.imageObj.height),this.width=t,this.height=i,this.radius=.5*this.width}}},{key:"_drawRawCircle",value:function(e,t,i,o,n,s){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;e.lineWidth=Math.min(this.width,h),e.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,e.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,e.circle(t,i,s),this.enableShadow(e),e.fill(),this.disableShadow(e),e.save(),h>0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore()}},{key:"_drawImageAtPosition",value:function(e){if(0!=this.imageObj.width){e.globalAlpha=1,this.enableShadow(e);var t=this.imageObj.width/this.width/this.body.view.scale;if(t>2&&this.options.shapeProperties.interpolation===!0){var i=this.imageObj.width,o=this.imageObj.height,n=document.createElement("canvas");n.width=i,n.height=i;var s=n.getContext("2d");t*=.5,i*=.5,o*=.5,s.drawImage(this.imageObj,0,0,i,o);for(var r=0,a=1;t>2&&a<4;)s.drawImage(n,r,0,i,o,r+i,0,i/2,o/2),r+=i,t*=.5,i*=.5,o*=.5,a+=1;e.drawImage(n,r,0,i,o,this.left,this.top,this.width,this.height)}else e.drawImage(this.imageObj,this.left,this.top,this.width,this.height);this.disableShadow(e)}}},{key:"_drawImageLabel",value:function(e,t,i,o){var n,s=0;if(void 0!==this.height){s=.5*this.height;var r=this.labelModule.getTextSize(e);r.lineCount>=1&&(s+=r.height/2)}n=i+s,this.options.label&&(this.labelOffset=s),this.labelModule.draw(e,t,n,o,"hanging")}}]),t}(d.default);t.default=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),this.updateBoundingBox(t,i,e,o),this.labelModule.draw(e,t,i,o)}},{key:"updateBoundingBox",value:function(e,t,i,o){this.resize(i,o),this.left=e-.5*this.width,this.top=t-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),t}(d.default);t.default=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),void 0!==this.options.label){var l=n+.5*this.height+3;this.labelModule.draw(e,o,l,s,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+3))}}]),t}(d.default);t.default=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),this.updateBoundingBox(t,i,e,o),this.labelModule.draw(e,t,i,o)}},{key:"updateBoundingBox",value:function(e,t,i,o){this.resize(i,o),this.left=e-.5*this.width,this.top=t-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(e,t){this.resize(e);var i=.5*this.width,o=.5*this.height,n=Math.sin(t)*i,s=Math.cos(t)*o;return i*o/Math.sqrt(n*n+s*s)}}]),t}(d.default);t.default=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0){var i=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+i)}}},{key:"_icon",value:function(e,t,i,o){var n=Number(this.options.icon.size);void 0!==this.options.icon.code?(e.font=(o?"bold ":"")+n+"px "+this.options.icon.face,e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e),e.fillText(this.options.icon.code,t,i),this.disableShadow(e)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),t}(d.default);t.default=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(this.enableBorderDashes(e),e.stroke(),this.disableBorderDashes(e)),e.restore(),e.closePath()}this._drawImageAtPosition(e),this._drawImageLabel(e,t,i,o||n),this.updateBoundingBox(t,i)}},{key:"updateBoundingBox",value:function(e,t){this.resize(),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.top=this.top,this.boundingBox.left=this.left,this.boundingBox.right=this.left+this.width,this.boundingBox.bottom=this.top+this.height,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),t}(d.default);t.default=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;is.distance?console.log('%cUnknown option detected: "'+t+'" in '+e.printLocation(n.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+e.printLocation(s.path,s.closestMatch,""),d):n.distance<=r?console.log('%cUnknown option detected: "'+t+'". Did you mean "'+n.closestMatch+'"?'+e.printLocation(n.path,t),d):console.log('%cUnknown option detected: "'+t+'". Did you mean one of these: '+e.print(Object.keys(i))+e.printLocation(o,t),d),a=!0}},{key:"findInOptions",value:function(t,i,o){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,a="",h=[],d=t.toLowerCase(),l=void 0;for(var c in i){var u=void 0;if(void 0!==i[c].__type__&&n===!0){var f=e.findInOptions(t,i[c],r.copyAndExtendArray(o,c));s>f.distance&&(a=f.closestMatch,h=f.path,s=f.distance,l=f.indexMatch)}else c.toLowerCase().indexOf(d)!==-1&&(l=c),u=e.levenshteinDistance(t,c),s>u&&(a=c,h=r.copyArray(o),s=u)}return{closestMatch:a,path:h,distance:s,indexMatch:l}}},{key:"printLocation",value:function(e,t){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",o="\n\n"+i+"options = {\n",n=0;n1&&void 0!==arguments[1]&&arguments[1],o=this.body.data.edges;if(e instanceof c||e instanceof u)this.body.data.edges=e;else if(Array.isArray(e))this.body.data.edges=new c,this.body.data.edges.add(e);else{if(e)throw new TypeError("Array or DataSet expected");this.body.data.edges=new c}if(o&&l.forEach(this.edgesListeners,function(e,t){o.off(t,e)}),this.body.edges={},this.body.data.edges){l.forEach(this.edgesListeners,function(e,i){t.body.data.edges.on(i,e)});var n=this.body.data.edges.getIds();this.add(n,!0)}i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.edges,o=this.body.data.edges,n=0;ni.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),s=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(e,s.x,s.y,n)}}}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=10,i=this.from.x,o=this.from.y,n=this.to.x,s=this.to.y,r=e.left,a=e.top,h=this.edgeType.getDistanceToEdge(i,o,n,s,r,a);return h0&&i<0)&&(o+=Math.PI),e.rotate(o)}},{key:"_pointOnCircle",value:function(e,t,i,o){var n=2*o*Math.PI;return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}}],[{key:"parseOptions",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=["arrowStrikethrough","id","from","hidden","hoverWidth","label","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width"];if(g.selectiveDeepExtend(n,e,t,i),g.mergeOptions(e,t,"smooth",i,o),g.mergeOptions(e,t,"shadow",i,o),void 0!==t.dashes&&null!==t.dashes?e.dashes=t.dashes:i===!0&&null===t.dashes&&(e.dashes=Object.create(o.dashes)),void 0!==t.scaling&&null!==t.scaling?(void 0!==t.scaling.min&&(e.scaling.min=t.scaling.min),void 0!==t.scaling.max&&(e.scaling.max=t.scaling.max),g.mergeOptions(e.scaling,t.scaling,"label",i,o.scaling)):i===!0&&null===t.scaling&&(e.scaling=Object.create(o.scaling)),void 0!==t.arrows&&null!==t.arrows)if("string"==typeof t.arrows){var r=t.arrows.toLowerCase();e.arrows.to.enabled=r.indexOf("to")!=-1,e.arrows.middle.enabled=r.indexOf("middle")!=-1,e.arrows.from.enabled=r.indexOf("from")!=-1}else{if("object"!==s(t.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+JSON.stringify(t.arrows));g.mergeOptions(e.arrows,t.arrows,"to",i,o.arrows),g.mergeOptions(e.arrows,t.arrows,"middle",i,o.arrows),g.mergeOptions(e.arrows,t.arrows,"from",i,o.arrows)}else i===!0&&null===t.arrows&&(e.arrows=Object.create(o.arrows));if(void 0!==t.color&&null!==t.color)if(e.color=g.deepExtend({},e.color,!0),g.isString(t.color))e.color.color=t.color,e.color.highlight=t.color,e.color.hover=t.color,e.color.inherit=!1;else{var a=!1;void 0!==t.color.color&&(e.color.color=t.color.color,a=!0),void 0!==t.color.highlight&&(e.color.highlight=t.color.highlight,a=!0),void 0!==t.color.hover&&(e.color.hover=t.color.hover,a=!0),void 0!==t.color.inherit&&(e.color.inherit=t.color.inherit),void 0!==t.color.opacity&&(e.color.opacity=Math.min(1,Math.max(0,t.color.opacity))),void 0===t.color.inherit&&a===!0&&(e.color.inherit=!1)}else i===!0&&null===t.color&&(e.color=g.bridgeObject(o.color));void 0!==t.font&&null!==t.font?h.default.parseOptions(e.font,t):i===!0&&null===t.font&&(e.font=g.bridgeObject(o.font))}}]),e}();t.default=b},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){n=!0,s=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function e(e,t){for(var i=0;iMath.abs(t)||this.options.smooth.forceDirection===!0||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*e,n=this.to.x+r*e):(o=this.from.y-r*t,s=this.to.y+r*t,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t)}},{key:"_getDistanceToEdge",value:function(e,t,i,o,n,s){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),h=a(r,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(e,t,i,o,n,s,d,l)}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=a(t,2),o=i[0],n=i[1],s=e,r=[];r[0]=Math.pow(1-s,3),r[1]=3*s*Math.pow(1-s,2),r[2]=3*Math.pow(s,2)*(1-s),r[3]=Math.pow(s,3);var h=r[0]*this.fromPoint.x+r[1]*o.x+r[2]*n.x+r[3]*this.toPoint.x,d=r[0]*this.fromPoint.y+r[1]*o.y+r[2]*n.y+r[3]*this.toPoint.y;return{x:h,y:d}}}]),t}(l.default);t.default=c},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&(d=this._getDistanceToLine(p,v,u,f,n,s),h=d2&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),h=10,d=0,l=0,c=1,u=.2,f=this.to,p=!1;for(e.id===this.from.id&&(f=this.from,p=!0);l<=c&&d0&&(h=this._getDistanceToLine(f,p,c,u,n,s),a=ho.shape.height?(t=o.x+.5*o.shape.width,i=o.y-n):(t=o.x+n,i=o.y-.5*o.shape.height),[t,i,n]}},{key:"_pointOnCircle",value:function(e,t,i,o){var n=2*o*Math.PI;return{x:e+i*Math.cos(n),y:t-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(e,t,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=10,d=0,l=this.options.selfReferenceSize,c=void 0,u=void 0,f=void 0,p=void 0,v=void 0,y=.05,g=.5*(s+r);s<=r&&d0?a>0?s=g:r=g:a>0?r=g:s=g,d++;return c.t=g,c}},{key:"getLineWidth",value:function(e,t){return e===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(e,t,i){var o=this.options.color;if(o.inherit!==!1){if("both"===o.inherit&&this.from.id!==this.to.id){var n=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,a=void 0;return s=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(s=r.overrideOpacity(this.from.options.color.border,this.options.color.opacity),a=r.overrideOpacity(this.to.options.color.border,this.options.color.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,a),n}this.colorDirty===!0&&("to"===o.inherit?(this.color.highlight=this.to.options.color.highlight.border,this.color.hover=this.to.options.color.hover.border,this.color.color=r.overrideOpacity(this.to.options.color.border,o.opacity)):(this.color.highlight=this.from.options.color.highlight.border,this.color.hover=this.from.options.color.hover.border,this.color.color=r.overrideOpacity(this.from.options.color.border,o.opacity)))}else this.colorDirty===!0&&(this.color.highlight=o.highlight,this.color.hover=o.hover,this.color.color=r.overrideOpacity(o.color,o.opacity));return this.colorDirty=!1,t===!0?this.color.highlight:i===!0?this.color.hover:this.color.color}},{key:"_circle",value:function(e,t,i,o){this.enableShadow(e),e.beginPath(),e.arc(t,i,o,0,2*Math.PI,!1),e.stroke(),this.disableShadow(e)}},{key:"getDistanceToEdge",value:function(e,t,i,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(e,t,i,o,s,r,a);else{var d=this._getCircleData(),l=n(d,3),c=l[0],u=l[1],f=l[2],p=c-s,v=u-r;h=Math.abs(Math.sqrt(p*p+v*v)-f)}return this.labelModule.size.lefts&&this.labelModule.size.topr?0:h}},{key:"_getDistanceToLine",value:function(e,t,i,o,n,s){var r=i-e,a=o-t,h=r*r+a*a,d=((n-e)*r+(s-t)*a)/h;d>1?d=1:d<0&&(d=0);var l=e+d*r,c=t+d*a,u=l-n,f=c-s;return Math.sqrt(u*u+f*f)}},{key:"getArrowData",value:function(e,t,i,o,s){var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,c=void 0,u=void 0,f=this.getLineWidth(o,s);if("from"===t?(h=this.from,d=this.to,l=.1,c=this.options.arrows.from.scaleFactor,u=this.options.arrows.from.type):"to"===t?(h=this.to,d=this.from,l=-.1,c=this.options.arrows.to.scaleFactor,u=this.options.arrows.to.type):(h=this.to,d=this.from,c=this.options.arrows.middle.scaleFactor,u=this.options.arrows.middle.type),h!=d)if("middle"!==t)if(this.options.smooth.enabled===!0){a=this.findBorderPosition(h,e,{via:i});var p=this.getPoint(Math.max(0,Math.min(1,a.t+l)),i);r=Math.atan2(a.y-p.y,a.x-p.x)}else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.findBorderPosition(h,e);else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.getPoint(.5,i);else{var v=this._getCircleData(e),y=n(v,3),g=y[0],b=y[1],m=y[2];"from"===t?(a=this.findBorderPosition(this.from,e,{x:g,y:b,low:.25,high:.6,direction:-1}),r=a.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===t?(a=this.findBorderPosition(this.from,e,{x:g,y:b,low:.6,high:1,direction:1}),r=a.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI):(a=this._pointOnCircle(g,b,m,.175),r=3.9269908169872414)}var _=15*c+3*f,w=a.x-.9*_*Math.cos(r),k=a.y-.9*_*Math.sin(r),x={x:w,y:k};return{point:a,core:x,angle:r,length:_,type:u}}},{key:"drawArrowHead",value:function(e,t,i,o){e.strokeStyle=this.getColor(e,t,i),e.fillStyle=e.strokeStyle,e.lineWidth=this.getLineWidth(t,i),o.type&&"circle"===o.type.toLowerCase()?e.circleEndpoint(o.point.x,o.point.y,o.angle,o.length):e.arrowEndpoint(o.point.x,o.point.y,o.angle,o.length),this.enableShadow(e),e.fill(),this.disableShadow(e)}},{key:"enableShadow",value:function(e){this.options.shadow.enabled===!0&&(e.shadowColor=this.options.shadow.color,e.shadowBlur=this.options.shadow.size,e.shadowOffsetX=this.options.shadow.x,e.shadowOffsetY=this.options.shadow.y)}},{key:"disableShadow",value:function(e){this.options.shadow.enabled===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}}]),e}();t.default=a},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){n=!0,s=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function e(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:this.via,i=e,o=void 0,n=void 0;if(this.from===this.to){var s=this._getCircleData(this.from),r=a(s,3),h=r[0],d=r[1],l=r[2],c=2*Math.PI*(1-i);o=h+l*Math.sin(c),n=d+l-l*(1-Math.cos(c))}else o=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*t.x+Math.pow(i,2)*this.toPoint.x,n=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*t.y+Math.pow(i,2)*this.toPoint.y;return{x:o,y:n}}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t,this.via)}},{key:"_getDistanceToEdge",value:function(e,t,i,o,n,s){return this._getDistanceToBezierEdge(e,t,i,o,n,s,this.via)}}]),t}(l.default);t.default=c},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i=this.to.y?this.from.x<=this.to.x?(e=this.from.x+i*s,t=this.from.y-i*s):this.from.x>this.to.x&&(e=this.from.x-i*s,t=this.from.y-i*s):this.from.ythis.to.x&&(e=this.from.x-i*s,t=this.from.y+i*s)),"discrete"===o&&(e=nMath.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(e=this.from.x+i*n,t=this.from.y-i*n):this.from.x>this.to.x&&(e=this.from.x-i*n,t=this.from.y-i*n):this.from.ythis.to.x&&(e=this.from.x-i*n,t=this.from.y+i*n)),"discrete"===o&&(t=sMath.abs(this.from.y-this.to.y)&&(e=this.from.x=this.to.y?this.from.x<=this.to.x?(e=this.from.x+i*s,t=this.from.y-i*s,e=this.to.xthis.to.x&&(e=this.from.x-i*s,t=this.from.y-i*s,e=this.to.x>e?this.to.x:e):this.from.ythis.to.x&&(e=this.from.x-i*s,t=this.from.y+i*s,e=this.to.x>e?this.to.x:e)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(e=this.from.x+i*n,t=this.from.y-i*n,t=this.to.y>t?this.to.y:t):this.from.x>this.to.x&&(e=this.from.x-i*n,t=this.from.y-i*n,t=this.to.y>t?this.to.y:t):this.from.ythis.to.x&&(e=this.from.x-i*n,t=this.from.y+i*n,t=this.to.y2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(e,t,i.via)}},{key:"_getDistanceToEdge",value:function(e,t,i,o,n,s){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,i,o,n,s,r)}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=e,o=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*t.x+Math.pow(i,2)*this.toPoint.x,n=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*t.y+Math.pow(i,2)*this.toPoint.y;return{x:o,y:n}}}]),t}(d.default);t.default=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var i=0;i0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,e===!0&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var e=Date.now();this.physicsTick();var t=Date.now()-e;(t<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&setTimeout(function(){e.body.emitter.emit("stabilized",{iterations:t}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsTick",value:function(){if(this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0),this.stabilized===!1){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var e=1.2;this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.calculateForces(),this.moveNodes(),this.revert(),this.timestep=.5*this.timestep,this.calculateForces(),this.moveNodes(),this.calculateForces(),this.moveNodes(),this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/es))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=this.options.maxVelocity?this.options.maxVelocity:1e9,i=0,o=0,n=5,s=0;st?s[e].x>0?t:-t:s[e].x,i.x+=s[e].x*o}else n[e].x=0,s[e].x=0;if(i.options.fixed.y===!1){var h=this.modelOptions.damping*s[e].y,d=(n[e].y-h)/i.options.mass;s[e].y+=d*o,s[e].y=Math.abs(s[e].y)>t?s[e].y>0?t:-t:s[e].y,i.y+=s[e].y*o}else n[e].y=0,s[e].y=0;var l=Math.sqrt(Math.pow(s[e].x,2)+Math.pow(s[e].y,2));return l}},{key:"calculateForces",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve()}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var t in e)e.hasOwnProperty(t)&&e[t].x&&e[t].y&&(this.freezeCache[t]={x:e[t].options.fixed.x,y:e[t].options.fixed.y},e[t].options.fixed.x=!0,e[t].options.fixed.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var t in e)e.hasOwnProperty(t)&&void 0!==this.freezeCache[t]&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;return"number"!=typeof t&&(console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",this.options.stabilization.iterations),t=this.options.stabilization.iterations),0===this.physicsBody.physicsNodeIndices.length?void(this.ready=!0):(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=t,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,void setTimeout(function(){return e._stabilizationBatch()},0))}},{key:"_stabilizationBatch",value:function(){this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0);for(var e=0;this.stabilized===!1&&e0){var e=void 0,t=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(t,i);this.barnesHutTree=n;for(var s=0;s0&&(this._getForceContribution(n.root.children.NW,e),this._getForceContribution(n.root.children.NE,e),this._getForceContribution(n.root.children.SW,e),this._getForceContribution(n.root.children.SE,e))}}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=e.centerOfMass.x-t.x,o=e.centerOfMass.y-t.y,n=Math.sqrt(i*i+o*o),n*e.calcSize>this.thetaInversed?this._calculateForces(n,i,o,t,e):4===e.childrenCount?(this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)):e.children.data.id!=t.id&&this._calculateForces(n,i,o,t,e)}}},{key:"_calculateForces",value:function(e,t,i,o,n){0===e&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&o.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,e-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(e,3),r=t*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(e,t){for(var i=void 0,o=t.length,n=e[t[0]].x,s=e[t[0]].y,r=e[t[0]].x,a=e[t[0]].y,h=1;h0&&(dr&&(r=d),la&&(a=l))}var c=Math.abs(r-n)-Math.abs(a-s);c>0?(s-=.5*c,a+=.5*c):(n+=.5*c,r-=.5*c);var u=1e-5,f=Math.max(u,Math.abs(r-n)),p=.5*f,v=.5*(n+r),y=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:v-p,maxX:v+p,minY:y-p,maxY:y+p},size:f,calcSize:1/f,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var b=0;b0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(e,t){var i=e.mass+t.options.mass,o=1/i;e.centerOfMass.x=e.centerOfMass.x*e.mass+t.x*t.options.mass,e.centerOfMass.x*=o,e.centerOfMass.y=e.centerOfMass.y*e.mass+t.y*t.options.mass,e.centerOfMass.y*=o,e.mass=i;var n=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?e.children.NW.range.maxY>t.y?this._placeInRegion(e,t,"NW"):this._placeInRegion(e,t,"SW"):e.children.NW.range.maxY>t.y?this._placeInRegion(e,t,"NE"):this._placeInRegion(e,t,"SE")}},{key:"_placeInRegion",value:function(e,t,i){switch(e.children[i].childrenCount){case 0:e.children[i].children.data=t,e.children[i].childrenCount=1,this._updateBranchMass(e.children[i],t);break;case 1:e.children[i].children.data.x===t.x&&e.children[i].children.data.y===t.y?(t.x+=this.seededRandom(),t.y+=this.seededRandom()):(this._splitBranch(e.children[i]),this._placeInTree(e.children[i],t));break;case 4:this._placeInTree(e.children[i],t)}}},{key:"_splitBranch",value:function(e){var t=null;1===e.childrenCount&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),null!=t&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*e.size;switch(t){case"NW":i=e.range.minX,o=e.range.minX+r,n=e.range.minY,s=e.range.minY+r;break;case"NE":i=e.range.minX+r,o=e.range.maxX,n=e.range.minY,s=e.range.minY+r;break;case"SW":i=e.range.minX,o=e.range.minX+r,n=e.range.minY+r,s=e.range.maxY;break;case"SE":i=e.range.minX+r,o=e.range.maxX,n=e.range.minY+r,s=e.range.maxY}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){void 0!==this.barnesHutTree&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,i){void 0===i&&(i="#FF0000"),4===e.childrenCount&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=i,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),e}();t.default=n},function(e,t){function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var i=0;i0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=t*r,o[n.id].y=i*r}}}]),t}(d.default);t.default=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});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=function(){function e(e,t){for(var i=0;i=e&&i.push(n.id)}for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(void 0===e.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);for(var i={},o={},n=0;n2&&void 0!==arguments[2])||arguments[2];t=this._checkOptions(t);for(var o=[],n={},s=void 0,r=void 0,a=void 0,d=void 0,l=void 0,c=0;c0&&Object.keys(f).length>0&&v===!0&&o.push({nodes:u,edges:f})}}}for(var m=0;m1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,e,t)}},{key:"clusterBridges",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,e,t)}},{key:"clusterByConnection",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===e)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[e])throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[e];t=this._checkOptions(t,o),void 0===t.clusterNodeProperties.x&&(t.clusterNodeProperties.x=o.x),void 0===t.clusterNodeProperties.y&&(t.clusterNodeProperties.y=o.y),void 0===t.clusterNodeProperties.fixed&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);var n={},s={},r=o.id,a=h.default.cloneOptions(o);n[r]=o;for(var d=0;d-1&&(s[y.id]=y)}this._cluster(n,s,t,i)}},{key:"_createClusterEdges",value:function(e,t,i,o){for(var n=void 0,s=void 0,r=void 0,a=void 0,d=void 0,l=void 0,u=Object.keys(e),f=[],p=0;p0&&void 0!==arguments[0]?arguments[0]:{};return void 0===e.clusterEdgeProperties&&(e.clusterEdgeProperties={}),void 0===e.clusterNodeProperties&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,t,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(0!=Object.keys(e).length&&(1!=Object.keys(e).length||1==i.clusterNodeProperties.allowSingleNodeCluster)){for(var n in e)if(e.hasOwnProperty(n)&&void 0!==this.clusteredNodes[n])return;var s=c.deepExtend({},i.clusterNodeProperties);if(void 0!==i.processProperties){var r=[];for(var a in e)if(e.hasOwnProperty(a)){var d=h.default.cloneOptions(e[a]);r.push(d)}var u=[];for(var f in t)if(t.hasOwnProperty(f)&&"clusterEdge:"!==f.substr(0,12)){var p=h.default.cloneOptions(t[f],"edge");u.push(p)}if(s=i.processProperties(s,r,u),!s)throw new Error("The processProperties function does not return properties!")}void 0===s.id&&(s.id="cluster:"+c.randomUUID());var v=s.id;void 0===s.label&&(s.label="cluster");var y=void 0;void 0===s.x&&(y=this._getClusterPosition(e),s.x=y.x),void 0===s.y&&(void 0===y&&(y=this._getClusterPosition(e)),s.y=y.y),s.id=v;var g=this.body.functions.createNode(s,l.default);g.isCluster=!0,g.containedNodes=e,g.containedEdges=t,g.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[s.id]=g,this._createClusterEdges(e,t,s,i.clusterEdgeProperties);for(var b in t)if(t.hasOwnProperty(b)&&void 0!==this.body.edges[b]){var m=this.body.edges[b];this._backupEdgeOptions(m),m.setOptions({physics:!1,hidden:!0})}for(var _ in e)e.hasOwnProperty(_)&&(this.clusteredNodes[_]={clusterId:s.id,node:this.body.nodes[_]},this.body.nodes[_].setOptions({hidden:!0,physics:!1}));s.id=void 0,o===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(e){void 0===this.clusteredEdges[e.id]&&(this.clusteredEdges[e.id]={physics:e.options.physics,hidden:e.options.hidden})}},{key:"_restoreEdge",value:function(e){var t=this.clusteredEdges[e.id];void 0!==t&&(e.setOptions({physics:t.physics,hidden:t.hidden}),delete this.clusteredEdges[e.id])}},{key:"isCluster",value:function(e){return void 0!==this.body.nodes[e]?this.body.nodes[e].isCluster===!0:(console.log("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(e){for(var t=Object.keys(e),i=e[t[0]].x,o=e[t[0]].x,n=e[t[0]].y,s=e[t[0]].y,r=void 0,a=1;ao?r.x:o,n=r.ys?r.y:s;return{x:.5*(i+o),y:.5*(n+s)}}},{key:"openCluster",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===e)throw new Error("No clusterNodeId supplied to openCluster.");if(void 0===this.body.nodes[e])throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(void 0===this.body.nodes[e].containedNodes)return void console.log("The node:"+e+" is not a cluster.");var o=this.body.nodes[e],n=o.containedNodes,s=o.containedEdges;if(void 0!==t&&void 0!==t.releaseFunction&&"function"==typeof t.releaseFunction){var r={},a={x:o.x,y:o.y};for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];r[d]={x:l.x,y:l.y}}var u=t.releaseFunction(a,r);for(var f in n)if(n.hasOwnProperty(f)){var p=this.body.nodes[f];void 0!==u[f]&&(p.x=void 0===u[f].x?o.x:u[f].x,p.y=void 0===u[f].y?o.y:u[f].y)}}else for(var v in n)if(n.hasOwnProperty(v)){var y=this.body.nodes[v];y=n[v],y.options.fixed.x===!1&&(y.x=o.x),y.options.fixed.y===!1&&(y.y=o.y)}for(var g in n)if(n.hasOwnProperty(g)){var b=this.body.nodes[g];b.vx=o.vx,b.vy=o.vy,b.setOptions({hidden:!1,physics:!0}),delete this.clusteredNodes[g]}for(var m=[],_=0;_o&&(o=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),i+=1}e/=i,t/=i;var r=t-Math.pow(e,2),a=Math.sqrt(r),h=Math.floor(e+2*a);return h>o&&(h=o),h}}]),e}();t.default=u},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:[],o=1e9,n=-1e9,s=1e9,r=-1e9;if(i.length>0)for(var a=0;at.shape.boundingBox.left&&(s=t.shape.boundingBox.left),rt.shape.boundingBox.top&&(o=t.shape.boundingBox.top),n1&&void 0!==arguments[1]?arguments[1]:[],o=1e9,n=-1e9,s=1e9,r=-1e9;if(i.length>0)for(var a=0;at.x&&(s=t.x),rt.y&&(o=t.y),n0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(void 0!==e){var t=["hideEdgesOnDrag","hideNodesOnDrag"];s.selectiveDeepExtend(t,this.options,e)}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&void 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.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(function(){e._redraw(!1)},0):window.requestAnimationFrame(function(){e._redraw(!1)}))}},{key:"_redraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var t=this.canvas.frame.canvas.getContext("2d");0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(t.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale),t.beginPath(),this.body.emitter.emit("beforeDrawing",t),t.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&this._drawEdges(t),(this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1)&&this._drawNodes(t,e),t.beginPath(),this.body.emitter.emit("afterDrawing",t),t.closePath(),t.restore(),e===!0&&t.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){var e=this.canvas.frame.canvas.getContext("2d");void 0===this.pixelRatio&&(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),e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);var t=this.body.nodes,i=void 0;for(var o in t)t.hasOwnProperty(o)&&(i=t[o],i.resize(e),i.updateBoundingBox(e,i.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=20,a=this.canvas.DOMtoCanvas({x:-r,y:-r}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+r,y:this.canvas.frame.canvas.clientHeight+r}),d={top:a.y,left:a.x,bottom:h.y,right:h.x},l=0;l0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=e&&1!=t?i=.5*this.cameraState.scale*(e+t):1!=e?i=this.cameraState.scale*e:1!=t&&(i=this.cameraState.scale*t),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if("number"==typeof e)return e+"px";if("string"==typeof e){if(e.indexOf("%")!==-1||e.indexOf("px")!==-1)return e;if(e.indexOf("%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext){var e=this.frame.canvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.frame.canvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var e=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:s.DIRECTION_ALL}),r.onTouch(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("mousewheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new s(this.frame),r.onRelease(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.frame.canvas.getContext("2d"),r=this.pixelRatio;return this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t?(this._getCameraState(r),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0):(this.frame.canvas.width==Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&this.frame.canvas.height==Math.round(this.frame.canvas.clientHeight*this.pixelRatio)||this._getCameraState(r),this.frame.canvas.width!=Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&(this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=!0),this.frame.canvas.height!=Math.round(this.frame.canvas.clientHeight*this.pixelRatio)&&(this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),i=!0)),i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),e}();t.default=h},function(e,t,i){if("undefined"!=typeof window){var o=i(59),n=window.Hammer||i(60);e.exports=o(n,{preventDefault:"mouse"})}else e.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(e,t,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(t,n):o,!(void 0!==s&&(e.exports=s))}(function(){var e=null;return function t(i,o){function n(e){return e.match(/[^ ]+/g)}function s(t){if("hammer.input"!==t.type){if(t.srcEvent._handled||(t.srcEvent._handled={}),t.srcEvent._handled[t.type])return;t.srcEvent._handled[t.type]=!0}var i=!1;t.stopPropagation=function(){i=!0};var o=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof o&&(t.srcEvent.stopPropagation=function(){o(),t.stopPropagation()}),t.firstTarget=e;for(var n=e;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[e]=o:(i.off(e,s),delete d._handlers[e]))}),d},d.emit=function(t,o){e=o.target,i.emit(t,o)},d.destroy=function(){var e=i.element.hammer,t=e.indexOf(d);t!==-1&&e.splice(t,1),e.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(e,t,i){var o;/*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * - * Copyright (c) 2015 Jorik Tangelder; - * Licensed under the license */ -!function(n,s,r,a){function h(e,t,i){return setTimeout(f(e,i),t)}function d(e,t,i){return Array.isArray(e)?(l(e,i[t],i),!0):!1}function l(e,t,i){var o;if(e)if(e.forEach)e.forEach(t,i);else if(e.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),e.apply(this,arguments)}}function u(e,t,i){var o,n=t.prototype;o=e.prototype=Object.create(n),o.constructor=e,o._super=n,i&&ce(o,i)}function f(e,t){return function(){return e.apply(t,arguments)}}function p(e,t){return typeof e==pe?e.apply(t?t[0]||a:a,t):e}function v(e,t){return e===a?t:e}function y(e,t,i){l(_(t),function(t){e.addEventListener(t,i,!1)})}function g(e,t,i){l(_(t),function(t){e.removeEventListener(t,i,!1)})}function b(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function m(e,t){return e.indexOf(t)>-1}function _(e){return e.trim().split(/\s+/g)}function w(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var o=0;oi[t]}):o.sort()),o}function O(e,t){for(var i,o,n=t[0].toUpperCase()+t.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=F(t):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=t.center=I(o);t.timeStamp=ge(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=R(a,h),t.distance=z(a,h),P(i,t),t.offsetDirection=N(t.deltaX,t.deltaY);var d=j(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=ye(d.x)>ye(d.y)?d.x:d.y,t.scale=r?L(r.pointers,o):1,t.rotation=r?A(r.pointers,o):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,B(i,t);var l=e.element;b(t.srcEvent.target,l)&&(l=t.srcEvent.target),t.target=l}function P(e,t){var i=t.center,o=e.offsetDelta||{},n=e.prevDelta||{},s=e.prevInput||{};t.eventType!==Te&&s.eventType!==Be||(n=e.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=n.x+(i.x-o.x),t.deltaY=n.y+(i.y-o.y)}function B(e,t){var i,o,n,s,r=e.lastInterval||t,h=t.timeStamp-r.timeStamp;if(t.eventType!=Fe&&(h>Ce||r.velocity===a)){var d=t.deltaX-r.deltaX,l=t.deltaY-r.deltaY,c=j(h,d,l);o=c.x,n=c.y,i=ye(c.x)>ye(c.y)?c.x:c.y,s=N(d,l),e.lastInterval=t}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;t.velocity=i,t.velocityX=o,t.velocityY=n,t.direction=s}function F(e){for(var t=[],i=0;in;)i+=e[n].clientX,o+=e[n].clientY,n++;return{x:ve(i/t),y:ve(o/t)}}function j(e,t,i){return{x:t/e||0,y:i/e||0}}function N(e,t){return e===t?Ie:ye(e)>=ye(t)?0>e?je:Ne:0>t?ze:Re}function z(e,t,i){i||(i=We);var o=t[i[0]]-e[i[0]],n=t[i[1]]-e[i[1]];return Math.sqrt(o*o+n*n)}function R(e,t,i){i||(i=We);var o=t[i[0]]-e[i[0]],n=t[i[1]]-e[i[1]];return 180*Math.atan2(n,o)/Math.PI}function A(e,t){return R(t[1],t[0],Ye)+R(e[1],e[0],Ye)}function L(e,t){return z(t[0],t[1],Ye)/z(e[0],e[1],Ye)}function H(){this.evEl=Ve,this.evWin=qe,this.allow=!0,this.pressed=!1,D.apply(this,arguments)}function W(){this.evEl=Ke,this.evWin=Ze,D.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=Je,this.evWin=$e,this.started=!1,D.apply(this,arguments)}function U(e,t){var i=k(e.touches),o=k(e.changedTouches);return t&(Be|Fe)&&(i=x(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=tt,this.targetIds={},D.apply(this,arguments)}function q(e,t){var i=k(e.touches),o=this.targetIds;if(t&(Te|Pe)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=k(e.changedTouches),a=[],h=this.target;if(s=i.filter(function(e){return b(e.target,h)}),t===Te)for(n=0;na&&(t.push(e),a=t.length-1):n&(Be|Fe)&&(i=!0),0>a||(t[a]=e,this.callback(this.manager,n,{pointers:t,changedPointers:[e],pointerType:s,srcEvent:e}),i&&t.splice(a,1))}});var Qe={touchstart:Te,touchmove:Pe,touchend:Be,touchcancel:Fe},Je="touchstart",$e="touchstart touchmove touchend touchcancel";u(Y,D,{handler:function(e){var t=Qe[e.type];if(t===Te&&(this.started=!0),this.started){var i=U.call(this,e,t);t&(Be|Fe)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:Ee,srcEvent:e})}}});var et={touchstart:Te,touchmove:Pe,touchend:Be,touchcancel:Fe},tt="touchstart touchmove touchend touchcancel";u(V,D,{handler:function(e){var t=et[e.type],i=q.call(this,e,t);i&&this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:Ee,srcEvent:e})}}),u(G,D,{handler:function(e,t,i){var o=i.pointerType==Ee,n=i.pointerType==De;if(o)this.mouse.allow=!1;else if(n&&!this.mouse.allow)return;t&(Be|Fe)&&(this.mouse.allow=!0),this.callback(e,t,i)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var it=O(fe.style,"touchAction"),ot=it!==a,nt="compute",st="auto",rt="manipulation",at="none",ht="pan-x",dt="pan-y";X.prototype={set:function(e){e==nt&&(e=this.compute()),ot&&this.manager.element.style&&(this.manager.element.style[it]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return l(this.manager.recognizers,function(t){p(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),K(e.join(" "))},preventDefaults:function(e){if(!ot){var t=e.srcEvent,i=e.offsetDirection;if(this.manager.session.prevented)return void t.preventDefault();var o=this.actions,n=m(o,at),s=m(o,dt),r=m(o,ht);if(n){var a=1===e.pointers.length,h=e.distance<2,d=e.deltaTime<250;if(a&&h&&d)return}if(!r||!s)return n||s&&i&Ae||r&&i&Le?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var lt=1,ct=2,ut=4,ft=8,pt=ft,vt=16,yt=32;Z.prototype={defaults:{},set:function(e){return ce(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(d(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=$(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return d(e,"dropRecognizeWith",this)?this:(e=$(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(d(e,"requireFailure",this))return this;var t=this.requireFail;return e=$(e,this),-1===w(t,e)&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(d(e,"dropRequireFailure",this))return this;e=$(e,this);var t=w(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){i.manager.emit(t,e)}var i=this,o=this.state;ft>o&&t(i.options.event+Q(o)),t(i.options.event),e.additionalEvent&&t(e.additionalEvent),o>=ft&&t(i.options.event+Q(o))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=yt)},canEmit:function(){for(var e=0;es?je:Ne,i=s!=this.pX,o=Math.abs(e.deltaX)):(n=0===r?Ie:0>r?ze:Re,i=r!=this.pY,o=Math.abs(e.deltaY))),e.direction=n,i&&o>t.threshold&&n&t.direction},attrTest:function(e){return ee.prototype.attrTest.call(this,e)&&(this.state&ct||!(this.state&ct)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=J(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),u(ie,ee,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[at]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&ct)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),u(oe,Z,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[st]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,o=e.distancet.time;if(this._input=e,!o||!i||e.eventType&(Be|Fe)&&!n)this.reset();else if(e.eventType&Te)this.reset(),this._timer=h(function(){this.state=pt,this.tryEmit()},t.time,this);else if(e.eventType&Be)return pt;return yt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===pt&&(e&&e.eventType&Be?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=ge(),this.manager.emit(this.options.event,this._input)))}}),u(ne,ee,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[at]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&ct)}}),u(se,ee,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ae|Le,pointers:1},getTouchAction:function(){return te.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return i&(Ae|Le)?t=e.overallVelocity:i&Ae?t=e.overallVelocityX:i&Le&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&ye(t)>this.options.velocity&&e.eventType&Be},emit:function(e){var t=J(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),u(re,Z,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[rt]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,o=e.distance.5*this.body.nodeIndices.length)return void this.fit(e,!1);i=a["default"].getRange(this.body.nodes,e.nodes);var h=this.body.nodeIndices.length;o=12.662/(h+7.4147)+.0964822;var d=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),i=a["default"].getRange(this.body.nodes,e.nodes);var l=1.1*Math.abs(i.maxX-i.minX),c=1.1*Math.abs(i.maxY-i.minY),u=this.canvas.frame.canvas.clientWidth/l,f=this.canvas.frame.canvas.clientHeight/c;o=f>=u?u:f}o>1?o=1:0===o&&(o=1);var p=a["default"].findCenter(i),v={position:p,scale:o,animation:e.animation};this.moveTo(v)}},{key:"focus",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(void 0!==this.body.nodes[e]){var i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.log("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){return void 0===e?void(e={}):(void 0===e.offset&&(e.offset={x:0,y:0}),void 0===e.offset.x&&(e.offset.x=0),void 0===e.offset.y&&(e.offset.y=0),void 0===e.scale&&(e.scale=this.body.view.scale),void 0===e.position&&(e.position=this.getViewPosition()),void 0===e.animation&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),void 0===e.animation.duration&&(e.animation.duration=1e3),void 0===e.animation.easingFunction&&(e.animation.easingFunction="easeInOutQuad"),void this.animateView(e))}},{key:"animateView",value:function(e){if(void 0!==e){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;var t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},0===e.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var t=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),e}();t["default"]=d},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(e){var t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,e,i),this.selectionHandler._generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler._generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,e,i),this.selectionHandler._generateClickEvent("click",e,t),this.selectionHandler._generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){if((new Date).valueOf()-this.touchTime>10){var t=this.getPointer(e.center);this.selectionHandler._generateClickEvent("release",e,t),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler._generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=this.selectionHandler._getSelectedEdgeCount(),n=this.selectionHandler._getSelectedNodeCount(),s=this.selectionHandler.getSelection(),r=void 0;r=i===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e);var a=this.selectionHandler._getSelectedEdgeCount(),h=this.selectionHandler._getSelectedNodeCount(),d=this.selectionHandler.getSelection(),l=this._determineIfDifferent(s,d),c=l.nodesChanged,u=l.edgesChanged,f=!1;h-n>0?(this.selectionHandler._generateClickEvent("selectNode",t,e),r=!0,f=!0):c===!0&&h>0?(this.selectionHandler._generateClickEvent("deselectNode",t,e,s),this.selectionHandler._generateClickEvent("selectNode",t,e),f=!0,r=!0):0>h-n&&(this.selectionHandler._generateClickEvent("deselectNode",t,e,s),r=!0),a-o>0&&f===!1?(this.selectionHandler._generateClickEvent("selectEdge",t,e),r=!0):a>0&&u===!0?(this.selectionHandler._generateClickEvent("deselectEdge",t,e,s),this.selectionHandler._generateClickEvent("selectEdge",t,e),r=!0):0>a-o&&(this.selectionHandler._generateClickEvent("deselectEdge",t,e,s),r=!0),r===!0&&this.selectionHandler._generateClickEvent("select",t,e)}},{key:"_determineIfDifferent",value:function(e,t){for(var i=!1,o=!1,n=0;ne&&(e=1e-5),e>10&&(e=10);var o=void 0;void 0!==this.drag&&this.drag.dragging===!0&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=e/i,r=(1-s)*t.x+n.x*s,a=(1-s)*t.y+n.y*s;if(this.body.view.scale=e,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),e>i?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}}},{key:"onMouseWheel",value:function(e){if(this.options.zoomView===!0){var t=0;if(e.wheelDelta?t=e.wheelDelta/120:e.detail&&(t=-e.detail/3),0!==t){var i=this.body.view.scale,o=t/10;0>t&&(o/=1-o),i*=1+o;var n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(i,n)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var t=this,i=this.getPointer({x:e.clientX,y:e.clientY}),o=!1;if(void 0!==this.popup&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(o=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),o===!1&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=setTimeout(function(){return t._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0){var n=this.selectionHandler.getNodeAt(i);void 0===n&&(n=this.selectionHandler.getEdgeAt(i)),this.selectionHandler.hoverObject(n)}}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),i=this.canvas._YconvertDOMtoCanvas(e.y),o={left:t,top:i,right:t,bottom:i},n=void 0===this.popupObj?void 0:this.popupObj.id,s=!1,r="node";if(void 0===this.popupObj){for(var a=this.body.nodeIndices,h=this.body.nodes,l=void 0,c=[],u=0;u0&&(this.popupObj=h[c[c.length-1]],s=!0)}if(void 0===this.popupObj&&s===!1){for(var f=this.body.edgeIndices,p=this.body.edges,v=void 0,y=[],g=0;g0&&(this.popupObj=p[y[y.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new d["default"](this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var t=this.selectionHandler._pointerToPositionObject(e),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){var o=this.selectionHandler.getNodeAt(e);i=o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(e)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),e}();t["default"]=c},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)this.boundFunctions.hasOwnProperty(e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){this.body.view.scale*=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale})}},{key:"_zoomOut",value:function(){this.body.view.scale/=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}},{key:"configureKeyboardBindings",value:function(){var e=this;void 0!==this.keycharm&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=a({container:window,preventDefault:!0}):this.keycharm=a({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){e.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){e.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){e.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){e.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){e.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){e.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){e.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){e.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")))}}]),e}();t["default"]=h},function(e,t,i){var o,n,s;!function(i,r){n=[],o=r,s="function"==typeof o?o.apply(t,n):o,!(void 0!==s&&(e.exports=s))}(this,function(){function e(e){var t,i=e&&e.preventDefault||!1,o=e&&e.container||window,n={},s={keydown:{},keyup:{}},r={};for(t=97;122>=t;t++)r[String.fromCharCode(t)]={code:65+(t-97),shift:!1};for(t=65;90>=t;t++)r[String.fromCharCode(t)]={code:t,shift:!0};for(t=0;9>=t;t++)r[""+t]={code:48+t,shift:!1};for(t=1;12>=t;t++)r["F"+t]={code:111+t,shift:!1};for(t=0;9>=t;t++)r["num"+t]={code:96+t,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r["delete"]={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(e){d(e,"keydown")},h=function(e){d(e,"keyup")},d=function(e,t){if(void 0!==s[t][e.keyCode]){for(var o=s[t][e.keyCode],n=0;no&&(s=o-t-this.padding),sn&&(r=n-i-this.padding),r0?t===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var i=this.body.edges,o=0;o0?t===!0?this.body.edges[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_addToSelection",value:function(e){e instanceof a["default"]?this.selectionObj.nodes[e.id]=e:this.selectionObj.edges[e.id]=e}},{key:"_addToHover",value:function(e){e instanceof a["default"]?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){e instanceof a["default"]?(delete this.selectionObj.nodes[e.id],this._unselectConnectedEdges(e)):delete this.selectionObj.edges[e.id]}},{key:"unselectAll",value:function(){for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&this.selectionObj.nodes[e].unselect();for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&this.selectionObj.edges[t].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var e=0;for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(e+=1);return e}},{key:"_getSelectedNode",value:function(){for(var e in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(e))return this.selectionObj.nodes[e]}},{key:"_getSelectedEdge",value:function(){for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return this.selectionObj.edges[e]}},{key:"_getSelectedEdgeCount",value:function(){var e=0;for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&(e+=1);return e}},{key:"_getSelectedObjectCount",value:function(){var e=0;for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&(e+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(e+=1);return e}},{key:"_selectionIsEmpty",value:function(){for(var e in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(e))return!1;for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var e in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(e)&&this.selectionObj.nodes[e].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(e){for(var t=0;t0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(i===!0)return this.body.emitter.emit("refresh"),l.deepExtend(t,this.optionsBackup)}return t}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){void 0===e.physics||e.physics===!0?(e.physics={enabled:void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,solver:"hierarchicalRepulsion"},this.optionsBackup.physics.enabled=void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,this.optionsBackup.physics.solver=this.optionsBackup.physics.solver||"barnesHut"):"object"===r(e.physics)?(this.optionsBackup.physics.enabled=void 0===e.physics.enabled?!0:e.physics.enabled,this.optionsBackup.physics.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(this.optionsBackup.physics.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var t="horizontal";"RL"!==this.options.hierarchical.direction&&"LR"!==this.options.hierarchical.direction||(t="vertical"),void 0===e.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1}):void 0===e.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1):"boolean"==typeof e.edges.smooth?(this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:t}):(void 0!==e.edges.smooth.type&&"dynamic"!==e.edges.smooth.type&&(t=e.edges.smooth.type),this.optionsBackup.edges={smooth:void 0===e.edges.smooth.enabled?!0:e.edges.smooth.enabled,type:void 0===e.edges.smooth.type?"dynamic":e.edges.smooth.type,roundness:void 0===e.edges.smooth.roundness?.5:e.edges.smooth.roundness,forceDirection:void 0===e.edges.smooth.forceDirection?!1:e.edges.smooth.forceDirection},e.edges.smooth={enabled:void 0===e.edges.smooth.enabled?!0:e.edges.smooth.enabled,type:t,roundness:void 0===e.edges.smooth.roundness?.5:e.edges.smooth.roundness,forceDirection:void 0===e.edges.smooth.forceDirection?!1:e.edges.smooth.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",t)}return e}},{key:"seededRandom",value:function(){var e=1e4*Math.sin(this.randomSeed++);return e-Math.floor(e)}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var t=0;ts){for(var r=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;var a=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();var h=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._shiftToCenter();for(var d=70,l=0;l0){var e=void 0,t=void 0,i=!1,o=!0,n=!1;this.hierarchicalLevels={},this.lastNodeOnLevel={},this.hierarchicalChildrenReference={},this.hierarchicalParentReference={},this.hierarchicalTrees={},this.treeIndex=-1,this.distributionOrdering={},this.distributionIndex={},this.distributionOrderingPresence={};for(t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&(e=this.body.nodes[t],void 0===e.options.x&&void 0===e.options.y&&(o=!1),void 0!==e.options.level?(i=!0,this.hierarchicalLevels[t]=e.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes."); -n===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():"directed"===this.options.hierarchical.sortMethod?this._determineLevelsDirected():"custom"===this.options.hierarchical.sortMethod&&this._determineLevelsCustomCallback());for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&void 0===this.hierarchicalLevels[s]&&(this.hierarchicalLevels[s]=0);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,t=!1,i={},o=function(){for(var t=a(),i=0;i0)for(var n=0;n=l&&(r=Math.min(c,r),a=Math.max(c,a))}return[r,a,o,n]},l=function w(t){var i=e.hierarchicalLevels[t];if(e.hierarchicalChildrenReference[t]){var o=e.hierarchicalChildrenReference[t];if(o.length>0)for(var n=0;n1)for(var a=0;ae.options.hierarchical.nodeSpacing){var u={};u[i.id]=!0;var f={};f[o.id]=!0,h(i,u),h(o,f);var p=c(i,o),v=d(u,p),y=s(v,4),g=(y[0],y[1]),b=(y[2],y[3],d(f,p)),m=s(b,4),_=m[0],w=(m[1],m[2]),k=(m[3],Math.abs(g-_));if(k>e.options.hierarchical.nodeSpacing){var x=g-_+e.options.hierarchical.nodeSpacing;x<-w+e.options.hierarchical.nodeSpacing&&(x=-w+e.options.hierarchical.nodeSpacing),0>x&&(e._shiftBlock(o.id,x),t=!0,n===!0&&e._centerParent(o))}}},v=function(o,n){for(var r=n.id,a=n.edges,l=e.hierarchicalLevels[n.id],c=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,u={},f=[],p=0;pr;r++){var a=g(o,i),h=b(o,i),d=40,l=Math.max(-d,Math.min(d,Math.round(a/h)));if(o-=l,void 0!==s[o])break;s[o]=r}return o},_=function(o){var r=e._getPositionForHierarchy(n);if(void 0===i[n.id]){var a={};a[n.id]=!0,h(n,a),i[n.id]=a}var l=d(i[n.id]),c=s(l,4),u=(c[0],c[1],c[2]),f=c[3],p=o-r,v=0;p>0?v=Math.min(p,f-e.options.hierarchical.nodeSpacing):0>p&&(v=-Math.min(-p,u-e.options.hierarchical.nodeSpacing)),0!=v&&(e._shiftBlock(n.id,v),t=!0)},w=function(i){var o=e._getPositionForHierarchy(n),r=e._getSpaceAroundNode(n),a=s(r,2),h=a[0],d=a[1],l=i-o,c=o;l>0?c=Math.min(o+(d-e.options.hierarchical.nodeSpacing),i):0>l&&(c=Math.max(o-(h-e.options.hierarchical.nodeSpacing),i)),c!==o&&(e._setPositionForHierarchy(n,c,void 0,!0),t=!0)},k=m(o,f);_(k),k=m(o,a),w(k)},y=function(i){var o=Object.keys(e.distributionOrdering);o=o.reverse();for(var n=0;i>n;n++){t=!1;for(var s=0;sn&&(t=!1,f(p,o,!0),t===!0);n++);},b=function(){for(var t in e.body.nodes)e.body.nodes.hasOwnProperty(t)&&e._centerParent(e.body.nodes[t])},m=function(){var t=Object.keys(e.distributionOrdering);t=t.reverse();for(var i=0;i0)for(var d=0;dg&&Math.abs(g)0&&Math.abs(g)0&&(r=this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing),this._setPositionForHierarchy(s,r,t),this._validataPositionAndContinue(s,t,r),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){if(void 0!==this.hierarchicalChildrenReference[e]){for(var i=[],o=0;ot&&void 0===this.positionedNodes[s.id]))return;var a=void 0;a=0===n?this._getPositionForHierarchy(this.body.nodes[e]):this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing,this._setPositionForHierarchy(s,a,r),this._validataPositionAndContinue(s,r,a)}for(var h=1e9,d=-1e9,l=0;l0&&(t=this._getHubSize(),0!==t);)for(var o in this.body.nodes)if(this.body.nodes.hasOwnProperty(o)){var n=this.body.nodes[o];n.edges.length===t&&this._crawlNetwork(i,o)}}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,t=1e5,i=function(e,t,i){},o=function(o,n,s){var r=e.hierarchicalLevels[o.id];void 0===r&&(e.hierarchicalLevels[o.id]=t);var a=i(d["default"].cloneOptions(o,"node"),d["default"].cloneOptions(n,"node"),d["default"].cloneOptions(s,"edge"));e.hierarchicalLevels[n.id]=e.hierarchicalLevels[o.id]+a};this._crawlNetwork(o),this._setMinLevelToZero()}},{key:"_determineLevelsDirected",value:function(){var e=this,t=1e4,i=function(i,o,n){var s=e.hierarchicalLevels[i.id];void 0===s&&(e.hierarchicalLevels[i.id]=t),n.toId==o.id?e.hierarchicalLevels[o.id]=e.hierarchicalLevels[i.id]+1:e.hierarchicalLevels[o.id]=e.hierarchicalLevels[i.id]-1};this._crawlNetwork(i),this._setMinLevelToZero()}},{key:"_setMinLevelToZero",value:function(){var e=1e9;for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&void 0!==this.hierarchicalLevels[t]&&(e=Math.min(this.hierarchicalLevels[t],e));for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&void 0!==this.hierarchicalLevels[i]&&(this.hierarchicalLevels[i]-=e)}},{key:"_generateMap",value:function(){var e=this,t=function(t,i){if(e.hierarchicalLevels[i.id]>e.hierarchicalLevels[t.id]){var o=t.id,n=i.id;void 0===e.hierarchicalChildrenReference[o]&&(e.hierarchicalChildrenReference[o]=[]),e.hierarchicalChildrenReference[o].push(n),void 0===e.hierarchicalParentReference[n]&&(e.hierarchicalParentReference[n]=[]),e.hierarchicalParentReference[n].push(o)}};this._crawlNetwork(t)}},{key:"_crawlNetwork",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?function(){}:arguments[0],i=arguments[1],o={},n=0,s=function d(i,n){if(void 0===o[i.id]){void 0===e.hierarchicalTrees[i.id]&&(e.hierarchicalTrees[i.id]=n,e.treeIndex=Math.max(n,e.treeIndex)),o[i.id]=!0;for(var s=void 0,r=0;r1&&("UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?e.sort(function(e,t){return e.x-t.x}):e.sort(function(e,t){return e.y-t.y}))}}]),e}();t["default"]=c},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i0&&this.options.deleteNode!==!1?(n===!0&&this._createSeperator(4),this._createDeleteButton(o)):0===e&&this.options.deleteEdge!==!1&&(n===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler._getSelectedNode();if(void 0!==t){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(t.isCluster!==!0){var i=s.deepExtend({},t.options,!1);if(i.x=t.x,i.y=t.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(t){null!==t&&void 0!==t&&"editNode"===e.inMode&&e.body.data.nodes.getDataSet().update(t),e.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var e=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId?!function(){var t=e.body.edges[e.edgeBeingEditedId],i=e._getNewTargetNode(t.from.x,t.from.y),o=e._getNewTargetNode(t.to.x,t.to.y);e.temporaryIds.nodes.push(i.id),e.temporaryIds.nodes.push(o.id),e.body.nodes[i.id]=i,e.body.nodeIndices.push(i.id),e.body.nodes[o.id]=o,e.body.nodeIndices.push(o.id),e._temporaryBindUI("onTouch",e._controlNodeTouch.bind(e)),e._temporaryBindUI("onTap",function(){}),e._temporaryBindUI("onHold",function(){}),e._temporaryBindUI("onDragStart",e._controlNodeDragStart.bind(e)),e._temporaryBindUI("onDrag",e._controlNodeDrag.bind(e)),e._temporaryBindUI("onDragEnd",e._controlNodeDragEnd.bind(e)),e._temporaryBindUI("onMouseMove",function(){}),e._temporaryBindEvent("beforeDrawing",function(e){var n=t.edgeType.findBorderPositions(e);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),e.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(t.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:t,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(t){null!==t&&void 0!==t&&"delete"===e.inMode?(e.body.data.edges.getDataSet().remove(t.edges),e.body.data.nodes.getDataSet().remove(t.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(e,t){var i=s.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+s.randomUUID(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:e,right:e,top:t,bottom:t},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},s.recursiveDOMDelete(this.editModeDiv);var e=this.options.locales[this.options.locale],t=this._createButton("editMode","vis-button vis-edit vis-edit-mode",e.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(t),this._bindHammerToDiv(t,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(s.recursiveDOMDelete(this.editModeDiv),s.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var e=0;e=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=s.extend({},this.body.view.translation);var t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(void 0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(e){var t=this.body.functions.getPointer(e.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(t.x),i.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else{var o=t.x-this.lastTouch.x,n=t.y-this.lastTouch.y; -this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(e){var t=this,i={id:s.randomUUID(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(e){null!==e&&void 0!==e&&"addNode"===t.inMode&&(t.body.data.nodes.getDataSet().add(e),t.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var i=this,o={from:e,to:t};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(e){null!==e&&void 0!==e&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(e),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var i=this,o={id:this.edgeBeingEditedId,from:e,to:t};if("function"==typeof this.options.editEdge){if(2!==this.options.editEdge.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editEdge(o,function(e){null===e||void 0===e||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(e),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),e}();t["default"]=h},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=function(){function e(e,t){for(var i=0;i0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},e.optionsContainer=document.createElement("div"),e.optionsContainer.className="vis-configuration vis-config-option-container",e.domElements.push(e.optionsContainer),e.domElements.push(t)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e1?o-1:0),r=1;o>r;r++)n[r-1]=t[r];return n.forEach(function(e){s.appendChild(e)}),i.domElements.push(s),{v:i.domElements.length}}();if("object"===("undefined"==typeof a?"undefined":s(a)))return a.v}return 0}},{key:"_makeHeader",value:function(e){var t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerHTML=e,this._makeItem([],t)}},{key:"_makeLabel",value:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+t.length,i===!0?o.innerHTML=""+e+":":o.innerHTML=e+":",o}},{key:"_makeDropdown",value:function(e,t,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==t&&-1!==e.indexOf(t)&&(n=e.indexOf(t));for(var s=0;st&&n>t*c?(a.min=Math.ceil(t*c),l=a.min,d="range increased"):n>t/c&&(a.min=Math.ceil(t/c),l=a.min,d="range increased"),t*c>s&&1!==s&&(a.max=Math.ceil(t*c),l=a.max,d="range increased"),a.value=t}else a.value=o;var u=document.createElement("input");u.className="vis-configuration vis-config-rangeinput",u.value=a.value;var f=this;a.onchange=function(){u.value=this.value,f._update(Number(this.value),i)},a.oninput=function(){u.value=this.value};var p=this._makeLabel(i[i.length-1],i),v=this._makeItem(i,p,a,u);""!==d&&this.popupHistory[v]!==l&&(this.popupHistory[v]=l,this._setupPopup(d,v))}},{key:"_setupPopup",value:function(e,t){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCountervar options = "+JSON.stringify(e,null,2)+""}},{key:"getOptions",value:function(){for(var e={},t=0;ts;s++)for(r=0;rf?f+1:f;var p=l/this.r,v=a.RGBToHSV(this.color.r,this.color.g,this.color.b);v.h=f,v.s=p;var y=a.HSVToRGB(v.h,v.s,v.v);y.a=this.color.a,this.color=y,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),e}();t["default"]=h},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="object",a="dom",h="any",d={configure:{enabled:{"boolean":o},filter:{"boolean":o,string:i,array:s,"function":"function"},container:{dom:a},showButton:{"boolean":o},__type__:{object:r,"boolean":o,string:i,array:s,"function":"function"}},edges:{arrows:{to:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},middle:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},from:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},__type__:{string:["from","to","middle"],object:r}},arrowStrikethrough:{"boolean":o},color:{color:{string:i},highlight:{string:i},hover:{string:i},inherit:{string:["from","to","both"],"boolean":o},opacity:{number:n},__type__:{object:r,string:i}},dashes:{"boolean":o,array:s},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},align:{string:["horizontal","top","middle","bottom"]},__type__:{object:r,string:i}},hidden:{"boolean":o},hoverWidth:{"function":"function",number:n},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},length:{number:n,undefined:"undefined"},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},selectionWidth:{"function":"function",number:n},selfReferenceSize:{number:n},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},smooth:{enabled:{"boolean":o},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:n},forceDirection:{string:["horizontal","vertical","none"],"boolean":o},__type__:{object:r,"boolean":o}},title:{string:i,undefined:"undefined"},width:{number:n},value:{number:n,undefined:"undefined"},__type__:{object:r}},groups:{useDefaultGroups:{"boolean":o},__any__:"get from nodes, will be overwritten below",__type__:{object:r}},interaction:{dragNodes:{"boolean":o},dragView:{"boolean":o},hideEdgesOnDrag:{"boolean":o},hideNodesOnDrag:{"boolean":o},hover:{"boolean":o},keyboard:{enabled:{"boolean":o},speed:{x:{number:n},y:{number:n},zoom:{number:n},__type__:{object:r}},bindToWindow:{"boolean":o},__type__:{object:r,"boolean":o}},multiselect:{"boolean":o},navigationButtons:{"boolean":o},selectable:{"boolean":o},selectConnectedEdges:{"boolean":o},hoverConnectedEdges:{"boolean":o},tooltipDelay:{number:n},zoomView:{"boolean":o},__type__:{object:r}},layout:{randomSeed:{undefined:"undefined",number:n},improvedLayout:{"boolean":o},hierarchical:{enabled:{"boolean":o},levelSeparation:{number:n},nodeSpacing:{number:n},treeSpacing:{number:n},blockShifting:{"boolean":o},edgeMinimization:{"boolean":o},parentCentralization:{"boolean":o},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:r,"boolean":o}},__type__:{object:r}},manipulation:{enabled:{"boolean":o},initiallyActive:{"boolean":o},addNode:{"boolean":o,"function":"function"},addEdge:{"boolean":o,"function":"function"},editNode:{"function":"function"},editEdge:{"boolean":o,"function":"function"},deleteNode:{"boolean":o,"function":"function"},deleteEdge:{"boolean":o,"function":"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:r,"boolean":o}},nodes:{borderWidth:{number:n},borderWidthSelected:{number:n,undefined:"undefined"},brokenImage:{string:i,undefined:"undefined"},color:{border:{string:i},background:{string:i},highlight:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},hover:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},__type__:{object:r,string:i}},fixed:{x:{"boolean":o},y:{"boolean":o},__type__:{object:r,"boolean":o}},font:{align:{string:i},color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},__type__:{object:r, -string:i}},group:{string:i,number:n,undefined:"undefined"},hidden:{"boolean":o},icon:{face:{string:i},code:{string:i},size:{number:n},color:{string:i},__type__:{object:r}},id:{string:i,number:n},image:{string:i,undefined:"undefined"},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},level:{number:n,undefined:"undefined"},mass:{number:n},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon"]},shapeProperties:{borderDashes:{"boolean":o,array:s},borderRadius:{number:n},interpolation:{"boolean":o},useImageSize:{"boolean":o},useBorderWithImage:{"boolean":o},__type__:{object:r}},size:{number:n},title:{string:i,undefined:"undefined"},value:{number:n,undefined:"undefined"},x:{number:n},y:{number:n},__type__:{object:r}},physics:{enabled:{"boolean":o},barnesHut:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},forceAtlas2Based:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},repulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},hierarchicalRepulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},maxVelocity:{number:n},minVelocity:{number:n},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{"boolean":o},iterations:{number:n},updateInterval:{number:n},onlyDynamicEdges:{"boolean":o},fit:{"boolean":o},__type__:{object:r,"boolean":o}},timestep:{number:n},adaptiveTimestep:{"boolean":o},__type__:{object:r,"boolean":o}},autoResize:{"boolean":o},clickToUse:{"boolean":o},locale:{string:i},locales:{__any__:{any:h},__type__:{object:r}},height:{string:i},width:{string:i},__type__:{object:r}};d.groups.__any__=d.nodes,d.manipulation.controlNodeStyle=d.nodes;var l={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05]},middle:{enabled:!1,scaleFactor:[1,0,3,.05]},from:{enabled:!1,scaleFactor:[1,0,3,.05]}},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.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,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]},global:{locale:["en","nl"]}};t.allOptions=d,t.configureOptions=l},function(e,t,i){function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function e(e,t){for(var i=0;in&&h>a;){a+=1;var y=this._getHighestEnergyNode(i),g=s(y,4);for(c=g[0],l=g[1],u=g[2],f=g[3],p=l,v=0;p>r&&d>v;){v+=1,this._moveNode(c,u,f);var b=this._getEnergy(c),m=s(b,3);p=m[0],u=m[1],f=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,i=this.body.nodes,o=0,n=t[0],r=0,a=0,h=0;ho&&(o=u,n=d,r=f,a=p)}}return[n,o,r,a]}},{key:"_getEnergy",value:function(e){for(var t=this.body.nodeIndices,i=this.body.nodes,o=i[e].x,n=i[e].y,s=0,r=0,a=0;al;l++)for(var c=0;d-1>c;c++)for(var u=c+1;d>u;u++)o[t[c]][t[u]]=Math.min(o[t[c]][t[u]],o[t[c]][t[l]]+o[t[l]][t[u]]),o[t[u]][t[c]]=o[t[c]][t[u]];return o}}]),e}();t["default"]=n},function(e,t){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(e,t,i){this.beginPath(),this.arc(e,t,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(e,t,i){this.beginPath(),this.rect(e-i,t-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(e,t,i){this.beginPath(),i*=1.15,t+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(e,t-(r-s)),this.lineTo(e+n,t+s),this.lineTo(e-n,t+s),this.lineTo(e,t-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(e,t,i){this.beginPath(),i*=1.15,t-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(e,t+(r-s)),this.lineTo(e+n,t-s),this.lineTo(e-n,t-s),this.lineTo(e,t+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(e,t,i){this.beginPath(),i*=.82,t+=.1*i;for(var o=0;10>o;o++){var n=o%2===0?1.3*i:.5*i;this.lineTo(e+n*Math.sin(2*o*Math.PI/10),t-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(e,t,i){this.beginPath(),this.lineTo(e,t+i),this.lineTo(e+i,t),this.lineTo(e,t-i),this.lineTo(e-i,t),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(e,t,i,o,n){var s=Math.PI/180;0>i-2*n&&(n=i/2),0>o-2*n&&(n=o/2),this.beginPath(),this.moveTo(e+n,t),this.lineTo(e+i-n,t),this.arc(e+i-n,t+n,n,270*s,360*s,!1),this.lineTo(e+i,t+o-n),this.arc(e+i-n,t+o-n,n,0,90*s,!1),this.lineTo(e+n,t+o),this.arc(e+n,t+o-n,n,90*s,180*s,!1),this.lineTo(e,t+n),this.arc(e+n,t+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse=function(e,t,i,o){var n=.5522848,s=i/2*n,r=o/2*n,a=e+i,h=t+o,d=e+i/2,l=t+o/2;this.beginPath(),this.moveTo(e,l),this.bezierCurveTo(e,l-r,d-s,t,d,t),this.bezierCurveTo(d+s,t,a,l-r,a,l),this.bezierCurveTo(a,l+r,d+s,h,d,h),this.bezierCurveTo(d-s,h,e,l+r,e,l),this.closePath()},CanvasRenderingContext2D.prototype.database=function(e,t,i,o){var n=1/3,s=i,r=o*n,a=.5522848,h=s/2*a,d=r/2*a,l=e+s,c=t+r,u=e+s/2,f=t+r/2,p=t+(o-r/2),v=t+o;this.beginPath(),this.moveTo(l,f),this.bezierCurveTo(l,f+d,u+h,c,u,c),this.bezierCurveTo(u-h,c,e,f+d,e,f),this.bezierCurveTo(e,f-d,u-h,t,u,t),this.bezierCurveTo(u+h,t,l,f-d,l,f),this.lineTo(l,p),this.bezierCurveTo(l,p+d,u+h,v,u,v),this.bezierCurveTo(u-h,v,e,p+d,e,p),this.lineTo(e,f)},CanvasRenderingContext2D.prototype.arrow=function(e,t,i,o){var n=e-o*Math.cos(i),s=t-o*Math.sin(i),r=e-.9*o*Math.cos(i),a=t-.9*o*Math.sin(i),h=n+o/3*Math.cos(i+.5*Math.PI),d=s+o/3*Math.sin(i+.5*Math.PI),l=n+o/3*Math.cos(i-.5*Math.PI),c=s+o/3*Math.sin(i-.5*Math.PI);this.beginPath(),this.moveTo(e,t),this.lineTo(h,d),this.lineTo(r,a),this.lineTo(l,c),this.closePath()},CanvasRenderingContext2D.prototype.dashedLine=function(e,t,i,o,n){this.beginPath(),this.moveTo(e,t);for(var s=n.length,r=i-e,a=o-t,h=a/r,d=Math.sqrt(r*r+a*a),l=0,c=!0,u=0,f=n[0];d>=.1;)f=n[l++%s],f>d&&(f=d),u=Math.sqrt(f*f/(1+h*h)),u=0>r?-u:u,e+=u,t+=h*u,c===!0?this.lineTo(e,t):this.moveTo(e,t),d-=f,c=!c})},function(e,t){function i(e){return e?o(e):void 0}function o(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}e.exports=i,i.prototype.on=i.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},i.prototype.once=function(e,t){function i(){o.off(e,i),t.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=t,this.on(e,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[e];if(!i)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var o,n=0;no;++o)i[o].apply(this,t)}return this},i.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},i.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t){function i(e){return P=e,f()}function o(){B=0,F=P.charAt(0)}function n(){B++,F=P.charAt(B)}function s(){return P.charAt(B+1)}function r(e){return N.test(e)}function a(e,t){if(e||(e={}),t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function h(e,t,i){for(var o=t.split("."),n=e;o.length;){var s=o.shift();o.length?(n[s]||(n[s]={}),n=n[s]):n[s]=i}}function d(e,t){for(var i,o,n=null,s=[e],r=e;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,o=r.nodes.length;o>i;i++)if(t.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:t.id},e.node&&(n.attr=a(n.attr,e.node))),i=s.length-1;i>=0;i--){var h=s[i];h.nodes||(h.nodes=[]),-1===h.nodes.indexOf(n)&&h.nodes.push(n)}t.attr&&(n.attr=a(n.attr,t.attr))}function l(e,t){if(e.edges||(e.edges=[]),e.edges.push(t),e.edge){var i=a({},e.edge);t.attr=a(i,t.attr)}}function c(e,t,i,o,n){var s={from:t,to:i,type:o};return e.edge&&(s.attr=a({},e.edge)),s.attr=a(s.attr||{},n),s}function u(){for(j=C.NULL,I="";" "===F||" "===F||"\n"===F||"\r"===F;)n();do{var e=!1;if("#"===F){for(var t=B-1;" "===P.charAt(t)||" "===P.charAt(t);)t--;if("\n"===P.charAt(t)||""===P.charAt(t)){for(;""!=F&&"\n"!=F;)n();e=!0}}if("/"===F&&"/"===s()){for(;""!=F&&"\n"!=F;)n();e=!0}if("/"===F&&"*"===s()){for(;""!=F;){if("*"===F&&"/"===s()){n(),n();break}n()}e=!0}for(;" "===F||" "===F||"\n"===F||"\r"===F;)n()}while(e);if(""===F)return void(j=C.DELIMITER);var i=F+s();if(T[i])return j=C.DELIMITER,I=i,n(),void n();if(T[F])return j=C.DELIMITER,I=F,void n();if(r(F)||"-"===F){for(I+=F,n();r(F);)I+=F,n();return"false"===I?I=!1:"true"===I?I=!0:isNaN(Number(I))||(I=Number(I)),void(j=C.IDENTIFIER)}if('"'===F){for(n();""!=F&&('"'!=F||'"'===F&&'"'===s());)I+=F,'"'===F&&n(),n();if('"'!=F)throw w('End of string " expected');return n(),void(j=C.IDENTIFIER)}for(j=C.UNKNOWN;""!=F;)I+=F,n();throw new SyntaxError('Syntax error in part "'+k(I,30)+'"')}function f(){var e={};if(o(),u(),"strict"===I&&(e.strict=!0,u()),"graph"!==I&&"digraph"!==I||(e.type=I,u()),j===C.IDENTIFIER&&(e.id=I,u()),"{"!=I)throw w("Angle bracket { expected");if(u(),p(e),"}"!=I)throw w("Angle bracket } expected");if(u(),""!==I)throw w("End of file expected");return u(),delete e.node,delete e.edge,delete e.graph,e}function p(e){for(;""!==I&&"}"!=I;)v(e),";"===I&&u()}function v(e){var t=y(e);if(t)return void m(e,t);var i=g(e);if(!i){if(j!=C.IDENTIFIER)throw w("Identifier expected");var o=I;if(u(),"="===I){if(u(),j!=C.IDENTIFIER)throw w("Identifier expected");e[o]=I,u()}else b(e,o)}}function y(e){var t=null;if("subgraph"===I&&(t={},t.type="subgraph",u(),j===C.IDENTIFIER&&(t.id=I,u())),"{"===I){if(u(),t||(t={}),t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,p(t),"}"!=I)throw w("Angle bracket } expected");u(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||(e.subgraphs=[]),e.subgraphs.push(t)}return t}function g(e){return"node"===I?(u(),e.node=_(),"node"):"edge"===I?(u(),e.edge=_(),"edge"):"graph"===I?(u(),e.graph=_(),"graph"):null}function b(e,t){var i={id:t},o=_();o&&(i.attr=o),d(e,i),m(e,t)}function m(e,t){for(;"->"===I||"--"===I;){var i,o=I;u();var n=y(e);if(n)i=n;else{if(j!=C.IDENTIFIER)throw w("Identifier or subgraph expected");i=I,d(e,{id:i}),u()}var s=_(),r=c(e,t,i,o,s);l(e,r),t=i}}function _(){for(var e=null;"["===I;){for(u(),e={};""!==I&&"]"!=I;){if(j!=C.IDENTIFIER)throw w("Attribute name expected");var t=I;if(u(),"="!=I)throw w("Equal sign = expected");if(u(),j!=C.IDENTIFIER)throw w("Attribute value expected");var i=I;h(e,t,i),u(),","==I&&u()}if("]"!=I)throw w("Bracket ] expected");u()}return e}function w(e){return new SyntaxError(e+', got "'+k(I,30)+'" (char '+B+")")}function k(e,t){return e.length<=t?e:e.substr(0,27)+"..."}function x(e,t,i){Array.isArray(e)?e.forEach(function(e){Array.isArray(t)?t.forEach(function(t){i(e,t)}):i(e,t)}):Array.isArray(t)?t.forEach(function(t){i(e,t)}):i(e,t)}function O(e,t,i){for(var o=t.split("."),n=o.pop(),s=e,r=0;r":!0,"--":!0},P="",B=0,F="",I="",j=C.NULL,N=/[a-zA-Z_0-9.:#]/;t.parseDOT=i,t.DOTToGraph=M},function(e,t){function i(e,t){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==t&&(void 0!==t.fixed&&(n.nodes.fixed=t.fixed),void 0!==t.parseColor&&(n.nodes.parseColor=t.parseColor),void 0!==t.inheritColor&&(n.edges.inheritColor=t.inheritColor));for(var s=e.edges,r=e.nodes,a=0;a\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),e.apply(this,arguments)}}function u(e,t,i){var o,n=t.prototype;o=e.prototype=Object.create(n),o.constructor=e,o._super=n,i&&ve(o,i)}function f(e,t){return function(){return e.apply(t,arguments)}}function p(e,t){return typeof e==be?e.apply(t?t[0]||a:a,t):e}function v(e,t){return e===a?t:e}function y(e,t,i){l(_(t),function(t){e.addEventListener(t,i,!1)})}function g(e,t,i){l(_(t),function(t){e.removeEventListener(t,i,!1)})}function b(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function m(e,t){return e.indexOf(t)>-1}function _(e){return e.trim().split(/\s+/g)}function w(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var o=0;oi[t]}):o.sort()),o}function O(e,t){for(var i,o,n=t[0].toUpperCase()+t.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=F(t):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=t.center=I(o);t.timeStamp=we(),t.deltaTime=t.timeStamp-s.timeStamp,t.angle=R(a,h),t.distance=z(a,h),P(i,t),t.offsetDirection=N(t.deltaX,t.deltaY);var d=j(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=_e(d.x)>_e(d.y)?d.x:d.y,t.scale=r?L(r.pointers,o):1,t.rotation=r?A(r.pointers,o):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,B(i,t);var l=e.element;b(t.srcEvent.target,l)&&(l=t.srcEvent.target),t.target=l}function P(e,t){var i=t.center,o=e.offsetDelta||{},n=e.prevDelta||{},s=e.prevInput||{};t.eventType!==Ie&&s.eventType!==Ne||(n=e.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=e.offsetDelta={x:i.x,y:i.y}),t.deltaX=n.x+(i.x-o.x),t.deltaY=n.y+(i.y-o.y)}function B(e,t){var i,o,n,s,r=e.lastInterval||t,h=t.timeStamp-r.timeStamp;if(t.eventType!=ze&&(h>Fe||r.velocity===a)){var d=t.deltaX-r.deltaX,l=t.deltaY-r.deltaY,c=j(h,d,l);o=c.x,n=c.y,i=_e(c.x)>_e(c.y)?c.x:c.y,s=N(d,l),e.lastInterval=t}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;t.velocity=i,t.velocityX=o,t.velocityY=n,t.direction=s}function F(e){for(var t=[],i=0;i=_e(t)?e<0?Ae:Le:t<0?He:We}function z(e,t,i){i||(i=qe);var o=t[i[0]]-e[i[0]],n=t[i[1]]-e[i[1]];return Math.sqrt(o*o+n*n)}function R(e,t,i){i||(i=qe);var o=t[i[0]]-e[i[0]],n=t[i[1]]-e[i[1]];return 180*Math.atan2(n,o)/Math.PI}function A(e,t){return R(t[1],t[0],Ge)+R(e[1],e[0],Ge)}function L(e,t){return z(t[0],t[1],Ge)/z(e[0],e[1],Ge)}function H(){this.evEl=Ke,this.evWin=Ze,this.pressed=!1,C.apply(this,arguments)}function W(){this.evEl=$e,this.evWin=et,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=it,this.evWin=ot,this.started=!1,C.apply(this,arguments)}function U(e,t){var i=k(e.touches),o=k(e.changedTouches);return t&(Ne|ze)&&(i=x(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=st,this.targetIds={},C.apply(this,arguments)}function q(e,t){var i=k(e.touches),o=this.targetIds;if(t&(Ie|je)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=k(e.changedTouches),a=[],h=this.target;if(s=i.filter(function(e){return b(e.target,h)}),t===Ie)for(n=0;n-1&&o.splice(e,1)};setTimeout(n,rt)}}function Z(e){for(var t=e.srcEvent.clientX,i=e.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){i.manager.emit(t,e)}var i=this,o=this.state;o<_t&&t(i.options.event+te(o)),t(i.options.event),e.additionalEvent&&t(e.additionalEvent),o>=_t&&t(i.options.event+te(o))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=xt)},canEmit:function(){for(var e=0;et.threshold&&n&t.direction},attrTest:function(e){return ne.prototype.attrTest.call(this,e)&&(this.state&bt||!(this.state&bt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ie(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),u(re,ne,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ft]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&bt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),u(ae,ee,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ct]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,o=e.distancet.time;if(this._input=e,!o||!i||e.eventType&(Ne|ze)&&!n)this.reset();else if(e.eventType&Ie)this.reset(),this._timer=h(function(){this.state=wt,this.tryEmit()},t.time,this);else if(e.eventType&Ne)return wt;return xt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===wt&&(e&&e.eventType&Ne?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=we(),this.manager.emit(this.options.event,this._input)))}}),u(he,ne,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ft]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&bt)}}),u(de,ne,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ye|Ue,pointers:1},getTouchAction:function(){return se.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return i&(Ye|Ue)?t=e.overallVelocity:i&Ye?t=e.overallVelocityX:i&Ue&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&_e(t)>this.options.velocity&&e.eventType&Ne},emit:function(e){var t=ie(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),u(le,ee,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ut]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,o=e.distance0&&void 0!==arguments[0]?arguments[0]:{};this.options=e}},{key:"fit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=void 0;if(void 0!==e.nodes&&0!==e.nodes.length||(e.nodes=this.body.nodeIndices),t===!0){var n=0;for(var s in this.body.nodes)if(this.body.nodes.hasOwnProperty(s)){var r=this.body.nodes[s];r.predefinedPosition===!0&&(n+=1)}if(n>.5*this.body.nodeIndices.length)return void this.fit(e,!1);i=a.default.getRange(this.body.nodes,e.nodes);var h=this.body.nodeIndices.length;o=12.662/(h+7.4147)+.0964822;var d=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),i=a.default.getRange(this.body.nodes,e.nodes);var l=1.1*Math.abs(i.maxX-i.minX),c=1.1*Math.abs(i.maxY-i.minY),u=this.canvas.frame.canvas.clientWidth/l,f=this.canvas.frame.canvas.clientHeight/c;o=u<=f?u:f}o>1?o=1:0===o&&(o=1);var p=a.default.findCenter(i),v={position:p,scale:o,animation:e.animation};this.moveTo(v)}},{key:"focus",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[e]){var i={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=i,t.lockedOnNode=e,this.moveTo(t)}else console.log("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){return void 0===e?void(e={}):(void 0===e.offset&&(e.offset={x:0,y:0}),void 0===e.offset.x&&(e.offset.x=0),void 0===e.offset.y&&(e.offset.y=0),void 0===e.scale&&(e.scale=this.body.view.scale),void 0===e.position&&(e.position=this.getViewPosition()),void 0===e.animation&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),void 0===e.animation.duration&&(e.animation.duration=1e3),void 0===e.animation.easingFunction&&(e.animation.easingFunction="easeInOutQuad"),void this.animateView(e))}},{key:"animateView",value:function(e){if(void 0!==e){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;var t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.position.x,y:t.y-e.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+e.offset.y},0===e.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:t.x-e.x,y:t.y-e.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var t=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),e}();t.default=d},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var i=0;i50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(e){var t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,e,i),this.selectionHandler._generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler._generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,e,i),this.selectionHandler._generateClickEvent("click",e,t),this.selectionHandler._generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){if((new Date).valueOf()-this.touchTime>10){var t=this.getPointer(e.center);this.selectionHandler._generateClickEvent("release",e,t),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler._generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.selectionHandler._getSelectedEdgeCount(),n=this.selectionHandler._getSelectedNodeCount(),s=this.selectionHandler.getSelection(),r=void 0;r=i===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e);var a=this.selectionHandler._getSelectedEdgeCount(),h=this.selectionHandler._getSelectedNodeCount(),d=this.selectionHandler.getSelection(),l=this._determineIfDifferent(s,d),c=l.nodesChanged,u=l.edgesChanged,f=!1;h-n>0?(this.selectionHandler._generateClickEvent("selectNode",t,e),r=!0,f=!0):c===!0&&h>0?(this.selectionHandler._generateClickEvent("deselectNode",t,e,s),this.selectionHandler._generateClickEvent("selectNode",t,e),f=!0,r=!0):h-n<0&&(this.selectionHandler._generateClickEvent("deselectNode",t,e,s),r=!0),a-o>0&&f===!1?(this.selectionHandler._generateClickEvent("selectEdge",t,e),r=!0):a>0&&u===!0?(this.selectionHandler._generateClickEvent("deselectEdge",t,e,s),this.selectionHandler._generateClickEvent("selectEdge",t,e),r=!0):a-o<0&&(this.selectionHandler._generateClickEvent("deselectEdge",t,e,s),r=!0),r===!0&&this.selectionHandler._generateClickEvent("select",t,e)}},{key:"_determineIfDifferent",value:function(e,t){for(var i=!1,o=!1,n=0;n10&&(e=10);var o=void 0;void 0!==this.drag&&this.drag.dragging===!0&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=e/i,r=(1-s)*t.x+n.x*s,a=(1-s)*t.y+n.y*s;if(this.body.view.scale=e,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i0&&(this.popupObj=h[c[c.length-1]],s=!0)}if(void 0===this.popupObj&&s===!1){for(var f=this.body.edgeIndices,p=this.body.edges,v=void 0,y=[],g=0;g0&&(this.popupObj=p[y[y.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new d.default(this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var t=this.selectionHandler._pointerToPositionObject(e),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),i===!0)){var o=this.selectionHandler.getNodeAt(e);i=o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(e)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),e}();t.default=c},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)this.boundFunctions.hasOwnProperty(e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,o=t/e,n=(1-o)*this.canvas.canvasViewCenter.x+i.x*o,s=(1-o)*this.canvas.canvasViewCenter.y+i.y*o;this.body.view.scale=t,this.body.view.translation={x:n,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,o=t/e,n=(1-o)*this.canvas.canvasViewCenter.x+i.x*o,s=(1-o)*this.canvas.canvasViewCenter.y+i.y*o;this.body.view.scale=t,this.body.view.translation={x:n,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}},{key:"configureKeyboardBindings",value:function(){var e=this;void 0!==this.keycharm&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=a({container:window,preventDefault:!0}):this.keycharm=a({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){e.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){e.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){e.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){e.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){e.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){e.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){e.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){e.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")))}}]),e}();t.default=h},function(e,t,i){var o,n,s;!function(i,r){n=[],o=r,s="function"==typeof o?o.apply(t,n):o,!(void 0!==s&&(e.exports=s))}(this,function(){function e(e){var t,i=e&&e.preventDefault||!1,o=e&&e.container||window,n={},s={keydown:{},keyup:{}},r={};for(t=97;t<=122;t++)r[String.fromCharCode(t)]={code:65+(t-97),shift:!1};for(t=65;t<=90;t++)r[String.fromCharCode(t)]={code:t,shift:!0};for(t=0;t<=9;t++)r[""+t]={code:48+t,shift:!1};for(t=1;t<=12;t++)r["F"+t]={code:111+t,shift:!1};for(t=0;t<=9;t++)r["num"+t]={code:96+t,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r.delete={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(e){d(e,"keydown")},h=function(e){d(e,"keyup")},d=function(e,t){if(void 0!==s[t][e.keyCode]){for(var o=s[t][e.keyCode],n=0;no&&(s=o-t-this.padding),sn&&(r=n-i-this.padding),r4&&void 0!==arguments[4]&&arguments[4],s=void 0;s=n===!0?{nodes:[],edges:[]}:this.getSelection(),s.pointer={DOM:{x:i.x,y:i.y},canvas:this.canvas.DOMtoCanvas(i)},s.event=t,void 0!==o&&(s.previousSelection=o),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==e&&(e instanceof a.default&&t===!0&&this._selectConnectedEdges(e),e.select(),this._addToSelection(e),!0)}},{key:"deselectObject",value:function(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var t=[],i=this.body.nodes,o=0;o1&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(e),o=this._getAllNodesOverlappingWith(i);return o.length>0?t===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var i=this.body.edges,o=0;o1&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(e),o=10,n=null,s=this.body.edges,r=0;r1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,o=void 0;if(!e||!e.nodes&&!e.edges)throw"Selection must be an object with nodes and/or edges properties";if((t.unselectAll||void 0===t.unselectAll)&&this.unselectAll(),e.nodes)for(i=0;i1&&void 0!==arguments[1])||arguments[1];if(!e||void 0===e.length)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}},{key:"selectEdges",value:function(e){if(!e||void 0===e.length)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(this.body.nodes.hasOwnProperty(e)||delete this.selectionObj.nodes[e]);for(var t in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(t)&&(this.body.edges.hasOwnProperty(t)||delete this.selectionObj.edges[t])}}]),e}();t.default=c},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=e[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){n=!0,s=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r="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},a=function(){function e(e,t){for(var i=0;i0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(i===!0)return this.body.emitter.emit("refresh"),l.deepExtend(t,this.optionsBackup)}return t}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){void 0===e.physics||e.physics===!0?(e.physics={enabled:void 0===this.optionsBackup.physics.enabled||this.optionsBackup.physics.enabled,solver:"hierarchicalRepulsion"},this.optionsBackup.physics.enabled=void 0===this.optionsBackup.physics.enabled||this.optionsBackup.physics.enabled,this.optionsBackup.physics.solver=this.optionsBackup.physics.solver||"barnesHut"):"object"===r(e.physics)?(this.optionsBackup.physics.enabled=void 0===e.physics.enabled||e.physics.enabled,this.optionsBackup.physics.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(this.optionsBackup.physics.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var t="horizontal";"RL"!==this.options.hierarchical.direction&&"LR"!==this.options.hierarchical.direction||(t="vertical"),void 0===e.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1}):void 0===e.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1):"boolean"==typeof e.edges.smooth?(this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:t}):(void 0!==e.edges.smooth.type&&"dynamic"!==e.edges.smooth.type&&(t=e.edges.smooth.type),this.optionsBackup.edges={smooth:void 0===e.edges.smooth.enabled||e.edges.smooth.enabled,type:void 0===e.edges.smooth.type?"dynamic":e.edges.smooth.type,roundness:void 0===e.edges.smooth.roundness?.5:e.edges.smooth.roundness,forceDirection:void 0!==e.edges.smooth.forceDirection&&e.edges.smooth.forceDirection},e.edges.smooth={enabled:void 0===e.edges.smooth.enabled||e.edges.smooth.enabled,type:t,roundness:void 0===e.edges.smooth.roundness?.5:e.edges.smooth.roundness,forceDirection:void 0!==e.edges.smooth.forceDirection&&e.edges.smooth.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",t)}return e}},{key:"seededRandom",value:function(){var e=1e4*Math.sin(this.randomSeed++);return e-Math.floor(e)}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var t=0;ts){for(var r=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;var a=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();var h=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._shiftToCenter();for(var d=70,l=0;l0){var e=void 0,t=void 0,i=!1,o=!0,n=!1;this.hierarchicalLevels={},this.lastNodeOnLevel={},this.hierarchicalChildrenReference={},this.hierarchicalParentReference={},this.hierarchicalTrees={},this.treeIndex=-1,this.distributionOrdering={},this.distributionIndex={},this.distributionOrderingPresence={};for(t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&(e=this.body.nodes[t],void 0===e.options.x&&void 0===e.options.y&&(o=!1),void 0!==e.options.level?(i=!0,this.hierarchicalLevels[t]=e.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");n===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():"directed"===this.options.hierarchical.sortMethod?this._determineLevelsDirected():"custom"===this.options.hierarchical.sortMethod&&this._determineLevelsCustomCallback());for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&void 0===this.hierarchicalLevels[s]&&(this.hierarchicalLevels[s]=0);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,t=!1,i={},o=function(){for(var t=a(),i=0;i0)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:1e9,o=1e9,n=1e9,r=1e9,a=-1e9;for(var h in t)if(t.hasOwnProperty(h)){var d=e.body.nodes[h],l=e.hierarchicalLevels[d.id],c=e._getPositionForHierarchy(d),u=e._getSpaceAroundNode(d,t),f=s(u,2),p=f[0],v=f[1];o=Math.min(p,o),n=Math.min(v,n),l<=i&&(r=Math.min(c,r),a=Math.max(c,a))}return[r,a,o,n]},l=function t(i){var o=e.hierarchicalLevels[i];if(e.hierarchicalChildrenReference[i]){var n=e.hierarchicalChildrenReference[i];if(n.length>0)for(var s=0;s1)for(var a=0;a2&&void 0!==arguments[2]&&arguments[2],r=e._getPositionForHierarchy(i),a=e._getPositionForHierarchy(o),l=Math.abs(a-r);if(l>e.options.hierarchical.nodeSpacing){var u={};u[i.id]=!0;var f={};f[o.id]=!0,h(i,u),h(o,f);var p=c(i,o),v=d(u,p),y=s(v,4),g=(y[0],y[1]),b=(y[2],y[3],d(f,p)),m=s(b,4),_=m[0],w=(m[1],m[2]),k=(m[3],Math.abs(g-_));if(k>e.options.hierarchical.nodeSpacing){var x=g-_+e.options.hierarchical.nodeSpacing;x<-w+e.options.hierarchical.nodeSpacing&&(x=-w+e.options.hierarchical.nodeSpacing),x<0&&(e._shiftBlock(o.id,x),t=!0,n===!0&&e._centerParent(o))}}},v=function(o,n){for(var r=n.id,a=n.edges,l=e.hierarchicalLevels[n.id],c=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,u={},f=[],p=0;p0?v=Math.min(p,f-e.options.hierarchical.nodeSpacing):p<0&&(v=-Math.min(-p,u-e.options.hierarchical.nodeSpacing)),0!=v&&(e._shiftBlock(n.id,v),t=!0)},w=function(i){var o=e._getPositionForHierarchy(n),r=e._getSpaceAroundNode(n),a=s(r,2),h=a[0],d=a[1],l=i-o,c=o;l>0?c=Math.min(o+(d-e.options.hierarchical.nodeSpacing),i):l<0&&(c=Math.max(o-(h-e.options.hierarchical.nodeSpacing),i)),c!==o&&(e._setPositionForHierarchy(n,c,void 0,!0),t=!0)},k=m(o,f);_(k),k=m(o,a),w(k)},y=function(i){var o=Object.keys(e.distributionOrdering);o=o.reverse();for(var n=0;n0)for(var d=0;d0&&Math.abs(g)0&&(r=this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing),this._setPositionForHierarchy(s,r,t),this._validataPositionAndContinue(s,t,r),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){if(void 0!==this.hierarchicalChildrenReference[e]){for(var i=[],o=0;ot&&void 0===this.positionedNodes[s.id]))return;var a=void 0;a=0===n?this._getPositionForHierarchy(this.body.nodes[e]):this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing,this._setPositionForHierarchy(s,a,r),this._validataPositionAndContinue(s,r,a)}for(var h=1e9,d=-1e9,l=0;l0&&(t=this._getHubSize(),0!==t);)for(var o in this.body.nodes)if(this.body.nodes.hasOwnProperty(o)){var n=this.body.nodes[o];n.edges.length===t&&this._crawlNetwork(i,o)}}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,t=1e5,i=function(e,t,i){},o=function(o,n,s){var r=e.hierarchicalLevels[o.id];void 0===r&&(e.hierarchicalLevels[o.id]=t);var a=i(d.default.cloneOptions(o,"node"),d.default.cloneOptions(n,"node"),d.default.cloneOptions(s,"edge"));e.hierarchicalLevels[n.id]=e.hierarchicalLevels[o.id]+a};this._crawlNetwork(o),this._setMinLevelToZero()}},{key:"_determineLevelsDirected",value:function(){var e=this,t=1e4,i=function(i,o,n){var s=e.hierarchicalLevels[i.id];void 0===s&&(e.hierarchicalLevels[i.id]=t),n.toId==o.id?e.hierarchicalLevels[o.id]=e.hierarchicalLevels[i.id]+1:e.hierarchicalLevels[o.id]=e.hierarchicalLevels[i.id]-1};this._crawlNetwork(i),this._setMinLevelToZero()}},{key:"_setMinLevelToZero",value:function(){var e=1e9;for(var t in this.body.nodes)this.body.nodes.hasOwnProperty(t)&&void 0!==this.hierarchicalLevels[t]&&(e=Math.min(this.hierarchicalLevels[t],e));for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&void 0!==this.hierarchicalLevels[i]&&(this.hierarchicalLevels[i]-=e)}},{key:"_generateMap",value:function(){var e=this,t=function(t,i){if(e.hierarchicalLevels[i.id]>e.hierarchicalLevels[t.id]){var o=t.id,n=i.id;void 0===e.hierarchicalChildrenReference[o]&&(e.hierarchicalChildrenReference[o]=[]),e.hierarchicalChildrenReference[o].push(n),void 0===e.hierarchicalParentReference[n]&&(e.hierarchicalParentReference[n]=[]),e.hierarchicalParentReference[n].push(o)}};this._crawlNetwork(t)}},{key:"_crawlNetwork",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments[1],o={},n=0,s=function i(n,s){if(void 0===o[n.id]){void 0===e.hierarchicalTrees[n.id]&&(e.hierarchicalTrees[n.id]=s,e.treeIndex=Math.max(s,e.treeIndex)),o[n.id]=!0;for(var r=void 0,a=0;a3&&void 0!==arguments[3]&&arguments[3];o!==!0&&(void 0===this.distributionOrdering[i]&&(this.distributionOrdering[i]=[],this.distributionOrderingPresence[i]={}),void 0===this.distributionOrderingPresence[i][e.id]&&(this.distributionOrdering[i].push(e),this.distributionIndex[e.id]=this.distributionOrdering[i].length-1),this.distributionOrderingPresence[i][e.id]=!0),"UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?e.x=t:e.y=t}},{key:"_getPositionForHierarchy",value:function(e){return"UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?e.x:e.y}},{key:"_sortNodeArray",value:function(e){e.length>1&&("UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?e.sort(function(e,t){return e.x-t.x}):e.sort(function(e,t){return e.y-t.y}))}}]),e}();t.default=c},function(e,t,i){function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var i=0;i0&&this.options.deleteNode!==!1?(n===!0&&this._createSeperator(4),this._createDeleteButton(o)):0===e&&this.options.deleteEdge!==!1&&(n===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler._getSelectedNode();if(void 0!==t){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(t.isCluster!==!0){var i=s.deepExtend({},t.options,!1);if(i.x=t.x,i.y=t.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(t){null!==t&&void 0!==t&&"editNode"===e.inMode&&e.body.data.nodes.getDataSet().update(t),e.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var e=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId?!function(){var t=e.body.edges[e.edgeBeingEditedId],i=e._getNewTargetNode(t.from.x,t.from.y),o=e._getNewTargetNode(t.to.x,t.to.y);e.temporaryIds.nodes.push(i.id),e.temporaryIds.nodes.push(o.id),e.body.nodes[i.id]=i,e.body.nodeIndices.push(i.id),e.body.nodes[o.id]=o,e.body.nodeIndices.push(o.id),e._temporaryBindUI("onTouch",e._controlNodeTouch.bind(e)),e._temporaryBindUI("onTap",function(){}),e._temporaryBindUI("onHold",function(){}),e._temporaryBindUI("onDragStart",e._controlNodeDragStart.bind(e)),e._temporaryBindUI("onDrag",e._controlNodeDrag.bind(e)),e._temporaryBindUI("onDragEnd",e._controlNodeDragEnd.bind(e)),e._temporaryBindUI("onMouseMove",function(){}),e._temporaryBindEvent("beforeDrawing",function(e){var n=t.edgeType.findBorderPositions(e);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),e.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(t.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:t,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(t){null!==t&&void 0!==t&&"delete"===e.inMode?(e.body.data.edges.getDataSet().remove(t.edges),e.body.data.nodes.getDataSet().remove(t.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(e,t){var i=s.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+s.randomUUID(),i.hidden=!1,i.physics=!1,i.x=e,i.y=t;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:e,right:e,top:t,bottom:t},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},s.recursiveDOMDelete(this.editModeDiv);var e=this.options.locales[this.options.locale],t=this._createButton("editMode","vis-button vis-edit vis-edit-mode",e.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(t),this._bindHammerToDiv(t,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(s.recursiveDOMDelete(this.editModeDiv),s.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var t=this._createButton("addNode","vis-button vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(t),this._bindHammerToDiv(t,this.addNodeMode.bind(this))}},{key:"_createAddEdgeButton",value:function(e){var t=this._createButton("addEdge","vis-button vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(t),this._bindHammerToDiv(t,this.addEdgeMode.bind(this))}},{key:"_createEditNodeButton",value:function(e){var t=this._createButton("editNode","vis-button vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(t),this._bindHammerToDiv(t,this.editNode.bind(this))}},{key:"_createEditEdgeButton",value:function(e){var t=this._createButton("editEdge","vis-button vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(t),this._bindHammerToDiv(t,this.editEdgeMode.bind(this))}},{key:"_createDeleteButton",value:function(e){if(this.options.rtl)var t="vis-button vis-delete-rtl";else var t="vis-button vis-delete";var i=this._createButton("delete",t,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindHammerToDiv(i,this.deleteSelected.bind(this))}},{key:"_createBackButton",value:function(e){var t=this._createButton("back","vis-button vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(t),this._bindHammerToDiv(t,this.showManipulatorToolbar.bind(this))}},{key:"_createButton",value:function(e,t,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("div"),this.manipulationDOM[e+"Div"].className=t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=o,this.manipulationDOM[e+"Label"].innerHTML=i,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",e))}},{key:"_temporaryBindEvent",value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(void 0===this.body.eventListeners[e])throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+JSON.stringify(Object.keys(this.body.eventListeners)));this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{ +var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=s.extend({},this.body.view.translation);var t=this.lastTouch,i=this.selectionHandler.getNodeAt(t);if(void 0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(e){var t=this.body.functions.getPointer(e.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(t.x),i.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else{var o=t.x-this.lastTouch.x,n=t.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(t),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(this.temporaryIds.nodes.indexOf(n[r])===-1){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(e){var t=this,i={id:s.randomUUID(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(e){null!==e&&void 0!==e&&"addNode"===t.inMode&&(t.body.data.nodes.getDataSet().add(e),t.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var i=this,o={from:e,to:t};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(e){null!==e&&void 0!==e&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(e),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var i=this,o={id:this.edgeBeingEditedId,from:e,to:t};if("function"==typeof this.options.editEdge){if(2!==this.options.editEdge.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editEdge(o,function(e){null===e||void 0===e||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(e),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),e}();t.default=h},function(e,t,i){function o(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});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=function(){function e(e,t){for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:1;n(this,e),this.parent=t,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},d.extend(this.options,this.defaultOptions),this.configureOptions=o,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new h.default(s),this.wrapper=void 0}return r(e,[{key:"setOptions",value:function(e){if(void 0!==e){this.popupHistory={},this._removePopup();var t=!0;"string"==typeof e?this.options.filter=e:e instanceof Array?this.options.filter=e.join():"object"===("undefined"==typeof e?"undefined":s(e))?(void 0!==e.container&&(this.options.container=e.container),void 0!==e.filter&&(this.options.filter=e.filter),void 0!==e.showButton&&(this.options.showButton=e.showButton),void 0!==e.enabled&&(t=e.enabled)):"boolean"==typeof e?(this.options.filter=!0,t=e):"function"==typeof e&&(this.options.filter=e,t=!0),this.options.filter===!1&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){var e=this;this._clean(),this.changedOptions=[];var t=this.options.filter,i=0,o=!1;for(var n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,o=!1,"function"==typeof t?(o=t(n,[]),o=o||this._handleObject(this.configureOptions[n],[n],!0)):t!==!0&&t.indexOf(n)===-1||(o=!0),o!==!1&&(this.allowCreation=!0,i>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},e.optionsContainer=document.createElement("div"),e.optionsContainer.className="vis-configuration vis-config-option-container",e.domElements.push(e.optionsContainer),e.domElements.push(t)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e1?o-1:0),r=1;r2&&void 0!==arguments[2]&&arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+t.length,i===!0?o.innerHTML=""+e+":":o.innerHTML=e+":",o}},{key:"_makeDropdown",value:function(e,t,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==t&&e.indexOf(t)!==-1&&(n=e.indexOf(t));for(var s=0;ss&&1!==s&&(a.max=Math.ceil(t*l),d=a.max,h="range increased"),a.value=t}else a.value=o;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var u=this;a.onchange=function(){c.value=this.value,u._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var f=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,f,a,c);""!==h&&this.popupHistory[p]!==d&&(this.popupHistory[p]=d,this._setupPopup(h,p))}},{key:"_setupPopup",value:function(e,t){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,n=this.options.filter,s=!1;for(var r in e)if(e.hasOwnProperty(r)){o=!0;var a=e[r],h=d.copyAndExtendArray(t,r);if("function"==typeof n&&(o=n(r,t),o===!1&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=i===!1)),o!==!1){s=!0;var l=this._getValue(h);if(a instanceof Array)this._handleArray(a,l,h);else if("string"==typeof a)this._makeTextInput(a,l,h);else if("boolean"==typeof a)this._makeCheckbox(a,l,h);else if(a instanceof Object){var c=!0;if(t.indexOf("physics")!==-1&&this.moduleOptions.physics.solver!==r&&(c=!1),c===!0)if(void 0!==a.enabled){var u=d.copyAndExtendArray(h,"enabled"),f=this._getValue(u);if(f===!0){var p=this._makeLabel(r,h,!0);this._makeItem(h,p),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,f,h)}else{var v=this._makeLabel(r,h,!0);this._makeItem(h,v),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}},{key:"_handleArray",value:function(e,t,i){"string"==typeof e[0]&&"color"===e[0]?(this._makeColorField(e,t,i),e[1]!==t&&this.changedOptions.push({path:i,value:t})):"string"==typeof e[0]?(this._makeDropdown(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:t})):"number"==typeof e[0]&&(this._makeRange(e,t,i),e[0]!==t&&this.changedOptions.push({path:i,value:Number(t)}))}},{key:"_update",value:function(e,t){var i=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i;e="true"===e||e,e="false"!==e&&e;for(var n=0;nvar options = "+JSON.stringify(e,null,2)+""}},{key:"getOptions",value:function(){for(var e={},t=0;t0&&void 0!==arguments[0]?arguments[0]:1;o(this,e),this.pixelRatio=t,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return n(e,[{key:"insertTo",value:function(e){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if("function"!=typeof e)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=e}},{key:"setCloseCallback",value:function(e){if("function"!=typeof e)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=e}},{key:"_isColorString",value:function(e){var t={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};if("string"==typeof e)return t[e]}},{key:"setColor",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==e){var i=void 0,o=this._isColorString(e);if(void 0!==o&&(e=o),a.isString(e)===!0){if(a.isValidRGB(e)===!0){var n=e.substr(4).substr(0,e.length-5).split(",");i={r:n[0],g:n[1],b:n[2],a:1}}else if(a.isValidRGBA(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(a.isValidHex(e)===!0){var r=a.hexToRGB(e);i={r:r.r,g:r.g,b:r.b,a:1}}}else if(e instanceof Object&&void 0!==e.r&&void 0!==e.g&&void 0!==e.b){var h=void 0!==e.a?e.a:"1.0";i={r:e.r,g:e.g,b:e.b,a:h}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+JSON.stringify(e));this._setColor(i,t)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t===!0&&(this.previousColor=a.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){void 0!==e.closeCallback&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t===!0&&(this.initialColor=a.extend({},e)),this.color=e;var i=a.RGBToHSV(e.r,e.g,e.b),o=2*Math.PI,n=this.r*i.s,s=this.centerCoordinates.x+n*Math.sin(o*i.h),r=this.centerCoordinates.y+n*Math.cos(o*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=a.RGBToHSV(this.color.r,this.color.g,this.color.b);t.v=e/100;var i=a.HSVToRGB(t.h,t.s,t.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,t=a.RGBToHSV(e.r,e.g,e.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-t.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var e=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(e){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(e){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new s(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),r.onTouch(this.hammer,function(t){e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");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 t=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,i);var o=void 0,n=void 0,s=void 0,r=void 0;this.centerCoordinates={x:.5*t,y:.5*i},this.r=.49*t;var h=2*Math.PI/360,d=1/360,l=1/this.r,c=void 0;for(s=0;s<360;s++)for(r=0;r2&&void 0!==arguments[2]&&arguments[2],o=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(o),this._createK_matrix(o);for(var n=.01,r=1,a=0,h=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),d=5,l=1e9,c=0,u=0,f=0,p=0,v=0;l>n&&ar&&v=.1;)f=n[l++%s],f>d&&(f=d),u=Math.sqrt(f*f/(1+h*h)),u=r<0?-u:u,e+=u,t+=h*u,c===!0?this.lineTo(e,t):this.moveTo(e,t),d-=f,c=!c})},function(e,t){function i(e){if(e)return o(e)}function o(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}e.exports=i,i.prototype.on=i.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},i.prototype.once=function(e,t){function i(){o.off(e,i),t.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=t,this.on(e,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[e];if(!i)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var o,n=0;n=0;i--){var h=s[i];h.nodes||(h.nodes=[]),h.nodes.indexOf(n)===-1&&h.nodes.push(n)}t.attr&&(n.attr=a(n.attr,t.attr))}function l(e,t){if(e.edges||(e.edges=[]),e.edges.push(t),e.edge){var i=a({},e.edge);t.attr=a(i,t.attr)}}function c(e,t,i,o,n){var s={from:t,to:i,type:o};return e.edge&&(s.attr=a({},e.edge)),s.attr=a(s.attr||{},n),s}function u(){for(j=D.NULL,I="";" "===F||"\t"===F||"\n"===F||"\r"===F;)n();do{var e=!1;if("#"===F){for(var t=B-1;" "===P.charAt(t)||"\t"===P.charAt(t);)t--;if("\n"===P.charAt(t)||""===P.charAt(t)){for(;""!=F&&"\n"!=F;)n();e=!0}}if("/"===F&&"/"===s()){for(;""!=F&&"\n"!=F;)n();e=!0}if("/"===F&&"*"===s()){for(;""!=F;){if("*"===F&&"/"===s()){n(),n();break}n()}e=!0}for(;" "===F||"\t"===F||"\n"===F||"\r"===F;)n()}while(e);if(""===F)return void(j=D.DELIMITER);var i=F+s();if(T[i])return j=D.DELIMITER,I=i,n(),void n();if(T[F])return j=D.DELIMITER,I=F,void n();if(r(F)||"-"===F){for(I+=F,n();r(F);)I+=F,n();return"false"===I?I=!1:"true"===I?I=!0:isNaN(Number(I))||(I=Number(I)),void(j=D.IDENTIFIER)}if('"'===F){for(n();""!=F&&('"'!=F||'"'===F&&'"'===s());)I+=F,'"'===F&&n(),n();if('"'!=F)throw w('End of string " expected');return n(),void(j=D.IDENTIFIER)}for(j=D.UNKNOWN;""!=F;)I+=F,n();throw new SyntaxError('Syntax error in part "'+k(I,30)+'"')}function f(){var e={};if(o(),u(),"strict"===I&&(e.strict=!0,u()),"graph"!==I&&"digraph"!==I||(e.type=I,u()),j===D.IDENTIFIER&&(e.id=I,u()),"{"!=I)throw w("Angle bracket { expected");if(u(),p(e),"}"!=I)throw w("Angle bracket } expected");if(u(),""!==I)throw w("End of file expected");return u(),delete e.node,delete e.edge,delete e.graph,e}function p(e){for(;""!==I&&"}"!=I;)v(e),";"===I&&u()}function v(e){var t=y(e);if(t)return void m(e,t);var i=g(e);if(!i){if(j!=D.IDENTIFIER)throw w("Identifier expected");var o=I;if(u(),"="===I){if(u(),j!=D.IDENTIFIER)throw w("Identifier expected");e[o]=I,u()}else b(e,o)}}function y(e){var t=null;if("subgraph"===I&&(t={},t.type="subgraph",u(),j===D.IDENTIFIER&&(t.id=I,u())),"{"===I){if(u(),t||(t={}),t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,p(t),"}"!=I)throw w("Angle bracket } expected");u(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||(e.subgraphs=[]),e.subgraphs.push(t)}return t}function g(e){return"node"===I?(u(),e.node=_(),"node"):"edge"===I?(u(),e.edge=_(),"edge"):"graph"===I?(u(),e.graph=_(),"graph"):null}function b(e,t){var i={id:t},o=_();o&&(i.attr=o),d(e,i),m(e,t)}function m(e,t){for(;"->"===I||"--"===I;){var i,o=I;u();var n=y(e);if(n)i=n;else{if(j!=D.IDENTIFIER)throw w("Identifier or subgraph expected");i=I,d(e,{id:i}),u()}var s=_(),r=c(e,t,i,o,s);l(e,r),t=i}}function _(){for(var e=null;"["===I;){for(u(),e={};""!==I&&"]"!=I;){if(j!=D.IDENTIFIER)throw w("Attribute name expected");var t=I;if(u(),"="!=I)throw w("Equal sign = expected");if(u(),j!=D.IDENTIFIER)throw w("Attribute value expected");var i=I;h(e,t,i),u(),","==I&&u()}if("]"!=I)throw w("Bracket ] expected");u()}return e}function w(e){return new SyntaxError(e+', got "'+k(I,30)+'" (char '+B+")")}function k(e,t){return e.length<=t?e:e.substr(0,27)+"..."}function x(e,t,i){Array.isArray(e)?e.forEach(function(e){Array.isArray(t)?t.forEach(function(t){i(e,t)}):i(e,t)}):Array.isArray(t)?t.forEach(function(t){i(e,t)}):i(e,t)}function O(e,t,i){for(var o=t.split("."),n=o.pop(),s=e,r=0;r":!0,"--":!0},P="",B=0,F="",I="",j=D.NULL,N=/[a-zA-Z_0-9.:#]/;t.parseDOT=i,t.DOTToGraph=M},function(e,t){function i(e,t){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==t&&(void 0!==t.fixed&&(n.nodes.fixed=t.fixed),void 0!==t.parseColor&&(n.nodes.parseColor=t.parseColor),void 0!==t.inheritColor&&(n.edges.inheritColor=t.inheritColor));for(var s=e.edges,r=e.nodes,a=0;a.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px rgba(0,0,0,.8)}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}.vis-time-axis{position:relative}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;overflow:hidden;box-sizing:border-box;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-vertical-rtl{position:absolute;border-right:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-timeline{position:relative;border:1px solid #bfbfbf;padding:0;margin:0;box-sizing:border-box} \ No newline at end of file diff --git a/dist/vis-timeline-graph2d.min.js b/dist/vis-timeline-graph2d.min.js index e9eb0af3..c02bb516 100644 --- a/dist/vis-timeline-graph2d.min.js +++ b/dist/vis-timeline-graph2d.min.js @@ -4,8 +4,8 @@ * * A dynamic, browser-based visualization library. * - * @version 4.16.1 - * @date 2016-04-18 + * @version 4.17.0 + * @date 2016-11-05 * * @license * Copyright (C) 2011-2016 Almende B.V, http://almende.com @@ -22,18 +22,18 @@ * * Vis.js may be distributed under either license. */ -"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(7),e.DataSet=i(8),e.DataView=i(10),e.Queue=i(9),e.Timeline=i(11),e.Graph2d=i(41),e.timeline={Core:i(23),DateUtil:i(22),Range:i(20),stack:i(27),TimeStep:i(25),components:{items:{Item:i(29),BackgroundItem:i(33),BoxItem:i(31),PointItem:i(32),RangeItem:i(28)},BackgroundGroup:i(30),Component:i(21),CurrentTime:i(39),CustomTime:i(37),DataAxis:i(43),DataScale:i(44),GraphGroup:i(45),Group:i(26),ItemSet:i(24),Legend:i(49),LineGraph:i(42),TimeAxis:i(34)}},e.moment=i(2),e.Hammer=i(14),e.keycharm=i(36)},function(t,e,i){var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n=i(2),s=i(6);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)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=r.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){return s.v4()},e.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!==o(t[i])&&(t[i]=e)},e.fillIfDefined=function(t,i){var n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];for(var s in t)void 0!==i[s]&&("object"!==o(i[s])?void 0!==i[s]&&null!==i[s]||void 0===t[s]||n!==!0?t[s]=i[s]:delete t[s]:"object"===o(t[s])&&e.fillIfDefined(t[s],i[s],n))},e.protoExtend=function(t,e){for(var i=1;ii;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var o;if(void 0!==t){if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(n.isMoment(t))return new Date(t.valueOf());if(e.isString(t))return o=r.exec(t),o?new Date(Number(o[1])):n(t).toDate();throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return n(t);if(t instanceof Date)return n(t.valueOf());if(n.isMoment(t))return n(t);if(e.isString(t))return o=r.exec(t),n(o?Number(o[1]):t);throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(n.isMoment(t))return t.toDate().toISOString();if(e.isString(t))return o=r.exec(t),o?new Date(Number(o[1])).toISOString():new Date(t).toISOString();throw new Error("Cannot convert object of type "+e.getType(t)+" to type ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(e.isString(t)){o=r.exec(t);var s;return s=o?new Date(Number(o[1])).valueOf():new Date(t).valueOf(),"/Date("+s+")/"}throw new Error("Cannot convert object of type "+e.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+i+'"')}}};var r=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e="undefined"==typeof t?"undefined":o(t);return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},e.copyAndExtendArray=function(t,e){for(var i=[],o=0;oi;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},e.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},e.updateProperty=function(t,e,i){return t[e]!==i?(t[e]=i,!0):!1},e.throttle=function(t,e){var i=null,o=!1;return function n(){i?o=!0:(o=!1,t(),i=setTimeout(function(){i=null,o&&n()},e))}},e.addEventListener=function(t,e,i,o){t.addEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(-1!=t.indexOf("rgba"))return t;if(-1!=t.indexOf("rgb")){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=e.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(e.isValidHex(t)===!0){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t,r=t==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var a={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=a.split(t.style.cssText),n=a.split(i),s=e.extend(o,n);t.style.cssText=a.join(s)},e.removeCssText=function(t,e){var i=a.split(t.style.cssText),o=a.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=a.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==("undefined"==typeof i?"undefined":o(i))){for(var n=Object.create(i),s=0;s0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=(arguments.length<=3||void 0===arguments[3]?!1:arguments[3],arguments.length<=4||void 0===arguments[4]?{}:arguments[4]);if(null===e[i])t[i]=Object.create(o[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var n in e[i])e[i].hasOwnProperty(n)&&(t[i][n]=e[i][n])}},e.binarySearchCustom=function(t,e,i,o){for(var n=1e4,s=0,r=0,a=t.length-1;a>=r&&n>s;){var h=Math.floor((r+a)/2),d=t[h],l=void 0===o?d[i]:d[i][o],u=e(l);if(0==u)return h;-1==u?r=h+1:a=h-1,s++}return-1},e.binarySearchValue=function(t,e,i,o,n){for(var s,r,a,h,d=1e4,l=0,u=0,c=t.length-1,n=void 0!=n?n:function(t,e){return t==e?0:e>t?-1:1};c>=u&&d>l;){if(h=Math.floor(.5*(c+u)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==n(r,e))return h;if(n(s,e)<0&&n(r,e)>0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?u=h+1:c=h-1,l++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return ro.apply(null,arguments)}function i(t){ro=t}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var i,o=[];for(i=0;i0)for(i in ho)o=ho[i],n=e[o],p(n)||(t[o]=n);return t}function f(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),lo===!1&&(lo=!0,e.updateOffset(this),lo=!1)}function g(t){return t instanceof f||null!=t&&null!=t._isAMomentObject}function v(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=v(e)),i}function b(t,e,i){var o,n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(o=0;n>o;o++)(i&&t[o]!==e[o]||!i&&y(t[o])!==y(e[o]))&&r++;return r+s}function _(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function w(t,i){var o=!0;return a(function(){return null!=e.deprecationHandler&&e.deprecationHandler(null,t),o&&(_(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),o=!1),i.apply(this,arguments)},i)}function x(t,i){null!=e.deprecationHandler&&e.deprecationHandler(t,i),uo[t]||(_(i),uo[t]=!0)}function D(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function k(t){return"[object Object]"===Object.prototype.toString.call(t)}function S(t){var e,i;for(i in t)e=t[i],D(e)?this[i]=e:this["_"+i]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function C(t,e){var i,o=a({},t);for(i in e)r(e,i)&&(k(t[i])&&k(e[i])?(o[i]={},a(o[i],t[i]),a(o[i],e[i])):null!=e[i]?o[i]=e[i]:delete o[i]);return o}function O(t){null!=t&&this.set(t)}function T(t){return t?t.toLowerCase().replace("_","-"):t}function M(t){for(var e,i,o,n,s=0;s0;){if(o=E(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&b(n,i,!0)>=e-1)break;e--}s++}return null}function E(e){var i=null;if(!fo[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=po._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),P(i)}catch(o){}return fo[e]}function P(t,e){var i;return t&&(i=p(e)?I(t):A(t,e),i&&(po=i)),po._abbr}function A(t,e){return null!==e?(e.abbr=t,null!=fo[t]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=C(fo[t]._config,e)):null!=e.parentLocale&&(null!=fo[e.parentLocale]?e=C(fo[e.parentLocale]._config,e):x("parentLocaleUndefined","specified parentLocale is not defined yet")),fo[t]=new O(e),P(t),fo[t]):(delete fo[t],null)}function N(t,e){if(null!=e){var i;null!=fo[t]&&(e=C(fo[t]._config,e)),i=new O(e),i.parentLocale=fo[t],fo[t]=i,P(t)}else null!=fo[t]&&(null!=fo[t].parentLocale?fo[t]=fo[t].parentLocale:null!=fo[t]&&delete fo[t]);return fo[t]}function I(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return po;if(!o(t)){if(e=E(t))return e;t=[t]}return M(t)}function R(){return co(fo)}function L(t,e){var i=t.toLowerCase();go[i]=go[i+"s"]=go[e]=t}function F(t){return"string"==typeof t?go[t]||go[t.toLowerCase()]:void 0}function H(t){var e,i,o={};for(i in t)r(t,i)&&(e=F(i),e&&(o[e]=t[i]));return o}function Y(t,i){return function(o){return null!=o?(G(this,t,o),e.updateOffset(this,i),this):j(this,t)}}function j(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function G(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function z(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=F(t),D(this[t]))return this[t](e);return this}function W(t,e,i){var o=""+Math.abs(t),n=e-o.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function V(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(_o[t]=n),e&&(_o[e[0]]=function(){return W(n.apply(this,arguments),e[1],e[2])}),i&&(_o[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function B(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function U(t){var e,i,o=t.match(vo);for(e=0,i=o.length;i>e;e++)_o[o[e]]?o[e]=_o[o[e]]:o[e]=B(o[e]);return function(e){var n,s="";for(n=0;i>n;n++)s+=o[n]instanceof Function?o[n].call(e,t):o[n];return s}}function q(t,e){return t.isValid()?(e=X(e,t.localeData()),bo[e]=bo[e]||U(e),bo[e](t)):t.localeData().invalidDate()}function X(t,e){function i(t){return e.longDateFormat(t)||t}var o=5;for(yo.lastIndex=0;o>=0&&yo.test(t);)t=t.replace(yo,i),yo.lastIndex=0,o-=1;return t}function Z(t,e,i){Ho[t]=D(e)?e:function(t,o){return t&&i?i:e}}function K(t,e){return r(Ho,t)?Ho[t](e._strict,e._locale):new RegExp(J(t))}function J(t){return Q(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function Q(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(o=function(t,i){i[e]=y(t)}),i=0;io;++o)s=h([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===e?(n=mo.call(this._shortMonthsParse,r),-1!==n?n:null):(n=mo.call(this._longMonthsParse,r),-1!==n?n:null):"MMM"===e?(n=mo.call(this._shortMonthsParse,r),-1!==n?n:(n=mo.call(this._longMonthsParse,r),-1!==n?n:null)):(n=mo.call(this._longMonthsParse,r),-1!==n?n:(n=mo.call(this._shortMonthsParse,r),-1!==n?n:null))}function rt(t,e,i){var o,n,s;if(this._monthsParseExact)return st.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;12>o;o++){if(n=h([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),i||this._monthsParse[o]||(s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[o].test(t))return o;if(i&&"MMM"===e&&this._shortMonthsParse[o].test(t))return o;if(!i&&this._monthsParse[o].test(t))return o}}function at(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=y(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return i=Math.min(t.date(),it(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function ht(t){return null!=t?(at(this,t),e.updateOffset(this,!0),this):j(this,"Month")}function dt(){return it(this.year(),this.month())}function lt(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ct.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function ut(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ct.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function ct(){function t(t,e){return e.length-t.length}var e,i,o=[],n=[],s=[];for(e=0;12>e;e++)i=h([2e3,e]),o.push(this.monthsShort(i,"")),n.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(o.sort(t),n.sort(t),s.sort(t),e=0;12>e;e++)o[e]=Q(o[e]),n[e]=Q(n[e]),s[e]=Q(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function pt(t){var e,i=t._a;return i&&-2===l(t).overflow&&(e=i[Go]<0||i[Go]>11?Go:i[zo]<1||i[zo]>it(i[jo],i[Go])?zo:i[Wo]<0||i[Wo]>24||24===i[Wo]&&(0!==i[Vo]||0!==i[Bo]||0!==i[Uo])?Wo:i[Vo]<0||i[Vo]>59?Vo:i[Bo]<0||i[Bo]>59?Bo:i[Uo]<0||i[Uo]>999?Uo:-1,l(t)._overflowDayOfYear&&(jo>e||e>zo)&&(e=zo),l(t)._overflowWeeks&&-1===e&&(e=qo),l(t)._overflowWeekday&&-1===e&&(e=Xo),l(t).overflow=e),t}function mt(t){var e,i,o,n,s,r,a=t._i,h=tn.exec(a)||en.exec(a);if(h){for(l(t).iso=!0,e=0,i=nn.length;i>e;e++)if(nn[e][1].exec(h[1])){n=nn[e][0],o=nn[e][2]!==!1;break}if(null==n)return void(t._isValid=!1);if(h[3]){for(e=0,i=sn.length;i>e;e++)if(sn[e][1].exec(h[3])){s=(h[2]||" ")+sn[e][0];break}if(null==s)return void(t._isValid=!1)}if(!o&&null!=s)return void(t._isValid=!1);if(h[4]){if(!on.exec(h[4]))return void(t._isValid=!1);r="Z"}t._f=n+(s||"")+(r||""),Mt(t)}else t._isValid=!1}function ft(t){var i=rn.exec(t._i);return null!==i?void(t._d=new Date(+i[1])):(mt(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function gt(t,e,i,o,n,s,r){var a=new Date(t,e,i,o,n,s,r);return 100>t&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function vt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function yt(t){return bt(t)?366:365}function bt(t){return t%4===0&&t%100!==0||t%400===0}function _t(){return bt(this.year())}function wt(t,e,i){var o=7+e-i,n=(7+vt(t,0,o).getUTCDay()-e)%7;return-n+o-1}function xt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=wt(t,o,n),d=1+7*(e-1)+a+h;return 0>=d?(s=t-1,r=yt(s)+d):d>yt(t)?(s=t+1,r=d-yt(t)):(s=t,r=d),{year:s,dayOfYear:r}}function Dt(t,e,i){var o,n,s=wt(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return 1>r?(n=t.year()-1,o=r+kt(n,e,i)):r>kt(t.year(),e,i)?(o=r-kt(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function kt(t,e,i){var o=wt(t,e,i),n=wt(t+1,e,i);return(yt(t)-o+n)/7}function St(t,e,i){return null!=t?t:null!=e?e:i}function Ct(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function Ot(t){var e,i,o,n,s=[];if(!t._d){for(o=Ct(t),t._w&&null==t._a[zo]&&null==t._a[Go]&&Tt(t),t._dayOfYear&&(n=St(t._a[jo],o[jo]),t._dayOfYear>yt(n)&&(l(t)._overflowDayOfYear=!0),i=vt(n,0,t._dayOfYear),t._a[Go]=i.getUTCMonth(),t._a[zo]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Wo]&&0===t._a[Vo]&&0===t._a[Bo]&&0===t._a[Uo]&&(t._nextDay=!0,t._a[Wo]=0),t._d=(t._useUTC?vt:gt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Wo]=24)}}function Tt(t){var e,i,o,n,s,r,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,r=4,i=St(e.GG,t._a[jo],Dt(Ft(),1,4).year),o=St(e.W,1),n=St(e.E,1),(1>n||n>7)&&(h=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,i=St(e.gg,t._a[jo],Dt(Ft(),s,r).year),o=St(e.w,1),null!=e.d?(n=e.d,(0>n||n>6)&&(h=!0)):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s),1>o||o>kt(i,s,r)?l(t)._overflowWeeks=!0:null!=h?l(t)._overflowWeekday=!0:(a=xt(i,o,n,s,r),t._a[jo]=a.year,t._dayOfYear=a.dayOfYear)}function Mt(t){if(t._f===e.ISO_8601)return void mt(t);t._a=[],l(t).empty=!0;var i,o,n,s,r,a=""+t._i,h=a.length,d=0;for(n=X(t._f,t._locale).match(vo)||[],i=0;i0&&l(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),_o[s]?(o?l(t).empty=!1:l(t).unusedTokens.push(s),et(s,o,t)):t._strict&&!o&&l(t).unusedTokens.push(s);l(t).charsLeftOver=h-d,a.length>0&&l(t).unusedInput.push(a),l(t).bigHour===!0&&t._a[Wo]<=12&&t._a[Wo]>0&&(l(t).bigHour=void 0),l(t).parsedDateParts=t._a.slice(0),l(t).meridiem=t._meridiem,t._a[Wo]=Et(t._locale,t._a[Wo],t._meridiem),Ot(t),pt(t)}function Et(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&12>e&&(e+=12),o||12!==e||(e=0),e):e}function Pt(t){var e,i,o,n,s;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;ns)&&(o=s,i=e));a(t,i||e)}function At(t){if(!t._d){var e=H(t._i);t._a=s([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Ot(t)}}function Nt(t){var e=new f(pt(It(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function It(t){var e=t._i,i=t._f;return t._locale=t._locale||I(t._l),null===e||void 0===i&&""===e?c({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),g(e)?new f(pt(e)):(o(i)?Pt(t):i?Mt(t):n(e)?t._d=e:Rt(t),u(t)||(t._d=null),t))}function Rt(t){var i=t._i;void 0===i?t._d=new Date(e.now()):n(i)?t._d=new Date(i.valueOf()):"string"==typeof i?ft(t):o(i)?(t._a=s(i.slice(0),function(t){return parseInt(t,10)}),Ot(t)):"object"==typeof i?At(t):"number"==typeof i?t._d=new Date(i):e.createFromInputFallback(t)}function Lt(t,e,i,o,n){var s={};return"boolean"==typeof i&&(o=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=n,s._l=i,s._i=t,s._f=e,s._strict=o,Nt(s)}function Ft(t,e,i,o){return Lt(t,e,i,o,!1)}function Ht(t,e){var i,n;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return Ft();for(i=e[0],n=1;nt&&(t=-t,i="-"),i+W(~~(t/60),2)+e+W(~~t%60,2)})}function Vt(t,e){var i=(e||"").match(t)||[],o=i[i.length-1]||[],n=(o+"").match(un)||["-",0,0],s=+(60*n[1])+y(n[2]);return"+"===n[0]?s:-s}function Bt(t,i){var o,s;return i._isUTC?(o=i.clone(),s=(g(t)||n(t)?t.valueOf():Ft(t).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+s),e.updateOffset(o,!1),o):Ft(t).local()}function Ut(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function qt(t,i){var o,n=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Vt(Ro,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&i&&(o=Ut(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),n!==t&&(!i||this._changeInProgress?le(this,ne(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:Ut(this):null!=t?this:NaN}function Xt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Zt(t){return this.utcOffset(0,t)}function Kt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ut(this),"m")),this}function Jt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Vt(Io,this._i)),this}function Qt(t){return this.isValid()?(t=t?Ft(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function $t(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function te(){if(!p(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),t=It(t),t._a){var e=t._isUTC?h(t._a):Ft(t._a);this._isDSTShifted=this.isValid()&&b(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function ee(){return this.isValid()?!this._isUTC:!1}function ie(){return this.isValid()?this._isUTC:!1}function oe(){return this.isValid()?this._isUTC&&0===this._offset:!1}function ne(t,e){var i,o,n,s=t,a=null;return zt(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(a=cn.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:y(a[zo])*i,h:y(a[Wo])*i,m:y(a[Vo])*i,s:y(a[Bo])*i,ms:y(a[Uo])*i}):(a=pn.exec(t))?(i="-"===a[1]?-1:1,s={y:se(a[2],i),M:se(a[3],i),w:se(a[4],i), -d:se(a[5],i),h:se(a[6],i),m:se(a[7],i),s:se(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=ae(Ft(s.from),Ft(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new Gt(s),zt(t)&&r(t,"_locale")&&(o._locale=t._locale),o}function se(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function re(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function ae(t,e){var i;return t.isValid()&&e.isValid()?(e=Bt(e,t),t.isBefore(e)?i=re(t,e):(i=re(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function he(t){return 0>t?-1*Math.round(-1*t):Math.round(t)}function de(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(x(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=ne(i,o),le(this,n,t),this}}function le(t,i,o,n){var s=i._milliseconds,r=he(i._days),a=he(i._months);t.isValid()&&(n=null==n?!0:n,s&&t._d.setTime(t._d.valueOf()+s*o),r&&G(t,"Date",j(t,"Date")+r*o),a&&at(t,j(t,"Month")+a*o),n&&e.updateOffset(t,r||a))}function ue(t,e){var i=t||Ft(),o=Bt(i,this).startOf("day"),n=this.diff(o,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse",r=e&&(D(e[s])?e[s]():e[s]);return this.format(r||this.localeData().calendar(s,this,Ft(i)))}function ce(){return new f(this)}function pe(t,e){var i=g(t)?t:Ft(t);return this.isValid()&&i.isValid()?(e=F(p(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()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)||0}function we(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function xe(){var t=this.clone().utc();return 0s&&(e=s),Xe.call(this,t,e,i,o,n))}function Xe(t,e,i,o,n){var s=xt(t,e,i,o,n),r=vt(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Ze(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ke(t){return Dt(t,this._week.dow,this._week.doy).week}function Je(){return this._week.dow}function Qe(){return this._week.doy}function $e(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function ti(t){var e=Dt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function ei(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function ii(t,e){return o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function oi(t){return this._weekdaysShort[t.day()]}function ni(t){return this._weekdaysMin[t.day()]}function si(t,e,i){var o,n,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;7>o;++o)s=h([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?(n=mo.call(this._weekdaysParse,r),-1!==n?n:null):"ddd"===e?(n=mo.call(this._shortWeekdaysParse,r),-1!==n?n:null):(n=mo.call(this._minWeekdaysParse,r),-1!==n?n:null):"dddd"===e?(n=mo.call(this._weekdaysParse,r),-1!==n?n:(n=mo.call(this._shortWeekdaysParse,r),-1!==n?n:(n=mo.call(this._minWeekdaysParse,r),-1!==n?n:null))):"ddd"===e?(n=mo.call(this._shortWeekdaysParse,r),-1!==n?n:(n=mo.call(this._weekdaysParse,r),-1!==n?n:(n=mo.call(this._minWeekdaysParse,r),-1!==n?n:null))):(n=mo.call(this._minWeekdaysParse,r),-1!==n?n:(n=mo.call(this._weekdaysParse,r),-1!==n?n:(n=mo.call(this._shortWeekdaysParse,r),-1!==n?n:null)))}function ri(t,e,i){var o,n,s;if(this._weekdaysParseExact)return si.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;7>o;o++){if(n=h([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function ai(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ei(t,this.localeData()),this.add(t-e,"d")):e}function hi(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function di(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function li(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||pi.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex}function ui(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||pi.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function ci(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||pi.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function pi(){function t(t,e){return e.length-t.length}var e,i,o,n,s,r=[],a=[],d=[],l=[];for(e=0;7>e;e++)i=h([2e3,1]).day(e),o=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(o),a.push(n),d.push(s),l.push(o),l.push(n),l.push(s);for(r.sort(t),a.sort(t),d.sort(t),l.sort(t),e=0;7>e;e++)a[e]=Q(a[e]),d[e]=Q(d[e]),l[e]=Q(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function mi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function fi(){return this.hours()%12||12}function gi(){return this.hours()||24}function vi(t,e){V(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function yi(t,e){return e._meridiemParse}function bi(t){return"p"===(t+"").toLowerCase().charAt(0)}function _i(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function wi(t,e){e[Uo]=y(1e3*("0."+t))}function xi(){return this._isUTC?"UTC":""}function Di(){return this._isUTC?"Coordinated Universal Time":""}function ki(t){return Ft(1e3*t)}function Si(){return Ft.apply(null,arguments).parseZone()}function Ci(t,e,i){var o=this._calendar[t];return D(o)?o.call(e,i):o}function Oi(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function Ti(){return this._invalidDate}function Mi(t){return this._ordinal.replace("%d",t)}function Ei(t){return t}function Pi(t,e,i,o){var n=this._relativeTime[i];return D(n)?n(t,e,i,o):n.replace(/%d/i,t)}function Ai(t,e){var i=this._relativeTime[t>0?"future":"past"];return D(i)?i(e):i.replace(/%s/i,e)}function Ni(t,e,i,o){var n=I(),s=h().set(o,e);return n[i](s,t)}function Ii(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Ni(t,e,i,"month");var o,n=[];for(o=0;12>o;o++)n[o]=Ni(t,o,i,"month");return n}function Ri(t,e,i,o){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var n=I(),s=t?n._week.dow:0;if(null!=i)return Ni(e,(i+s)%7,o,"day");var r,a=[];for(r=0;7>r;r++)a[r]=Ni(e,(r+s)%7,o,"day");return a}function Li(t,e){return Ii(t,e,"months")}function Fi(t,e){return Ii(t,e,"monthsShort")}function Hi(t,e,i){return Ri(t,e,i,"weekdays")}function Yi(t,e,i){return Ri(t,e,i,"weekdaysShort")}function ji(t,e,i){return Ri(t,e,i,"weekdaysMin")}function Gi(){var t=this._data;return this._milliseconds=jn(this._milliseconds),this._days=jn(this._days),this._months=jn(this._months),t.milliseconds=jn(t.milliseconds),t.seconds=jn(t.seconds),t.minutes=jn(t.minutes),t.hours=jn(t.hours),t.months=jn(t.months),t.years=jn(t.years),this}function zi(t,e,i,o){var n=ne(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function Wi(t,e){return zi(this,t,e,1)}function Vi(t,e){return zi(this,t,e,-1)}function Bi(t){return 0>t?Math.floor(t):Math.ceil(t)}function Ui(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||0>=s&&0>=r&&0>=a||(s+=864e5*Bi(Xi(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=v(s/1e3),h.seconds=t%60,e=v(t/60),h.minutes=e%60,i=v(e/60),h.hours=i%24,r+=v(i/24),n=v(qi(r)),a+=n,r-=Bi(Xi(n)),o=v(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function qi(t){return 4800*t/146097}function Xi(t){return 146097*t/4800}function Zi(t){var e,i,o=this._milliseconds;if(t=F(t),"month"===t||"year"===t)return e=this._days+o/864e5,i=this._months+qi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Xi(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function Ki(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function Ji(t){return function(){return this.as(t)}}function Qi(t){return t=F(t),this[t+"s"]()}function $i(t){return function(){return this._data[t]}}function to(){return v(this.days()/7)}function eo(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function io(t,e,i){var o=ne(t).abs(),n=is(o.as("s")),s=is(o.as("m")),r=is(o.as("h")),a=is(o.as("d")),h=is(o.as("M")),d=is(o.as("y")),l=n=s&&["m"]||s=r&&["h"]||r=a&&["d"]||a=h&&["M"]||h=d&&["y"]||["yy",d];return l[2]=e,l[3]=+t>0,l[4]=i,eo.apply(null,l)}function oo(t,e){return void 0===os[t]?!1:void 0===e?os[t]:(os[t]=e,!0)}function no(t){var e=this.localeData(),i=io(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function so(){var t,e,i,o=ns(this._milliseconds)/1e3,n=ns(this._days),s=ns(this._months);t=v(o/60),e=v(t/60),o%=60,t%=60,i=v(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,u=o,c=this.asSeconds();return c?(0>c?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||u?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(u?u+"S":""):"P0D"}var ro,ao;ao=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,o=0;i>o;o++)if(o in e&&t.call(this,e[o],o,e))return!0;return!1};var ho=e.momentProperties=[],lo=!1,uo={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var co;co=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)r(t,e)&&i.push(e);return i};var po,mo,fo={},go={},vo=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,yo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,bo={},_o={},wo=/\d/,xo=/\d\d/,Do=/\d{3}/,ko=/\d{4}/,So=/[+-]?\d{6}/,Co=/\d\d?/,Oo=/\d\d\d\d?/,To=/\d\d\d\d\d\d?/,Mo=/\d{1,3}/,Eo=/\d{1,4}/,Po=/[+-]?\d{1,6}/,Ao=/\d+/,No=/[+-]?\d+/,Io=/Z|[+-]\d\d:?\d\d/gi,Ro=/Z|[+-]\d\d(?::?\d\d)?/gi,Lo=/[+-]?\d+(\.\d{1,3})?/,Fo=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ho={},Yo={},jo=0,Go=1,zo=2,Wo=3,Vo=4,Bo=5,Uo=6,qo=7,Xo=8;mo=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e=t?""+t:"+"+t}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),L("year","y"),Z("Y",No),Z("YY",Co,xo),Z("YYYY",Eo,ko),Z("YYYYY",Po,So),Z("YYYYYY",Po,So),$(["YYYYY","YYYYYY"],jo),$("YYYY",function(t,i){i[jo]=2===t.length?e.parseTwoDigitYear(t):y(t)}),$("YY",function(t,i){i[jo]=e.parseTwoDigitYear(t)}),$("Y",function(t,e){e[jo]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var an=Y("FullYear",!0);e.ISO_8601=function(){};var hn=w("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:c()}),dn=w("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:c()}),ln=function(){return Date.now?Date.now():+new Date};Wt("Z",":"),Wt("ZZ",""),Z("Z",Ro),Z("ZZ",Ro),$(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Vt(Ro,t)});var un=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var cn=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,pn=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;ne.fn=Gt.prototype;var mn=de(1,"add"),fn=de(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var gn=w("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ze("gggg","weekYear"),ze("ggggg","weekYear"),ze("GGGG","isoWeekYear"),ze("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),Z("G",No),Z("g",No),Z("GG",Co,xo),Z("gg",Co,xo),Z("GGGG",Eo,ko),Z("gggg",Eo,ko),Z("GGGGG",Po,So),Z("ggggg",Po,So),tt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=y(t)}),tt(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),V("Q",0,"Qo","quarter"),L("quarter","Q"),Z("Q",wo),$("Q",function(t,e){e[Go]=3*(y(t)-1)}),V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),Z("w",Co),Z("ww",Co,xo),Z("W",Co),Z("WW",Co,xo),tt(["w","ww","W","WW"],function(t,e,i,o){e[o.substr(0,1)]=y(t)});var vn={dow:0,doy:6};V("D",["DD",2],"Do","date"),L("date","D"),Z("D",Co),Z("DD",Co,xo),Z("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),$(["D","DD"],zo),$("Do",function(t,e){e[zo]=y(t.match(Co)[0],10)});var yn=Y("Date",!0);V("d",0,"do","day"),V("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),V("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),V("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),Z("d",Co),Z("e",Co),Z("E",Co),Z("dd",function(t,e){return e.weekdaysMinRegex(t)}),Z("ddd",function(t,e){return e.weekdaysShortRegex(t)}),Z("dddd",function(t,e){return e.weekdaysRegex(t)}),tt(["dd","ddd","dddd"],function(t,e,i,o){var n=i._locale.weekdaysParse(t,o,i._strict);null!=n?e.d=n:l(i).invalidWeekday=t}),tt(["d","e","E"],function(t,e,i,o){e[o]=y(t)});var bn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),_n="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),wn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xn=Fo,Dn=Fo,kn=Fo;V("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),Z("DDD",Mo),Z("DDDD",Do),$(["DDD","DDDD"],function(t,e,i){i._dayOfYear=y(t)}),V("H",["HH",2],0,"hour"),V("h",["hh",2],0,fi),V("k",["kk",2],0,gi),V("hmm",0,0,function(){return""+fi.apply(this)+W(this.minutes(),2)}),V("hmmss",0,0,function(){return""+fi.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)}),vi("a",!0),vi("A",!1),L("hour","h"),Z("a",yi),Z("A",yi),Z("H",Co),Z("h",Co),Z("HH",Co,xo),Z("hh",Co,xo),Z("hmm",Oo),Z("hmmss",To),Z("Hmm",Oo),Z("Hmmss",To),$(["H","HH"],Wo),$(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),$(["h","hh"],function(t,e,i){e[Wo]=y(t),l(i).bigHour=!0}),$("hmm",function(t,e,i){var o=t.length-2;e[Wo]=y(t.substr(0,o)),e[Vo]=y(t.substr(o)),l(i).bigHour=!0}),$("hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Wo]=y(t.substr(0,o)),e[Vo]=y(t.substr(o,2)),e[Bo]=y(t.substr(n)),l(i).bigHour=!0}),$("Hmm",function(t,e,i){var o=t.length-2;e[Wo]=y(t.substr(0,o)),e[Vo]=y(t.substr(o))}),$("Hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Wo]=y(t.substr(0,o)),e[Vo]=y(t.substr(o,2)),e[Bo]=y(t.substr(n))});var Sn=/[ap]\.?m?\.?/i,Cn=Y("Hours",!0);V("m",["mm",2],0,"minute"),L("minute","m"),Z("m",Co),Z("mm",Co,xo),$(["m","mm"],Vo);var On=Y("Minutes",!1);V("s",["ss",2],0,"second"),L("second","s"),Z("s",Co),Z("ss",Co,xo),$(["s","ss"],Bo);var Tn=Y("Seconds",!1);V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return 10*this.millisecond()}),V(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),V(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),V(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),V(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),V(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),Z("S",Mo,wo),Z("SS",Mo,xo),Z("SSS",Mo,Do);var Mn;for(Mn="SSSS";Mn.length<=9;Mn+="S")Z(Mn,Ao);for(Mn="S";Mn.length<=9;Mn+="S")$(Mn,wi);var En=Y("Milliseconds",!1);V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var Pn=f.prototype;Pn.add=mn,Pn.calendar=ue,Pn.clone=ce,Pn.diff=be,Pn.endOf=Pe,Pn.format=De,Pn.from=ke,Pn.fromNow=Se,Pn.to=Ce,Pn.toNow=Oe,Pn.get=z,Pn.invalidAt=je,Pn.isAfter=pe,Pn.isBefore=me,Pn.isBetween=fe,Pn.isSame=ge,Pn.isSameOrAfter=ve,Pn.isSameOrBefore=ye,Pn.isValid=He,Pn.lang=gn,Pn.locale=Te,Pn.localeData=Me,Pn.max=dn,Pn.min=hn,Pn.parsingFlags=Ye,Pn.set=z,Pn.startOf=Ee,Pn.subtract=fn,Pn.toArray=Re,Pn.toObject=Le,Pn.toDate=Ie,Pn.toISOString=xe,Pn.toJSON=Fe,Pn.toString=we,Pn.unix=Ne,Pn.valueOf=Ae,Pn.creationData=Ge,Pn.year=an,Pn.isLeapYear=_t,Pn.weekYear=We,Pn.isoWeekYear=Ve,Pn.quarter=Pn.quarters=Ze,Pn.month=ht,Pn.daysInMonth=dt,Pn.week=Pn.weeks=$e,Pn.isoWeek=Pn.isoWeeks=ti,Pn.weeksInYear=Ue,Pn.isoWeeksInYear=Be,Pn.date=yn,Pn.day=Pn.days=ai,Pn.weekday=hi,Pn.isoWeekday=di,Pn.dayOfYear=mi,Pn.hour=Pn.hours=Cn,Pn.minute=Pn.minutes=On,Pn.second=Pn.seconds=Tn,Pn.millisecond=Pn.milliseconds=En,Pn.utcOffset=qt,Pn.utc=Zt,Pn.local=Kt,Pn.parseZone=Jt,Pn.hasAlignedHourOffset=Qt,Pn.isDST=$t,Pn.isDSTShifted=te,Pn.isLocal=ee,Pn.isUtcOffset=ie,Pn.isUtc=oe,Pn.isUTC=oe,Pn.zoneAbbr=xi,Pn.zoneName=Di,Pn.dates=w("dates accessor is deprecated. Use date instead.",yn),Pn.months=w("months accessor is deprecated. Use month instead",ht),Pn.years=w("years accessor is deprecated. Use year instead",an),Pn.zone=w("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Xt);var An=Pn,Nn={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},In={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Rn="Invalid date",Ln="%d",Fn=/\d{1,2}/,Hn={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Yn=O.prototype;Yn._calendar=Nn,Yn.calendar=Ci,Yn._longDateFormat=In,Yn.longDateFormat=Oi,Yn._invalidDate=Rn,Yn.invalidDate=Ti,Yn._ordinal=Ln,Yn.ordinal=Mi,Yn._ordinalParse=Fn,Yn.preparse=Ei,Yn.postformat=Ei,Yn._relativeTime=Hn,Yn.relativeTime=Pi,Yn.pastFuture=Ai,Yn.set=S,Yn.months=ot,Yn._months=Ko,Yn.monthsShort=nt,Yn._monthsShort=Jo,Yn.monthsParse=rt,Yn._monthsRegex=$o,Yn.monthsRegex=ut,Yn._monthsShortRegex=Qo,Yn.monthsShortRegex=lt,Yn.week=Ke,Yn._week=vn,Yn.firstDayOfYear=Qe,Yn.firstDayOfWeek=Je,Yn.weekdays=ii,Yn._weekdays=bn,Yn.weekdaysMin=ni,Yn._weekdaysMin=wn,Yn.weekdaysShort=oi,Yn._weekdaysShort=_n,Yn.weekdaysParse=ri,Yn._weekdaysRegex=xn,Yn.weekdaysRegex=li,Yn._weekdaysShortRegex=Dn,Yn.weekdaysShortRegex=ui,Yn._weekdaysMinRegex=kn,Yn.weekdaysMinRegex=ci,Yn.isPM=bi,Yn._meridiemParse=Sn,Yn.meridiem=_i,P("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=w("moment.lang is deprecated. Use moment.locale instead.",P),e.langData=w("moment.langData is deprecated. Use moment.localeData instead.",I);var jn=Math.abs,Gn=Ji("ms"),zn=Ji("s"),Wn=Ji("m"),Vn=Ji("h"),Bn=Ji("d"),Un=Ji("w"),qn=Ji("M"),Xn=Ji("y"),Zn=$i("milliseconds"),Kn=$i("seconds"),Jn=$i("minutes"),Qn=$i("hours"),$n=$i("days"),ts=$i("months"),es=$i("years"),is=Math.round,os={s:45,m:45,h:22,d:26,M:11},ns=Math.abs,ss=Gt.prototype;ss.abs=Gi,ss.add=Wi,ss.subtract=Vi,ss.as=Zi,ss.asMilliseconds=Gn,ss.asSeconds=zn,ss.asMinutes=Wn,ss.asHours=Vn,ss.asDays=Bn,ss.asWeeks=Un,ss.asMonths=qn,ss.asYears=Xn,ss.valueOf=Ki,ss._bubble=Ui,ss.get=Qi,ss.milliseconds=Zn,ss.seconds=Kn,ss.minutes=Jn,ss.hours=Qn,ss.days=$n,ss.weeks=to,ss.months=ts,ss.years=es,ss.humanize=no,ss.toISOString=so,ss.toString=so,ss.toJSON=so,ss.locale=Te,ss.localeData=Me,ss.toIsoString=w("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",so),ss.lang=gn,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Z("x",No),Z("X",Lo),$("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),$("x",function(t,e,i){i._d=new Date(y(t))}),e.version="2.13.0",i(Ft),e.fn=An,e.min=Yt,e.max=jt,e.now=ln,e.utc=h,e.unix=ki,e.months=Li,e.isDate=n,e.locale=P,e.invalid=c,e.duration=ne,e.isMoment=g,e.weekdays=Hi,e.parseZone=Si,e.localeData=I,e.isDuration=zt,e.monthsShort=Fi,e.weekdaysMin=ji,e.defineLocale=A,e.updateLocale=N,e.locales=R,e.weekdaysShort=Yi,e.normalizeUnits=F,e.relativeTimeThreshold=oo,e.prototype=An;var rs=e;return rs})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>n&&(e[o+n++]=u[t])});16>n;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:f,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:v+1,d=a-g+(h-v)/1e4;if(0>d&&void 0===t.clockseq&&(r=r+1&16383),(0>d||a>g)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=a,v=h,f=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var u=a/4294967296*1e4&268435455;s[n++]=u>>>8&255,s[n++]=255&u,s[n++]=u>>>24&15|16,s[n++]=u>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var c=t.node||m,p=0;6>p;p++)s[n+p]=c[p];return e?e:o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;16>a;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],u={},c=0;256>c;c++)l[c]=(c+256).toString(16).substr(1),u[l[c]]=c;var p=r(),m=[1|p[0],p[1],p[2],p[3],p[4],p[5]],f=16383&(p[6]<<8|p[7]),g=0,v=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size), -a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){0>n&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;n>o;o++){var s=i[o],r=this._options.type[s];"Date"==r||"ISODate"==r||"ASPDate"==r?this._type[s]="Date":this._type[s]=r}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(9);o.prototype.setOptions=function(t){t&&void 0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=r.extend(this,{replace:["add","update","remove"]})),"object"===n(t.queue)&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},o.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},o.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},o.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var o=[];t in this._subscribers&&(o=o.concat(this._subscribers[t])),"*"in this._subscribers&&(o=o.concat(this._subscribers["*"]));for(var n=0,s=o.length;s>n;n++){var r=o[n];r.callback&&r.callback(t,e,i||null)}},o.prototype.add=function(t,e){var i,o=[],n=this;if(Array.isArray(t))for(var s=0,r=t.length;r>s;s++)i=n._addItem(t[s]),o.push(i);else{if(!(t instanceof Object))throw new Error("Unknown dataType");i=n._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o},o.prototype.update=function(t,e){var i=[],o=[],n=[],r=[],a=this,h=a._fieldId,d=function(t){var e=t[h];if(a._data[e]){var d=s.extend({},a._data[e]);e=a._updateItem(t),o.push(e),r.push(t),n.push(d)}else e=a._addItem(t),i.push(e)};if(Array.isArray(t))for(var l=0,u=t.length;u>l;l++)t[l]instanceof Object?d(t[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!(t instanceof Object))throw new Error("Unknown dataType");d(t)}if(i.length&&this._trigger("add",{items:i},e),o.length){var c={items:o,oldData:n,data:r};this._trigger("update",c,e)}return i.concat(o)},o.prototype.get=function(t){var e,i,o,n=this,r=s.getType(arguments[0]);"String"==r||"Number"==r?(e=arguments[0],o=arguments[1]):"Array"==r?(i=arguments[0],o=arguments[1]):o=arguments[0];var a;if(o&&o.returnType){var h=["Array","Object"];a=-1==h.indexOf(o.returnType)?"Array":o.returnType}else a="Array";var d,l,u,c,p,m=o&&o.type||this._options.type,f=o&&o.filter,g=[];if(void 0!=e)d=n._getItem(e,m),d&&f&&!f(d)&&(d=null);else if(void 0!=i)for(c=0,p=i.length;p>c;c++)d=n._getItem(i[c],m),f&&!f(d)||g.push(d);else for(l=Object.keys(this._data),c=0,p=l.length;p>c;c++)u=l[c],d=n._getItem(u,m),f&&!f(d)||g.push(d);if(o&&o.order&&void 0==e&&this._sort(g,o.order),o&&o.fields){var v=o.fields;if(void 0!=e)d=this._filterFields(d,v);else for(c=0,p=g.length;p>c;c++)g[c]=this._filterFields(g[c],v)}if("Object"==a){var y,b={};for(c=0,p=g.length;p>c;c++)y=g[c],b[y.id]=y;return b}return void 0!=e?d:g},o.prototype.getIds=function(t){var e,i,o,n,s,r=this._data,a=t&&t.filter,h=t&&t.order,d=t&&t.type||this._options.type,l=Object.keys(r),u=[];if(a)if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&s.push(n);for(this._sort(s,h),e=0,i=s.length;i>e;e++)u.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&u.push(n[this._fieldId]);else if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],s.push(r[o]);for(this._sort(s,h),e=0,i=s.length;i>e;e++)u.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=r[o],u.push(n[this._fieldId]);return u},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=this._data,d=Object.keys(h);if(e&&e.order){var l=this.get(e);for(i=0,o=l.length;o>i;i++)n=l[i],s=n[this._fieldId],t(n,s)}else for(i=0,o=d.length;o>i;i++)s=d[i],n=this._getItem(s,a),r&&!r(n)||t(n,s)},o.prototype.map=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=[],d=this._data,l=Object.keys(d);for(i=0,o=l.length;o>i;i++)n=l[i],s=this._getItem(n,a),r&&!r(s)||h.push(t(s,n));return e&&e.order&&this._sort(h,e.order),h},o.prototype._filterFields=function(t,e){if(!t)return t;var i,o,n={},s=Object.keys(t),r=s.length;if(Array.isArray(e))for(i=0;r>i;i++)o=s[i],-1!=e.indexOf(o)&&(n[o]=t[o]);else for(i=0;r>i;i++)o=s[i],e.hasOwnProperty(o)&&(n[e[o]]=t[o]);return n},o.prototype._sort=function(t,e){if(s.isString(e)){var i=e;t.sort(function(t,e){var o=t[i],n=e[i];return o>n?1:n>o?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},o.prototype.remove=function(t,e){var i,o,n,s=[];if(Array.isArray(t))for(i=0,o=t.length;o>i;i++)n=this._remove(t[i]),null!=n&&s.push(n);else n=this._remove(t),null!=n&&s.push(n);return s.length&&this._trigger("remove",{items:s},e),s},o.prototype._remove=function(t){if(s.isNumber(t)||s.isString(t)){if(this._data[t])return delete this._data[t],this.length--,t}else if(t instanceof Object){var e=t[this._fieldId];if(void 0!==e&&this._data[e])return delete this._data[e],this.length--,e}return null},o.prototype.clear=function(t){var e=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:e},t),e},o.prototype.max=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||d>r)&&(s=h,r=d)}return s},o.prototype.min=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||r>d)&&(s=h,r=d)}return s},o.prototype.distinct=function(t){var e,i,o,n=this._data,r=Object.keys(n),a=[],h=this._options.type&&this._options.type[t]||null,d=0;for(e=0,o=r.length;o>e;e++){var l=r[e],u=n[l],c=u[t],p=!1;for(i=0;d>i;i++)if(a[i]==c){p=!0;break}p||void 0===c||(a[d]=c,d++)}if(h)for(e=0,o=a.length;o>e;e++)a[e]=s.convert(a[e],h);return a},o.prototype._addItem=function(t){var e=t[this._fieldId];if(void 0!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" already exists")}else e=s.randomUUID(),t[this._fieldId]=e;var i,o,n={},r=Object.keys(t);for(i=0,o=r.length;o>i;i++){var a=r[i],h=this._type[a];n[a]=s.convert(t[a],h)}return this._data[e]=n,this.length++,e},o.prototype._getItem=function(t,e){var i,o,n,r,a=this._data[t];if(!a)return null;var h={},d=Object.keys(a);if(e)for(n=0,r=d.length;r>n;n++)i=d[n],o=a[i],h[i]=s.convert(o,e[i]);else for(n=0,r=d.length;r>n;n++)i=d[n],o=a[i],h[i]=o;return h},o.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 0==e)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var o=Object.keys(t),n=0,r=o.length;r>n;n++){var a=o[n],h=this._type[a];i[a]=s.convert(t[a],h)}return e},t.exports=o},function(t,e){function i(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}i.prototype.setOptions=function(t){t&&"undefined"!=typeof t.delay&&(this.delay=t.delay),t&&"undefined"!=typeof t.max&&(this.max=t.max),this._flushIfNeeded()},i.extend=function(t,e){var o=new i(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){o.flush()};var n=[{name:"flush",original:void 0}];if(e&&e.replace)for(var s=0;sthis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var n=i(1),s=i(8);o.prototype.setData=function(t){var e,i,o,n;if(this._data&&(this._data.off&&this._data.off("*",this.listener),e=Object.keys(this._ids),this._ids={},this.length=0,this._trigger("remove",{items:e})),this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),o=0,n=e.length;n>o;o++)i=e[o],this._ids[i]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},o.prototype.refresh=function(){var t,e,i,o=this._data.getIds({filter:this._options&&this._options.filter}),n=Object.keys(this._ids),s={},r=[],a=[];for(e=0,i=o.length;i>e;e++)t=o[e],s[t]=!0,this._ids[t]||(r.push(t),this._ids[t]=!0);for(e=0,i=n.length;i>e;e++)t=n[e],s[t]||(a.push(t),delete this._ids[t]);this.length+=r.length-a.length,r.length&&this._trigger("add",{items:r}),a.length&&this._trigger("remove",{items:a})},o.prototype.get=function(t){var e,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r||"Array"==r?(e=arguments[0],i=arguments[1],o=arguments[2]):(i=arguments[0],o=arguments[1]);var a=n.extend({},this._options,i);this._options.filter&&i&&i.filter&&(a.filter=function(t){return s._options.filter(t)&&i.filter(t)});var h=[];return void 0!=e&&h.push(e),h.push(a),h.push(o),this._data&&this._data.get.apply(this._data,h)},o.prototype.getIds=function(t){var e;if(this._data){var i,o=this._options.filter;i=t&&t.filter?o?function(e){return o(e)&&t.filter(e)}:t.filter:o,e=this._data.getIds({filter:i,order:t&&t.order})}else e=[];return e},o.prototype.map=function(t,e){var i=[];if(this._data){var o,n=this._options.filter;o=e&&e.filter?n?function(t){return n(t)&&e.filter(t)}:e.filter:n,i=this._data.map(t,{filter:o,order:e&&e.order})}else i=[];return i},o.prototype.getDataSet=function(){for(var t=this;t instanceof o;)t=t._data;return t||null},o.prototype._onEvent=function(t,e,i){var o,n,s,r,a=e&&e.items,h=this._data,d=[],l=[],u=[],c=[];if(a&&h){switch(t){case"add":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r&&(this._ids[s]=!0,l.push(s));break;case"update":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r?this._ids[s]?(u.push(s),d.push(e.data[o])):(this._ids[s]=!0,l.push(s)):this._ids[s]&&(delete this._ids[s],c.push(s));break;case"remove":for(o=0,n=a.length;n>o;o++)s=a[o],this._ids[s]&&(delete this._ids[s],c.push(s))}this.length+=l.length-c.length,l.length&&this._trigger("add",{items:l},i),u.length&&this._trigger("update",{items:u,data:d},i),c.length&&this._trigger("remove",{items:c},i)}},o.prototype.on=s.prototype.on,o.prototype.off=s.prototype.off,o.prototype._trigger=s.prototype._trigger,o.prototype.subscribe=o.prototype.on,o.prototype.unsubscribe=o.prototype.off,t.exports=o},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e,i,o){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!(Array.isArray(i)||i instanceof u||i instanceof c)&&i instanceof Object){var s=o;o=i,i=s}var r=this;this.defaultOptions={start:null,end:null,autoResize:!0,throttleRedraw:0,orientation:{axis:"bottom",item:"bottom"},rtl:!1,moment:d,width:null,height:null,maxHeight:null,minHeight:null},this.options=l.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:function(){return r.timeAxis.step.scale},getStep:function(){return r.timeAxis.step.step},toScreen:r._toScreen.bind(r),toGlobalScreen:r._toGlobalScreen.bind(r),toTime:r._toTime.bind(r),toGlobalTime:r._toGlobalTime.bind(r)}},this.range=new p(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new f(this.body),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new g(this.body),this.components.push(this.currentTime),this.itemSet=new y(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){r.emit("click",r.getEventProperties(t))}),this.on("doubletap",function(t){r.emit("doubleClick",r.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){r.emit("contextmenu",r.getEventProperties(t))},this.fitDone=!1,this.on("changed",function(){if(null!=this.itemsData&&!r.fitDone)if(r.fitDone=!0,void 0!=r.options.start||void 0!=r.options.end){if(void 0==r.options.start||void 0==r.options.end)var t=r.getItemRange();var e=void 0!=r.options.start?r.options.start:t.min,i=void 0!=r.options.end?r.options.end:t.max;r.setWindow(e,i,{animation:!1})}else r.fit({animation:!1})}),o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var s=i(12),r=o(s),a=i(18),h=o(a),d=(i(19),i(14),i(2)),l=i(1),u=i(8),c=i(10),p=i(20),m=i(23),f=i(34),g=i(39),v=i(37),y=i(24),b=i(18).printStyle,_=i(40).allOptions,w=i(40).configureOptions;n.prototype=new m,n.prototype._createConfigurator=function(){return new r["default"](this,this.dom.container,w)},n.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},n.prototype.setOptions=function(t){var e=h["default"].validate(t,_);if(e===!0&&console.log("%cErrors have been found in the supplied options object.",b),m.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var i=this.itemsData;if(i){var o=this.getSelection();this.setItems(null),this.setItems(i),this.setSelection(o)}}},n.prototype.setItems=function(t){var e;e=t?t instanceof u||t instanceof c?t:new u(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},n.prototype.setGroups=function(t){var e;e=t?t instanceof u||t instanceof c?t:new u(t):null,this.groupsData=e,this.itemSet.setGroups(e)},n.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},n.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},n.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},n.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var i=Array.isArray(t)?t:[t],o=this.itemsData.getDataSet().get(i,{type:{start:"Date",end:"Date"}}),n=null,s=null;if(o.forEach(function(t){var e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===n||n>e)&&(n=e),(null===s||i>s)&&(s=i)}),null!==n&&null!==s){var r=(n+s)/2,a=Math.max(this.range.end-this.range.start,1.1*(s-n)),h=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(r-a/2,r+a/2,h)}}},n.prototype.fit=function(t){var e,i=t&&void 0!==t.animation?t.animation:!0,o=this.itemsData&&this.itemsData.getDataSet();1===o.length&&void 0===o.get()[0].end?(e=this.getDataRange(),this.moveTo(e.min.valueOf(),{animation:i})):(e=this.getItemRange(),this.range.setRange(e.min,e.max,i))},n.prototype.getItemRange=function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,o=null!==e.max?e.max.valueOf():null,n=null,s=null;if(null!=i&&null!=o){var r,a,h,d,u;!function(){var e=function(t){return l.convert(t.data.start,"Date").valueOf()},c=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return l.convert(e,"Date").valueOf()};r=o-i,0>=r&&(r=10),a=r/t.props.center.width,l.forEach(t.itemSet.items,function(t){t.show(),t.repositionX();var r=e(t),h=c(t);if(this.options.rtl)var d=r-(t.getWidthRight()+10)*a,l=h+(t.getWidthLeft()+10)*a;else var d=r-(t.getWidthLeft()+10)*a,l=h+(t.getWidthRight()+10)*a;i>d&&(i=d,n=t),l>o&&(o=l,s=t)}.bind(t)),n&&s&&(h=n.getWidthLeft()+10,d=s.getWidthRight()+10,u=t.props.center.width-h-d,u>0&&(t.options.rtl?(i=e(n)-d*r/u,o=c(s)+h*r/u):(i=e(n)-h*r/u,o=c(s)+d*r/u)))}()}return{min:null!=i?new Date(i):null,max:null!=o?new Date(o):null}},n.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=l.convert(i.start,"Date").valueOf(),n=l.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||t>o)&&(t=o),(null===e||n>e)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY;if(this.options.rtl)var o=l.getAbsoluteRight(this.dom.centerContainer)-e;else var o=e-l.getAbsoluteLeft(this.dom.centerContainer);var n=i-l.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=v.customTimeFromTarget(t),h=this.itemSet.options.snap||null,d=this.body.util.getScale(),u=this.body.util.getStep(),c=this._toTime(o),p=h?h(c,d,u):c,m=l.getTarget(t),f=null;return null!=s?f="item":null!=a?f="custom-time":l.hasParent(m,this.timeAxis.dom.foreground)?f="axis":this.timeAxis2&&l.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":l.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":l.hasParent(m,this.currentTime.bar)?f="current-time":l.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:c,snappedTime:p}},t.exports=n},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},t.optionsContainer=document.createElement("div"),t.optionsContainer.className="vis-configuration vis-config-option-container",t.domElements.push(t.optionsContainer),t.domElements.push(e)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?o-1:0),r=1;o>r;r++)n[r-1]=e[r];return n.forEach(function(t){s.appendChild(t)}),i.domElements.push(s),{v:i.domElements.length}}();if("object"===("undefined"==typeof a?"undefined":s(a)))return a.v}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,i===!0?o.innerHTML=""+t+":":o.innerHTML=t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(var s=0;se&&n>e*u?(a.min=Math.ceil(e*u),l=a.min,d="range increased"):n>e/u&&(a.min=Math.ceil(e/u),l=a.min,d="range increased"),e*u>s&&1!==s&&(a.max=Math.ceil(e*u),l=a.max,d="range increased"),a.value=e}else a.value=o;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var p=this;a.onchange=function(){c.value=this.value,p._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var m=this._makeLabel(i[i.length-1],i),f=this._makeItem(i,m,a,c);""!==d&&this.popupHistory[f]!==l&&(this.popupHistory[f]=l,this._setupPopup(d,f))}},{key:"_setupPopup",value:function(t,e){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCountervar options = "+JSON.stringify(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;es;s++)for(r=0;rp?p+1:p;var m=l/this.r,f=a.RGBToHSV(this.color.r,this.color.g,this.color.b);f.h=p,f.s=m;var g=a.HSVToRGB(f.h,f.s,f.v);g.a=this.color.a,this.color=g,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}();e["default"]=h},function(t,e,i){if("undefined"!=typeof window){var o=i(15),n=window.Hammer||i(16);t.exports=o(n,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;/*! Hammer.JS - v2.0.6 - 2015-12-23 +"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(7),e.DataSet=i(8),e.DataView=i(10),e.Queue=i(9),e.Timeline=i(11),e.Graph2d=i(41),e.timeline={Core:i(23),DateUtil:i(22),Range:i(20),stack:i(27),TimeStep:i(25),components:{items:{Item:i(29),BackgroundItem:i(33),BoxItem:i(31),PointItem:i(32),RangeItem:i(28)},BackgroundGroup:i(30),Component:i(21),CurrentTime:i(39),CustomTime:i(37),DataAxis:i(43),DataScale:i(44),GraphGroup:i(45),Group:i(26),ItemSet:i(24),Legend:i(49),LineGraph:i(42),TimeAxis:i(34)}},e.moment=i(2),e.Hammer=i(14),e.keycharm=i(36)},function(t,e,i){var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=i(2),s=i(6);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)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=r.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){return s.v4()},e.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!==o(t[i])&&(t[i]=e)},e.fillIfDefined=function(t,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var s in t)void 0!==i[s]&&("object"!==o(i[s])?void 0!==i[s]&&null!==i[s]||void 0===t[s]||n!==!0?t[s]=i[s]:delete t[s]:"object"===o(t[s])&&e.fillIfDefined(t[s],i[s],n))},e.protoExtend=function(t,e){for(var i=1;i3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s=2;s3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s in o)if(o.hasOwnProperty(s)&&t.indexOf(s)==-1)if(o[s]&&o[s].constructor===Object)void 0===i[s]&&(i[s]={}),i[s].constructor===Object?e.deepExtend(i[s],o[s]):null===o[s]&&void 0!==i[s]&&n===!0?delete i[s]:i[s]=o[s];else if(Array.isArray(o[s])){i[s]=[];for(var r=0;r=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(t.indexOf("rgba")!=-1)return t;if(t.indexOf("rgb")!=-1){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=e.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(e.isValidHex(t)===!0){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t,r=t==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var a={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=a.split(t.style.cssText),n=a.split(i),s=e.extend(o,n);t.style.cssText=a.join(s)},e.removeCssText=function(t,e){var i=a.split(t.style.cssText),o=a.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=a.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==("undefined"==typeof i?"undefined":o(i))){for(var n=Object.create(i),s=0;s0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]?arguments[4]:{});if(null===e[i])t[i]=Object.create(o[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var n in e[i])e[i].hasOwnProperty(n)&&(t[i][n]=e[i][n])}},e.binarySearchCustom=function(t,e,i,o){for(var n=1e4,s=0,r=0,a=t.length-1;r<=a&&s0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?u=h+1:p=h-1,l++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},e.getScrollBarWidth=function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var o=t.offsetWidth;return i==o&&(o=e.clientWidth),document.body.removeChild(e),i-o}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return mo.apply(null,arguments)}function i(t){mo=t}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function n(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){var e;for(e in t)return!1;return!0}function r(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function a(t,e){var i,o=[];for(i=0;i0)for(i in go)o=go[i],n=e[o],f(n)||(t[o]=n);return t}function v(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),vo===!1&&(vo=!0,e.updateOffset(this),vo=!1)}function y(t){return t instanceof v||null!=t&&null!=t._isAMomentObject}function b(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function _(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=b(e)),i}function w(t,e,i){var o,n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(o=0;o0?"future":"past"];return k(i)?i(e):i.replace(/%s/i,e)}function R(t,e){var i=t.toLowerCase();To[i]=To[i+"s"]=To[e]=t}function L(t){return"string"==typeof t?To[t]||To[t.toLowerCase()]:void 0}function F(t){var e,i,o={};for(i in t)h(t,i)&&(e=L(i),e&&(o[e]=t[i]));return o}function H(t,e){Oo[t]=e}function Y(t){var e=[];for(var i in t)e.push({unit:i,priority:Oo[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function j(t,i){return function(o){return null!=o?(z(this,t,o),e.updateOffset(this,i),this):G(this,t)}}function G(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function z(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function W(t){return t=L(t),k(this[t])?this[t]():this}function U(t,e){if("object"==typeof t){t=F(t);for(var i=Y(t),o=0;o=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function B(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(Ao[t]=n),e&&(Ao[e[0]]=function(){return V(n.apply(this,arguments),e[1],e[2])}),i&&(Ao[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function q(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function X(t){var e,i,o=t.match(Mo);for(e=0,i=o.length;e=0&&Eo.test(t);)t=t.replace(Eo,i),Eo.lastIndex=0,o-=1;return t}function J(t,e,i){Ko[t]=k(e)?e:function(t,o){return t&&i?i:e}}function Q(t,e){return h(Ko,t)?Ko[t](e._strict,e._locale):new RegExp($(t))}function $(t){return tt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function tt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function et(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(o=function(t,i){i[e]=_(t)}),i=0;i=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function bt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function _t(t,e,i){var o=7+e-i,n=(7+bt(t,0,o).getUTCDay()-e)%7;return-n+o-1}function wt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=_t(t,o,n),d=1+7*(e-1)+a+h;return d<=0?(s=t-1,r=ft(s)+d):d>ft(t)?(s=t+1,r=d-ft(t)):(s=t,r=d),{year:s,dayOfYear:r}}function xt(t,e,i){var o,n,s=_t(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?(n=t.year()-1,o=r+Dt(n,e,i)):r>Dt(t.year(),e,i)?(o=r-Dt(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function Dt(t,e,i){var o=_t(t,e,i),n=_t(t+1,e,i);return(ft(t)-o+n)/7}function St(t){return xt(t,this._week.dow,this._week.doy).week}function kt(){return this._week.dow}function Ct(){return this._week.doy}function Tt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ot(t){var e=xt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Mt(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Et(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Pt(t,e){return t?o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:this._weekdays}function At(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Nt(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function It(t,e,i){var o,n,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)s=l([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?(n=_o.call(this._weekdaysParse,r),n!==-1?n:null):"ddd"===e?(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:null):(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null):"dddd"===e?(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null))):"ddd"===e?(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null))):(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:null)))}function Rt(t,e,i){var o,n,s;if(this._weekdaysParseExact)return It.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(n=l([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function Lt(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Mt(t,this.localeData()),this.add(t-e,"d")):e}function Ft(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ht(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Et(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Yt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||zt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=yn),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function jt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||zt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=bn),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Gt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||zt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_n),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function zt(){function t(t,e){return e.length-t.length}var e,i,o,n,s,r=[],a=[],h=[],d=[];for(e=0;e<7;e++)i=l([2e3,1]).day(e),o=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(o),a.push(n),h.push(s),d.push(o),d.push(n),d.push(s);for(r.sort(t),a.sort(t),h.sort(t),d.sort(t),e=0;e<7;e++)a[e]=tt(a[e]),h[e]=tt(h[e]),d[e]=tt(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Wt(){return this.hours()%12||12}function Ut(){return this.hours()||24}function Vt(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Bt(t,e){return e._meridiemParse}function qt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Xt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Zt(t){return t?t.toLowerCase().replace("_","-"):t}function Kt(t){for(var e,i,o,n,s=0;s0;){if(o=Jt(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&w(n,i,!0)>=e-1)break;e--}s++}return null}function Jt(e){var i=null;if(!kn[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=wn._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),Qt(i)}catch(t){}return kn[e]}function Qt(t,e){var i;return t&&(i=f(e)?ee(t):$t(t,e),i&&(wn=i)),wn._abbr}function $t(t,e){if(null!==e){var i=Sn;return e.abbr=t,null!=kn[t]?(S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=kn[t]._config):null!=e.parentLocale&&(null!=kn[e.parentLocale]?i=kn[e.parentLocale]._config:S("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),kn[t]=new O(T(i,e)),Qt(t),kn[t]}return delete kn[t],null}function te(t,e){if(null!=e){var i,o=Sn;null!=kn[t]&&(o=kn[t]._config),e=T(o,e),i=new O(e),i.parentLocale=kn[t],kn[t]=i,Qt(t)}else null!=kn[t]&&(null!=kn[t].parentLocale?kn[t]=kn[t].parentLocale:null!=kn[t]&&delete kn[t]);return kn[t]}function ee(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return wn;if(!o(t)){if(e=Jt(t))return e;t=[t]}return Kt(t)}function ie(){return bo(kn)}function oe(t){var e,i=t._a;return i&&p(t).overflow===-2&&(e=i[$o]<0||i[$o]>11?$o:i[tn]<1||i[tn]>nt(i[Qo],i[$o])?tn:i[en]<0||i[en]>24||24===i[en]&&(0!==i[on]||0!==i[nn]||0!==i[sn])?en:i[on]<0||i[on]>59?on:i[nn]<0||i[nn]>59?nn:i[sn]<0||i[sn]>999?sn:-1, +p(t)._overflowDayOfYear&&(etn)&&(e=tn),p(t)._overflowWeeks&&e===-1&&(e=rn),p(t)._overflowWeekday&&e===-1&&(e=an),p(t).overflow=e),t}function ne(t){var e,i,o,n,s,r,a=t._i,h=Cn.exec(a)||Tn.exec(a);if(h){for(p(t).iso=!0,e=0,i=Mn.length;eft(n)&&(p(t)._overflowDayOfYear=!0),i=bt(n,0,t._dayOfYear),t._a[$o]=i.getUTCMonth(),t._a[tn]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[en]&&0===t._a[on]&&0===t._a[nn]&&0===t._a[sn]&&(t._nextDay=!0,t._a[en]=0),t._d=(t._useUTC?bt:yt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[en]=24)}}function de(t){var e,i,o,n,s,r,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,r=4,i=re(e.GG,t._a[Qo],xt(ye(),1,4).year),o=re(e.W,1),n=re(e.E,1),(n<1||n>7)&&(h=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,i=re(e.gg,t._a[Qo],xt(ye(),s,r).year),o=re(e.w,1),null!=e.d?(n=e.d,(n<0||n>6)&&(h=!0)):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s),o<1||o>Dt(i,s,r)?p(t)._overflowWeeks=!0:null!=h?p(t)._overflowWeekday=!0:(a=wt(i,o,n,s,r),t._a[Qo]=a.year,t._dayOfYear=a.dayOfYear)}function le(t){if(t._f===e.ISO_8601)return void ne(t);t._a=[],p(t).empty=!0;var i,o,n,s,r,a=""+t._i,h=a.length,d=0;for(n=K(t._f,t._locale).match(Mo)||[],i=0;i0&&p(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),Ao[s]?(o?p(t).empty=!1:p(t).unusedTokens.push(s),ot(s,o,t)):t._strict&&!o&&p(t).unusedTokens.push(s);p(t).charsLeftOver=h-d,a.length>0&&p(t).unusedInput.push(a),t._a[en]<=12&&p(t).bigHour===!0&&t._a[en]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[en]=ue(t._locale,t._a[en],t._meridiem),he(t),oe(t)}function ue(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&e<12&&(e+=12),o||12!==e||(e=0),e):e}function pe(t){var e,i,o,n,s;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Le(){if(!f(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),t=fe(t),t._a){var e=t._isUTC?l(t._a):ye(t._a);this._isDSTShifted=this.isValid()&&w(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Fe(){return!!this.isValid()&&!this._isUTC}function He(){return!!this.isValid()&&this._isUTC}function Ye(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function je(t,e){var i,o,n,s=t,r=null;return De(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(r=Ln.exec(t))?(i="-"===r[1]?-1:1,s={y:0,d:_(r[tn])*i,h:_(r[en])*i,m:_(r[on])*i,s:_(r[nn])*i,ms:_(Se(1e3*r[sn]))*i}):(r=Fn.exec(t))?(i="-"===r[1]?-1:1,s={y:Ge(r[2],i),M:Ge(r[3],i),w:Ge(r[4],i),d:Ge(r[5],i),h:Ge(r[6],i),m:Ge(r[7],i),s:Ge(r[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=We(ye(s.from),ye(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new xe(s),De(t)&&h(t,"_locale")&&(o._locale=t._locale),o}function Ge(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function ze(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function We(t,e){var i;return t.isValid()&&e.isValid()?(e=Te(e,t),t.isBefore(e)?i=ze(t,e):(i=ze(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Ue(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(S(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=je(i,o),Ve(this,n,t),this}}function Ve(t,i,o,n){var s=i._milliseconds,r=Se(i._days),a=Se(i._months);t.isValid()&&(n=null==n||n,s&&t._d.setTime(t._d.valueOf()+s*o),r&&z(t,"Date",G(t,"Date")+r*o),a&&dt(t,G(t,"Month")+a*o),n&&e.updateOffset(t,r||a))}function Be(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function qe(t,i){var o=t||ye(),n=Te(o,this).startOf("day"),s=e.calendarFormat(this,n)||"sameElse",r=i&&(k(i[s])?i[s].call(this,o):i[s]);return this.format(r||this.localeData().calendar(s,this,ye(o)))}function Xe(){return new v(this)}function Ze(t,e){var i=y(t)?t:ye(t);return!(!this.isValid()||!i.isValid())&&(e=L(f(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()s&&(e=s),Ei.call(this,t,e,i,o,n))}function Ei(t,e,i,o,n){var s=wt(t,e,i,o,n),r=bt(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Pi(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ai(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Ni(t,e){e[sn]=_(1e3*("0."+t))}function Ii(){return this._isUTC?"UTC":""}function Ri(){return this._isUTC?"Coordinated Universal Time":""}function Li(t){return ye(1e3*t)}function Fi(){return ye.apply(null,arguments).parseZone()}function Hi(t){return t}function Yi(t,e,i,o){var n=ee(),s=l().set(o,e);return n[i](s,t)}function ji(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Yi(t,e,i,"month");var o,n=[];for(o=0;o<12;o++)n[o]=Yi(t,o,i,"month");return n}function Gi(t,e,i,o){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var n=ee(),s=t?n._week.dow:0;if(null!=i)return Yi(e,(i+s)%7,o,"day");var r,a=[];for(r=0;r<7;r++)a[r]=Yi(e,(r+s)%7,o,"day");return a}function zi(t,e){return ji(t,e,"months")}function Wi(t,e){return ji(t,e,"monthsShort")}function Ui(t,e,i){return Gi(t,e,i,"weekdays")}function Vi(t,e,i){return Gi(t,e,i,"weekdaysShort")}function Bi(t,e,i){return Gi(t,e,i,"weekdaysMin")}function qi(){var t=this._data;return this._milliseconds=Zn(this._milliseconds),this._days=Zn(this._days),this._months=Zn(this._months),t.milliseconds=Zn(t.milliseconds),t.seconds=Zn(t.seconds),t.minutes=Zn(t.minutes),t.hours=Zn(t.hours),t.months=Zn(t.months),t.years=Zn(t.years),this}function Xi(t,e,i,o){var n=je(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function Zi(t,e){return Xi(this,t,e,1)}function Ki(t,e){return Xi(this,t,e,-1)}function Ji(t){return t<0?Math.floor(t):Math.ceil(t)}function Qi(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*Ji(to(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=b(s/1e3),h.seconds=t%60,e=b(t/60),h.minutes=e%60,i=b(e/60),h.hours=i%24,r+=b(i/24),n=b($i(r)),a+=n,r-=Ji(to(n)),o=b(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function $i(t){return 4800*t/146097}function to(t){return 146097*t/4800}function eo(t){var e,i,o=this._milliseconds;if(t=L(t),"month"===t||"year"===t)return e=this._days+o/864e5,i=this._months+$i(e),"month"===t?i:i/12;switch(e=this._days+Math.round(to(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function io(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function oo(t){return function(){return this.as(t)}}function no(t){return t=L(t),this[t+"s"]()}function so(t){return function(){return this._data[t]}}function ro(){return b(this.days()/7)}function ao(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function ho(t,e,i){var o=je(t).abs(),n=us(o.as("s")),s=us(o.as("m")),r=us(o.as("h")),a=us(o.as("d")),h=us(o.as("M")),d=us(o.as("y")),l=n0,l[4]=i,ao.apply(null,l)}function lo(t){return void 0===t?us:"function"==typeof t&&(us=t,!0)}function uo(t,e){return void 0!==ps[t]&&(void 0===e?ps[t]:(ps[t]=e,!0))}function po(t){var e=this.localeData(),i=ho(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function co(){var t,e,i,o=cs(this._milliseconds)/1e3,n=cs(this._days),s=cs(this._months);t=b(o/60),e=b(t/60),o%=60,t%=60,i=b(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,u=o,p=this.asSeconds();return p?(p<0?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||u?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(u?u+"S":""):"P0D"}var mo,fo;fo=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,o=0;o68?1900:2e3)};var cn=j("FullYear",!0);B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),H("week",5),H("isoWeek",5),J("w",Ho),J("ww",Ho,Io),J("W",Ho),J("WW",Ho,Io),it(["w","ww","W","WW"],function(t,e,i,o){e[o.substr(0,1)]=_(t)});var mn={dow:0,doy:6};B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),J("d",Ho),J("e",Ho),J("E",Ho),J("dd",function(t,e){return e.weekdaysMinRegex(t)}),J("ddd",function(t,e){return e.weekdaysShortRegex(t)}),J("dddd",function(t,e){return e.weekdaysRegex(t)}),it(["dd","ddd","dddd"],function(t,e,i,o){var n=i._locale.weekdaysParse(t,o,i._strict);null!=n?e.d=n:p(i).invalidWeekday=t}),it(["d","e","E"],function(t,e,i,o){e[o]=_(t)});var fn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),gn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),vn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),yn=Zo,bn=Zo,_n=Zo;B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Wt),B("k",["kk",2],0,Ut),B("hmm",0,0,function(){return""+Wt.apply(this)+V(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Wt.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Vt("a",!0),Vt("A",!1),R("hour","h"),H("hour",13),J("a",Bt),J("A",Bt),J("H",Ho),J("h",Ho),J("HH",Ho,Io),J("hh",Ho,Io),J("hmm",Yo),J("hmmss",jo),J("Hmm",Yo),J("Hmmss",jo),et(["H","HH"],en),et(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),et(["h","hh"],function(t,e,i){e[en]=_(t),p(i).bigHour=!0}),et("hmm",function(t,e,i){var o=t.length-2;e[en]=_(t.substr(0,o)),e[on]=_(t.substr(o)),p(i).bigHour=!0}),et("hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[en]=_(t.substr(0,o)),e[on]=_(t.substr(o,2)),e[nn]=_(t.substr(n)),p(i).bigHour=!0}),et("Hmm",function(t,e,i){var o=t.length-2;e[en]=_(t.substr(0,o)),e[on]=_(t.substr(o))}),et("Hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[en]=_(t.substr(0,o)),e[on]=_(t.substr(o,2)),e[nn]=_(t.substr(n))});var wn,xn=/[ap]\.?m?\.?/i,Dn=j("Hours",!0),Sn={calendar:wo,longDateFormat:xo,invalidDate:Do,ordinal:So,ordinalParse:ko,relativeTime:Co,months:dn,monthsShort:ln,week:mn,weekdays:fn,weekdaysMin:vn,weekdaysShort:gn,meridiemParse:xn},kn={},Cn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Tn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,On=/Z|[+-]\d\d(?::?\d\d)?/,Mn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],En=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Pn=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=D("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),e.ISO_8601=function(){};var An=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ye.apply(null,arguments);return this.isValid()&&t.isValid()?tthis?this:t:m()}),In=function(){return Date.now?Date.now():+new Date};ke("Z",":"),ke("ZZ",""),J("Z",qo),J("ZZ",qo),et(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Ce(qo,t)});var Rn=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Ln=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Fn=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;je.fn=xe.prototype;var Hn=Ue(1,"add"),Yn=Ue(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var jn=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Si("gggg","weekYear"),Si("ggggg","weekYear"),Si("GGGG","isoWeekYear"),Si("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),J("G",Vo),J("g",Vo),J("GG",Ho,Io),J("gg",Ho,Io),J("GGGG",zo,Lo),J("gggg",zo,Lo),J("GGGGG",Wo,Fo),J("ggggg",Wo,Fo),it(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=_(t)}),it(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),B("Q",0,"Qo","quarter"),R("quarter","Q"),H("quarter",7),J("Q",No),et("Q",function(t,e){e[$o]=3*(_(t)-1)}),B("D",["DD",2],"Do","date"),R("date","D"),H("date",9),J("D",Ho),J("DD",Ho,Io),J("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),et(["D","DD"],tn),et("Do",function(t,e){e[tn]=_(t.match(Ho)[0],10)});var Gn=j("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),H("dayOfYear",4),J("DDD",Go),J("DDDD",Ro),et(["DDD","DDDD"],function(t,e,i){i._dayOfYear=_(t)}),B("m",["mm",2],0,"minute"),R("minute","m"),H("minute",14),J("m",Ho),J("mm",Ho,Io),et(["m","mm"],on);var zn=j("Minutes",!1);B("s",["ss",2],0,"second"),R("second","s"),H("second",15),J("s",Ho),J("ss",Ho,Io),et(["s","ss"],nn);var Wn=j("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),R("millisecond","ms"),H("millisecond",16),J("S",Go,No),J("SS",Go,Io),J("SSS",Go,Ro);var Un;for(Un="SSSS";Un.length<=9;Un+="S")J(Un,Uo);for(Un="S";Un.length<=9;Un+="S")et(Un,Ni);var Vn=j("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var Bn=v.prototype;Bn.add=Hn,Bn.calendar=qe,Bn.clone=Xe,Bn.diff=ei,Bn.endOf=ci,Bn.format=si,Bn.from=ri,Bn.fromNow=ai,Bn.to=hi,Bn.toNow=di,Bn.get=W,Bn.invalidAt=xi,Bn.isAfter=Ze,Bn.isBefore=Ke,Bn.isBetween=Je,Bn.isSame=Qe,Bn.isSameOrAfter=$e,Bn.isSameOrBefore=ti,Bn.isValid=_i,Bn.lang=jn,Bn.locale=li,Bn.localeData=ui,Bn.max=Nn,Bn.min=An,Bn.parsingFlags=wi,Bn.set=U,Bn.startOf=pi,Bn.subtract=Yn,Bn.toArray=vi,Bn.toObject=yi,Bn.toDate=gi,Bn.toISOString=ni,Bn.toJSON=bi,Bn.toString=oi,Bn.unix=fi,Bn.valueOf=mi,Bn.creationData=Di,Bn.year=cn,Bn.isLeapYear=vt,Bn.weekYear=ki,Bn.isoWeekYear=Ci,Bn.quarter=Bn.quarters=Pi,Bn.month=lt,Bn.daysInMonth=ut,Bn.week=Bn.weeks=Tt,Bn.isoWeek=Bn.isoWeeks=Ot,Bn.weeksInYear=Oi,Bn.isoWeeksInYear=Ti,Bn.date=Gn,Bn.day=Bn.days=Lt,Bn.weekday=Ft,Bn.isoWeekday=Ht,Bn.dayOfYear=Ai,Bn.hour=Bn.hours=Dn,Bn.minute=Bn.minutes=zn,Bn.second=Bn.seconds=Wn,Bn.millisecond=Bn.milliseconds=Vn,Bn.utcOffset=Me,Bn.utc=Pe,Bn.local=Ae,Bn.parseZone=Ne,Bn.hasAlignedHourOffset=Ie,Bn.isDST=Re,Bn.isLocal=Fe,Bn.isUtcOffset=He,Bn.isUtc=Ye,Bn.isUTC=Ye,Bn.zoneAbbr=Ii,Bn.zoneName=Ri,Bn.dates=D("dates accessor is deprecated. Use date instead.",Gn),Bn.months=D("months accessor is deprecated. Use month instead",lt),Bn.years=D("years accessor is deprecated. Use year instead",cn),Bn.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Ee),Bn.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Le);var qn=Bn,Xn=O.prototype;Xn.calendar=M,Xn.longDateFormat=E,Xn.invalidDate=P,Xn.ordinal=A,Xn.preparse=Hi,Xn.postformat=Hi,Xn.relativeTime=N,Xn.pastFuture=I,Xn.set=C,Xn.months=st,Xn.monthsShort=rt,Xn.monthsParse=ht,Xn.monthsRegex=ct,Xn.monthsShortRegex=pt,Xn.week=St,Xn.firstDayOfYear=Ct,Xn.firstDayOfWeek=kt,Xn.weekdays=Pt,Xn.weekdaysMin=Nt,Xn.weekdaysShort=At,Xn.weekdaysParse=Rt,Xn.weekdaysRegex=Yt,Xn.weekdaysShortRegex=jt,Xn.weekdaysMinRegex=Gt,Xn.isPM=qt,Xn.meridiem=Xt,Qt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=D("moment.lang is deprecated. Use moment.locale instead.",Qt),e.langData=D("moment.langData is deprecated. Use moment.localeData instead.",ee);var Zn=Math.abs,Kn=oo("ms"),Jn=oo("s"),Qn=oo("m"),$n=oo("h"),ts=oo("d"),es=oo("w"),is=oo("M"),os=oo("y"),ns=so("milliseconds"),ss=so("seconds"),rs=so("minutes"),as=so("hours"),hs=so("days"),ds=so("months"),ls=so("years"),us=Math.round,ps={s:45,m:45,h:22,d:26,M:11},cs=Math.abs,ms=xe.prototype;ms.abs=qi,ms.add=Zi,ms.subtract=Ki,ms.as=eo,ms.asMilliseconds=Kn,ms.asSeconds=Jn,ms.asMinutes=Qn,ms.asHours=$n,ms.asDays=ts,ms.asWeeks=es,ms.asMonths=is,ms.asYears=os,ms.valueOf=io,ms._bubble=Qi,ms.get=no,ms.milliseconds=ns,ms.seconds=ss,ms.minutes=rs,ms.hours=as,ms.days=hs,ms.weeks=ro,ms.months=ds,ms.years=ls,ms.humanize=po,ms.toISOString=co,ms.toString=co,ms.toJSON=co,ms.locale=li,ms.localeData=ui,ms.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",co),ms.lang=jn,B("X",0,0,"unix"),B("x",0,0,"valueOf"),J("x",Vo),J("X",Xo),et("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),et("x",function(t,e,i){i._d=new Date(_(t))}),e.version="2.15.2",i(ye),e.fn=qn,e.min=_e,e.max=we,e.now=In,e.utc=l,e.unix=Li,e.months=zi,e.isDate=r,e.locale=Qt,e.invalid=m,e.duration=je,e.isMoment=y,e.weekdays=Ui,e.parseZone=Fi,e.localeData=ee,e.isDuration=De,e.monthsShort=Wi,e.weekdaysMin=Bi,e.defineLocale=$t,e.updateLocale=te,e.locales=ie,e.weekdaysShort=Vi,e.normalizeUnits=L,e.relativeTimeRounding=lo,e.relativeTimeThreshold=uo,e.calendarFormat=Be,e.prototype=qn;var fs=e;return fs})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){n<16&&(e[o+n++]=u[t])});n<16;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:f,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:v+1,d=a-g+(h-v)/1e4;if(d<0&&void 0===t.clockseq&&(r=r+1&16383),(d<0||a>g)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=a,v=h,f=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l; +var u=a/4294967296*1e4&268435455;s[n++]=u>>>8&255,s[n++]=255&u,s[n++]=u>>>24&15|16,s[n++]=u>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var p=t.node||m,c=0;c<6;c++)s[n+c]=p[c];return e?e:o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],u={},p=0;p<256;p++)l[p]=(p+256).toString(16).substr(1),u[l[p]]=p;var c=r(),m=[1|c[0],c[1],c[2],c[3],c[4],c[5]],f=16383&(c[6]<<8|c[7]),g=0,v=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){n<0&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;on?1:or)&&(s=h,r=d)}return s},o.prototype.min=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;ethis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var n=i(1),s=i(8);o.prototype.setData=function(t){var e,i,o,n,s;if(this._data){for(this._data.off&&this._data.off("*",this.listener),e=this._data.getIds({filter:this._options&&this._options.filter}),s=[],o=0,n=e.length;os)&&(s=i)}),null!==n&&null!==s){var r=(n+s)/2,a=Math.max(this.range.end-this.range.start,1.1*(s-n)),h=!e||void 0===e.animation||e.animation;this.range.setRange(r-a/2,r+a/2,h)}}},n.prototype.fit=function(t){var e,i=!t||void 0===t.animation||t.animation,o=this.itemsData&&this.itemsData.getDataSet();1===o.length&&void 0===o.get()[0].end?(e=this.getDataRange(),this.moveTo(e.min.valueOf(),{animation:i})):(e=this.getItemRange(),this.range.setRange(e.min,e.max,i))},n.prototype.getItemRange=function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,o=null!==e.max?e.max.valueOf():null,n=null,s=null;if(null!=i&&null!=o){var r,a,h,d,u;!function(){var e=function(t){return l.convert(t.data.start,"Date").valueOf()},p=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return l.convert(e,"Date").valueOf()};r=o-i,r<=0&&(r=10),a=r/t.props.center.width,l.forEach(t.itemSet.items,function(t){t.show(),t.repositionX();var r=e(t),h=p(t);if(this.options.rtl)var d=r-(t.getWidthRight()+10)*a,l=h+(t.getWidthLeft()+10)*a;else var d=r-(t.getWidthLeft()+10)*a,l=h+(t.getWidthRight()+10)*a;do&&(o=l,s=t)}.bind(t)),n&&s&&(h=n.getWidthLeft()+10,d=s.getWidthRight()+10,u=t.props.center.width-h-d,u>0&&(t.options.rtl?(i=e(n)-d*r/u,o=p(s)+h*r/u):(i=e(n)-h*r/u,o=p(s)+d*r/u)))}()}return{min:null!=i?new Date(i):null,max:null!=o?new Date(o):null}},n.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=l.convert(i.start,"Date").valueOf(),n=l.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||oe)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY;if(this.options.rtl)var o=l.getAbsoluteRight(this.dom.centerContainer)-e;else var o=e-l.getAbsoluteLeft(this.dom.centerContainer);var n=i-l.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=v.customTimeFromTarget(t),h=this.itemSet.options.snap||null,d=this.body.util.getScale(),u=this.body.util.getStep(),p=this._toTime(o),c=h?h(p,d,u):p,m=l.getTarget(t),f=null;return null!=s?f="item":null!=a?f="custom-time":l.hasParent(m,this.timeAxis.dom.foreground)?f="axis":this.timeAxis2&&l.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":l.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":l.hasParent(m,this.currentTime.bar)?f="current-time":l.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:p,snappedTime:c}},t.exports=n},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:1;n(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},d.extend(this.options,this.defaultOptions),this.configureOptions=o,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new h.default(s),this.wrapper=void 0}return r(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;"string"==typeof t?this.options.filter=t:t instanceof Array?this.options.filter=t.join():"object"===("undefined"==typeof t?"undefined":s(t))?(void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)):"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0),this.options.filter===!1&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,this.options.enabled===!0&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){var t=this;this._clean(),this.changedOptions=[];var e=this.options.filter,i=0,o=!1;for(var n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,o=!1,"function"==typeof e?(o=e(n,[]),o=o||this._handleObject(this.configureOptions[n],[n],!0)):e!==!0&&e.indexOf(n)===-1||(o=!0),o!==!1&&(this.allowCreation=!0,i>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},t.optionsContainer=document.createElement("div"),t.optionsContainer.className="vis-configuration vis-config-option-container",t.domElements.push(t.optionsContainer),t.domElements.push(e)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?o-1:0),r=1;r2&&void 0!==arguments[2]&&arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,i===!0?o.innerHTML=""+t+":":o.innerHTML=t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&t.indexOf(e)!==-1&&(n=t.indexOf(e));for(var s=0;ss&&1!==s&&(a.max=Math.ceil(e*l),d=a.max,h="range increased"),a.value=e}else a.value=o;var u=document.createElement("input");u.className="vis-configuration vis-config-rangeinput",u.value=a.value;var p=this;a.onchange=function(){u.value=this.value,p._update(Number(this.value),i)},a.oninput=function(){u.value=this.value};var c=this._makeLabel(i[i.length-1],i),m=this._makeItem(i,c,a,u);""!==h&&this.popupHistory[m]!==d&&(this.popupHistory[m]=d,this._setupPopup(h,m))}},{key:"_setupPopup",value:function(t,e){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,n=this.options.filter,s=!1;for(var r in t)if(t.hasOwnProperty(r)){o=!0;var a=t[r],h=d.copyAndExtendArray(e,r);if("function"==typeof n&&(o=n(r,e),o===!1&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=i===!1)),o!==!1){s=!0;var l=this._getValue(h);if(a instanceof Array)this._handleArray(a,l,h);else if("string"==typeof a)this._makeTextInput(a,l,h);else if("boolean"==typeof a)this._makeCheckbox(a,l,h);else if(a instanceof Object){var u=!0;if(e.indexOf("physics")!==-1&&this.moduleOptions.physics.solver!==r&&(u=!1),u===!0)if(void 0!==a.enabled){var p=d.copyAndExtendArray(h,"enabled"),c=this._getValue(p);if(c===!0){var m=this._makeLabel(r,h,!0);this._makeItem(h,m),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,c,h)}else{var f=this._makeLabel(r,h,!0);this._makeItem(h,f),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({ +path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i;t="true"===t||t,t="false"!==t&&t;for(var n=0;nvar options = "+JSON.stringify(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;e0&&void 0!==arguments[0]?arguments[0]:1;o(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return n(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){var e={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};if("string"==typeof t)return e[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i=void 0,o=this._isColorString(t);if(void 0!==o&&(t=o),a.isString(t)===!0){if(a.isValidRGB(t)===!0){var n=t.substr(4).substr(0,t.length-5).split(",");i={r:n[0],g:n[1],b:n[2],a:1}}else if(a.isValidRGBA(t)===!0){var s=t.substr(5).substr(0,t.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(a.isValidHex(t)===!0){var r=a.hexToRGB(t);i={r:r.r,g:r.g,b:r.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var h=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:h}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+JSON.stringify(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e===!0&&(this.previousColor=a.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e===!0&&(this.initialColor=a.extend({},t)),this.color=t;var i=a.RGBToHSV(t.r,t.g,t.b),o=2*Math.PI,n=this.r*i.s,s=this.centerCoordinates.x+n*Math.sin(o*i.h),r=this.centerCoordinates.y+n*Math.cos(o*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=a.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=a.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=a.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new s(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),r.onTouch(this.hammer,function(e){t._moveSelector(e)}),this.hammer.on("tap",function(e){t._moveSelector(e)}),this.hammer.on("panstart",function(e){t._moveSelector(e)}),this.hammer.on("panmove",function(e){t._moveSelector(e)}),this.hammer.on("panend",function(e){t._moveSelector(e)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,e,i);var o=void 0,n=void 0,s=void 0,r=void 0;this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;var h=2*Math.PI/360,d=1/360,l=1/this.r,u=void 0;for(s=0;s<360;s++)for(r=0;r0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);e!==-1&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;/*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * - * Copyright (c) 2015 Jorik Tangelder; - * Licensed under the license */ -!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return Array.isArray(t)?(l(t,i[e],i),!0):!1}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function c(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ut(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function m(t,e){return typeof t==mt?t.apply(e?e[0]||a:a,e):t}function f(t,e){return t===a?e:t}function g(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function v(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function k(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=I(o);e.timeStamp=vt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=H(a,h),e.distance=F(a,h),P(i,e),e.offsetDirection=L(e.deltaX,e.deltaY);var d=R(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=gt(d.x)>gt(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?Y(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,A(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Et&&s.eventType!==At||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function A(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=Nt&&(h>Mt||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,u=R(h,d,l);o=u.x,n=u.y,i=gt(u.x)>gt(u.y)?u.x:u.y,s=L(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function N(t){for(var e=[],i=0;in;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:ft(i/e),y:ft(o/e)}}function R(t,e,i){return{x:e/t||0,y:i/t||0}}function L(t,e){return t===e?It:gt(t)>=gt(e)?0>t?Rt:Lt:0>e?Ft:Ht}function F(t,e,i){i||(i=zt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function H(t,e,i){i||(i=zt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function Y(t,e){return H(e[1],e[0],Wt)+H(t[1],t[0],Wt)}function j(t,e){return F(e[0],e[1],Wt)/F(t[0],t[1],Wt)}function G(){this.evEl=Bt,this.evWin=Ut,this.allow=!0,this.pressed=!1,O.apply(this,arguments)}function z(){this.evEl=Zt,this.evWin=Kt,O.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function W(){this.evTarget=Qt,this.evWin=$t,this.started=!1,O.apply(this,arguments)}function V(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(At|Nt)&&(i=D(i.concat(o),"identifier",!0)),[i,o]}function B(){this.evTarget=ee,this.targetIds={},O.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Et|Pt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Et)for(n=0;na&&(e.push(t),a=e.length-1):n&(At|Nt)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var Jt={touchstart:Et,touchmove:Pt,touchend:At,touchcancel:Nt},Qt="touchstart",$t="touchstart touchmove touchend touchcancel";c(W,O,{handler:function(t){var e=Jt[t.type];if(e===Et&&(this.started=!0),this.started){var i=V.call(this,t,e);e&(At|Nt)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:St,srcEvent:t})}}});var te={touchstart:Et,touchmove:Pt,touchend:At,touchcancel:Nt},ee="touchstart touchmove touchend touchcancel";c(B,O,{handler:function(t){var e=te[t.type],i=U.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:St,srcEvent:t})}}),c(q,O,{handler:function(t,e,i){var o=i.pointerType==St,n=i.pointerType==Ot;if(o)this.mouse.allow=!1;else if(n&&!this.mouse.allow)return;e&(At|Nt)&&(this.mouse.allow=!0),this.callback(t,e,i)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ie=k(pt.style,"touchAction"),oe=ie!==a,ne="compute",se="auto",re="manipulation",ae="none",he="pan-x",de="pan-y";X.prototype={set:function(t){t==ne&&(t=this.compute()),oe&&this.manager.element.style&&(this.manager.element.style[ie]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){m(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Z(t.join(" "))},preventDefaults:function(t){if(!oe){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var o=this.actions,n=b(o,ae),s=b(o,de),r=b(o,he);if(n){var a=1===t.pointers.length,h=t.distance<2,d=t.deltaTime<250;if(a&&h&&d)return}if(!r||!s)return n||s&&i&Yt||r&&i&jt?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var le=1,ue=2,ce=4,pe=8,me=pe,fe=16,ge=32;K.prototype={defaults:{},set:function(t){return ut(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(d(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=$(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return d(t,"dropRecognizeWith",this)?this:(t=$(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(d(t,"requireFailure",this))return this;var e=this.requireFail;return t=$(t,this),-1===w(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(d(t,"dropRequireFailure",this))return this;t=$(t,this);var e=w(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;pe>o&&e(i.options.event+J(o)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),o>=pe&&e(i.options.event+J(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ge)},canEmit:function(){for(var t=0;ts?Rt:Lt,i=s!=this.pX,o=Math.abs(t.deltaX)):(n=0===r?It:0>r?Ft:Ht,i=r!=this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&ue||!(this.state&ue)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Q(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ue)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),c(ot,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(At|Nt)&&!n)this.reset();else if(t.eventType&Et)this.reset(),this._timer=h(function(){this.state=me,this.tryEmit()},e.time,this);else if(t.eventType&At)return me;return ge},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===me&&(t&&t.eventType&At?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=vt(),this.manager.emit(this.options.event,this._input)))}}),c(nt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ue)}}),c(st,tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Yt|jt,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Yt|jt)?e=t.overallVelocity:i&Yt?e=t.overallVelocityX:i&jt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&>(e)>this.options.velocity&&t.eventType&At},emit:function(t){var e=Q(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(rt,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[re]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distances.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""),d):n.distance<=r?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e),d):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print(Object.keys(i))+t.printLocation(o,e),d),a=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],s=1e9,a="",h=[],d=e.toLowerCase(),l=void 0;for(var u in i){var c=void 0;if(void 0!==i[u].__type__&&n===!0){var p=t.findInOptions(e,i[u],r.copyAndExtendArray(o,u));s>p.distance&&(a=p.closestMatch,h=p.path,s=p.distance,l=p.indexMatch)}else-1!==u.toLowerCase().indexOf(d)&&(l=u),c=t.levenshteinDistance(e,u),s>c&&(a=u,h=r.copyArray(o),s=c)}return{closestMatch:a,path:h,distance:s,indexMatch:l}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length<=2||void 0===arguments[2]?"Problem value found at: \n":arguments[2],o="\n\n"+i+"options = {\n",n=0;ns;s++)o+=" ";o+=t[n]+": {\n"}for(var r=0;ro;++o)i[o].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,i){function o(t,e){var i=a().hours(0).minutes(0).seconds(0).milliseconds(0);this.start=i.clone().add(-3,"days").valueOf(),this.end=i.clone().add(4,"days").valueOf(),this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:a,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10},this.options=r.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",this._onDragStart.bind(this)),this.body.emitter.on("panmove",this._onDrag.bind(this)),this.body.emitter.on("panend",this._onDragEnd.bind(this)),this.body.emitter.on("mousewheel",this._onMouseWheel.bind(this)),this.body.emitter.on("touch",this._onTouch.bind(this)),this.body.emitter.on("pinch",this._onPinch.bind(this)),this.setOptions(e)}function n(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'+t+'". Choose "horizontal" or "vertical".')}var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=i(1),a=(i(17),i(2)),h=i(21),d=i(22);o.prototype=new h,o.prototype.setOptions=function(t){if(t){var e=["direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","rtl"];r.selectiveExtend(e,this.options,t),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}},o.prototype.setRange=function(t,e,i,o){o!==!0&&(o=!1);var n=void 0!=t?r.convert(t,"Date").valueOf():null,a=void 0!=e?r.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),i){var h=this,l=this.start,u=this.end,c="object"===("undefined"==typeof i?"undefined":s(i))&&"duration"in i?i.duration:500,p="object"===("undefined"==typeof i?"undefined":s(i))&&"easingFunction"in i?i.easingFunction:"easeInOutQuad",m=r.easingFunctions[p];if(!m)throw new Error("Unknown easing function "+JSON.stringify(p)+". Choose from: "+Object.keys(r.easingFunctions).join(", "));var f=(new Date).valueOf(),g=!1,v=function _(){if(!h.props.touch.dragging){var t=(new Date).valueOf(),e=t-f,i=m(e/c),s=e>c,r=s||null===n?n:l+(n-l)*i,p=s||null===a?a:u+(a-u)*i;y=h._applyRange(r,p),d.updateHiddenDates(h.options.moment,h.body,h.options.hiddenDates),g=g||y,y&&h.body.emitter.emit("rangechange",{start:new Date(h.start),end:new Date(h.end),byUser:o}),s?g&&h.body.emitter.emit("rangechanged",{start:new Date(h.start),end:new Date(h.end),byUser:o}):h.animationTimer=setTimeout(_,20)}};return v()}var y=this._applyRange(n,a);if(d.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),y){var b={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",b),this.body.emitter.emit("rangechanged",b)}},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?r.convert(t,"Date").valueOf():this.start,n=null!=e?r.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(o>n&&(n=o),null!==a&&a>o&&(i=a-o,o+=i,n+=i,null!=s&&n>s&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=a&&a>o&&(o=a)),null!==this.options.zoomMin){var h=parseFloat(this.options.zoomMin);0>h&&(h=0),h>n-o&&(this.end-this.start===h&&o>this.start&&nd&&(d=0),n-o>d&&(this.end-this.start===d&&othis.end?(o=this.start,n=this.end):(i=n-o-d,o+=i/2,n-=i/2))}var l=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;n(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start,s=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);o-=s;var r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;if(this.options.rtl)var a=i/r*o;else var a=-i/r*o;var h=this.props.touch.start+a,l=this.props.touch.end+a,u=d.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0),c=d.snapAwayFromHidden(this.body.hiddenDates,l,this.previousDelta-i,!0);if(u!=h||c!=l)return this.deltaDifference+=i,this.props.touch.start=u,this.props.touch.end=c,void this._onDrag(t);this.previousDelta=i,this._applyRange(h,l);var p=new Date(this.start),m=new Date(this.end);this.body.emitter.emit("rangechange",{start:p,end:m,byUser:!0})}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0}))},o.prototype._onMouseWheel=function(t){if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&(!this.options.zoomKey||t[this.options.zoomKey])){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){var i;i=0>e?1-e/5:1/(1+e/5);var o=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center),n=this._pointerToDate(o);this.zoom(i,n,e)}t.preventDefault()}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end, -this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center));var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),s=o-n,r=i-n+(this.props.touch.start-(i-n))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=0>=1-e,this.endToFront=0>=e-1;var h=d.snapAwayFromHidden(this.body.hiddenDates,r,1-e,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);h==r&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX;if(this.options.rtl)var i=e-r.getAbsoluteLeft(this.body.dom.centerContainer);else var i=r.getAbsoluteRight(this.body.dom.centerContainer)-e;var o=this.body.util.toTime(i);return o>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(n(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.getPointer=function(t,e){return this.options.rtl?{x:r.getAbsoluteRight(e)-t.x,y:t.y-r.getAbsoluteTop(e)}:{x:t.x-r.getAbsoluteLeft(e),y:t.y-r.getAbsoluteTop(e)}},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=d.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);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){function i(t,e){this.options=null,this.props=null}i.prototype.setOptions=function(t){t&&util.extend(this.options,t)},i.prototype.redraw=function(){return!1},i.prototype.destroy=function(){},i.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=i},function(t,e){e.convertHiddenOptions=function(t,i,o){if(o&&!Array.isArray(o))return e.convertHiddenOptions(t,i,[o]);if(i.hiddenDates=[],o&&1==Array.isArray(o)){for(var n=0;n=4*a){var c=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(c=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-c,"days"),p.add(1,"weeks");break;case"weekly":var m=l.diff(d,"days"),f=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(f),l.day(f),l.add(m,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(c=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(c,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(c=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(c,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;p>d;)switch(i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()}),o[h].repeat){case"daily":d.add(1,"days"),l.add(1,"days");break;case"weekly":d.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":d.add(1,"months"),l.add(1,"months");break;case"yearly":d.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()})}}e.removeDuplicates(i);var g=e.isHidden(i.range.start,i.hiddenDates),v=e.isHidden(i.range.end,i.hiddenDates),y=i.range.start,b=i.range.end;1==g.hidden&&(y=1==i.range.startToFront?g.startDate-1:g.endDate+1),1==v.hidden&&(b=1==i.range.endToFront?v.startDate-1:v.endDate+1),1!=g.hidden&&1!=v.hidden||i.range._applyRange(y,b)}},e.removeDuplicates=function(t){for(var e=t.hiddenDates,i=[],o=0;o=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(var o=0;o=r&&a>n){o=!0;break}}if(1==o&&n=e&&i>r&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?0>o?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&n>t)return{hidden:!0,startDate:o,endDate:n}}return{hidden:!1,startDate:o,endDate:n}}},function(t,e,i){function o(){}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(19),r=i(14),a=i(17),h=i(1),d=(i(8),i(10),i(20),i(24),i(34)),l=i(35),u=i(22),c=i(37);s(o.prototype),o.prototype._create=function(t){function e(t){i.isActive()&&i.emit("mousewheel",t)}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.on("rangechange",function(){this.initialDrawDone===!0&&this._redraw()}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("pan",this._onDrag.bind(this));var i=this;this.on("_change",function(t){t&&1==t.queue?i._redrawTimer||(i._redrawTimer=setTimeout(function(){i._redrawTimer=null,i._redraw()},0)):i._redraw()}),this.hammer=new r(this.dom.root);var o=this.hammer.get("pinch").set({enable:!0});a.disablePreventDefaultVertically(o),this.hammer.get("pan").set({threshold:5,direction:r.DIRECTION_HORIZONTAL}),this.listeners={};var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];if(n.forEach(function(t){var e=function(e){i.isActive()&&i.emit(t,e)};i.hammer.on(t,e),i.listeners[t]=e}),a.onTouch(this.hammer,function(t){i.emit("touch",t)}.bind(this)),a.onRelease(this.hammer,function(t){i.emit("release",t)}.bind(this)),this.dom.root.addEventListener("mousewheel",e),this.dom.root.addEventListener("DOMMouseScroll",e),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","rtl","throttleRedraw"];if(h.selectiveExtend(e,this.options,t),this.options.rtl){var i=this.dom.leftContainer;this.dom.leftContainer=this.dom.rightContainer,this.dom.rightContainer=i,this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"}if(this.options.orientation={item:void 0,axis:void 0},"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"===n(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var o=this.timeAxis2=new d(this.body);o.setOptions=function(t){var e=t?h.extend({},t):{};e.orientation="top",d.prototype.setOptions.call(o,e)},this.components.push(o)}}else if(this.timeAxis2){var s=this.components.indexOf(this.timeAxis2);-1!==s&&this.components.splice(s,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&u.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new l(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var r=h.deepExtend({},this.options);this.components.forEach(function(t){h.deepExtend(r,t.options)}),this.configurator.setModuleOptions({global:r})}this._origRedraw?this._redraw():(this._origRedraw=this._redraw.bind(this),this._redraw=h.throttle(this._origRedraw,this.options.throttleRedraw))},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));i.length>0&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));return e[0].getCustomTime()},o.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));return i.length>0?i[0].setCustomTitle(t):void 0},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?h.convert(t,"Date").valueOf():new Date,o=this.customTimes.some(function(t){return t.options.id===e});if(o)throw new Error("A custom time with id "+JSON.stringify(e)+" already exists");var n=new c(this.body,h.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var i=e.max-e.min,o=new Date(e.min.valueOf()-.01*i),n=new Date(e.max.valueOf()+.01*i),s=t&&void 0!==t.animation?t.animation:!0;this.range.setRange(o,n,s)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i){var o;if(1==arguments.length){var n=arguments[0];o=void 0!==n.animation?n.animation:!0,this.range.setRange(n.start,n.end,o)}else o=i&&void 0!==i.animation?i.animation:!0,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=h.convert(t,"Date").valueOf(),n=o-i/2,s=o+i/2,r=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(n,s,r)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.root.offsetWidth){u.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(h.addClassName(o.root,"vis-top"),h.removeClassName(o.root,"vis-bottom")):(h.removeClassName(o.root,"vis-top"),h.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=h.option.asSize(e.maxHeight,""),o.root.style.minHeight=h.option.asSize(e.minHeight,""),o.root.style.width=h.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var n=o.root.offsetHeight-o.root.clientHeight,s=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(s=n),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var a=Math.max(i.left.height,i.center.height,i.right.height),d=i.top.height+a+i.bottom.height+n+i.border.top+i.border.bottom;o.root.style.height=h.option.asSize(e.height,d+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-n;var l=i.root.height-i.top.height-i.bottom.height-n;i.centerContainer.height=l,i.leftContainer.height=l,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-s,i.left.width=o.leftContainer.clientWidth||-i.border.left,i.leftContainer.width=i.left.width,i.right.width=o.rightContainer.clientWidth||-i.border.right,i.rightContainer.width=i.right.width;var c=i.root.width-i.left.width-i.right.width-s;i.center.width=c,i.centerContainer.width=c,i.top.width=c,i.bottom.width=c,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.rightContainer.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px",this._updateScrollTop();var p=this.props.scrollTop;"top"!=e.orientation.item&&(p+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=p+"px",o.left.style.left="0",o.left.style.top=p+"px",o.right.style.left="0",o.right.style.top=p+"px";var m=0==this.props.scrollTop?"hidden":"",f=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=m,o.shadowBottom.style.visibility=f,o.shadowTopLeft.style.visibility=m,o.shadowBottomLeft.style.visibility=f,o.shadowTopRight.style.visibility=m,o.shadowBottomRight.style.visibility=f;var g=this.props.center.height>this.props.centerContainer.height;this.hammer.get("pan").set({direction:g?r.DIRECTION_ALL:r.DIRECTION_HORIZONTAL}),this.components.forEach(function(e){t=e.redraw()||t});var v=5;if(t){if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTope;e++)o=this.selection[e],n=this.items[o],n&&n.unselect();for(this.selection=[],e=0,i=t.length;i>e;e++)o=t[e],n=this.items[o],n&&(this.selection.push(o),n.select())},o.prototype.getSelection=function(){return this.selection.concat([])},o.prototype.getVisibleItems=function(){var t=this.body.range.getRange();if(this.options.rtl)var e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end);else var i=this.body.util.toScreen(t.start),e=this.body.util.toScreen(t.end);var o=[];for(var n in this.groups)if(this.groups.hasOwnProperty(n))for(var s=this.groups[n],r=s.visibleItems,a=0;ae&&o.push(h.id):h.lefti&&o.push(h.id)}return o},o.prototype._deselect=function(t){ -for(var e=this.selection,i=0,o=e.length;o>i;i++)if(e[i]==t){e.splice(i,1);break}},o.prototype.redraw=function(){var t=this.options.margin,e=this.body.range,i=r.option.asSize,o=this.options,n=o.orientation.item,s=!1,a=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="vis-itemset",s=this._orderGroups()||s;var h=e.end-e.start,d=h!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth;d&&(this.stackDirty=!0),this.lastVisibleInterval=h,this.props.lastWidth=this.props.width;var l=this.stackDirty,u=this._firstGroup(),c={item:t.item,axis:t.axis},p={item:t.item,axis:t.item.vertical/2},m=0,f=t.axis+t.item.vertical;return this.groups[y].redraw(e,p,l),r.forEach(this.groups,function(t){var i=t==u?c:p,o=t.redraw(e,i,l);s=o||s,m+=t.height}),m=Math.max(m,f),this.stackDirty=!1,a.style.height=i(m),this.props.width=a.offsetWidth,this.props.height=m,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",s=this._isResized()||s},o.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t],i=this.groups[e]||this.groups[v];return i||null},o.prototype._updateUngrouped=function(){var t,e,i=this.groups[v];this.groups[y];if(this.groupsData){if(i){i.hide(),delete this.groups[v];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}else if(!i){var s=null,r=null;i=new u(s,r,this),this.groups[v]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},o.prototype.getLabelSet=function(){return this.dom.labelSet},o.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof a||t instanceof h))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(r.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;r.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},o.prototype.getItems=function(){return this.itemsData},o.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(r.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof a||t instanceof h))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;r.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},o.prototype.getGroups=function(){return this.groupsData},o.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},o.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},o.prototype._getGroupId=function(t){var e=this._getType(t);return"background"==e&&void 0==t.group?y:this.groupsData?t.group:v},o.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i,n=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=e._getType(n),a=o.types[r];if(s&&(a&&s instanceof a?e._updateItem(s,n):(i=s.selected,e._removeItem(s),s=null)),!s){if(!a)throw"rangeoverflow"==r?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+r+'"');s=new a(n,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0})},o.prototype._onAdd=o.prototype._onUpdate,o.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0}))},o.prototype._order=function(){r.forEach(this.groups,function(t){t.order()})},o.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},o.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==v||t==y)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=Object.create(e.options);r.extend(n,{height:null}),o=new u(t,i,e),e.groups[t]=o;for(var s in e.items)if(e.items.hasOwnProperty(s)){var a=e.items[s];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})},o.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},o.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder}),e=!r.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},o.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i&&i.add(t)},o.prototype._updateItem=function(t,e){var i=t.data.group,o=t.data.subgroup;if(t.setData(e),i!=t.data.group||o!=t.data.subgroup){var n=this.groups[i];n&&n.remove(t);var s=this._getGroupId(t.data),r=this.groups[s];r&&r.add(t)}},o.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},o.prototype._constructByEndArray=function(t){for(var e=[],i=0;in+s)return}else{var a=e.height;if(n+a-s>o)return}}if(e&&e!=this.groupTouchParams.group){var h=this.groupsData,d=h.get(e.groupId),l=h.get(this.groupTouchParams.group.groupId);l&&d&&(this.options.groupOrderSwap(l,d,this.groupsData),this.groupsData.update(l),this.groupsData.update(d));var u=this.groupsData.getIds({order:this.options.groupOrder});if(!r.equalArray(u,this.groupTouchParams.originalOrder))for(var h=this.groupsData,c=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,m=Math.min(c.length,u.length),f=0,g=0,v=0;m>f;){for(;m>f+g&&m>f+v&&u[f+g]==c[f+v];)f++;if(f+g>=m)break;if(u[f+g]!=p)if(c[f+v]!=p){var y=u.indexOf(c[f+v]),b=h.get(u[f+g]),_=h.get(c[f+v]);this.options.groupOrderSwap(b,_,h),h.update(b),h.update(_);var w=u[f+g];u[f+g]=c[f+v],u[y]=w,f++}else v=1;else g=1}}}},o.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=r.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!r.equalArray(n,e.groupTouchParams.originalOrder))for(var s=e.groupTouchParams.originalOrder,a=Math.min(s.length,n.length),h=0;a>h;){for(;a>h&&n[h]==s[h];)h++;if(h>=a)break;var d=n.indexOf(s[h]),l=o.get(n[h]),u=o.get(s[h]);e.options.groupOrderSwap(l,u,o),groupsData.update(l),groupsData.update(u);var c=n[h];n[h]=s[h],n[d]=c,h++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),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,event:t})}},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(o){var n=e.itemsData.get(o.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}else{if(this.options.rtl)var s=r.getAbsoluteRight(this.dom.frame),a=s-t.center.x;else var s=r.getAbsoluteLeft(this.dom.frame),a=t.center.x-s;var h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),u={start:i?i(h,d,l):h,content:"new item"};if("range"===this.options.type){var c=this.body.util.toTime(a+this.props.width/5);u.end=i?i(c,d,l):c}u[this.itemsData._fieldId]=r.randomUUID();var p=this.groupFromTarget(t);p&&(u.group=p.groupId),u=this._cloneItemData(u),this.options.onAdd(u,function(t){t&&e.itemsData.getDataSet().add(t)})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[],n=t.srcEvent&&t.srcEvent.shiftKey||!1;if(n&&this.options.multiselect){var s=this.itemsData.get(e.id).group,r=void 0;this.options.multiselectPerGroup&&i.length>0&&(r=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=r&&r!=s||i.push(e.id);var a=o._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||r==s){i=[];for(var h in this.items)if(this.items.hasOwnProperty(h)){var d=this.items[h],l=d.data.start,u=void 0!==d.data.end?d.data.end:l;!(l>=a.min&&u<=a.max)||this.options.multiselectPerGroup&&r!=this.itemsData.get(d.id).group||d instanceof g||i.push(d.id)}}}else{var c=i.indexOf(e.id);-1==c?i.push(e.id):i.splice(c,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,i=0;ia&&ea)return n}else if(0===i&&e0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*n>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),15*s>t&&(this.scale="minute",this.step=15),10*s>t&&(this.scale="minute",this.step=10),5*s>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.switchedYear=!1,this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.switchedMonth=!1,this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.switchedDay=!1,this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},o.prototype.getLabelMinor=function(t){void 0==t&&(t=this.current);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getLabelMajor=function(t){void 0==t&&(t=this.current);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/h%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(s().add(1,"day"),"day")?" vis-tomorrow":t.isSame(s().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}function n(t){return t.isSame(new Date,"year")?" vis-current-year":""}var s=this.moment,r=this.moment(this.current),a=r.locale?r.locale("en"):r.lang("en"),h=this.step;switch(this.scale){case"millisecond":return t(a.milliseconds()).trim();case"second":return t(a.seconds()).trim();case"minute":return t(a.minutes()).trim();case"hour":var d=a.hours();return 4==this.step&&(d=d+"-h"+(d+4)),"vis-h"+d+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+i(a)+t(a.date());case"day":var l=a.date(),u=a.format("MMMM").toLowerCase();return"vis-day"+l+" vis-"+u+o(a)+t(l-1);case"month":return"vis-"+a.format("MMMM").toLowerCase()+o(a)+t(a.month());case"year":var c=a.year();return"vis-year"+c+n(a)+t(c);default:return""}},t.exports=o},function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(1),s=i(27);i(28);o.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e;if(e=this.itemSet.options&&this.itemSet.options.groupTemplate?this.itemSet.options.groupTemplate(t):t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?n.removeClassName(this.dom.inner,"vis-hidden"):n.addClassName(this.dom.inner,"vis-hidden");var i=t&&t.className||null;i!=this.className&&(this.className&&(n.removeClassName(this.dom.label,this.className),n.removeClassName(this.dom.foreground,this.className),n.removeClassName(this.dom.background,this.className),n.removeClassName(this.dom.axis,this.className)),n.addClassName(this.dom.label,i),n.addClassName(this.dom.foreground,i),n.addClassName(this.dom.background,i),n.addClassName(this.dom.axis,i),this.className=i),this.style&&(n.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(n.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;if(r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,n.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),this._calculateSubGroupHeights(),"function"==typeof this.itemSet.options.order){if(i){var a=this,h=!1;n.forEach(this.items,function(t){t.displayed||(t.redraw(),a.visibleItems.push(t)),t.repositionX(h)});var d=this.orderedItems.byStart.slice().sort(function(t,e){return a.itemSet.options.order(t.data,e.data)});s.stack(d,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?s.stack(this.visibleItems,e,i):s.nostack(this.visibleItems,e,this.subgroups);var l=this._calculateHeight(e),u=this.dom.foreground;this.top=u.offsetTop,this.right=u.offsetLeft,this.width=u.offsetWidth,o=n.updateProperty(this,"height",l)||o,o=n.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=n.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=l+"px",this.dom.foreground.style.height=l+"px",this.dom.label.style.height=l+"px";for(var c=0,p=this.visibleItems.length;p>c;c++){var m=this.visibleItems[c];m.repositionY(e)}return o},o.prototype._calculateSubGroupHeights=function(){if(Object.keys(this.subgroups).length>0){var t=this;this.resetSubgroups(),n.forEach(this.visibleItems,function(e){void 0!==e.data.subgroup&&(t.subgroups[e.data.subgroup].height=Math.max(t.subgroups[e.data.subgroup].height,e.height),t.subgroups[e.data.subgroup].visible=!0)})}},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,s=i[0].top+i[0].height;if(n.forEach(i,function(t){o=Math.min(o,t.top),s=Math.max(s,t.top+t.height)}),o>t.axis){var r=o-t.axis;s-=r,n.forEach(i,function(t){t.top-=r})}e=s+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;it?-1:l>=t?0:1};if(e.length>0)for(s=0;sl}),1==this.checkRangedItems)for(this.checkRangedItems=!1,s=0;sl})}for(s=0;s=0&&(s=e[r],!n(s));r--)void 0===o[s.id]&&(o[s.id]=!0,i.push(s));for(r=t+1;rn;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,l.options.rtl)){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].indexe.right&&t.top-o.vertical+ie.top:t.left-o.horizontal+ie.left&&t.top-o.vertical+ie.top}},function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,this.options=i,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var n=(i(14),i(29));o.prototype=new n(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){return this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintDeleteButton(t.box),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end);void 0!==t&&t!==!0||(-o>n&&(n=-o),s>2*o&&(s=2*o));var r=Math.max(s-n,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=r+this.props.content.width,i=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=r,i=Math.min(s-n,this.props.content.width)),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.options.rtl?this.dom.content.style.right="0":this.dom.content.style.left="0";break;case"right":this.options.rtl?this.dom.content.style.right=Math.max(r-i,0)+"px":this.dom.content.style.left=Math.max(r-i,0)+"px";break;case"center":this.options.rtl?this.dom.content.style.right=Math.max((r-i)/2,0)+"px":this.dom.content.style.left=Math.max((r-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:0>n?-n:0,this.options.rtl?this.dom.content.style.right=e+"px":this.dom.content.style.left=e+"px"}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.editable=null,this.data&&this.data.hasOwnProperty("editable")&&"boolean"==typeof this.data.editable&&(this.editable=t.editable)}var n=i(14),s=i(1);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),t.hasOwnProperty("editable")&&"boolean"==typeof t.editable&&(this.editable=t.editable),this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.remove||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.deleteButton){var i=this,o=document.createElement("div");this.options.rtl?o.className="vis-delete-rtl":o.className="vis-delete",o.title="Delete this item",new n(o).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(o),this.dom.deleteButton=o}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._updateContents=function(t){var e;if(this.options.template){var i=this.parent.itemSet.itemsData.get(this.id);e=this.options.template(i)}else e=this.data.content;var o=this._contentToString(this.content)!==this._contentToString(e);if(o){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("vis-title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;in;n++){var r=this.visibleItems[n];r.repositionY(e)}return o},o.prototype.show=function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=o},function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},this.options=i,t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);n.call(this,t,e,i)}var n=i(29);i(1);o.prototype=new n(null,null,null),o.prototype.isVisible=function(t){var e=(t.end-t.start)/4;return this.data.start>t.start-e&&this.data.startt.start-e&&this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation.item;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,n=this.parent.subgroups,r=n[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in n)n.hasOwnProperty(h)&&1==n[h].visible&&n[h].indexr&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof s?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},t.exports=o},function(t,e,i){function o(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:a.FORMAT,moment:d,timeAxis:null},this.options=s.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(21),a=i(25),h=i(22),d=i(2);o.prototype=new r,o.prototype.setOptions=function(t){t&&(s.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),s.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===n(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof d.locale?d.locale(t.locale):d.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},o.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},o.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o;this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=s.convert(this.body.range.start,"Number"),i=s.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),n=o-h.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,o);n-=this.body.util.toTime(0).valueOf();var r=new a(new Date(e),new Date(i),n,this.body.hiddenDates);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;var d=this.dom;d.redundant.lines=d.lines,d.redundant.majorTexts=d.majorTexts,d.redundant.minorTexts=d.minorTexts,d.lines=[],d.majorTexts=[],d.minorTexts=[];var u,c,p,m,f,g,v,y,b,_,w=0,x=void 0,D=0,k=1e3;for(r.start(),c=r.getCurrent(),m=this.body.util.toScreen(c);r.hasNext()&&k>D;){D++,f=r.isMajor(),_=r.getClassName(),b=r.getLabelMinor(),u=c,p=m,r.next(),c=r.getCurrent(),g=r.isMajor(),m=this.body.util.toScreen(c),v=w,w=m-p;var S=w>=.4*v;if(this.options.showMinorLabels&&S){var C=this._repaintMinorText(p,b,t,_);C.style.width=w+"px"}f&&this.options.showMajorLabels?(p>0&&(void 0==x&&(x=p),C=this._repaintMajorText(p,r.getLabelMajor(),t,_)),y=this._repaintMajorLine(p,w,t,_)):S?y=this._repaintMinorLine(p,w,t,_):y&&(y.style.width=parseInt(y.style.width)+w+"px")}if(D!==k||l||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to "+k+" lines."),l=!0),this.options.showMajorLabels){var O=this.body.util.toTime(0),T=r.getLabelMajor(O),M=T.length*(this.props.majorCharWidth||10)+10;(void 0==x||x>M)&&this._repaintMajorText(0,T,t,_)}s.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},o.prototype._repaintMinorText=function(t,e,i,o){var n=this.dom.redundant.minorTexts.shift();if(!n){var s=document.createTextNode("");n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.minorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.top="top"==i?this.props.majorLabelHeight+"px":"0",this.options.rtl?(n.style.left="",n.style.right=t+"px"):n.style.left=t+"px",n.className="vis-text vis-minor "+o,n},o.prototype._repaintMajorText=function(t,e,i,o){var n=this.dom.redundant.majorTexts.shift();if(!n){var s=document.createTextNode(e);n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.majorTexts.push(n),n.childNodes[0].nodeValue=e,n.className="vis-text vis-major "+o,n.style.top="top"==i?"0":this.props.minorLabelHeight+"px",this.options.rtl?(n.style.left="",n.style.right=t+"px"):n.style.left=t+"px",n},o.prototype._repaintMinorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top=s.majorLabelHeight+"px":n.style.top=this.body.domProps.top.height+"px",n.style.height=s.minorLineHeight+"px",this.options.rtl?(n.style.left="",n.style.right=t-s.minorLineWidth/2+"px",n.className="vis-grid vis-vertical-rtl vis-minor "+o):(n.style.left=t-s.minorLineWidth/2+"px",n.className="vis-grid vis-vertical vis-minor "+o),n.style.width=e+"px",n},o.prototype._repaintMajorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top="0":n.style.top=this.body.domProps.top.height+"px",this.options.rtl?(n.style.left="",n.style.right=t-s.majorLineWidth/2+"px",n.className="vis-grid vis-vertical-rtl vis-major "+o):(n.style.left=t-s.majorLineWidth/2+"px",n.className="vis-grid vis-vertical vis-major "+o),n.style.height=s.majorLineHeight+"px",n.style.width=e+"px",n},o.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth};var l=!1;t.exports=o},function(t,e,i){function o(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=a(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this,i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];i.forEach(function(t){e.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(i){n(i.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=s(),this.escListener=this.deactivate.bind(this)}function n(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var s=i(36),r=i(19),a=i(14),h=i(1);r(o.prototype),o.current=null,o.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.hammer.destroy(),this.hammer=null},o.prototype.activate=function(){o.current&&o.current.deactivate(),o.current=this,this.active=!0,this.dom.overlay.style.display="none",h.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},o.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",h.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},o.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},t.exports=o},function(t,e,i){var o,n,s;!function(i,r){n=[],o=r,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(this,function(){function t(t){var e,i=t&&t.preventDefault||!1,o=t&&t.container||window,n={},s={keydown:{},keyup:{}},r={};for(e=97;122>=e;e++)r[String.fromCharCode(e)]={code:65+(e-97),shift:!1};for(e=65;90>=e;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;9>=e;e++)r[""+e]={code:48+e,shift:!1};for(e=1;12>=e;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;9>=e;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r["delete"]={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==s[e][t.keyCode]){for(var o=s[e][t.keyCode],n=0;no&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="date",a="object",h="dom",d="moment",l="any",u={configure:{enabled:{"boolean":o},filter:{"boolean":o,"function":"function"},container:{dom:h},__type__:{object:a,"boolean":o,"function":"function"}},align:{string:i},rtl:{"boolean":o,undefined:"undefined"},autoResize:{"boolean":o},throttleRedraw:{number:n},clickToUse:{"boolean":o},dataAttributes:{string:i,array:s},editable:{add:{"boolean":o,undefined:"undefined"},remove:{"boolean":o,undefined:"undefined"},updateGroup:{"boolean":o,undefined:"undefined"},updateTime:{"boolean":o,undefined:"undefined"},__type__:{"boolean":o,object:a}},end:{number:n,date:r,string:i,moment:d},format:{minorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a}},majorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a}},__type__:{object:a}},moment:{"function":"function"},groupOrder:{string:i,"function":"function"},groupEditable:{add:{"boolean":o,undefined:"undefined"},remove:{"boolean":o,undefined:"undefined"},order:{"boolean":o,undefined:"undefined"},__type__:{"boolean":o,object:a}},groupOrderSwap:{"function":"function"},height:{string:i,number:n},hiddenDates:{start:{date:r,number:n,string:i,moment:d},end:{date:r,number:n,string:i,moment:d},repeat:{string:i},__type__:{object:a,array:s}},itemsAlwaysDraggable:{"boolean":o},locale:{string:i},locales:{__any__:{any:l},__type__:{object:a}},margin:{axis:{number:n},item:{horizontal:{number:n,undefined:"undefined"},vertical:{number:n,undefined:"undefined"},__type__:{object:a,number:n}},__type__:{object:a,number:n}},max:{date:r,number:n,string:i,moment:d},maxHeight:{number:n,string:i},maxMinorChars:{number:n},min:{date:r,number:n,string:i,moment:d},minHeight:{number:n,string:i},moveable:{"boolean":o},multiselect:{"boolean":o},multiselectPerGroup:{"boolean":o},onAdd:{"function":"function"},onUpdate:{"function":"function"},onMove:{"function":"function"},onMoving:{"function":"function"},onRemove:{"function":"function"},onAddGroup:{"function":"function"},onMoveGroup:{"function":"function"},onRemoveGroup:{"function":"function"},order:{"function":"function"},orientation:{axis:{string:i,undefined:"undefined"},item:{string:i,undefined:"undefined"},__type__:{string:i,object:a}},selectable:{"boolean":o},showCurrentTime:{"boolean":o},showMajorLabels:{"boolean":o},showMinorLabels:{"boolean":o},stack:{"boolean":o},snap:{"function":"function","null":"null"},start:{date:r,number:n,string:i,moment:d},template:{"function":"function"},groupTemplate:{"function":"function"},timeAxis:{scale:{string:i,undefined:"undefined"},step:{number:n,undefined:"undefined"},__type__:{object:a}},type:{string:i},width:{string:i,number:n},zoomable:{"boolean":o},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:n},zoomMin:{number:n},__type__:{object:a}},c={global:{align:["center","left","right"],direction:!1,autoResize:!0,throttleRedraw:[10,0,1e3,10],clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",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:""}},groupsDraggable:!1,height:"",locale:"",margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,start:"",type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1]}};e.allOptions=u,e.configureOptions=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e,i,o){if(!(Array.isArray(i)||i instanceof u||i instanceof c)&&i instanceof Object){var n=o;o=i,i=n}var s=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:d,width:null,height:null,maxHeight:null,minHeight:null},this.options=l.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new p(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new f(this.body),this.components.push(this.timeAxis),this.currentTime=new g(this.body),this.components.push(this.currentTime),this.linegraph=new y(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){s.emit("click",s.getEventProperties(t))}),this.on("doubletap",function(t){s.emit("doubleClick",s.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var s=i(12),r=o(s),a=i(18),h=o(a),d=(i(19),i(14),i(2)),l=i(1),u=i(8),c=i(10),p=i(20),m=i(23),f=i(34),g=i(39),v=i(37),y=i(42),b=i(18).printStyle,_=i(50).allOptions,w=i(50).configureOptions;n.prototype=new m,n.prototype.setOptions=function(t){var e=h["default"].validate(t,_);e===!0&&console.log("%cErrors have been found in the supplied options object.",b),m.prototype.setOptions.call(this,t)},n.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t instanceof u||t instanceof c?t:new u(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.linegraph&&this.linegraph.setItems(e),i)if(void 0!=this.options.start||void 0!=this.options.end){var o=void 0!=this.options.start?this.options.start:null,n=void 0!=this.options.end?this.options.end:null;this.setWindow(o,n,{animation:!1})}else this.fit({animation:!1})},n.prototype.setGroups=function(t){var e;e=t?t instanceof u||t instanceof c?t:new u(t):null,this.groupsData=e,this.linegraph.setGroups(e)},n.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},n.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]):!1},n.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var o=0;os?s:t,e=null==e?s:s>e?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-l.getAbsoluteLeft(this.dom.centerContainer),n=i-l.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(o),r=v.customTimeFromTarget(t),a=l.getTarget(t),h=null;l.hasParent(a,this.timeAxis.dom.foreground)?h="axis":this.timeAxis2&&l.hasParent(a,this.timeAxis2.dom.foreground)?h="axis":l.hasParent(a,this.linegraph.yAxisLeft.dom.frame)?h="data-axis":l.hasParent(a,this.linegraph.yAxisRight.dom.frame)?h="data-axis":l.hasParent(a,this.linegraph.legendLeft.dom.frame)?h="legend":l.hasParent(a,this.linegraph.legendRight.dom.frame)?h="legend":null!=r?h="custom-time":l.hasParent(a,this.currentTime.bar)?h="current-time":l.hasParent(a,this.dom.center)&&(h="background");var d=[],u=this.linegraph.yAxisLeft,c=this.linegraph.yAxisRight;return u.hidden||d.push(u.screenToValue(n)),c.hidden||d.push(c.screenToValue(n)),{event:t,what:h,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:s,value:d}},n.prototype._createConfigurator=function(){return new r["default"](this,this.dom.container,w)},t.exports=n},function(t,e,i){function o(t,e){this.id=s.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=s.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){i.lastStart=i.body.range.start,i.svg.style.left=s.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(7),a=i(8),h=i(10),d=i(21),l=i(43),u=i(45),c=i(49),p=i(46),m=i(48),f=i(47),g="__ungrouped__";o.prototype=new d,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new l(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new l(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new c(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new c(this.body,this.options.legend,"right",this.options.groups),this.show()},o.prototype.setOptions=function(t){if(t){var e=["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))i?-1:1});for(var o=new Array(t.length),n=0;n0){var h={};for(this._getRelevantData(a,h,n,s),this._applySampling(a,h),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(a[e])||(l[a[e]]=m.calcPath(h[a[e]],t)),m.draw(l[a[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||f.draw(h[a[e]],t,this.framework);break;case"bar":}}}return r.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,0==o?t[a].y=t[a].orginalY+r.y:t[a].y=t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var n,r,a,h;if(t.length>0)for(r=0;rt?-1:1},u=Math.max(0,s.binarySearchValue(d,i,"x","before",l)),c=Math.min(d.length,s.binarySearchValue(d,o,"x","after",l)+1);0>=c&&(c=d.length);var p=new Array(c-u);for(a=u;c>a;a++)h=n.itemsData[a],p[a-u]=h;e[t[r]]=p}else e[t[r]]=n.itemsData}},o.prototype._applySampling=function(t,e){var i;if(t.length>0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;r>l;l+=s){var u=Math.round(l/s);d[u]=n[l]}e[t[o]]=d.splice(0,Math.round(r/s))}}},o.prototype._getYRanges=function(t,e,i){var o,n,s,r,a=[],h=[];if(t.length>0){for(s=0;s0&&(n=this.groups[t[s]],r.stack===!0&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n.getItems()):h=h.concat(n.getItems()):i[t[s]]=n.getYRange(o,t[s]));p.getStackedYRange(a,i,t,"__barStackLeft","left"),p.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var u=0;ui?i:a,d=o>d?o:d):(r=!0,h=h>i?i:h,l=o>l?o:l));1==s&&this.yAxisLeft.setRange(a,d),1==r&&this.yAxisRight.setRange(h,l)}n=this._toggleAxisVisiblity(s,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(r,this.yAxisRight)||n,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(1==r?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;for(var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"],u=0;ut?-1:1});for(var a=0;a=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),t.master===!0&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var d=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(d=this.props.titleCharHeight);var l=this.options.icons===!0?Math.max(this.options.iconWidth,d)+this.options.labelOffsetX+15:d+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&this.options.visible===!0?(this.width=this.maxLabelSize+l,this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var r=s.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"===i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize.5*(h.magnitudefactor*h.minorSteps[h.minorStepIdx])?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}i.prototype.setCharHeight=function(t){this.majorCharHeight=t},i.prototype.setHeight=function(t){this.containerHeight=t},i.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;0>i&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(n===!0)break}},i.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0},i.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},i.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},i.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},i.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},i.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&o-i>u?(s(),d=!1):d=!0}}},i.prototype.convertValue=function(t){return this.containerHeight-(t-this._start)*this.scale},i.prototype.screenToValue=function(t){return(this.containerHeight-t)/this.scale+this._start},t.exports=i},function(t,e,i){function o(t,e,i,o){this.id=e;var n=["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"];this.options=s.selectiveBridgeObject(n,i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=o,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible?!0:t.visible}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=(i(7),i(46)),a=i(48),h=i(47);o.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&s.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];s.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),s.mergeOptions(this.options,t,"interpolation"),s.mergeOptions(this.options,t,"drawPoints"),s.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==n(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible?!0:t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");i={svg:s,svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":a.drawIcon(this,o,n,t,e,i);break;case"points":case"point":h.drawIcon(this,o,n,t,e,i);break;case"bar":r.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=i>t?i:t,n=0,"left"===e.options.barChart.align?n-=.5*t:"right"===e.options.barChart.align&&(n+=.5*t)):(o=e.options.barChart.width,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.getStackedYRange=function(t,e,i,n,s){if(t.length>0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){var i=[];return i=1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var u={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,u,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o=e;if(i)for(var n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(var n=1;nl;l++)e=0==l?t[0]:t[l-1],i=t[l],o=t[l+1],n=d>l+2?t[l+2]:o,s={screen_x:(-e.screen_x+6*i.screen_x+o.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+o.screen_y)*h},r={screen_x:(i.screen_x+6*o.screen_x-n.screen_x)*h,screen_y:(i.screen_y+6*o.screen_y-n.screen_y)*h},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([o.screen_x,o.screen_y]);return a},o._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var o,n,s,r,a,h,d,l,u,c,p,m,f,g,v,y,b,_,w,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var D=t.length,k=0;D-1>k;k++)o=0==k?t[0]:t[k-1],n=t[k],s=t[k+1],r=D>k+2?t[k+2]:s,d=Math.sqrt(Math.pow(o.screen_x-n.screen_x,2)+Math.pow(o.screen_y-n.screen_y,2)),l=Math.sqrt(Math.pow(n.screen_x-s.screen_x,2)+Math.pow(n.screen_y-s.screen_y,2)),u=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),g=Math.pow(u,i),y=Math.pow(u,2*i),v=Math.pow(l,i),b=Math.pow(l,2*i),w=Math.pow(d,i),_=Math.pow(d,2*i),c=2*_+3*w*v+b,p=2*y+3*g*v+b,m=3*w*(w+v),m>0&&(m=1/m),f=3*g*(g+v),f>0&&(f=1/f),a={screen_x:(-b*o.screen_x+c*n.screen_x+_*s.screen_x)*m,screen_y:(-b*o.screen_y+c*n.screen_y+_*s.screen_y)*m},h={screen_x:(y*n.screen_x+p*s.screen_x-b*r.screen_x)*f,screen_y:(y*n.screen_y+p*s.screen_y-b*r.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;it?-1:1});for(var i=0;i")}this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort(function(t,e){return e>t?-1:1}),s.resetElements(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),o=i,n=this.options.iconSize,r=.75*this.options.iconSize,a=i+.5*r+3;this.svg.style.width=n+5+i+"px";for(var h=0;h\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function p(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ft(o,i)}function c(t,e){return function(){return t.apply(e,arguments)}}function m(t,e){return typeof t==yt?t.apply(e?e[0]||a:a,e):t}function f(t,e){return t===a?e:t}function g(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function v(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function S(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=I(o);e.timeStamp=wt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=H(a,h),e.distance=F(a,h),P(i,e),e.offsetDirection=L(e.deltaX,e.deltaY);var d=R(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=_t(d.x)>_t(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?Y(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,A(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==It&&s.eventType!==Lt||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function A(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=Ft&&(h>Nt||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,u=R(h,d,l);o=u.x,n=u.y,i=_t(u.x)>_t(u.y)?u.x:u.y,s=L(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function N(t){for(var e=[],i=0;i=_t(e)?t<0?Yt:jt:e<0?Gt:zt}function F(t,e,i){i||(i=Bt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function H(t,e,i){i||(i=Bt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function Y(t,e){return H(e[1],e[0],qt)+H(t[1],t[0],qt)}function j(t,e){return F(e[0],e[1],qt)/F(t[0],t[1],qt)}function G(){this.evEl=Zt,this.evWin=Kt,this.pressed=!1,T.apply(this,arguments)}function z(){this.evEl=$t,this.evWin=te,T.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function W(){this.evTarget=ie,this.evWin=oe,this.started=!1,T.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(Lt|Ft)&&(i=D(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=se,this.targetIds={},T.apply(this,arguments)}function B(t,e){var i=x(t.touches),o=this.targetIds;if(e&(It|Rt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===It)for(n=0;n-1&&o.splice(t,1)};setTimeout(n,re)}}function K(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;o<_e&&e(i.options.event+et(o)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),o>=_e&&e(i.options.event+et(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=De)},canEmit:function(){for(var t=0;te.threshold&&n&e.direction},attrTest:function(t){return nt.prototype.attrTest.call(this,t)&&(this.state&ye||!(this.state&ye)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=it(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),p(rt,nt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ce]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ye)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),p(at,tt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(Lt|Ft)&&!n)this.reset();else if(t.eventType&It)this.reset(),this._timer=h(function(){this.state=we,this.tryEmit()},e.time,this);else if(t.eventType&Lt)return we;return De},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===we&&(t&&t.eventType&Lt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=wt(),this.manager.emit(this.options.event,this._input)))}}),p(ht,nt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ce]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ye)}}),p(dt,nt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Wt|Ut,pointers:1},getTouchAction:function(){return st.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Wt|Ut)?e=t.overallVelocity:i&Wt?e=t.overallVelocityX:i&Ut&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&_t(e)>this.options.velocity&&t.eventType&Lt},emit:function(t){var e=it(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),p(lt,tt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[pe]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distances.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""),d):n.distance<=r?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e),d):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print(Object.keys(i))+t.printLocation(o,e),d),a=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,a="",h=[],d=e.toLowerCase(),l=void 0;for(var u in i){var p=void 0;if(void 0!==i[u].__type__&&n===!0){var c=t.findInOptions(e,i[u],r.copyAndExtendArray(o,u));s>c.distance&&(a=c.closestMatch,h=c.path,s=c.distance,l=c.indexMatch)}else u.toLowerCase().indexOf(d)!==-1&&(l=u),p=t.levenshteinDistance(e,u),s>p&&(a=u,h=r.copyArray(o),s=p)}return{closestMatch:a,path:h,distance:s,indexMatch:l}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",o="\n\n"+i+"options = {\n",n=0;np,c=r||null===n?n:l+(n-l)*s,v=r||null===a?a:u+(a-u)*s;y=h._applyRange(c,v),d.updateHiddenDates(h.options.moment,h.body,h.options.hiddenDates),g=g||y,y&&h.body.emitter.emit("rangechange",{start:new Date(h.start),end:new Date(h.end),byUser:o}),r?g&&h.body.emitter.emit("rangechanged",{start:new Date(h.start),end:new Date(h.end),byUser:o}):h.animationTimer=setTimeout(t,20)}};return v()}var y=this._applyRange(n,a);if(d.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),y){var b={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",b),this.body.emitter.emit("rangechanged",b)}},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?r.convert(t,"Date").valueOf():this.start,n=null!=e?r.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(ns&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=a&&othis.start&&nd&&(this.end-this.start===d&&othis.end?(o=this.start,n=this.end):(i=n-o-d,o+=i/2,n-=i/2))}var l=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;n(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start,s=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);o-=s;var r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;if(this.options.rtl)var a=i/r*o;else var a=-i/r*o;var h=this.props.touch.start+a,l=this.props.touch.end+a,u=d.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0),p=d.snapAwayFromHidden(this.body.hiddenDates,l,this.previousDelta-i,!0);if(u!=h||p!=l)return this.deltaDifference+=i, +this.props.touch.start=u,this.props.touch.end=p,void this._onDrag(t);this.previousDelta=i,this._applyRange(h,l);var c=new Date(this.start),m=new Date(this.end);this.body.emitter.emit("rangechange",{start:c,end:m,byUser:!0}),this.body.emitter.emit("panmove")}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0}))},o.prototype._onMouseWheel=function(t){t.preventDefault();var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable){if(this.options.horizontalScroll){var i=e*(this.end-this.start)/20,o=this.start-i,n=this.end-i;this.setRange(o,n)}}else if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var s;s=e<0?1-e/5:1/(1+e/5);var r=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center),a=this._pointerToDate(r);this.zoom(s,a,e)}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center));var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),s=o-n,r=i-n+(this.props.touch.start-(i-n))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var h=d.snapAwayFromHidden(this.body.hiddenDates,r,1-e,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);h==r&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX;if(this.options.rtl)var i=e-r.getAbsoluteLeft(this.body.dom.centerContainer);else var i=r.getAbsoluteRight(this.body.dom.centerContainer)-e;var o=this.body.util.toTime(i);return o>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(n(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.getPointer=function(t,e){return this.options.rtl?{x:r.getAbsoluteRight(e)-t.x,y:t.y-r.getAbsoluteTop(e)}:{x:t.x-r.getAbsoluteLeft(e),y:t.y-r.getAbsoluteTop(e)}},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=d.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);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){function o(t,e){this.options=null,this.props=null}var n=i(1);o.prototype.setOptions=function(t){t&&n.extend(this.options,t)},o.prototype.redraw=function(){return!1},o.prototype.destroy=function(){},o.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=o},function(t,e){e.convertHiddenOptions=function(t,i,o){if(o&&!Array.isArray(o))return e.convertHiddenOptions(t,i,[o]);if(i.hiddenDates=[],o&&1==Array.isArray(o)){for(var n=0;n=4*a){var p=0,c=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(p=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-p,"days"),c.add(1,"weeks");break;case"weekly":var m=l.diff(d,"days"),f=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(f),l.day(f),l.add(m,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),c.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(p=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(p,"months"),c.add(1,"months");break;case"yearly":d.year()!=l.year()&&(p=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(p,"years"),c.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;d=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(var o=0;o=r&&nt.range.end){var h={start:t.range.start,end:i};i=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,h,i);var n=t.range.conversion(o,r);return(i.valueOf()-n.offset)*n.scale}i=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,t.range,i);var n=t.range.conversion(o,r);return(i.valueOf()-n.offset)*n.scale},e.toTime=function(t,i,o){if(0==t.body.hiddenDates.length){var n=t.range.conversion(o);return new Date(i/n.scale+n.offset)}var s=e.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end),r=t.range.end-t.range.start-s,a=r*i/o,h=e.getAccumulatedHiddenDuration(t.body.hiddenDates,t.range,a),d=new Date(h+a+t.range.start);return d},e.getHiddenDurationBetween=function(t,e,i){for(var o=0,n=0;n=e&&r=e&&r<=i&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?o<0?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&t0&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));return e[0].getCustomTime()},o.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));if(i.length>0)return i[0].setCustomTitle(t)},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?h.convert(t,"Date").valueOf():new Date,o=this.customTimes.some(function(t){return t.options.id===e});if(o)throw new Error("A custom time with id "+JSON.stringify(e)+" already exists");var n=new p(this.body,h.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var i=e.max-e.min,o=new Date(e.min.valueOf()-.01*i),n=new Date(e.max.valueOf()+.01*i),s=!t||void 0===t.animation||t.animation;this.range.setRange(o,n,s)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i){var o;if(1==arguments.length){var n=arguments[0];o=void 0===n.animation||n.animation,this.range.setRange(n.start,n.end,o)}else o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=h.convert(t,"Date").valueOf(),n=o-i/2,s=o+i/2,r=!e||void 0===e.animation||e.animation;this.range.setRange(n,s,r)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.zoomIn=function(t){if(!(!t||t<0||t>1)){var e=this.getWindow(),i=e.start.valueOf(),o=e.end.valueOf(),n=o-i,s=n/(1+t),r=(n-s)/2,a=i+r,h=o-r;this.setWindow({start:a,end:h})}},o.prototype.zoomOut=function(t){if(!(!t||t<0||t>1)){var e=this.getWindow(),i=e.start.valueOf(),o=e.end.valueOf(),n=o-i,s=i-n*t/2,r=o+n*t/2;this.setWindow({start:s,end:r})}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.root.offsetWidth){u.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(h.addClassName(o.root,"vis-top"),h.removeClassName(o.root,"vis-bottom")):(h.removeClassName(o.root,"vis-top"),h.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=h.option.asSize(e.maxHeight,""),o.root.style.minHeight=h.option.asSize(e.minHeight,""),o.root.style.width=h.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var n=o.root.offsetHeight-o.root.clientHeight,s=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(s=n),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var a=Math.max(i.left.height,i.center.height,i.right.height),d=i.top.height+a+i.bottom.height+n+i.border.top+i.border.bottom;o.root.style.height=h.option.asSize(e.height,d+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-n;var l=i.root.height-i.top.height-i.bottom.height-n;i.centerContainer.height=l,i.leftContainer.height=l,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-s,this.initialDrawDone||(i.scrollbarWidth=h.getScrollBarWidth()),this.options.verticalScroll?this.options.rtl?(i.left.width=o.leftContainer.clientWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth+i.scrollbarWidth||-i.border.right):(i.left.width=o.leftContainer.clientWidth+i.scrollbarWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth||-i.border.right):(i.left.width=o.leftContainer.clientWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth||-i.border.right),i.leftContainer.width=i.left.width,i.rightContainer.width=i.right.width;var p=i.root.width-i.left.width-i.right.width-s;i.center.width=p,i.centerContainer.width=p,i.top.width=p,i.bottom.width=p,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.rightContainer.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px";var c=this._updateScrollTop();"top"!=e.orientation.item&&(c+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=c+"px",o.left.style.left="0",o.right.style.left="0";var m=0==this.props.scrollTop?"hidden":"",f=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=m,o.shadowBottom.style.visibility=f,o.shadowTopLeft.style.visibility=m,o.shadowBottomLeft.style.visibility=f,o.shadowTopRight.style.visibility=m,o.shadowBottomRight.style.visibility=f,this.options.verticalScroll?(o.shadowTopRight.style.visibility="hidden",o.shadowBottomRight.style.visibility="hidden",o.shadowTopLeft.style.visibility="hidden",o.shadowBottomLeft.style.visibility="hidden"):(o.left.style.top=c+"px",o.right.style.top=c+"px");var g=this.props.center.height>this.props.centerContainer.height;this.hammer.get("pan").set({direction:g?r.DIRECTION_ALL:r.DIRECTION_HORIZONTAL}),this.components.forEach(function(e){t=e.redraw()||t});var v=5;if(t){if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTope&&o.push(h.id):h.lefti&&o.push(h.id)}return o},o.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;io)return}}if(e&&e!=this.groupTouchParams.group){var h=this.groupsData,d=h.get(e.groupId),l=h.get(this.groupTouchParams.group.groupId);l&&d&&(this.options.groupOrderSwap(l,d,this.groupsData),this.groupsData.update(l),this.groupsData.update(d));var u=this.groupsData.getIds({order:this.options.groupOrder});if(!r.equalArray(u,this.groupTouchParams.originalOrder))for(var h=this.groupsData,p=this.groupTouchParams.originalOrder,c=this.groupTouchParams.group.groupId,m=Math.min(p.length,u.length),f=0,g=0,v=0;f=m)break;if(u[f+g]!=c)if(p[f+v]!=c){var y=u.indexOf(p[f+v]),b=h.get(u[f+g]),_=h.get(p[f+v]);this.options.groupOrderSwap(b,_,h),h.update(b),h.update(_);var w=u[f+g];u[f+g]=p[f+v],u[y]=w,f++}else v=1;else g=1}}}},o.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=r.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!r.equalArray(n,e.groupTouchParams.originalOrder))for(var s=e.groupTouchParams.originalOrder,a=Math.min(s.length,n.length),h=0;h=a)break;var d=n.indexOf(s[h]),l=o.get(n[h]),u=o.get(s[h]);e.options.groupOrderSwap(l,u,o),groupsData.update(l),groupsData.update(u);var p=n[h];n[h]=s[h],n[d]=p,h++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),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,event:t})}},o.prototype._onMouseOver=function(t){var e=this.itemFromTarget(t);e&&this.body.emitter.emit("itemover",{item:e.id,event:t})},o.prototype._onMouseOut=function(t){var e=this.itemFromTarget(t);e&&this.body.emitter.emit("itemout",{item:e.id,event:t})},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(o){var n=e.itemsData.get(o.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}else{if(this.options.rtl)var s=r.getAbsoluteRight(this.dom.frame),a=s-t.center.x;else var s=r.getAbsoluteLeft(this.dom.frame),a=t.center.x-s;var h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),u={start:i?i(h,d,l):h,content:"new item"};if("drop"==t.type){var n=JSON.parse(t.dataTransfer.getData("text/plain"));if(u.content=n.content,u.type=n.type||"box",u[this.itemsData._fieldId]=n.id||r.randomUUID(),"range"==n.type||n.end&&n.start)if(n.end)u.end=new Date(u.start._i).getTime()+new Date(n.end).getTime()-new Date(n.start).getTime();else{var p=this.body.util.toTime(a+this.props.width/5);u.end=i?i(p,d,l):p}}else if(u[this.itemsData._fieldId]=r.randomUUID(),"range"===this.options.type){var p=this.body.util.toTime(a+this.props.width/5);u.end=i?i(p,d,l):p}var c=this.groupFromTarget(t);c&&(u.group=c.groupId),u=this._cloneItemData(u),this.options.onAdd(u,function(i){i&&(e.itemsData.getDataSet().add(i),"drop"==t.type&&e.setSelection([i.id]))})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[],n=t.srcEvent&&t.srcEvent.shiftKey||!1;if(n&&this.options.multiselect){var s=this.itemsData.get(e.id).group,r=void 0;this.options.multiselectPerGroup&&i.length>0&&(r=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=r&&r!=s||i.push(e.id);var a=o._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||r==s){i=[];for(var h in this.items)if(this.items.hasOwnProperty(h)){var d=this.items[h],l=d.data.start,u=void 0!==d.data.end?d.data.end:l;!(l>=a.min&&u<=a.max)||this.options.multiselectPerGroup&&r!=this.itemsData.get(d.id).group||d instanceof g||i.push(d.id)}}}else{var p=i.indexOf(e.id);p==-1?i.push(e.id):i.splice(p,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,i=0;ia&&ea)return n}else if(0===i&&e0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*n>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),15*s>t&&(this.scale="minute",this.step=15),10*s>t&&(this.scale="minute",this.step=10),5*s>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},o.prototype.getLabelMinor=function(t){if(void 0==t&&(t=this.current),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getLabelMajor=function(t){if(void 0==t&&(t=this.current),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/h%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(s().add(1,"day"),"day")?" vis-tomorrow":t.isSame(s().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}function n(t){return t.isSame(new Date,"year")?" vis-current-year":""}var s=this.moment,r=this.moment(this.current),a=r.locale?r.locale("en"):r.lang("en"),h=this.step;switch(this.scale){case"millisecond":return e(a)+t(a.milliseconds()).trim();case"second":return e(a)+t(a.seconds()).trim();case"minute":return e(a)+t(a.minutes()).trim();case"hour":return"vis-h"+a.hours()+(4==this.step?"-h"+(a.hours()+4):"")+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+i(a)+t(a.date());case"day":return"vis-day"+a.date()+" vis-"+a.format("MMMM").toLowerCase()+e(a)+o(a)+this.step<=2?e(a):""+this.step<=2?" vis-"+a.format("dddd").toLowerCase():""+t(a.date()-1);case"month":return"vis-"+a.format("MMMM").toLowerCase()+o(a)+t(a.month());case"year":var d=a.year();return"vis-year"+d+n(a)+t(d);default:return""}},t.exports=o},function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(1),s=i(27);i(28);o.prototype._create=function(){var t=document.createElement("div"); +this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e,i;if(this.itemSet.options&&this.itemSet.options.groupTemplate?(i=this.itemSet.options.groupTemplate.bind(this),e=i(t,this.dom.inner)):e=t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object?i(t,this.dom.inner):void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?n.removeClassName(this.dom.inner,"vis-hidden"):n.addClassName(this.dom.inner,"vis-hidden");var o=t&&t.className||null;o!=this.className&&(this.className&&(n.removeClassName(this.dom.label,this.className),n.removeClassName(this.dom.foreground,this.className),n.removeClassName(this.dom.background,this.className),n.removeClassName(this.dom.axis,this.className)),n.addClassName(this.dom.label,o),n.addClassName(this.dom.foreground,o),n.addClassName(this.dom.background,o),n.addClassName(this.dom.axis,o),this.className=o),this.style&&(n.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(n.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,n.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),this._calculateSubGroupHeights(),this.isVisible=this._isGroupVisible(t,e);var a=this.dom.foreground;if(this.top=a.offsetTop,this.right=a.offsetLeft,this.width=a.offsetWidth,this.isVisible=this._isGroupVisible(t,e),"function"==typeof this.itemSet.options.order){if(i){var h=this,d=!1;n.forEach(this.items,function(t){t.displayed||(t.redraw(),h.visibleItems.push(t)),t.repositionX(d)});var l=this.orderedItems.byStart.slice().sort(function(t,e){return h.itemSet.options.order(t.data,e.data)});s.stack(l,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?s.stack(this.visibleItems,e,i):s.nostack(this.visibleItems,e,this.subgroups);if(!this.isVisible&&this.height)return o=!1;var u=this._calculateHeight(e),a=this.dom.foreground;this.top=a.offsetTop,this.right=a.offsetLeft,this.width=a.offsetWidth,o=n.updateProperty(this,"height",u)||o,o=n.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=n.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=u+"px",this.dom.foreground.style.height=u+"px",this.dom.label.style.height=u+"px";for(var p=0,c=this.visibleItems.length;p0){var t=this;this.resetSubgroups(),n.forEach(this.visibleItems,function(e){void 0!==e.data.subgroup&&(t.subgroups[e.data.subgroup].height=Math.max(t.subgroups[e.data.subgroup].height,e.height),t.subgroups[e.data.subgroup].visible=!0)})}},o.prototype._isGroupVisible=function(t,e){var i=this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop;return i},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,s=i[0].top+i[0].height;if(n.forEach(i,function(t){o=Math.min(o,t.top),s=Math.max(s,t.top+t.height)}),o>t.axis){var r=o-t.axis;s-=r,n.forEach(i,function(t){t.top-=r})}e=s+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),this.visibleItems.indexOf(t)==-1){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;i0)for(var r=0;rl}),1==this.checkRangedItems)for(this.checkRangedItems=!1,r=0;rl})}for(var r=0;r=0;s--){var r=e[s];if(n(r))break;void 0===o[r.id]&&(o[r.id]=!0,i.push(r))}for(var s=t+1;se.right&&t.top-o.vertical+ie.top:t.left-o.horizontal+ie.left&&t.top-o.vertical+ie.top}},function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,this.options=i,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var n=(i(14),i(29));o.prototype=new n(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){return this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintOnItemUpdateTimeTooltip(t.box),this._repaintDeleteButton(t.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end);void 0!==t&&t!==!0||(n<-o&&(n=-o),s>2*o&&(s=2*o));var r=Math.max(s-n+.5,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=r+this.props.content.width,i=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=r,i=Math.min(s-n,this.props.content.width)),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.options.rtl?this.dom.content.style.right="0":this.dom.content.style.left="0";break;case"right":this.options.rtl?this.dom.content.style.right=Math.max(r-i,0)+"px":this.dom.content.style.left=Math.max(r-i,0)+"px";break;case"center":this.options.rtl?this.dom.content.style.right=Math.max((r-i)/2,0)+"px":this.dom.content.style.left=Math.max((r-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:n<0?-n:0,this.options.rtl?this.dom.content.style.right=e+"px":(this.dom.content.style.left=e+"px",this.dom.content.style.width="calc(100% - "+e+"px)")}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.editable=null,this.data&&this.data.hasOwnProperty("editable")&&"boolean"==typeof this.data.editable&&(this.editable=t.editable)}var n=i(14),s=i(1),r=i(2);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),t.hasOwnProperty("editable")&&"boolean"==typeof t.editable&&(this.editable=t.editable),this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.remove||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.deleteButton){var i=this,o=document.createElement("div");this.options.rtl?o.className="vis-delete-rtl":o.className="vis-delete",o.title="Delete this item",new n(o).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(o),this.dom.deleteButton=o}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._repaintOnItemUpdateTimeTooltip=function(t){if(this.options.tooltipOnItemUpdateTime){var e=(this.options.editable.updateTime||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){var i=document.createElement("div");i.className="vis-onUpdateTime-tooltip",t.appendChild(i),this.dom.onItemUpdateTimeTooltip=i}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden",this.options.rtl?this.dom.onItemUpdateTimeTooltip.style.right=this.dom.content.style.right:this.dom.onItemUpdateTimeTooltip.style.left=this.dom.content.style.left;var o,n=50,s=this.parent.itemSet.body.domProps.scrollTop;o="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;var a=o+this.parent.top-n<-s;a?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top=this.height+2+"px"):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom=this.height+2+"px");var h,d;this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template?(d=this.options.tooltipOnItemUpdateTime.template.bind(this),h=d(this.data)):(h="start: "+r(this.data.start).format("MM/DD/YYYY hh:mm"),this.data.end&&(h+="
end: "+r(this.data.end).format("MM/DD/YYYY hh:mm"))),this.dom.onItemUpdateTimeTooltip.innerHTML=h}}},o.prototype._updateContents=function(t){var e,i;if(this.options.template){var o=this.parent.itemSet.itemsData.get(this.id);i=this.options.template.bind(this),e=i(o,t)}else e=this.data.content;if(e instanceof Object&&!(e instanceof Element))i(o,t);else{var n=this._contentToString(this.content)!==this._contentToString(e);if(n){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("vis-title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;it.start&&this.data.start.getTime()-nt.start&&this.data.start.getTime()t.start&&this.data.start.getTime()-n/2t.start&&this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation.item;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,n=this.parent.subgroups,r=n[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in n)n.hasOwnProperty(h)&&1==n[h].visible&&n[h].indexr&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof s?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},t.exports=o},function(t,e,i){function o(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:a.FORMAT,moment:d,timeAxis:null},this.options=s.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=i(1),r=i(21),a=i(25),h=i(22),d=i(2);o.prototype=new r,o.prototype.setOptions=function(t){t&&(s.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),s.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===n(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof d.locale?d.locale(t.locale):d.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},o.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},o.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o; +this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=s.convert(this.body.range.start,"Number"),i=s.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),n=o-h.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,o);n-=this.body.util.toTime(0).valueOf();var r=new a(new Date(e),new Date(i),n,this.body.hiddenDates);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;var d=this.dom;d.redundant.lines=d.lines,d.redundant.majorTexts=d.majorTexts,d.redundant.minorTexts=d.minorTexts,d.lines=[],d.majorTexts=[],d.minorTexts=[];var u,p,c,m,f,g,v,y,b,_,w=0,x=void 0,D=0,S=1e3;for(r.start(),p=r.getCurrent(),m=this.body.util.toScreen(p);r.hasNext()&&D=.4*v;if(this.options.showMinorLabels&&k){var C=this._repaintMinorText(c,b,t,_);C.style.width=w+"px"}f&&this.options.showMajorLabels?(c>0&&(void 0==x&&(x=c),C=this._repaintMajorText(c,r.getLabelMajor(),t,_)),y=this._repaintMajorLine(c,w,t,_)):k?y=this._repaintMinorLine(c,w,t,_):y&&(y.style.width=parseInt(y.style.width)+w+"px")}if(D!==S||l||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to "+S+" lines."),l=!0),this.options.showMajorLabels){var T=this.body.util.toTime(0),O=r.getLabelMajor(T),M=O.length*(this.props.majorCharWidth||10)+10;(void 0==x||M1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="date",a="object",h="dom",d="moment",l="any",u={configure:{enabled:{boolean:o},filter:{boolean:o,function:"function"},container:{dom:h},__type__:{object:a,boolean:o,function:"function"}},align:{string:i},rtl:{boolean:o,undefined:"undefined"},verticalScroll:{boolean:o,undefined:"undefined"},horizontalScroll:{boolean:o,undefined:"undefined"},autoResize:{boolean:o},clickToUse:{boolean:o},dataAttributes:{string:i,array:s},editable:{add:{boolean:o,undefined:"undefined"},remove:{boolean:o,undefined:"undefined"},updateGroup:{boolean:o,undefined:"undefined"},updateTime:{boolean:o,undefined:"undefined"},__type__:{boolean:o,object:a}},end:{number:n,date:r,string:i,moment:d},format:{minorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a,function:"function"}},majorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a,function:"function"}},__type__:{object:a}},moment:{function:"function"},groupOrder:{string:i,function:"function"},groupEditable:{add:{boolean:o,undefined:"undefined"},remove:{boolean:o,undefined:"undefined"},order:{boolean:o,undefined:"undefined"},__type__:{boolean:o,object:a}},groupOrderSwap:{function:"function"},height:{string:i,number:n},hiddenDates:{start:{date:r,number:n,string:i,moment:d},end:{date:r,number:n,string:i,moment:d},repeat:{string:i},__type__:{object:a,array:s}},itemsAlwaysDraggable:{boolean:o},locale:{string:i},locales:{__any__:{any:l},__type__:{object:a}},margin:{axis:{number:n},item:{horizontal:{number:n,undefined:"undefined"},vertical:{number:n,undefined:"undefined"},__type__:{object:a,number:n}},__type__:{object:a,number:n}},max:{date:r,number:n,string:i,moment:d},maxHeight:{number:n,string:i},maxMinorChars:{number:n},min:{date:r,number:n,string:i,moment:d},minHeight:{number:n,string:i},moveable:{boolean:o},multiselect:{boolean:o},multiselectPerGroup:{boolean:o},onAdd:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},order:{function:"function"},orientation:{axis:{string:i,undefined:"undefined"},item:{string:i,undefined:"undefined"},__type__:{string:i,object:a}},selectable:{boolean:o},showCurrentTime:{boolean:o},showMajorLabels:{boolean:o},showMinorLabels:{boolean:o},stack:{boolean:o},snap:{function:"function",null:"null"},start:{date:r,number:n,string:i,moment:d},template:{function:"function"},groupTemplate:{function:"function"},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:o,object:a}},timeAxis:{scale:{string:i,undefined:"undefined"},step:{number:n,undefined:"undefined"},__type__:{object:a}},type:{string:i},width:{string:i,number:n},zoomable:{boolean:o},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:n},zoomMin:{number:n},__type__:{object:a}},p={global:{align:["center","left","right"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",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:""}},groupsDraggable:!1,height:"",locale:"",margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,start:"",tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1]}};e.allOptions=u,e.configureOptions=p},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e,i,o){if(!(Array.isArray(i)||i instanceof u||i instanceof p)&&i instanceof Object){var n=o;o=i,i=n}var s=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:d,width:null,height:null,maxHeight:null,minHeight:null},this.options=l.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new c(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new f(this.body),this.components.push(this.timeAxis),this.currentTime=new g(this.body),this.components.push(this.currentTime),this.linegraph=new y(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){s.emit("click",s.getEventProperties(t))}),this.on("doubletap",function(t){s.emit("doubleClick",s.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var s=i(12),r=o(s),a=i(18),h=o(a),d=(i(19),i(14),i(2)),l=i(1),u=i(8),p=i(10),c=i(20),m=i(23),f=i(34),g=i(39),v=i(37),y=i(42),b=i(18).printStyle,_=i(50).allOptions,w=i(50).configureOptions;n.prototype=new m,n.prototype.setOptions=function(t){var e=h.default.validate(t,_);e===!0&&console.log("%cErrors have been found in the supplied options object.",b),m.prototype.setOptions.call(this,t)},n.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t instanceof u||t instanceof p?t:new u(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.linegraph&&this.linegraph.setItems(e),i)if(void 0!=this.options.start||void 0!=this.options.end){var o=void 0!=this.options.start?this.options.start:null,n=void 0!=this.options.end?this.options.end:null;this.setWindow(o,n,{animation:!1})}else this.fit({animation:!1})},n.prototype.setGroups=function(t){var e;e=t?t instanceof u||t instanceof p?t:new u(t):null,this.groupsData=e,this.linegraph.setGroups(e)},n.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},n.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]&&(this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]))},n.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var o=0;os?s:t,e=null==e?s:e0){var h={};for(this._getRelevantData(a,h,n,s),this._applySampling(a,h),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(a[e])||(l[a[e]]=m.calcPath(h[a[e]],t)),m.draw(l[a[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||f.draw(h[a[e]],t,this.framework);break;case"bar":}}}return r.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,0==o?t[a].y=t[a].orginalY+r.y:t[a].y=t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var n,r,a,h;if(t.length>0)for(r=0;r0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;l0){for(s=0;s0&&(n=this.groups[t[s]],r.stack===!0&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n.getItems()):h=h.concat(n.getItems()):i[t[s]]=n.getYRange(o,t[s]));c.getStackedYRange(a,i,t,"__barStackLeft","left"),c.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var u=0;ui?i:a,d=di?i:h,l=l=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),t.master===!0&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var d=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(d=this.props.titleCharHeight);var l=this.options.icons===!0?Math.max(this.options.iconWidth,d)+this.options.labelOffsetX+15:d+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&this.options.visible===!0?(this.width=this.maxLabelSize+l,this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var r=s.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"===i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=n,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=o,this.formattingFunction=a,i||o){var h=this,d=function(t){var e=t-t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx]);return t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx])>.5*(h.magnitudefactor*h.minorSteps[h.minorStepIdx])?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}i.prototype.setCharHeight=function(t){this.majorCharHeight=t},i.prototype.setHeight=function(t){this.containerHeight=t},i.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;i<0&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(n===!0)break}},i.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0},i.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},i.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},i.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},i.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},i.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&ue.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];s.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),s.mergeOptions(this.options,t,"interpolation"),s.mergeOptions(this.options,t,"drawPoints"),s.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==n(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");i={svg:s,svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":a.drawIcon(this,o,n,t,e,i);break;case"points":case"point":h.drawIcon(this,o,n,t,e,i);break;case"bar":r.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=t0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){var i=[];return i=1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var u={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,u,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o=e;if(i)for(var n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(var n=1;n0&&(m=1/m),f=3*g*(g+v),f>0&&(f=1/f),a={screen_x:(-b*o.screen_x+p*n.screen_x+_*s.screen_x)*m,screen_y:(-b*o.screen_y+p*n.screen_y+_*s.screen_y)*m},h={screen_x:(y*n.screen_x+c*s.screen_x-b*r.screen_x)*f,screen_y:(y*n.screen_y+c*s.screen_y-b*r.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;i")}this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort(function(t,e){return t .vis-content { - position: relative; -} -.vis-panel .vis-shadow { +div.vis-color-picker div.vis-brightness { position: absolute; - width: 100%; - height: 1px; - box-shadow: 0 0 10px rgba(0,0,0,0.8); - /* TODO: find a nice way to ensure vis-shadows are drawn on top of items - z-index: 1; - */ + top:313px; } -.vis-panel .vis-shadow.vis-top { - top: -1px; - left: 0; +div.vis-color-picker div.vis-opacity { + position:absolute; + top:350px; } -.vis-panel .vis-shadow.vis-bottom { - bottom: -1px; - left: 0; +div.vis-color-picker div.vis-selector { + position:absolute; + top:137px; + left:137px; + width:15px; + height:15px; + border-radius:15px; + border:1px solid #ffffff; + background: #4c4c4c; /* Old browsers */ + background: -moz-linear-gradient(top, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(12%,#595959), color-stop(25%,#666666), color-stop(39%,#474747), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(60%,#111111), color-stop(76%,#2b2b2b), color-stop(91%,#1c1c1c), color-stop(100%,#131313)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* IE10+ */ + background: linear-gradient(to bottom, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */ } -.vis-labelset { - position: relative; - overflow: hidden; - box-sizing: border-box; -} +div.vis-color-picker div.vis-new-color { + position:absolute; + width:140px; + height:20px; + border:1px solid rgba(0,0,0,0.1); + border-radius:5px; + top:380px; + left:159px; + text-align:right; + padding-right:2px; + font-size:10px; + color:rgba(0,0,0,0.4); + vertical-align:middle; + line-height:20px; -.vis-labelset .vis-label { - position: relative; - left: 0; - top: 0; - width: 100%; - color: #4d4d4d; +} - box-sizing: border-box; +div.vis-color-picker div.vis-initial-color { + position:absolute; + width:140px; + height:20px; + border:1px solid rgba(0,0,0,0.1); + border-radius:5px; + top:380px; + left:10px; + text-align:left; + padding-left:2px; + font-size:10px; + color:rgba(0,0,0,0.4); + vertical-align:middle; + line-height:20px; } -.vis-labelset .vis-label { - border-bottom: 1px solid #bfbfbf; +div.vis-color-picker div.vis-label { + position:absolute; + width:300px; + left:10px; } -.vis-labelset .vis-label.draggable { - cursor: pointer; +div.vis-color-picker div.vis-label.vis-brightness { + top:300px; } -.vis-labelset .vis-label:last-child { - border-bottom: none; +div.vis-color-picker div.vis-label.vis-opacity { + top:338px; } -.vis-labelset .vis-label .vis-inner { - display: inline-block; - padding: 5px; +div.vis-color-picker div.vis-button { + position:absolute; + width:68px; + height:25px; + border-radius:10px; + vertical-align: middle; + text-align:center; + line-height: 25px; + top:410px; + border:2px solid #d9d9d9; + background-color: #f7f7f7; + cursor:pointer; } -.vis-labelset .vis-label .vis-inner.vis-hidden { - padding: 0; +div.vis-color-picker div.vis-button.vis-cancel { + /*border:2px solid #ff4e33;*/ + /*background-color: #ff7761;*/ + left:5px; +} +div.vis-color-picker div.vis-button.vis-load { + /*border:2px solid #a153e6;*/ + /*background-color: #cb8dff;*/ + left:82px; +} +div.vis-color-picker div.vis-button.vis-apply { + /*border:2px solid #4588e6;*/ + /*background-color: #82b6ff;*/ + left:159px; +} +div.vis-color-picker div.vis-button.vis-save { + /*border:2px solid #45e655;*/ + /*background-color: #6dff7c;*/ + left:236px; } -.vis-itemset { - position: relative; - padding: 0; - margin: 0; +div.vis-color-picker input.vis-range { + width: 290px; + height:20px; +} - box-sizing: border-box; +/* TODO: is this redundant? +div.vis-color-picker input.vis-range-brightness { + width: 289px !important; } -.vis-itemset .vis-background, -.vis-itemset .vis-foreground { + +div.vis-color-picker input.vis-saturation-range { + width: 289px !important; +}*/ +div.vis-network div.vis-manipulation { + border-width: 0; + border-bottom: 1px; + border-style:solid; + border-color: #d6d9d8; + background: #ffffff; /* Old browsers */ + background: -moz-linear-gradient(top, #ffffff 0%, #fcfcfc 48%, #fafafa 50%, #fcfcfc 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(48%,#fcfcfc), color-stop(50%,#fafafa), color-stop(100%,#fcfcfc)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* IE10+ */ + background: linear-gradient(to bottom, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */ + + padding-top:4px; position: absolute; + left: 0; + top: 0; width: 100%; - height: 100%; - overflow: visible; + height: 28px; } -.vis-axis { - position: absolute; - width: 100%; - height: 0; +div.vis-network div.vis-edit-mode { + position:absolute; left: 0; - z-index: 1; + top: 5px; + height: 30px; } -.vis-foreground .vis-group { - position: relative; - box-sizing: border-box; - border-bottom: 1px solid #bfbfbf; -} +/* FIXME: shouldn't the vis-close button be a child of the vis-manipulation div? */ -.vis-foreground .vis-group:last-child { - border-bottom: none; -} - -.vis-overlay { - position: absolute; +div.vis-network div.vis-close { + position:absolute; + right: 0; top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 10; -} + width: 30px; + height: 30px; -.vis-item { - position: absolute; - color: #1A1A1A; - border-color: #97B0F8; - border-width: 1px; - background-color: #D5DDF6; - display: inline-block; - /*overflow: hidden;*/ + background-position: 20px 3px; + background-repeat: no-repeat; + background-image: url("img/network/cross.png"); + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } -.vis-item.vis-selected { - border-color: #FFC200; - background-color: #FFF785; - - /* z-index must be higher than the z-index of custom time bar and current time bar */ - z-index: 2; +div.vis-network div.vis-close:hover { + opacity: 0.6; } -.vis-editable.vis-selected { - cursor: move; +div.vis-network div.vis-manipulation div.vis-button, +div.vis-network div.vis-edit-mode div.vis-button { + float:left; + font-family: verdana; + font-size: 12px; + -moz-border-radius: 15px; + border-radius: 15px; + display:inline-block; + background-position: 0px 0px; + background-repeat:no-repeat; + height:24px; + margin-left: 10px; + /*vertical-align:middle;*/ + cursor: pointer; + padding: 0px 8px 0px 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } -.vis-item.vis-point.vis-selected { - background-color: #FFF785; +div.vis-network div.vis-manipulation div.vis-button:hover { + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.20); } -.vis-item.vis-box { - text-align: center; - border-style: solid; - border-radius: 2px; +div.vis-network div.vis-manipulation div.vis-button:active { + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.50); } -.vis-item.vis-point { - background: none; +div.vis-network div.vis-manipulation div.vis-button.vis-back { + background-image: url("img/network/backIcon.png"); } -.vis-item.vis-dot { - position: absolute; - padding: 0; - border-width: 4px; - border-style: solid; - border-radius: 4px; +div.vis-network div.vis-manipulation div.vis-button.vis-none:hover { + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0); + cursor: default; } - -.vis-item.vis-range { - border-style: solid; - border-radius: 2px; - box-sizing: border-box; +div.vis-network div.vis-manipulation div.vis-button.vis-none:active { + box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0); } - -.vis-item.vis-background { - border: none; - background-color: rgba(213, 221, 246, 0.4); - box-sizing: border-box; +div.vis-network div.vis-manipulation div.vis-button.vis-none { padding: 0; - margin: 0; } - -.vis-item .vis-item-overflow { - position: relative; - width: 100%; - height: 100%; - padding: 0; - margin: 0; - overflow: hidden; +div.vis-network div.vis-manipulation div.notification { + margin: 2px; + font-weight: bold; } -.vis-item.vis-range .vis-item-content { - position: relative; - display: inline-block; +div.vis-network div.vis-manipulation div.vis-button.vis-add { + background-image: url("img/network/addNodeIcon.png"); } -.vis-item.vis-background .vis-item-content { - position: absolute; - display: inline-block; +div.vis-network div.vis-manipulation div.vis-button.vis-edit, +div.vis-network div.vis-edit-mode div.vis-button.vis-edit { + background-image: url("img/network/editIcon.png"); } -.vis-item.vis-line { - padding: 0; - position: absolute; - width: 0; - border-left-width: 1px; - border-left-style: solid; +div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode { + background-color: #fcfcfc; + border: 1px solid #cccccc; } -.vis-item .vis-item-content { - white-space: nowrap; - box-sizing: border-box; - padding: 5px; +div.vis-network div.vis-manipulation div.vis-button.vis-connect { + background-image: url("img/network/connectIcon.png"); } -.vis-item .vis-delete { - background: url('img/timeline/delete.png') no-repeat center; - position: absolute; - width: 24px; - height: 24px; - top: -4px; - right: -24px; - cursor: pointer; +div.vis-network div.vis-manipulation div.vis-button.vis-delete { + background-image: url("img/network/deleteIcon.png"); } - -.vis-item .vis-delete-rtl { - background: url('img/timeline/delete.png') no-repeat center; - position: absolute; - width: 24px; - height: 24px; - top: -4px; - left: -24px; - cursor: pointer; +/* top right bottom left */ +div.vis-network div.vis-manipulation div.vis-label, +div.vis-network div.vis-edit-mode div.vis-label { + margin: 0 0 0 23px; + line-height: 25px; } - - -.vis-item.vis-range .vis-drag-left { - position: absolute; - width: 24px; - max-width: 20%; - min-width: 2px; - height: 100%; - top: 0; - left: -4px; - - cursor: w-resize; +div.vis-network div.vis-manipulation div.vis-separator-line { + float:left; + display:inline-block; + width:1px; + height:21px; + background-color: #bdbdbd; + margin: 0px 7px 0 15px; /*top right bottom left*/ } -.vis-item.vis-range .vis-drag-right { +/* TODO: is this redundant? +div.network-navigation_wrapper { position: absolute; - width: 24px; - max-width: 20%; - min-width: 2px; - height: 100%; + left: 0; top: 0; - right: -4px; - - cursor: e-resize; + width: 100%; + height: 100%; } - -.vis-range.vis-item.vis-readonly .vis-drag-left, -.vis-range.vis-item.vis-readonly .vis-drag-right { - cursor: auto; +*/ +div.vis-network div.vis-navigation div.vis-button { + width:34px; + height:34px; + -moz-border-radius: 17px; + border-radius: 17px; + position:absolute; + display:inline-block; + background-position: 2px 2px; + background-repeat:no-repeat; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } -.vis-time-axis { - position: relative; - overflow: hidden; +div.vis-network div.vis-navigation div.vis-button:hover { + box-shadow: 0 0 3px 3px rgba(56, 207, 21, 0.30); } -.vis-time-axis.vis-foreground { - top: 0; - left: 0; - width: 100%; +div.vis-network div.vis-navigation div.vis-button:active { + box-shadow: 0 0 1px 3px rgba(56, 207, 21, 0.95); } -.vis-time-axis.vis-background { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; +div.vis-network div.vis-navigation div.vis-button.vis-up { + background-image: url("img/network/upArrow.png"); + bottom:50px; + left:55px; } - -.vis-time-axis .vis-text { - position: absolute; - color: #4d4d4d; - padding: 3px; - overflow: hidden; - box-sizing: border-box; - - white-space: nowrap; +div.vis-network div.vis-navigation div.vis-button.vis-down { + background-image: url("img/network/downArrow.png"); + bottom:10px; + left:55px; } - -.vis-time-axis .vis-text.vis-measure { - position: absolute; - padding-left: 0; - padding-right: 0; - margin-left: 0; - margin-right: 0; - visibility: hidden; +div.vis-network div.vis-navigation div.vis-button.vis-left { + background-image: url("img/network/leftArrow.png"); + bottom:10px; + left:15px; } - -.vis-time-axis .vis-grid.vis-vertical { - position: absolute; - border-left: 1px solid; +div.vis-network div.vis-navigation div.vis-button.vis-right { + background-image: url("img/network/rightArrow.png"); + bottom:10px; + left:95px; } - -.vis-time-axis .vis-grid.vis-vertical-rtl { - position: absolute; - border-right: 1px solid; +div.vis-network div.vis-navigation div.vis-button.vis-zoomIn { + background-image: url("img/network/plus.png"); + bottom:10px; + right:15px; } - -.vis-time-axis .vis-grid.vis-minor { - border-color: #e5e5e5; +div.vis-network div.vis-navigation div.vis-button.vis-zoomOut { + background-image: url("img/network/minus.png"); + bottom:10px; + right:55px; } - -.vis-time-axis .vis-grid.vis-major { - border-color: #bfbfbf; +div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends { + background-image: url("img/network/zoomExtends.png"); + bottom:50px; + right:15px; } +div.vis-network-tooltip { + position: absolute; + visibility: hidden; + padding: 5px; + white-space: nowrap; + + font-family: verdana; + font-size:14px; + color:#000000; + background-color: #f5f4ed; + + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + border: 1px solid #808074; -.vis-current-time { - background-color: #FF7F6E; - width: 2px; - z-index: 1; -} -.vis-custom-time { - background-color: #6E94FF; - width: 2px; - cursor: move; - z-index: 1; + box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); + pointer-events: none; } .vis-timeline { /* @@ -705,6 +748,17 @@ input.vis-configuration.vis-config-range:focus::-ms-fill-upper { transition: height .4s ease-in-out, top .4s ease-in-out; } /**/ +.vis-current-time { + background-color: #FF7F6E; + width: 2px; + z-index: 1; +} +.vis-custom-time { + background-color: #6E94FF; + width: 2px; + cursor: move; + z-index: 1; +} .vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal { position: absolute; @@ -808,517 +862,528 @@ input.vis-configuration.vis-config-range:focus::-ms-fill-upper { white-space: nowrap; display: inline-block } -.vis-graph-group0 { - fill:#4f81bd; - fill-opacity:0; - stroke-width:2px; - stroke: #4f81bd; + +.vis-item { + position: absolute; + color: #1A1A1A; + border-color: #97B0F8; + border-width: 1px; + background-color: #D5DDF6; + display: inline-block; + /*overflow: hidden;*/ } -.vis-graph-group1 { - fill:#f79646; - fill-opacity:0; - stroke-width:2px; - stroke: #f79646; +.vis-item.vis-selected { + border-color: #FFC200; + background-color: #FFF785; + + /* z-index must be higher than the z-index of custom time bar and current time bar */ + z-index: 2; } -.vis-graph-group2 { - fill: #8c51cf; - fill-opacity:0; - stroke-width:2px; - stroke: #8c51cf; +.vis-editable.vis-selected { + cursor: move; } -.vis-graph-group3 { - fill: #75c841; - fill-opacity:0; - stroke-width:2px; - stroke: #75c841; +.vis-item.vis-point.vis-selected { + background-color: #FFF785; } -.vis-graph-group4 { - fill: #ff0100; - fill-opacity:0; - stroke-width:2px; - stroke: #ff0100; +.vis-item.vis-box { + text-align: center; + border-style: solid; + border-radius: 2px; } -.vis-graph-group5 { - fill: #37d8e6; - fill-opacity:0; - stroke-width:2px; - stroke: #37d8e6; +.vis-item.vis-point { + background: none; } -.vis-graph-group6 { - fill: #042662; - fill-opacity:0; - stroke-width:2px; - stroke: #042662; +.vis-item.vis-dot { + position: absolute; + padding: 0; + border-width: 4px; + border-style: solid; + border-radius: 4px; } -.vis-graph-group7 { - fill:#00ff26; - fill-opacity:0; - stroke-width:2px; - stroke: #00ff26; +.vis-item.vis-range { + border-style: solid; + border-radius: 2px; + box-sizing: border-box; } -.vis-graph-group8 { - fill:#ff00ff; - fill-opacity:0; - stroke-width:2px; - stroke: #ff00ff; +.vis-item.vis-background { + border: none; + background-color: rgba(213, 221, 246, 0.4); + box-sizing: border-box; + padding: 0; + margin: 0; } -.vis-graph-group9 { - fill: #8f3938; - fill-opacity:0; - stroke-width:2px; - stroke: #8f3938; +.vis-item .vis-item-overflow { + position: relative; + width: 100%; + height: 100%; + padding: 0; + margin: 0; + overflow: hidden; } -.vis-timeline .vis-fill { - fill-opacity:0.1; - stroke: none; +.vis-item.vis-range .vis-item-content { + position: relative; + display: inline-block; } +.vis-item.vis-background .vis-item-content { + position: absolute; + display: inline-block; +} -.vis-timeline .vis-bar { - fill-opacity:0.5; - stroke-width:1px; +.vis-item.vis-line { + padding: 0; + position: absolute; + width: 0; + border-left-width: 1px; + border-left-style: solid; } -.vis-timeline .vis-point { - stroke-width:2px; - fill-opacity:1.0; +.vis-item .vis-item-content { + white-space: nowrap; + box-sizing: border-box; + padding: 5px; } +.vis-item .vis-onUpdateTime-tooltip { + position: absolute; + background: #4f81bd; + color: white; + width: 200px; + text-align: center; + white-space: nowrap; + padding: 5px; + border-radius: 1px; +} -.vis-timeline .vis-legend-background { - stroke-width:1px; - fill-opacity:0.9; - fill: #ffffff; - stroke: #c2c2c2; +.vis-item .vis-delete, .vis-item .vis-delete-rtl { + position: absolute; + top: 0px; + width: 24px; + height: 24px; + box-sizing: border-box; + padding: 0px 5px; + cursor: pointer; + + -webkit-transition: background 0.2s linear; + -moz-transition: background 0.2s linear; + -ms-transition: background 0.2s linear; + -o-transition: background 0.2s linear; + transition: background 0.2s linear; } +.vis-item .vis-delete { + right: -24px; +} -.vis-timeline .vis-outline { - stroke-width:1px; - fill-opacity:1; - fill: #ffffff; - stroke: #e5e5e5; +.vis-item .vis-delete-rtl { + left: -24px; } -.vis-timeline .vis-icon-fill { - fill-opacity:0.3; - stroke: none; +.vis-item .vis-delete:after, .vis-item .vis-delete-rtl:after { + content: "\00D7"; /* MULTIPLICATION SIGN */ + color: red; + font-family: arial, sans-serif; + font-size: 22px; + font-weight: bold; + + -webkit-transition: color 0.2s linear; + -moz-transition: color 0.2s linear; + -ms-transition: color 0.2s linear; + -o-transition: color 0.2s linear; + transition: color 0.2s linear; } -div.vis-network div.vis-manipulation { - border-width: 0; - border-bottom: 1px; - border-style:solid; - border-color: #d6d9d8; - background: #ffffff; /* Old browsers */ - background: -moz-linear-gradient(top, #ffffff 0%, #fcfcfc 48%, #fafafa 50%, #fcfcfc 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(48%,#fcfcfc), color-stop(50%,#fafafa), color-stop(100%,#fcfcfc)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* IE10+ */ - background: linear-gradient(to bottom, #ffffff 0%,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=0 ); /* IE6-9 */ +.vis-item .vis-delete:hover, .vis-item .vis-delete-rtl:hover { + background: red; +} + +.vis-item .vis-delete:hover:after, .vis-item .vis-delete-rtl:hover:after { + color: white; +} + +.vis-item .vis-drag-center { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0px; + cursor: move; +} + +.vis-item.vis-range .vis-drag-left { + position: absolute; + width: 24px; + max-width: 20%; + min-width: 2px; + height: 100%; + top: 0; + left: -4px; + + cursor: w-resize; +} + +.vis-item.vis-range .vis-drag-right { + position: absolute; + width: 24px; + max-width: 20%; + min-width: 2px; + height: 100%; + top: 0; + right: -4px; + + cursor: e-resize; +} + +.vis-range.vis-item.vis-readonly .vis-drag-left, +.vis-range.vis-item.vis-readonly .vis-drag-right { + cursor: auto; +} + + +.vis-itemset { + position: relative; + padding: 0; + margin: 0; + + box-sizing: border-box; +} + +.vis-itemset .vis-background, +.vis-itemset .vis-foreground { + position: absolute; + width: 100%; + height: 100%; + overflow: visible; +} + +.vis-axis { + position: absolute; + width: 100%; + height: 0; + left: 0; + z-index: 1; +} - padding-top:4px; +.vis-foreground .vis-group { + position: relative; + box-sizing: border-box; + border-bottom: 1px solid #bfbfbf; +} + +.vis-foreground .vis-group:last-child { + border-bottom: none; +} + +.vis-overlay { position: absolute; - left: 0; top: 0; + left: 0; width: 100%; - height: 28px; + height: 100%; + z-index: 10; } -div.vis-network div.vis-edit-mode { - position:absolute; - left: 0; - top: 5px; - height: 30px; -} +.vis-labelset { + position: relative; -/* FIXME: shouldn't the vis-close button be a child of the vis-manipulation div? */ + overflow: hidden; -div.vis-network div.vis-close { - position:absolute; - right: 0; + box-sizing: border-box; +} + +.vis-labelset .vis-label { + position: relative; + left: 0; top: 0; - width: 30px; - height: 30px; + width: 100%; + color: #4d4d4d; - background-position: 20px 3px; - background-repeat: no-repeat; - background-image: url("img/network/cross.png"); - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + box-sizing: border-box; } -div.vis-network div.vis-close:hover { - opacity: 0.6; +.vis-labelset .vis-label { + border-bottom: 1px solid #bfbfbf; } -div.vis-network div.vis-manipulation div.vis-button, -div.vis-network div.vis-edit-mode div.vis-button { - float:left; - font-family: verdana; - font-size: 12px; - -moz-border-radius: 15px; - border-radius: 15px; - display:inline-block; - background-position: 0px 0px; - background-repeat:no-repeat; - height:24px; - margin-left: 10px; - /*vertical-align:middle;*/ +.vis-labelset .vis-label.draggable { cursor: pointer; - padding: 0px 8px 0px 8px; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -div.vis-network div.vis-manipulation div.vis-button:hover { - box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.20); } -div.vis-network div.vis-manipulation div.vis-button:active { - box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.50); +.vis-labelset .vis-label:last-child { + border-bottom: none; } -div.vis-network div.vis-manipulation div.vis-button.vis-back { - background-image: url("img/network/backIcon.png"); +.vis-labelset .vis-label .vis-inner { + display: inline-block; + padding: 5px; } -div.vis-network div.vis-manipulation div.vis-button.vis-none:hover { - box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0); - cursor: default; -} -div.vis-network div.vis-manipulation div.vis-button.vis-none:active { - box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.0); -} -div.vis-network div.vis-manipulation div.vis-button.vis-none { +.vis-labelset .vis-label .vis-inner.vis-hidden { padding: 0; } -div.vis-network div.vis-manipulation div.notification { - margin: 2px; - font-weight: bold; -} -div.vis-network div.vis-manipulation div.vis-button.vis-add { - background-image: url("img/network/addNodeIcon.png"); -} +.vis-panel { + position: absolute; -div.vis-network div.vis-manipulation div.vis-button.vis-edit, -div.vis-network div.vis-edit-mode div.vis-button.vis-edit { - background-image: url("img/network/editIcon.png"); -} + padding: 0; + margin: 0; -div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode { - background-color: #fcfcfc; - border: 1px solid #cccccc; + box-sizing: border-box; } -div.vis-network div.vis-manipulation div.vis-button.vis-connect { - background-image: url("img/network/connectIcon.png"); +.vis-panel.vis-center, +.vis-panel.vis-left, +.vis-panel.vis-right, +.vis-panel.vis-top, +.vis-panel.vis-bottom { + border: 1px #bfbfbf; } -div.vis-network div.vis-manipulation div.vis-button.vis-delete { - background-image: url("img/network/deleteIcon.png"); -} -/* top right bottom left */ -div.vis-network div.vis-manipulation div.vis-label, -div.vis-network div.vis-edit-mode div.vis-label { - margin: 0 0 0 23px; - line-height: 25px; -} -div.vis-network div.vis-manipulation div.vis-separator-line { - float:left; - display:inline-block; - width:1px; - height:21px; - background-color: #bdbdbd; - margin: 0px 7px 0 15px; /*top right bottom left*/ +.vis-panel.vis-center, +.vis-panel.vis-left, +.vis-panel.vis-right { + border-top-style: solid; + border-bottom-style: solid; + overflow: hidden; } -/* TODO: is this redundant? -div.network-navigation_wrapper { - position: absolute; - left: 0; - top: 0; - width: 100%; +.vis-left.vis-panel.vis-vertical-scroll, .vis-right.vis-panel.vis-vertical-scroll { height: 100%; -} -*/ -div.vis-network-tooltip { - position: absolute; - visibility: hidden; - padding: 5px; - white-space: nowrap; + overflow-x: hidden; + overflow-y: scroll; +} - font-family: verdana; - font-size:14px; - color:#000000; - background-color: #f5f4ed; +.vis-left.vis-panel.vis-vertical-scroll { + direction: rtl; +} - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - border: 1px solid #808074; +.vis-left.vis-panel.vis-vertical-scroll .vis-content { + direction: ltr; +} - box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2); - pointer-events: none; +.vis-right.vis-panel.vis-vertical-scroll { + direction: ltr; } -div.vis-network div.vis-navigation div.vis-button { - width:34px; - height:34px; - -moz-border-radius: 17px; - border-radius: 17px; - position:absolute; - display:inline-block; - background-position: 2px 2px; - background-repeat:no-repeat; - cursor: pointer; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + +.vis-right.vis-panel.vis-vertical-scroll .vis-content { + direction: rtl; } -div.vis-network div.vis-navigation div.vis-button:hover { - box-shadow: 0 0 3px 3px rgba(56, 207, 21, 0.30); +.vis-panel.vis-center, +.vis-panel.vis-top, +.vis-panel.vis-bottom { + border-left-style: solid; + border-right-style: solid; } -div.vis-network div.vis-navigation div.vis-button:active { - box-shadow: 0 0 1px 3px rgba(56, 207, 21, 0.95); +.vis-background { + overflow: hidden; } -div.vis-network div.vis-navigation div.vis-button.vis-up { - background-image: url("img/network/upArrow.png"); - bottom:50px; - left:55px; +.vis-panel > .vis-content { + position: relative; } -div.vis-network div.vis-navigation div.vis-button.vis-down { - background-image: url("img/network/downArrow.png"); - bottom:10px; - left:55px; + +.vis-panel .vis-shadow { + position: absolute; + width: 100%; + height: 1px; + box-shadow: 0 0 10px rgba(0,0,0,0.8); + /* TODO: find a nice way to ensure vis-shadows are drawn on top of items + z-index: 1; + */ } -div.vis-network div.vis-navigation div.vis-button.vis-left { - background-image: url("img/network/leftArrow.png"); - bottom:10px; - left:15px; + +.vis-panel .vis-shadow.vis-top { + top: -1px; + left: 0; } -div.vis-network div.vis-navigation div.vis-button.vis-right { - background-image: url("img/network/rightArrow.png"); - bottom:10px; - left:95px; + +.vis-panel .vis-shadow.vis-bottom { + bottom: -1px; + left: 0; } -div.vis-network div.vis-navigation div.vis-button.vis-zoomIn { - background-image: url("img/network/plus.png"); - bottom:10px; - right:15px; +.vis-graph-group0 { + fill:#4f81bd; + fill-opacity:0; + stroke-width:2px; + stroke: #4f81bd; } -div.vis-network div.vis-navigation div.vis-button.vis-zoomOut { - background-image: url("img/network/minus.png"); - bottom:10px; - right:55px; + +.vis-graph-group1 { + fill:#f79646; + fill-opacity:0; + stroke-width:2px; + stroke: #f79646; } -div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends { - background-image: url("img/network/zoomExtends.png"); - bottom:50px; - right:15px; + +.vis-graph-group2 { + fill: #8c51cf; + fill-opacity:0; + stroke-width:2px; + stroke: #8c51cf; } -div.vis-color-picker { - position:absolute; - top: 0px; - left: 30px; - margin-top:-140px; - margin-left:30px; - width:310px; - height:444px; - z-index: 1; - padding: 10px; - border-radius:15px; - background-color:#ffffff; - display: none; - box-shadow: rgba(0,0,0,0.5) 0px 0px 10px 0px; +.vis-graph-group3 { + fill: #75c841; + fill-opacity:0; + stroke-width:2px; + stroke: #75c841; } -div.vis-color-picker div.vis-arrow { - position: absolute; - top:147px; - left:5px; +.vis-graph-group4 { + fill: #ff0100; + fill-opacity:0; + stroke-width:2px; + stroke: #ff0100; } -div.vis-color-picker div.vis-arrow::after, -div.vis-color-picker div.vis-arrow::before { - right: 100%; - top: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; +.vis-graph-group5 { + fill: #37d8e6; + fill-opacity:0; + stroke-width:2px; + stroke: #37d8e6; } -div.vis-color-picker div.vis-arrow:after { - border-color: rgba(255, 255, 255, 0); - border-right-color: #ffffff; - border-width: 30px; - margin-top: -30px; +.vis-graph-group6 { + fill: #042662; + fill-opacity:0; + stroke-width:2px; + stroke: #042662; } -div.vis-color-picker div.vis-color { - position:absolute; - width: 289px; - height: 289px; - cursor: pointer; +.vis-graph-group7 { + fill:#00ff26; + fill-opacity:0; + stroke-width:2px; + stroke: #00ff26; } +.vis-graph-group8 { + fill:#ff00ff; + fill-opacity:0; + stroke-width:2px; + stroke: #ff00ff; +} +.vis-graph-group9 { + fill: #8f3938; + fill-opacity:0; + stroke-width:2px; + stroke: #8f3938; +} -div.vis-color-picker div.vis-brightness { - position: absolute; - top:313px; +.vis-timeline .vis-fill { + fill-opacity:0.1; + stroke: none; } -div.vis-color-picker div.vis-opacity { - position:absolute; - top:350px; + +.vis-timeline .vis-bar { + fill-opacity:0.5; + stroke-width:1px; } -div.vis-color-picker div.vis-selector { - position:absolute; - top:137px; - left:137px; - width:15px; - height:15px; - border-radius:15px; - border:1px solid #ffffff; - background: #4c4c4c; /* Old browsers */ - background: -moz-linear-gradient(top, #4c4c4c 0%, #595959 12%, #666666 25%, #474747 39%, #2c2c2c 50%, #000000 51%, #111111 60%, #2b2b2b 76%, #1c1c1c 91%, #131313 100%); /* FF3.6+ */ - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4c4c4c), color-stop(12%,#595959), color-stop(25%,#666666), color-stop(39%,#474747), color-stop(50%,#2c2c2c), color-stop(51%,#000000), color-stop(60%,#111111), color-stop(76%,#2b2b2b), color-stop(91%,#1c1c1c), color-stop(100%,#131313)); /* Chrome,Safari4+ */ - background: -webkit-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* IE10+ */ - background: linear-gradient(to bottom, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); /* W3C */ - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313',GradientType=0 ); /* IE6-9 */ +.vis-timeline .vis-point { + stroke-width:2px; + fill-opacity:1.0; } +.vis-timeline .vis-legend-background { + stroke-width:1px; + fill-opacity:0.9; + fill: #ffffff; + stroke: #c2c2c2; +} -div.vis-color-picker div.vis-new-color { - position:absolute; - width:140px; - height:20px; - border:1px solid rgba(0,0,0,0.1); - border-radius:5px; - top:380px; - left:159px; - text-align:right; - padding-right:2px; - font-size:10px; - color:rgba(0,0,0,0.4); - vertical-align:middle; - line-height:20px; +.vis-timeline .vis-outline { + stroke-width:1px; + fill-opacity:1; + fill: #ffffff; + stroke: #e5e5e5; } -div.vis-color-picker div.vis-initial-color { - position:absolute; - width:140px; - height:20px; - border:1px solid rgba(0,0,0,0.1); - border-radius:5px; - top:380px; - left:10px; - text-align:left; - padding-left:2px; - font-size:10px; - color:rgba(0,0,0,0.4); - vertical-align:middle; - line-height:20px; +.vis-timeline .vis-icon-fill { + fill-opacity:0.3; + stroke: none; } -div.vis-color-picker div.vis-label { - position:absolute; - width:300px; - left:10px; +.vis-time-axis { + position: relative; + overflow: hidden; } -div.vis-color-picker div.vis-label.vis-brightness { - top:300px; +.vis-time-axis.vis-foreground { + top: 0; + left: 0; + width: 100%; } -div.vis-color-picker div.vis-label.vis-opacity { - top:338px; +.vis-time-axis.vis-background { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } -div.vis-color-picker div.vis-button { - position:absolute; - width:68px; - height:25px; - border-radius:10px; - vertical-align: middle; - text-align:center; - line-height: 25px; - top:410px; - border:2px solid #d9d9d9; - background-color: #f7f7f7; - cursor:pointer; -} +.vis-time-axis .vis-text { + position: absolute; + color: #4d4d4d; + padding: 3px; + overflow: hidden; + box-sizing: border-box; -div.vis-color-picker div.vis-button.vis-cancel { - /*border:2px solid #ff4e33;*/ - /*background-color: #ff7761;*/ - left:5px; -} -div.vis-color-picker div.vis-button.vis-load { - /*border:2px solid #a153e6;*/ - /*background-color: #cb8dff;*/ - left:82px; + white-space: nowrap; } -div.vis-color-picker div.vis-button.vis-apply { - /*border:2px solid #4588e6;*/ - /*background-color: #82b6ff;*/ - left:159px; + +.vis-time-axis .vis-text.vis-measure { + position: absolute; + padding-left: 0; + padding-right: 0; + margin-left: 0; + margin-right: 0; + visibility: hidden; } -div.vis-color-picker div.vis-button.vis-save { - /*border:2px solid #45e655;*/ - /*background-color: #6dff7c;*/ - left:236px; + +.vis-time-axis .vis-grid.vis-vertical { + position: absolute; + border-left: 1px solid; } +.vis-time-axis .vis-grid.vis-vertical-rtl { + position: absolute; + border-right: 1px solid; +} -div.vis-color-picker input.vis-range { - width: 290px; - height:20px; +.vis-time-axis .vis-grid.vis-minor { + border-color: #e5e5e5; } -/* TODO: is this redundant? -div.vis-color-picker input.vis-range-brightness { - width: 289px !important; +.vis-time-axis .vis-grid.vis-major { + border-color: #bfbfbf; } -div.vis-color-picker input.vis-saturation-range { - width: 289px !important; -}*/ \ No newline at end of file +.vis-timeline { + position: relative; + border: 1px solid #bfbfbf; + + overflow: hidden; + padding: 0; + margin: 0; + + box-sizing: border-box; +} diff --git a/dist/vis.js b/dist/vis.js index 538e2733..aabaddd5 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -4,8 +4,8 @@ * * A dynamic, browser-based visualization library. * - * @version 4.16.1 - * @date 2016-04-18 + * @version 4.17.0 + * @date 2016-11-05 * * @license * Copyright (C) 2011-2016 Almende B.V, http://almende.com @@ -89,10 +89,10 @@ return /******/ (function(modules) { // webpackBootstrap util.extend(exports, __webpack_require__(7)); // Timeline & Graph2d - util.extend(exports, __webpack_require__(24)); + util.extend(exports, __webpack_require__(26)); // Network - util.extend(exports, __webpack_require__(60)); + util.extend(exports, __webpack_require__(62)); /***/ }, /* 1 */ @@ -100,13 +100,14 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; // utility functions // first check if moment.js is already loaded in the browser window, if so, // use this instance. Else, load via commonjs. + var moment = __webpack_require__(2); var uuid = __webpack_require__(6); @@ -211,7 +212,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param value */ exports.fillIfDefined = function (a, b) { - var allowDeletion = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; for (var prop in a) { if (b[prop] !== undefined) { @@ -301,7 +302,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Object} a */ exports.selectiveDeepExtend = function (props, a, b) { - var allowDeletion = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; // TODO: add support for Arrays to deepExtend if (Array.isArray(b)) { @@ -349,7 +350,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Object} a */ exports.selectiveNotDeepExtend = function (props, a, b) { - var allowDeletion = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; // TODO: add support for Arrays to deepExtend if (Array.isArray(b)) { @@ -482,8 +483,11 @@ return /******/ (function(modules) { // webpackBootstrap case 'number': case 'Number': - return Number(object.valueOf()); - + if (!isNaN(Date.parse(object))) { + return moment(object).valueOf(); + } else { + return Number(object.valueOf()); + } case 'string': case 'String': return String(object); @@ -503,11 +507,11 @@ return /******/ (function(modules) { // webpackBootstrap // object is an ASP date return new Date(Number(match[1])); // parse number } else { - return moment(object).toDate(); // parse string - } - } else { - throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); + return moment(new Date(object)).toDate(); // parse string } + } else { + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); + } case 'Moment': if (exports.isNumber(object)) { @@ -524,11 +528,11 @@ return /******/ (function(modules) { // webpackBootstrap // object is an ASP date return moment(Number(match[1])); // parse number } else { - return moment(object); // parse string - } - } else { - throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); + return moment(object); // parse string } + } else { + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type Date'); + } case 'ISODate': if (exports.isNumber(object)) { @@ -543,11 +547,11 @@ return /******/ (function(modules) { // webpackBootstrap // object is an ASP date return new Date(Number(match[1])).toISOString(); // parse number } else { - return new Date(object).toISOString(); // parse string - } - } else { - throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ISODate'); + return moment(object).format(); // ISO 8601 } + } else { + throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ISODate'); + } case 'ASPDate': if (exports.isNumber(object)) { @@ -561,8 +565,8 @@ return /******/ (function(modules) { // webpackBootstrap // object is an ASP date value = new Date(Number(match[1])).valueOf(); // parse number } else { - value = new Date(object).valueOf(); // parse string - } + value = new Date(object).valueOf(); // parse string + } return '/Date(' + value + ')/'; } else { throw new Error('Cannot convert object of type ' + exports.getType(object) + ' to type ASPDate'); @@ -760,28 +764,20 @@ return /******/ (function(modules) { // webpackBootstrap }; /** - * Throttle the given function to be only executed once every `wait` milliseconds + * Throttle the given function to be only executed once per animation frame * @param {function} fn - * @param {number} wait Time in milliseconds * @returns {function} Returns the throttled function */ - exports.throttle = function (fn, wait) { - var timeout = null; - var needExecution = false; + exports.throttle = function (fn) { + var scheduled = false; return function throttled() { - if (!timeout) { - needExecution = false; - fn(); - - timeout = setTimeout(function () { - timeout = null; - if (needExecution) { - throttled(); - } - }, wait); - } else { - needExecution = true; + if (!scheduled) { + scheduled = true; + requestAnimationFrame(function () { + scheduled = false; + fn(); + }); } }; }; @@ -840,8 +836,8 @@ return /******/ (function(modules) { // webpackBootstrap if (event.preventDefault) { event.preventDefault(); // non-IE browsers } else { - event.returnValue = false; // IE browsers - } + event.returnValue = false; // IE browsers + } }; /** @@ -1329,8 +1325,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param [String] option | this is the option key in the options argument */ exports.mergeOptions = function (mergeTarget, options, option) { - var allowDeletion = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; - var globalOptions = arguments.length <= 4 || arguments[4] === undefined ? {} : arguments[4]; + var allowDeletion = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var globalOptions = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; if (options[option] === null) { mergeTarget[option] = Object.create(globalOptions[option]); @@ -1510,6 +1506,32 @@ return /******/ (function(modules) { // webpackBootstrap } }; + exports.getScrollBarWidth = function () { + var inner = document.createElement('p'); + inner.style.width = "100%"; + inner.style.height = "200px"; + + var outer = document.createElement('div'); + outer.style.position = "absolute"; + outer.style.top = "0px"; + outer.style.left = "0px"; + outer.style.visibility = "hidden"; + outer.style.width = "200px"; + outer.style.height = "150px"; + outer.style.overflow = "hidden"; + outer.appendChild(inner); + + document.body.appendChild(outer); + var w1 = inner.offsetWidth; + outer.style.overflow = 'scroll'; + var w2 = inner.offsetWidth; + if (w1 == w2) w2 = outer.clientWidth; + + document.body.removeChild(outer); + + return w1 - w2; + }; + /***/ }, /* 2 */ /***/ function(module, exports, __webpack_require__) { @@ -1525,7 +1547,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {//! moment.js - //! version : 2.13.0 + //! version : 2.15.2 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com @@ -1552,6 +1574,21 @@ return /******/ (function(modules) { // webpackBootstrap return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; } + function isObject(input) { + // IE8 will treat undefined and null as object if it wasn't for + // input != null + return input != null && Object.prototype.toString.call(input) === '[object Object]'; + } + + function isObjectEmpty(obj) { + var k; + for (k in obj) { + // even if its not own property I'd still call it non-empty + return false; + } + return true; + } + function isDate(input) { return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; } @@ -1639,7 +1676,7 @@ return /******/ (function(modules) { // webpackBootstrap var parsedParts = some.call(flags.parsedDateParts, function (i) { return i != null; }); - m._isValid = !isNaN(m._d.getTime()) && + var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && @@ -1650,11 +1687,18 @@ return /******/ (function(modules) { // webpackBootstrap (!flags.meridiem || (flags.meridiem && parsedParts)); if (m._strict) { - m._isValid = m._isValid && + isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } + else { + return isNowValid; + } } return m._isValid; } @@ -1747,7 +1791,8 @@ return /******/ (function(modules) { // webpackBootstrap function absFloor (number) { if (number < 0) { - return Math.ceil(number); + // -0 -> 0 + return Math.ceil(number) || 0; } else { return Math.floor(number); } @@ -1794,7 +1839,22 @@ return /******/ (function(modules) { // webpackBootstrap utils_hooks__hooks.deprecationHandler(null, msg); } if (firstTime) { - warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack); + var args = []; + var arg; + for (var i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (var key in arguments[0]) { + arg += key + ': ' + arguments[0][key] + ', '; + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); firstTime = false; } return fn.apply(this, arguments); @@ -1820,10 +1880,6 @@ return /******/ (function(modules) { // webpackBootstrap return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; } - function isObject(input) { - return Object.prototype.toString.call(input) === '[object Object]'; - } - function locale_set__set (config) { var prop, i; for (i in config) { @@ -1855,6 +1911,14 @@ return /******/ (function(modules) { // webpackBootstrap } } } + for (prop in parentConfig) { + if (hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop])) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } return res; } @@ -1880,161 +1944,83 @@ return /******/ (function(modules) { // webpackBootstrap }; } - // internal storage for locale config files - var locales = {}; - var globalLocale; + var defaultCalendar = { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }; - function normalizeLocale(key) { - return key ? key.toLowerCase().replace('_', '-') : key; + function locale_calendar__calendar (key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; } - // pick the locale from the array - // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each - // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root - function chooseLocale(names) { - var i = 0, j, next, locale, split; + var defaultLongDateFormat = { + LTS : 'h:mm:ss A', + LT : 'h:mm A', + L : 'MM/DD/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY h:mm A', + LLLL : 'dddd, MMMM D, YYYY h:mm A' + }; - while (i < names.length) { - split = normalizeLocale(names[i]).split('-'); - j = split.length; - next = normalizeLocale(names[i + 1]); - next = next ? next.split('-') : null; - while (j > 0) { - locale = loadLocale(split.slice(0, j).join('-')); - if (locale) { - return locale; - } - if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { - //the next array item is better than a shallower substring of this one - break; - } - j--; - } - i++; - } - return null; - } + function longDateFormat (key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; - function loadLocale(name) { - var oldLocale = null; - // TODO: Find a better way to register and load all the locales in Node - if (!locales[name] && (typeof module !== 'undefined') && - module && module.exports) { - try { - oldLocale = globalLocale._abbr; - !(function webpackMissingModule() { var e = new Error("Cannot find module \"./locale\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()); - // because defineLocale currently also sets the global locale, we - // want to undo that for lazy loaded locales - locale_locales__getSetGlobalLocale(oldLocale); - } catch (e) { } + if (format || !formatUpper) { + return format; } - return locales[name]; - } - // This function will load locale and then set the global locale. If - // no arguments are passed in, it will simply return the current global - // locale key. - function locale_locales__getSetGlobalLocale (key, values) { - var data; - if (key) { - if (isUndefined(values)) { - data = locale_locales__getLocale(key); - } - else { - data = defineLocale(key, values); - } - - if (data) { - // moment.duration._locale = moment._locale = data; - globalLocale = data; - } - } + this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); - return globalLocale._abbr; + return this._longDateFormat[key]; } - function defineLocale (name, config) { - if (config !== null) { - config.abbr = name; - if (locales[name] != null) { - deprecateSimple('defineLocaleOverride', - 'use moment.updateLocale(localeName, config) to change ' + - 'an existing locale. moment.defineLocale(localeName, ' + - 'config) should only be used for creating a new locale'); - config = mergeConfigs(locales[name]._config, config); - } else if (config.parentLocale != null) { - if (locales[config.parentLocale] != null) { - config = mergeConfigs(locales[config.parentLocale]._config, config); - } else { - // treat as if there is no base config - deprecateSimple('parentLocaleUndefined', - 'specified parentLocale is not defined yet'); - } - } - locales[name] = new Locale(config); - - // backwards compat for now: also set the locale - locale_locales__getSetGlobalLocale(name); + var defaultInvalidDate = 'Invalid date'; - return locales[name]; - } else { - // useful for testing - delete locales[name]; - return null; - } + function invalidDate () { + return this._invalidDate; } - function updateLocale(name, config) { - if (config != null) { - var locale; - if (locales[name] != null) { - config = mergeConfigs(locales[name]._config, config); - } - locale = new Locale(config); - locale.parentLocale = locales[name]; - locales[name] = locale; + var defaultOrdinal = '%d'; + var defaultOrdinalParse = /\d{1,2}/; - // backwards compat for now: also set the locale - locale_locales__getSetGlobalLocale(name); - } else { - // pass null for config to unupdate, useful for tests - if (locales[name] != null) { - if (locales[name].parentLocale != null) { - locales[name] = locales[name].parentLocale; - } else if (locales[name] != null) { - delete locales[name]; - } - } - } - return locales[name]; + function ordinal (number) { + return this._ordinal.replace('%d', number); } - // returns locale data - function locale_locales__getLocale (key) { - var locale; - - if (key && key._locale && key._locale._abbr) { - key = key._locale._abbr; - } - - if (!key) { - return globalLocale; - } - - if (!isArray(key)) { - //short-circuit everything else - locale = loadLocale(key); - if (locale) { - return locale; - } - key = [key]; - } + var defaultRelativeTime = { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }; - return chooseLocale(key); + function relative__relativeTime (number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return (isFunction(output)) ? + output(number, withoutSuffix, string, isFuture) : + output.replace(/%d/i, number); } - function locale_locales__listLocales() { - return keys(locales); + function pastFuture (diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); } var aliases = {}; @@ -2065,6 +2051,23 @@ return /******/ (function(modules) { // webpackBootstrap return normalizedInput; } + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = []; + for (var u in unitsObj) { + units.push({unit: u, priority: priorities[u]}); + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + function makeGetSet (unit, keepTime) { return function (value) { if (value != null) { @@ -2090,11 +2093,21 @@ return /******/ (function(modules) { // webpackBootstrap // MOMENTS - function getSet (units, value) { - var unit; + function stringGet (units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; + } + + + function stringSet (units, value) { if (typeof units === 'object') { - for (unit in units) { - this.set(unit, units[unit]); + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units); + for (var i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); } } else { units = normalizeUnits(units); @@ -2334,6 +2347,10 @@ return /******/ (function(modules) { // webpackBootstrap addUnitAlias('month', 'M'); + // PRIORITY + + addUnitPriority('month', 8); + // PARSING addRegexToken('M', match1to2); @@ -2361,15 +2378,21 @@ return /******/ (function(modules) { // webpackBootstrap // LOCALES - var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/; + var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); function localeMonths (m, format) { + if (!m) { + return this._months; + } return isArray(this._months) ? this._months[m.month()] : - this._months[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; + this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; } var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); function localeMonthsShort (m, format) { + if (!m) { + return this._monthsShort; + } return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; } @@ -2506,6 +2529,9 @@ return /******/ (function(modules) { // webpackBootstrap return this._monthsShortRegex; } } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; } @@ -2523,6 +2549,9 @@ return /******/ (function(modules) { // webpackBootstrap return this._monthsRegex; } } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } @@ -2551,6 +2580,8 @@ return /******/ (function(modules) { // webpackBootstrap for (i = 0; i < 12; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { mixedPieces[i] = regexEscape(mixedPieces[i]); } @@ -2560,174 +2591,6 @@ return /******/ (function(modules) { // webpackBootstrap this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); } - function checkOverflow (m) { - var overflow; - var a = m._a; - - if (a && getParsingFlags(m).overflow === -2) { - overflow = - a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : - a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : - a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : - a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : - a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : - a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : - -1; - - if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { - overflow = DATE; - } - if (getParsingFlags(m)._overflowWeeks && overflow === -1) { - overflow = WEEK; - } - if (getParsingFlags(m)._overflowWeekday && overflow === -1) { - overflow = WEEKDAY; - } - - getParsingFlags(m).overflow = overflow; - } - - return m; - } - - // iso 8601 regex - // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) - var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; - var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; - - var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; - - var isoDates = [ - ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], - ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], - ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], - ['GGGG-[W]WW', /\d{4}-W\d\d/, false], - ['YYYY-DDD', /\d{4}-\d{3}/], - ['YYYY-MM', /\d{4}-\d\d/, false], - ['YYYYYYMMDD', /[+-]\d{10}/], - ['YYYYMMDD', /\d{8}/], - // YYYYMM is NOT allowed by the standard - ['GGGG[W]WWE', /\d{4}W\d{3}/], - ['GGGG[W]WW', /\d{4}W\d{2}/, false], - ['YYYYDDD', /\d{7}/] - ]; - - // iso time formats and regexes - var isoTimes = [ - ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], - ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], - ['HH:mm:ss', /\d\d:\d\d:\d\d/], - ['HH:mm', /\d\d:\d\d/], - ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], - ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], - ['HHmmss', /\d\d\d\d\d\d/], - ['HHmm', /\d\d\d\d/], - ['HH', /\d\d/] - ]; - - var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; - - // date from iso format - function configFromISO(config) { - var i, l, - string = config._i, - match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), - allowTime, dateFormat, timeFormat, tzFormat; - - if (match) { - getParsingFlags(config).iso = true; - - for (i = 0, l = isoDates.length; i < l; i++) { - if (isoDates[i][1].exec(match[1])) { - dateFormat = isoDates[i][0]; - allowTime = isoDates[i][2] !== false; - break; - } - } - if (dateFormat == null) { - config._isValid = false; - return; - } - if (match[3]) { - for (i = 0, l = isoTimes.length; i < l; i++) { - if (isoTimes[i][1].exec(match[3])) { - // match[2] should be 'T' or space - timeFormat = (match[2] || ' ') + isoTimes[i][0]; - break; - } - } - if (timeFormat == null) { - config._isValid = false; - return; - } - } - if (!allowTime && timeFormat != null) { - config._isValid = false; - return; - } - if (match[4]) { - if (tzRegex.exec(match[4])) { - tzFormat = 'Z'; - } else { - config._isValid = false; - return; - } - } - config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); - configFromStringAndFormat(config); - } else { - config._isValid = false; - } - } - - // date from iso format or fallback - function configFromString(config) { - var matched = aspNetJsonRegex.exec(config._i); - - if (matched !== null) { - config._d = new Date(+matched[1]); - return; - } - - configFromISO(config); - if (config._isValid === false) { - delete config._isValid; - utils_hooks__hooks.createFromInputFallback(config); - } - } - - utils_hooks__hooks.createFromInputFallback = deprecate( - 'moment construction falls back to js Date. This is ' + - 'discouraged and will be removed in upcoming major ' + - 'release. Please refer to ' + - 'https://github.com/moment/moment/issues/1407 for more info.', - function (config) { - config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); - } - ); - - function createDate (y, m, d, h, M, s, ms) { - //can't just apply() to create a date: - //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply - var date = new Date(y, m, d, h, M, s, ms); - - //the date constructor remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { - date.setFullYear(y); - } - return date; - } - - function createUTCDate (y) { - var date = new Date(Date.UTC.apply(null, arguments)); - - //the Date.UTC function remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { - date.setUTCFullYear(y); - } - return date; - } - // FORMATTING addFormatToken('Y', 0, 0, function () { @@ -2747,6 +2610,10 @@ return /******/ (function(modules) { // webpackBootstrap addUnitAlias('year', 'y'); + // PRIORITIES + + addUnitPriority('year', 1); + // PARSING addRegexToken('Y', matchSigned); @@ -2790,6 +2657,28 @@ return /******/ (function(modules) { // webpackBootstrap return isLeapYear(this.year()); } + function createDate (y, m, d, h, M, s, ms) { + //can't just apply() to create a date: + //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply + var date = new Date(y, m, d, h, M, s, ms); + + //the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { + date.setFullYear(y); + } + return date; + } + + function createUTCDate (y) { + var date = new Date(Date.UTC.apply(null, arguments)); + + //the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + return date; + } + // start-of-first-week - start-of-year function firstWeekOffset(year, dow, doy) { var // first-week day -- which january is always in the first week (4 for iso, 1 for other) @@ -2852,6 +2741,872 @@ return /******/ (function(modules) { // webpackBootstrap return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 1st is the first week of the year. + }; + + function localeFirstDayOfWeek () { + return this._week.dow; + } + + function localeFirstDayOfYear () { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PRIORITY + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + + // LOCALES + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + function localeWeekdays (m, format) { + if (!m) { + return this._weekdays; + } + return isArray(this._weekdays) ? this._weekdays[m.day()] : + this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; + } + + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + function localeWeekdaysShort (m) { + return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + function localeWeekdaysMin (m) { + return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; + } + + function day_of_week__handleStrictParse(weekdayName, format, strict) { + var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = create_utc__createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse (weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return day_of_week__handleStrictParse.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = create_utc__createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); + this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); + this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); + } + if (!this._weekdaysParse[i]) { + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek (input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + var defaultWeekdaysRegex = matchWord; + function weekdaysRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict ? + this._weekdaysStrictRegex : this._weekdaysRegex; + } + } + + var defaultWeekdaysShortRegex = matchWord; + function weekdaysShortRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict ? + this._weekdaysShortStrictRegex : this._weekdaysShortRegex; + } + } + + var defaultWeekdaysMinRegex = matchWord; + function weekdaysMinRegex (isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict ? + this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + } + } + + + function computeWeekdaysParse () { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], + i, mom, minp, shortp, longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = create_utc__createUTC([2000, 1]).day(i); + minp = this.weekdaysMin(mom, ''); + shortp = this.weekdaysShort(mom, ''); + longp = this.weekdays(mom, ''); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 7; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); + this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); + this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2); + }); + + function meridiem (token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PRIORITY + addUnitPriority('hour', 13); + + // PARSING + + function matchMeridiem (isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4; + var pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM (input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return ((input + '').toLowerCase().charAt(0) === 'p'); + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + function localeMeridiem (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + + // MOMENTS + + // Setting the hour should keep the time, because the user explicitly + // specified which hour he wants. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + var getSetHour = makeGetSet('Hours', true); + + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + ordinalParse: defaultOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse + }; + + // internal storage for locale config files + var locales = {}; + var globalLocale; + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, j, next, locale, split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return null; + } + + function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && (typeof module !== 'undefined') && + module && module.exports) { + try { + oldLocale = globalLocale._abbr; + !(function webpackMissingModule() { var e = new Error("Cannot find module \"./locale\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()); + // because defineLocale currently also sets the global locale, we + // want to undo that for lazy loaded locales + locale_locales__getSetGlobalLocale(oldLocale); + } catch (e) { } + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function locale_locales__getSetGlobalLocale (key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = locale_locales__getLocale(key); + } + else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + } + + return globalLocale._abbr; + } + + function defineLocale (name, config) { + if (config !== null) { + var parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple('defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + // treat as if there is no base config + deprecateSimple('parentLocaleUndefined', + 'specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/'); + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + // backwards compat for now: also set the locale + locale_locales__getSetGlobalLocale(name); + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, parentConfig = baseConfig; + // MERGE + if (locales[name] != null) { + parentConfig = locales[name]._config; + } + config = mergeConfigs(parentConfig, config); + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + + // backwards compat for now: also set the locale + locale_locales__getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function locale_locales__getLocale (key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function locale_locales__listLocales() { + return keys(locales); + } + + function checkOverflow (m) { + var overflow; + var a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : + -1; + + if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; + var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; + + var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; + + var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + // YYYYMM is NOT allowed by the standard + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/] + ]; + + // iso time formats and regexes + var isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/] + ]; + + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; + + // date from iso format + function configFromISO(config) { + var i, l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, dateFormat, timeFormat, tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + // date from iso format or fallback + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + utils_hooks__hooks.createFromInputFallback(config); + } + } + + utils_hooks__hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); + // Pick the first defined of two or three arguments. function defaults(a, b, c) { if (a != null) { @@ -3048,9 +3803,9 @@ return /******/ (function(modules) { // webpackBootstrap } // clear _12h flag if hour is <= 12 - if (getParsingFlags(config).bigHour === true && - config._a[HOUR] <= 12 && - config._a[HOUR] > 0) { + if (config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; } @@ -3176,11 +3931,11 @@ return /******/ (function(modules) { // webpackBootstrap return new Moment(checkOverflow(input)); } else if (isArray(format)) { configFromStringAndArray(config); - } else if (format) { - configFromStringAndFormat(config); } else if (isDate(input)) { config._d = input; - } else { + } else if (format) { + configFromStringAndFormat(config); + } else { configFromInput(config); } @@ -3221,6 +3976,11 @@ return /******/ (function(modules) { // webpackBootstrap strict = locale; locale = undefined; } + + if ((isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0)) { + input = undefined; + } // object construction must be done this way. // https://github.com/moment/moment/issues/1423 c._isAMomentObject = true; @@ -3238,19 +3998,19 @@ return /******/ (function(modules) { // webpackBootstrap } var prototypeMin = deprecate( - 'moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', - function () { - var other = local__createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other < this ? this : other; - } else { - return valid__createInvalid(); - } - } - ); + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = local__createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return valid__createInvalid(); + } + } + ); var prototypeMax = deprecate( - 'moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = local__createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { @@ -3339,6 +4099,14 @@ return /******/ (function(modules) { // webpackBootstrap return obj instanceof Duration; } + function absRound (number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + // FORMATTING function offset (token, separator) { @@ -3489,7 +4257,13 @@ return /******/ (function(modules) { // webpackBootstrap if (this._tzm) { this.utcOffset(this._tzm); } else if (typeof this._i === 'string') { - this.utcOffset(offsetFromString(matchOffset, this._i)); + var tZone = offsetFromString(matchOffset, this._i); + + if (tZone === 0) { + this.utcOffset(0, true); + } else { + this.utcOffset(offsetFromString(matchOffset, this._i)); + } } return this; } @@ -3544,7 +4318,7 @@ return /******/ (function(modules) { // webpackBootstrap } // ASP.NET json date format regex - var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/; + var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere @@ -3576,11 +4350,11 @@ return /******/ (function(modules) { // webpackBootstrap sign = (match[1] === '-') ? -1 : 1; duration = { y : 0, - d : toInt(match[DATE]) * sign, - h : toInt(match[HOUR]) * sign, - m : toInt(match[MINUTE]) * sign, - s : toInt(match[SECOND]) * sign, - ms : toInt(match[MILLISECOND]) * sign + d : toInt(match[DATE]) * sign, + h : toInt(match[HOUR]) * sign, + m : toInt(match[MINUTE]) * sign, + s : toInt(match[SECOND]) * sign, + ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match }; } else if (!!(match = isoRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; @@ -3655,21 +4429,14 @@ return /******/ (function(modules) { // webpackBootstrap return res; } - function absRound (number) { - if (number < 0) { - return Math.round(-1 * number) * -1; - } else { - return Math.round(number); - } - } - // TODO: remove 'name' arg after deprecation is removed function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { - deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); tmp = val; val = period; period = tmp; } @@ -3709,20 +4476,24 @@ return /******/ (function(modules) { // webpackBootstrap var add_subtract__add = createAdder(1, 'add'); var add_subtract__subtract = createAdder(-1, 'subtract'); - function moment_calendar__calendar (time, formats) { - // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're local/utc/offset or not. - var now = time || local__createLocal(), - sod = cloneWithOffset(now, this).startOf('day'), - diff = this.diff(sod, 'days', true), - format = diff < -6 ? 'sameElse' : + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; + } - var output = formats && (isFunction(formats[format]) ? formats[format]() : formats[format]); + function moment_calendar__calendar (time, formats) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || local__createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = utils_hooks__hooks.calendarFormat(this, sod) || 'sameElse'; + + var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); return this.format(output || this.localeData().calendar(format, this, local__createLocal(now))); } @@ -3939,27 +4710,27 @@ return /******/ (function(modules) { // webpackBootstrap // the following switch intentionally omits break keywords // to utilize falling through the cases. switch (units) { - case 'year': - this.month(0); - /* falls through */ - case 'quarter': - case 'month': - this.date(1); - /* falls through */ - case 'week': - case 'isoWeek': - case 'day': - case 'date': - this.hours(0); - /* falls through */ - case 'hour': - this.minutes(0); - /* falls through */ - case 'minute': - this.seconds(0); - /* falls through */ - case 'second': - this.milliseconds(0); + case 'year': + this.month(0); + /* falls through */ + case 'quarter': + case 'month': + this.date(1); + /* falls through */ + case 'week': + case 'isoWeek': + case 'day': + case 'date': + this.hours(0); + /* falls through */ + case 'hour': + this.minutes(0); + /* falls through */ + case 'minute': + this.seconds(0); + /* falls through */ + case 'second': + this.milliseconds(0); } // weeks are a special case @@ -4001,7 +4772,7 @@ return /******/ (function(modules) { // webpackBootstrap } function toDate () { - return this._offset ? new Date(this.valueOf()) : this._d; + return new Date(this.valueOf()); } function toArray () { @@ -4066,650 +4837,166 @@ return /******/ (function(modules) { // webpackBootstrap addWeekYearFormatToken('gggg', 'weekYear'); addWeekYearFormatToken('ggggg', 'weekYear'); addWeekYearFormatToken('GGGG', 'isoWeekYear'); - addWeekYearFormatToken('GGGGG', 'isoWeekYear'); - - // ALIASES - - addUnitAlias('weekYear', 'gg'); - addUnitAlias('isoWeekYear', 'GG'); - - // PARSING - - addRegexToken('G', matchSigned); - addRegexToken('g', matchSigned); - addRegexToken('GG', match1to2, match2); - addRegexToken('gg', match1to2, match2); - addRegexToken('GGGG', match1to4, match4); - addRegexToken('gggg', match1to4, match4); - addRegexToken('GGGGG', match1to6, match6); - addRegexToken('ggggg', match1to6, match6); - - addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { - week[token.substr(0, 2)] = toInt(input); - }); - - addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { - week[token] = utils_hooks__hooks.parseTwoDigitYear(input); - }); - - // MOMENTS - - function getSetWeekYear (input) { - return getSetWeekYearHelper.call(this, - input, - this.week(), - this.weekday(), - this.localeData()._week.dow, - this.localeData()._week.doy); - } - - function getSetISOWeekYear (input) { - return getSetWeekYearHelper.call(this, - input, this.isoWeek(), this.isoWeekday(), 1, 4); - } - - function getISOWeeksInYear () { - return weeksInYear(this.year(), 1, 4); - } - - function getWeeksInYear () { - var weekInfo = this.localeData()._week; - return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); - } - - function getSetWeekYearHelper(input, week, weekday, dow, doy) { - var weeksTarget; - if (input == null) { - return weekOfYear(this, dow, doy).year; - } else { - weeksTarget = weeksInYear(input, dow, doy); - if (week > weeksTarget) { - week = weeksTarget; - } - return setWeekAll.call(this, input, week, weekday, dow, doy); - } - } - - function setWeekAll(weekYear, week, weekday, dow, doy) { - var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), - date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); - - this.year(date.getUTCFullYear()); - this.month(date.getUTCMonth()); - this.date(date.getUTCDate()); - return this; - } - - // FORMATTING - - addFormatToken('Q', 0, 'Qo', 'quarter'); - - // ALIASES - - addUnitAlias('quarter', 'Q'); - - // PARSING - - addRegexToken('Q', match1); - addParseToken('Q', function (input, array) { - array[MONTH] = (toInt(input) - 1) * 3; - }); - - // MOMENTS - - function getSetQuarter (input) { - return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); - } - - // FORMATTING - - addFormatToken('w', ['ww', 2], 'wo', 'week'); - addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); - - // ALIASES - - addUnitAlias('week', 'w'); - addUnitAlias('isoWeek', 'W'); - - // PARSING - - addRegexToken('w', match1to2); - addRegexToken('ww', match1to2, match2); - addRegexToken('W', match1to2); - addRegexToken('WW', match1to2, match2); - - addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { - week[token.substr(0, 1)] = toInt(input); - }); - - // HELPERS - - // LOCALES - - function localeWeek (mom) { - return weekOfYear(mom, this._week.dow, this._week.doy).week; - } - - var defaultLocaleWeek = { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 1st is the first week of the year. - }; - - function localeFirstDayOfWeek () { - return this._week.dow; - } - - function localeFirstDayOfYear () { - return this._week.doy; - } - - // MOMENTS - - function getSetWeek (input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, 'd'); - } - - function getSetISOWeek (input) { - var week = weekOfYear(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, 'd'); - } - - // FORMATTING - - addFormatToken('D', ['DD', 2], 'Do', 'date'); - - // ALIASES - - addUnitAlias('date', 'D'); - - // PARSING - - addRegexToken('D', match1to2); - addRegexToken('DD', match1to2, match2); - addRegexToken('Do', function (isStrict, locale) { - return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; - }); - - addParseToken(['D', 'DD'], DATE); - addParseToken('Do', function (input, array) { - array[DATE] = toInt(input.match(match1to2)[0], 10); - }); - - // MOMENTS - - var getSetDayOfMonth = makeGetSet('Date', true); - - // FORMATTING - - addFormatToken('d', 0, 'do', 'day'); - - addFormatToken('dd', 0, 0, function (format) { - return this.localeData().weekdaysMin(this, format); - }); - - addFormatToken('ddd', 0, 0, function (format) { - return this.localeData().weekdaysShort(this, format); - }); - - addFormatToken('dddd', 0, 0, function (format) { - return this.localeData().weekdays(this, format); - }); - - addFormatToken('e', 0, 0, 'weekday'); - addFormatToken('E', 0, 0, 'isoWeekday'); - - // ALIASES - - addUnitAlias('day', 'd'); - addUnitAlias('weekday', 'e'); - addUnitAlias('isoWeekday', 'E'); - - // PARSING - - addRegexToken('d', match1to2); - addRegexToken('e', match1to2); - addRegexToken('E', match1to2); - addRegexToken('dd', function (isStrict, locale) { - return locale.weekdaysMinRegex(isStrict); - }); - addRegexToken('ddd', function (isStrict, locale) { - return locale.weekdaysShortRegex(isStrict); - }); - addRegexToken('dddd', function (isStrict, locale) { - return locale.weekdaysRegex(isStrict); - }); - - addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { - var weekday = config._locale.weekdaysParse(input, token, config._strict); - // if we didn't get a weekday name, mark the date as invalid - if (weekday != null) { - week.d = weekday; - } else { - getParsingFlags(config).invalidWeekday = input; - } - }); - - addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { - week[token] = toInt(input); - }); - - // HELPERS - - function parseWeekday(input, locale) { - if (typeof input !== 'string') { - return input; - } - - if (!isNaN(input)) { - return parseInt(input, 10); - } - - input = locale.weekdaysParse(input); - if (typeof input === 'number') { - return input; - } - - return null; - } - - // LOCALES - - var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); - function localeWeekdays (m, format) { - return isArray(this._weekdays) ? this._weekdays[m.day()] : - this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; - } - - var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); - function localeWeekdaysShort (m) { - return this._weekdaysShort[m.day()]; - } - - var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); - function localeWeekdaysMin (m) { - return this._weekdaysMin[m.day()]; - } - - function day_of_week__handleStrictParse(weekdayName, format, strict) { - var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._shortWeekdaysParse = []; - this._minWeekdaysParse = []; - - for (i = 0; i < 7; ++i) { - mom = create_utc__createUTC([2000, 1]).day(i); - this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); - this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); - this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'dddd') { - ii = indexOf.call(this._weekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'dddd') { - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf.call(this._minWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } - } + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); - function localeWeekdaysParse (weekdayName, format, strict) { - var i, mom, regex; + // ALIASES - if (this._weekdaysParseExact) { - return day_of_week__handleStrictParse.call(this, weekdayName, format, strict); - } + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._minWeekdaysParse = []; - this._shortWeekdaysParse = []; - this._fullWeekdaysParse = []; - } + // PRIORITY - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); - mom = create_utc__createUTC([2000, 1]).day(i); - if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); - } - if (!this._weekdaysParse[i]) { - regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); - this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { - return i; - } - } - } + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = utils_hooks__hooks.parseTwoDigitYear(input); + }); // MOMENTS - function getSetDayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); - if (input != null) { - input = parseWeekday(input, this.localeData()); - return this.add(input - day, 'd'); - } else { - return day; - } + function getSetWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy); } - function getSetLocaleDayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; - return input == null ? weekday : this.add(input - weekday, 'd'); + function getSetISOWeekYear (input) { + return getSetWeekYearHelper.call(this, + input, this.isoWeek(), this.isoWeekday(), 1, 4); } - function getSetISODayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - // behaves the same as moment#day except - // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) - // as a setter, sunday should belong to the previous week. - return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); + function getISOWeeksInYear () { + return weeksInYear(this.year(), 1, 4); } - var defaultWeekdaysRegex = matchWord; - function weekdaysRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysStrictRegex; - } else { - return this._weekdaysRegex; - } - } else { - return this._weekdaysStrictRegex && isStrict ? - this._weekdaysStrictRegex : this._weekdaysRegex; - } + function getWeeksInYear () { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } - var defaultWeekdaysShortRegex = matchWord; - function weekdaysShortRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysShortStrictRegex; - } else { - return this._weekdaysShortRegex; - } + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; } else { - return this._weekdaysShortStrictRegex && isStrict ? - this._weekdaysShortStrictRegex : this._weekdaysShortRegex; - } - } - - var defaultWeekdaysMinRegex = matchWord; - function weekdaysMinRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysMinStrictRegex; - } else { - return this._weekdaysMinRegex; + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; } - } else { - return this._weekdaysMinStrictRegex && isStrict ? - this._weekdaysMinStrictRegex : this._weekdaysMinRegex; + return setWeekAll.call(this, input, week, weekday, dow, doy); } } + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); - function computeWeekdaysParse () { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], - i, mom, minp, shortp, longp; - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - mom = create_utc__createUTC([2000, 1]).day(i); - minp = this.weekdaysMin(mom, ''); - shortp = this.weekdaysShort(mom, ''); - longp = this.weekdays(mom, ''); - minPieces.push(minp); - shortPieces.push(shortp); - longPieces.push(longp); - mixedPieces.push(minp); - mixedPieces.push(shortp); - mixedPieces.push(longp); - } - // Sorting makes sure if one weekday (or abbr) is a prefix of another it - // will match the longer piece. - minPieces.sort(cmpLenRev); - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - for (i = 0; i < 7; i++) { - shortPieces[i] = regexEscape(shortPieces[i]); - longPieces[i] = regexEscape(longPieces[i]); - mixedPieces[i] = regexEscape(mixedPieces[i]); - } - - this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._weekdaysShortRegex = this._weekdaysRegex; - this._weekdaysMinRegex = this._weekdaysRegex; - - this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); - this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); - this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; } // FORMATTING - addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES - addUnitAlias('dayOfYear', 'DDD'); + addUnitAlias('quarter', 'Q'); + + // PRIORITY + + addUnitPriority('quarter', 7); // PARSING - addRegexToken('DDD', match1to3); - addRegexToken('DDDD', match3); - addParseToken(['DDD', 'DDDD'], function (input, array, config) { - config._dayOfYear = toInt(input); + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; }); - // HELPERS - // MOMENTS - function getSetDayOfYear (input) { - var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; - return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + function getSetQuarter (input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); } // FORMATTING - function hFormat() { - return this.hours() % 12 || 12; - } + addFormatToken('D', ['DD', 2], 'Do', 'date'); - function kFormat() { - return this.hours() || 24; - } + // ALIASES - addFormatToken('H', ['HH', 2], 0, 'hour'); - addFormatToken('h', ['hh', 2], 0, hFormat); - addFormatToken('k', ['kk', 2], 0, kFormat); + addUnitAlias('date', 'D'); - addFormatToken('hmm', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); - }); + // PRIOROITY + addUnitPriority('date', 9); - addFormatToken('hmmss', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + - zeroFill(this.seconds(), 2); - }); + // PARSING - addFormatToken('Hmm', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2); + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; }); - addFormatToken('Hmmss', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2) + - zeroFill(this.seconds(), 2); + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0], 10); }); - function meridiem (token, lowercase) { - addFormatToken(token, 0, 0, function () { - return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); - }); - } + // MOMENTS - meridiem('a', true); - meridiem('A', false); + var getSetDayOfMonth = makeGetSet('Date', true); - // ALIASES + // FORMATTING - addUnitAlias('hour', 'h'); + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); - // PARSING + // ALIASES - function matchMeridiem (isStrict, locale) { - return locale._meridiemParse; - } + addUnitAlias('dayOfYear', 'DDD'); - addRegexToken('a', matchMeridiem); - addRegexToken('A', matchMeridiem); - addRegexToken('H', match1to2); - addRegexToken('h', match1to2); - addRegexToken('HH', match1to2, match2); - addRegexToken('hh', match1to2, match2); + // PRIORITY + addUnitPriority('dayOfYear', 4); - addRegexToken('hmm', match3to4); - addRegexToken('hmmss', match5to6); - addRegexToken('Hmm', match3to4); - addRegexToken('Hmmss', match5to6); + // PARSING - addParseToken(['H', 'HH'], HOUR); - addParseToken(['a', 'A'], function (input, array, config) { - config._isPm = config._locale.isPM(input); - config._meridiem = input; - }); - addParseToken(['h', 'hh'], function (input, array, config) { - array[HOUR] = toInt(input); - getParsingFlags(config).bigHour = true; - }); - addParseToken('hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - getParsingFlags(config).bigHour = true; - }); - addParseToken('hmmss', function (input, array, config) { - var pos1 = input.length - 4; - var pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - getParsingFlags(config).bigHour = true; - }); - addParseToken('Hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - }); - addParseToken('Hmmss', function (input, array, config) { - var pos1 = input.length - 4; - var pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); }); - // LOCALES - - function localeIsPM (input) { - // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays - // Using charAt should be more compatible. - return ((input + '').toLowerCase().charAt(0) === 'p'); - } - - var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; - function localeMeridiem (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'pm' : 'PM'; - } else { - return isLower ? 'am' : 'AM'; - } - } - + // HELPERS // MOMENTS - // Setting the hour should keep the time, because the user explicitly - // specified which hour he wants. So trying to maintain the same hour (in - // a new timezone) makes sense. Adding/subtracting hours does not follow - // this rule. - var getSetHour = makeGetSet('Hours', true); + function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + } // FORMATTING @@ -4719,6 +5006,10 @@ return /******/ (function(modules) { // webpackBootstrap addUnitAlias('minute', 'm'); + // PRIORITY + + addUnitPriority('minute', 14); + // PARSING addRegexToken('m', match1to2); @@ -4737,6 +5028,10 @@ return /******/ (function(modules) { // webpackBootstrap addUnitAlias('second', 's'); + // PRIORITY + + addUnitPriority('second', 15); + // PARSING addRegexToken('s', match1to2); @@ -4782,6 +5077,10 @@ return /******/ (function(modules) { // webpackBootstrap addUnitAlias('millisecond', 'ms'); + // PRIORITY + + addUnitPriority('millisecond', 16); + // PARSING addRegexToken('S', match1to3, match1); @@ -4831,7 +5130,7 @@ return /******/ (function(modules) { // webpackBootstrap momentPrototype__proto.fromNow = fromNow; momentPrototype__proto.to = to; momentPrototype__proto.toNow = toNow; - momentPrototype__proto.get = getSet; + momentPrototype__proto.get = stringGet; momentPrototype__proto.invalidAt = invalidAt; momentPrototype__proto.isAfter = isAfter; momentPrototype__proto.isBefore = isBefore; @@ -4846,7 +5145,7 @@ return /******/ (function(modules) { // webpackBootstrap momentPrototype__proto.max = prototypeMax; momentPrototype__proto.min = prototypeMin; momentPrototype__proto.parsingFlags = parsingFlags; - momentPrototype__proto.set = getSet; + momentPrototype__proto.set = stringSet; momentPrototype__proto.startOf = startOf; momentPrototype__proto.subtract = add_subtract__subtract; momentPrototype__proto.toArray = toArray; @@ -4906,7 +5205,6 @@ return /******/ (function(modules) { // webpackBootstrap momentPrototype__proto.parseZone = setOffsetToParsedOffset; momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; momentPrototype__proto.isDST = isDaylightSavingTime; - momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted; momentPrototype__proto.isLocal = isLocal; momentPrototype__proto.isUtcOffset = isUtcOffset; momentPrototype__proto.isUtc = isUtc; @@ -4920,7 +5218,8 @@ return /******/ (function(modules) { // webpackBootstrap momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); - momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone); + momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); + momentPrototype__proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); var momentPrototype = momentPrototype__proto; @@ -4932,143 +5231,46 @@ return /******/ (function(modules) { // webpackBootstrap return local__createLocal.apply(null, arguments).parseZone(); } - var defaultCalendar = { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }; - - function locale_calendar__calendar (key, mom, now) { - var output = this._calendar[key]; - return isFunction(output) ? output.call(mom, now) : output; - } - - var defaultLongDateFormat = { - LTS : 'h:mm:ss A', - LT : 'h:mm A', - L : 'MM/DD/YYYY', - LL : 'MMMM D, YYYY', - LLL : 'MMMM D, YYYY h:mm A', - LLLL : 'dddd, MMMM D, YYYY h:mm A' - }; - - function longDateFormat (key) { - var format = this._longDateFormat[key], - formatUpper = this._longDateFormat[key.toUpperCase()]; - - if (format || !formatUpper) { - return format; - } - - this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { - return val.slice(1); - }); - - return this._longDateFormat[key]; - } - - var defaultInvalidDate = 'Invalid date'; - - function invalidDate () { - return this._invalidDate; - } - - var defaultOrdinal = '%d'; - var defaultOrdinalParse = /\d{1,2}/; - - function ordinal (number) { - return this._ordinal.replace('%d', number); - } - function preParsePostFormat (string) { return string; } - var defaultRelativeTime = { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }; - - function relative__relativeTime (number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return (isFunction(output)) ? - output(number, withoutSuffix, string, isFuture) : - output.replace(/%d/i, number); - } - - function pastFuture (diff, output) { - var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return isFunction(format) ? format(output) : format.replace(/%s/i, output); - } - var prototype__proto = Locale.prototype; - prototype__proto._calendar = defaultCalendar; prototype__proto.calendar = locale_calendar__calendar; - prototype__proto._longDateFormat = defaultLongDateFormat; prototype__proto.longDateFormat = longDateFormat; - prototype__proto._invalidDate = defaultInvalidDate; prototype__proto.invalidDate = invalidDate; - prototype__proto._ordinal = defaultOrdinal; prototype__proto.ordinal = ordinal; - prototype__proto._ordinalParse = defaultOrdinalParse; prototype__proto.preparse = preParsePostFormat; prototype__proto.postformat = preParsePostFormat; - prototype__proto._relativeTime = defaultRelativeTime; prototype__proto.relativeTime = relative__relativeTime; prototype__proto.pastFuture = pastFuture; prototype__proto.set = locale_set__set; // Month prototype__proto.months = localeMonths; - prototype__proto._months = defaultLocaleMonths; prototype__proto.monthsShort = localeMonthsShort; - prototype__proto._monthsShort = defaultLocaleMonthsShort; prototype__proto.monthsParse = localeMonthsParse; - prototype__proto._monthsRegex = defaultMonthsRegex; prototype__proto.monthsRegex = monthsRegex; - prototype__proto._monthsShortRegex = defaultMonthsShortRegex; prototype__proto.monthsShortRegex = monthsShortRegex; // Week prototype__proto.week = localeWeek; - prototype__proto._week = defaultLocaleWeek; prototype__proto.firstDayOfYear = localeFirstDayOfYear; prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; // Day of Week prototype__proto.weekdays = localeWeekdays; - prototype__proto._weekdays = defaultLocaleWeekdays; prototype__proto.weekdaysMin = localeWeekdaysMin; - prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin; prototype__proto.weekdaysShort = localeWeekdaysShort; - prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort; prototype__proto.weekdaysParse = localeWeekdaysParse; - prototype__proto._weekdaysRegex = defaultWeekdaysRegex; prototype__proto.weekdaysRegex = weekdaysRegex; - prototype__proto._weekdaysShortRegex = defaultWeekdaysShortRegex; prototype__proto.weekdaysShortRegex = weekdaysShortRegex; - prototype__proto._weekdaysMinRegex = defaultWeekdaysMinRegex; prototype__proto.weekdaysMinRegex = weekdaysMinRegex; // Hours prototype__proto.isPM = localeIsPM; - prototype__proto._meridiemParse = defaultLocaleMeridiemParse; prototype__proto.meridiem = localeMeridiem; function lists__get (format, index, field, setter) { @@ -5397,6 +5599,18 @@ return /******/ (function(modules) { // webpackBootstrap return substituteTimeAgo.apply(null, a); } + // This function allows you to set the rounding function for relative time strings + function duration_humanize__getSetRelativeTimeRounding (roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof(roundingFunction) === 'function') { + round = roundingFunction; + return true; + } + return false; + } + // This function allows you to set a threshold for relative time strings function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { @@ -5529,7 +5743,7 @@ return /******/ (function(modules) { // webpackBootstrap // Side effect imports - utils_hooks__hooks.version = '2.13.0'; + utils_hooks__hooks.version = '2.15.2'; setHookCallback(local__createLocal); @@ -5556,7 +5770,9 @@ return /******/ (function(modules) { // webpackBootstrap utils_hooks__hooks.locales = locale_locales__listLocales; utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; utils_hooks__hooks.normalizeUnits = normalizeUnits; + utils_hooks__hooks.relativeTimeRounding = duration_humanize__getSetRelativeTimeRounding; utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; + utils_hooks__hooks.calendarFormat = getCalendarFormat; utils_hooks__hooks.prototype = momentPrototype; var _moment = utils_hooks__hooks; @@ -5839,8 +6055,8 @@ return /******/ (function(modules) { // webpackBootstrap // bundled external libraries exports.moment = __webpack_require__(2); - exports.Hammer = __webpack_require__(20); - exports.keycharm = __webpack_require__(23); + exports.Hammer = __webpack_require__(22); + exports.keycharm = __webpack_require__(25); /***/ }, /* 8 */ @@ -6006,6 +6222,7 @@ return /******/ (function(modules) { // webpackBootstrap point.setAttributeNS(null, "class", groupTemplate.className + " vis-point"); //handle label + if (labelObj) { var label = exports.getSVGElement('text', JSONcontainer, svgContainer); if (labelObj.xOffset) { @@ -6060,7 +6277,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var util = __webpack_require__(1); var Queue = __webpack_require__(10); @@ -6720,26 +6937,29 @@ return /******/ (function(modules) { // webpackBootstrap */ DataSet.prototype.remove = function (id, senderId) { var removedIds = [], + removedItems = [], + ids = [], i, len, - removedId; + itemId, + item; + + // force everything to be an array for simplicity + ids = Array.isArray(id) ? id : [id]; - if (Array.isArray(id)) { - for (i = 0, len = id.length; i < len; i++) { - removedId = this._remove(id[i]); - if (removedId != null) { - removedIds.push(removedId); + for (i = 0, len = ids.length; i < len; i++) { + item = this._remove(ids[i]); + if (item) { + itemId = item[this._fieldId]; + if (itemId) { + removedIds.push(itemId); + removedItems.push(item); } } - } else { - removedId = this._remove(id); - if (removedId != null) { - removedIds.push(removedId); - } } if (removedIds.length) { - this._trigger('remove', { items: removedIds }, senderId); + this._trigger('remove', { items: removedIds, oldData: removedItems }, senderId); } return removedIds; @@ -6752,19 +6972,21 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ DataSet.prototype._remove = function (id) { + var item, ident; + + // confirm the id to use based on the args type if (util.isNumber(id) || util.isString(id)) { - if (this._data[id]) { - delete this._data[id]; - this.length--; - return id; - } + ident = id; } else if (id instanceof Object) { - var itemId = id[this._fieldId]; - if (itemId !== undefined && this._data[itemId]) { - delete this._data[itemId]; - this.length--; - return itemId; - } + ident = id[this._fieldId]; // look for the identifier field using _fieldId + } + + // do the remove if the item is found + if (ident !== undefined && this._data[ident]) { + item = this._data[ident]; + delete this._data[ident]; + this.length--; + return item; } return null; }; @@ -6775,12 +6997,18 @@ return /******/ (function(modules) { // webpackBootstrap * @return {Array} removedIds The ids of all removed items */ DataSet.prototype.clear = function (senderId) { + var i, len; var ids = Object.keys(this._data); + var items = []; + + for (i = 0, len = ids.length; i < len; i++) { + items.push(this._data[ids[i]]); + } this._data = {}; this.length = 0; - this._trigger('remove', { items: ids }, senderId); + this._trigger('remove', { items: ids, oldData: items }, senderId); return ids; }; @@ -7231,7 +7459,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {DataSet | DataView} data */ DataView.prototype.setData = function (data) { - var ids, id, i, len; + var ids, id, i, len, items; if (this._data) { // unsubscribe from current dataset @@ -7240,10 +7468,16 @@ return /******/ (function(modules) { // webpackBootstrap } // trigger a remove of all items in memory - ids = Object.keys(this._ids); + ids = this._data.getIds({ filter: this._options && this._options.filter }); + items = []; + + for (i = 0, len = ids.length; i < len; i++) { + items.push(this._data._data[ids[i]]); + } + this._ids = {}; this.length = 0; - this._trigger('remove', { items: ids }); + this._trigger('remove', { items: ids, oldData: items }); } this._data = data; @@ -7274,18 +7508,19 @@ return /******/ (function(modules) { // webpackBootstrap */ DataView.prototype.refresh = function () { var id, i, len; - var ids = this._data.getIds({ filter: this._options && this._options.filter }); - var oldIds = Object.keys(this._ids); - var newIds = {}; - var added = []; - var removed = []; + var ids = this._data.getIds({ filter: this._options && this._options.filter }), + oldIds = Object.keys(this._ids), + newIds = {}, + addedIds = [], + removedIds = [], + removedItems = []; // check for additions for (i = 0, len = ids.length; i < len; i++) { id = ids[i]; newIds[id] = true; if (!this._ids[id]) { - added.push(id); + addedIds.push(id); this._ids[id] = true; } } @@ -7294,19 +7529,20 @@ return /******/ (function(modules) { // webpackBootstrap for (i = 0, len = oldIds.length; i < len; i++) { id = oldIds[i]; if (!newIds[id]) { - removed.push(id); + removedIds.push(id); + removedItems.push(this._data[id]); delete this._ids[id]; } } - this.length += added.length - removed.length; + this.length += addedIds.length - removedIds.length; // trigger events - if (added.length) { - this._trigger('add', { items: added }); + if (addedIds.length) { + this._trigger('add', { items: addedIds }); } - if (removed.length) { - this._trigger('remove', { items: removed }); + if (removedIds.length) { + this._trigger('remove', { items: removedIds, oldData: removedItems }); } }; @@ -7485,13 +7721,14 @@ return /******/ (function(modules) { // webpackBootstrap DataView.prototype._onEvent = function (event, params, senderId) { var i, len, id, item; var ids = params && params.items; - var data = this._data; - var updatedData = []; - var added = []; - var updated = []; - var removed = []; + var addedIds = [], + updatedIds = [], + removedIds = [], + oldItems = [], + updatedItems = [], + removedItems = []; - if (ids && data) { + if (ids && this._data) { switch (event) { case 'add': // filter the ids of the added items @@ -7500,7 +7737,7 @@ return /******/ (function(modules) { // webpackBootstrap item = this.get(id); if (item) { this._ids[id] = true; - added.push(id); + addedIds.push(id); } } @@ -7515,16 +7752,18 @@ return /******/ (function(modules) { // webpackBootstrap if (item) { if (this._ids[id]) { - updated.push(id); - updatedData.push(params.data[i]); + updatedIds.push(id); + updatedItems.push(params.data[i]); + oldItems.push(params.oldData[i]); } else { this._ids[id] = true; - added.push(id); + addedIds.push(id); } } else { if (this._ids[id]) { delete this._ids[id]; - removed.push(id); + removedIds.push(id); + removedItems.push(params.oldData[i]); } else { // nothing interesting for me :-( } @@ -7539,23 +7778,24 @@ return /******/ (function(modules) { // webpackBootstrap id = ids[i]; if (this._ids[id]) { delete this._ids[id]; - removed.push(id); + removedIds.push(id); + removedItems.push(params.oldData[i]); } } break; } - this.length += added.length - removed.length; + this.length += addedIds.length - removedIds.length; - if (added.length) { - this._trigger('add', { items: added }, senderId); + if (addedIds.length) { + this._trigger('add', { items: addedIds }, senderId); } - if (updated.length) { - this._trigger('update', { items: updated, data: updatedData }, senderId); + if (updatedIds.length) { + this._trigger('update', { items: updatedIds, oldData: oldItems, data: updatedItems }, senderId); } - if (removed.length) { - this._trigger('remove', { items: removed }, senderId); + if (removedIds.length) { + this._trigger('remove', { items: removedIds, oldData: removedItems }, senderId); } } }; @@ -7577,10 +7817,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; - - var Emitter = __webpack_require__(13); - var DataSet = __webpack_require__(9); + var Emitter = __webpack_require__(13);var DataSet = __webpack_require__(9); var DataView = __webpack_require__(11); var util = __webpack_require__(1); var Point3d = __webpack_require__(14); @@ -7589,6 +7826,100 @@ return /******/ (function(modules) { // webpackBootstrap var Filter = __webpack_require__(17); var Slider = __webpack_require__(18); var StepNumber = __webpack_require__(19); + var Range = __webpack_require__(20); + var Settings = __webpack_require__(21); + + /// enumerate the available styles + Graph3d.STYLE = Settings.STYLE; + + /** + * Following label is used in the settings to describe values which should be + * determined by the code while running, from the current data and graph style. + * + * Using 'undefined' directly achieves the same thing, but this is more + * descriptive by describing the intent. + */ + var autoByDefault = undefined; + + /** + * Default values for option settings. + * + * These are the values used when a Graph3d instance is initialized without + * custom settings. + * + * If a field is not in this list, a default value of 'autoByDefault' is assumed, + * which is just an alias for 'undefined'. + */ + var DEFAULTS = { + width: '400px', + height: '400px', + filterLabel: 'time', + legendLabel: 'value', + xLabel: 'x', + yLabel: 'y', + zLabel: 'z', + xValueLabel: function xValueLabel(v) { + return v; + }, + yValueLabel: function yValueLabel(v) { + return v; + }, + zValueLabel: function zValueLabel(v) { + return v; + }, + showGrid: true, + showPerspective: true, + showShadow: false, + keepAspectRatio: true, + verticalRatio: 0.5, // 0.1 to 1.0, where 1.0 results in a 'cube' + dotSizeRatio: 0.02, // size of the dots as a fraction of the graph width + + showAnimationControls: autoByDefault, + animationInterval: 1000, // milliseconds + animationPreload: false, + animationAutoStart: autoByDefault, + + axisColor: '#4D4D4D', + gridColor: '#D3D3D3', + xCenter: '55%', + yCenter: '50%', + + style: Graph3d.STYLE.DOT, + tooltip: false, + showLegend: autoByDefault, // determined by graph style + backgroundColor: autoByDefault, + + dataColor: { + fill: '#7DC1FF', + stroke: '#3267D2', + strokeWidth: 1 // px + }, + + cameraPosition: { + horizontal: 1.0, + vertical: 0.5, + distance: 1.7 + }, + + xBarWidth: autoByDefault, + yBarWidth: autoByDefault, + valueMin: autoByDefault, + valueMax: autoByDefault, + xMin: autoByDefault, + xMax: autoByDefault, + xStep: autoByDefault, + yMin: autoByDefault, + yMax: autoByDefault, + yStep: autoByDefault, + zMin: autoByDefault, + zMax: autoByDefault, + zStep: autoByDefault + }; + + // ----------------------------------------------------------------------------- + // Class Graph3d + // ----------------------------------------------------------------------------- + /** * @constructor Graph3d @@ -7608,46 +7939,15 @@ return /******/ (function(modules) { // webpackBootstrap // create variables and set default values this.containerElement = container; - this.width = '400px'; - this.height = '400px'; - this.margin = 10; // px - this.defaultXCenter = '55%'; - this.defaultYCenter = '50%'; - - this.xLabel = 'x'; - this.yLabel = 'y'; - this.zLabel = 'z'; - - var passValueFn = function passValueFn(v) { - return v; - }; - this.xValueLabel = passValueFn; - this.yValueLabel = passValueFn; - this.zValueLabel = passValueFn; - - this.filterLabel = 'time'; - this.legendLabel = 'value'; - - this.style = Graph3d.STYLE.DOT; - this.showPerspective = true; - this.showGrid = true; - this.keepAspectRatio = true; - this.showShadow = false; - this.showGrayBottom = false; // TODO: this does not work correctly - this.showTooltip = false; - this.verticalRatio = 0.5; // 0.1 to 1.0, where 1.0 results in a 'cube' - - this.animationInterval = 1000; // milliseconds - this.animationPreload = false; - - this.camera = new Camera(); - this.camera.setArmRotation(1.0, 0.5); - this.camera.setArmLength(1.7); - this.eye = new Point3d(0, 0, -1); // TODO: set eye.z about 3/4 of the width of the window? this.dataTable = null; // The original data table this.dataPoints = null; // The table with point objects + // create a frame and canvas + this.create(); + + Settings.setDefaults(DEFAULTS, this); + // the column indexes this.colX = undefined; this.colY = undefined; @@ -7655,35 +7955,8 @@ return /******/ (function(modules) { // webpackBootstrap this.colValue = undefined; this.colFilter = undefined; - this.xMin = 0; - this.xStep = undefined; // auto by default - this.xMax = 1; - this.yMin = 0; - this.yStep = undefined; // auto by default - this.yMax = 1; - this.zMin = 0; - this.zStep = undefined; // auto by default - this.zMax = 1; - this.valueMin = 0; - this.valueMax = 1; - this.xBarWidth = 1; - this.yBarWidth = 1; // TODO: customize axis range - // colors - this.axisColor = '#4D4D4D'; - this.gridColor = '#D3D3D3'; - this.dataColor = { - fill: '#7DC1FF', - stroke: '#3267D2', - strokeWidth: 1 // px - }; - - this.dotSizeRatio = 0.02; // size of the dots as a fraction of the graph width - - // create a frame and canvas - this.create(); - // apply options (also when undefined) this.setOptions(options); @@ -7700,7 +7973,7 @@ return /******/ (function(modules) { // webpackBootstrap * Calculate the scaling values, dependent on the range in x, y, and z direction */ Graph3d.prototype._setScale = function () { - this.scale = new Point3d(1 / (this.xMax - this.xMin), 1 / (this.yMax - this.yMin), 1 / (this.zMax - this.zMin)); + this.scale = new Point3d(1 / this.xRange.range(), 1 / this.yRange.range(), 1 / this.zRange.range()); // keep aspect ration between x and y scale if desired if (this.keepAspectRatio) { @@ -7718,20 +7991,23 @@ return /******/ (function(modules) { // webpackBootstrap // TODO: can this be automated? verticalRatio? // determine scale for (optional) value - this.scale.value = 1 / (this.valueMax - this.valueMin); + if (this.valueRange !== undefined) { + this.scale.value = 1 / this.valueRange.range(); + } // position the camera arm - var xCenter = (this.xMax + this.xMin) / 2 * this.scale.x; - var yCenter = (this.yMax + this.yMin) / 2 * this.scale.y; - var zCenter = (this.zMax + this.zMin) / 2 * this.scale.z; + var xCenter = this.xRange.center() * this.scale.x; + var yCenter = this.yRange.center() * this.scale.y; + var zCenter = this.zRange.center() * this.scale.z; this.camera.setArmLocation(xCenter, yCenter, zCenter); }; /** * Convert a 3D location to a 2D location on screen - * http://en.wikipedia.org/wiki/3D_projection - * @param {Point3d} point3d A 3D point with parameters x, y, z - * @return {Point2d} point2d A 2D point with parameters x, y + * Source: ttp://en.wikipedia.org/wiki/3D_projection + * + * @param {Point3d} point3d A 3D point with parameters x, y, z + * @returns {Point2d} point2d A 2D point with parameters x, y */ Graph3d.prototype._convert3Dto2D = function (point3d) { var translation = this._convertPointToTranslation(point3d); @@ -7740,28 +8016,31 @@ return /******/ (function(modules) { // webpackBootstrap /** * Convert a 3D location its translation seen from the camera - * http://en.wikipedia.org/wiki/3D_projection - * @param {Point3d} point3d A 3D point with parameters x, y, z - * @return {Point3d} translation A 3D point with parameters x, y, z This is - * the translation of the point, seen from the - * camera + * Source: http://en.wikipedia.org/wiki/3D_projection + * + * @param {Point3d} point3d A 3D point with parameters x, y, z + * @returns {Point3d} translation A 3D point with parameters x, y, z This is + * the translation of the point, seen from the + * camera. */ Graph3d.prototype._convertPointToTranslation = function (point3d) { - var ax = point3d.x * this.scale.x, + var cameraLocation = this.camera.getCameraLocation(), + cameraRotation = this.camera.getCameraRotation(), + ax = point3d.x * this.scale.x, ay = point3d.y * this.scale.y, az = point3d.z * this.scale.z, - cx = this.camera.getCameraLocation().x, - cy = this.camera.getCameraLocation().y, - cz = this.camera.getCameraLocation().z, + cx = cameraLocation.x, + cy = cameraLocation.y, + cz = cameraLocation.z, // calculate angles - sinTx = Math.sin(this.camera.getCameraRotation().x), - cosTx = Math.cos(this.camera.getCameraRotation().x), - sinTy = Math.sin(this.camera.getCameraRotation().y), - cosTy = Math.cos(this.camera.getCameraRotation().y), - sinTz = Math.sin(this.camera.getCameraRotation().z), - cosTz = Math.cos(this.camera.getCameraRotation().z), + sinTx = Math.sin(cameraRotation.x), + cosTx = Math.cos(cameraRotation.x), + sinTy = Math.sin(cameraRotation.y), + cosTy = Math.cos(cameraRotation.y), + sinTz = Math.sin(cameraRotation.z), + cosTz = Math.cos(cameraRotation.z), // calculate translation @@ -7774,10 +8053,11 @@ return /******/ (function(modules) { // webpackBootstrap /** * Convert a translation point to a point on the screen - * @param {Point3d} translation A 3D point with parameters x, y, z This is - * the translation of the point, seen from the - * camera - * @return {Point2d} point2d A 2D point with parameters x, y + * + * @param {Point3d} translation A 3D point with parameters x, y, z This is + * the translation of the point, seen from the + * camera. + * @returns {Point2d} point2d A 2D point with parameters x, y */ Graph3d.prototype._convertTranslationToScreen = function (translation) { var ex = this.eye.x, @@ -7800,114 +8080,36 @@ return /******/ (function(modules) { // webpackBootstrap // shift and scale the point to the center of the screen // use the width of the graph to scale both horizontally and vertically. - return new Point2d(this.xcenter + bx * this.frame.canvas.clientWidth, this.ycenter - by * this.frame.canvas.clientWidth); + return new Point2d(this.currentXCenter + bx * this.frame.canvas.clientWidth, this.currentYCenter - by * this.frame.canvas.clientWidth); }; /** - * Set the background styling for the graph - * @param {string | {fill: string, stroke: string, strokeWidth: string}} backgroundColor + * Calculate the translations and screen positions of all points */ - Graph3d.prototype._setBackgroundColor = function (backgroundColor) { - var fill = 'white'; - var stroke = 'gray'; - var strokeWidth = 1; - - if (typeof backgroundColor === 'string') { - fill = backgroundColor; - stroke = 'none'; - strokeWidth = 0; - } else if ((typeof backgroundColor === 'undefined' ? 'undefined' : _typeof(backgroundColor)) === 'object') { - if (backgroundColor.fill !== undefined) fill = backgroundColor.fill; - if (backgroundColor.stroke !== undefined) stroke = backgroundColor.stroke; - if (backgroundColor.strokeWidth !== undefined) strokeWidth = backgroundColor.strokeWidth; - } else if (backgroundColor === undefined) { - // use use defaults - } else { - throw 'Unsupported type of backgroundColor'; - } - - this.frame.style.backgroundColor = fill; - this.frame.style.borderColor = stroke; - this.frame.style.borderWidth = strokeWidth + 'px'; - this.frame.style.borderStyle = 'solid'; - }; - - /// enumerate the available styles - Graph3d.STYLE = { - BAR: 0, - BARCOLOR: 1, - BARSIZE: 2, - DOT: 3, - DOTLINE: 4, - DOTCOLOR: 5, - DOTSIZE: 6, - GRID: 7, - LINE: 8, - SURFACE: 9 - }; - - /** - * Retrieve the style index from given styleName - * @param {string} styleName Style name such as 'dot', 'grid', 'dot-line' - * @return {Number} styleNumber Enumeration value representing the style, or -1 - * when not found - */ - Graph3d.prototype._getStyleNumber = function (styleName) { - switch (styleName) { - case 'dot': - return Graph3d.STYLE.DOT; - case 'dot-line': - return Graph3d.STYLE.DOTLINE; - case 'dot-color': - return Graph3d.STYLE.DOTCOLOR; - case 'dot-size': - return Graph3d.STYLE.DOTSIZE; - case 'line': - return Graph3d.STYLE.LINE; - case 'grid': - return Graph3d.STYLE.GRID; - case 'surface': - return Graph3d.STYLE.SURFACE; - case 'bar': - return Graph3d.STYLE.BAR; - case 'bar-color': - return Graph3d.STYLE.BARCOLOR; - case 'bar-size': - return Graph3d.STYLE.BARSIZE; + Graph3d.prototype._calcTranslations = function (points, sort) { + if (sort === undefined) { + sort = true; } - return -1; - }; - - /** - * Determine the indexes of the data columns, based on the given style and data - * @param {DataSet} data - * @param {Number} style - */ - Graph3d.prototype._determineColumnIndexes = function (data, style) { - if (this.style === Graph3d.STYLE.DOT || this.style === Graph3d.STYLE.DOTLINE || this.style === Graph3d.STYLE.LINE || this.style === Graph3d.STYLE.GRID || this.style === Graph3d.STYLE.SURFACE || this.style === Graph3d.STYLE.BAR) { - // 3 columns expected, and optionally a 4th with filter values - this.colX = 0; - this.colY = 1; - this.colZ = 2; - this.colValue = undefined; + for (var i = 0; i < points.length; i++) { + var point = points[i]; + point.trans = this._convertPointToTranslation(point.point); + point.screen = this._convertTranslationToScreen(point.trans); - if (data.getNumberOfColumns() > 3) { - this.colFilter = 3; - } - } else if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE || this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE) { - // 4 columns expected, and optionally a 5th with filter values - this.colX = 0; - this.colY = 1; - this.colZ = 2; - this.colValue = 3; + // calculate the translation of the point at the bottom (needed for sorting) + var transBottom = this._convertPointToTranslation(point.bottom); + point.dist = this.showPerspective ? transBottom.length() : -transBottom.z; + } - if (data.getNumberOfColumns() > 4) { - this.colFilter = 4; - } - } else { - throw 'Unknown style "' + this.style + '"'; + if (!sort) { + return; } + + // sort the points on depth of their (x,y) position (not on z) + var sortDepth = function sortDepth(a, b) { + return b.dist - a.dist; + }; + points.sort(sortDepth); }; Graph3d.prototype.getNumberOfRows = function (data) { @@ -7934,24 +8136,78 @@ return /******/ (function(modules) { // webpackBootstrap return distinctValues; }; + /** + * Get the absolute min/max values for the passed data column. + * + * @returns {Range} A Range instance with min/max members properly set. + */ Graph3d.prototype.getColumnRange = function (data, column) { - var minMax = { min: data[0][column], max: data[0][column] }; + var range = new Range(); + + // Adjust the range so that it covers all values in the passed data elements. for (var i = 0; i < data.length; i++) { - if (minMax.min > data[i][column]) { - minMax.min = data[i][column]; - } - if (minMax.max < data[i][column]) { - minMax.max = data[i][column]; - } + var item = data[i][column]; + range.adjust(item); + } + + return range; + }; + + /** + * Check if the state is consistent for the use of the value field. + * + * Throws if a problem is detected. + */ + Graph3d.prototype._checkValueField = function (data) { + + var hasValueField = this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE || this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE; + + if (!hasValueField) { + return; // No need to check further + } + + // Following field must be present for the current graph style + if (this.colValue === undefined) { + throw new Error('Expected data to have ' + ' field \'style\' ' + ' for graph style \'' + this.style + '\''); + } + + // The data must also contain this field. + // Note that only first data element is checked. + if (data[0][this.colValue] === undefined) { + throw new Error('Expected data to have ' + ' field \'' + this.colValue + '\' ' + ' for graph style \'' + this.style + '\''); } - return minMax; + }; + + /** + * Set default values for range + * + * The default values override the range values, if defined. + * + * Because it's possible that only defaultMin or defaultMax is set, it's better + * to pass in a range already set with the min/max set from the data. Otherwise, + * it's quite hard to process the min/max properly. + */ + Graph3d.prototype._setRangeDefaults = function (range, defaultMin, defaultMax) { + if (defaultMin !== undefined) { + range.min = defaultMin; + } + + if (defaultMax !== undefined) { + range.max = defaultMax; + } + + // This is the original way that the default min/max values were adjusted. + // TODO: Perhaps it's better if an error is thrown if the values do not agree. + // But this will change the behaviour. + if (range.max <= range.min) range.max = range.min + 1; }; /** * Initialize the data from the data table. Calculate minimum and maximum values * and column index values - * @param {Array | DataSet | DataView} rawData The data containing the items for the Graph. - * @param {Number} style Style Number + * @param {Array | DataSet | DataView} rawData The data containing the items for + * the Graph. + * @param {Number} style Style Number */ Graph3d.prototype._dataInitialize = function (rawData, style) { var me = this; @@ -7985,28 +8241,10 @@ return /******/ (function(modules) { // webpackBootstrap }; this.dataSet.on('*', this._onChange); - // _determineColumnIndexes - // getNumberOfRows (points) - // getNumberOfColumns (x,y,z,v,t,t1,t2...) - // getDistinctValues (unique values?) - // getColumnRange - // determine the location of x,y,z,value,filter columns this.colX = 'x'; this.colY = 'y'; this.colZ = 'z'; - this.colValue = 'style'; - this.colFilter = 'filter'; - - // check if a filter column is provided - if (data[0].hasOwnProperty('filter')) { - if (this.dataFilter === undefined) { - this.dataFilter = new Filter(rawData, this.colFilter, this); - this.dataFilter.setOnLoadCallback(function () { - me.redraw(); - }); - } - } var withBars = this.style == Graph3d.STYLE.BAR || this.style == Graph3d.STYLE.BARCOLOR || this.style == Graph3d.STYLE.BARSIZE; @@ -8028,37 +8266,48 @@ return /******/ (function(modules) { // webpackBootstrap } // calculate minimums and maximums + var NUMSTEPS = 5; + var xRange = this.getColumnRange(data, this.colX); if (withBars) { - xRange.min -= this.xBarWidth / 2; - xRange.max += this.xBarWidth / 2; + xRange.expand(this.xBarWidth / 2); } - this.xMin = this.defaultXMin !== undefined ? this.defaultXMin : xRange.min; - this.xMax = this.defaultXMax !== undefined ? this.defaultXMax : xRange.max; - if (this.xMax <= this.xMin) this.xMax = this.xMin + 1; - this.xStep = this.defaultXStep !== undefined ? this.defaultXStep : (this.xMax - this.xMin) / 5; + this._setRangeDefaults(xRange, this.defaultXMin, this.defaultXMax); + this.xRange = xRange; + this.xStep = this.defaultXStep !== undefined ? this.defaultXStep : xRange.range() / NUMSTEPS; var yRange = this.getColumnRange(data, this.colY); if (withBars) { - yRange.min -= this.yBarWidth / 2; - yRange.max += this.yBarWidth / 2; + yRange.expand(this.yBarWidth / 2); } - this.yMin = this.defaultYMin !== undefined ? this.defaultYMin : yRange.min; - this.yMax = this.defaultYMax !== undefined ? this.defaultYMax : yRange.max; - if (this.yMax <= this.yMin) this.yMax = this.yMin + 1; - this.yStep = this.defaultYStep !== undefined ? this.defaultYStep : (this.yMax - this.yMin) / 5; + this._setRangeDefaults(yRange, this.defaultYMin, this.defaultYMax); + this.yRange = yRange; + this.yStep = this.defaultYStep !== undefined ? this.defaultYStep : yRange.range() / NUMSTEPS; var zRange = this.getColumnRange(data, this.colZ); - this.zMin = this.defaultZMin !== undefined ? this.defaultZMin : zRange.min; - this.zMax = this.defaultZMax !== undefined ? this.defaultZMax : zRange.max; - if (this.zMax <= this.zMin) this.zMax = this.zMin + 1; - this.zStep = this.defaultZStep !== undefined ? this.defaultZStep : (this.zMax - this.zMin) / 5; + this._setRangeDefaults(zRange, this.defaultZMin, this.defaultZMax); + this.zRange = zRange; + this.zStep = this.defaultZStep !== undefined ? this.defaultZStep : zRange.range() / NUMSTEPS; - if (this.colValue !== undefined) { + if (data[0].hasOwnProperty('style')) { + this.colValue = 'style'; var valueRange = this.getColumnRange(data, this.colValue); - this.valueMin = this.defaultValueMin !== undefined ? this.defaultValueMin : valueRange.min; - this.valueMax = this.defaultValueMax !== undefined ? this.defaultValueMax : valueRange.max; - if (this.valueMax <= this.valueMin) this.valueMax = this.valueMin + 1; + this._setRangeDefaults(valueRange, this.defaultValueMin, this.defaultValueMax); + this.valueRange = valueRange; + } + + // check if a filter column is provided + // Needs to be started after zRange is defined + if (data[0].hasOwnProperty('filter')) { + // Only set this field if it's actually present + this.colFilter = 'filter'; + + if (this.dataFilter === undefined) { + this.dataFilter = new Filter(rawData, this.colFilter, this); + this.dataFilter.setOnLoadCallback(function () { + me.redraw(); + }); + } } // set the scale dependent on the ranges. @@ -8067,11 +8316,14 @@ return /******/ (function(modules) { // webpackBootstrap /** * Filter the data based on the current filter - * @param {Array} data - * @return {Array} dataPoints Array with point objects which can be drawn on screen + * + * @param {Array} data + * @returns {Array} dataPoints Array with point objects which can be drawn on + * screen */ Graph3d.prototype._getDataPoints = function (data) { - // TODO: store the created matrix dataPoints in the filters instead of reloading each time + // TODO: store the created matrix dataPoints in the filters instead of + // reloading each time. var x, y, i, z, obj, point; var dataPoints = []; @@ -8108,7 +8360,8 @@ return /******/ (function(modules) { // webpackBootstrap y = data[i][this.colY] || 0; z = data[i][this.colZ] || 0; - var xIndex = dataX.indexOf(x); // TODO: implement Array().indexOf() for Internet Explorer + // TODO: implement Array().indexOf() for Internet Explorer + var xIndex = dataX.indexOf(x); var yIndex = dataY.indexOf(y); if (dataMatrix[xIndex] === undefined) { @@ -8119,12 +8372,13 @@ return /******/ (function(modules) { // webpackBootstrap point3d.x = x; point3d.y = y; point3d.z = z; + point3d.data = data[i]; obj = {}; obj.point = point3d; obj.trans = undefined; obj.screen = undefined; - obj.bottom = new Point3d(x, y, this.zMin); + obj.bottom = new Point3d(x, y, this.zRange.min); dataMatrix[xIndex][yIndex] = obj; @@ -8143,12 +8397,15 @@ return /******/ (function(modules) { // webpackBootstrap } } else { // 'dot', 'dot-line', etc. + this._checkValueField(data); + // copy all values from the google data table to a list with Point3d objects for (i = 0; i < data.length; i++) { point = new Point3d(); point.x = data[i][this.colX] || 0; point.y = data[i][this.colY] || 0; point.z = data[i][this.colZ] || 0; + point.data = data[i]; if (this.colValue !== undefined) { point.value = data[i][this.colValue] || 0; @@ -8156,10 +8413,17 @@ return /******/ (function(modules) { // webpackBootstrap obj = {}; obj.point = point; - obj.bottom = new Point3d(point.x, point.y, this.zMin); + obj.bottom = new Point3d(point.x, point.y, this.zRange.min); obj.trans = undefined; obj.screen = undefined; + if (this.style === Graph3d.STYLE.LINE) { + if (i > 0) { + // Add next point for line drawing + dataPoints[i - 1].pointNext = obj; + } + } + dataPoints.push(obj); } } @@ -8169,6 +8433,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Create the main frame for the Graph3d. + * * This function is executed once when a Graph3d object is created. The frame * contains a canvas, and this canvas contains all objects like the axis and * nodes. @@ -8232,10 +8497,11 @@ return /******/ (function(modules) { // webpackBootstrap /** * Set a new size for the graph - * @param {string} width Width in pixels or percentage (for example '800px' - * or '50%') - * @param {string} height Height in pixels or percentage (for example '400px' - * or '30%') + * + * @param {string} width Width in pixels or percentage (for example '800px' + * or '50%') + * @param {string} height Height in pixels or percentage (for example '400px' + * or '30%') */ Graph3d.prototype.setSize = function (width, height) { this.frame.style.width = width; @@ -8262,7 +8528,7 @@ return /******/ (function(modules) { // webpackBootstrap * Start animation */ Graph3d.prototype.animationStart = function () { - if (!this.frame.filter || !this.frame.filter.slider) throw 'No animation available'; + if (!this.frame.filter || !this.frame.filter.slider) throw new Error('No animation available'); this.frame.filter.slider.play(); }; @@ -8277,63 +8543,32 @@ return /******/ (function(modules) { // webpackBootstrap }; /** - * Resize the center position based on the current values in this.defaultXCenter - * and this.defaultYCenter (which are strings with a percentage or a value - * in pixels). The center positions are the variables this.xCenter - * and this.yCenter + * Resize the center position based on the current values in this.xCenter + * and this.yCenter (which are strings with a percentage or a value + * in pixels). The center positions are the variables this.currentXCenter + * and this.currentYCenter */ Graph3d.prototype._resizeCenter = function () { // calculate the horizontal center position - if (this.defaultXCenter.charAt(this.defaultXCenter.length - 1) === '%') { - this.xcenter = parseFloat(this.defaultXCenter) / 100 * this.frame.canvas.clientWidth; + if (this.xCenter.charAt(this.xCenter.length - 1) === '%') { + this.currentXCenter = parseFloat(this.xCenter) / 100 * this.frame.canvas.clientWidth; } else { - this.xcenter = parseFloat(this.defaultXCenter); // supposed to be in px + this.currentXCenter = parseFloat(this.xCenter); // supposed to be in px } // calculate the vertical center position - if (this.defaultYCenter.charAt(this.defaultYCenter.length - 1) === '%') { - this.ycenter = parseFloat(this.defaultYCenter) / 100 * (this.frame.canvas.clientHeight - this.frame.filter.clientHeight); + if (this.yCenter.charAt(this.yCenter.length - 1) === '%') { + this.currentYCenter = parseFloat(this.yCenter) / 100 * (this.frame.canvas.clientHeight - this.frame.filter.clientHeight); } else { - this.ycenter = parseFloat(this.defaultYCenter); // supposed to be in px + this.currentYCenter = parseFloat(this.yCenter); // supposed to be in px } }; - /** - * Set the rotation and distance of the camera - * @param {Object} pos An object with the camera position. The object - * contains three parameters: - * - horizontal {Number} - * The horizontal rotation, between 0 and 2*PI. - * Optional, can be left undefined. - * - vertical {Number} - * The vertical rotation, between 0 and 0.5*PI - * if vertical=0.5*PI, the graph is shown from the - * top. Optional, can be left undefined. - * - distance {Number} - * The (normalized) distance of the camera to the - * center of the graph, a value between 0.71 and 5.0. - * Optional, can be left undefined. - */ - Graph3d.prototype.setCameraPosition = function (pos) { - if (pos === undefined) { - return; - } - - if (pos.horizontal !== undefined && pos.vertical !== undefined) { - this.camera.setArmRotation(pos.horizontal, pos.vertical); - } - - if (pos.distance !== undefined) { - this.camera.setArmLength(pos.distance); - } - - this.redraw(); - }; - /** * Retrieve the current camera rotation - * @return {object} An object with parameters horizontal, vertical, and - * distance + * + * @returns {object} An object with parameters horizontal, vertical, and + * distance */ Graph3d.prototype.getCameraPosition = function () { var pos = this.camera.getArmRotation(); @@ -8362,6 +8597,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Replace the dataset of the Graph3d + * * @param {Array | DataSet | DataView} data */ Graph3d.prototype.setData = function (data) { @@ -8376,6 +8612,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Update the options. Options will be merged with current options + * * @param {Object} options */ Graph3d.prototype.setOptions = function (options) { @@ -8383,88 +8620,9 @@ return /******/ (function(modules) { // webpackBootstrap this.animationStop(); - if (options !== undefined) { - // retrieve parameter values - if (options.width !== undefined) this.width = options.width; - if (options.height !== undefined) this.height = options.height; - - if (options.xCenter !== undefined) this.defaultXCenter = options.xCenter; - if (options.yCenter !== undefined) this.defaultYCenter = options.yCenter; - - if (options.filterLabel !== undefined) this.filterLabel = options.filterLabel; - if (options.legendLabel !== undefined) this.legendLabel = options.legendLabel; - if (options.xLabel !== undefined) this.xLabel = options.xLabel; - if (options.yLabel !== undefined) this.yLabel = options.yLabel; - if (options.zLabel !== undefined) this.zLabel = options.zLabel; - - if (options.xValueLabel !== undefined) this.xValueLabel = options.xValueLabel; - if (options.yValueLabel !== undefined) this.yValueLabel = options.yValueLabel; - if (options.zValueLabel !== undefined) this.zValueLabel = options.zValueLabel; - - if (options.dotSizeRatio !== undefined) this.dotSizeRatio = options.dotSizeRatio; - - if (options.style !== undefined) { - var styleNumber = this._getStyleNumber(options.style); - if (styleNumber !== -1) { - this.style = styleNumber; - } - } - if (options.showGrid !== undefined) this.showGrid = options.showGrid; - if (options.showPerspective !== undefined) this.showPerspective = options.showPerspective; - if (options.showShadow !== undefined) this.showShadow = options.showShadow; - if (options.tooltip !== undefined) this.showTooltip = options.tooltip; - if (options.showAnimationControls !== undefined) this.showAnimationControls = options.showAnimationControls; - if (options.keepAspectRatio !== undefined) this.keepAspectRatio = options.keepAspectRatio; - if (options.verticalRatio !== undefined) this.verticalRatio = options.verticalRatio; - - if (options.animationInterval !== undefined) this.animationInterval = options.animationInterval; - if (options.animationPreload !== undefined) this.animationPreload = options.animationPreload; - if (options.animationAutoStart !== undefined) this.animationAutoStart = options.animationAutoStart; - - if (options.xBarWidth !== undefined) this.defaultXBarWidth = options.xBarWidth; - if (options.yBarWidth !== undefined) this.defaultYBarWidth = options.yBarWidth; - - if (options.xMin !== undefined) this.defaultXMin = options.xMin; - if (options.xStep !== undefined) this.defaultXStep = options.xStep; - if (options.xMax !== undefined) this.defaultXMax = options.xMax; - if (options.yMin !== undefined) this.defaultYMin = options.yMin; - if (options.yStep !== undefined) this.defaultYStep = options.yStep; - if (options.yMax !== undefined) this.defaultYMax = options.yMax; - if (options.zMin !== undefined) this.defaultZMin = options.zMin; - if (options.zStep !== undefined) this.defaultZStep = options.zStep; - if (options.zMax !== undefined) this.defaultZMax = options.zMax; - if (options.valueMin !== undefined) this.defaultValueMin = options.valueMin; - if (options.valueMax !== undefined) this.defaultValueMax = options.valueMax; - if (options.backgroundColor !== undefined) this._setBackgroundColor(options.backgroundColor); - - if (options.cameraPosition !== undefined) cameraPosition = options.cameraPosition; - - if (cameraPosition !== undefined) { - this.camera.setArmRotation(cameraPosition.horizontal, cameraPosition.vertical); - this.camera.setArmLength(cameraPosition.distance); - } - - // colors - if (options.axisColor !== undefined) this.axisColor = options.axisColor; - if (options.gridColor !== undefined) this.gridColor = options.gridColor; - if (options.dataColor) { - if (typeof options.dataColor === 'string') { - this.dataColor.fill = options.dataColor; - this.dataColor.stroke = options.dataColor; - } else { - if (options.dataColor.fill) { - this.dataColor.fill = options.dataColor.fill; - } - if (options.dataColor.stroke) { - this.dataColor.stroke = options.dataColor.stroke; - } - if (options.dataColor.strokeWidth !== undefined) { - this.dataColor.strokeWidth = options.dataColor.strokeWidth; - } - } - } - } + Settings.setOptions(options, this); + this.setPointDrawingMethod(); this.setSize(this.width, this.height); // re-load the data @@ -8478,12 +8636,57 @@ return /******/ (function(modules) { // webpackBootstrap } }; + /** + * Determine which point drawing method to use for the current graph style. + */ + Graph3d.prototype.setPointDrawingMethod = function () { + var method = undefined; + + switch (this.style) { + case Graph3d.STYLE.BAR: + method = Graph3d.prototype._redrawBarGraphPoint; + break; + case Graph3d.STYLE.BARCOLOR: + method = Graph3d.prototype._redrawBarColorGraphPoint; + break; + case Graph3d.STYLE.BARSIZE: + method = Graph3d.prototype._redrawBarSizeGraphPoint; + break; + case Graph3d.STYLE.DOT: + method = Graph3d.prototype._redrawDotGraphPoint; + break; + case Graph3d.STYLE.DOTLINE: + method = Graph3d.prototype._redrawDotLineGraphPoint; + break; + case Graph3d.STYLE.DOTCOLOR: + method = Graph3d.prototype._redrawDotColorGraphPoint; + break; + case Graph3d.STYLE.DOTSIZE: + method = Graph3d.prototype._redrawDotSizeGraphPoint; + break; + case Graph3d.STYLE.SURFACE: + method = Graph3d.prototype._redrawSurfaceGraphPoint; + break; + case Graph3d.STYLE.GRID: + method = Graph3d.prototype._redrawGridGraphPoint; + break; + case Graph3d.STYLE.LINE: + method = Graph3d.prototype._redrawLineGraphPoint; + break; + default: + throw new Error('Can not determine point drawing method ' + 'for graph style \'' + this.style + '\''); + break; + } + + this._pointDrawingMethod = method; + }; + /** * Redraw the Graph. */ Graph3d.prototype.redraw = function () { if (this.dataPoints === undefined) { - throw 'Error: graph data not initialized'; + throw new Error('Graph data not initialized'); } this._resizeCanvas(); @@ -8492,21 +8695,25 @@ return /******/ (function(modules) { // webpackBootstrap this._redrawClear(); this._redrawAxis(); - if (this.style === Graph3d.STYLE.GRID || this.style === Graph3d.STYLE.SURFACE) { - this._redrawDataGrid(); - } else if (this.style === Graph3d.STYLE.LINE) { - this._redrawDataLine(); - } else if (this.style === Graph3d.STYLE.BAR || this.style === Graph3d.STYLE.BARCOLOR || this.style === Graph3d.STYLE.BARSIZE) { - this._redrawDataBar(); - } else { - // style is DOT, DOTLINE, DOTCOLOR, DOTSIZE - this._redrawDataDot(); - } + this._redrawDataGraph(); this._redrawInfo(); this._redrawLegend(); }; + /** + * Get drawing context without exposing canvas + */ + Graph3d.prototype._getContext = function () { + var canvas = this.frame.canvas; + var ctx = canvas.getContext('2d'); + + ctx.lineJoin = 'round'; + ctx.lineCap = 'round'; + + return ctx; + }; + /** * Clear the canvas before redrawing */ @@ -8517,45 +8724,68 @@ return /******/ (function(modules) { // webpackBootstrap ctx.clearRect(0, 0, canvas.width, canvas.height); }; + Graph3d.prototype._dotSize = function () { + return this.frame.clientWidth * this.dotSizeRatio; + }; + /** - * Redraw the legend showing the colors + * Get legend width + */ + Graph3d.prototype._getLegendWidth = function () { + var width; + + if (this.style === Graph3d.STYLE.DOTSIZE) { + var dotSize = this._dotSize(); + width = dotSize / 2 + dotSize * 2; + } else if (this.style === Graph3d.STYLE.BARSIZE) { + width = this.xBarWidth; + } else { + width = 20; + } + return width; + }; + + /** + * Redraw the legend based on size, dot color, or surface height */ Graph3d.prototype._redrawLegend = function () { - var y; - if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE) { + //Return without drawing anything, if no legend is specified + if (this.showLegend !== true) { + return; + } - var dotSize = this.frame.clientWidth * this.dotSizeRatio; + // Do not draw legend when graph style does not support + if (this.style === Graph3d.STYLE.LINE || this.style === Graph3d.STYLE.BARSIZE //TODO add legend support for BARSIZE + ) { + return; + } - var widthMin, widthMax; - if (this.style === Graph3d.STYLE.DOTSIZE) { - widthMin = dotSize / 2; // px - widthMax = dotSize / 2 + dotSize * 2; // Todo: put this in one function - } else { - widthMin = 20; // px - widthMax = 20; // px - } + // Legend types - size and color. Determine if size legend. + var isSizeLegend = this.style === Graph3d.STYLE.BARSIZE || this.style === Graph3d.STYLE.DOTSIZE; - var height = Math.max(this.frame.clientHeight * 0.25, 100); - var top = this.margin; - var right = this.frame.clientWidth - this.margin; - var left = right - widthMax; - var bottom = top + height; - } + // Legend is either tracking z values or style values. This flag if false means use z values. + var isValueLegend = this.style === Graph3d.STYLE.DOTSIZE || this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.BARCOLOR; - var canvas = this.frame.canvas; - var ctx = canvas.getContext('2d'); + var height = Math.max(this.frame.clientHeight * 0.25, 100); + var top = this.margin; + var width = this._getLegendWidth(); // px - overwritten by size legend + var right = this.frame.clientWidth - this.margin; + var left = right - width; + var bottom = top + height; + + var ctx = this._getContext(); ctx.lineWidth = 1; ctx.font = '14px arial'; // TODO: put in options - if (this.style === Graph3d.STYLE.DOTCOLOR) { + if (isSizeLegend === false) { // draw the color bar var ymin = 0; var ymax = height; // Todo: make height customizable + var y; + for (y = ymin; y < ymax; y++) { var f = (y - ymin) / (ymax - ymin); - - //var width = (dotSize / 2 + (1-f) * dotSize * 2); // Todo: put this in one function var hue = f * 240; var color = this._hsv2rgb(hue, 1, 1); @@ -8565,54 +8795,59 @@ return /******/ (function(modules) { // webpackBootstrap ctx.lineTo(right, top + y); ctx.stroke(); } - ctx.strokeStyle = this.axisColor; - ctx.strokeRect(left, top, widthMax, height); - } + ctx.strokeRect(left, top, width, height); + } else { - if (this.style === Graph3d.STYLE.DOTSIZE) { - // draw border around color bar + // draw the size legend box + var widthMin; + if (this.style === Graph3d.STYLE.DOTSIZE) { + var dotSize = this._dotSize(); + widthMin = dotSize / 2; // px + } else if (this.style === Graph3d.STYLE.BARSIZE) { + //widthMin = this.xBarWidth * 0.2 this is wrong - barwidth measures in terms of xvalues + } ctx.strokeStyle = this.axisColor; ctx.fillStyle = this.dataColor.fill; ctx.beginPath(); ctx.moveTo(left, top); ctx.lineTo(right, top); - ctx.lineTo(right - widthMax + widthMin, bottom); + ctx.lineTo(right - width + widthMin, bottom); ctx.lineTo(left, bottom); ctx.closePath(); ctx.fill(); ctx.stroke(); } - if (this.style === Graph3d.STYLE.DOTCOLOR || this.style === Graph3d.STYLE.DOTSIZE) { - // print values along the color bar - var gridLineLen = 5; // px - var step = new StepNumber(this.valueMin, this.valueMax, (this.valueMax - this.valueMin) / 5, true); - step.start(); - if (step.getCurrent() < this.valueMin) { - step.next(); - } - while (!step.end()) { - y = bottom - (step.getCurrent() - this.valueMin) / (this.valueMax - this.valueMin) * height; + // print value text along the legend edge + var gridLineLen = 5; // px - ctx.beginPath(); - ctx.moveTo(left - gridLineLen, y); - ctx.lineTo(left, y); - ctx.stroke(); - - ctx.textAlign = 'right'; - ctx.textBaseline = 'middle'; - ctx.fillStyle = this.axisColor; - ctx.fillText(step.getCurrent(), left - 2 * gridLineLen, y); + var legendMin = isValueLegend ? this.valueRange.min : this.zRange.min; + var legendMax = isValueLegend ? this.valueRange.max : this.zRange.max; + var step = new StepNumber(legendMin, legendMax, (legendMax - legendMin) / 5, true); + step.start(true); - step.next(); - } + var y; + var from; + var to; + while (!step.end()) { + y = bottom - (step.getCurrent() - legendMin) / (legendMax - legendMin) * height; + from = new Point2d(left - gridLineLen, y); + to = new Point2d(left, y); + this._line(ctx, from, to); ctx.textAlign = 'right'; - ctx.textBaseline = 'top'; - var label = this.legendLabel; - ctx.fillText(label, right, bottom + this.margin); + ctx.textBaseline = 'middle'; + ctx.fillStyle = this.axisColor; + ctx.fillText(step.getCurrent(), left - 2 * gridLineLen, y); + + step.next(); } + + ctx.textAlign = 'right'; + ctx.textBaseline = 'top'; + var label = this.legendLabel; + ctx.fillText(label, right, bottom + this.margin); }; /** @@ -8665,8 +8900,7 @@ return /******/ (function(modules) { // webpackBootstrap */ Graph3d.prototype._redrawInfo = function () { if (this.dataFilter) { - var canvas = this.frame.canvas; - var ctx = canvas.getContext('2d'); + var ctx = this._getContext(); ctx.font = '14px arial'; // TODO: put in options ctx.lineStyle = 'gray'; @@ -8680,12 +8914,100 @@ return /******/ (function(modules) { // webpackBootstrap } }; + /** + * Draw a line between 2d points 'from' and 'to'. + * + * If stroke style specified, set that as well. + */ + Graph3d.prototype._line = function (ctx, from, to, strokeStyle) { + if (strokeStyle !== undefined) { + ctx.strokeStyle = strokeStyle; + } + + ctx.beginPath(); + ctx.moveTo(from.x, from.y); + ctx.lineTo(to.x, to.y); + ctx.stroke(); + }; + + Graph3d.prototype.drawAxisLabelX = function (ctx, point3d, text, armAngle, yMargin) { + if (yMargin === undefined) { + yMargin = 0; + } + + var point2d = this._convert3Dto2D(point3d); + + if (Math.cos(armAngle * 2) > 0) { + ctx.textAlign = 'center'; + ctx.textBaseline = 'top'; + point2d.y += yMargin; + } else if (Math.sin(armAngle * 2) < 0) { + ctx.textAlign = 'right'; + ctx.textBaseline = 'middle'; + } else { + ctx.textAlign = 'left'; + ctx.textBaseline = 'middle'; + } + + ctx.fillStyle = this.axisColor; + ctx.fillText(text, point2d.x, point2d.y); + }; + + Graph3d.prototype.drawAxisLabelY = function (ctx, point3d, text, armAngle, yMargin) { + if (yMargin === undefined) { + yMargin = 0; + } + + var point2d = this._convert3Dto2D(point3d); + + if (Math.cos(armAngle * 2) < 0) { + ctx.textAlign = 'center'; + ctx.textBaseline = 'top'; + point2d.y += yMargin; + } else if (Math.sin(armAngle * 2) > 0) { + ctx.textAlign = 'right'; + ctx.textBaseline = 'middle'; + } else { + ctx.textAlign = 'left'; + ctx.textBaseline = 'middle'; + } + + ctx.fillStyle = this.axisColor; + ctx.fillText(text, point2d.x, point2d.y); + }; + + Graph3d.prototype.drawAxisLabelZ = function (ctx, point3d, text, offset) { + if (offset === undefined) { + offset = 0; + } + + var point2d = this._convert3Dto2D(point3d); + ctx.textAlign = 'right'; + ctx.textBaseline = 'middle'; + ctx.fillStyle = this.axisColor; + ctx.fillText(text, point2d.x - offset, point2d.y); + }; + + /** + + + /** + * Draw a line between 2d points 'from' and 'to'. + * + * If stroke style specified, set that as well. + */ + Graph3d.prototype._line3d = function (ctx, from, to, strokeStyle) { + var from2d = this._convert3Dto2D(from); + var to2d = this._convert3Dto2D(to); + + this._line(ctx, from2d, to2d, strokeStyle); + }; + /** * Redraw the axis */ Graph3d.prototype._redrawAxis = function () { - var canvas = this.frame.canvas, - ctx = canvas.getContext('2d'), + var ctx = this._getContext(), from, to, step, @@ -8696,9 +9018,7 @@ return /******/ (function(modules) { // webpackBootstrap zText, offset, xOffset, - yOffset, - xMin2d, - xMax2d; + yOffset; // TODO: get the actual rendered style of the containerElement //ctx.font = this.containerElement.style.font; @@ -8709,59 +9029,39 @@ return /******/ (function(modules) { // webpackBootstrap var gridLenY = 0.025 / this.scale.y; var textMargin = 5 / this.camera.getArmLength(); // px var armAngle = this.camera.getArmRotation().horizontal; + var armVector = new Point2d(Math.cos(armAngle), Math.sin(armAngle)); + + var xRange = this.xRange; + var yRange = this.yRange; + var zRange = this.zRange; // draw x-grid lines ctx.lineWidth = 1; prettyStep = this.defaultXStep === undefined; - step = new StepNumber(this.xMin, this.xMax, this.xStep, prettyStep); - step.start(); - if (step.getCurrent() < this.xMin) { - step.next(); - } + step = new StepNumber(xRange.min, xRange.max, this.xStep, prettyStep); + step.start(true); + while (!step.end()) { var x = step.getCurrent(); if (this.showGrid) { - from = this._convert3Dto2D(new Point3d(x, this.yMin, this.zMin)); - to = this._convert3Dto2D(new Point3d(x, this.yMax, this.zMin)); - ctx.strokeStyle = this.gridColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(x, yRange.min, zRange.min); + to = new Point3d(x, yRange.max, zRange.min); + this._line3d(ctx, from, to, this.gridColor); } else { - from = this._convert3Dto2D(new Point3d(x, this.yMin, this.zMin)); - to = this._convert3Dto2D(new Point3d(x, this.yMin + gridLenX, this.zMin)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(x, yRange.min, zRange.min); + to = new Point3d(x, yRange.min + gridLenX, zRange.min); + this._line3d(ctx, from, to, this.axisColor); - from = this._convert3Dto2D(new Point3d(x, this.yMax, this.zMin)); - to = this._convert3Dto2D(new Point3d(x, this.yMax - gridLenX, this.zMin)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(x, yRange.max, zRange.min); + to = new Point3d(x, yRange.max - gridLenX, zRange.min); + this._line3d(ctx, from, to, this.axisColor); } - yText = Math.cos(armAngle) > 0 ? this.yMin : this.yMax; - text = this._convert3Dto2D(new Point3d(x, yText, this.zMin)); - if (Math.cos(armAngle * 2) > 0) { - ctx.textAlign = 'center'; - ctx.textBaseline = 'top'; - text.y += textMargin; - } else if (Math.sin(armAngle * 2) < 0) { - ctx.textAlign = 'right'; - ctx.textBaseline = 'middle'; - } else { - ctx.textAlign = 'left'; - ctx.textBaseline = 'middle'; - } - ctx.fillStyle = this.axisColor; - ctx.fillText(' ' + this.xValueLabel(step.getCurrent()) + ' ', text.x, text.y); + yText = armVector.x > 0 ? yRange.min : yRange.max; + var point3d = new Point3d(x, yText, zRange.min); + var msg = ' ' + this.xValueLabel(x) + ' '; + this.drawAxisLabelX(ctx, point3d, msg, armAngle, textMargin); step.next(); } @@ -8769,53 +9069,30 @@ return /******/ (function(modules) { // webpackBootstrap // draw y-grid lines ctx.lineWidth = 1; prettyStep = this.defaultYStep === undefined; - step = new StepNumber(this.yMin, this.yMax, this.yStep, prettyStep); - step.start(); - if (step.getCurrent() < this.yMin) { - step.next(); - } + step = new StepNumber(yRange.min, yRange.max, this.yStep, prettyStep); + step.start(true); + while (!step.end()) { + var y = step.getCurrent(); + if (this.showGrid) { - from = this._convert3Dto2D(new Point3d(this.xMin, step.getCurrent(), this.zMin)); - to = this._convert3Dto2D(new Point3d(this.xMax, step.getCurrent(), this.zMin)); - ctx.strokeStyle = this.gridColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(xRange.min, y, zRange.min); + to = new Point3d(xRange.max, y, zRange.min); + this._line3d(ctx, from, to, this.gridColor); } else { - from = this._convert3Dto2D(new Point3d(this.xMin, step.getCurrent(), this.zMin)); - to = this._convert3Dto2D(new Point3d(this.xMin + gridLenY, step.getCurrent(), this.zMin)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(xRange.min, y, zRange.min); + to = new Point3d(xRange.min + gridLenY, y, zRange.min); + this._line3d(ctx, from, to, this.axisColor); - from = this._convert3Dto2D(new Point3d(this.xMax, step.getCurrent(), this.zMin)); - to = this._convert3Dto2D(new Point3d(this.xMax - gridLenY, step.getCurrent(), this.zMin)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(xRange.max, y, zRange.min); + to = new Point3d(xRange.max - gridLenY, y, zRange.min); + this._line3d(ctx, from, to, this.axisColor); } - xText = Math.sin(armAngle) > 0 ? this.xMin : this.xMax; - text = this._convert3Dto2D(new Point3d(xText, step.getCurrent(), this.zMin)); - if (Math.cos(armAngle * 2) < 0) { - ctx.textAlign = 'center'; - ctx.textBaseline = 'top'; - text.y += textMargin; - } else if (Math.sin(armAngle * 2) > 0) { - ctx.textAlign = 'right'; - ctx.textBaseline = 'middle'; - } else { - ctx.textAlign = 'left'; - ctx.textBaseline = 'middle'; - } - ctx.fillStyle = this.axisColor; - ctx.fillText(' ' + this.yValueLabel(step.getCurrent()) + ' ', text.x, text.y); + xText = armVector.y > 0 ? xRange.min : xRange.max; + point3d = new Point3d(xText, y, zRange.min); + var msg = ' ' + this.yValueLabel(y) + ' '; + this.drawAxisLabelY(ctx, point3d, msg, armAngle, textMargin); step.next(); } @@ -8823,130 +9100,88 @@ return /******/ (function(modules) { // webpackBootstrap // draw z-grid lines and axis ctx.lineWidth = 1; prettyStep = this.defaultZStep === undefined; - step = new StepNumber(this.zMin, this.zMax, this.zStep, prettyStep); - step.start(); - if (step.getCurrent() < this.zMin) { - step.next(); - } - xText = Math.cos(armAngle) > 0 ? this.xMin : this.xMax; - yText = Math.sin(armAngle) < 0 ? this.yMin : this.yMax; + step = new StepNumber(zRange.min, zRange.max, this.zStep, prettyStep); + step.start(true); + + xText = armVector.x > 0 ? xRange.min : xRange.max; + yText = armVector.y < 0 ? yRange.min : yRange.max; + while (!step.end()) { + var z = step.getCurrent(); + // TODO: make z-grid lines really 3d? - from = this._convert3Dto2D(new Point3d(xText, yText, step.getCurrent())); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(from.x - textMargin, from.y); - ctx.stroke(); + var from3d = new Point3d(xText, yText, z); + var from2d = this._convert3Dto2D(from3d); + to = new Point2d(from2d.x - textMargin, from2d.y); + this._line(ctx, from2d, to, this.axisColor); - ctx.textAlign = 'right'; - ctx.textBaseline = 'middle'; - ctx.fillStyle = this.axisColor; - ctx.fillText(this.zValueLabel(step.getCurrent()) + ' ', from.x - 5, from.y); + var msg = this.zValueLabel(z) + ' '; + this.drawAxisLabelZ(ctx, from3d, msg, 5); step.next(); } + ctx.lineWidth = 1; - from = this._convert3Dto2D(new Point3d(xText, yText, this.zMin)); - to = this._convert3Dto2D(new Point3d(xText, yText, this.zMax)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(xText, yText, zRange.min); + to = new Point3d(xText, yText, zRange.max); + this._line3d(ctx, from, to, this.axisColor); // draw x-axis + var xMin2d; + var xMax2d; ctx.lineWidth = 1; + // line at yMin - xMin2d = this._convert3Dto2D(new Point3d(this.xMin, this.yMin, this.zMin)); - xMax2d = this._convert3Dto2D(new Point3d(this.xMax, this.yMin, this.zMin)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(xMin2d.x, xMin2d.y); - ctx.lineTo(xMax2d.x, xMax2d.y); - ctx.stroke(); + xMin2d = new Point3d(xRange.min, yRange.min, zRange.min); + xMax2d = new Point3d(xRange.max, yRange.min, zRange.min); + this._line3d(ctx, xMin2d, xMax2d, this.axisColor); // line at ymax - xMin2d = this._convert3Dto2D(new Point3d(this.xMin, this.yMax, this.zMin)); - xMax2d = this._convert3Dto2D(new Point3d(this.xMax, this.yMax, this.zMin)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(xMin2d.x, xMin2d.y); - ctx.lineTo(xMax2d.x, xMax2d.y); - ctx.stroke(); + xMin2d = new Point3d(xRange.min, yRange.max, zRange.min); + xMax2d = new Point3d(xRange.max, yRange.max, zRange.min); + this._line3d(ctx, xMin2d, xMax2d, this.axisColor); // draw y-axis ctx.lineWidth = 1; // line at xMin - from = this._convert3Dto2D(new Point3d(this.xMin, this.yMin, this.zMin)); - to = this._convert3Dto2D(new Point3d(this.xMin, this.yMax, this.zMin)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(xRange.min, yRange.min, zRange.min); + to = new Point3d(xRange.min, yRange.max, zRange.min); + this._line3d(ctx, from, to, this.axisColor); // line at xMax - from = this._convert3Dto2D(new Point3d(this.xMax, this.yMin, this.zMin)); - to = this._convert3Dto2D(new Point3d(this.xMax, this.yMax, this.zMin)); - ctx.strokeStyle = this.axisColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(to.x, to.y); - ctx.stroke(); + from = new Point3d(xRange.max, yRange.min, zRange.min); + to = new Point3d(xRange.max, yRange.max, zRange.min); + this._line3d(ctx, from, to, this.axisColor); // draw x-label var xLabel = this.xLabel; if (xLabel.length > 0) { yOffset = 0.1 / this.scale.y; - xText = (this.xMin + this.xMax) / 2; - yText = Math.cos(armAngle) > 0 ? this.yMin - yOffset : this.yMax + yOffset; - text = this._convert3Dto2D(new Point3d(xText, yText, this.zMin)); - if (Math.cos(armAngle * 2) > 0) { - ctx.textAlign = 'center'; - ctx.textBaseline = 'top'; - } else if (Math.sin(armAngle * 2) < 0) { - ctx.textAlign = 'right'; - ctx.textBaseline = 'middle'; - } else { - ctx.textAlign = 'left'; - ctx.textBaseline = 'middle'; - } - ctx.fillStyle = this.axisColor; - ctx.fillText(xLabel, text.x, text.y); + xText = xRange.center() / 2; + yText = armVector.x > 0 ? yRange.min - yOffset : yRange.max + yOffset; + text = new Point3d(xText, yText, zRange.min); + this.drawAxisLabelX(ctx, text, xLabel, armAngle); } // draw y-label var yLabel = this.yLabel; if (yLabel.length > 0) { xOffset = 0.1 / this.scale.x; - xText = Math.sin(armAngle) > 0 ? this.xMin - xOffset : this.xMax + xOffset; - yText = (this.yMin + this.yMax) / 2; - text = this._convert3Dto2D(new Point3d(xText, yText, this.zMin)); - if (Math.cos(armAngle * 2) < 0) { - ctx.textAlign = 'center'; - ctx.textBaseline = 'top'; - } else if (Math.sin(armAngle * 2) > 0) { - ctx.textAlign = 'right'; - ctx.textBaseline = 'middle'; - } else { - ctx.textAlign = 'left'; - ctx.textBaseline = 'middle'; - } - ctx.fillStyle = this.axisColor; - ctx.fillText(yLabel, text.x, text.y); + xText = armVector.y > 0 ? xRange.min - xOffset : xRange.max + xOffset; + yText = yRange.center() / 2; + text = new Point3d(xText, yText, zRange.min); + + this.drawAxisLabelY(ctx, text, yLabel, armAngle); } // draw z-label var zLabel = this.zLabel; if (zLabel.length > 0) { offset = 30; // pixels. // TODO: relate to the max width of the values on the z axis? - xText = Math.cos(armAngle) > 0 ? this.xMin : this.xMax; - yText = Math.sin(armAngle) < 0 ? this.yMin : this.yMax; - zText = (this.zMin + this.zMax) / 2; - text = this._convert3Dto2D(new Point3d(xText, yText, zText)); - ctx.textAlign = 'right'; - ctx.textBaseline = 'middle'; - ctx.fillStyle = this.axisColor; - ctx.fillText(zLabel, text.x - offset, text.y); + xText = armVector.x > 0 ? xRange.min : xRange.max; + yText = armVector.y < 0 ? yRange.min : yRange.max; + zText = zRange.center() / 2; + text = new Point3d(xText, yText, zText); + + this.drawAxisLabelZ(ctx, text, zLabel, offset); } }; @@ -8984,413 +9219,402 @@ return /******/ (function(modules) { // webpackBootstrap return 'RGB(' + parseInt(R * 255) + ',' + parseInt(G * 255) + ',' + parseInt(B * 255) + ')'; }; + Graph3d.prototype._getStrokeWidth = function (point) { + if (point !== undefined) { + if (this.showPerspective) { + return 1 / -point.trans.z * this.dataColor.strokeWidth; + } else { + return -(this.eye.z / this.camera.getArmLength()) * this.dataColor.strokeWidth; + } + } + + return this.dataColor.strokeWidth; + }; + + // ----------------------------------------------------------------------------- + // Drawing primitives for the graphs + // ----------------------------------------------------------------------------- + + /** - * Draw all datapoints as a grid - * This function can be used when the style is 'grid' + * Draw a bar element in the view with the given properties. */ - Graph3d.prototype._redrawDataGrid = function () { - var canvas = this.frame.canvas, - ctx = canvas.getContext('2d'), - point, - right, - top, - cross, - i, - topSideVisible, - fillStyle, - strokeStyle, - lineWidth, - h, - s, - v, - zAvg; + Graph3d.prototype._redrawBar = function (ctx, point, xWidth, yWidth, color, borderColor) { + var i, j, surface; - ctx.lineJoin = 'round'; - ctx.lineCap = 'round'; + // calculate all corner points + var me = this; + var point3d = point.point; + var zMin = this.zRange.min; + var top = [{ point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, point3d.z) }, { point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, point3d.z) }, { point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, point3d.z) }, { point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, point3d.z) }]; + var bottom = [{ point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, zMin) }, { point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, zMin) }, { point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, zMin) }, { point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, zMin) }]; + + // calculate screen location of the points + top.forEach(function (obj) { + obj.screen = me._convert3Dto2D(obj.point); + }); + bottom.forEach(function (obj) { + obj.screen = me._convert3Dto2D(obj.point); + }); - if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? + // create five sides, calculate both corner points and center points + var surfaces = [{ corners: top, center: Point3d.avg(bottom[0].point, bottom[2].point) }, { corners: [top[0], top[1], bottom[1], bottom[0]], center: Point3d.avg(bottom[1].point, bottom[0].point) }, { corners: [top[1], top[2], bottom[2], bottom[1]], center: Point3d.avg(bottom[2].point, bottom[1].point) }, { corners: [top[2], top[3], bottom[3], bottom[2]], center: Point3d.avg(bottom[3].point, bottom[2].point) }, { corners: [top[3], top[0], bottom[0], bottom[3]], center: Point3d.avg(bottom[0].point, bottom[3].point) }]; + point.surfaces = surfaces; - // calculate the translations and screen position of all points - for (i = 0; i < this.dataPoints.length; i++) { - var trans = this._convertPointToTranslation(this.dataPoints[i].point); - var screen = this._convertTranslationToScreen(trans); + // calculate the distance of each of the surface centers to the camera + for (j = 0; j < surfaces.length; j++) { + surface = surfaces[j]; + var transCenter = this._convertPointToTranslation(surface.center); + surface.dist = this.showPerspective ? transCenter.length() : -transCenter.z; + // TODO: this dept calculation doesn't work 100% of the cases due to perspective, + // but the current solution is fast/simple and works in 99.9% of all cases + // the issue is visible in example 14, with graph.setCameraPosition({horizontal: 2.97, vertical: 0.5, distance: 0.9}) + } - this.dataPoints[i].trans = trans; - this.dataPoints[i].screen = screen; + // order the surfaces by their (translated) depth + surfaces.sort(function (a, b) { + var diff = b.dist - a.dist; + if (diff) return diff; - // calculate the translation of the point at the bottom (needed for sorting) - var transBottom = this._convertPointToTranslation(this.dataPoints[i].bottom); - this.dataPoints[i].dist = this.showPerspective ? transBottom.length() : -transBottom.z; - } + // if equal depth, sort the top surface last + if (a.corners === top) return 1; + if (b.corners === top) return -1; - // sort the points on depth of their (x,y) position (not on z) - var sortDepth = function sortDepth(a, b) { - return b.dist - a.dist; - }; - this.dataPoints.sort(sortDepth); + // both are equal + return 0; + }); - if (this.style === Graph3d.STYLE.SURFACE) { - for (i = 0; i < this.dataPoints.length; i++) { - point = this.dataPoints[i]; - right = this.dataPoints[i].pointRight; - top = this.dataPoints[i].pointTop; - cross = this.dataPoints[i].pointCross; - - if (point !== undefined && right !== undefined && top !== undefined && cross !== undefined) { - - if (this.showGrayBottom || this.showShadow) { - // calculate the cross product of the two vectors from center - // to left and right, in order to know whether we are looking at the - // bottom or at the top side. We can also use the cross product - // for calculating light intensity - var aDiff = Point3d.subtract(cross.trans, point.trans); - var bDiff = Point3d.subtract(top.trans, right.trans); - var crossproduct = Point3d.crossProduct(aDiff, bDiff); - var len = crossproduct.length(); - // FIXME: there is a bug with determining the surface side (shadow or colored) - - topSideVisible = crossproduct.z > 0; - } else { - topSideVisible = true; - } + // draw the ordered surfaces + ctx.lineWidth = this._getStrokeWidth(point); + ctx.strokeStyle = borderColor; + ctx.fillStyle = color; + // NOTE: we start at j=2 instead of j=0 as we don't need to draw the two surfaces at the backside + for (j = 2; j < surfaces.length; j++) { + surface = surfaces[j]; + this._polygon(ctx, surface.corners); + } + }; - if (topSideVisible) { - // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 - zAvg = (point.point.z + right.point.z + top.point.z + cross.point.z) / 4; - h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; - s = 1; // saturation + /** + * Draw a polygon using the passed points and fill it with the passed style and stroke. + * + * @param points an array of points. + * @param fillStyle optional; the fill style to set + * @param strokeStyle optional; the stroke style to set + */ + Graph3d.prototype._polygon = function (ctx, points, fillStyle, strokeStyle) { + if (points.length < 2) { + return; + } - if (this.showShadow) { - v = Math.min(1 + crossproduct.x / len / 2, 1); // value. TODO: scale - fillStyle = this._hsv2rgb(h, s, v); - strokeStyle = fillStyle; - } else { - v = 1; - fillStyle = this._hsv2rgb(h, s, v); - strokeStyle = this.axisColor; // TODO: should be customizable - } - } else { - fillStyle = 'gray'; - strokeStyle = this.axisColor; - } + if (fillStyle !== undefined) { + ctx.fillStyle = fillStyle; + } + if (strokeStyle !== undefined) { + ctx.strokeStyle = strokeStyle; + } + ctx.beginPath(); + ctx.moveTo(points[0].screen.x, points[0].screen.y); - ctx.lineWidth = this._getStrokeWidth(point); - ctx.fillStyle = fillStyle; - ctx.strokeStyle = strokeStyle; - ctx.beginPath(); - ctx.moveTo(point.screen.x, point.screen.y); - ctx.lineTo(right.screen.x, right.screen.y); - ctx.lineTo(cross.screen.x, cross.screen.y); - ctx.lineTo(top.screen.x, top.screen.y); - ctx.closePath(); - ctx.fill(); - ctx.stroke(); // TODO: only draw stroke when strokeWidth > 0 - } - } - } else { - // grid style - for (i = 0; i < this.dataPoints.length; i++) { - point = this.dataPoints[i]; - right = this.dataPoints[i].pointRight; - top = this.dataPoints[i].pointTop; - - if (point !== undefined && right !== undefined) { - // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 - zAvg = (point.point.z + right.point.z) / 2; - h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; - - ctx.lineWidth = this._getStrokeWidth(point) * 2; - ctx.strokeStyle = this._hsv2rgb(h, 1, 1); - ctx.beginPath(); - ctx.moveTo(point.screen.x, point.screen.y); - ctx.lineTo(right.screen.x, right.screen.y); - ctx.stroke(); - } + for (var i = 1; i < points.length; ++i) { + var point = points[i]; + ctx.lineTo(point.screen.x, point.screen.y); + } - if (point !== undefined && top !== undefined) { - // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 - zAvg = (point.point.z + top.point.z) / 2; - h = (1 - (zAvg - this.zMin) * this.scale.z / this.verticalRatio) * 240; + ctx.closePath(); + ctx.fill(); + ctx.stroke(); // TODO: only draw stroke when strokeWidth > 0 + }; - ctx.lineWidth = this._getStrokeWidth(point) * 2; - ctx.strokeStyle = this._hsv2rgb(h, 1, 1); - ctx.beginPath(); - ctx.moveTo(point.screen.x, point.screen.y); - ctx.lineTo(top.screen.x, top.screen.y); - ctx.stroke(); - } - } - } + /** + * @param size optional; if not specified use value from 'this._dotSize()` + */ + Graph3d.prototype._drawCircle = function (ctx, point, color, borderColor, size) { + var radius = this._calcRadius(point, size); + + ctx.lineWidth = this._getStrokeWidth(point); + ctx.strokeStyle = borderColor; + ctx.fillStyle = color; + ctx.beginPath(); + ctx.arc(point.screen.x, point.screen.y, radius, 0, Math.PI * 2, true); + ctx.fill(); + ctx.stroke(); }; - Graph3d.prototype._getStrokeWidth = function (point) { - if (point !== undefined) { - if (this.showPerspective) { - return 1 / -point.trans.z * this.dataColor.strokeWidth; - } else { - return -(this.eye.z / this.camera.getArmLength()) * this.dataColor.strokeWidth; - } - } + /** + * Determine the colors for the 'regular' graph styles. + */ + Graph3d.prototype._getColorsRegular = function (point) { + // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 + var hue = (1 - (point.point.z - this.zRange.min) * this.scale.z / this.verticalRatio) * 240; + var color = this._hsv2rgb(hue, 1, 1); + var borderColor = this._hsv2rgb(hue, 1, 0.8); - return this.dataColor.strokeWidth; + return { + fill: color, + border: borderColor + }; }; /** - * Draw all datapoints as dots. - * This function can be used when the style is 'dot' or 'dot-line' + * Get the colors for the 'color' graph styles. + * These styles are currently: 'bar-color' and 'dot-color' */ - Graph3d.prototype._redrawDataDot = function () { - var canvas = this.frame.canvas; - var ctx = canvas.getContext('2d'); - var i; + Graph3d.prototype._getColorsColor = function (point) { + // calculate the color based on the value + var hue = (1 - (point.point.value - this.valueRange.min) * this.scale.value) * 240; + var color = this._hsv2rgb(hue, 1, 1); + var borderColor = this._hsv2rgb(hue, 1, 0.8); - if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? + return { + fill: color, + border: borderColor + }; + }; - // calculate the translations of all points - for (i = 0; i < this.dataPoints.length; i++) { - var trans = this._convertPointToTranslation(this.dataPoints[i].point); - var screen = this._convertTranslationToScreen(trans); - this.dataPoints[i].trans = trans; - this.dataPoints[i].screen = screen; + /** + * Get the colors for the 'size' graph styles. + * These styles are currently: 'bar-size' and 'dot-size' + */ + Graph3d.prototype._getColorsSize = function () { + return { + fill: this.dataColor.fill, + border: this.dataColor.stroke + }; + }; - // calculate the distance from the point at the bottom to the camera - var transBottom = this._convertPointToTranslation(this.dataPoints[i].bottom); - this.dataPoints[i].dist = this.showPerspective ? transBottom.length() : -transBottom.z; + /** + * Determine the size of a point on-screen, as determined by the + * distance to the camera. + * + * @param size the size that needs to be translated to screen coordinates. + * optional; if not passed, use the default point size. + */ + Graph3d.prototype._calcRadius = function (point, size) { + if (size === undefined) { + size = this._dotSize(); } - // order the translated points by depth - var sortDepth = function sortDepth(a, b) { - return b.dist - a.dist; - }; - this.dataPoints.sort(sortDepth); + var radius; + if (this.showPerspective) { + radius = size / -point.trans.z; + } else { + radius = size * -(this.eye.z / this.camera.getArmLength()); + } + if (radius < 0) { + radius = 0; + } - // draw the datapoints as colored circles - var dotSize = this.frame.clientWidth * this.dotSizeRatio; // px - for (i = 0; i < this.dataPoints.length; i++) { - var point = this.dataPoints[i]; + return radius; + }; - if (this.style === Graph3d.STYLE.DOTLINE) { - // draw a vertical line from the bottom to the graph value - //var from = this._convert3Dto2D(new Point3d(point.point.x, point.point.y, this.zMin)); - var from = this._convert3Dto2D(point.bottom); - ctx.lineWidth = 1; - ctx.strokeStyle = this.gridColor; - ctx.beginPath(); - ctx.moveTo(from.x, from.y); - ctx.lineTo(point.screen.x, point.screen.y); - ctx.stroke(); - } + // ----------------------------------------------------------------------------- + // Methods for drawing points per graph style. + // ----------------------------------------------------------------------------- - // calculate radius for the circle - var size; - if (this.style === Graph3d.STYLE.DOTSIZE) { - size = dotSize / 2 + 2 * dotSize * (point.point.value - this.valueMin) / (this.valueMax - this.valueMin); - } else { - size = dotSize; - } - var radius; - if (this.showPerspective) { - radius = size / -point.trans.z; - } else { - radius = size * -(this.eye.z / this.camera.getArmLength()); - } - if (radius < 0) { - radius = 0; - } + /** + * Draw single datapoint for graph style 'bar'. + */ + Graph3d.prototype._redrawBarGraphPoint = function (ctx, point) { + var xWidth = this.xBarWidth / 2; + var yWidth = this.yBarWidth / 2; + var colors = this._getColorsRegular(point); - var hue, color, borderColor; - if (this.style === Graph3d.STYLE.DOTCOLOR) { - // calculate the color based on the value - hue = (1 - (point.point.value - this.valueMin) * this.scale.value) * 240; - color = this._hsv2rgb(hue, 1, 1); - borderColor = this._hsv2rgb(hue, 1, 0.8); - } else if (this.style === Graph3d.STYLE.DOTSIZE) { - color = this.dataColor.fill; - borderColor = this.dataColor.stroke; - } else { - // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 - hue = (1 - (point.point.z - this.zMin) * this.scale.z / this.verticalRatio) * 240; - color = this._hsv2rgb(hue, 1, 1); - borderColor = this._hsv2rgb(hue, 1, 0.8); - } + this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border); + }; - // draw the circle - ctx.lineWidth = this._getStrokeWidth(point); - ctx.strokeStyle = borderColor; - ctx.fillStyle = color; - ctx.beginPath(); - ctx.arc(point.screen.x, point.screen.y, radius, 0, Math.PI * 2, true); - ctx.fill(); - ctx.stroke(); - } + /** + * Draw single datapoint for graph style 'bar-color'. + */ + Graph3d.prototype._redrawBarColorGraphPoint = function (ctx, point) { + var xWidth = this.xBarWidth / 2; + var yWidth = this.yBarWidth / 2; + var colors = this._getColorsColor(point); + + this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border); }; /** - * Draw all datapoints as bars. - * This function can be used when the style is 'bar', 'bar-color', or 'bar-size' + * Draw single datapoint for graph style 'bar-size'. */ - Graph3d.prototype._redrawDataBar = function () { - var canvas = this.frame.canvas; - var ctx = canvas.getContext('2d'); - var i, j, surface, corners; + Graph3d.prototype._redrawBarSizeGraphPoint = function (ctx, point) { + // calculate size for the bar + var fraction = (point.point.value - this.valueRange.min) / this.valueRange.range(); + var xWidth = this.xBarWidth / 2 * (fraction * 0.8 + 0.2); + var yWidth = this.yBarWidth / 2 * (fraction * 0.8 + 0.2); - if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? + var colors = this._getColorsSize(); - // calculate the translations of all points - for (i = 0; i < this.dataPoints.length; i++) { - var trans = this._convertPointToTranslation(this.dataPoints[i].point); - var screen = this._convertTranslationToScreen(trans); - this.dataPoints[i].trans = trans; - this.dataPoints[i].screen = screen; + this._redrawBar(ctx, point, xWidth, yWidth, colors.fill, colors.border); + }; - // calculate the distance from the point at the bottom to the camera - var transBottom = this._convertPointToTranslation(this.dataPoints[i].bottom); - this.dataPoints[i].dist = this.showPerspective ? transBottom.length() : -transBottom.z; - } + /** + * Draw single datapoint for graph style 'dot'. + */ + Graph3d.prototype._redrawDotGraphPoint = function (ctx, point) { + var colors = this._getColorsRegular(point); - // order the translated points by depth - var sortDepth = function sortDepth(a, b) { - return b.dist - a.dist; - }; - this.dataPoints.sort(sortDepth); + this._drawCircle(ctx, point, colors.fill, colors.border); + }; - ctx.lineJoin = 'round'; - ctx.lineCap = 'round'; + /** + * Draw single datapoint for graph style 'dot-line'. + */ + Graph3d.prototype._redrawDotLineGraphPoint = function (ctx, point) { + // draw a vertical line from the XY-plane to the graph value + var from = this._convert3Dto2D(point.bottom); + ctx.lineWidth = 1; + this._line(ctx, from, point.screen, this.gridColor); - // draw the datapoints as bars - var xWidth = this.xBarWidth / 2; - var yWidth = this.yBarWidth / 2; - for (i = 0; i < this.dataPoints.length; i++) { - var point = this.dataPoints[i]; + this._redrawDotGraphPoint(ctx, point); + }; - // determine color - var hue, color, borderColor; - if (this.style === Graph3d.STYLE.BARCOLOR) { - // calculate the color based on the value - hue = (1 - (point.point.value - this.valueMin) * this.scale.value) * 240; - color = this._hsv2rgb(hue, 1, 1); - borderColor = this._hsv2rgb(hue, 1, 0.8); - } else if (this.style === Graph3d.STYLE.BARSIZE) { - color = this.dataColor.fill; - borderColor = this.dataColor.stroke; - } else { - // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 - hue = (1 - (point.point.z - this.zMin) * this.scale.z / this.verticalRatio) * 240; - color = this._hsv2rgb(hue, 1, 1); - borderColor = this._hsv2rgb(hue, 1, 0.8); - } + /** + * Draw single datapoint for graph style 'dot-color'. + */ + Graph3d.prototype._redrawDotColorGraphPoint = function (ctx, point) { + var colors = this._getColorsColor(point); - // calculate size for the bar - if (this.style === Graph3d.STYLE.BARSIZE) { - xWidth = this.xBarWidth / 2 * ((point.point.value - this.valueMin) / (this.valueMax - this.valueMin) * 0.8 + 0.2); - yWidth = this.yBarWidth / 2 * ((point.point.value - this.valueMin) / (this.valueMax - this.valueMin) * 0.8 + 0.2); - } + this._drawCircle(ctx, point, colors.fill, colors.border); + }; - // calculate all corner points - var me = this; - var point3d = point.point; - var top = [{ point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, point3d.z) }, { point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, point3d.z) }, { point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, point3d.z) }, { point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, point3d.z) }]; - var bottom = [{ point: new Point3d(point3d.x - xWidth, point3d.y - yWidth, this.zMin) }, { point: new Point3d(point3d.x + xWidth, point3d.y - yWidth, this.zMin) }, { point: new Point3d(point3d.x + xWidth, point3d.y + yWidth, this.zMin) }, { point: new Point3d(point3d.x - xWidth, point3d.y + yWidth, this.zMin) }]; + /** + * Draw single datapoint for graph style 'dot-size'. + */ + Graph3d.prototype._redrawDotSizeGraphPoint = function (ctx, point) { + var dotSize = this._dotSize(); + var fraction = (point.point.value - this.valueRange.min) / this.valueRange.range(); + var size = dotSize / 2 + 2 * dotSize * fraction; + var colors = this._getColorsSize(); - // calculate screen location of the points - top.forEach(function (obj) { - obj.screen = me._convert3Dto2D(obj.point); - }); - bottom.forEach(function (obj) { - obj.screen = me._convert3Dto2D(obj.point); - }); + this._drawCircle(ctx, point, colors.fill, colors.border, size); + }; - // create five sides, calculate both corner points and center points - var surfaces = [{ corners: top, center: Point3d.avg(bottom[0].point, bottom[2].point) }, { corners: [top[0], top[1], bottom[1], bottom[0]], center: Point3d.avg(bottom[1].point, bottom[0].point) }, { corners: [top[1], top[2], bottom[2], bottom[1]], center: Point3d.avg(bottom[2].point, bottom[1].point) }, { corners: [top[2], top[3], bottom[3], bottom[2]], center: Point3d.avg(bottom[3].point, bottom[2].point) }, { corners: [top[3], top[0], bottom[0], bottom[3]], center: Point3d.avg(bottom[0].point, bottom[3].point) }]; - point.surfaces = surfaces; + /** + * Draw single datapoint for graph style 'surface'. + */ + Graph3d.prototype._redrawSurfaceGraphPoint = function (ctx, point) { + var right = point.pointRight; + var top = point.pointTop; + var cross = point.pointCross; - // calculate the distance of each of the surface centers to the camera - for (j = 0; j < surfaces.length; j++) { - surface = surfaces[j]; - var transCenter = this._convertPointToTranslation(surface.center); - surface.dist = this.showPerspective ? transCenter.length() : -transCenter.z; - // TODO: this dept calculation doesn't work 100% of the cases due to perspective, - // but the current solution is fast/simple and works in 99.9% of all cases - // the issue is visible in example 14, with graph.setCameraPosition({horizontal: 2.97, vertical: 0.5, distance: 0.9}) - } + if (point === undefined || right === undefined || top === undefined || cross === undefined) { + return; + } - // order the surfaces by their (translated) depth - surfaces.sort(function (a, b) { - var diff = b.dist - a.dist; - if (diff) return diff; + var topSideVisible = true; + var fillStyle; + var strokeStyle; + var lineWidth; - // if equal depth, sort the top surface last - if (a.corners === top) return 1; - if (b.corners === top) return -1; + if (this.showGrayBottom || this.showShadow) { + // calculate the cross product of the two vectors from center + // to left and right, in order to know whether we are looking at the + // bottom or at the top side. We can also use the cross product + // for calculating light intensity + var aDiff = Point3d.subtract(cross.trans, point.trans); + var bDiff = Point3d.subtract(top.trans, right.trans); + var crossproduct = Point3d.crossProduct(aDiff, bDiff); + var len = crossproduct.length(); + // FIXME: there is a bug with determining the surface side (shadow or colored) - // both are equal - return 0; - }); + topSideVisible = crossproduct.z > 0; + } - // draw the ordered surfaces - ctx.lineWidth = this._getStrokeWidth(point); - ctx.strokeStyle = borderColor; - ctx.fillStyle = color; - // NOTE: we start at j=2 instead of j=0 as we don't need to draw the two surfaces at the backside - for (j = 2; j < surfaces.length; j++) { - surface = surfaces[j]; - corners = surface.corners; - ctx.beginPath(); - ctx.moveTo(corners[3].screen.x, corners[3].screen.y); - ctx.lineTo(corners[0].screen.x, corners[0].screen.y); - ctx.lineTo(corners[1].screen.x, corners[1].screen.y); - ctx.lineTo(corners[2].screen.x, corners[2].screen.y); - ctx.lineTo(corners[3].screen.x, corners[3].screen.y); - ctx.fill(); - ctx.stroke(); + if (topSideVisible) { + + // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 + var zAvg = (point.point.z + right.point.z + top.point.z + cross.point.z) / 4; + var h = (1 - (zAvg - this.zRange.min) * this.scale.z / this.verticalRatio) * 240; + var s = 1; // saturation + var v; + + if (this.showShadow) { + v = Math.min(1 + crossproduct.x / len / 2, 1); // value. TODO: scale + fillStyle = this._hsv2rgb(h, s, v); + strokeStyle = fillStyle; + } else { + v = 1; + fillStyle = this._hsv2rgb(h, s, v); + strokeStyle = this.axisColor; // TODO: should be customizable } + } else { + fillStyle = 'gray'; + strokeStyle = this.axisColor; } + + ctx.lineWidth = this._getStrokeWidth(point); + // TODO: only draw stroke when strokeWidth > 0 + + var points = [point, right, cross, top]; + this._polygon(ctx, points, fillStyle, strokeStyle); }; /** - * Draw a line through all datapoints. - * This function can be used when the style is 'line' + * Helper method for _redrawGridGraphPoint() */ - Graph3d.prototype._redrawDataLine = function () { - var canvas = this.frame.canvas, - ctx = canvas.getContext('2d'), - point, - i; + Graph3d.prototype._drawGridLine = function (ctx, from, to) { + if (from === undefined || to === undefined) { + return; + } - if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? + // calculate Hue from the current value. At zMin the hue is 240, at zMax the hue is 0 + var zAvg = (from.point.z + to.point.z) / 2; + var h = (1 - (zAvg - this.zRange.min) * this.scale.z / this.verticalRatio) * 240; - // calculate the translations of all points - for (i = 0; i < this.dataPoints.length; i++) { - var trans = this._convertPointToTranslation(this.dataPoints[i].point); - var screen = this._convertTranslationToScreen(trans); + ctx.lineWidth = this._getStrokeWidth(from) * 2; + ctx.strokeStyle = this._hsv2rgb(h, 1, 1); + this._line(ctx, from.screen, to.screen); + }; + + /** + * Draw single datapoint for graph style 'Grid'. + */ + Graph3d.prototype._redrawGridGraphPoint = function (ctx, point) { + this._drawGridLine(ctx, point, point.pointRight); + this._drawGridLine(ctx, point, point.pointTop); + }; - this.dataPoints[i].trans = trans; - this.dataPoints[i].screen = screen; + /** + * Draw single datapoint for graph style 'line'. + */ + Graph3d.prototype._redrawLineGraphPoint = function (ctx, point) { + if (point.pointNext === undefined) { + return; } - // start the line - if (this.dataPoints.length > 0) { - point = this.dataPoints[0]; + ctx.lineWidth = this._getStrokeWidth(point); + ctx.strokeStyle = this.dataColor.stroke; - ctx.lineWidth = this._getStrokeWidth(point); - ctx.lineJoin = 'round'; - ctx.lineCap = 'round'; - ctx.strokeStyle = this.dataColor.stroke; - ctx.beginPath(); - ctx.moveTo(point.screen.x, point.screen.y); + this._line(ctx, point.screen, point.pointNext.screen); + }; - // draw the datapoints as colored circles - for (i = 1; i < this.dataPoints.length; i++) { - point = this.dataPoints[i]; - ctx.lineTo(point.screen.x, point.screen.y); - } + /** + * Draw all datapoints for currently selected graph style. + * + */ + Graph3d.prototype._redrawDataGraph = function () { + var ctx = this._getContext(); + var i; - // finish the line - ctx.stroke(); + if (this.dataPoints === undefined || this.dataPoints.length <= 0) return; // TODO: throw exception? + + this._calcTranslations(this.dataPoints); + + for (i = 0; i < this.dataPoints.length; i++) { + var point = this.dataPoints[i]; + + // Using call() ensures that the correct context is used + this._pointDrawingMethod.call(this, ctx, point); } }; + // ----------------------------------------------------------------------------- + // End methods for drawing points per graph style. + // ----------------------------------------------------------------------------- + + /** * Start a moving operation inside the provided parent element * @param {Event} event The event that occurred (required for @@ -9628,9 +9852,11 @@ return /******/ (function(modules) { // webpackBootstrap /** * Test whether a point lies inside given 2D triangle - * @param {Point2d} point - * @param {Point2d[]} triangle - * @return {boolean} Returns true if given point lies inside or on the edge of the triangle + * + * @param {Point2d} point + * @param {Point2d[]} triangle + * @returns {boolean} true if given point lies inside or on the edge of the + * triangle, false otherwise * @private */ Graph3d.prototype._insideTriangle = function (point, triangle) { @@ -9652,9 +9878,11 @@ return /******/ (function(modules) { // webpackBootstrap /** * Find a data point close to given screen position (x, y) - * @param {Number} x - * @param {Number} y - * @return {Object | null} The closest data point or null if not close to any data point + * + * @param {Number} x + * @param {Number} y + * @returns {Object | null} The closest data point or null if not close to any + * data point * @private */ Graph3d.prototype._dataPointFromXY = function (x, y) { @@ -9807,8 +10035,9 @@ return /******/ (function(modules) { // webpackBootstrap /** * Get the horizontal mouse position from a mouse event - * @param {Event} event - * @return {Number} mouse x + * + * @param {Event} event + * @returns {Number} mouse x */ function getMouseX(event) { if ('clientX' in event) return event.clientX; @@ -9817,14 +10046,42 @@ return /******/ (function(modules) { // webpackBootstrap /** * Get the vertical mouse position from a mouse event - * @param {Event} event - * @return {Number} mouse y + * + * @param {Event} event + * @returns {Number} mouse y */ function getMouseY(event) { if ('clientY' in event) return event.clientY; return event.targetTouches[0] && event.targetTouches[0].clientY || 0; } + // ----------------------------------------------------------------------------- + // Public methods for specific settings + // ----------------------------------------------------------------------------- + + /** + * Set the rotation and distance of the camera + * + * @param {Object} pos An object with the camera position + * @param {?Number} pos.horizontal The horizontal rotation, between 0 and 2*PI. + * Optional, can be left undefined. + * @param {?Number} pos.vertical The vertical rotation, between 0 and 0.5*PI. + * if vertical=0.5*PI, the graph is shown from + * the top. Optional, can be left undefined. + * @param {?Number} pos.distance The (normalized) distance of the camera to the + * center of the graph, a value between 0.71 and + * 5.0. Optional, can be left undefined. + */ + Graph3d.prototype.setCameraPosition = function (pos) { + Settings.setCameraPosition(pos, this); + this.redraw(); + }; + + // ----------------------------------------------------------------------------- + // End public methods for specific settings + // ----------------------------------------------------------------------------- + + module.exports = Graph3d; /***/ }, @@ -10351,7 +10608,7 @@ return /******/ (function(modules) { // webpackBootstrap * @return {*} value */ Filter.prototype.getValue = function (index) { - if (index >= this.values.length) throw 'Error: index out of range'; + if (index >= this.values.length) throw new Error('Index out of range'); return this.values[index]; }; @@ -10398,7 +10655,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Number} index */ Filter.prototype.selectValue = function (index) { - if (index >= this.values.length) throw 'Error: index out of range'; + if (index >= this.values.length) throw new Error('Index out of range'); this.index = index; this.value = this.values[index]; @@ -10469,7 +10726,7 @@ return /******/ (function(modules) { // webpackBootstrap */ function Slider(container, options) { if (container === undefined) { - throw 'Error: No container element defined'; + throw new Error('No container element defined'); } this.container = container; this.visible = options && options.visible != undefined ? options.visible : true; @@ -10710,7 +10967,7 @@ return /******/ (function(modules) { // webpackBootstrap this.redraw(); this.onChange(); } else { - throw 'Error: index out of range'; + throw new Error('Index out of range'); } }; @@ -10802,7 +11059,7 @@ return /******/ (function(modules) { // webpackBootstrap /* 19 */ /***/ function(module, exports) { - "use strict"; + 'use strict'; /** * @prototype StepNumber @@ -10841,6 +11098,15 @@ return /******/ (function(modules) { // webpackBootstrap this.setRange(start, end, step, prettyStep); }; + /** + * Check for input values, to prevent disasters from happening + * + * Source: http://stackoverflow.com/a/1830844 + */ + StepNumber.prototype.isNumeric = function (n) { + return !isNaN(parseFloat(n)) && isFinite(n); + }; + /** * Set a new range: start, end and step. * @@ -10851,6 +11117,16 @@ return /******/ (function(modules) { // webpackBootstrap * To a pretty step size (like 1, 2, 5, 10, 20, 50, ...) */ StepNumber.prototype.setRange = function (start, end, step, prettyStep) { + if (!this.isNumeric(start)) { + throw new Error('Parameter \'start\' is not numeric; value: ' + start); + } + if (!this.isNumeric(end)) { + throw new Error('Parameter \'end\' is not numeric; value: ' + start); + } + if (!this.isNumeric(step)) { + throw new Error('Parameter \'step\' is not numeric; value: ' + start); + } + this._start = start ? start : 0; this._end = end ? end : 0; @@ -10918,11 +11194,26 @@ return /******/ (function(modules) { // webpackBootstrap }; /** - * Set the current value to the largest value smaller than start, which - * is a multiple of the step size + * Set the current to its starting value. + * + * By default, this will be the largest value smaller than start, which + * is a multiple of the step size. + * + * Parameters checkFirst is optional, default false. + * If set to true, move the current value one step if smaller than start. */ - StepNumber.prototype.start = function () { + StepNumber.prototype.start = function (checkFirst) { + if (checkFirst === undefined) { + checkFirst = false; + } + this._current = this._start - this._start % this._step; + + if (checkFirst) { + if (this.getCurrent() < this._start) { + this.next(); + } + } }; /** @@ -10944,6 +11235,482 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 20 */ +/***/ function(module, exports) { + + 'use strict'; + + /** + * @prototype Range + * + * Helper class to make working with related min and max values easier. + * + * The range is inclusive; a given value is considered part of the range if: + * + * this.min <= value <= this.max + */ + function Range() { + this.min = undefined; + this.max = undefined; + } + + /** + * Adjust the range so that the passed value fits in it. + * + * If the value is outside of the current extremes, adjust + * the min or max so that the value is within the range. + * + * @param {number} value Numeric value to fit in range + */ + Range.prototype.adjust = function (value) { + if (value === undefined) return; + + if (this.min === undefined || this.min > value) { + this.min = value; + } + + if (this.max === undefined || this.max < value) { + this.max = value; + } + }; + + /** + * Adjust the current range so that the passed range fits in it. + * + * @param {Range} range Range instance to fit in current instance + */ + Range.prototype.combine = function (range) { + this.add(range.min); + this.add(range.max); + }; + + /** + * Expand the range by the given value + * + * min will be lowered by given value; + * max will be raised by given value + * + * Shrinking by passing a negative value is allowed. + * + * @param {number} val Amount by which to expand or shrink current range with + */ + Range.prototype.expand = function (val) { + if (val === undefined) { + return; + } + + var newMin = this.min - val; + var newMax = this.max + val; + + // Note that following allows newMin === newMax. + // This should be OK, since method expand() allows this also. + if (newMin > newMax) { + throw new Error('Passed expansion value makes range invalid'); + } + + this.min = newMin; + this.max = newMax; + }; + + /** + * Determine the full range width of current instance. + * + * @returns {num} The calculated width of this range + */ + Range.prototype.range = function () { + return this.max - this.min; + }; + + /** + * Determine the central point of current instance. + * + * @returns {number} the value in the middle of min and max + */ + Range.prototype.center = function () { + return (this.min + this.max) / 2; + }; + + module.exports = Range; + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + + //////////////////////////////////////////////////////////////////////////////// + // This modules handles the options for Graph3d. + // + //////////////////////////////////////////////////////////////////////////////// + var Camera = __webpack_require__(16); + var Point3d = __webpack_require__(14); + + // enumerate the available styles + var STYLE = { + BAR: 0, + BARCOLOR: 1, + BARSIZE: 2, + DOT: 3, + DOTLINE: 4, + DOTCOLOR: 5, + DOTSIZE: 6, + GRID: 7, + LINE: 8, + SURFACE: 9 + }; + + // The string representations of the styles + var STYLENAME = { + 'dot': STYLE.DOT, + 'dot-line': STYLE.DOTLINE, + 'dot-color': STYLE.DOTCOLOR, + 'dot-size': STYLE.DOTSIZE, + 'line': STYLE.LINE, + 'grid': STYLE.GRID, + 'surface': STYLE.SURFACE, + 'bar': STYLE.BAR, + 'bar-color': STYLE.BARCOLOR, + 'bar-size': STYLE.BARSIZE + }; + + /** + * Field names in the options hash which are of relevance to the user. + * + * Specifically, these are the fields which require no special handling, + * and can be directly copied over. + */ + var OPTIONKEYS = ['width', 'height', 'filterLabel', 'legendLabel', 'xLabel', 'yLabel', 'zLabel', 'xValueLabel', 'yValueLabel', 'zValueLabel', 'showGrid', 'showPerspective', 'showShadow', 'keepAspectRatio', 'verticalRatio', 'dotSizeRatio', 'showAnimationControls', 'animationInterval', 'animationPreload', 'animationAutoStart', 'axisColor', 'gridColor', 'xCenter', 'yCenter']; + + /** + * Field names in the options hash which are of relevance to the user. + * + * Same as OPTIONKEYS, but internally these fields are stored with + * prefix 'default' in the name. + */ + var PREFIXEDOPTIONKEYS = ['xBarWidth', 'yBarWidth', 'valueMin', 'valueMax', 'xMin', 'xMax', 'xStep', 'yMin', 'yMax', 'yStep', 'zMin', 'zMax', 'zStep']; + + // Placeholder for DEFAULTS reference + var DEFAULTS = undefined; + + /** + * Check if given hash is empty. + * + * Source: http://stackoverflow.com/a/679937 + */ + function isEmpty(obj) { + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) return false; + } + + return true; + } + + /** + * Make first letter of parameter upper case. + * + * Source: http://stackoverflow.com/a/1026087 + */ + function capitalize(str) { + if (str === undefined || str === "") { + return str; + } + + return str.charAt(0).toUpperCase() + str.slice(1); + } + + /** + * Add a prefix to a field name, taking style guide into account + */ + function prefixFieldName(prefix, fieldName) { + if (prefix === undefined || prefix === "") { + return fieldName; + } + + return prefix + capitalize(fieldName); + } + + /** + * Forcibly copy fields from src to dst in a controlled manner. + * + * A given field in dst will always be overwitten. If this field + * is undefined or not present in src, the field in dst will + * be explicitly set to undefined. + * + * The intention here is to be able to reset all option fields. + * + * Only the fields mentioned in array 'fields' will be handled. + * + * @param fields array with names of fields to copy + * @param prefix optional; prefix to use for the target fields. + */ + function forceCopy(src, dst, fields, prefix) { + var srcKey; + var dstKey; + + for (var i in fields) { + srcKey = fields[i]; + dstKey = prefixFieldName(prefix, srcKey); + + dst[dstKey] = src[srcKey]; + } + } + + /** + * Copy fields from src to dst in a safe and controlled manner. + * + * Only the fields mentioned in array 'fields' will be copied over, + * and only if these are actually defined. + * + * @param fields array with names of fields to copy + * @param prefix optional; prefix to use for the target fields. + */ + function safeCopy(src, dst, fields, prefix) { + var srcKey; + var dstKey; + + for (var i in fields) { + srcKey = fields[i]; + if (src[srcKey] === undefined) continue; + + dstKey = prefixFieldName(prefix, srcKey); + + dst[dstKey] = src[srcKey]; + } + } + + /** + * Initialize dst with the values in src. + * + * src is the hash with the default values. + * A reference DEFAULTS to this hash is stored locally for + * further handling. + * + * For now, dst is assumed to be a Graph3d instance. + */ + function setDefaults(src, dst) { + if (src === undefined || isEmpty(src)) { + throw new Error('No DEFAULTS passed'); + } + if (dst === undefined) { + throw new Error('No dst passed'); + } + + // Remember defaults for future reference + DEFAULTS = src; + + // Handle the defaults which can be simply copied over + forceCopy(src, dst, OPTIONKEYS); + forceCopy(src, dst, PREFIXEDOPTIONKEYS, 'default'); + + // Handle the more complex ('special') fields + setSpecialSettings(src, dst); + + // Following are internal fields, not part of the user settings + dst.margin = 10; // px + dst.showGrayBottom = false; // TODO: this does not work correctly + dst.showTooltip = false; + dst.eye = new Point3d(0, 0, -1); // TODO: set eye.z about 3/4 of the width of the window? + } + + function setOptions(options, dst) { + if (options === undefined) { + return; + } + if (dst === undefined) { + throw new Error('No dst passed'); + } + + if (DEFAULTS === undefined || isEmpty(DEFAULTS)) { + throw new Error('DEFAULTS not set for module Settings'); + } + + // Handle the parameters which can be simply copied over + safeCopy(options, dst, OPTIONKEYS); + safeCopy(options, dst, PREFIXEDOPTIONKEYS, 'default'); + + // Handle the more complex ('special') fields + setSpecialSettings(options, dst); + } + + /** + * Special handling for certain parameters + * + * 'Special' here means: setting requires more than a simple copy + */ + function setSpecialSettings(src, dst) { + if (src.backgroundColor !== undefined) { + setBackgroundColor(src.backgroundColor, dst); + } + + setDataColor(src.dataColor, dst); + setStyle(src.style, dst); + setShowLegend(src.showLegend, dst); + setCameraPosition(src.cameraPosition, dst); + + // As special fields go, this is an easy one; just a translation of the name. + // Can't use this.tooltip directly, because that field exists internally + if (src.tooltip !== undefined) { + dst.showTooltip = src.tooltip; + } + } + + /** + * Set the value of setting 'showLegend' + * + * This depends on the value of the style fields, so it must be called + * after the style field has been initialized. + */ + function setShowLegend(showLegend, dst) { + if (showLegend === undefined) { + // If the default was auto, make a choice for this field + var isAutoByDefault = DEFAULTS.showLegend === undefined; + + if (isAutoByDefault) { + // these styles default to having legends + var isLegendGraphStyle = dst.style === STYLE.DOTCOLOR || dst.style === STYLE.DOTSIZE; + + dst.showLegend = isLegendGraphStyle; + } else { + // Leave current value as is + } + } else { + dst.showLegend = showLegend; + } + } + + /** + * Retrieve the style index from given styleName + * @param {string} styleName Style name such as 'dot', 'grid', 'dot-line' + * @return {Number} styleNumber Enumeration value representing the style, or -1 + * when not found + */ + function getStyleNumberByName(styleName) { + var number = STYLENAME[styleName]; + + if (number === undefined) { + return -1; + } + + return number; + } + + /** + * Check if given number is a valid style number. + * + * @return true if valid, false otherwise + */ + function checkStyleNumber(style) { + var valid = false; + + for (var n in STYLE) { + if (STYLE[n] === style) { + valid = true; + break; + } + } + + return valid; + } + + function setStyle(style, dst) { + if (style === undefined) { + return; // Nothing to do + } + + var styleNumber; + + if (typeof style === 'string') { + styleNumber = getStyleNumberByName(style); + + if (styleNumber === -1) { + throw new Error('Style \'' + style + '\' is invalid'); + } + } else { + // Do a pedantic check on style number value + if (!checkStyleNumber(style)) { + throw new Error('Style \'' + style + '\' is invalid'); + } + + styleNumber = style; + } + + dst.style = styleNumber; + } + + /** + * Set the background styling for the graph + * @param {string | {fill: string, stroke: string, strokeWidth: string}} backgroundColor + */ + function setBackgroundColor(backgroundColor, dst) { + var fill = 'white'; + var stroke = 'gray'; + var strokeWidth = 1; + + if (typeof backgroundColor === 'string') { + fill = backgroundColor; + stroke = 'none'; + strokeWidth = 0; + } else if ((typeof backgroundColor === 'undefined' ? 'undefined' : _typeof(backgroundColor)) === 'object') { + if (backgroundColor.fill !== undefined) fill = backgroundColor.fill; + if (backgroundColor.stroke !== undefined) stroke = backgroundColor.stroke; + if (backgroundColor.strokeWidth !== undefined) strokeWidth = backgroundColor.strokeWidth; + } else { + throw new Error('Unsupported type of backgroundColor'); + } + + dst.frame.style.backgroundColor = fill; + dst.frame.style.borderColor = stroke; + dst.frame.style.borderWidth = strokeWidth + 'px'; + dst.frame.style.borderStyle = 'solid'; + } + + function setDataColor(dataColor, dst) { + if (dataColor === undefined) { + return; // Nothing to do + } + + if (dst.dataColor === undefined) { + dst.dataColor = {}; + } + + if (typeof dataColor === 'string') { + dst.dataColor.fill = dataColor; + dst.dataColor.stroke = dataColor; + } else { + if (dataColor.fill) { + dst.dataColor.fill = dataColor.fill; + } + if (dataColor.stroke) { + dst.dataColor.stroke = dataColor.stroke; + } + if (dataColor.strokeWidth !== undefined) { + dst.dataColor.strokeWidth = dataColor.strokeWidth; + } + } + } + + function setCameraPosition(cameraPosition, dst) { + var camPos = cameraPosition; + if (camPos === undefined) { + return; + } + + if (dst.camera === undefined) { + dst.camera = new Camera(); + } + + dst.camera.setArmRotation(camPos.horizontal, camPos.vertical); + dst.camera.setArmLength(camPos.distance); + } + + module.exports.STYLE = STYLE; + module.exports.setDefaults = setDefaults; + module.exports.setOptions = setOptions; + module.exports.setCameraPosition = setCameraPosition; + +/***/ }, +/* 22 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -10951,8 +11718,8 @@ return /******/ (function(modules) { // webpackBootstrap // Only load hammer.js when in a browser environment // (loading hammer.js in a node.js environment gives errors) if (typeof window !== 'undefined') { - var propagating = __webpack_require__(21); - var Hammer = window['Hammer'] || __webpack_require__(22); + var propagating = __webpack_require__(23); + var Hammer = window['Hammer'] || __webpack_require__(24); module.exports = propagating(Hammer, { preventDefault: 'mouse' }); @@ -10963,7 +11730,7 @@ return /******/ (function(modules) { // webpackBootstrap } /***/ }, -/* 21 */ +/* 23 */ /***/ function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict'; @@ -11200,14 +11967,14 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 22 */ +/* 24 */ /***/ function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.6 - 2015-12-23 + var __WEBPACK_AMD_DEFINE_RESULT__;/*! Hammer.JS - v2.0.7 - 2016-04-22 * http://hammerjs.github.io/ * - * Copyright (c) 2015 Jorik Tangelder; - * Licensed under the license */ + * Copyright (c) 2016 Jorik Tangelder; + * Licensed under the MIT license */ (function(window, document, exportName, undefined) { 'use strict'; @@ -11335,7 +12102,7 @@ return /******/ (function(modules) { // webpackBootstrap * means that properties in dest will be overwritten by the ones in src. * @param {Object} dest * @param {Object} src - * @param {Boolean=false} [merge] + * @param {Boolean} [merge=false] * @returns {Object} dest */ var extend = deprecate(function extend(dest, src, merge) { @@ -11996,7 +12763,6 @@ return /******/ (function(modules) { // webpackBootstrap this.evEl = MOUSE_ELEMENT_EVENTS; this.evWin = MOUSE_WINDOW_EVENTS; - this.allow = true; // used by Input.TouchMouse to disable mouse events this.pressed = false; // mousedown state Input.apply(this, arguments); @@ -12019,8 +12785,8 @@ return /******/ (function(modules) { // webpackBootstrap eventType = INPUT_END; } - // mouse must be down, and mouse events are allowed (see the TouchMouse input) - if (!this.pressed || !this.allow) { + // mouse must be down + if (!this.pressed) { return; } @@ -12303,12 +13069,19 @@ return /******/ (function(modules) { // webpackBootstrap * @constructor * @extends Input */ + + var DEDUP_TIMEOUT = 2500; + var DEDUP_DISTANCE = 25; + function TouchMouseInput() { Input.apply(this, arguments); var handler = bindFn(this.handler, this); this.touch = new TouchInput(this.manager, handler); this.mouse = new MouseInput(this.manager, handler); + + this.primaryTouch = null; + this.lastTouches = []; } inherit(TouchMouseInput, Input, { @@ -12322,17 +13095,15 @@ return /******/ (function(modules) { // webpackBootstrap var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH), isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE); - // when we're in a touch event, so block all upcoming mouse events - // most mobile browser also emit mouseevents, right after touchstart - if (isTouch) { - this.mouse.allow = false; - } else if (isMouse && !this.mouse.allow) { + if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) { return; } - // reset the allowMouse when we're done - if (inputEvent & (INPUT_END | INPUT_CANCEL)) { - this.mouse.allow = true; + // when we're in a touch event, record touches to de-dupe synthetic mouse event + if (isTouch) { + recordTouches.call(this, inputEvent, inputData); + } else if (isMouse && isSyntheticEvent.call(this, inputData)) { + return; } this.callback(manager, inputEvent, inputData); @@ -12347,6 +13118,44 @@ return /******/ (function(modules) { // webpackBootstrap } }); + function recordTouches(eventType, eventData) { + if (eventType & INPUT_START) { + this.primaryTouch = eventData.changedPointers[0].identifier; + setLastTouch.call(this, eventData); + } else if (eventType & (INPUT_END | INPUT_CANCEL)) { + setLastTouch.call(this, eventData); + } + } + + function setLastTouch(eventData) { + var touch = eventData.changedPointers[0]; + + if (touch.identifier === this.primaryTouch) { + var lastTouch = {x: touch.clientX, y: touch.clientY}; + this.lastTouches.push(lastTouch); + var lts = this.lastTouches; + var removeLastTouch = function() { + var i = lts.indexOf(lastTouch); + if (i > -1) { + lts.splice(i, 1); + } + }; + setTimeout(removeLastTouch, DEDUP_TIMEOUT); + } + } + + function isSyntheticEvent(eventData) { + var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY; + for (var i = 0; i < this.lastTouches.length; i++) { + var t = this.lastTouches[i]; + var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y); + if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) { + return true; + } + } + return false; + } + var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction'); var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined; @@ -12357,6 +13166,7 @@ return /******/ (function(modules) { // webpackBootstrap var TOUCH_ACTION_NONE = 'none'; var TOUCH_ACTION_PAN_X = 'pan-x'; var TOUCH_ACTION_PAN_Y = 'pan-y'; + var TOUCH_ACTION_MAP = getTouchActionProps(); /** * Touch Action @@ -12381,7 +13191,7 @@ return /******/ (function(modules) { // webpackBootstrap value = this.compute(); } - if (NATIVE_TOUCH_ACTION && this.manager.element.style) { + if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) { this.manager.element.style[PREFIXED_TOUCH_ACTION] = value; } this.actions = value.toLowerCase().trim(); @@ -12413,11 +13223,6 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} input */ preventDefaults: function(input) { - // not needed with native support for the touchAction property - if (NATIVE_TOUCH_ACTION) { - return; - } - var srcEvent = input.srcEvent; var direction = input.offsetDirection; @@ -12428,9 +13233,9 @@ return /******/ (function(modules) { // webpackBootstrap } var actions = this.actions; - var hasNone = inStr(actions, TOUCH_ACTION_NONE); - var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y); - var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X); + var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE]; + var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y]; + var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X]; if (hasNone) { //do not prevent defaults if this is a tap gesture @@ -12501,6 +13306,21 @@ return /******/ (function(modules) { // webpackBootstrap return TOUCH_ACTION_AUTO; } + function getTouchActionProps() { + if (!NATIVE_TOUCH_ACTION) { + return false; + } + var touchMap = {}; + var cssSupports = window.CSS && window.CSS.supports; + ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) { + + // If css.supports is not supported but there is native touch-action assume it supports + // all values. This is the case for IE 10 and 11. + touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true; + }); + return touchMap; + } + /** * Recognizer flow explained; * * All recognizers have the initial state of POSSIBLE when a input session starts. @@ -13297,7 +14117,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * @const {string} */ - Hammer.VERSION = '2.0.6'; + Hammer.VERSION = '2.0.7'; /** * default settings @@ -13428,6 +14248,7 @@ return /******/ (function(modules) { // webpackBootstrap this.handlers = {}; this.session = {}; this.recognizers = []; + this.oldCssProps = {}; this.element = element; this.input = createInputInstance(this); @@ -13606,6 +14427,13 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {EventEmitter} this */ on: function(events, handler) { + if (events === undefined) { + return; + } + if (handler === undefined) { + return; + } + var handlers = this.handlers; each(splitStr(events), function(event) { handlers[event] = handlers[event] || []; @@ -13621,6 +14449,10 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {EventEmitter} this */ off: function(events, handler) { + if (events === undefined) { + return; + } + var handlers = this.handlers; each(splitStr(events), function(event) { if (!handler) { @@ -13685,9 +14517,19 @@ return /******/ (function(modules) { // webpackBootstrap if (!element.style) { return; } + var prop; each(manager.options.cssProps, function(value, name) { - element.style[prefixed(element.style, name)] = add ? value : ''; + prop = prefixed(element.style, name); + if (add) { + manager.oldCssProps[prop] = element.style[prop]; + element.style[prop] = value; + } else { + element.style[prop] = manager.oldCssProps[prop] || ''; + } }); + if (!add) { + manager.oldCssProps = {}; + } } /** @@ -13774,206 +14616,206 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, -/* 23 */ +/* 25 */ /***/ function(module, exports, __webpack_require__) { - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;"use strict"; - /** - * Created by Alex on 11/6/2014. - */ - - // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60 - // if the module has no dependencies, the above pattern can be simplified to - (function (root, factory) { - if (true) { - // AMD. Register as an anonymous module. - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof exports === 'object') { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } else { - // Browser globals (root is window) - root.keycharm = factory(); - } - }(this, function () { - - function keycharm(options) { - var preventDefault = options && options.preventDefault || false; - - var container = options && options.container || window; - - var _exportFunctions = {}; - var _bound = {keydown:{}, keyup:{}}; - var _keys = {}; - var i; - - // a - z - for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};} - // A - Z - for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};} - // 0 - 9 - for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};} - // F1 - F12 - for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};} - // num0 - num9 - for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};} - - // numpad misc - _keys['num*'] = {code:106, shift: false}; - _keys['num+'] = {code:107, shift: false}; - _keys['num-'] = {code:109, shift: false}; - _keys['num/'] = {code:111, shift: false}; - _keys['num.'] = {code:110, shift: false}; - // arrows - _keys['left'] = {code:37, shift: false}; - _keys['up'] = {code:38, shift: false}; - _keys['right'] = {code:39, shift: false}; - _keys['down'] = {code:40, shift: false}; - // extra keys - _keys['space'] = {code:32, shift: false}; - _keys['enter'] = {code:13, shift: false}; - _keys['shift'] = {code:16, shift: undefined}; - _keys['esc'] = {code:27, shift: false}; - _keys['backspace'] = {code:8, shift: false}; - _keys['tab'] = {code:9, shift: false}; - _keys['ctrl'] = {code:17, shift: false}; - _keys['alt'] = {code:18, shift: false}; - _keys['delete'] = {code:46, shift: false}; - _keys['pageup'] = {code:33, shift: false}; - _keys['pagedown'] = {code:34, shift: false}; - // symbols - _keys['='] = {code:187, shift: false}; - _keys['-'] = {code:189, shift: false}; - _keys[']'] = {code:221, shift: false}; - _keys['['] = {code:219, shift: false}; - - - - var down = function(event) {handleEvent(event,'keydown');}; - var up = function(event) {handleEvent(event,'keyup');}; - - // handle the actualy bound key with the event - var handleEvent = function(event,type) { - if (_bound[type][event.keyCode] !== undefined) { - var bound = _bound[type][event.keyCode]; - for (var i = 0; i < bound.length; i++) { - if (bound[i].shift === undefined) { - bound[i].fn(event); - } - else if (bound[i].shift == true && event.shiftKey == true) { - bound[i].fn(event); - } - else if (bound[i].shift == false && event.shiftKey == false) { - bound[i].fn(event); - } - } - - if (preventDefault == true) { - event.preventDefault(); - } - } - }; - - // bind a key to a callback - _exportFunctions.bind = function(key, callback, type) { - if (type === undefined) { - type = 'keydown'; - } - if (_keys[key] === undefined) { - throw new Error("unsupported key: " + key); - } - if (_bound[type][_keys[key].code] === undefined) { - _bound[type][_keys[key].code] = []; - } - _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift}); - }; - - - // bind all keys to a call back (demo purposes) - _exportFunctions.bindAll = function(callback, type) { - if (type === undefined) { - type = 'keydown'; - } - for (var key in _keys) { - if (_keys.hasOwnProperty(key)) { - _exportFunctions.bind(key,callback,type); - } - } - }; - - // get the key label from an event - _exportFunctions.getKey = function(event) { - for (var key in _keys) { - if (_keys.hasOwnProperty(key)) { - if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) { - return key; - } - else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) { - return key; - } - else if (event.keyCode == _keys[key].code && key == 'shift') { - return key; - } - } - } - return "unknown key, currently not supported"; - }; - - // unbind either a specific callback from a key or all of them (by leaving callback undefined) - _exportFunctions.unbind = function(key, callback, type) { - if (type === undefined) { - type = 'keydown'; - } - if (_keys[key] === undefined) { - throw new Error("unsupported key: " + key); - } - if (callback !== undefined) { - var newBindings = []; - var bound = _bound[type][_keys[key].code]; - if (bound !== undefined) { - for (var i = 0; i < bound.length; i++) { - if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) { - newBindings.push(_bound[type][_keys[key].code][i]); - } - } - } - _bound[type][_keys[key].code] = newBindings; - } - else { - _bound[type][_keys[key].code] = []; - } - }; - - // reset all bound variables. - _exportFunctions.reset = function() { - _bound = {keydown:{}, keyup:{}}; - }; - - // unbind all listeners and reset all variables. - _exportFunctions.destroy = function() { - _bound = {keydown:{}, keyup:{}}; - container.removeEventListener('keydown', down, true); - container.removeEventListener('keyup', up, true); - }; - - // create listeners. - container.addEventListener('keydown',down,true); - container.addEventListener('keyup',up,true); - - // return the public functions. - return _exportFunctions; - } - - return keycharm; - })); - - + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;"use strict"; + /** + * Created by Alex on 11/6/2014. + */ + + // https://github.com/umdjs/umd/blob/master/returnExports.js#L40-L60 + // if the module has no dependencies, the above pattern can be simplified to + (function (root, factory) { + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.keycharm = factory(); + } + }(this, function () { + + function keycharm(options) { + var preventDefault = options && options.preventDefault || false; + + var container = options && options.container || window; + + var _exportFunctions = {}; + var _bound = {keydown:{}, keyup:{}}; + var _keys = {}; + var i; + + // a - z + for (i = 97; i <= 122; i++) {_keys[String.fromCharCode(i)] = {code:65 + (i - 97), shift: false};} + // A - Z + for (i = 65; i <= 90; i++) {_keys[String.fromCharCode(i)] = {code:i, shift: true};} + // 0 - 9 + for (i = 0; i <= 9; i++) {_keys['' + i] = {code:48 + i, shift: false};} + // F1 - F12 + for (i = 1; i <= 12; i++) {_keys['F' + i] = {code:111 + i, shift: false};} + // num0 - num9 + for (i = 0; i <= 9; i++) {_keys['num' + i] = {code:96 + i, shift: false};} + + // numpad misc + _keys['num*'] = {code:106, shift: false}; + _keys['num+'] = {code:107, shift: false}; + _keys['num-'] = {code:109, shift: false}; + _keys['num/'] = {code:111, shift: false}; + _keys['num.'] = {code:110, shift: false}; + // arrows + _keys['left'] = {code:37, shift: false}; + _keys['up'] = {code:38, shift: false}; + _keys['right'] = {code:39, shift: false}; + _keys['down'] = {code:40, shift: false}; + // extra keys + _keys['space'] = {code:32, shift: false}; + _keys['enter'] = {code:13, shift: false}; + _keys['shift'] = {code:16, shift: undefined}; + _keys['esc'] = {code:27, shift: false}; + _keys['backspace'] = {code:8, shift: false}; + _keys['tab'] = {code:9, shift: false}; + _keys['ctrl'] = {code:17, shift: false}; + _keys['alt'] = {code:18, shift: false}; + _keys['delete'] = {code:46, shift: false}; + _keys['pageup'] = {code:33, shift: false}; + _keys['pagedown'] = {code:34, shift: false}; + // symbols + _keys['='] = {code:187, shift: false}; + _keys['-'] = {code:189, shift: false}; + _keys[']'] = {code:221, shift: false}; + _keys['['] = {code:219, shift: false}; + + + + var down = function(event) {handleEvent(event,'keydown');}; + var up = function(event) {handleEvent(event,'keyup');}; + + // handle the actualy bound key with the event + var handleEvent = function(event,type) { + if (_bound[type][event.keyCode] !== undefined) { + var bound = _bound[type][event.keyCode]; + for (var i = 0; i < bound.length; i++) { + if (bound[i].shift === undefined) { + bound[i].fn(event); + } + else if (bound[i].shift == true && event.shiftKey == true) { + bound[i].fn(event); + } + else if (bound[i].shift == false && event.shiftKey == false) { + bound[i].fn(event); + } + } + + if (preventDefault == true) { + event.preventDefault(); + } + } + }; + + // bind a key to a callback + _exportFunctions.bind = function(key, callback, type) { + if (type === undefined) { + type = 'keydown'; + } + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + if (_bound[type][_keys[key].code] === undefined) { + _bound[type][_keys[key].code] = []; + } + _bound[type][_keys[key].code].push({fn:callback, shift:_keys[key].shift}); + }; + + + // bind all keys to a call back (demo purposes) + _exportFunctions.bindAll = function(callback, type) { + if (type === undefined) { + type = 'keydown'; + } + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + _exportFunctions.bind(key,callback,type); + } + } + }; + + // get the key label from an event + _exportFunctions.getKey = function(event) { + for (var key in _keys) { + if (_keys.hasOwnProperty(key)) { + if (event.shiftKey == true && _keys[key].shift == true && event.keyCode == _keys[key].code) { + return key; + } + else if (event.shiftKey == false && _keys[key].shift == false && event.keyCode == _keys[key].code) { + return key; + } + else if (event.keyCode == _keys[key].code && key == 'shift') { + return key; + } + } + } + return "unknown key, currently not supported"; + }; + + // unbind either a specific callback from a key or all of them (by leaving callback undefined) + _exportFunctions.unbind = function(key, callback, type) { + if (type === undefined) { + type = 'keydown'; + } + if (_keys[key] === undefined) { + throw new Error("unsupported key: " + key); + } + if (callback !== undefined) { + var newBindings = []; + var bound = _bound[type][_keys[key].code]; + if (bound !== undefined) { + for (var i = 0; i < bound.length; i++) { + if (!(bound[i].fn == callback && bound[i].shift == _keys[key].shift)) { + newBindings.push(_bound[type][_keys[key].code][i]); + } + } + } + _bound[type][_keys[key].code] = newBindings; + } + else { + _bound[type][_keys[key].code] = []; + } + }; + + // reset all bound variables. + _exportFunctions.reset = function() { + _bound = {keydown:{}, keyup:{}}; + }; + + // unbind all listeners and reset all variables. + _exportFunctions.destroy = function() { + _bound = {keydown:{}, keyup:{}}; + container.removeEventListener('keydown', down, true); + container.removeEventListener('keyup', up, true); + }; + + // create listeners. + container.addEventListener('keydown',down,true); + container.addEventListener('keyup',up,true); + + // return the public functions. + return _exportFunctions; + } + + return keycharm; + })); + + /***/ }, -/* 24 */ +/* 26 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -13988,76 +14830,76 @@ return /******/ (function(modules) { // webpackBootstrap exports.Queue = __webpack_require__(10); // Timeline - exports.Timeline = __webpack_require__(25); - exports.Graph2d = __webpack_require__(50); + exports.Timeline = __webpack_require__(27); + exports.Graph2d = __webpack_require__(52); exports.timeline = { - Core: __webpack_require__(33), - DateUtil: __webpack_require__(32), - Range: __webpack_require__(30), - stack: __webpack_require__(37), - TimeStep: __webpack_require__(35), + Core: __webpack_require__(35), + DateUtil: __webpack_require__(34), + Range: __webpack_require__(32), + stack: __webpack_require__(39), + TimeStep: __webpack_require__(37), components: { items: { - Item: __webpack_require__(39), - BackgroundItem: __webpack_require__(43), - BoxItem: __webpack_require__(41), - PointItem: __webpack_require__(42), - RangeItem: __webpack_require__(38) + Item: __webpack_require__(41), + BackgroundItem: __webpack_require__(45), + BoxItem: __webpack_require__(43), + PointItem: __webpack_require__(44), + RangeItem: __webpack_require__(40) }, - BackgroundGroup: __webpack_require__(40), - Component: __webpack_require__(31), - CurrentTime: __webpack_require__(48), - CustomTime: __webpack_require__(46), - DataAxis: __webpack_require__(52), - DataScale: __webpack_require__(53), - GraphGroup: __webpack_require__(54), - Group: __webpack_require__(36), - ItemSet: __webpack_require__(34), - Legend: __webpack_require__(58), - LineGraph: __webpack_require__(51), - TimeAxis: __webpack_require__(44) + BackgroundGroup: __webpack_require__(42), + Component: __webpack_require__(33), + CurrentTime: __webpack_require__(50), + CustomTime: __webpack_require__(48), + DataAxis: __webpack_require__(54), + DataScale: __webpack_require__(55), + GraphGroup: __webpack_require__(56), + Group: __webpack_require__(38), + ItemSet: __webpack_require__(36), + Legend: __webpack_require__(60), + LineGraph: __webpack_require__(53), + TimeAxis: __webpack_require__(46) } }; // bundled external libraries exports.moment = __webpack_require__(2); - exports.Hammer = __webpack_require__(20); - exports.keycharm = __webpack_require__(23); + exports.Hammer = __webpack_require__(22); + exports.keycharm = __webpack_require__(25); /***/ }, -/* 25 */ +/* 27 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _Configurator = __webpack_require__(26); + var _Configurator = __webpack_require__(28); var _Configurator2 = _interopRequireDefault(_Configurator); - var _Validator = __webpack_require__(29); + var _Validator = __webpack_require__(31); var _Validator2 = _interopRequireDefault(_Validator); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Emitter = __webpack_require__(13); - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); var moment = __webpack_require__(2); var util = __webpack_require__(1); var DataSet = __webpack_require__(9); var DataView = __webpack_require__(11); - var Range = __webpack_require__(30); - var Core = __webpack_require__(33); - var TimeAxis = __webpack_require__(44); - var CurrentTime = __webpack_require__(48); - var CustomTime = __webpack_require__(46); - var ItemSet = __webpack_require__(34); + var Range = __webpack_require__(32); + var Core = __webpack_require__(35); + var TimeAxis = __webpack_require__(46); + var CurrentTime = __webpack_require__(50); + var CustomTime = __webpack_require__(48); + var ItemSet = __webpack_require__(36); - var printStyle = __webpack_require__(29).printStyle; - var allOptions = __webpack_require__(49).allOptions; - var configureOptions = __webpack_require__(49).configureOptions; + var printStyle = __webpack_require__(31).printStyle; + var allOptions = __webpack_require__(51).allOptions; + var configureOptions = __webpack_require__(51).configureOptions; /** * Create a timeline visualization @@ -14085,17 +14927,12 @@ return /******/ (function(modules) { // webpackBootstrap this.defaultOptions = { start: null, end: null, - autoResize: true, - throttleRedraw: 0, // ms - orientation: { axis: 'bottom', // axis orientation: 'bottom', 'top', or 'both' item: 'bottom' // not relevant }, - rtl: false, moment: moment, - width: null, height: null, maxHeight: null, @@ -14106,6 +14943,18 @@ return /******/ (function(modules) { // webpackBootstrap // Create the DOM, props, and emitter this._create(container); + if (!options || options && typeof options.rtl == "undefined") { + var directionFromDom, + domNode = this.dom.root; + while (!directionFromDom && domNode) { + directionFromDom = window.getComputedStyle(domNode, null).direction; + domNode = domNode.parentElement; + } + this.options.rtl = directionFromDom && directionFromDom.toLowerCase() == "rtl"; + } else { + this.options.rtl = options.rtl; + } + // all components listed here will be repainted automatically this.components = []; @@ -14134,17 +14983,17 @@ return /******/ (function(modules) { // webpackBootstrap }; // range - this.range = new Range(this.body); + this.range = new Range(this.body, this.options); this.components.push(this.range); this.body.range = this.range; // time axis - this.timeAxis = new TimeAxis(this.body); + this.timeAxis = new TimeAxis(this.body, this.options); this.timeAxis2 = null; // used in case of orientation option 'both' this.components.push(this.timeAxis); // current time bar - this.currentTime = new CurrentTime(this.body); + this.currentTime = new CurrentTime(this.body, this.options); this.components.push(this.currentTime); // item set @@ -14235,7 +15084,6 @@ return /******/ (function(modules) { // webpackBootstrap if (errorFound === true) { console.log('%cErrors have been found in the supplied options object.', printStyle); } - Core.prototype.setOptions.call(this, options); if ('type' in options) { @@ -14500,9 +15348,9 @@ return /******/ (function(modules) { // webpackBootstrap min = getStart(minItem) - rhs * interval / delta; // ms max = getEnd(maxItem) + lhs * interval / delta; // ms } else { - min = getStart(minItem) - lhs * interval / delta; // ms - max = getEnd(maxItem) + rhs * interval / delta; // ms - } + min = getStart(minItem) - lhs * interval / delta; // ms + max = getEnd(maxItem) + rhs * interval / delta; // ms + } } } })(); @@ -14603,7 +15451,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Timeline; /***/ }, -/* 26 */ +/* 28 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -14612,11 +15460,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _ColorPicker = __webpack_require__(27); + var _ColorPicker = __webpack_require__(29); var _ColorPicker2 = _interopRequireDefault(_ColorPicker); @@ -14640,10 +15488,9 @@ return /******/ (function(modules) { // webpackBootstrap * @param configureOptions | the fully configured and predefined options set found in allOptions.js * @param pixelRatio | canvas pixel ratio */ - var Configurator = function () { function Configurator(parentModule, defaultContainer, configureOptions) { - var pixelRatio = arguments.length <= 3 || arguments[3] === undefined ? 1 : arguments[3]; + var pixelRatio = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; _classCallCheck(this, Configurator); @@ -14932,7 +15779,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_makeLabel', value: function _makeLabel(name, path) { - var objectLabel = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var objectLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var div = document.createElement('div'); div.className = 'vis-configuration vis-config-label vis-config-s' + path.length; @@ -15263,8 +16110,8 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_handleObject', value: function _handleObject(obj) { - var path = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; - var checkOnly = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var checkOnly = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var show = false; var filter = this.options.filter; @@ -15384,7 +16231,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_constructOptions', value: function _constructOptions(value, path) { - var optionsObj = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + var optionsObj = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var pointer = optionsObj; @@ -15429,7 +16276,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Configurator; /***/ }, -/* 27 */ +/* 29 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -15442,13 +16289,13 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(28); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(30); var util = __webpack_require__(1); var ColorPicker = function () { function ColorPicker() { - var pixelRatio = arguments.length <= 0 || arguments[0] === undefined ? 1 : arguments[0]; + var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; _classCallCheck(this, ColorPicker); @@ -15544,7 +16391,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'setColor', value: function setColor(color) { - var setInitial = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (color === 'none') { return; @@ -15619,7 +16466,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function _hide() { var _this = this; - var storePrevious = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; + var storePrevious = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; // store the previous color for next time; if (storePrevious === true) { @@ -15693,7 +16540,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_setColor', value: function _setColor(rgba) { - var setInitial = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var setInitial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // store the initial color if (setInitial === true) { @@ -15753,7 +16600,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_updatePicker', value: function _updatePicker() { - var rgba = arguments.length <= 0 || arguments[0] === undefined ? this.color : arguments[0]; + var rgba = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.color; var hsv = util.RGBToHSV(rgba.r, rgba.g, rgba.b); var ctx = this.colorPickerCanvas.getContext('2d'); @@ -16058,12 +16905,12 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = ColorPicker; /***/ }, -/* 28 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); /** * Register a touch event, taking place before a gesture @@ -16132,7 +16979,7 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 29 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -16141,7 +16988,7 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); @@ -16342,7 +17189,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'findInOptions', value: function findInOptions(option, options, path) { - var recursive = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; + var recursive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; var min = 1e9; var closestMatch = ''; @@ -16376,7 +17223,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'printLocation', value: function printLocation(path, option) { - var prefix = arguments.length <= 2 || arguments[2] === undefined ? 'Problem value found at: \n' : arguments[2]; + var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'Problem value found at: \n'; var str = '\n\n' + prefix + 'options = {\n'; for (var i = 0; i < path.length; i++) { @@ -16456,18 +17303,18 @@ return /******/ (function(modules) { // webpackBootstrap exports.printStyle = printStyle; /***/ }, -/* 30 */ +/* 32 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var util = __webpack_require__(1); - var hammerUtil = __webpack_require__(28); + var hammerUtil = __webpack_require__(30); var moment = __webpack_require__(2); - var Component = __webpack_require__(31); - var DateUtil = __webpack_require__(32); + var Component = __webpack_require__(33); + var DateUtil = __webpack_require__(34); /** * @constructor Range @@ -16544,7 +17391,7 @@ return /******/ (function(modules) { // webpackBootstrap Range.prototype.setOptions = function (options) { if (options) { // copy the options that we know - var fields = ['direction', 'min', 'max', 'zoomMin', 'zoomMax', 'moveable', 'zoomable', 'moment', 'activate', 'hiddenDates', 'zoomKey', 'rtl']; + var fields = ['direction', 'min', 'max', 'zoomMin', 'zoomMax', 'moveable', 'zoomable', 'moment', 'activate', 'hiddenDates', 'zoomKey', 'rtl', 'horizontalScroll']; util.selectiveExtend(fields, this.options, options); if ('start' in options || 'end' in options) { @@ -16845,6 +17692,8 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ Range.prototype._onDrag = function (event) { + if (!event) return; + if (!this.props.touch.dragging) return; // only allow dragging when configured as movable @@ -16899,6 +17748,9 @@ return /******/ (function(modules) { // webpackBootstrap end: endDate, byUser: true }); + + // fire a panmove event + this.body.emitter.emit('panmove'); }; /** @@ -16937,14 +17789,9 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ Range.prototype._onMouseWheel = function (event) { - // only allow zooming when configured as zoomable and moveable - if (!(this.options.zoomable && this.options.moveable)) return; - - // only zoom when the mouse is inside the current range - if (!this._isInsideRange(event)) return; - - // only zoom when the according key is pressed and the zoomKey option is set - if (this.options.zoomKey && !event[this.options.zoomKey]) return; + // Prevent default actions caused by mouse wheel + // (else the page and timeline both zoom and scroll) + event.preventDefault(); // retrieve delta var delta = 0; @@ -16958,6 +17805,26 @@ return /******/ (function(modules) { // webpackBootstrap delta = -event.detail / 3; } + // don't allow zoom when the according key is pressed and the zoomKey option or not zoomable but movable + if (this.options.zoomKey && !event[this.options.zoomKey] && this.options.zoomable || !this.options.zoomable && this.options.moveable) { + if (this.options.horizontalScroll) { + // calculate a single scroll jump relative to the range scale + var diff = delta * (this.end - this.start) / 20; + // calculate new start and end + var newStart = this.start - diff; + var newEnd = this.end - diff; + + this.setRange(newStart, newEnd); + } + return; + } + + // only allow zooming when configured as zoomable and moveable + if (!(this.options.zoomable && this.options.moveable)) return; + + // only zoom when the mouse is inside the current range + if (!this._isInsideRange(event)) return; + // If delta is nonzero, handle it. // Basically, delta is now positive if wheel was scrolled up, // and negative, if wheel was scrolled down. @@ -16979,10 +17846,6 @@ return /******/ (function(modules) { // webpackBootstrap this.zoom(scale, pointerDate, delta); } - - // Prevent default actions caused by mouse wheel - // (else the page and timeline both zoom and scroll) - event.preventDefault(); }; /** @@ -17186,10 +18049,12 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Range; /***/ }, -/* 31 */ -/***/ function(module, exports) { +/* 33 */ +/***/ function(module, exports, __webpack_require__) { - "use strict"; + 'use strict'; + + var util = __webpack_require__(1); /** * Prototype for visual components @@ -17246,7 +18111,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Component; /***/ }, -/* 32 */ +/* 34 */ /***/ function(module, exports) { "use strict"; @@ -17554,10 +18419,22 @@ return /******/ (function(modules) { // webpackBootstrap } var duration = exports.getHiddenDurationBetween(Core.body.hiddenDates, Core.range.start, Core.range.end); - time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, Core.range, time); - - var conversion = Core.range.conversion(width, duration); - return (time.valueOf() - conversion.offset) * conversion.scale; + if (time < Core.range.start) { + var conversion = Core.range.conversion(width, duration); + var hiddenBeforeStart = exports.getHiddenDurationBeforeStart(Core.body.hiddenDates, time, conversion.offset); + time = Core.options.moment(time).toDate().valueOf(); + time = time + hiddenBeforeStart; + return -(conversion.offset - time.valueOf()) * conversion.scale; + } else if (time > Core.range.end) { + var rangeAfterEnd = { start: Core.range.start, end: time }; + time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, rangeAfterEnd, time); + var conversion = Core.range.conversion(width, duration); + return (time.valueOf() - conversion.offset) * conversion.scale; + } else { + time = exports.correctTimeForHidden(Core.options.moment, Core.body.hiddenDates, Core.range, time); + var conversion = Core.range.conversion(width, duration); + return (time.valueOf() - conversion.offset) * conversion.scale; + } } }; @@ -17604,6 +18481,27 @@ return /******/ (function(modules) { // webpackBootstrap return duration; }; + /** + * Support function + * + * @param hiddenDates + * @param start + * @param end + * @returns {number} + */ + exports.getHiddenDurationBeforeStart = function (hiddenDates, start, end) { + var duration = 0; + for (var i = 0; i < hiddenDates.length; i++) { + var startDate = hiddenDates[i].start; + var endDate = hiddenDates[i].end; + + if (startDate >= start && endDate <= end) { + duration += endDate - startDate; + } + } + return duration; + }; + /** * Support function * @param moment @@ -17717,25 +18615,25 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 33 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var Emitter = __webpack_require__(13); - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(28); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(30); var util = __webpack_require__(1); var DataSet = __webpack_require__(9); var DataView = __webpack_require__(11); - var Range = __webpack_require__(30); - var ItemSet = __webpack_require__(34); - var TimeAxis = __webpack_require__(44); - var Activator = __webpack_require__(45); - var DateUtil = __webpack_require__(32); - var CustomTime = __webpack_require__(46); + var Range = __webpack_require__(32); + var ItemSet = __webpack_require__(36); + var TimeAxis = __webpack_require__(46); + var Activator = __webpack_require__(47); + var DateUtil = __webpack_require__(34); + var CustomTime = __webpack_require__(48); /** * Create a timeline visualization @@ -17808,7 +18706,6 @@ return /******/ (function(modules) { // webpackBootstrap this.dom.centerContainer.appendChild(this.dom.center); this.dom.leftContainer.appendChild(this.dom.left); this.dom.rightContainer.appendChild(this.dom.right); - this.dom.centerContainer.appendChild(this.dom.shadowTop); this.dom.centerContainer.appendChild(this.dom.shadowBottom); this.dom.leftContainer.appendChild(this.dom.shadowTopLeft); @@ -17816,13 +18713,30 @@ return /******/ (function(modules) { // webpackBootstrap this.dom.rightContainer.appendChild(this.dom.shadowTopRight); this.dom.rightContainer.appendChild(this.dom.shadowBottomRight); + // size properties of each of the panels + this.props = { + root: {}, + background: {}, + centerContainer: {}, + leftContainer: {}, + rightContainer: {}, + center: {}, + left: {}, + right: {}, + top: {}, + bottom: {}, + border: {}, + scrollTop: 0, + scrollTopMin: 0 + }; + this.on('rangechange', function () { if (this.initialDrawDone === true) { - this._redraw(); // this allows overriding the _redraw method + this._redraw(); } }.bind(this)); this.on('touch', this._onTouch.bind(this)); - this.on('pan', this._onDrag.bind(this)); + this.on('panmove', this._onDrag.bind(this)); var me = this; this.on('_change', function (properties) { @@ -17876,29 +18790,108 @@ return /******/ (function(modules) { // webpackBootstrap }.bind(this)); function onMouseWheel(event) { + if (this.isActive()) { + this.emit('mousewheel', event); + } + + // prevent scrolling when zoomKey defined or activated + if (!this.options.zoomKey || event[this.options.zoomKey]) return; + + // prevent scrolling vertically when horizontalScroll is true + if (this.options.horizontalScroll) return; + + var delta = 0; + if (event.wheelDelta) { + /* IE/Opera. */ + delta = event.wheelDelta / 120; + } else if (event.detail) { + /* Mozilla case. */ + // In Mozilla, sign of delta is different than in IE. + // Also, delta is multiple of 3. + delta = -event.detail / 3; + } + + var current = this.props.scrollTop; + var adjusted = current + delta * 120; + + if (this.isActive()) { + this._setScrollTop(adjusted); + if (this.options.verticalScroll) { + this.dom.left.parentNode.scrollTop = -adjusted; + this.dom.right.parentNode.scrollTop = -adjusted; + } + this._redraw(); + this.emit('scroll', event); + } + + // Prevent default actions caused by mouse wheel + // (else the page and timeline both scroll) + event.preventDefault(); + } + + if (this.dom.centerContainer.addEventListener) { + // IE9, Chrome, Safari, Opera + this.dom.centerContainer.addEventListener("mousewheel", onMouseWheel.bind(this), false); + // Firefox + this.dom.centerContainer.addEventListener("DOMMouseScroll", onMouseWheel.bind(this), false); + } else { + // IE 6/7/8 + this.dom.centerContainer.attachEvent("onmousewheel", onMouseWheel.bind(this)); + } + + function onMouseScrollSide(event) { + if (!me.options.verticalScroll) return; + event.preventDefault(); if (me.isActive()) { - me.emit('mousewheel', event); + var adjusted = -event.target.scrollTop; + me._setScrollTop(adjusted); + me._redraw(); + me.emit('scrollSide', event); } } - this.dom.root.addEventListener('mousewheel', onMouseWheel); - this.dom.root.addEventListener('DOMMouseScroll', onMouseWheel); - // size properties of each of the panels - this.props = { - root: {}, - background: {}, - centerContainer: {}, - leftContainer: {}, - rightContainer: {}, - center: {}, - left: {}, - right: {}, - top: {}, - bottom: {}, - border: {}, - scrollTop: 0, - scrollTopMin: 0 - }; + this.dom.left.parentNode.addEventListener('scroll', onMouseScrollSide.bind(this)); + this.dom.right.parentNode.addEventListener('scroll', onMouseScrollSide.bind(this)); + + var itemAddedToTimeline = false; + + function handleDragOver(event) { + if (event.preventDefault) { + event.preventDefault(); // Necessary. Allows us to drop. + } + + // make sure your target is a vis element + if (!event.target.className.includes('vis')) return; + + // make sure only one item is added every time you're over the timeline + if (itemAddedToTimeline) return; + + event.dataTransfer.dropEffect = 'move'; + itemAddedToTimeline = true; + return false; + } + + function handleDrop(event) { + // return when dropping non-vis items + try { + var itemData = JSON.parse(event.dataTransfer.getData("text/plain")); + if (!itemData.content) return; + } catch (err) { + return false; + } + + itemAddedToTimeline = false; + event.center = { + x: event.x, + y: event.y + }; + me.itemSet._onAddItem(event); + + return false; + } + + this.dom.center.addEventListener('dragover', handleDragOver.bind(this), false); + this.dom.center.addEventListener('drop', handleDrop.bind(this), false); this.customTimes = []; @@ -17941,17 +18934,22 @@ return /******/ (function(modules) { // webpackBootstrap Core.prototype.setOptions = function (options) { if (options) { // copy the known options - var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'rtl', 'throttleRedraw']; + var fields = ['width', 'height', 'minHeight', 'maxHeight', 'autoResize', 'start', 'end', 'clickToUse', 'dataAttributes', 'hiddenDates', 'locale', 'locales', 'moment', 'rtl', 'zoomKey', 'horizontalScroll', 'verticalScroll']; util.selectiveExtend(fields, this.options, options); if (this.options.rtl) { - var contentContainer = this.dom.leftContainer; - this.dom.leftContainer = this.dom.rightContainer; - this.dom.rightContainer = contentContainer; this.dom.container.style.direction = "rtl"; this.dom.backgroundVertical.className = 'vis-panel vis-background vis-vertical-rtl'; } + if (this.options.verticalScroll) { + if (this.options.rtl) { + this.dom.rightContainer.className = 'vis-panel vis-right vis-vertical-scroll'; + } else { + this.dom.leftContainer.className = 'vis-panel vis-left vis-vertical-scroll'; + } + } + this.options.orientation = { item: undefined, axis: undefined }; if ('orientation' in options) { if (typeof options.orientation === 'string') { @@ -18046,7 +19044,7 @@ return /******/ (function(modules) { // webpackBootstrap // override redraw with a throttled version if (!this._origRedraw) { this._origRedraw = this._redraw.bind(this); - this._redraw = util.throttle(this._origRedraw, this.options.throttleRedraw); + this._redraw = util.throttle(this._origRedraw); } else { // Not the initial run: redraw everything this._redraw(); @@ -18331,6 +19329,46 @@ return /******/ (function(modules) { // webpackBootstrap }; }; + /** + * Zoom in the window such that given time is centered on screen. + * @param {Number} percentage - must be between [0..1] + */ + Core.prototype.zoomIn = function (percentage) { + if (!percentage || percentage < 0 || percentage > 1) return; + var range = this.getWindow(); + var start = range.start.valueOf(); + var end = range.end.valueOf(); + var interval = end - start; + var newInterval = interval / (1 + percentage); + var distance = (interval - newInterval) / 2; + var newStart = start + distance; + var newEnd = end - distance; + + this.setWindow({ + start: newStart, + end: newEnd + }); + }; + + /** + * Zoom out the window such that given time is centered on screen. + * @param {Number} percentage - must be between [0..1] + */ + Core.prototype.zoomOut = function (percentage) { + if (!percentage || percentage < 0 || percentage > 1) return; + var range = this.getWindow(); + var start = range.start.valueOf(); + var end = range.end.valueOf(); + var interval = end - start; + var newStart = start - interval * percentage / 2; + var newEnd = end + interval * percentage / 2; + + this.setWindow({ + start: newStart, + end: newEnd + }); + }; + /** * Force a redraw. Can be overridden by implementations of Core * @@ -18415,9 +19453,25 @@ return /******/ (function(modules) { // webpackBootstrap // calculate the widths of the panels props.root.width = dom.root.offsetWidth; props.background.width = props.root.width - borderRootWidth; - props.left.width = dom.leftContainer.clientWidth || -props.border.left; + + if (!this.initialDrawDone) { + props.scrollbarWidth = util.getScrollBarWidth(); + } + + if (this.options.verticalScroll) { + if (this.options.rtl) { + props.left.width = dom.leftContainer.clientWidth || -props.border.left; + props.right.width = dom.rightContainer.clientWidth + props.scrollbarWidth || -props.border.right; + } else { + props.left.width = dom.leftContainer.clientWidth + props.scrollbarWidth || -props.border.left; + props.right.width = dom.rightContainer.clientWidth || -props.border.right; + } + } else { + props.left.width = dom.leftContainer.clientWidth || -props.border.left; + props.right.width = dom.rightContainer.clientWidth || -props.border.right; + } + props.leftContainer.width = props.left.width; - props.right.width = dom.rightContainer.clientWidth || -props.border.right; props.rightContainer.width = props.right.width; var centerWidth = props.root.width - props.left.width - props.right.width - borderRootWidth; props.center.width = centerWidth; @@ -18460,19 +19514,16 @@ return /******/ (function(modules) { // webpackBootstrap // update the scrollTop, feasible range for the offset can be changed // when the height of the Core or of the contents of the center changed - this._updateScrollTop(); + var offset = this._updateScrollTop(); // reposition the scrollable contents - var offset = this.props.scrollTop; if (options.orientation.item != 'top') { offset += Math.max(this.props.centerContainer.height - this.props.center.height - this.props.border.top - this.props.border.bottom, 0); } dom.center.style.left = '0'; dom.center.style.top = offset + 'px'; dom.left.style.left = '0'; - dom.left.style.top = offset + 'px'; dom.right.style.left = '0'; - dom.right.style.top = offset + 'px'; // show shadows when vertical scrolling is available var visibilityTop = this.props.scrollTop == 0 ? 'hidden' : ''; @@ -18484,6 +19535,16 @@ return /******/ (function(modules) { // webpackBootstrap dom.shadowTopRight.style.visibility = visibilityTop; dom.shadowBottomRight.style.visibility = visibilityBottom; + if (this.options.verticalScroll) { + dom.shadowTopRight.style.visibility = "hidden"; + dom.shadowBottomRight.style.visibility = "hidden"; + dom.shadowTopLeft.style.visibility = "hidden"; + dom.shadowBottomLeft.style.visibility = "hidden"; + } else { + dom.left.style.top = offset + 'px'; + dom.right.style.top = offset + 'px'; + } + // enable/disable vertical panning var contentsOverflow = this.props.center.height > this.props.centerContainer.height; this.hammer.get('pan').set({ @@ -18505,6 +19566,7 @@ return /******/ (function(modules) { // webpackBootstrap } else { this.redrawCount = 0; } + this.initialDrawDone = true; //Emit public 'changed' event for UI updates, see issue #1592 @@ -18692,6 +19754,7 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ Core.prototype._onDrag = function (event) { + if (!event) return; // refuse to drag when we where pinching to prevent the timeline make a jump // when releasing the fingers in opposite order from the touch screen if (!this.touch.allowDragging) return; @@ -18701,6 +19764,11 @@ return /******/ (function(modules) { // webpackBootstrap var oldScrollTop = this._getScrollTop(); var newScrollTop = this._setScrollTop(this.touch.initialScrollTop + delta); + if (this.options.verticalScroll) { + this.dom.left.parentNode.scrollTop = -this.props.scrollTop; + this.dom.right.parentNode.scrollTop = -this.props.scrollTop; + } + if (newScrollTop != oldScrollTop) { this.emit("verticalDrag"); } @@ -18763,25 +19831,25 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Core; /***/ }, -/* 34 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); var util = __webpack_require__(1); var DataSet = __webpack_require__(9); var DataView = __webpack_require__(11); - var TimeStep = __webpack_require__(35); - var Component = __webpack_require__(31); - var Group = __webpack_require__(36); - var BackgroundGroup = __webpack_require__(40); - var BoxItem = __webpack_require__(41); - var PointItem = __webpack_require__(42); - var RangeItem = __webpack_require__(38); - var BackgroundItem = __webpack_require__(43); + var TimeStep = __webpack_require__(37); + var Component = __webpack_require__(33); + var Group = __webpack_require__(38); + var BackgroundGroup = __webpack_require__(42); + var BoxItem = __webpack_require__(43); + var PointItem = __webpack_require__(44); + var RangeItem = __webpack_require__(40); + var BackgroundItem = __webpack_require__(45); var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items var BACKGROUND = '__background__'; // reserved group id for background items without group @@ -18798,7 +19866,6 @@ return /******/ (function(modules) { // webpackBootstrap function ItemSet(body, options) { this.body = body; this.defaultOptions = { - rtl: false, type: null, // 'box', 'point', 'range', 'background' orientation: { item: 'bottom' // item orientation: 'top' or 'bottom' @@ -18862,11 +19929,14 @@ return /******/ (function(modules) { // webpackBootstrap vertical: 10 }, axis: 20 - } + }, + + tooltipOnItemUpdateTime: false }; // options is shared by this ItemSet and all its items this.options = util.extend({}, this.defaultOptions); + this.options.rtl = options.rtl; // options for getting items from the DataSet with the correct type this.itemOptions = { @@ -19001,13 +20071,21 @@ return /******/ (function(modules) { // webpackBootstrap // add item on doubletap this.hammer.on('doubletap', this._onAddItem.bind(this)); - this.groupHammer = new Hammer(this.body.dom.leftContainer); + + if (this.options.rtl) { + this.groupHammer = new Hammer(this.body.dom.rightContainer); + } else { + this.groupHammer = new Hammer(this.body.dom.leftContainer); + } this.groupHammer.on('panstart', this._onGroupDragStart.bind(this)); this.groupHammer.on('panmove', this._onGroupDrag.bind(this)); this.groupHammer.on('panend', this._onGroupDragEnd.bind(this)); this.groupHammer.get('pan').set({ threshold: 5, direction: Hammer.DIRECTION_HORIZONTAL }); + this.body.dom.centerContainer.addEventListener('mouseover', this._onMouseOver.bind(this)); + this.body.dom.centerContainer.addEventListener('mouseout', this._onMouseOut.bind(this)); + // attach to the DOM this.show(); }; @@ -19079,7 +20157,7 @@ return /******/ (function(modules) { // webpackBootstrap ItemSet.prototype.setOptions = function (options) { if (options) { // copy all options that we know - var fields = ['type', 'rtl', 'align', 'order', 'stack', 'selectable', 'multiselect', 'itemsAlwaysDraggable', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; + var fields = ['type', 'rtl', 'align', 'order', 'stack', 'selectable', 'multiselect', 'itemsAlwaysDraggable', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap', 'tooltipOnItemUpdateTime']; util.selectiveExtend(fields, this.options, options); if ('orientation' in options) { @@ -19214,7 +20292,11 @@ return /******/ (function(modules) { // webpackBootstrap // show labelset containing labels if (!this.dom.labelSet.parentNode) { - this.body.dom.left.appendChild(this.dom.labelSet); + if (this.options.rtl) { + this.body.dom.right.appendChild(this.dom.labelSet); + } else { + this.body.dom.left.appendChild(this.dom.labelSet); + } } }; @@ -19635,7 +20717,7 @@ return /******/ (function(modules) { // webpackBootstrap ids.forEach(function (id) { var itemData = me.itemsData.get(id, me.itemOptions); var item = me.items[id]; - var type = me._getType(itemData); + var type = itemData ? me._getType(itemData) : null; var constructor = ItemSet.types[type]; var selected; @@ -19652,7 +20734,7 @@ return /******/ (function(modules) { // webpackBootstrap } } - if (!item) { + if (!item && itemData) { // create item if (constructor) { item = new constructor(itemData, me.conversion, me.options); @@ -19959,6 +21041,7 @@ return /******/ (function(modules) { // webpackBootstrap var dragLeftItem = this.touchParams.dragLeftItem; var dragRightItem = this.touchParams.dragRightItem; + this.touchParams.itemIsDragging = true; if (dragLeftItem) { props = { @@ -20016,9 +21099,9 @@ return /******/ (function(modules) { // webpackBootstrap var xAbs = util.getAbsoluteRight(this.dom.frame); var x = xAbs - event.center.x + 10; // plus 10 to compensate for the drag starting as soon as you've moved 10px } else { - var xAbs = util.getAbsoluteLeft(this.dom.frame); - var x = event.center.x - xAbs - 10; // minus 10 to compensate for the drag starting as soon as you've moved 10px - } + var xAbs = util.getAbsoluteLeft(this.dom.frame); + var x = event.center.x - xAbs - 10; // minus 10 to compensate for the drag starting as soon as you've moved 10px + } var time = this.body.util.toTime(x); var scale = this.body.util.getScale(); @@ -20106,8 +21189,8 @@ return /******/ (function(modules) { // webpackBootstrap if (this.options.rtl) { var offset = -(current - initial); // ms } else { - var offset = current - initial; // ms - } + var offset = current - initial; // ms + } var itemData = this._cloneItemData(props.item.data); // clone the data if (props.item.editable === false) { @@ -20232,6 +21315,7 @@ return /******/ (function(modules) { // webpackBootstrap var dataset = this.itemsData.getDataSet(); var itemProps = this.touchParams.itemProps; this.touchParams.itemProps = null; + this.touchParams.itemIsDragging = false; itemProps.forEach(function (props) { var id = props.item.id; @@ -20359,7 +21443,7 @@ return /******/ (function(modules) { // webpackBootstrap orgOffset = 1; continue; } - // found a group (apart from dragged group) that has the wrong position -> switch with the + // found a group (apart from dragged group) that has the wrong position -> switch with the // group at the position where other one should be, fix index arrays and continue else { var slippedPosition = newOrder.indexOf(origOrder[curPos + orgOffset]); @@ -20418,7 +21502,7 @@ return /******/ (function(modules) { // webpackBootstrap break; } - // found a group that has the wrong position -> switch with the + // found a group that has the wrong position -> switch with the // group at the position where other one should be, fix index arrays and continue var slippedPosition = newOrder.indexOf(origOrder[curPos]); var switchGroup = dataset.get(newOrder[curPos]); @@ -20474,6 +21558,28 @@ return /******/ (function(modules) { // webpackBootstrap } }; + /** + * Handle hovering an item + * @param {Event} event + * @private + */ + ItemSet.prototype._onMouseOver = function (event) { + var item = this.itemFromTarget(event); + if (!item) return; + this.body.emitter.emit('itemover', { + item: item.id, + event: event + }); + }; + ItemSet.prototype._onMouseOut = function (event) { + var item = this.itemFromTarget(event); + if (!item) return; + this.body.emitter.emit('itemout', { + item: item.id, + event: event + }); + }; + /** * Handle creation and updates of an item on double tap * @param event @@ -20517,13 +21623,30 @@ return /******/ (function(modules) { // webpackBootstrap content: 'new item' }; - // when default type is a range, add a default end date to the new item - if (this.options.type === 'range') { - var end = this.body.util.toTime(x + this.props.width / 5); - newItemData.end = snap ? snap(end, scale, step) : end; - } + if (event.type == 'drop') { + var itemData = JSON.parse(event.dataTransfer.getData("text/plain")); + newItemData.content = itemData.content; // content is required + newItemData.type = itemData.type || 'box'; + newItemData[this.itemsData._fieldId] = itemData.id || util.randomUUID(); + + if (itemData.type == 'range' || itemData.end && itemData.start) { - newItemData[this.itemsData._fieldId] = util.randomUUID(); + if (!itemData.end) { + var end = this.body.util.toTime(x + this.props.width / 5); + newItemData.end = snap ? snap(end, scale, step) : end; + } else { + newItemData.end = new Date(newItemData.start._i).getTime() + new Date(itemData.end).getTime() - new Date(itemData.start).getTime(); + } + } + } else { + newItemData[this.itemsData._fieldId] = util.randomUUID(); + + // when default type is a range, add a default end date to the new item + if (this.options.type === 'range') { + var end = this.body.util.toTime(x + this.props.width / 5); + newItemData.end = snap ? snap(end, scale, step) : end; + } + } var group = this.groupFromTarget(event); if (group) { @@ -20535,6 +21658,9 @@ return /******/ (function(modules) { // webpackBootstrap this.options.onAdd(newItemData, function (item) { if (item) { me.itemsData.getDataSet().add(item); + if (event.type == 'drop') { + me.setSelection([item.id]); + } // TODO: need to trigger a redraw? } }); @@ -20593,16 +21719,16 @@ return /******/ (function(modules) { // webpackBootstrap } } } else { - // add/remove this item from the current selection - var index = selection.indexOf(item.id); - if (index == -1) { - // item is not yet selected -> select it - selection.push(item.id); - } else { - // item is already selected -> deselect it - selection.splice(index, 1); - } + // add/remove this item from the current selection + var index = selection.indexOf(item.id); + if (index == -1) { + // item is not yet selected -> select it + selection.push(item.id); + } else { + // item is already selected -> deselect it + selection.splice(index, 1); } + } this.setSelection(selection); @@ -20742,13 +21868,13 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = ItemSet; /***/ }, -/* 35 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var moment = __webpack_require__(2); - var DateUtil = __webpack_require__(32); + var DateUtil = __webpack_require__(34); var util = __webpack_require__(1); /** @@ -20840,9 +21966,9 @@ return /******/ (function(modules) { // webpackBootstrap this.moment = moment; // update the date properties, can have a new utcOffset - this.current = this.moment(this.current); - this._start = this.moment(this._start); - this._end = this.moment(this._end); + this.current = this.moment(this.current.valueOf()); + this._start = this.moment(this._start.valueOf()); + this._end = this.moment(this._end.valueOf()); }; /** @@ -21027,6 +22153,11 @@ return /******/ (function(modules) { // webpackBootstrap this.current = this._end.clone(); } + // Reset switches for year, month and day. Will get set to true where appropriate in DateUtil.stepOverHiddenDates + this.switchedDay = false; + this.switchedMonth = false; + this.switchedYear = false; + DateUtil.stepOverHiddenDates(this.moment, this, prev); }; @@ -21203,8 +22334,8 @@ return /******/ (function(modules) { // webpackBootstrap clone.add(1, 'month'); // important: first set Date to 1, after that change the month. } else { - clone.date(1); - } + clone.date(1); + } clone.hours(0); clone.minutes(0); @@ -21285,7 +22416,6 @@ return /******/ (function(modules) { // webpackBootstrap */ TimeStep.prototype.isMajor = function () { if (this.switchedYear == true) { - this.switchedYear = false; switch (this.scale) { case 'year': case 'month': @@ -21300,7 +22430,6 @@ return /******/ (function(modules) { // webpackBootstrap return false; } } else if (this.switchedMonth == true) { - this.switchedMonth = false; switch (this.scale) { case 'weekday': case 'day': @@ -21313,7 +22442,6 @@ return /******/ (function(modules) { // webpackBootstrap return false; } } else if (this.switchedDay == true) { - this.switchedDay = false; switch (this.scale) { case 'millisecond': case 'second': @@ -21358,6 +22486,10 @@ return /******/ (function(modules) { // webpackBootstrap date = this.current; } + if (typeof this.format.minorLabels === "function") { + return this.format.minorLabels(date, this.scale, this.step); + } + var format = this.format.minorLabels[this.scale]; return format && format.length > 0 ? this.moment(date).format(format) : ''; }; @@ -21373,6 +22505,10 @@ return /******/ (function(modules) { // webpackBootstrap date = this.current; } + if (typeof this.format.majorLabels === "function") { + return this.format.majorLabels(date, this.scale, this.step); + } + var format = this.format.majorLabels[this.scale]; return format && format.length > 0 ? this.moment(date).format(format) : ''; }; @@ -21414,28 +22550,22 @@ return /******/ (function(modules) { // webpackBootstrap switch (this.scale) { case 'millisecond': - return even(current.milliseconds()).trim(); + return today(current) + even(current.milliseconds()).trim(); case 'second': - return even(current.seconds()).trim(); + return today(current) + even(current.seconds()).trim(); case 'minute': - return even(current.minutes()).trim(); + return today(current) + even(current.minutes()).trim(); case 'hour': - var hours = current.hours(); - if (this.step == 4) { - hours = hours + '-h' + (hours + 4); - } - return 'vis-h' + hours + today(current) + even(current.hours()); + return 'vis-h' + current.hours() + (this.step == 4 ? '-h' + (current.hours() + 4) : '') + today(current) + even(current.hours()); case 'weekday': return 'vis-' + current.format('dddd').toLowerCase() + today(current) + currentWeek(current) + even(current.date()); case 'day': - var day = current.date(); - var month = current.format('MMMM').toLowerCase(); - return 'vis-day' + day + ' vis-' + month + currentMonth(current) + even(day - 1); + return 'vis-day' + current.date() + ' vis-' + current.format('MMMM').toLowerCase() + today(current) + currentMonth(current) + this.step <= 2 ? today(current) : '' + this.step <= 2 ? ' vis-' + current.format('dddd').toLowerCase() : '' + even(current.date() - 1); case 'month': return 'vis-' + current.format('MMMM').toLowerCase() + currentMonth(current) + even(current.month()); @@ -21452,14 +22582,14 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = TimeStep; /***/ }, -/* 36 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var stack = __webpack_require__(37); - var RangeItem = __webpack_require__(38); + var stack = __webpack_require__(39); + var RangeItem = __webpack_require__(40); /** * @constructor Group @@ -21473,6 +22603,7 @@ return /******/ (function(modules) { // webpackBootstrap this.subgroupIndex = 0; this.subgroupOrderer = data && data.subgroupOrder; this.itemSet = itemSet; + this.isVisible = null; this.dom = {}; this.props = { @@ -21545,8 +22676,11 @@ return /******/ (function(modules) { // webpackBootstrap Group.prototype.setData = function (data) { // update contents var content; + var templateFunction; + if (this.itemSet.options && this.itemSet.options.groupTemplate) { - content = this.itemSet.options.groupTemplate(data); + templateFunction = this.itemSet.options.groupTemplate.bind(this); + content = templateFunction(data, this.dom.inner); } else { content = data && data.content; } @@ -21557,6 +22691,8 @@ return /******/ (function(modules) { // webpackBootstrap this.dom.inner.removeChild(this.dom.inner.firstChild); } this.dom.inner.appendChild(content); + } else if (content instanceof Object) { + templateFunction(data, this.dom.inner); } else if (content !== undefined && content !== null) { this.dom.inner.innerHTML = content; } else { @@ -21634,6 +22770,15 @@ return /******/ (function(modules) { // webpackBootstrap // recalculate the height of the subgroups this._calculateSubGroupHeights(); + this.isVisible = this._isGroupVisible(range, margin); + + // calculate actual size and position + var foreground = this.dom.foreground; + this.top = foreground.offsetTop; + this.right = foreground.offsetLeft; + this.width = foreground.offsetWidth; + + this.isVisible = this._isGroupVisible(range, margin); // reposition visible items vertically if (typeof this.itemSet.options.order === 'function') { // a custom order function @@ -21673,6 +22818,10 @@ return /******/ (function(modules) { // webpackBootstrap } } + if (!this.isVisible && this.height) { + return resized = false; + } + // recalculate the height of the group var height = this._calculateHeight(margin); @@ -21719,6 +22868,15 @@ return /******/ (function(modules) { // webpackBootstrap } }; + /** + * check if group is visible + * @private + */ + Group.prototype._isGroupVisible = function (range, margin) { + var isVisible = this.top <= range.body.domProps.centerContainer.height - range.body.domProps.scrollTop + margin.axis && this.top + this.height + margin.axis >= -range.body.domProps.scrollTop; + return isVisible; + }; + /** * recalculate the height of the group * @param {{item: {horizontal: number, vertical: number}, axis: number}} margin @@ -21924,10 +23082,17 @@ return /******/ (function(modules) { // webpackBootstrap Group.prototype._updateVisibleItems = function (orderedItems, oldVisibleItems, range) { var visibleItems = []; var visibleItemsLookup = {}; // we keep this to quickly look up if an item already exists in the list without using indexOf on visibleItems + if (!this.isVisible && this.groupId != "__background__") { + for (var i = 0; i < oldVisibleItems.length; i++) { + var item = oldVisibleItems[i]; + if (item.displayed) item.hide(); + } + return visibleItems; + } + var interval = (range.end - range.start) / 4; var lowerBound = range.start - interval; var upperBound = range.end + interval; - var item, i; // this function is used to do the binary search. var searchFunction = function searchFunction(value) { @@ -21944,7 +23109,7 @@ return /******/ (function(modules) { // webpackBootstrap // IMPORTANT: this handles the case for the items with startdate before the window and enddate after the window! // also cleans up invisible items. if (oldVisibleItems.length > 0) { - for (i = 0; i < oldVisibleItems.length; i++) { + for (var i = 0; i < oldVisibleItems.length; i++) { this._checkIfVisibleWithReference(oldVisibleItems[i], visibleItems, visibleItemsLookup, range); } } @@ -21975,36 +23140,20 @@ return /******/ (function(modules) { // webpackBootstrap } // finally, we reposition all the visible items. - for (i = 0; i < visibleItems.length; i++) { - item = visibleItems[i]; + for (var i = 0; i < visibleItems.length; i++) { + var item = visibleItems[i]; if (!item.displayed) item.show(); // reposition item horizontally item.repositionX(); } - // debug - //console.log("new line") - //if (this.groupId == null) { - // for (i = 0; i < orderedItems.byStart.length; i++) { - // item = orderedItems.byStart[i].data; - // console.log('start',i,initialPosByStart, item.start.valueOf(), item.content, item.start >= lowerBound && item.start <= upperBound,i == initialPosByStart ? "<------------------- HEREEEE" : "") - // } - // for (i = 0; i < orderedItems.byEnd.length; i++) { - // item = orderedItems.byEnd[i].data; - // console.log('rangeEnd',i,initialPosByEnd, item.end.valueOf(), item.content, item.end >= range.start && item.end <= range.end,i == initialPosByEnd ? "<------------------- HEREEEE" : "") - // } - //} - return visibleItems; }; Group.prototype._traceVisible = function (initialPos, items, visibleItems, visibleItemsLookup, breakCondition) { - var item; - var i; - if (initialPos != -1) { - for (i = initialPos; i >= 0; i--) { - item = items[i]; + for (var i = initialPos; i >= 0; i--) { + var item = items[i]; if (breakCondition(item)) { break; } else { @@ -22015,8 +23164,8 @@ return /******/ (function(modules) { // webpackBootstrap } } - for (i = initialPos + 1; i < items.length; i++) { - item = items[i]; + for (var i = initialPos + 1; i < items.length; i++) { + var item = items[i]; if (breakCondition(item)) { break; } else { @@ -22076,7 +23225,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Group; /***/ }, -/* 37 */ +/* 39 */ /***/ function(module, exports) { 'use strict'; @@ -22204,13 +23353,13 @@ return /******/ (function(modules) { // webpackBootstrap }; /***/ }, -/* 38 */ +/* 40 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Hammer = __webpack_require__(20); - var Item = __webpack_require__(39); + var Hammer = __webpack_require__(22); + var Item = __webpack_require__(41); /** * @constructor RangeItem @@ -22329,7 +23478,10 @@ return /******/ (function(modules) { // webpackBootstrap this.dirty = false; } + + this._repaintOnItemUpdateTimeTooltip(dom.box); this._repaintDeleteButton(dom.box); + this._repaintDragCenter(); this._repaintDragLeft(); this._repaintDragRight(); }; @@ -22385,7 +23537,9 @@ return /******/ (function(modules) { // webpackBootstrap end = 2 * parentWidth; } } - var boxWidth = Math.max(end - start, 1); + + // add 0.5 to compensate floating-point values rounding + var boxWidth = Math.max(end - start + 0.5, 1); if (this.overflow) { if (this.options.rtl) { @@ -22400,14 +23554,14 @@ return /******/ (function(modules) { // webpackBootstrap // a width which will not change when moving the Timeline // So no re-stacking needed, which is nicer for the eye; } else { - if (this.options.rtl) { - this.right = start; - } else { - this.left = start; - } - this.width = boxWidth; - contentWidth = Math.min(end - start, this.props.content.width); + if (this.options.rtl) { + this.right = start; + } else { + this.left = start; } + this.width = boxWidth; + contentWidth = Math.min(end - start, this.props.content.width); + } if (this.options.rtl) { this.dom.box.style.right = this.right + 'px'; @@ -22452,16 +23606,17 @@ return /******/ (function(modules) { // webpackBootstrap contentStartPosition = -contentWidth; // ensure it's not visible anymore } } else { - if (start < 0) { - contentStartPosition = -start; - } else { - contentStartPosition = 0; - } + if (start < 0) { + contentStartPosition = -start; + } else { + contentStartPosition = 0; } + } if (this.options.rtl) { this.dom.content.style.right = contentStartPosition + 'px'; } else { this.dom.content.style.left = contentStartPosition + 'px'; + this.dom.content.style.width = 'calc(100% - ' + contentStartPosition + 'px)'; } } }; @@ -22528,13 +23683,14 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = RangeItem; /***/ }, -/* 39 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); var util = __webpack_require__(1); + var moment = __webpack_require__(2); /** * @constructor Item @@ -22552,7 +23708,6 @@ return /******/ (function(modules) { // webpackBootstrap this.dom = null; this.conversion = conversion || {}; this.options = options || {}; - this.selected = false; this.displayed = false; this.dirty = true; @@ -22631,7 +23786,6 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {boolean} True if visible */ Item.prototype.isVisible = function (range) { - // Should be implemented by Item implementations return false; }; @@ -22710,6 +23864,85 @@ return /******/ (function(modules) { // webpackBootstrap } }; + /** + * Repaint a onChange tooltip on the top right of the item when the item is selected + * @param {HTMLElement} anchor + * @protected + */ + Item.prototype._repaintOnItemUpdateTimeTooltip = function (anchor) { + if (!this.options.tooltipOnItemUpdateTime) return; + + var editable = (this.options.editable.updateTime || this.data.editable === true) && this.data.editable !== false; + + if (this.selected && editable && !this.dom.onItemUpdateTimeTooltip) { + // create and show tooltip + var me = this; + + var onItemUpdateTimeTooltip = document.createElement('div'); + + onItemUpdateTimeTooltip.className = 'vis-onUpdateTime-tooltip'; + anchor.appendChild(onItemUpdateTimeTooltip); + this.dom.onItemUpdateTimeTooltip = onItemUpdateTimeTooltip; + } else if (!this.selected && this.dom.onItemUpdateTimeTooltip) { + // remove button + if (this.dom.onItemUpdateTimeTooltip.parentNode) { + this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip); + } + this.dom.onItemUpdateTimeTooltip = null; + } + + // position onChange tooltip + if (this.dom.onItemUpdateTimeTooltip) { + + // only show when editing + this.dom.onItemUpdateTimeTooltip.style.visibility = this.parent.itemSet.touchParams.itemIsDragging ? 'visible' : 'hidden'; + + // position relative to item's content + if (this.options.rtl) { + this.dom.onItemUpdateTimeTooltip.style.right = this.dom.content.style.right; + } else { + this.dom.onItemUpdateTimeTooltip.style.left = this.dom.content.style.left; + } + + // position above or below the item depending on the item's position in the window + var tooltipOffset = 50; // TODO: should be tooltip height (depends on template) + var scrollTop = this.parent.itemSet.body.domProps.scrollTop; + + // TODO: this.top for orientation:true is actually the items distance from the bottom... + // (should be this.bottom) + var itemDistanceFromTop; + if (this.options.orientation.item == 'top') { + itemDistanceFromTop = this.top; + } else { + itemDistanceFromTop = this.parent.height - this.top - this.height; + } + var isCloseToTop = itemDistanceFromTop + this.parent.top - tooltipOffset < -scrollTop; + + if (isCloseToTop) { + this.dom.onItemUpdateTimeTooltip.style.bottom = ""; + this.dom.onItemUpdateTimeTooltip.style.top = this.height + 2 + "px"; + } else { + this.dom.onItemUpdateTimeTooltip.style.top = ""; + this.dom.onItemUpdateTimeTooltip.style.bottom = this.height + 2 + "px"; + } + + // handle tooltip content + var content; + var templateFunction; + + if (this.options.tooltipOnItemUpdateTime && this.options.tooltipOnItemUpdateTime.template) { + templateFunction = this.options.tooltipOnItemUpdateTime.template.bind(this); + content = templateFunction(this.data); + } else { + content = 'start: ' + moment(this.data.start).format('MM/DD/YYYY hh:mm'); + if (this.data.end) { + content += '
end: ' + moment(this.data.end).format('MM/DD/YYYY hh:mm'); + } + } + this.dom.onItemUpdateTimeTooltip.innerHTML = content; + } + }; + /** * Set HTML contents for the item * @param {Element} element HTML element to fill with the contents @@ -22717,28 +23950,35 @@ return /******/ (function(modules) { // webpackBootstrap */ Item.prototype._updateContents = function (element) { var content; + var templateFunction; + if (this.options.template) { var itemData = this.parent.itemSet.itemsData.get(this.id); // get a clone of the data from the dataset - content = this.options.template(itemData); + templateFunction = this.options.template.bind(this); + content = templateFunction(itemData, element); } else { content = this.data.content; } - var changed = this._contentToString(this.content) !== this._contentToString(content); - if (changed) { - // only replace the content when changed - if (content instanceof Element) { - element.innerHTML = ''; - element.appendChild(content); - } else if (content != undefined) { - element.innerHTML = content; - } else { - if (!(this.data.type == 'background' && this.data.content === undefined)) { - throw new Error('Property "content" missing in item ' + this.id); + if (content instanceof Object && !(content instanceof Element)) { + templateFunction(itemData, element); + } else { + var changed = this._contentToString(this.content) !== this._contentToString(content); + if (changed) { + // only replace the content when changed + if (content instanceof Element) { + element.innerHTML = ''; + element.appendChild(content); + } else if (content != undefined) { + element.innerHTML = content; + } else { + if (!(this.data.type == 'background' && this.data.content === undefined)) { + throw new Error('Property "content" missing in item ' + this.id); + } } - } - this.content = content; + this.content = content; + } } }; @@ -22832,16 +24072,43 @@ return /******/ (function(modules) { // webpackBootstrap return 0; }; + /** + * Repaint a drag area on the center of the item when the item is selected + * @protected + */ + Item.prototype._repaintDragCenter = function () { + if (this.selected && this.options.editable.updateTime && !this.dom.dragCenter) { + // create and show drag area + var dragCenter = document.createElement('div'); + dragCenter.className = 'vis-drag-center'; + dragCenter.dragCenterItem = this; + + if (this.dom.box) { + this.dom.box.appendChild(dragCenter); + } else if (this.dom.point) { + this.dom.point.appendChild(dragCenter); + } + + this.dom.dragCenter = dragCenter; + } else if (!this.selected && this.dom.dragCenter) { + // delete drag area + if (this.dom.dragCenter.parentNode) { + this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter); + } + this.dom.dragCenter = null; + } + }; + module.exports = Item; /***/ }, -/* 40 */ +/* 42 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var Group = __webpack_require__(36); + var Group = __webpack_require__(38); /** * @constructor BackgroundGroup @@ -22899,12 +24166,12 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = BackgroundGroup; /***/ }, -/* 41 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Item = __webpack_require__(39); + var Item = __webpack_require__(41); var util = __webpack_require__(1); /** @@ -22948,9 +24215,20 @@ return /******/ (function(modules) { // webpackBootstrap */ BoxItem.prototype.isVisible = function (range) { // determine visibility - // TODO: account for the real width of the item. Right now we just add 1/4 to the window - var interval = (range.end - range.start) / 4; - return this.data.start > range.start - interval && this.data.start < range.end + interval; + var isVisible; + var align = this.options.align; + var msPerPixel = (range.end - range.start) / range.body.dom.center.clientWidth; + var widthInMs = this.width * msPerPixel; + + if (align == 'right') { + isVisible = this.data.start.getTime() > range.start && this.data.start.getTime() - widthInMs < range.end; + } else if (align == 'left') { + isVisible = this.data.start.getTime() + widthInMs > range.start && this.data.start.getTime() < range.end; + } else { + // default or 'center' + isVisible = this.data.start.getTime() + widthInMs / 2 > range.start && this.data.start.getTime() - widthInMs / 2 < range.end; + } + return isVisible; }; /** @@ -23024,6 +24302,17 @@ return /******/ (function(modules) { // webpackBootstrap dom.line.className = 'vis-item vis-line' + className; dom.dot.className = 'vis-item vis-dot' + className; + // set initial position in the visible range of the grid so that the + // rendered box size can be determinated correctly, even the content + // has a dynamic width (fixes #2032). + var previousRight = dom.box.style.right; + var previousLeft = dom.box.style.left; + if (this.options.rtl) { + dom.box.style.right = "0px"; + } else { + dom.box.style.left = "0px"; + } + // recalculate size this.props.dot.height = dom.dot.offsetHeight; this.props.dot.width = dom.dot.offsetWidth; @@ -23031,9 +24320,18 @@ return /******/ (function(modules) { // webpackBootstrap this.width = dom.box.offsetWidth; this.height = dom.box.offsetHeight; + // restore previous position + if (this.options.rtl) { + dom.box.style.right = previousRight; + } else { + dom.box.style.left = previousLeft; + } + this.dirty = false; } + this._repaintOnItemUpdateTimeTooltip(dom.box); + this._repaintDragCenter(); this._repaintDeleteButton(dom.box); }; @@ -23171,12 +24469,12 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = BoxItem; /***/ }, -/* 42 */ +/* 44 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Item = __webpack_require__(39); + var Item = __webpack_require__(41); /** * @constructor PointItem @@ -23221,9 +24519,10 @@ return /******/ (function(modules) { // webpackBootstrap */ PointItem.prototype.isVisible = function (range) { // determine visibility - // TODO: account for the real width of the item. Right now we just add 1/4 to the window - var interval = (range.end - range.start) / 4; - return this.data.start > range.start - interval && this.data.start < range.end + interval; + var msPerPixel = (range.end - range.start) / range.body.dom.center.clientWidth; + var widthInMs = this.width * msPerPixel; + + return this.data.start.getTime() + widthInMs > range.start && this.data.start < range.end; }; /** @@ -23313,6 +24612,8 @@ return /******/ (function(modules) { // webpackBootstrap this.dirty = false; } + this._repaintOnItemUpdateTimeTooltip(dom.point); + this._repaintDragCenter(); this._repaintDeleteButton(dom.point); }; @@ -23392,15 +24693,15 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = PointItem; /***/ }, -/* 43 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Hammer = __webpack_require__(20); - var Item = __webpack_require__(39); - var BackgroundGroup = __webpack_require__(40); - var RangeItem = __webpack_require__(38); + var Hammer = __webpack_require__(22); + var Item = __webpack_require__(41); + var BackgroundGroup = __webpack_require__(42); + var RangeItem = __webpack_require__(40); /** * @constructor BackgroundItem @@ -23613,17 +24914,17 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = BackgroundItem; /***/ }, -/* 44 */ +/* 46 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var util = __webpack_require__(1); - var Component = __webpack_require__(31); - var TimeStep = __webpack_require__(35); - var DateUtil = __webpack_require__(32); + var Component = __webpack_require__(33); + var TimeStep = __webpack_require__(37); + var DateUtil = __webpack_require__(34); var moment = __webpack_require__(2); /** @@ -24114,14 +25415,14 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = TimeAxis; /***/ }, -/* 45 */ +/* 47 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var keycharm = __webpack_require__(23); + var keycharm = __webpack_require__(25); var Emitter = __webpack_require__(13); - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); var util = __webpack_require__(1); /** @@ -24273,16 +25574,16 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Activator; /***/ }, -/* 46 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); var util = __webpack_require__(1); - var Component = __webpack_require__(31); + var Component = __webpack_require__(33); var moment = __webpack_require__(2); - var locales = __webpack_require__(47); + var locales = __webpack_require__(49); /** * A custom time bar @@ -24398,7 +25699,7 @@ return /******/ (function(modules) { // webpackBootstrap var locale = this.options.locales[this.options.locale]; if (!locale) { if (!this.warned) { - console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline.html#Localization'); + console.log('WARNING: options.locales[\'' + this.options.locale + '\'] not found. See http://visjs.org/docs/timeline/#Localization'); this.warned = true; } locale = this.options.locales['en']; // fall back on english when not available @@ -24524,7 +25825,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = CustomTime; /***/ }, -/* 47 */ +/* 49 */ /***/ function(module, exports) { 'use strict'; @@ -24537,6 +25838,14 @@ return /******/ (function(modules) { // webpackBootstrap exports['en_EN'] = exports['en']; exports['en_US'] = exports['en']; + // Italiano + exports['it'] = { + current: 'attuale', + time: 'tempo' + }; + exports['it_IT'] = exports['it']; + exports['it_CH'] = exports['it']; + // Dutch exports['nl'] = { current: 'huidige', @@ -24545,16 +25854,23 @@ return /******/ (function(modules) { // webpackBootstrap exports['nl_NL'] = exports['nl']; exports['nl_BE'] = exports['nl']; + // German + exports['de'] = { + current: 'Aktuelle', + time: 'Zeit' + }; + exports['de_DE'] = exports['de']; + /***/ }, -/* 48 */ +/* 50 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); - var Component = __webpack_require__(31); + var Component = __webpack_require__(33); var moment = __webpack_require__(2); - var locales = __webpack_require__(47); + var locales = __webpack_require__(49); /** * A current time bar @@ -24729,7 +26045,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = CurrentTime; /***/ }, -/* 49 */ +/* 51 */ /***/ function(module, exports) { 'use strict'; @@ -24765,8 +26081,9 @@ return /******/ (function(modules) { // webpackBootstrap //globals : align: { string: string }, rtl: { boolean: boolean, 'undefined': 'undefined' }, + verticalScroll: { boolean: boolean, 'undefined': 'undefined' }, + horizontalScroll: { boolean: boolean, 'undefined': 'undefined' }, autoResize: { boolean: boolean }, - throttleRedraw: { number: number }, clickToUse: { boolean: boolean }, dataAttributes: { string: string, array: array }, editable: { @@ -24787,7 +26104,7 @@ return /******/ (function(modules) { // webpackBootstrap day: { string: string, 'undefined': 'undefined' }, month: { string: string, 'undefined': 'undefined' }, year: { string: string, 'undefined': 'undefined' }, - __type__: { object: object } + __type__: { object: object, 'function': 'function' } }, majorLabels: { millisecond: { string: string, 'undefined': 'undefined' }, @@ -24798,7 +26115,7 @@ return /******/ (function(modules) { // webpackBootstrap day: { string: string, 'undefined': 'undefined' }, month: { string: string, 'undefined': 'undefined' }, year: { string: string, 'undefined': 'undefined' }, - __type__: { object: object } + __type__: { object: object, 'function': 'function' } }, __type__: { object: object } }, @@ -24864,6 +26181,10 @@ return /******/ (function(modules) { // webpackBootstrap start: { date: date, number: number, string: string, moment: moment }, template: { 'function': 'function' }, groupTemplate: { 'function': 'function' }, + tooltipOnItemUpdateTime: { + template: { 'function': 'function' }, + __type__: { boolean: boolean, object: object } + }, timeAxis: { scale: { string: string, 'undefined': 'undefined' }, step: { number: number, 'undefined': 'undefined' }, @@ -24884,7 +26205,6 @@ return /******/ (function(modules) { // webpackBootstrap align: ['center', 'left', 'right'], direction: false, autoResize: true, - throttleRedraw: [10, 0, 1000, 10], clickToUse: false, // dataAttributes: ['all'], // FIXME: can be 'all' or string[] editable: { @@ -24959,6 +26279,7 @@ return /******/ (function(modules) { // webpackBootstrap // scale: ['millisecond', 'second', 'minute', 'hour', 'weekday', 'day', 'month', 'year'], // step: [1, 1, 10, 1] //}, + tooltipOnItemUpdateTime: false, type: ['box', 'point', 'range', 'background'], width: '100%', zoomable: true, @@ -24972,37 +26293,37 @@ return /******/ (function(modules) { // webpackBootstrap exports.configureOptions = configureOptions; /***/ }, -/* 50 */ +/* 52 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _Configurator = __webpack_require__(26); + var _Configurator = __webpack_require__(28); var _Configurator2 = _interopRequireDefault(_Configurator); - var _Validator = __webpack_require__(29); + var _Validator = __webpack_require__(31); var _Validator2 = _interopRequireDefault(_Validator); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var Emitter = __webpack_require__(13); - var Hammer = __webpack_require__(20); + var Hammer = __webpack_require__(22); var moment = __webpack_require__(2); var util = __webpack_require__(1); var DataSet = __webpack_require__(9); var DataView = __webpack_require__(11); - var Range = __webpack_require__(30); - var Core = __webpack_require__(33); - var TimeAxis = __webpack_require__(44); - var CurrentTime = __webpack_require__(48); - var CustomTime = __webpack_require__(46); - var LineGraph = __webpack_require__(51); + var Range = __webpack_require__(32); + var Core = __webpack_require__(35); + var TimeAxis = __webpack_require__(46); + var CurrentTime = __webpack_require__(50); + var CustomTime = __webpack_require__(48); + var LineGraph = __webpack_require__(53); - var printStyle = __webpack_require__(29).printStyle; - var allOptions = __webpack_require__(59).allOptions; - var configureOptions = __webpack_require__(59).configureOptions; + var printStyle = __webpack_require__(31).printStyle; + var allOptions = __webpack_require__(61).allOptions; + var configureOptions = __webpack_require__(61).configureOptions; /** * Create a timeline visualization @@ -25086,6 +26407,7 @@ return /******/ (function(modules) { // webpackBootstrap this.itemsData = null; // DataSet this.groupsData = null; // DataSet + this.on('tap', function (event) { me.emit('click', me.getEventProperties(event)); }); @@ -25320,24 +26642,24 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Graph2d; /***/ }, -/* 51 */ +/* 53 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var util = __webpack_require__(1); var DOMutil = __webpack_require__(8); var DataSet = __webpack_require__(9); var DataView = __webpack_require__(11); - var Component = __webpack_require__(31); - var DataAxis = __webpack_require__(52); - var GraphGroup = __webpack_require__(54); - var Legend = __webpack_require__(58); - var Bars = __webpack_require__(55); - var Lines = __webpack_require__(57); - var Points = __webpack_require__(56); + var Component = __webpack_require__(33); + var DataAxis = __webpack_require__(54); + var GraphGroup = __webpack_require__(56); + var Legend = __webpack_require__(60); + var Bars = __webpack_require__(57); + var Lines = __webpack_require__(59); + var Points = __webpack_require__(58); var UNGROUPED = '__ungrouped__'; // reserved group id for ungrouped items @@ -26352,15 +27674,15 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = LineGraph; /***/ }, -/* 52 */ +/* 54 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); var DOMutil = __webpack_require__(8); - var Component = __webpack_require__(31); - var DataScale = __webpack_require__(53); + var Component = __webpack_require__(33); + var DataScale = __webpack_require__(55); /** * A horizontal time axis * @param {Object} [options] See DataAxis.setOptions for the available @@ -26556,10 +27878,10 @@ return /******/ (function(modules) { // webpackBootstrap DataAxis.prototype.show = function () { this.hidden = false; if (!this.dom.frame.parentNode) { - if (this.options.rtl) { + if (this.options.orientation === 'left') { this.body.dom.left.appendChild(this.dom.frame); } else { - this.body.dom.left.appendChild(this.dom.frame); + this.body.dom.right.appendChild(this.dom.frame); } } @@ -26912,7 +28234,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = DataAxis; /***/ }, -/* 53 */ +/* 55 */ /***/ function(module, exports) { 'use strict'; @@ -26922,8 +28244,8 @@ return /******/ (function(modules) { // webpackBootstrap */ function DataScale(start, end, autoScaleStart, autoScaleEnd, containerHeight, majorCharHeight) { - var zeroAlign = arguments.length <= 6 || arguments[6] === undefined ? false : arguments[6]; - var formattingFunction = arguments.length <= 7 || arguments[7] === undefined ? false : arguments[7]; + var zeroAlign = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false; + var formattingFunction = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false; this.majorSteps = [1, 2, 5, 10]; this.minorSteps = [0.25, 0.5, 1, 2]; @@ -27064,24 +28386,24 @@ return /******/ (function(modules) { // webpackBootstrap if (other.minorStepIdx <= 1 && this.minorStepIdx <= 1 || other.minorStepIdx > 1 && this.minorStepIdx > 1) { //easy, no need to change stepIdx nor multiplication factor } else if (other.minorStepIdx < this.minorStepIdx) { - //I'm 5, they are 4 per major. - this.minorStepIdx = 1; - if (oldStepIdx == 2) { - increaseMagnitude(); - } else { - increaseMagnitude(); - increaseMagnitude(); - } + //I'm 5, they are 4 per major. + this.minorStepIdx = 1; + if (oldStepIdx == 2) { + increaseMagnitude(); } else { - //I'm 4, they are 5 per major - this.minorStepIdx = 2; - if (oldStepIdx == 1) { - decreaseMagnitude(); - } else { - decreaseMagnitude(); - decreaseMagnitude(); - } + increaseMagnitude(); + increaseMagnitude(); } + } else { + //I'm 4, they are 5 per major + this.minorStepIdx = 2; + if (oldStepIdx == 1) { + decreaseMagnitude(); + } else { + decreaseMagnitude(); + decreaseMagnitude(); + } + } //Get masters stats: var lines = other.getLines(); @@ -27154,18 +28476,18 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = DataScale; /***/ }, -/* 54 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var util = __webpack_require__(1); var DOMutil = __webpack_require__(8); - var Bars = __webpack_require__(55); - var Lines = __webpack_require__(57); - var Points = __webpack_require__(56); + var Bars = __webpack_require__(57); + var Lines = __webpack_require__(59); + var Points = __webpack_require__(58); /** * /** @@ -27317,13 +28639,13 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = GraphGroup; /***/ }, -/* 55 */ +/* 57 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var DOMutil = __webpack_require__(8); - var Points = __webpack_require__(56); + var Points = __webpack_require__(58); function Bargraph(groupId, options) {} @@ -27578,12 +28900,12 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Bargraph; /***/ }, -/* 56 */ +/* 58 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var DOMutil = __webpack_require__(8); @@ -27657,7 +28979,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Points; /***/ }, -/* 57 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -27946,14 +29268,14 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Line; /***/ }, -/* 58 */ +/* 60 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(1); var DOMutil = __webpack_require__(8); - var Component = __webpack_require__(31); + var Component = __webpack_require__(33); /** * Legend for Graph2d @@ -28165,7 +29487,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Legend; /***/ }, -/* 59 */ +/* 61 */ /***/ function(module, exports) { 'use strict'; @@ -28274,7 +29596,6 @@ return /******/ (function(modules) { // webpackBootstrap }, autoResize: { boolean: boolean }, - throttleRedraw: { number: number }, clickToUse: { boolean: boolean }, end: { number: number, date: date, string: string, moment: moment }, format: { @@ -28399,7 +29720,6 @@ return /******/ (function(modules) { // webpackBootstrap }, autoResize: true, - throttleRedraw: [10, 0, 1000, 10], clickToUse: false, end: '', format: { @@ -28451,7 +29771,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.configureOptions = configureOptions; /***/ }, -/* 60 */ +/* 62 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -28466,12 +29786,12 @@ return /******/ (function(modules) { // webpackBootstrap exports.Queue = __webpack_require__(10); // Network - exports.Network = __webpack_require__(61); + exports.Network = __webpack_require__(63); exports.network = { - Images: __webpack_require__(62), - dotparser: __webpack_require__(118), - gephiParser: __webpack_require__(119), - allOptions: __webpack_require__(114) + Images: __webpack_require__(64), + dotparser: __webpack_require__(120), + gephiParser: __webpack_require__(121), + allOptions: __webpack_require__(116) }; exports.network.convertDot = function (input) { return exports.network.dotparser.DOTToGraph(input); @@ -28482,94 +29802,94 @@ return /******/ (function(modules) { // webpackBootstrap // bundled external libraries exports.moment = __webpack_require__(2); - exports.Hammer = __webpack_require__(20); - exports.keycharm = __webpack_require__(23); + exports.Hammer = __webpack_require__(22); + exports.keycharm = __webpack_require__(25); /***/ }, -/* 61 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - var _Images = __webpack_require__(62); + var _Images = __webpack_require__(64); var _Images2 = _interopRequireDefault(_Images); - var _Groups = __webpack_require__(63); + var _Groups = __webpack_require__(65); var _Groups2 = _interopRequireDefault(_Groups); - var _NodesHandler = __webpack_require__(64); + var _NodesHandler = __webpack_require__(66); var _NodesHandler2 = _interopRequireDefault(_NodesHandler); - var _EdgesHandler = __webpack_require__(84); + var _EdgesHandler = __webpack_require__(86); var _EdgesHandler2 = _interopRequireDefault(_EdgesHandler); - var _PhysicsEngine = __webpack_require__(93); + var _PhysicsEngine = __webpack_require__(95); var _PhysicsEngine2 = _interopRequireDefault(_PhysicsEngine); - var _Clustering = __webpack_require__(102); + var _Clustering = __webpack_require__(104); var _Clustering2 = _interopRequireDefault(_Clustering); - var _CanvasRenderer = __webpack_require__(105); + var _CanvasRenderer = __webpack_require__(107); var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer); - var _Canvas = __webpack_require__(106); + var _Canvas = __webpack_require__(108); var _Canvas2 = _interopRequireDefault(_Canvas); - var _View = __webpack_require__(107); + var _View = __webpack_require__(109); var _View2 = _interopRequireDefault(_View); - var _InteractionHandler = __webpack_require__(108); + var _InteractionHandler = __webpack_require__(110); var _InteractionHandler2 = _interopRequireDefault(_InteractionHandler); - var _SelectionHandler = __webpack_require__(111); + var _SelectionHandler = __webpack_require__(113); var _SelectionHandler2 = _interopRequireDefault(_SelectionHandler); - var _LayoutEngine = __webpack_require__(112); + var _LayoutEngine = __webpack_require__(114); var _LayoutEngine2 = _interopRequireDefault(_LayoutEngine); - var _ManipulationSystem = __webpack_require__(113); + var _ManipulationSystem = __webpack_require__(115); var _ManipulationSystem2 = _interopRequireDefault(_ManipulationSystem); - var _Configurator = __webpack_require__(26); + var _Configurator = __webpack_require__(28); var _Configurator2 = _interopRequireDefault(_Configurator); - var _Validator = __webpack_require__(29); + var _Validator = __webpack_require__(31); var _Validator2 = _interopRequireDefault(_Validator); - var _options = __webpack_require__(114); + var _options = __webpack_require__(116); - var _KamadaKawai = __webpack_require__(115); + var _KamadaKawai = __webpack_require__(117); var _KamadaKawai2 = _interopRequireDefault(_KamadaKawai); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // Load custom shapes into CanvasRenderingContext2D - __webpack_require__(117); + __webpack_require__(119); var Emitter = __webpack_require__(13); var util = __webpack_require__(1); var DataSet = __webpack_require__(9); var DataView = __webpack_require__(11); - var dotparser = __webpack_require__(118); - var gephiParser = __webpack_require__(119); - var Activator = __webpack_require__(45); - var locales = __webpack_require__(120); + var dotparser = __webpack_require__(120); + var gephiParser = __webpack_require__(121); + var Activator = __webpack_require__(47); + var locales = __webpack_require__(122); /** * @constructor Network @@ -28853,14 +30173,14 @@ return /******/ (function(modules) { // webpackBootstrap this.setOptions(data && data.options); // set all data if (data && data.dot) { - console.log('The dot property has been depricated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);'); + console.log('The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);'); // parse DOT file var dotData = dotparser.DOTToGraph(data.dot); this.setData(dotData); return; } else if (data && data.gephi) { // parse DOT file - console.log('The gephi property has been depricated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);'); + console.log('The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);'); var gephiData = gephiParser.parseGephi(data.gephi); this.setData(gephiData); return; @@ -29121,7 +30441,7 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = Network; /***/ }, -/* 62 */ +/* 64 */ /***/ function(module, exports) { "use strict"; @@ -29138,7 +30458,6 @@ return /******/ (function(modules) { // webpackBootstrap * @class Images * This class loads images and keeps them stored. */ - var Images = function () { function Images(callback) { _classCallCheck(this, Images); @@ -29216,14 +30535,14 @@ return /******/ (function(modules) { // webpackBootstrap value: function load(url, brokenUrl, id) { var _this2 = this; - //Try and get the image from the cache, if successful then return the cached image + //Try and get the image from the cache, if successful then return the cached image var cachedImage = this.images[url]; if (cachedImage) return cachedImage; //Create a new image var img = new Image(); - //Subscribe to the event that is raised if the image loads successfully + //Subscribe to the event that is raised if the image loads successfully img.onload = function () { //Add the image to the cache and then request a redraw _this2._addImageToCache(url, img); @@ -29251,7 +30570,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Images; /***/ }, -/* 63 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -29395,7 +30714,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Groups; /***/ }, -/* 64 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29406,11 +30725,11 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _Node = __webpack_require__(65); + var _Node = __webpack_require__(67); var _Node2 = _interopRequireDefault(_Node); - var _Label = __webpack_require__(66); + var _Label = __webpack_require__(68); var _Label2 = _interopRequireDefault(_Label); @@ -29609,7 +30928,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function setData(nodes) { var _this3 = this; - var doNotEmit = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var oldNodesData = this.body.data.nodes; @@ -29662,7 +30981,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'add', value: function add(ids) { - var doNotEmit = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var id = void 0; var newNodes = []; @@ -29741,14 +31060,14 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'create', value: function create(properties) { - var constructorClass = arguments.length <= 1 || arguments[1] === undefined ? _Node2.default : arguments[1]; + var constructorClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Node2.default; return new constructorClass(properties, this.body, this.images, this.groups, this.options); } }, { key: 'refresh', value: function refresh() { - var clearPositions = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; + var clearPositions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var nodes = this.body.nodes; for (var nodeId in nodes) { @@ -29920,7 +31239,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = NodesHandler; /***/ }, -/* 65 */ +/* 67 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -29931,67 +31250,67 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _Label = __webpack_require__(66); + var _Label = __webpack_require__(68); var _Label2 = _interopRequireDefault(_Label); - var _Box = __webpack_require__(67); + var _Box = __webpack_require__(69); var _Box2 = _interopRequireDefault(_Box); - var _Circle = __webpack_require__(69); + var _Circle = __webpack_require__(71); var _Circle2 = _interopRequireDefault(_Circle); - var _CircularImage = __webpack_require__(71); + var _CircularImage = __webpack_require__(73); var _CircularImage2 = _interopRequireDefault(_CircularImage); - var _Database = __webpack_require__(72); + var _Database = __webpack_require__(74); var _Database2 = _interopRequireDefault(_Database); - var _Diamond = __webpack_require__(73); + var _Diamond = __webpack_require__(75); var _Diamond2 = _interopRequireDefault(_Diamond); - var _Dot = __webpack_require__(75); + var _Dot = __webpack_require__(77); var _Dot2 = _interopRequireDefault(_Dot); - var _Ellipse = __webpack_require__(76); + var _Ellipse = __webpack_require__(78); var _Ellipse2 = _interopRequireDefault(_Ellipse); - var _Icon = __webpack_require__(77); + var _Icon = __webpack_require__(79); var _Icon2 = _interopRequireDefault(_Icon); - var _Image = __webpack_require__(78); + var _Image = __webpack_require__(80); var _Image2 = _interopRequireDefault(_Image); - var _Square = __webpack_require__(79); + var _Square = __webpack_require__(81); var _Square2 = _interopRequireDefault(_Square); - var _Star = __webpack_require__(80); + var _Star = __webpack_require__(82); var _Star2 = _interopRequireDefault(_Star); - var _Text = __webpack_require__(81); + var _Text = __webpack_require__(83); var _Text2 = _interopRequireDefault(_Text); - var _Triangle = __webpack_require__(82); + var _Triangle = __webpack_require__(84); var _Triangle2 = _interopRequireDefault(_Triangle); - var _TriangleDown = __webpack_require__(83); + var _TriangleDown = __webpack_require__(85); var _TriangleDown2 = _interopRequireDefault(_TriangleDown); - var _Validator = __webpack_require__(29); + var _Validator = __webpack_require__(31); var _Validator2 = _interopRequireDefault(_Validator); @@ -30026,7 +31345,6 @@ return /******/ (function(modules) { // webpackBootstrap * example for the color * */ - var Node = function () { function Node(options, body, imagelist, grouplist, globalOptions) { _classCallCheck(this, Node); @@ -30413,8 +31731,8 @@ return /******/ (function(modules) { // webpackBootstrap }], [{ key: 'parseOptions', value: function parseOptions(parentOptions, newOptions) { - var allowDeletion = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; - var globalOptions = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var fields = ['color', 'font', 'fixed', 'shadow']; util.selectiveNotDeepExtend(fields, parentOptions, newOptions, allowDeletion); @@ -30465,7 +31783,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Node; /***/ }, -/* 66 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30476,7 +31794,7 @@ return /******/ (function(modules) { // webpackBootstrap var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); @@ -30486,7 +31804,7 @@ return /******/ (function(modules) { // webpackBootstrap var Label = function () { function Label(body, options) { - var edgelabel = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var edgelabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; _classCallCheck(this, Label); @@ -30503,7 +31821,7 @@ return /******/ (function(modules) { // webpackBootstrap _createClass(Label, [{ key: 'setOptions', value: function setOptions(options) { - var allowDeletion = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var allowDeletion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; this.nodeOptions = options; @@ -30539,7 +31857,7 @@ return /******/ (function(modules) { // webpackBootstrap * @param baseline */ value: function draw(ctx, x, y, selected) { - var baseline = arguments.length <= 4 || arguments[4] === undefined ? 'middle' : arguments[4]; + var baseline = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'middle'; // if no label, return if (this.nodeOptions.label === undefined) return; @@ -30603,7 +31921,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_drawText', value: function _drawText(ctx, selected, x, y) { - var baseline = arguments.length <= 4 || arguments[4] === undefined ? 'middle' : arguments[4]; + var baseline = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'middle'; var fontSize = this.fontOptions.size; var viewFontSize = fontSize * this.body.view.scale; @@ -30614,16 +31932,12 @@ return /******/ (function(modules) { // webpackBootstrap var yLine = this.size.yLine; - var _getColor2 = this._getColor(viewFontSize); - - var _getColor3 = _slicedToArray(_getColor2, 2); - - var fontColor = _getColor3[0]; - var strokeColor = _getColor3[1]; - + var _getColor2 = this._getColor(viewFontSize), + _getColor3 = _slicedToArray(_getColor2, 2), + fontColor = _getColor3[0], + strokeColor = _getColor3[1]; // configure context for drawing the text - var _setAlignment2 = this._setAlignment(ctx, x, yLine, baseline); var _setAlignment3 = _slicedToArray(_setAlignment2, 2); @@ -30637,8 +31951,8 @@ return /******/ (function(modules) { // webpackBootstrap ctx.textAlign = this.fontOptions.align; x = x - 0.5 * this.size.width; // Shift label 1/2-distance to the left } else { - ctx.textAlign = 'center'; - } + ctx.textAlign = 'center'; + } // set the strokeWidth if (this.fontOptions.strokeWidth > 0) { @@ -30670,11 +31984,11 @@ return /******/ (function(modules) { // webpackBootstrap ctx.textBaseline = 'alphabetic'; yLine -= 2 * lineMargin; // distance from edge, required because we use alphabetic. Alphabetic has less difference between browsers } else if (this.fontOptions.align === 'bottom') { - ctx.textBaseline = 'hanging'; - yLine += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers - } else { - ctx.textBaseline = 'middle'; - } + ctx.textBaseline = 'hanging'; + yLine += 2 * lineMargin; // distance from edge, required because we use hanging. Hanging has less difference between browsers + } else { + ctx.textBaseline = 'middle'; + } } else { ctx.textBaseline = baseline; } @@ -30714,7 +32028,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'getTextSize', value: function getTextSize(ctx) { - var selected = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var selected = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var size = { width: this._processLabel(ctx, selected), @@ -30736,9 +32050,9 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'calculateLabelSize', value: function calculateLabelSize(ctx, selected) { - var x = arguments.length <= 2 || arguments[2] === undefined ? 0 : arguments[2]; - var y = arguments.length <= 3 || arguments[3] === undefined ? 0 : arguments[3]; - var baseline = arguments.length <= 4 || arguments[4] === undefined ? 'middle' : arguments[4]; + var x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var baseline = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'middle'; if (this.labelDirty === true) { this.size.width = this._processLabel(ctx, selected); @@ -30788,7 +32102,7 @@ return /******/ (function(modules) { // webpackBootstrap }], [{ key: 'parseOptions', value: function parseOptions(parentOptions, newOptions) { - var allowDeletion = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; if (typeof newOptions.font === 'string') { var newOptionsArray = newOptions.font.split(" "); @@ -30808,7 +32122,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Label; /***/ }, -/* 67 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -30819,7 +32133,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NodeBase2 = __webpack_require__(68); + var _NodeBase2 = __webpack_require__(70); var _NodeBase3 = _interopRequireDefault(_NodeBase2); @@ -30837,7 +32151,7 @@ return /******/ (function(modules) { // webpackBootstrap function Box(options, body, labelModule) { _classCallCheck(this, Box); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Box).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Box.__proto__ || Object.getPrototypeOf(Box)).call(this, options, body, labelModule)); } _createClass(Box, [{ @@ -30922,7 +32236,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Box; /***/ }, -/* 68 */ +/* 70 */ /***/ function(module, exports) { "use strict"; @@ -31018,7 +32332,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = NodeBase; /***/ }, -/* 69 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31029,7 +32343,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _CircleImageBase2 = __webpack_require__(70); + var _CircleImageBase2 = __webpack_require__(72); var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); @@ -31047,7 +32361,7 @@ return /******/ (function(modules) { // webpackBootstrap function Circle(options, body, labelModule) { _classCallCheck(this, Circle); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Circle).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Circle.__proto__ || Object.getPrototypeOf(Circle)).call(this, options, body, labelModule)); } _createClass(Circle, [{ @@ -31103,7 +32417,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Circle; /***/ }, -/* 70 */ +/* 72 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31114,7 +32428,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NodeBase2 = __webpack_require__(68); + var _NodeBase2 = __webpack_require__(70); var _NodeBase3 = _interopRequireDefault(_NodeBase2); @@ -31132,7 +32446,7 @@ return /******/ (function(modules) { // webpackBootstrap function CircleImageBase(options, body, labelModule) { _classCallCheck(this, CircleImageBase); - var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(CircleImageBase).call(this, options, body, labelModule)); + var _this = _possibleConstructorReturn(this, (CircleImageBase.__proto__ || Object.getPrototypeOf(CircleImageBase)).call(this, options, body, labelModule)); _this.labelOffset = 0; _this.imageLoaded = false; @@ -31304,7 +32618,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = CircleImageBase; /***/ }, -/* 71 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31315,7 +32629,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _CircleImageBase2 = __webpack_require__(70); + var _CircleImageBase2 = __webpack_require__(72); var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); @@ -31333,7 +32647,7 @@ return /******/ (function(modules) { // webpackBootstrap function CircularImage(options, body, labelModule, imageObj) { _classCallCheck(this, CircularImage); - var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(CircularImage).call(this, options, body, labelModule)); + var _this = _possibleConstructorReturn(this, (CircularImage.__proto__ || Object.getPrototypeOf(CircularImage)).call(this, options, body, labelModule)); _this.imageObj = imageObj; _this._swapToImageResizeWhenImageLoaded = true; @@ -31411,7 +32725,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = CircularImage; /***/ }, -/* 72 */ +/* 74 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31422,7 +32736,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NodeBase2 = __webpack_require__(68); + var _NodeBase2 = __webpack_require__(70); var _NodeBase3 = _interopRequireDefault(_NodeBase2); @@ -31440,7 +32754,7 @@ return /******/ (function(modules) { // webpackBootstrap function Database(options, body, labelModule) { _classCallCheck(this, Database); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Database).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Database.__proto__ || Object.getPrototypeOf(Database)).call(this, options, body, labelModule)); } _createClass(Database, [{ @@ -31520,7 +32834,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Database; /***/ }, -/* 73 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31531,7 +32845,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _ShapeBase2 = __webpack_require__(74); + var _ShapeBase2 = __webpack_require__(76); var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); @@ -31549,7 +32863,7 @@ return /******/ (function(modules) { // webpackBootstrap function Diamond(options, body, labelModule) { _classCallCheck(this, Diamond); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Diamond).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Diamond.__proto__ || Object.getPrototypeOf(Diamond)).call(this, options, body, labelModule)); } _createClass(Diamond, [{ @@ -31575,7 +32889,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Diamond; /***/ }, -/* 74 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31586,7 +32900,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NodeBase2 = __webpack_require__(68); + var _NodeBase2 = __webpack_require__(70); var _NodeBase3 = _interopRequireDefault(_NodeBase2); @@ -31604,7 +32918,7 @@ return /******/ (function(modules) { // webpackBootstrap function ShapeBase(options, body, labelModule) { _classCallCheck(this, ShapeBase); - return _possibleConstructorReturn(this, Object.getPrototypeOf(ShapeBase).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (ShapeBase.__proto__ || Object.getPrototypeOf(ShapeBase)).call(this, options, body, labelModule)); } _createClass(ShapeBase, [{ @@ -31682,7 +32996,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = ShapeBase; /***/ }, -/* 75 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31693,7 +33007,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _ShapeBase2 = __webpack_require__(74); + var _ShapeBase2 = __webpack_require__(76); var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); @@ -31711,7 +33025,7 @@ return /******/ (function(modules) { // webpackBootstrap function Dot(options, body, labelModule) { _classCallCheck(this, Dot); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Dot).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Dot.__proto__ || Object.getPrototypeOf(Dot)).call(this, options, body, labelModule)); } _createClass(Dot, [{ @@ -31738,7 +33052,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Dot; /***/ }, -/* 76 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31749,7 +33063,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NodeBase2 = __webpack_require__(68); + var _NodeBase2 = __webpack_require__(70); var _NodeBase3 = _interopRequireDefault(_NodeBase2); @@ -31767,7 +33081,7 @@ return /******/ (function(modules) { // webpackBootstrap function Ellipse(options, body, labelModule) { _classCallCheck(this, Ellipse); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Ellipse).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Ellipse.__proto__ || Object.getPrototypeOf(Ellipse)).call(this, options, body, labelModule)); } _createClass(Ellipse, [{ @@ -31776,11 +33090,8 @@ return /******/ (function(modules) { // webpackBootstrap if (this.width === undefined) { var textSize = this.labelModule.getTextSize(ctx, selected); - this.width = textSize.width * 1.5; this.height = textSize.height * 2; - if (this.width < this.height) { - this.width = this.height; - } + this.width = textSize.width + this.height; this.radius = 0.5 * this.width; } } @@ -31856,7 +33167,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Ellipse; /***/ }, -/* 77 */ +/* 79 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31867,7 +33178,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NodeBase2 = __webpack_require__(68); + var _NodeBase2 = __webpack_require__(70); var _NodeBase3 = _interopRequireDefault(_NodeBase2); @@ -31885,7 +33196,7 @@ return /******/ (function(modules) { // webpackBootstrap function Icon(options, body, labelModule) { _classCallCheck(this, Icon); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Icon).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Icon.__proto__ || Object.getPrototypeOf(Icon)).call(this, options, body, labelModule)); } _createClass(Icon, [{ @@ -31970,7 +33281,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Icon; /***/ }, -/* 78 */ +/* 80 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -31981,7 +33292,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _CircleImageBase2 = __webpack_require__(70); + var _CircleImageBase2 = __webpack_require__(72); var _CircleImageBase3 = _interopRequireDefault(_CircleImageBase2); @@ -31999,7 +33310,7 @@ return /******/ (function(modules) { // webpackBootstrap function Image(options, body, labelModule, imageObj) { _classCallCheck(this, Image); - var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Image).call(this, options, body, labelModule)); + var _this = _possibleConstructorReturn(this, (Image.__proto__ || Object.getPrototypeOf(Image)).call(this, options, body, labelModule)); _this.imageObj = imageObj; return _this; @@ -32087,7 +33398,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Image; /***/ }, -/* 79 */ +/* 81 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32098,7 +33409,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _ShapeBase2 = __webpack_require__(74); + var _ShapeBase2 = __webpack_require__(76); var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); @@ -32116,7 +33427,7 @@ return /******/ (function(modules) { // webpackBootstrap function Square(options, body, labelModule) { _classCallCheck(this, Square); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Square).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Square.__proto__ || Object.getPrototypeOf(Square)).call(this, options, body, labelModule)); } _createClass(Square, [{ @@ -32142,7 +33453,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Square; /***/ }, -/* 80 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32153,7 +33464,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _ShapeBase2 = __webpack_require__(74); + var _ShapeBase2 = __webpack_require__(76); var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); @@ -32171,7 +33482,7 @@ return /******/ (function(modules) { // webpackBootstrap function Star(options, body, labelModule) { _classCallCheck(this, Star); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Star).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Star.__proto__ || Object.getPrototypeOf(Star)).call(this, options, body, labelModule)); } _createClass(Star, [{ @@ -32197,7 +33508,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Star; /***/ }, -/* 81 */ +/* 83 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32208,7 +33519,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NodeBase2 = __webpack_require__(68); + var _NodeBase2 = __webpack_require__(70); var _NodeBase3 = _interopRequireDefault(_NodeBase2); @@ -32226,7 +33537,7 @@ return /******/ (function(modules) { // webpackBootstrap function Text(options, body, labelModule) { _classCallCheck(this, Text); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Text).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, options, body, labelModule)); } _createClass(Text, [{ @@ -32282,7 +33593,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Text; /***/ }, -/* 82 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32293,7 +33604,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _ShapeBase2 = __webpack_require__(74); + var _ShapeBase2 = __webpack_require__(76); var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); @@ -32311,7 +33622,7 @@ return /******/ (function(modules) { // webpackBootstrap function Triangle(options, body, labelModule) { _classCallCheck(this, Triangle); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Triangle).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (Triangle.__proto__ || Object.getPrototypeOf(Triangle)).call(this, options, body, labelModule)); } _createClass(Triangle, [{ @@ -32337,7 +33648,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Triangle; /***/ }, -/* 83 */ +/* 85 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32348,7 +33659,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _ShapeBase2 = __webpack_require__(74); + var _ShapeBase2 = __webpack_require__(76); var _ShapeBase3 = _interopRequireDefault(_ShapeBase2); @@ -32366,7 +33677,7 @@ return /******/ (function(modules) { // webpackBootstrap function TriangleDown(options, body, labelModule) { _classCallCheck(this, TriangleDown); - return _possibleConstructorReturn(this, Object.getPrototypeOf(TriangleDown).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (TriangleDown.__proto__ || Object.getPrototypeOf(TriangleDown)).call(this, options, body, labelModule)); } _createClass(TriangleDown, [{ @@ -32392,7 +33703,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = TriangleDown; /***/ }, -/* 84 */ +/* 86 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32403,11 +33714,11 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _Edge = __webpack_require__(85); + var _Edge = __webpack_require__(87); var _Edge2 = _interopRequireDefault(_Edge); - var _Label = __webpack_require__(66); + var _Label = __webpack_require__(68); var _Label2 = _interopRequireDefault(_Label); @@ -32447,9 +33758,9 @@ return /******/ (function(modules) { // webpackBootstrap this.options = {}; this.defaultOptions = { arrows: { - to: { enabled: false, scaleFactor: 1 }, // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1} - middle: { enabled: false, scaleFactor: 1 }, - from: { enabled: false, scaleFactor: 1 } + to: { enabled: false, scaleFactor: 1, type: 'arrow' }, // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1} + middle: { enabled: false, scaleFactor: 1, type: 'arrow' }, + from: { enabled: false, scaleFactor: 1, type: 'arrow' } }, arrowStrikethrough: true, color: { @@ -32629,7 +33940,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function setData(edges) { var _this3 = this; - var doNotEmit = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var oldEdgesData = this.body.data.edges; @@ -32681,7 +33992,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'add', value: function add(ids) { - var doNotEmit = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var doNotEmit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var edges = this.body.edges; var edgesData = this.body.data.edges; @@ -32838,7 +34149,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = EdgesHandler; /***/ }, -/* 85 */ +/* 87 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -32847,27 +34158,27 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _Label = __webpack_require__(66); + var _Label = __webpack_require__(68); var _Label2 = _interopRequireDefault(_Label); - var _CubicBezierEdge = __webpack_require__(86); + var _CubicBezierEdge = __webpack_require__(88); var _CubicBezierEdge2 = _interopRequireDefault(_CubicBezierEdge); - var _BezierEdgeDynamic = __webpack_require__(90); + var _BezierEdgeDynamic = __webpack_require__(92); var _BezierEdgeDynamic2 = _interopRequireDefault(_BezierEdgeDynamic); - var _BezierEdgeStatic = __webpack_require__(91); + var _BezierEdgeStatic = __webpack_require__(93); var _BezierEdgeStatic2 = _interopRequireDefault(_BezierEdgeStatic); - var _StraightEdge = __webpack_require__(92); + var _StraightEdge = __webpack_require__(94); var _StraightEdge2 = _interopRequireDefault(_StraightEdge); @@ -32892,7 +34203,6 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} constants An object with default values for * example for the color */ - var Edge = function () { function Edge(options, body, globalOptions) { _classCallCheck(this, Edge); @@ -32980,7 +34290,6 @@ return /******/ (function(modules) { // webpackBootstrap } }, { key: 'updateLabelModule', - // set the object back to the global options /** @@ -33350,8 +34659,8 @@ return /******/ (function(modules) { // webpackBootstrap }], [{ key: 'parseOptions', value: function parseOptions(parentOptions, newOptions) { - var allowDeletion = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; - var globalOptions = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3]; + var allowDeletion = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var globalOptions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var fields = ['arrowStrikethrough', 'id', 'from', 'hidden', 'hoverWidth', 'label', 'labelHighlightBold', 'length', 'line', 'opacity', 'physics', 'scaling', 'selectionWidth', 'selfReferenceSize', 'to', 'title', 'value', 'width']; @@ -33437,7 +34746,7 @@ return /******/ (function(modules) { // webpackBootstrap if (newOptions.font !== undefined && newOptions.font !== null) { _Label2.default.parseOptions(parentOptions.font, newOptions); } else if (allowDeletion === true && newOptions.font === null) { - parentOptions.font = util.bridgeObject(globalOptions.font); + parentOptions.font = util.bridgeObject(globalOptions.font); // set the object back to the global options } } }]); @@ -33448,7 +34757,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Edge; /***/ }, -/* 86 */ +/* 88 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -33461,7 +34770,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _CubicBezierEdgeBase2 = __webpack_require__(87); + var _CubicBezierEdgeBase2 = __webpack_require__(89); var _CubicBezierEdgeBase3 = _interopRequireDefault(_CubicBezierEdgeBase2); @@ -33479,7 +34788,7 @@ return /******/ (function(modules) { // webpackBootstrap function CubicBezierEdge(options, body, labelModule) { _classCallCheck(this, CubicBezierEdge); - return _possibleConstructorReturn(this, Object.getPrototypeOf(CubicBezierEdge).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (CubicBezierEdge.__proto__ || Object.getPrototypeOf(CubicBezierEdge)).call(this, options, body, labelModule)); } /** @@ -33551,12 +34860,11 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_getDistanceToEdge', value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { - var _ref = arguments.length <= 6 || arguments[6] === undefined ? this._getViaCoordinates() : arguments[6]; - - var _ref2 = _slicedToArray(_ref, 2); + var _ref = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(), + _ref2 = _slicedToArray(_ref, 2), + via1 = _ref2[0], + via2 = _ref2[1]; - var via1 = _ref2[0]; - var via2 = _ref2[1]; // x3,y3 is the point return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, via1, via2); } @@ -33572,12 +34880,10 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'getPoint', value: function getPoint(percentage) { - var _ref3 = arguments.length <= 1 || arguments[1] === undefined ? this._getViaCoordinates() : arguments[1]; - - var _ref4 = _slicedToArray(_ref3, 2); - - var via1 = _ref4[0]; - var via2 = _ref4[1]; + var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(), + _ref4 = _slicedToArray(_ref3, 2), + via1 = _ref4[0], + via2 = _ref4[1]; var t = percentage; var vec = []; @@ -33598,7 +34904,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = CubicBezierEdge; /***/ }, -/* 87 */ +/* 89 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -33609,7 +34915,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _BezierEdgeBase2 = __webpack_require__(88); + var _BezierEdgeBase2 = __webpack_require__(90); var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); @@ -33627,7 +34933,7 @@ return /******/ (function(modules) { // webpackBootstrap function CubicBezierEdgeBase(options, body, labelModule) { _classCallCheck(this, CubicBezierEdgeBase); - return _possibleConstructorReturn(this, Object.getPrototypeOf(CubicBezierEdgeBase).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (CubicBezierEdgeBase.__proto__ || Object.getPrototypeOf(CubicBezierEdgeBase)).call(this, options, body, labelModule)); } /** @@ -33684,7 +34990,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = CubicBezierEdgeBase; /***/ }, -/* 88 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -33695,7 +35001,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _EdgeBase2 = __webpack_require__(89); + var _EdgeBase2 = __webpack_require__(91); var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); @@ -33713,7 +35019,7 @@ return /******/ (function(modules) { // webpackBootstrap function BezierEdgeBase(options, body, labelModule) { _classCallCheck(this, BezierEdgeBase); - return _possibleConstructorReturn(this, Object.getPrototypeOf(BezierEdgeBase).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (BezierEdgeBase.__proto__ || Object.getPrototypeOf(BezierEdgeBase)).call(this, options, body, labelModule)); } /** @@ -33734,7 +35040,7 @@ return /******/ (function(modules) { // webpackBootstrap _createClass(BezierEdgeBase, [{ key: '_findBorderPositionBezier', value: function _findBorderPositionBezier(nearNode, ctx) { - var viaNode = arguments.length <= 2 || arguments[2] === undefined ? this._getViaCoordinates() : arguments[2]; + var viaNode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._getViaCoordinates(); var maxIterations = 10; var iteration = 0; @@ -33760,19 +35066,19 @@ return /******/ (function(modules) { // webpackBootstrap if (Math.abs(difference) < threshold) { break; // found } else if (difference < 0) { - // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. - if (from === false) { - low = middle; - } else { - high = middle; - } + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (from === false) { + low = middle; } else { - if (from === false) { - high = middle; - } else { - low = middle; - } + high = middle; + } + } else { + if (from === false) { + high = middle; + } else { + low = middle; } + } iteration++; } @@ -33828,7 +35134,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = BezierEdgeBase; /***/ }, -/* 89 */ +/* 91 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -33909,13 +35215,11 @@ return /******/ (function(modules) { // webpackBootstrap // draw line this._line(ctx, viaNode, fromPoint, toPoint); } else { - var _getCircleData2 = this._getCircleData(ctx); - - var _getCircleData3 = _slicedToArray(_getCircleData2, 3); - - var x = _getCircleData3[0]; - var y = _getCircleData3[1]; - var radius = _getCircleData3[2]; + var _getCircleData2 = this._getCircleData(ctx), + _getCircleData3 = _slicedToArray(_getCircleData2, 3), + x = _getCircleData3[0], + y = _getCircleData3[1], + radius = _getCircleData3[2]; this._circle(ctx, x, y, radius); } @@ -33942,13 +35246,11 @@ return /******/ (function(modules) { // webpackBootstrap // draw line this._line(ctx, viaNode); } else { - var _getCircleData4 = this._getCircleData(ctx); - - var _getCircleData5 = _slicedToArray(_getCircleData4, 3); - - var x = _getCircleData5[0]; - var y = _getCircleData5[1]; - var radius = _getCircleData5[2]; + var _getCircleData4 = this._getCircleData(ctx), + _getCircleData5 = _slicedToArray(_getCircleData4, 3), + x = _getCircleData5[0], + y = _getCircleData5[1], + radius = _getCircleData5[2]; this._circle(ctx, x, y, radius); } @@ -33963,13 +35265,11 @@ return /******/ (function(modules) { // webpackBootstrap // draw line ctx.dashedLine(this.from.x, this.from.y, this.to.x, this.to.y, pattern); } else { - var _getCircleData6 = this._getCircleData(ctx); - - var _getCircleData7 = _slicedToArray(_getCircleData6, 3); - - var _x = _getCircleData7[0]; - var _y = _getCircleData7[1]; - var _radius = _getCircleData7[2]; + var _getCircleData6 = this._getCircleData(ctx), + _getCircleData7 = _slicedToArray(_getCircleData6, 3), + _x = _getCircleData7[0], + _y = _getCircleData7[1], + _radius = _getCircleData7[2]; this._circle(ctx, _x, _y, _radius); } @@ -34000,14 +35300,11 @@ return /******/ (function(modules) { // webpackBootstrap from = this._findBorderPosition(this.from, ctx); to = this._findBorderPosition(this.to, ctx); } else { - var _getCircleData8 = this._getCircleData(ctx); - - var _getCircleData9 = _slicedToArray(_getCircleData8, 3); - - var x = _getCircleData9[0]; - var y = _getCircleData9[1]; - var radius = _getCircleData9[2]; - + var _getCircleData8 = this._getCircleData(ctx), + _getCircleData9 = _slicedToArray(_getCircleData8, 3), + x = _getCircleData9[0], + y = _getCircleData9[1], + radius = _getCircleData9[2]; from = this._findBorderPositionCircle(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); to = this._findBorderPositionCircle(this.from, ctx, { x: x, y: y, low: 0.6, high: 0.8, direction: 1 }); @@ -34099,19 +35396,19 @@ return /******/ (function(modules) { // webpackBootstrap if (Math.abs(difference) < threshold) { break; // found } else if (difference > 0) { - // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. - if (direction > 0) { - low = middle; - } else { - high = middle; - } + // distance to nodes is larger than distance to border --> t needs to be bigger if we're looking at the to node. + if (direction > 0) { + low = middle; } else { - if (direction > 0) { - high = middle; - } else { - low = middle; - } + high = middle; + } + } else { + if (direction > 0) { + high = middle; + } else { + low = middle; } + } iteration++; } pos.t = middle; @@ -34242,13 +35539,11 @@ return /******/ (function(modules) { // webpackBootstrap if (this.from != this.to) { returnValue = this._getDistanceToEdge(x1, y1, x2, y2, x3, y3, via); } else { - var _getCircleData10 = this._getCircleData(); - - var _getCircleData11 = _slicedToArray(_getCircleData10, 3); - - var x = _getCircleData11[0]; - var y = _getCircleData11[1]; - var radius = _getCircleData11[2]; + var _getCircleData10 = this._getCircleData(), + _getCircleData11 = _slicedToArray(_getCircleData10, 3), + x = _getCircleData11[0], + y = _getCircleData11[1], + radius = _getCircleData11[2]; var dx = x - x3; var dy = y - y3; @@ -34306,6 +35601,7 @@ return /******/ (function(modules) { // webpackBootstrap var node2 = void 0; var guideOffset = void 0; var scaleFactor = void 0; + var type = void 0; var lineWidth = this.getLineWidth(selected, hover); if (position === 'from') { @@ -34313,15 +35609,18 @@ return /******/ (function(modules) { // webpackBootstrap node2 = this.to; guideOffset = 0.1; scaleFactor = this.options.arrows.from.scaleFactor; + type = this.options.arrows.from.type; } else if (position === 'to') { node1 = this.to; node2 = this.from; guideOffset = -0.1; scaleFactor = this.options.arrows.to.scaleFactor; + type = this.options.arrows.to.type; } else { node1 = this.to; node2 = this.from; scaleFactor = this.options.arrows.middle.scaleFactor; + type = this.options.arrows.middle.type; } // if not connected to itself @@ -34341,28 +35640,24 @@ return /******/ (function(modules) { // webpackBootstrap arrowPoint = this.getPoint(0.5, viaNode); // this is 0.6 to account for the size of the arrow. } } else { - // draw circle - - var _getCircleData12 = this._getCircleData(ctx); - - var _getCircleData13 = _slicedToArray(_getCircleData12, 3); - - var x = _getCircleData13[0]; - var y = _getCircleData13[1]; - var radius = _getCircleData13[2]; - - - if (position === 'from') { - arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); - angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; - } else if (position === 'to') { - arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.6, high: 1.0, direction: 1 }); - angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; - } else { - arrowPoint = this._pointOnCircle(x, y, radius, 0.175); - angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; - } + // draw circle + var _getCircleData12 = this._getCircleData(ctx), + _getCircleData13 = _slicedToArray(_getCircleData12, 3), + x = _getCircleData13[0], + y = _getCircleData13[1], + radius = _getCircleData13[2]; + + if (position === 'from') { + arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.25, high: 0.6, direction: -1 }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; + } else if (position === 'to') { + arrowPoint = this.findBorderPosition(this.from, ctx, { x: x, y: y, low: 0.6, high: 1.0, direction: 1 }); + angle = arrowPoint.t * -2 * Math.PI + 1.5 * Math.PI - 1.1 * Math.PI; + } else { + arrowPoint = this._pointOnCircle(x, y, radius, 0.175); + angle = 3.9269908169872414; // === 0.175 * -2 * Math.PI + 1.5 * Math.PI + 0.1 * Math.PI; } + } var length = 15 * scaleFactor + 3 * lineWidth; // 3* lineWidth is the width of the edge. @@ -34370,7 +35665,7 @@ return /******/ (function(modules) { // webpackBootstrap var yi = arrowPoint.y - length * 0.9 * Math.sin(angle); var arrowCore = { x: xi, y: yi }; - return { point: arrowPoint, core: arrowCore, angle: angle, length: length }; + return { point: arrowPoint, core: arrowCore, angle: angle, length: length, type: type }; } /** @@ -34389,8 +35684,13 @@ return /******/ (function(modules) { // webpackBootstrap ctx.fillStyle = ctx.strokeStyle; ctx.lineWidth = this.getLineWidth(selected, hover); - // draw arrow at the end of the line - ctx.arrow(arrowData.point.x, arrowData.point.y, arrowData.angle, arrowData.length); + if (arrowData.type && arrowData.type.toLowerCase() === 'circle') { + // draw circle at the end of the line + ctx.circleEndpoint(arrowData.point.x, arrowData.point.y, arrowData.angle, arrowData.length); + } else { + // draw arrow at the end of the line + ctx.arrowEndpoint(arrowData.point.x, arrowData.point.y, arrowData.angle, arrowData.length); + } // draw shadow if enabled this.enableShadow(ctx); @@ -34426,7 +35726,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = EdgeBase; /***/ }, -/* 90 */ +/* 92 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -34435,9 +35735,11 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _BezierEdgeBase2 = __webpack_require__(88); + var _BezierEdgeBase2 = __webpack_require__(90); var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); @@ -34456,8 +35758,7 @@ return /******/ (function(modules) { // webpackBootstrap _classCallCheck(this, BezierEdgeDynamic); // --> this calls the setOptions below - - var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(BezierEdgeDynamic).call(this, options, body, labelModule)); + var _this = _possibleConstructorReturn(this, (BezierEdgeDynamic.__proto__ || Object.getPrototypeOf(BezierEdgeDynamic)).call(this, options, body, labelModule)); //this.via = undefined; // Here for completeness but not allowed to defined before super() is invoked. @@ -34604,11 +35905,25 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: "getPoint", value: function getPoint(percentage) { - var viaNode = arguments.length <= 1 || arguments[1] === undefined ? this.via : arguments[1]; + var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.via; var t = percentage; - var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; - var y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; + var x = void 0, + y = void 0; + if (this.from === this.to) { + var _getCircleData = this._getCircleData(this.from), + _getCircleData2 = _slicedToArray(_getCircleData, 3), + cx = _getCircleData2[0], + cy = _getCircleData2[1], + cr = _getCircleData2[2]; + + var a = 2 * Math.PI * (1 - t); + x = cx + cr * Math.sin(a); + y = cy + cr - cr * (1 - Math.cos(a)); + } else { + x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; + y = Math.pow(1 - t, 2) * this.fromPoint.y + 2 * t * (1 - t) * viaNode.y + Math.pow(t, 2) * this.toPoint.y; + } return { x: x, y: y }; } @@ -34631,7 +35946,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = BezierEdgeDynamic; /***/ }, -/* 91 */ +/* 93 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -34642,7 +35957,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _BezierEdgeBase2 = __webpack_require__(88); + var _BezierEdgeBase2 = __webpack_require__(90); var _BezierEdgeBase3 = _interopRequireDefault(_BezierEdgeBase2); @@ -34660,7 +35975,7 @@ return /******/ (function(modules) { // webpackBootstrap function BezierEdgeStatic(options, body, labelModule) { _classCallCheck(this, BezierEdgeStatic); - return _possibleConstructorReturn(this, Object.getPrototypeOf(BezierEdgeStatic).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (BezierEdgeStatic.__proto__ || Object.getPrototypeOf(BezierEdgeStatic)).call(this, options, body, labelModule)); } /** @@ -34860,14 +36175,14 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_findBorderPosition', value: function _findBorderPosition(nearNode, ctx) { - var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; return this._findBorderPositionBezier(nearNode, ctx, options.via); } }, { key: '_getDistanceToEdge', value: function _getDistanceToEdge(x1, y1, x2, y2, x3, y3) { - var viaNode = arguments.length <= 6 || arguments[6] === undefined ? this._getViaCoordinates() : arguments[6]; + var viaNode = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : this._getViaCoordinates(); // x3,y3 is the point return this._getDistanceToBezierEdge(x1, y1, x2, y2, x3, y3, viaNode); } @@ -34883,7 +36198,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'getPoint', value: function getPoint(percentage) { - var viaNode = arguments.length <= 1 || arguments[1] === undefined ? this._getViaCoordinates() : arguments[1]; + var viaNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this._getViaCoordinates(); var t = percentage; var x = Math.pow(1 - t, 2) * this.fromPoint.x + 2 * t * (1 - t) * viaNode.x + Math.pow(t, 2) * this.toPoint.x; @@ -34899,7 +36214,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = BezierEdgeStatic; /***/ }, -/* 92 */ +/* 94 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -34910,7 +36225,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _EdgeBase2 = __webpack_require__(89); + var _EdgeBase2 = __webpack_require__(91); var _EdgeBase3 = _interopRequireDefault(_EdgeBase2); @@ -34928,7 +36243,7 @@ return /******/ (function(modules) { // webpackBootstrap function StraightEdge(options, body, labelModule) { _classCallCheck(this, StraightEdge); - return _possibleConstructorReturn(this, Object.getPrototypeOf(StraightEdge).call(this, options, body, labelModule)); + return _possibleConstructorReturn(this, (StraightEdge.__proto__ || Object.getPrototypeOf(StraightEdge)).call(this, options, body, labelModule)); } /** @@ -35009,7 +36324,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = StraightEdge; /***/ }, -/* 93 */ +/* 95 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -35020,35 +36335,35 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _BarnesHutSolver = __webpack_require__(94); + var _BarnesHutSolver = __webpack_require__(96); var _BarnesHutSolver2 = _interopRequireDefault(_BarnesHutSolver); - var _RepulsionSolver = __webpack_require__(95); + var _RepulsionSolver = __webpack_require__(97); var _RepulsionSolver2 = _interopRequireDefault(_RepulsionSolver); - var _HierarchicalRepulsionSolver = __webpack_require__(96); + var _HierarchicalRepulsionSolver = __webpack_require__(98); var _HierarchicalRepulsionSolver2 = _interopRequireDefault(_HierarchicalRepulsionSolver); - var _SpringSolver = __webpack_require__(97); + var _SpringSolver = __webpack_require__(99); var _SpringSolver2 = _interopRequireDefault(_SpringSolver); - var _HierarchicalSpringSolver = __webpack_require__(98); + var _HierarchicalSpringSolver = __webpack_require__(100); var _HierarchicalSpringSolver2 = _interopRequireDefault(_HierarchicalSpringSolver); - var _CentralGravitySolver = __webpack_require__(99); + var _CentralGravitySolver = __webpack_require__(101); var _CentralGravitySolver2 = _interopRequireDefault(_CentralGravitySolver); - var _FA2BasedRepulsionSolver = __webpack_require__(100); + var _FA2BasedRepulsionSolver = __webpack_require__(102); var _FA2BasedRepulsionSolver2 = _interopRequireDefault(_FA2BasedRepulsionSolver); - var _FA2BasedCentralGravitySolver = __webpack_require__(101); + var _FA2BasedCentralGravitySolver = __webpack_require__(103); var _FA2BasedCentralGravitySolver2 = _interopRequireDefault(_FA2BasedCentralGravitySolver); @@ -35308,7 +36623,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'stopSimulation', value: function stopSimulation() { - var emit = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0]; + var emit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; this.stabilized = true; if (emit === true) { @@ -35359,7 +36674,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function _emitStabilized() { var _this2 = this; - var amountOfIterations = arguments.length <= 0 || arguments[0] === undefined ? this.stabilizationIterations : arguments[0]; + var amountOfIterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.stabilizationIterations; if (this.stabilizationIterations > 1 || this.startedStabilization === true) { setTimeout(function () { @@ -35616,9 +36931,9 @@ return /******/ (function(modules) { // webpackBootstrap velocities[nodeId].x = Math.abs(velocities[nodeId].x) > maxVelocity ? velocities[nodeId].x > 0 ? maxVelocity : -maxVelocity : velocities[nodeId].x; node.x += velocities[nodeId].x * timestep; // position } else { - forces[nodeId].x = 0; - velocities[nodeId].x = 0; - } + forces[nodeId].x = 0; + velocities[nodeId].x = 0; + } if (node.options.fixed.y === false) { var dy = this.modelOptions.damping * velocities[nodeId].y; // damping force @@ -35627,9 +36942,9 @@ return /******/ (function(modules) { // webpackBootstrap velocities[nodeId].y = Math.abs(velocities[nodeId].y) > maxVelocity ? velocities[nodeId].y > 0 ? maxVelocity : -maxVelocity : velocities[nodeId].y; node.y += velocities[nodeId].y * timestep; // position } else { - forces[nodeId].y = 0; - velocities[nodeId].y = 0; - } + forces[nodeId].y = 0; + velocities[nodeId].y = 0; + } var totalVelocity = Math.sqrt(Math.pow(velocities[nodeId].x, 2) + Math.pow(velocities[nodeId].y, 2)); return totalVelocity; @@ -35699,7 +37014,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function stabilize() { var _this3 = this; - var iterations = arguments.length <= 0 || arguments[0] === undefined ? this.options.stabilization.iterations : arguments[0]; + var iterations = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.stabilization.iterations; if (typeof iterations !== 'number') { console.log('The stabilize method needs a numeric amount of iterations. Switching to default: ', this.options.stabilization.iterations); @@ -35818,7 +37133,7 @@ return /******/ (function(modules) { // webpackBootstrap var angle = Math.atan2(force.y, force.x); ctx.fillStyle = color; - ctx.arrow(node.x + factor * force.x + Math.cos(angle) * arrowSize, node.y + factor * force.y + Math.sin(angle) * arrowSize, angle, arrowSize); + ctx.arrowEndpoint(node.x + factor * force.x + Math.cos(angle) * arrowSize, node.y + factor * force.y + Math.sin(angle) * arrowSize, angle, arrowSize); ctx.fill(); } } @@ -35830,7 +37145,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = PhysicsEngine; /***/ }, -/* 94 */ +/* 96 */ /***/ function(module, exports) { "use strict"; @@ -35972,7 +37287,7 @@ return /******/ (function(modules) { // webpackBootstrap dx = distance; } - if (this.overlapAvoidanceFactor < 1) { + if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius); } @@ -36035,6 +37350,7 @@ return /******/ (function(modules) { // webpackBootstrap maxX -= 0.5 * sizeDiff; } // xSize < ySize + var minimumTreeSize = 1e-5; var rootSize = Math.max(minimumTreeSize, Math.abs(maxX - minX)); var halfRootSize = 0.5 * rootSize; @@ -36265,6 +37581,7 @@ return /******/ (function(modules) { // webpackBootstrap //--------------------------- DEBUGGING BELOW ---------------------------// + /** * This function is for debugging purposed, it draws the tree. * @@ -36342,7 +37659,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = BarnesHutSolver; /***/ }, -/* 95 */ +/* 97 */ /***/ function(module, exports) { "use strict"; @@ -36436,7 +37753,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = RepulsionSolver; /***/ }, -/* 96 */ +/* 98 */ /***/ function(module, exports) { "use strict"; @@ -36527,7 +37844,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = HierarchicalRepulsionSolver; /***/ }, -/* 97 */ +/* 99 */ /***/ function(module, exports) { "use strict"; @@ -36638,7 +37955,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = SpringSolver; /***/ }, -/* 98 */ +/* 100 */ /***/ function(module, exports) { "use strict"; @@ -36767,7 +38084,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = HierarchicalSpringSolver; /***/ }, -/* 99 */ +/* 101 */ /***/ function(module, exports) { "use strict"; @@ -36836,7 +38153,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = CentralGravitySolver; /***/ }, -/* 100 */ +/* 102 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -36847,7 +38164,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _BarnesHutSolver2 = __webpack_require__(94); + var _BarnesHutSolver2 = __webpack_require__(96); var _BarnesHutSolver3 = _interopRequireDefault(_BarnesHutSolver2); @@ -36865,7 +38182,7 @@ return /******/ (function(modules) { // webpackBootstrap function ForceAtlas2BasedRepulsionSolver(body, physicsBody, options) { _classCallCheck(this, ForceAtlas2BasedRepulsionSolver); - return _possibleConstructorReturn(this, Object.getPrototypeOf(ForceAtlas2BasedRepulsionSolver).call(this, body, physicsBody, options)); + return _possibleConstructorReturn(this, (ForceAtlas2BasedRepulsionSolver.__proto__ || Object.getPrototypeOf(ForceAtlas2BasedRepulsionSolver)).call(this, body, physicsBody, options)); } /** @@ -36888,7 +38205,7 @@ return /******/ (function(modules) { // webpackBootstrap dx = distance; } - if (this.overlapAvoidanceFactor < 1) { + if (this.overlapAvoidanceFactor < 1 && node.shape.radius) { distance = Math.max(0.1 + this.overlapAvoidanceFactor * node.shape.radius, distance - node.shape.radius); } @@ -36910,7 +38227,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = ForceAtlas2BasedRepulsionSolver; /***/ }, -/* 101 */ +/* 103 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -36921,7 +38238,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _CentralGravitySolver2 = __webpack_require__(99); + var _CentralGravitySolver2 = __webpack_require__(101); var _CentralGravitySolver3 = _interopRequireDefault(_CentralGravitySolver2); @@ -36939,7 +38256,7 @@ return /******/ (function(modules) { // webpackBootstrap function ForceAtlas2BasedCentralGravitySolver(body, physicsBody, options) { _classCallCheck(this, ForceAtlas2BasedCentralGravitySolver); - return _possibleConstructorReturn(this, Object.getPrototypeOf(ForceAtlas2BasedCentralGravitySolver).call(this, body, physicsBody, options)); + return _possibleConstructorReturn(this, (ForceAtlas2BasedCentralGravitySolver.__proto__ || Object.getPrototypeOf(ForceAtlas2BasedCentralGravitySolver)).call(this, body, physicsBody, options)); } /** @@ -36966,7 +38283,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = ForceAtlas2BasedCentralGravitySolver; /***/ }, -/* 102 */ +/* 104 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -36975,15 +38292,15 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NetworkUtil = __webpack_require__(103); + var _NetworkUtil = __webpack_require__(105); var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); - var _Cluster = __webpack_require__(104); + var _Cluster = __webpack_require__(106); var _Cluster2 = _interopRequireDefault(_Cluster); @@ -37012,19 +38329,14 @@ return /******/ (function(modules) { // webpackBootstrap }); } - _createClass(ClusterEngine, [{ - key: 'setOptions', - value: function setOptions(options) { - if (options !== undefined) {} - } + /** + * + * @param hubsize + * @param options + */ - /** - * - * @param hubsize - * @param options - */ - }, { + _createClass(ClusterEngine, [{ key: 'clusterByHubsize', value: function clusterByHubsize(hubsize, options) { if (hubsize === undefined) { @@ -37058,8 +38370,8 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'cluster', value: function cluster() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; - var refreshData = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (options.joinCondition === undefined) { throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options."); @@ -37102,7 +38414,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'clusterByEdgeCount', value: function clusterByEdgeCount(edgeCount, options) { - var refreshData = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; options = this._checkOptions(options); var clusters = []; @@ -37185,7 +38497,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'clusterOutliers', value: function clusterOutliers(options) { - var refreshData = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; this.clusterByEdgeCount(1, options, refreshData); } @@ -37199,7 +38511,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'clusterBridges', value: function clusterBridges(options) { - var refreshData = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var refreshData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; this.clusterByEdgeCount(2, options, refreshData); } @@ -37214,7 +38526,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'clusterByConnection', value: function clusterByConnection(nodeId, options) { - var refreshData = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; // kill conditions if (nodeId === undefined) { @@ -37271,7 +38583,19 @@ return /******/ (function(modules) { // webpackBootstrap } } } + var childNodeIDs = Object.keys(childNodesObj).map(function (childNode) { + return childNodesObj[childNode].id; + }); + for (childNode in childNodesObj) { + var childNode = childNodesObj[childNode]; + for (var y = 0; y < childNode.edges.length; y++) { + var childEdge = childNode.edges[y]; + if (childNodeIDs.indexOf(this._getConnectedId(childEdge, childNode.id)) > -1) { + childEdgesObj[childEdge.id] = childEdge; + } + } + } this._cluster(childNodesObj, childEdgesObj, options, refreshData); } @@ -37353,6 +38677,9 @@ return /******/ (function(modules) { // webpackBootstrap var newEdge = this.body.functions.createEdge(clonedOptions); newEdge.clusteringEdgeReplacingId = _edge.id; + // also reference the new edge in the old edge + this.body.edges[_edge.id].edgeReplacedById = newEdge.id; + // connect the edge. this.body.edges[newEdge.id] = newEdge; newEdge.connect(); @@ -37374,7 +38701,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_checkOptions', value: function _checkOptions() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; if (options.clusterEdgeProperties === undefined) { options.clusterEdgeProperties = {}; @@ -37398,10 +38725,15 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_cluster', value: function _cluster(childNodesObj, childEdgesObj, options) { - var refreshData = arguments.length <= 3 || arguments[3] === undefined ? true : arguments[3]; + var refreshData = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; - // kill condition: no children so can't cluster or only one node in the cluster, don't bother - if (Object.keys(childNodesObj).length < 2) { + // kill condition: no nodes don't bother + if (Object.keys(childNodesObj).length == 0) { + return; + } + + // allow clusters of 1 if options allow + if (Object.keys(childNodesObj).length == 1 && options.clusterNodeProperties.allowSingleNodeCluster != true) { return; } @@ -37584,7 +38916,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'openCluster', value: function openCluster(clusterNodeId, options) { - var refreshData = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; + var refreshData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; // kill conditions if (clusterNodeId === undefined) { @@ -37767,6 +39099,101 @@ return /******/ (function(modules) { // webpackBootstrap return stack; } + /** + * Using a clustered nodeId, update with the new options + * @param clusteredNodeId + * @param {object} newOptions + */ + + }, { + key: 'updateClusteredNode', + value: function updateClusteredNode(clusteredNodeId, newOptions) { + if (clusteredNodeId === undefined) { + throw new Error("No clusteredNodeId supplied to updateClusteredNode."); + } + if (newOptions === undefined) { + throw new Error("No newOptions supplied to updateClusteredNode."); + } + if (this.body.nodes[clusteredNodeId] === undefined) { + throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist."); + } + + this.body.nodes[clusteredNodeId].setOptions(newOptions); + this.body.emitter.emit('_dataChanged'); + } + + /** + * Using a base edgeId, update all related clustered edges with the new options + * @param startEdgeId + * @param {object} newOptions + */ + + }, { + key: 'updateEdge', + value: function updateEdge(startEdgeId, newOptions) { + if (startEdgeId === undefined) { + throw new Error("No startEdgeId supplied to updateEdge."); + } + if (newOptions === undefined) { + throw new Error("No newOptions supplied to updateEdge."); + } + if (this.body.edges[startEdgeId] === undefined) { + throw new Error("The startEdgeId supplied to updateEdge does not exist."); + } + + var allEdgeIds = this.getClusteredEdges(startEdgeId); + for (var i = 0; i < allEdgeIds.length; i++) { + var edge = this.body.edges[allEdgeIds[i]]; + edge.setOptions(newOptions); + } + this.body.emitter.emit('_dataChanged'); + } + + /** + * Get a stack of clusterEdgeId's (+base edgeid) that a base edge is the same as. cluster edge C -> cluster edge B -> cluster edge A -> base edge(edgeId) + * @param edgeId + * @returns {Array} + */ + + }, { + key: 'getClusteredEdges', + value: function getClusteredEdges(edgeId) { + var stack = []; + var max = 100; + var counter = 0; + + while (edgeId !== undefined && this.body.edges[edgeId] !== undefined && counter < max) { + stack.push(this.body.edges[edgeId].id); + edgeId = this.body.edges[edgeId].edgeReplacedById; + counter++; + } + stack.reverse(); + return stack; + } + + /** + * Get the base edge id of clusterEdgeId. cluster edge (clusteredEdgeId) -> cluster edge B -> cluster edge C -> base edge + * @param clusteredEdgeId + * @returns baseEdgeId + */ + + }, { + key: 'getBaseEdge', + value: function getBaseEdge(clusteredEdgeId) { + var baseEdgeId = clusteredEdgeId; + var max = 100; + var counter = 0; + + while (clusteredEdgeId !== undefined && this.body.edges[clusteredEdgeId] !== undefined && counter < max) { + clusteredEdgeId = this.body.edges[clusteredEdgeId].clusteringEdgeReplacingId; + counter++; + if (clusteredEdgeId !== undefined) { + baseEdgeId = clusteredEdgeId; + } + } + return baseEdgeId; + } + /** * Get the Id the node is connected to * @param edge @@ -37834,7 +39261,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = ClusterEngine; /***/ }, -/* 103 */ +/* 105 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -37862,7 +39289,7 @@ return /******/ (function(modules) { // webpackBootstrap _createClass(NetworkUtil, null, [{ key: "getRange", value: function getRange(allNodes) { - var specificNodes = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; + var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var minY = 1e9, maxY = -1e9, @@ -37900,7 +39327,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: "getRangeCore", value: function getRangeCore(allNodes) { - var specificNodes = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; + var specificNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var minY = 1e9, maxY = -1e9, @@ -37972,7 +39399,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = NetworkUtil; /***/ }, -/* 104 */ +/* 106 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -37981,7 +39408,7 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _Node2 = __webpack_require__(65); + var _Node2 = __webpack_require__(67); var _Node3 = _interopRequireDefault(_Node2); @@ -37996,14 +39423,13 @@ return /******/ (function(modules) { // webpackBootstrap /** * */ - var Cluster = function (_Node) { _inherits(Cluster, _Node); function Cluster(options, body, imagelist, grouplist, globalOptions) { _classCallCheck(this, Cluster); - var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Cluster).call(this, options, body, imagelist, grouplist, globalOptions)); + var _this = _possibleConstructorReturn(this, (Cluster.__proto__ || Object.getPrototypeOf(Cluster)).call(this, options, body, imagelist, grouplist, globalOptions)); _this.isCluster = true; _this.containedNodes = {}; @@ -38017,7 +39443,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Cluster; /***/ }, -/* 105 */ +/* 107 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -38127,8 +39553,8 @@ return /******/ (function(modules) { // webpackBootstrap if (this.requiresTimeout === true) { this.renderTimer = window.setTimeout(this._renderStep.bind(this), this.simulationInterval); // wait this.renderTimeStep milliseconds and perform the animation step function } else { - this.renderTimer = window.requestAnimationFrame(this._renderStep.bind(this)); // wait this.renderTimeStep milliseconds and perform the animation step function - } + this.renderTimer = window.requestAnimationFrame(this._renderStep.bind(this)); // wait this.renderTimeStep milliseconds and perform the animation step function + } } } } @@ -38192,7 +39618,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_redraw', value: function _redraw() { - var hidden = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; + var hidden = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; if (this.allowRedraw === true) { this.body.emitter.emit("initRedraw"); @@ -38297,7 +39723,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_drawNodes', value: function _drawNodes(ctx) { - var alwaysShow = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var alwaysShow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var nodes = this.body.nodes; var nodeIndices = this.body.nodeIndices; @@ -38390,7 +39816,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = CanvasRenderer; /***/ }, -/* 106 */ +/* 108 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -38403,8 +39829,8 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(28); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(30); var util = __webpack_require__(1); @@ -38426,6 +39852,7 @@ return /******/ (function(modules) { // webpackBootstrap this.resizeFunction = this._onResize.bind(this); this.cameraState = {}; this.initialized = false; + this.canvasViewCenter = {}; this.options = {}; this.defaultOptions = { @@ -38507,7 +39934,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_getCameraState', value: function _getCameraState() { - var pixelRatio = arguments.length <= 0 || arguments[0] === undefined ? this.pixelRatio : arguments[0]; + var pixelRatio = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pixelRatio; if (this.initialized === true) { this.cameraState.previousWidth = this.frame.canvas.width / pixelRatio; @@ -38698,8 +40125,8 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'setSize', value: function setSize() { - var width = arguments.length <= 0 || arguments[0] === undefined ? this.options.width : arguments[0]; - var height = arguments.length <= 1 || arguments[1] === undefined ? this.options.height : arguments[1]; + var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.options.width; + var height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.height; width = this._prepareValue(width); height = this._prepareValue(height); @@ -38728,6 +40155,11 @@ return /******/ (function(modules) { // webpackBootstrap this.options.width = width; this.options.height = height; + this.canvasViewCenter = { + x: 0.5 * this.frame.clientWidth, + y: 0.5 * this.frame.clientHeight + }; + emitEvent = true; } else { // this would adapt the width of the canvas to the width from 100% if and only if @@ -38854,7 +40286,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Canvas; /***/ }, -/* 107 */ +/* 109 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -38865,7 +40297,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NetworkUtil = __webpack_require__(103); + var _NetworkUtil = __webpack_require__(105); var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); @@ -38907,7 +40339,7 @@ return /******/ (function(modules) { // webpackBootstrap _createClass(View, [{ key: 'setOptions', value: function setOptions() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; this.options = options; } @@ -38921,8 +40353,8 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'fit', value: function fit() { - var options = arguments.length <= 0 || arguments[0] === undefined ? { nodes: [] } : arguments[0]; - var initialZoom = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { nodes: [] }; + var initialZoom = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var range = void 0; var zoomLevel = void 0; @@ -38990,7 +40422,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'focus', value: function focus(nodeId) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (this.body.nodes[nodeId] !== undefined) { var nodePosition = { x: this.body.nodes[nodeId].x, y: this.body.nodes[nodeId].y }; @@ -39162,7 +40594,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_transitionRedraw', value: function _transitionRedraw() { - var finished = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; + var finished = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; this.easingTime += this.animationSpeed; this.easingTime = finished === true ? 1.0 : this.easingTime; @@ -39204,7 +40636,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = View; /***/ }, -/* 108 */ +/* 110 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -39215,11 +40647,11 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NavigationHandler = __webpack_require__(109); + var _NavigationHandler = __webpack_require__(111); var _NavigationHandler2 = _interopRequireDefault(_NavigationHandler); - var _Popup = __webpack_require__(110); + var _Popup = __webpack_require__(112); var _Popup2 = _interopRequireDefault(_Popup); @@ -39422,7 +40854,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'checkSelectionChanges', value: function checkSelectionChanges(pointer, event) { - var add = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var add = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var previouslySelectedEdgeCount = this.selectionHandler._getSelectedEdgeCount(); var previouslySelectedNodeCount = this.selectionHandler._getSelectedNodeCount(); @@ -39437,10 +40869,9 @@ return /******/ (function(modules) { // webpackBootstrap var selectedNodesCount = this.selectionHandler._getSelectedNodeCount(); var currentSelection = this.selectionHandler.getSelection(); - var _determineIfDifferent2 = this._determineIfDifferent(previousSelection, currentSelection); - - var nodesChanged = _determineIfDifferent2.nodesChanged; - var edgesChanged = _determineIfDifferent2.edgesChanged; + var _determineIfDifferent2 = this._determineIfDifferent(previousSelection, currentSelection), + nodesChanged = _determineIfDifferent2.nodesChanged, + edgesChanged = _determineIfDifferent2.edgesChanged; var nodeSelected = false; @@ -39992,7 +41423,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = InteractionHandler; /***/ }, -/* 109 */ +/* 111 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -40006,9 +41437,9 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(28); - var keycharm = __webpack_require__(23); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(30); + var keycharm = __webpack_require__(25); var NavigationHandler = function () { function NavigationHandler(body, canvas) { @@ -40204,13 +41635,29 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_zoomIn', value: function _zoomIn() { - this.body.view.scale *= 1 + this.options.keyboard.speed.zoom; + var scaleOld = this.body.view.scale; + var scale = this.body.view.scale * (1 + this.options.keyboard.speed.zoom); + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac; + + this.body.view.scale = scale; + this.body.view.translation = { x: tx, y: ty }; this.body.emitter.emit('zoom', { direction: '+', scale: this.body.view.scale }); } }, { key: '_zoomOut', value: function _zoomOut() { - this.body.view.scale /= 1 + this.options.keyboard.speed.zoom; + var scaleOld = this.body.view.scale; + var scale = this.body.view.scale / (1 + this.options.keyboard.speed.zoom); + var translation = this.body.view.translation; + var scaleFrac = scale / scaleOld; + var tx = (1 - scaleFrac) * this.canvas.canvasViewCenter.x + translation.x * scaleFrac; + var ty = (1 - scaleFrac) * this.canvas.canvasViewCenter.y + translation.y * scaleFrac; + + this.body.view.scale = scale; + this.body.view.translation = { x: tx, y: ty }; this.body.emitter.emit('zoom', { direction: '-', scale: this.body.view.scale }); } @@ -40321,7 +41768,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = NavigationHandler; /***/ }, -/* 110 */ +/* 112 */ /***/ function(module, exports) { 'use strict'; @@ -40343,7 +41790,6 @@ return /******/ (function(modules) { // webpackBootstrap * @param {Object} [style] An object containing borderColor, * backgroundColor, etc. */ - var Popup = function () { function Popup(container) { _classCallCheck(this, Popup); @@ -40451,7 +41897,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = Popup; /***/ }, -/* 111 */ +/* 113 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -40462,11 +41908,11 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _Node = __webpack_require__(65); + var _Node = __webpack_require__(67); var _Node2 = _interopRequireDefault(_Node); - var _Edge = __webpack_require__(85); + var _Edge = __webpack_require__(87); var _Edge2 = _interopRequireDefault(_Edge); @@ -40557,7 +42003,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_generateClickEvent', value: function _generateClickEvent(eventType, event, pointer, oldSelection) { - var emptySelection = arguments.length <= 4 || arguments[4] === undefined ? false : arguments[4]; + var emptySelection = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; var properties = void 0; if (emptySelection === true) { @@ -40579,7 +42025,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'selectObject', value: function selectObject(obj) { - var highlightEdges = arguments.length <= 1 || arguments[1] === undefined ? this.options.selectConnectedEdges : arguments[1]; + var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.options.selectConnectedEdges; if (obj !== undefined) { if (obj instanceof _Node2.default) { @@ -40653,7 +42099,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'getNodeAt', value: function getNodeAt(pointer) { - var returnNode = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var returnNode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // we first check if this is an navigation controls element var positionObject = this._pointerToPositionObject(pointer); @@ -40716,16 +42162,33 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'getEdgeAt', value: function getEdgeAt(pointer) { - var returnEdge = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; - - var positionObject = this._pointerToPositionObject(pointer); - var overlappingEdges = this._getAllEdgesOverlappingWith(positionObject); + var returnEdge = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; - if (overlappingEdges.length > 0) { + // Iterate over edges, pick closest within 10 + var canvasPos = this.canvas.DOMtoCanvas(pointer); + var mindist = 10; + var overlappingEdge = null; + var edges = this.body.edges; + for (var i = 0; i < this.body.edgeIndices.length; i++) { + var edgeId = this.body.edgeIndices[i]; + var edge = edges[edgeId]; + if (edge.connected) { + var xFrom = edge.from.x; + var yFrom = edge.from.y; + var xTo = edge.to.x; + var yTo = edge.to.y; + var dist = edge.edgeType.getDistanceToEdge(xFrom, yFrom, xTo, yTo, canvasPos.x, canvasPos.y); + if (dist < mindist) { + overlappingEdge = edgeId; + mindist = dist; + } + } + } + if (overlappingEdge) { if (returnEdge === true) { - return this.body.edges[overlappingEdges[overlappingEdges.length - 1]]; + return this.body.edges[overlappingEdge]; } else { - return overlappingEdges[overlappingEdges.length - 1]; + return overlappingEdge; } } else { return undefined; @@ -41050,8 +42513,9 @@ return /******/ (function(modules) { // webpackBootstrap this.hoverObj.edges[edgeId].hover = false; delete this.hoverObj.edges[edgeId]; } - // if the blur remains the same and the object is undefined (mouse off), we blur the edge - else if (object === undefined) { + // if the blur remains the same and the object is undefined (mouse off) or another + // edge has been hovered, we blur the edge + else if (object === undefined || object instanceof _Edge2.default) { this.blurObject(this.hoverObj.edges[edgeId]); delete this.hoverObj.edges[edgeId]; hoverChanged = true; @@ -41145,7 +42609,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'setSelection', value: function setSelection(selection) { - var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var i = void 0, id = void 0; @@ -41192,7 +42656,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'selectNodes', value: function selectNodes(selection) { - var highlightEdges = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1]; + var highlightEdges = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (!selection || selection.length === undefined) throw 'Selection must be an array with ids'; @@ -41244,7 +42708,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = SelectionHandler; /***/ }, -/* 112 */ +/* 114 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -41255,11 +42719,11 @@ return /******/ (function(modules) { // webpackBootstrap var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _NetworkUtil = __webpack_require__(103); + var _NetworkUtil = __webpack_require__(105); var _NetworkUtil2 = _interopRequireDefault(_NetworkUtil); @@ -41506,8 +42970,11 @@ return /******/ (function(modules) { // webpackBootstrap // perturb the nodes a little bit to force the physics to kick in var offset = 70; for (var _i = 0; _i < this.body.nodeIndices.length; _i++) { - this.body.nodes[this.body.nodeIndices[_i]].x += (0.5 - this.seededRandom()) * offset; - this.body.nodes[this.body.nodeIndices[_i]].y += (0.5 - this.seededRandom()) * offset; + // Only perturb the nodes that aren't fixed + if (this.body.nodes[this.body.nodeIndices[_i]].predefinedPosition === false) { + this.body.nodes[this.body.nodeIndices[_i]].x += (0.5 - this.seededRandom()) * offset; + this.body.nodes[this.body.nodeIndices[_i]].y += (0.5 - this.seededRandom()) * offset; + } } // uncluster all clusters @@ -41718,7 +43185,7 @@ return /******/ (function(modules) { // webpackBootstrap // get a min max width as well as the maximum movement space it has on either sides // we use min max terminology because width and height can interchange depending on the direction of the layout var getBranchBoundary = function getBranchBoundary(branchMap) { - var maxLevel = arguments.length <= 1 || arguments[1] === undefined ? 1e9 : arguments[1]; + var maxLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1e9; var minSpace = 1e9; var maxSpace = 1e9; @@ -41732,12 +43199,10 @@ return /******/ (function(modules) { // webpackBootstrap // get the space around the node. - var _getSpaceAroundNode2 = _this2._getSpaceAroundNode(node, branchMap); - - var _getSpaceAroundNode3 = _slicedToArray(_getSpaceAroundNode2, 2); - - var minSpaceNode = _getSpaceAroundNode3[0]; - var maxSpaceNode = _getSpaceAroundNode3[1]; + var _getSpaceAroundNode2 = _this2._getSpaceAroundNode(node, branchMap), + _getSpaceAroundNode3 = _slicedToArray(_getSpaceAroundNode2, 2), + minSpaceNode = _getSpaceAroundNode3[0], + maxSpaceNode = _getSpaceAroundNode3[1]; minSpace = Math.min(minSpaceNode, minSpace); maxSpace = Math.min(maxSpaceNode, maxSpace); @@ -41811,7 +43276,7 @@ return /******/ (function(modules) { // webpackBootstrap // callback for shifting branches var branchShiftCallback = function branchShiftCallback(node1, node2) { - var centerParent = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var centerParent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; //window.CALLBACKS.push(() => { var pos1 = _this2._getPositionForHierarchy(node1); @@ -41828,26 +43293,23 @@ return /******/ (function(modules) { // webpackBootstrap // check the largest distance between the branches var maxLevel = getCollisionLevel(node1, node2); - var _getBranchBoundary = getBranchBoundary(branchNodes1, maxLevel); - - var _getBranchBoundary2 = _slicedToArray(_getBranchBoundary, 4); + var _getBranchBoundary = getBranchBoundary(branchNodes1, maxLevel), + _getBranchBoundary2 = _slicedToArray(_getBranchBoundary, 4), + min1 = _getBranchBoundary2[0], + max1 = _getBranchBoundary2[1], + minSpace1 = _getBranchBoundary2[2], + maxSpace1 = _getBranchBoundary2[3]; - var min1 = _getBranchBoundary2[0]; - var max1 = _getBranchBoundary2[1]; - var minSpace1 = _getBranchBoundary2[2]; - var maxSpace1 = _getBranchBoundary2[3]; - - var _getBranchBoundary3 = getBranchBoundary(branchNodes2, maxLevel); - - var _getBranchBoundary4 = _slicedToArray(_getBranchBoundary3, 4); - - var min2 = _getBranchBoundary4[0]; - var max2 = _getBranchBoundary4[1]; - var minSpace2 = _getBranchBoundary4[2]; - var maxSpace2 = _getBranchBoundary4[3]; + var _getBranchBoundary3 = getBranchBoundary(branchNodes2, maxLevel), + _getBranchBoundary4 = _slicedToArray(_getBranchBoundary3, 4), + min2 = _getBranchBoundary4[0], + max2 = _getBranchBoundary4[1], + minSpace2 = _getBranchBoundary4[2], + maxSpace2 = _getBranchBoundary4[3]; //console.log(node1.id, getBranchBoundary(branchNodes1, maxLevel), node2.id, getBranchBoundary(branchNodes2, maxLevel), maxLevel); + var diffBranch = Math.abs(max1 - min2); if (diffBranch > _this2.options.hierarchical.nodeSpacing) { var offset = max1 - min2 + _this2.options.hierarchical.nodeSpacing; @@ -41946,15 +43408,12 @@ return /******/ (function(modules) { // webpackBootstrap branches[node.id] = branchNodes; } - var _getBranchBoundary5 = getBranchBoundary(branches[node.id]); - - var _getBranchBoundary6 = _slicedToArray(_getBranchBoundary5, 4); - - var minBranch = _getBranchBoundary6[0]; - var maxBranch = _getBranchBoundary6[1]; - var minSpaceBranch = _getBranchBoundary6[2]; - var maxSpaceBranch = _getBranchBoundary6[3]; - + var _getBranchBoundary5 = getBranchBoundary(branches[node.id]), + _getBranchBoundary6 = _slicedToArray(_getBranchBoundary5, 4), + minBranch = _getBranchBoundary6[0], + maxBranch = _getBranchBoundary6[1], + minSpaceBranch = _getBranchBoundary6[2], + maxSpaceBranch = _getBranchBoundary6[3]; var diff = guess - nodePosition; @@ -41979,12 +43438,10 @@ return /******/ (function(modules) { // webpackBootstrap // position node if there is space - var _getSpaceAroundNode4 = _this2._getSpaceAroundNode(node); - - var _getSpaceAroundNode5 = _slicedToArray(_getSpaceAroundNode4, 2); - - var minSpace = _getSpaceAroundNode5[0]; - var maxSpace = _getSpaceAroundNode5[1]; + var _getSpaceAroundNode4 = _this2._getSpaceAroundNode(node), + _getSpaceAroundNode5 = _slicedToArray(_getSpaceAroundNode4, 2), + minSpace = _getSpaceAroundNode5[0], + maxSpace = _getSpaceAroundNode5[1]; var diff = guess - nodePosition; // check if we are allowed to move the node: @@ -42155,12 +43612,10 @@ return /******/ (function(modules) { // webpackBootstrap var position = this._getPositionForHierarchy(parentNode); - var _getSpaceAroundNode6 = this._getSpaceAroundNode(parentNode); - - var _getSpaceAroundNode7 = _slicedToArray(_getSpaceAroundNode6, 2); - - var minSpace = _getSpaceAroundNode7[0]; - var maxSpace = _getSpaceAroundNode7[1]; + var _getSpaceAroundNode6 = this._getSpaceAroundNode(parentNode), + _getSpaceAroundNode7 = _slicedToArray(_getSpaceAroundNode6, 2), + minSpace = _getSpaceAroundNode7[0], + maxSpace = _getSpaceAroundNode7[1]; var newPosition = 0.5 * (minPos + maxPos); var diff = position - newPosition; @@ -42542,7 +43997,7 @@ return /******/ (function(modules) { // webpackBootstrap value: function _crawlNetwork() { var _this7 = this; - var callback = arguments.length <= 0 || arguments[0] === undefined ? function () {} : arguments[0]; + var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {}; var startingNodeId = arguments[1]; var progress = {}; @@ -42670,7 +44125,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_setPositionForHierarchy', value: function _setPositionForHierarchy(node, position, level) { - var doNotUpdate = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3]; + var doNotUpdate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; //console.log('_setPositionForHierarchy',node.id, position) if (doNotUpdate !== true) { @@ -42739,7 +44194,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = LayoutEngine; /***/ }, -/* 113 */ +/* 115 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -42753,8 +44208,8 @@ return /******/ (function(modules) { // webpackBootstrap function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var util = __webpack_require__(1); - var Hammer = __webpack_require__(20); - var hammerUtil = __webpack_require__(28); + var Hammer = __webpack_require__(22); + var hammerUtil = __webpack_require__(30); /** * clears the toolbar div element of children @@ -43458,7 +44913,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_createSeperator', value: function _createSeperator() { - var index = arguments.length <= 0 || arguments[0] === undefined ? 1 : arguments[0]; + var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; this.manipulationDOM['seperatorLineDiv' + index] = document.createElement('div'); this.manipulationDOM['seperatorLineDiv' + index].className = 'vis-separator-line'; @@ -43517,7 +44972,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: '_createButton', value: function _createButton(id, className, label) { - var labelClassName = arguments.length <= 3 || arguments[3] === undefined ? 'vis-label' : arguments[3]; + var labelClassName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'vis-label'; this.manipulationDOM[id + 'Div'] = document.createElement('div'); @@ -43769,6 +45224,7 @@ return /******/ (function(modules) { // webpackBootstrap // ------------------------------------ END OF EDIT EDGE FUNCTIONS -----------------------------------------// + // ------------------------------------------- ADD EDGE FUNCTIONS -----------------------------------------// /** * the function bound to the selection event. It checks if you want to connect a cluster and changes the description @@ -43882,6 +45338,7 @@ return /******/ (function(modules) { // webpackBootstrap // --------------------------------------- END OF ADD EDGE FUNCTIONS -------------------------------------// + // ------------------------------ Performing all the actual data manipulation ------------------------// /** @@ -43993,7 +45450,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = ManipulationSystem; /***/ }, -/* 114 */ +/* 116 */ /***/ function(module, exports) { 'use strict'; @@ -44026,9 +45483,9 @@ return /******/ (function(modules) { // webpackBootstrap }, edges: { arrows: { - to: { enabled: { boolean: boolean }, scaleFactor: { number: number }, __type__: { object: object, boolean: boolean } }, - middle: { enabled: { boolean: boolean }, scaleFactor: { number: number }, __type__: { object: object, boolean: boolean } }, - from: { enabled: { boolean: boolean }, scaleFactor: { number: number }, __type__: { object: object, boolean: boolean } }, + to: { enabled: { boolean: boolean }, scaleFactor: { number: number }, type: { string: ['arrow', 'circle'] }, __type__: { object: object, boolean: boolean } }, + middle: { enabled: { boolean: boolean }, scaleFactor: { number: number }, type: { string: ['arrow', 'circle'] }, __type__: { object: object, boolean: boolean } }, + from: { enabled: { boolean: boolean }, scaleFactor: { number: number }, type: { string: ['arrow', 'circle'] }, __type__: { object: object, boolean: boolean } }, __type__: { string: ['from', 'to', 'middle'], object: object } }, arrowStrikethrough: { boolean: boolean }, @@ -44372,9 +45829,9 @@ return /******/ (function(modules) { // webpackBootstrap }, edges: { arrows: { - to: { enabled: false, scaleFactor: [1, 0, 3, 0.05] }, // boolean / {arrowScaleFactor:1} / {enabled: false, arrowScaleFactor:1} - middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05] }, - from: { enabled: false, scaleFactor: [1, 0, 3, 0.05] } + to: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' }, + middle: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' }, + from: { enabled: false, scaleFactor: [1, 0, 3, 0.05], type: 'arrow' } }, arrowStrikethrough: true, color: { @@ -44502,10 +45959,6 @@ return /******/ (function(modules) { // webpackBootstrap minVelocity: [0.1, 0.01, 0.5, 0.01], solver: ['barnesHut', 'forceAtlas2Based', 'repulsion', 'hierarchicalRepulsion'], timestep: [0.5, 0.01, 1, 0.01] - }, - //adaptiveTimestep: true - global: { - locale: ['en', 'nl'] } }; @@ -44513,7 +45966,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.configureOptions = configureOptions; /***/ }, -/* 115 */ +/* 117 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -44527,7 +45980,7 @@ return /******/ (function(modules) { // webpackBootstrap var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // distance finding algorithm - var _FloydWarshall = __webpack_require__(116); + var _FloydWarshall = __webpack_require__(118); var _FloydWarshall2 = _interopRequireDefault(_FloydWarshall); @@ -44543,7 +45996,6 @@ return /******/ (function(modules) { // webpackBootstrap * * Possible optimizations in the distance calculation can be implemented. */ - var KamadaKawai = function () { function KamadaKawai(body, edgeLength, edgeStrength) { _classCallCheck(this, KamadaKawai); @@ -44582,7 +46034,7 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: "solve", value: function solve(nodesArray, edgesArray) { - var ignoreClusters = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; + var ignoreClusters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; // get distance matrix var D_matrix = this.distanceSolver.getDistances(this.body, nodesArray, edgesArray); // distance matrix @@ -44656,13 +46108,11 @@ return /******/ (function(modules) { // webpackBootstrap var m = nodesArray[nodeIdx]; // by not evaluating nodes with predefined positions we should only move nodes that have no positions. if (nodes[m].predefinedPosition === false || nodes[m].isCluster === true && ignoreClusters === true || nodes[m].options.fixed.x === true || nodes[m].options.fixed.y === true) { - var _getEnergy4 = this._getEnergy(m); - - var _getEnergy5 = _slicedToArray(_getEnergy4, 3); - - var delta_m = _getEnergy5[0]; - var dE_dx = _getEnergy5[1]; - var dE_dy = _getEnergy5[2]; + var _getEnergy4 = this._getEnergy(m), + _getEnergy5 = _slicedToArray(_getEnergy4, 3), + delta_m = _getEnergy5[0], + dE_dx = _getEnergy5[1], + dE_dy = _getEnergy5[2]; if (maxEnergy < delta_m) { maxEnergy = delta_m; @@ -44804,7 +46254,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = KamadaKawai; /***/ }, -/* 116 */ +/* 118 */ /***/ function(module, exports) { "use strict"; @@ -44874,7 +46324,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = FloydWarshall; /***/ }, -/* 117 */ +/* 119 */ /***/ function(module, exports) { 'use strict'; @@ -44924,6 +46374,7 @@ return /******/ (function(modules) { // webpackBootstrap var ir = Math.sqrt(3) / 6 * s; // radius of inner circle var h = Math.sqrt(s * s - s2 * s2); // height + this.moveTo(x, y - (h - ir)); this.lineTo(x + s2, y + ir); this.lineTo(x - s2, y + ir); @@ -45090,9 +46541,9 @@ return /******/ (function(modules) { // webpackBootstrap }; /** - * Draw an arrow point (no line) + * Draw an arrow at the end of a line with the given angle. */ - CanvasRenderingContext2D.prototype.arrow = function (x, y, angle, length) { + CanvasRenderingContext2D.prototype.arrowEndpoint = function (x, y, angle, length) { // tail var xt = x - length * Math.cos(angle); var yt = y - length * Math.sin(angle); @@ -45117,6 +46568,16 @@ return /******/ (function(modules) { // webpackBootstrap this.closePath(); }; + /** + * Draw an circle an the end of an line with the given angle. + */ + CanvasRenderingContext2D.prototype.circleEndpoint = function (x, y, angle, length) { + var radius = length * 0.4; + var xc = x - radius * Math.cos(angle); + var yc = y - radius * Math.sin(angle); + this.circle(xc, yc, radius); + }; + /** * Sets up the dashedLine functionality for drawing * Original code came from http://stackoverflow.com/questions/4576724/dotted-stroke-in-canvas @@ -45161,7 +46622,7 @@ return /******/ (function(modules) { // webpackBootstrap } /***/ }, -/* 118 */ +/* 120 */ /***/ function(module, exports) { 'use strict'; @@ -45511,10 +46972,10 @@ return /******/ (function(modules) { // webpackBootstrap if (token === 'false') { token = false; // convert to boolean } else if (token === 'true') { - token = true; // convert to boolean - } else if (!isNaN(Number(token))) { - token = Number(token); // convert to number - } + token = true; // convert to boolean + } else if (!isNaN(Number(token))) { + token = Number(token); // convert to number + } tokenType = TOKENTYPE.IDENTIFIER; return; } @@ -45656,8 +47117,8 @@ return /******/ (function(modules) { // webpackBootstrap getToken(); // TODO: implement comma separated list with "a_list: ID=ID [','] [a_list] " } else { - parseNodeStatement(graph, id); - } + parseNodeStatement(graph, id); + } } /** @@ -46059,7 +47520,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.DOTToGraph = DOTToGraph; /***/ }, -/* 119 */ +/* 121 */ /***/ function(module, exports) { 'use strict'; @@ -46137,7 +47598,7 @@ return /******/ (function(modules) { // webpackBootstrap exports.parseGephi = parseGephi; /***/ }, -/* 120 */ +/* 122 */ /***/ function(module, exports) { 'use strict'; @@ -46164,31 +47625,31 @@ return /******/ (function(modules) { // webpackBootstrap // German exports['de'] = { edit: 'Editieren', - del: 'Lösche Auswahl', - back: 'Zurück', - addNode: 'Knoten hinzufügen', - addEdge: 'Kante hinzufügen', + del: 'L\xF6sche Auswahl', + back: 'Zur\xFCck', + addNode: 'Knoten hinzuf\xFCgen', + addEdge: 'Kante hinzuf\xFCgen', editNode: 'Knoten editieren', editEdge: 'Kante editieren', addDescription: 'Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.', edgeDescription: 'Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.', editEdgeDescription: 'Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.', - createEdgeError: 'Es ist nicht möglich, Kanten mit Clustern zu verbinden.', - deleteClusterError: 'Cluster können nicht gelöscht werden.', - editClusterError: 'Cluster können nicht editiert werden.' + createEdgeError: 'Es ist nicht m\xF6glich, Kanten mit Clustern zu verbinden.', + deleteClusterError: 'Cluster k\xF6nnen nicht gel\xF6scht werden.', + editClusterError: 'Cluster k\xF6nnen nicht editiert werden.' }; exports['de_DE'] = exports['de']; // Spanish exports['es'] = { edit: 'Editar', - del: 'Eliminar selección', - back: 'Átras', - addNode: 'Añadir nodo', - addEdge: 'Añadir arista', + del: 'Eliminar selecci\xF3n', + back: '\xC1tras', + addNode: 'A\xF1adir nodo', + addEdge: 'A\xF1adir arista', editNode: 'Editar nodo', editEdge: 'Editar arista', - addDescription: 'Haga clic en un lugar vacío para colocar un nuevo nodo.', + addDescription: 'Haga clic en un lugar vac\xEDo para colocar un nuevo nodo.', edgeDescription: 'Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.', editEdgeDescription: 'Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.', createEdgeError: 'No se puede conectar una arista a un grupo.', @@ -46197,6 +47658,24 @@ return /******/ (function(modules) { // webpackBootstrap }; exports['es_ES'] = exports['es']; + //Italiano + exports['it'] = { + edit: 'Modifica', + del: 'Cancella la selezione', + back: 'Indietro', + addNode: 'Aggiungi un nodo', + addEdge: 'Aggiungi un vertice', + editNode: 'Modifica il nodo', + editEdge: 'Modifica il vertice', + addDescription: 'Clicca per aggiungere un nuovo nodo', + edgeDescription: 'Clicca su un nodo e trascinalo ad un altro nodo per connetterli.', + editEdgeDescription: 'Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.', + createEdgeError: 'Non si possono collegare vertici ad un cluster', + deleteClusterError: 'I cluster non possono essere cancellati', + editClusterError: 'I clusters non possono essere modificati.' + }; + exports['it_IT'] = exports['it']; + // Dutch exports['nl'] = { edit: 'Wijzigen', @@ -46216,6 +47695,44 @@ return /******/ (function(modules) { // webpackBootstrap exports['nl_NL'] = exports['nl']; exports['nl_BE'] = exports['nl']; + // Portuguese Brazil + exports['pt-br'] = { + edit: 'Editar', + del: 'Remover selecionado', + back: 'Voltar', + addNode: 'Adicionar nó', + addEdge: 'Adicionar aresta', + editNode: 'Editar nó', + editEdge: 'Editar aresta', + addDescription: 'Clique em um espaço em branco para adicionar um novo nó', + edgeDescription: 'Clique em um nó e arraste a aresta até outro nó para conectá-los', + editEdgeDescription: 'Clique nos pontos de controle e os arraste para um nó para conectá-los', + createEdgeError: 'Não foi possível linkar arestas a um cluster.', + deleteClusterError: 'Clusters não puderam ser removidos.', + editClusterError: 'Clusters não puderam ser editados.' + }; + exports['pt-BR'] = exports['pt-br']; + exports['pt_BR'] = exports['pt-br']; + exports['pt_br'] = exports['pt-br']; + + // Russian + exports['ru'] = { + edit: 'Редактировать', + del: 'Удалить выбранное', + back: 'Назад', + addNode: 'Добавить узел', + addEdge: 'Добавить ребро', + editNode: 'Редактировать узел', + editEdge: 'Редактировать ребро', + addDescription: 'Кликните в свободное место, чтобы добавить новый узел.', + edgeDescription: 'Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.', + editEdgeDescription: 'Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.', + createEdgeError: 'Невозможно соединить ребра в кластер.', + deleteClusterError: 'Кластеры не могут быть удалены', + editClusterError: 'Кластеры недоступны для редактирования.' + }; + exports['ru_RU'] = exports['ru']; + /***/ } /******/ ]) }); diff --git a/dist/vis.map b/dist/vis.map deleted file mode 100644 index e4094787..00000000 --- a/dist/vis.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["vis.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","util","extend","_typeof","Symbol","iterator","obj","constructor","moment","uuid","isNumber","object","Number","recursiveDOMDelete","DOMobject","hasChildNodes","firstChild","removeChild","giveRange","min","max","total","value","scale","Math","isString","String","isDate","Date","match","ASPDateRegex","exec","isNaN","parse","randomUUID","v4","assignAllKeys","prop","hasOwnProperty","fillIfDefined","a","b","allowDeletion","arguments","length","undefined","protoExtend","i","other","selectiveExtend","props","Array","isArray","Error","selectiveDeepExtend","TypeError","Object","deepExtend","selectiveNotDeepExtend","indexOf","push","equalArray","len","convert","type","Boolean","valueOf","isMoment","toDate","getType","toISOString","copyAndExtendArray","arr","newValue","newArr","copyArray","getAbsoluteLeft","elem","getBoundingClientRect","left","getAbsoluteRight","right","getAbsoluteTop","top","addClassName","className","classes","split","join","removeClassName","index","splice","forEach","callback","toArray","array","updateProperty","key","throttle","fn","wait","timeout","needExecution","throttled","setTimeout","addEventListener","element","action","listener","useCapture","navigator","userAgent","attachEvent","removeEventListener","detachEvent","preventDefault","event","window","returnValue","getTarget","target","srcElement","nodeType","parentNode","hasParent","parent","e","option","asBoolean","defaultValue","asNumber","asString","asSize","asElement","hexToRGB","hex","shorthandRegex","replace","r","g","result","parseInt","overrideOpacity","color","opacity","rgb","substr","RGBToHex","red","green","blue","toString","slice","parseColor","isValidRGB","map","isValidHex","hsv","hexToHSV","lighterColorHSV","h","s","v","darkerColorHSV","darkerColorHex","HSVToHex","lighterColorHex","background","border","highlight","hover","RGBToHSV","minRGB","maxRGB","d","hue","saturation","cssUtil","cssText","styles","style","trim","parts","keys","addCssText","currentStyles","newStyles","removeCssText","removeStyles","HSVToRGB","floor","f","q","t","isOk","test","isValidRGBA","rgba","selectiveBridgeObject","fields","referenceObject","objectTo","create","bridgeObject","insertSort","compare","k","j","mergeOptions","mergeTarget","options","globalOptions","enabled","binarySearchCustom","orderedItems","comparator","field","field2","maxIterations","iteration","low","high","middle","item","searchResult","binarySearchValue","sidePreference","prevValue","nextValue","easingFunctions","linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","global","utils_hooks__hooks","hookCallback","apply","setHookCallback","input","prototype","res","hasOwnProp","create_utc__createUTC","format","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","meridiem","getParsingFlags","_pf","valid__isValid","_isValid","flags","parsedParts","some","_d","getTime","invalidWeekday","_strict","bigHour","valid__createInvalid","NaN","isUndefined","copyConfig","to","from","val","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","momentProperties","Moment","config","updateInProgress","updateOffset","absFloor","number","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","compareArrays","array1","array2","dontConvert","lengthDiff","abs","diffs","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecationHandler","stack","deprecateSimple","name","deprecations","isFunction","Function","isObject","locale_set__set","_config","_ordinalParseLenient","RegExp","_ordinalParse","source","mergeConfigs","parentConfig","childConfig","Locale","set","normalizeLocale","toLowerCase","chooseLocale","names","next","loadLocale","oldLocale","locales","globalLocale","_abbr","code","locale_locales__getSetGlobalLocale","values","data","locale_locales__getLocale","defineLocale","abbr","parentLocale","updateLocale","locale_locales__listLocales","addUnitAlias","unit","shorthand","lowerCase","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","makeGetSet","keepTime","get_set__set","get_set__get","mom","isValid","getSet","zeroFill","targetLength","forceSign","absNumber","zerosToFill","sign","pow","addFormatToken","token","padded","ordinal","func","formatTokenFunctions","localeData","removeFormattingTokens","makeFormatFunction","formattingTokens","output","formatMoment","expandFormat","formatFunctions","invalidDate","replaceLongDateFormatTokens","longDateFormat","localFormattingTokens","lastIndex","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","addParseToken","tokens","addWeekParseToken","_w","addTimeToArrayFromToken","_a","daysInMonth","year","month","UTC","getUTCDate","localeMonths","_months","MONTHS_IN_FORMAT","localeMonthsShort","_monthsShort","units_month__handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","monthsShort","months","localeMonthsParse","_monthsParseExact","setMonth","dayOfMonth","monthsParse","date","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","monthsRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","sort","checkOverflow","MONTH","DATE","YEAR","HOUR","MINUTE","SECOND","MILLISECOND","_overflowDayOfYear","_overflowWeeks","WEEK","_overflowWeekday","WEEKDAY","configFromISO","l","allowTime","dateFormat","timeFormat","tzFormat","string","extendedIsoRegex","basicIsoRegex","isoDates","isoTimes","tzRegex","configFromStringAndFormat","configFromString","aspNetJsonRegex","createFromInputFallback","createDate","y","M","ms","getFullYear","setFullYear","createUTCDate","getUTCFullYear","setUTCFullYear","daysInYear","isLeapYear","getIsLeapYear","firstWeekOffset","dow","doy","fwd","fwdlw","getUTCDay","dayOfYearFromWeeks","week","weekday","resYear","resDayOfYear","localWeekday","weekOffset","dayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","defaults","currentDateArray","nowValue","now","_useUTC","getUTCMonth","getMonth","getDate","configFromArray","currentDate","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","setUTCMinutes","getUTCMinutes","w","weekYear","temp","weekdayOverflow","GG","W","E","local__createLocal","_week","gg","ISO_8601","parsedInput","skipped","stringLength","totalParsedInputLength","_meridiem","meridiemFixWrap","hour","isPm","meridiemHour","isPM","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","score","configFromObject","day","minute","second","millisecond","createFromConfig","prepareConfig","add","preparse","configFromInput","isUTC","pickBy","moments","args","Duration","duration","years","quarters","quarter","weeks","days","hours","minutes","seconds","milliseconds","_milliseconds","_days","_data","_bubble","isDuration","offset","separator","utcOffset","offsetFromString","matcher","matches","chunk","chunkOffset","cloneWithOffset","model","diff","clone","setTime","local","getDateOffset","round","getTimezoneOffset","getSetOffset","keepLocalTime","localAdjust","matchShortOffset","_changeInProgress","add_subtract__addSubtract","create__createDuration","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","matchOffset","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","isLocal","isUtcOffset","isUtc","ret","diffRes","aspNetRegex","isoRegex","parseIso","momentsDifference","inp","parseFloat","positiveMomentsDifference","base","isAfter","isBefore","absRound","createAdder","direction","period","dur","tmp","isAdding","moment_calendar__calendar","time","formats","sod","startOf","calendar","localInput","endOf","isBetween","inclusivity","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","delta","monthDiff","anchor2","adjust","wholeMonthDiff","anchor","moment_format__toISOString","inputString","defaultFormatUtc","defaultFormat","postformat","withoutSuffix","humanize","fromNow","toNow","newLocaleData","isoWeekday","to_type__valueOf","unix","toObject","toJSON","moment_valid__isValid","parsingFlags","invalidAt","creationData","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","isoWeek","getISOWeeksInYear","getWeeksInYear","weekInfo","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","localeWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","localeWeekdays","_weekdays","isFormat","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","day_of_week__handleStrictParse","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","weekdaysMin","weekdaysShort","weekdays","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getDay","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","weekdaysShortRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","weekdaysMinRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","getSetDayOfYear","hFormat","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","charAt","localeMeridiem","isLower","parseMs","getZoneAbbr","getZoneName","moment__createUnix","moment__createInZone","parseZone","locale_calendar__calendar","_calendar","_longDateFormat","formatUpper","toUpperCase","_invalidDate","_ordinal","preParsePostFormat","relative__relativeTime","isFuture","_relativeTime","pastFuture","lists__get","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","lists__listMonths","lists__listMonthsShort","lists__listWeekdays","lists__listWeekdaysShort","lists__listWeekdaysMin","duration_abs__abs","mathAbs","duration_add_subtract__addSubtract","duration_add_subtract__add","duration_add_subtract__subtract","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","duration_as__valueOf","makeAs","alias","duration_get__get","makeGetter","substituteTimeAgo","relativeTime","duration_humanize__relativeTime","posNegDuration","thresholds","duration_humanize__getSetRelativeTimeThreshold","threshold","limit","withSuffix","iso_string__toISOString","iso_string__abs","Y","D","asSeconds","fun","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchTimestamp","matchWord","o","defaultLocaleMonths","defaultLocaleMonthsShort","defaultMonthsShortRegex","defaultMonthsRegex","parseTwoDigitYear","getSetYear","prototypeMin","prototypeMax","add_subtract__add","add_subtract__subtract","lang","isoWeekYear","defaultLocaleWeek","getSetDayOfMonth","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","_isPm","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","getSetMinute","getSetSecond","getSetMillisecond","momentPrototype__proto","get","isoWeeks","isoWeeksInYear","isDST","isDSTShifted","zoneAbbr","zoneName","dates","zone","momentPrototype","defaultCalendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","defaultLongDateFormat","LTS","LT","L","LL","LLL","LLLL","defaultInvalidDate","defaultOrdinal","defaultOrdinalParse","defaultRelativeTime","future","past","mm","hh","dd","MM","yy","prototype__proto","firstDayOfYear","firstDayOfWeek","ordinalParse","langData","asMilliseconds","asMinutes","asHours","asDays","asWeeks","asMonths","asYears","duration_prototype__proto","toIsoString","version","invalid","relativeTimeThreshold","_moment","webpackPolyfill","paths","children","webpackContext","req","resolve","buf","oct","_hexToByte","unparse","bth","_byteToHex","v1","clockseq","_clockseq","msecs","nsecs","_lastNSecs","dt","_lastMSecs","tl","tmh","node","_nodeId","n","rnds","random","rng","_rng","globalVar","crypto","getRandomValues","_rnds8","Uint8Array","_rnds","_seedBytes","DOMutil","DataSet","DataView","Queue","Graph3d","graph3d","Camera","Filter","Point2d","Point3d","Slider","StepNumber","Hammer","keycharm","prepareElements","JSONcontainer","elementType","redundant","used","cleanupElements","resetElements","getSVGElement","svgContainer","document","createElementNS","appendChild","getDOMElement","DOMContainer","insertBefore","createElement","drawPoint","x","groupTemplate","labelObj","point","setAttributeNS","size","label","xOffset","yOffset","content","textContent","drawBar","width","height","rect","_options","_fieldId","fieldId","_type","_subscribers","setOptions","queue","_queue","destroy","on","subscribers","subscribe","off","filter","unsubscribe","_trigger","params","senderId","concat","subscriber","addedIds","me","_addItem","items","update","updatedIds","oldData","updatedData","addOrUpdate","oldItem","_updateItem","ids","firstType","returnType","allowedValues","itemIds","itemId","_getItem","order","_sort","_filterFields","resultant","getIds","getDataSet","mappedItems","filteredItem","itemFields","av","bv","remove","removedId","removedIds","_remove","clear","maxField","itemField","minField","distinct","fieldType","count","exists","types","raw","converted","JSON","stringify","delay","Infinity","_timeout","_extended","_flushIfNeeded","flush","methods","original","method","context","entry","clearTimeout","_ids","_onEvent","setData","refresh","oldIds","newIds","added","removed","viewOptions","getArguments","defaultFilter","dataSet","updated","container","SyntaxError","containerElement","margin","defaultXCenter","defaultYCenter","xLabel","yLabel","zLabel","passValueFn","xValueLabel","yValueLabel","zValueLabel","filterLabel","legendLabel","STYLE","DOT","showPerspective","showGrid","keepAspectRatio","showShadow","showGrayBottom","showTooltip","verticalRatio","animationInterval","animationPreload","camera","setArmRotation","setArmLength","eye","dataTable","dataPoints","colX","colY","colZ","colValue","colFilter","xMin","xStep","xMax","yMin","yStep","yMax","zMin","zStep","zMax","valueMin","valueMax","xBarWidth","yBarWidth","axisColor","gridColor","dataColor","fill","stroke","strokeWidth","dotSizeRatio","getMouseX","clientX","targetTouches","getMouseY","clientY","Emitter","_setScale","z","xCenter","yCenter","zCenter","setArmLocation","_convert3Dto2D","point3d","translation","_convertPointToTranslation","_convertTranslationToScreen","ax","ay","az","cx","getCameraLocation","cy","cz","sinTx","sin","getCameraRotation","cosTx","cos","sinTy","cosTy","sinTz","cosTz","dx","dy","dz","bx","by","ex","ey","ez","getArmLength","xcenter","frame","canvas","clientWidth","ycenter","_setBackgroundColor","backgroundColor","borderColor","borderWidth","borderStyle","BAR","BARCOLOR","BARSIZE","DOTLINE","DOTCOLOR","DOTSIZE","GRID","LINE","SURFACE","_getStyleNumber","styleName","_determineColumnIndexes","getNumberOfColumns","getNumberOfRows","counter","column","getDistinctValues","distinctValues","getColumnRange","minMax","_dataInitialize","rawData","_onChange","dataFilter","setOnLoadCallback","redraw","withBars","defaultXBarWidth","dataX","defaultYBarWidth","dataY","xRange","defaultXMin","defaultXMax","defaultXStep","yRange","defaultYMin","defaultYMax","defaultYStep","zRange","defaultZMin","defaultZMax","defaultZStep","valueRange","defaultValueMin","defaultValueMax","_getDataPoints","sortNumber","dataMatrix","xIndex","yIndex","trans","screen","bottom","pointRight","pointTop","pointCross","position","noCanvas","fontWeight","padding","innerHTML","onmousedown","_onMouseDown","ontouchstart","_onTouchStart","onmousewheel","_onWheel","ontooltip","_onTooltip","onkeydown","setSize","_resizeCanvas","clientHeight","animationStart","slider","play","animationStop","stop","_resizeCenter","setCameraPosition","horizontal","vertical","distance","getCameraPosition","getArmRotation","_readData","_redrawFilter","animationAutoStart","cameraPosition","styleNumber","tooltip","showAnimationControls","_redrawSlider","_redrawClear","_redrawAxis","_redrawDataGrid","_redrawDataLine","_redrawDataBar","_redrawDataDot","_redrawInfo","_redrawLegend","ctx","getContext","clearRect","widthMin","widthMax","dotSize","lineWidth","font","ymin","ymax","_hsv2rgb","strokeStyle","beginPath","moveTo","lineTo","strokeRect","fillStyle","closePath","gridLineLen","step","start","getCurrent","end","textAlign","textBaseline","fillText","visible","setValues","setPlayInterval","onchange","getIndex","selectValue","setOnChangeCallback","lineStyle","getLabel","getSelectedValue","prettyStep","text","xText","yText","zText","xMin2d","xMax2d","gridLenX","gridLenY","textMargin","armAngle","H","S","V","R","G","B","C","Hi","X","cross","topSideVisible","zAvg","lineJoin","lineCap","transBottom","dist","sortDepth","aDiff","bDiff","crossproduct","crossProduct","_getStrokeWidth","radius","arc","PI","surface","corners","xWidth","yWidth","surfaces","center","avg","transCenter","leftButtonDown","_onMouseUp","which","button","touchDown","startMouseX","startMouseY","startStart","startEnd","startArmRotation","cursor","onmousemove","_onMouseMove","onmouseup","diffX","diffY","horizontalNew","verticalNew","snapAngle","snapValue","parameters","emit","boundingRect","mouseX","mouseY","tooltipTimeout","_hideTooltip","dataPoint","_dataPointFromXY","_showTooltip","ontouchmove","_onTouchMove","ontouchend","_onTouchEnd","wheelDelta","detail","oldLength","newLength","_insideTriangle","triangle","bs","cs","distMax","closestDataPoint","closestDist","triangle1","triangle2","distX","distY","sqrt","line","dot","dom","borderRadius","boxShadow","borderLeft","contentWidth","offsetWidth","contentHeight","offsetHeight","lineHeight","dotWidth","dotHeight","mixin","_callbacks","once","self","removeListener","removeAllListeners","callbacks","cb","listeners","hasListeners","sub","sum","armLocation","armRotation","armLength","cameraLocation","cameraRotation","calculateCameraOrientation","rot","graph","onLoadCallback","loadInBackground","isLoaded","getLoadedProgress","getColumn","getValues","getValue","dataView","progress","prev","bar","MozBorderRadius","slide","onclick","togglePlay","onChangeCallback","playTimeout","playInterval","playLoop","setIndex","playNext","interval","clearInterval","getPlayInterval","setPlayLoop","doLoop","onChange","indexToLeft","startClientX","startSlideX","leftToIndex","_start","_end","_step","precision","_current","setRange","setStep","calculatePrettyStep","log10","log","LN10","step1","step2","step5","toPrecision","getStep","propagating","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","_firstTarget","hammer","events","propagatedHandler","srcEvent","_handled","stopped","stopPropagation","srcStop","bind","firstTarget","elemHammer","_handlers","Manager","PropagatingHammer","assign","wrapper","pointerType","isFirst","handler","eventType","hammers","idx","exportName","setTimeoutContext","bindFn","invokeArrayArg","arg","each","message","deprecationMessage","inherit","child","properties","childP","baseP","_super","boolOrFn","TYPE_FUNCTION","ifUndefined","val1","val2","addEventListeners","splitStr","removeEventListeners","inStr","str","find","inArray","src","findByKey","uniqueArray","results","prefixed","property","prefix","camelProp","VENDOR_PREFIXES","uniqueId","_uniqueId","getWindowForElement","doc","ownerDocument","defaultView","parentWindow","Input","manager","inputTarget","domHandler","ev","enable","init","createInputInstance","Type","inputClass","SUPPORT_POINTER_EVENTS","PointerEventInput","SUPPORT_ONLY_TOUCH","TouchInput","SUPPORT_TOUCH","TouchMouseInput","MouseInput","inputHandler","pointersLen","pointers","changedPointersLen","changedPointers","INPUT_START","isFinal","INPUT_END","INPUT_CANCEL","session","computeInputData","recognize","prevInput","pointersLength","firstInput","simpleCloneInputData","firstMultiple","offsetCenter","getCenter","timeStamp","deltaTime","angle","getAngle","getDistance","computeDeltaXY","offsetDirection","getDirection","deltaX","deltaY","overallVelocity","getVelocity","overallVelocityX","overallVelocityY","getScale","rotation","getRotation","maxPointers","computeIntervalInputData","offsetDelta","prevDelta","velocity","velocityX","velocityY","last","lastInterval","COMPUTE_INTERVAL","DIRECTION_NONE","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_UP","DIRECTION_DOWN","PROPS_XY","atan2","PROPS_CLIENT_XY","evEl","MOUSE_ELEMENT_EVENTS","evWin","MOUSE_WINDOW_EVENTS","allow","pressed","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","store","pointerEvents","SingleTouchInput","evTarget","SINGLE_TOUCH_TARGET_EVENTS","SINGLE_TOUCH_WINDOW_EVENTS","started","normalizeSingleTouches","all","touches","changed","changedTouches","TOUCH_TARGET_EVENTS","targetIds","getTouches","allTouches","INPUT_MOVE","identifier","changedTargetTouches","touch","mouse","TouchAction","cleanTouchActions","actions","TOUCH_ACTION_NONE","hasPanX","TOUCH_ACTION_PAN_X","hasPanY","TOUCH_ACTION_PAN_Y","TOUCH_ACTION_MANIPULATION","TOUCH_ACTION_AUTO","Recognizer","state","STATE_POSSIBLE","simultaneous","requireFail","stateStr","STATE_CANCELLED","STATE_ENDED","STATE_CHANGED","STATE_BEGAN","directionStr","getRecognizerByNameIfManager","otherRecognizer","recognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","recognizers","preset","handlers","touchAction","toggleCssProps","recognizeWith","requireFailure","cssProps","triggerDomEvent","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","TEST_ELEMENT","nextKey","dest","merge","MOBILE_REGEX","INPUT_TYPE_TOUCH","INPUT_TYPE_PEN","INPUT_TYPE_MOUSE","INPUT_TYPE_KINECT","DIRECTION_HORIZONTAL","DIRECTION_VERTICAL","DIRECTION_ALL","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","POINTER_INPUT_MAP","pointerdown","pointermove","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM",2,3,4,5,"MSPointerEvent","PointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","TOUCH_INPUT_MAP","inputEvent","inputData","isMouse","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_COMPUTE","compute","getTouchAction","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","preventSrc","STATE_RECOGNIZED","STATE_FAILED","dropRecognizeWith","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","process","reset","attrTest","optionPointers","isRecognized","directionTest","hasMoved","inOut","validPointers","validMovement","validTime","taps","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","VERSION","domEvents","userSelect","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","STOP","FORCED_STOP","force","curRecognizer","existing","Tap","Pan","Swipe","Pinch","Rotate","Press","freeGlobal","_exportFunctions","_bound","keydown","keyup","_keys","fromCharCode","down","handleEvent","up","keyCode","bound","shiftKey","bindAll","getKey","unbind","newBindings","Timeline","Graph2d","timeline","Core","DateUtil","Range","TimeStep","components","Item","BackgroundItem","BoxItem","PointItem","RangeItem","BackgroundGroup","Component","CurrentTime","CustomTime","DataAxis","DataScale","GraphGroup","Group","ItemSet","Legend","LineGraph","TimeAxis","_interopRequireDefault","__esModule","default","groups","forthArgument","defaultOptions","autoResize","throttleRedraw","orientation","axis","rtl","maxHeight","minHeight","_create","body","domProps","emitter","hiddenDates","timeAxis","toScreen","_toScreen","toGlobalScreen","_toGlobalScreen","toTime","_toTime","toGlobalTime","_toGlobalTime","range","timeAxis2","currentTime","itemSet","itemsData","groupsData","getEventProperties","oncontextmenu","fitDone","getItemRange","setWindow","animation","fit","setGroups","setItems","_redraw","_Configurator","_Configurator2","_Validator","_Validator2","printStyle","allOptions","configureOptions","_createConfigurator","markDirty","refreshItems","errorFound","validate","selection","getSelection","setSelection","newDataSet","focus","itemData","dataset","getDataRange","_this","minItem","maxItem","factor","lhs","rhs","getStart","getEnd","show","repositionX","startSide","getWidthRight","endSide","getWidthLeft","centerContainer","itemFromTarget","group","groupFromTarget","customTime","customTimeFromTarget","snap","snappedTime","what","foreground","labelSet","groupId","pageX","pageY","_classCallCheck","instance","Constructor","defineProperty","_createClass","defineProperties","descriptor","enumerable","configurable","writable","protoProps","staticProps","_ColorPicker","_ColorPicker2","Configurator","parentModule","defaultContainer","pixelRatio","changedOptions","allowCreation","initialized","popupCounter","showButton","moduleOptions","domElements","popupDiv","popupLimit","popupHistory","colorPicker","_removePopup","_clean","_handleObject","_makeItem","_makeHeader","generateButton","_printOptions","onmouseover","onmouseout","optionsContainer","_push","_showPopupIfNeeded","path","_arguments","_this2","_len","_key","_ret2","div","objectLabel","select","selectedValue","selected","_update","_makeLabel","err","popupString","popupValue","oninput","itemIndex","_setupPopup","_this3","html","hideTimeout","deleteTimeout","_this4","correspondingElement","checkbox","checked","_this5","defaultColor","_showColorPicker","_this6","insertTo","setColor","setUpdateCallback","colorString","setCloseCallback","checkOnly","visibleInSet","subObj","newPath","_getValue","_handleArray","_makeTextInput","_makeCheckbox","draw","physics","solver","enabledPath","enabledValue","_label","error","_makeColorField","_makeDropdown","_makeRange","_constructOptions","optionsObj","pointer","getOptions","hammerUtil","ColorPicker","generated","centerCoordinates","hueCircle","initialColor","previousColor","applied","updateCallback","closeCallback","_bindHammer","_setSize","htmlColors","black","navy","darkblue","mediumblue","darkgreen","teal","darkcyan","deepskyblue","darkturquoise","mediumspringgreen","lime","springgreen","aqua","cyan","midnightblue","dodgerblue","lightseagreen","forestgreen","seagreen","darkslategray","limegreen","mediumseagreen","turquoise","royalblue","steelblue","darkslateblue","mediumturquoise","indigo","darkolivegreen","cadetblue","cornflowerblue","mediumaquamarine","dimgray","slateblue","olivedrab","slategray","lightslategray","mediumslateblue","lawngreen","chartreuse","aquamarine","maroon","purple","olive","gray","skyblue","lightskyblue","blueviolet","darkred","darkmagenta","saddlebrown","darkseagreen","lightgreen","mediumpurple","darkviolet","palegreen","darkorchid","yellowgreen","sienna","brown","darkgray","lightblue","greenyellow","paleturquoise","lightsteelblue","powderblue","firebrick","darkgoldenrod","mediumorchid","rosybrown","darkkhaki","silver","mediumvioletred","indianred","peru","chocolate","tan","lightgrey","palevioletred","thistle","orchid","goldenrod","crimson","gainsboro","plum","burlywood","lightcyan","lavender","darksalmon","violet","palegoldenrod","lightcoral","khaki","aliceblue","honeydew","azure","sandybrown","wheat","beige","whitesmoke","mintcream","ghostwhite","salmon","antiquewhite","linen","lightgoldenrodyellow","oldlace","fuchsia","magenta","deeppink","orangered","tomato","hotpink","coral","darkorange","lightsalmon","orange","lightpink","pink","gold","peachpuff","navajowhite","moccasin","bisque","mistyrose","blanchedalmond","papayawhip","lavenderblush","seashell","cornsilk","lemonchiffon","floralwhite","snow","yellow","lightyellow","ivory","white","setInitial","htmlColor","_isColorString","rgbaArray","_rgbaArray","rgbObj","alpha","_setColor","display","_generateHueCircle","storePrevious","_hide","_updatePicker","alert","angleConvert","colorPickerSelector","colorPickerCanvas","pixelRation","devicePixelRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","setTransform","putImageData","circle","brightnessRange","opacityRange","initialColorDiv","newColorDiv","colorPickerDiv","opacityDiv","brightnessDiv","arrowDiv","_setOpacity","_setBrightness","brightnessLabel","opacityLabel","cancelButton","applyButton","_apply","saveButton","_save","loadButton","_loadLast","drag","pinch","onTouch","_moveSelector","sat","hfac","sfac","fillRect","getImageData","centerY","centerX","newTop","newLeft","onRelease","offTouch","offRelease","disablePreventDefaultVertically","pinchRecognizer","Validator","referenceOptions","subObject","usedOptions","check","__any__","getSuggestion","__type__","checkFields","referenceOption","refOptionObj","optionType","refOptionType","print","printLocation","localSearch","findInOptions","globalSearch","localSearchThreshold","globalSearchThreshold","indexMatch","closestMatch","recursive","closestMatchPath","lowerCaseOption","op","levenshteinDistance","_j","_j2","matrix","deltaDifference","scaleOffset","startToFront","endToFront","moveable","zoomable","zoomMin","zoomMax","animationTimer","_onDragStart","_onDrag","_onDragEnd","_onMouseWheel","_onTouch","_onPinch","validateDirection","byUser","finalStart","finalEnd","_cancelAnimation","initStart","initEnd","easingName","easingFunction","initTime","anyChanged","dragging","ease","done","_applyRange","updateHiddenDates","newStart","newEnd","getRange","conversion","totalHidden","previousDelta","_isInsideRange","allowDragging","getHiddenDurationBetween","diffRange","safeStart","snapAwayFromHidden","safeEnd","startDate","endDate","zoomKey","getPointer","pointerDate","_pointerToDate","zoom","centerDate","hiddenDuration","hiddenDurationBefore","getHiddenDurationBefore","hiddenDurationAfter","move","_isResized","resized","_previousWidth","_previousHeight","convertHiddenOptions","repeat","dateItem","totalRange","pixelTime","runUntil","dayOffset","removeDuplicates","startHidden","isHidden","endHidden","rangeStart","rangeEnd","hidden","safeDates","printDates","stepOverHiddenDates","timeStep","previousTime","stepInHidden","currentValue","current","switchedYear","switchedMonth","switchedDay","correctTimeForHidden","totalDuration","partialDuration","accumulatedHiddenDuration","getAccumulatedHiddenDuration","newTime","timeOffset","requiredDuration","previousPoint","correctionEnabled","Activator","onMouseWheel","isActive","backgroundVertical","backgroundHorizontal","leftContainer","rightContainer","shadowTop","shadowBottom","shadowTopLeft","shadowBottomLeft","shadowTopRight","shadowBottomRight","initialDrawDone","_redrawTimer","scrollTop","scrollTopMin","customTimes","redrawCount","contentContainer","drawPoints","onRender","clickToUse","activator","_initAutoResize","component","configurator","configure","appliedOptions","setModuleOptions","_origRedraw","active","_stopAutoResize","setCustomTime","getCustomTime","setCustomTimeTitle","title","setCustomTitle","addCustomTime","timestamp","removeCustomTime","getVisibleItems","getWindow","borderRootHeight","borderRootWidth","autoHeight","containerHeight","centerWidth","_updateScrollTop","visibilityTop","visibilityBottom","visibility","contentsOverflow","MAX_REDRAW","repaint","setCurrentTime","getCurrentTime","_startAutoResize","_onResize","lastWidth","lastHeight","watchTimer","setInterval","initialScrollTop","oldScrollTop","_getScrollTop","newScrollTop","_setScrollTop","align","groupOrderSwap","fromGroup","toGroup","targetOrder","groupOrder","selectable","multiselect","itemsAlwaysDraggable","editable","updateTime","updateGroup","groupEditable","onAdd","onUpdate","onMove","onRemove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup","itemOptions","itemListeners","_onAdd","_onUpdate","_onRemove","groupListeners","_onAddGroups","_onUpdateGroups","_onRemoveGroups","groupIds","stackDirty","touchParams","groupTouchParams","UNGROUPED","BACKGROUND","box","_updateUngrouped","backgroundGroup","_onSelectItem","_onMultiSelectItem","_onAddItem","groupHammer","_onGroupDragStart","_onGroupDrag","_onGroupDragEnd","addCallback","dirty","displayed","hide","unselect","rawVisibleItems","visibleItems","_deselect","_orderGroups","visibleInterval","zoomed","lastVisibleInterval","restack","firstGroup","_firstGroup","firstMargin","nonFirstMargin","groupMargin","groupResized","firstGroupIndex","firstGroupId","ungrouped","_getGroupId","getLabelSet","oldItemsData","getItems","_order","getGroups","removeItem","_getType","_removeItem","groupData","groupOptions","oldGroupId","oldSubGroupId","subgroup","oldGroup","_constructByEndArray","endArray","dragLeftItem","dragRightItem","itemProps","_getGroupIndex","initialX","dragLeft","_cloneItemData","dragRight","selectedItem","baseGroupIndex","itemsToDrag","groupIndex","groupOffset","ctrlKey","metaKey","_onDragStartAddItem","xAbs","newItem","offsetLeft","updateGroupAllowed","newGroupBase","initial","updateTimeAllowed","initialEnd","initialStart","newOffset","_moveToGroup","originalOrder","movingUp","targetGroupTop","draggedGroupHeight","targetGroupHeight","targetGroup","draggedGroup","newOrder","origOrder","draggedId","numGroups","curPos","orgOffset","slippedPosition","switchGroup","shouldBeGroup","switchGroupId","oldSelection","newSelection","newItemData","itemGroup","lastSelectedGroup","multiselectPerGroup","_getItemRange","_item","itemSetFromTarget","minimumStep","autoScale","FORMAT","minorLabels","majorLabels","setMoment","setFormat","setMinimumStep","roundToMinor","hasNext","setScale","setAutoScale","stepYear","stepMonth","stepDay","stepHour","stepMinute","stepSecond","stepMillisecond","isMajor","getLabelMinor","getLabelMajor","getClassName","even","today","currentWeek","currentMonth","currentYear","subgroups","subgroupIndex","subgroupOrderer","subgroupOrder","byStart","byEnd","checkRangedItems","inner","marker","Element","getLabelWidth","markerHeight","lastMarkerHeight","_calculateSubGroupHeights","limitSize","customOrderedItems","_updateVisibleItems","nostack","_calculateHeight","offsetTop","repositionY","resetSubgroups","setParent","orderSubgroups","_checkIfVisible","sortArray","sortField","removeFromDataSet","startArray","orderByStart","orderByEnd","oldVisibleItems","visibleItemsLookup","lowerBound","upperBound","searchFunction","_checkIfVisibleWithReference","initialPosByStart","_traceVisible","initialPosByEnd","initialPos","breakCondition","isVisible","EPSILON","aTime","bTime","iMax","collidingItem","jj","collision","baseClassName","_updateContents","_updateTitle","_updateDataAttributes","_updateStyle","getComputedStyle","maxWidth","_repaintDeleteButton","_repaintDragLeft","_repaintDragRight","contentStartPosition","parentWidth","boxWidth","groupChanged","deleteButton","template","_contentToString","removeAttribute","dataAttributes","attributes","setAttribute","outerHTML","itemSetHeight","marginLeft","marginRight","onTop","itemSubgroup","totalHeight","newHeight","lines","majorTexts","minorTexts","lineTop","showMinorLabels","showMajorLabels","maxMinorChars","parentChanged","_calculateCharSize","minorLabelHeight","minorCharHeight","majorLabelHeight","majorCharHeight","minorLineHeight","minorLineWidth","majorLineHeight","majorLineWidth","foregroundNextSibling","nextSibling","backgroundNextSibling","_repaintLabels","timeLabelsize","minorCharWidth","xNext","nextIsMajor","prevWidth","labelMinor","xFirstMajorLabel","MAX","showMinorGrid","_repaintMinorText","_repaintMajorText","_repaintMajorLine","_repaintMinorLine","warnedForOverflow","leftTime","leftText","widthText","majorCharWidth","pop","createTextNode","childNodes","nodeValue","measureCharMinor","measureCharMajor","overlay","_onTapOverlay","onClick","_hasParent","deactivate","escListener","activate","eventParams","warned","substring","showCurrentTime","currentTimeTimer","boolean","any","function","null","groupsDraggable","linegraph","initialLoad","getLegend","isGroupVisible","yAxisLeft","yAxisRight","legendLeft","legendRight","screenToValue","yAxisOrientation","defaultGroup","sampling","graphHeight","shaded","barChart","sideBySide","interpolation","parametrization","dataAxis","legend","abortedGraphUpdate","updateSVGheight","updateSVGheightOnResize","forceGraphUpdate","lastStart","svgElements","groupsUsingDefaultStyles","svg","framework","Bars","Lines","Points","_removeGroup","_updateAllGroupData","removeGroup","_updateGroup","addGroup","groupsContent","groupCounts","extended","orginalY","_updateGraph","rangePerPixelInv","_getSortedGroupIds","grouplist","zIndex","bz","groupRanges","changeCalled","minDate","maxDate","_getRelevantData","_applySampling","_convertXcoordinates","_getYRanges","_updateYAxis","below","excludeFromStacking","_stack","_convertYcoordinates","calcPath","subGroupId","drawShading","subData","subPrevPoint","subNextPoint","dateComparator","first","dataContainer","increment","amountOfPoints","xDistance","pointsPerPixel","sampledData","combinedDataLeft","combinedDataRight","getYRange","getStackedYRange","minVal","maxVal","yAxisLeftUsed","yAxisRightUsed","minLeft","minRight","maxLeft","maxRight","ignore","_toggleAxisVisiblity","drawIcons","master","masterAxis","lineOffset","tempGroups","axisUsed","datapoints","screen_x","screen_y","svgHeight","convertValue","setZeroPosition","linegraphOptions","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","alignZeros","linegraphSVG","DOMelements","labels","conversionFactor","minWidth","stepPixels","zeroCrossing","amountOfSteps","iconsRemoved","amountOfGroups","lineContainer","graphOptions","_redrawGroupIcons","iconHeight","iconOffset","groupArray","_cleanupIcons","activeGroups","_redrawLabels","_redrawTitle","customRange","autoScaleEnd","autoScaleStart","followScale","maxLabelSize","getLines","major","_redrawLabel","_redrawLine","titleWidth","titleCharHeight","characterHeight","largestWidth","textMinor","textMajor","textTitle","measureCharTitle","titleCharWidth","zeroAlign","formattingFunction","majorSteps","minorSteps","customLines","minorStepIdx","magnitudefactor","determineScale","rounded","setCharHeight","setHeight","minimumStepValue","orderOfMagnitude","solutionFound","stepSize","is_major","getFirstMajor","majorStep","formatValue","bottomOffset","oldStepIdx","oldStart","oldEnd","increaseMagnitude","decreaseMagnitude","otherZero","otherStep","newRange","myOriginalZero","majorOffset","zeroOffset","pixels","usingDefaultStyle","zeroPosition","drawIcon","icon","Bargraph","fillHeight","outline","barWidth","originalWidth","bar1Height","bar2Height","processedGroupData","coreDistance","drawData","combinedData","intersections","barPoints","_getDataIntersections","heightOffset","_getSafeDrawData","amount","resolved","accumulatedNegative","accumulatedPositive","pointData","groupLabel","_getStackedYRange","xpos","getGroupTemplate","callbackResult","getCallback","Line","_catmullRom","_linear","fillPath","pathArray","subPathArray","dFill","zero","serializePath","inverse","_catmullRomUniform","p0","bp1","bp2","normalization","d1","d2","d3","A","N","d3powA","d2powA","d3pow2A","d2pow2A","d1pow2A","d1powA","side","iconSize","iconSpacing","excludeFromLegend","textArea","scrollableHeight","drawLegendIcons","paddingTop","Network","network","Images","dotparser","gephiParser","convertDot","DOTToGraph","convertGephi","parseGephi","nodes","nodeIndices","edges","edgeIndices","eventListeners","onTap","onDoubleTap","onHold","onDragStart","onDrag","onDragEnd","onPinch","onMouseMove","onContext","functions","createNode","createEdge","view","bindEventListeners","images","_Images2","_Groups2","_Canvas2","selectionHandler","_SelectionHandler2","interactionHandler","_InteractionHandler2","_View2","renderer","_CanvasRenderer2","_PhysicsEngine2","layoutEngine","_LayoutEngine2","clustering","_Clustering2","manipulation","_ManipulationSystem2","nodesHandler","_NodesHandler2","edgesHandler","_EdgesHandler2","_KamadaKawai2","_Images","_Groups","_NodesHandler","_EdgesHandler","_PhysicsEngine","_Clustering","_CanvasRenderer","_Canvas","_View","_InteractionHandler","_SelectionHandler","_LayoutEngine","_ManipulationSystem","_KamadaKawai","layout","interaction","networkOptions","_updateVisibleIndices","nodeId","edgeId","_updateValueRange","unselectAll","dotData","gephi","gephiData","valueTotal","setValueRange","canvasToDOM","DOMtoCanvas","findNode","isCluster","openCluster","cluster","getNodesInCluster","clusterByConnection","clusterByHubsize","clusterOutliers","getSeed","enableEditMode","disableEditMode","addNodeMode","editNode","editNodeMode","addEdgeMode","editEdgeMode","deleteSelected","getPositions","storePositions","moveNode","getBoundingBox","getConnectedNodes","objectId","getConnectedEdges","startSimulation","stopSimulation","stabilize","getSelectedNodes","getSelectedEdges","getNodeAt","getEdgeAt","edge","selectNodes","selectEdges","getViewPosition","releaseNode","getOptionsFromConfigurator","imageBroken","url","imageToCache","brokenUrl","imageToLoadBrokenUrlOn","onerror","_addImageToCache","Image","imageToRedrawWith","cachedImage","img","onload","_redrawWithImage","_tryloadBrokenUrl","Groups","defaultIndex","groupsArray","defaultGroups","useDefaultGroups","optionFields","groupName","groupname","_index","_Node","_Node2","_Label","_Label2","NodesHandler","nodesListeners","borderWidthSelected","brokenImage","fixed","face","strokeColor","image","labelHighlightBold","level","mass","scaling","maxVisible","drawThreshold","customScalingFunction","shadow","shape","shapeProperties","borderDashes","useImageSize","useBorderWithImage","parseOptions","updateShape","updateLabelModule","_reset","_nodeId2","doNotEmit","oldNodesData","newNodes","positionInitially","changedData","dataChanged","constructorClass","clearPositions","dataArray","_node","_node2","boundingBox","nodeList","nodeObj","toId","fromId","edgeList","_Box","_Box2","_Circle","_Circle2","_CircularImage","_CircularImage2","_Database","_Database2","_Diamond","_Diamond2","_Dot","_Dot2","_Ellipse","_Ellipse2","_Icon","_Icon2","_Image","_Image2","_Square","_Square2","_Star","_Star2","_Text","_Text2","_Triangle","_Triangle2","_TriangleDown","_TriangleDown2","Node","imagelist","baseSize","baseFontSize","predefinedPosition","labelModule","currentShape","groupObj","imageObj","load","distanceToBorder","sizeDiff","fontDiff","updateBoundingBox","resize","parentOptions","newOptions","parsedColor","_slicedToArray","sliceIterator","_arr","_n","_e","_s","Label","edgelabel","pointToSelf","fontOptions","yLine","isEdgeLabel","nodeOptions","labelDirty","baseline","viewFontSize","calculateLabelSize","_drawBackground","_drawText","lineMargin","fontSize","_getColor2","_getColor","_getColor3","fontColor","_setAlignment2","_setAlignment","_setAlignment3","lineCount","strokeText","_processLabel","measureText","newOptionsArray","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","setPrototypeOf","__proto__","_NodeBase2","_NodeBase3","Box","_NodeBase","getPrototypeOf","textSize","getTextSize","selectionLineWidth","roundRect","enableShadow","disableShadow","save","enableBorderDashes","disableBorderDashes","restore","NodeBase","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","setLineDash","dashes","_CircleImageBase2","_CircleImageBase3","Circle","_CircleImageBase","diameter","_drawRawCircle","CircleImageBase","labelOffset","imageLoaded","ratio","neutralborderWidth","globalAlpha","can2","ctx2","drawImage","iterations","labelDimensions","CircularImage","_swapToImageResizeWhenImageLoaded","_resizeImage","clip","_drawImageAtPosition","_drawImageLabel","Database","database","_distanceToBorder","_ShapeBase2","_ShapeBase3","Diamond","_ShapeBase","_resizeShape","_drawShape","ShapeBase","sizeMultiplier","Dot","Ellipse","ellipse","Icon","_icon","iconTextSpacing","Square","Star","Text","Triangle","TriangleDown","_Edge","_Edge2","EdgesHandler","edgesListeners","arrows","scaleFactor","arrowStrikethrough","hoverWidth","selectionWidth","selfReferenceSize","smooth","forceDirection","roundness","emitChange","edgeData","edgeOptions","reconnectEdges","markAllEdgesAsDirty","updateEdgeType","_edgeId","oldEdgesData","edgesData","oldEdge","disconnect","showInternalIds","connect","cleanup","edgeType","colorDirty","_CubicBezierEdge","_CubicBezierEdge2","_BezierEdgeDynamic","_BezierEdgeDynamic2","_BezierEdgeStatic","_BezierEdgeStatic2","_StraightEdge","_StraightEdge2","Edge","baseWidth","connected","_setInteractionWidths","changeInType","attachEdge","detachEdge","widthDiff","viaNode","getViaNode","arrowData","fromPoint","toPoint","getArrowData","core","drawLine","drawArrows","drawLabel","drawArrowHead","node1","node2","getPoint","translate","_rotateForLabelAlignment","_pointOnCircle","xFrom","yFrom","xTo","yTo","xObj","yObj","getDistanceToEdge","angleInDegrees","rotate","percentage","colorsDefined","_CubicBezierEdgeBase2","_CubicBezierEdgeBase3","CubicBezierEdge","_CubicBezierEdgeBase","viaNodes","via1","via2","bezierCurveTo","x1","y1","x2","y2","_getViaCoordinates","nearNode","_findBorderPositionBezier","x3","y3","_ref","_ref2","_getDistanceToBezierEdge","_ref3","_ref4","vec","_BezierEdgeBase2","_BezierEdgeBase3","CubicBezierEdgeBase","_BezierEdgeBase","minDistance","lastX","lastY","_getDistanceToLine","_EdgeBase2","_EdgeBase3","BezierEdgeBase","_EdgeBase","distanceToPoint","difference","via","EdgeBase","getColor","getLineWidth","_drawDashedLine","_drawLine","_line","_getCircleData2","_getCircleData","_getCircleData3","_circle","pattern","lineDashOffset","_getCircleData4","_getCircleData5","dashedLine","_getCircleData6","_getCircleData7","_x","_y","_radius","_findBorderPosition","_findBorderPositionCircle","_getCircleData8","_getCircleData9","colorOptions","grd","createLinearGradient","fromColor","toColor","addColorStop","_getDistanceToEdge","_getCircleData10","_getCircleData11","px","py","something","u","arrowPoint","guideOffset","findBorderPosition","guidePos","_getCircleData12","_getCircleData13","xi","yi","arrowCore","arrow","BezierEdgeDynamic","_boundFunction","positionBezierNode","physicsChange","setupSupportNode","parentEdgeId","quadraticCurveTo","BezierEdgeStatic","xVia","yVia","pi","originalAngle","myAngle","_pi","_originalAngle","_myAngle","StraightEdge","edgeSegmentLength","toBorderDist","toBorderPoint","borderPos","_BarnesHutSolver","_BarnesHutSolver2","_RepulsionSolver","_RepulsionSolver2","_HierarchicalRepulsionSolver","_HierarchicalRepulsionSolver2","_SpringSolver","_SpringSolver2","_HierarchicalSpringSolver","_HierarchicalSpringSolver2","_CentralGravitySolver","_CentralGravitySolver2","_FA2BasedRepulsionSolver","_FA2BasedRepulsionSolver2","_FA2BasedCentralGravitySolver","_FA2BasedCentralGravitySolver2","PhysicsEngine","physicsBody","physicsNodeIndices","physicsEdgeIndices","forces","velocities","physicsEnabled","simulationInterval","requiresTimeout","previousStates","referenceState","freezeCache","renderTimer","adaptiveTimestep","adaptiveTimestepEnabled","adaptiveCounter","adaptiveInterval","stabilized","startedStabilization","stabilizationIterations","ready","barnesHut","theta","gravitationalConstant","centralGravity","springLength","springConstant","damping","avoidOverlap","forceAtlas2Based","repulsion","nodeDistance","hierarchicalRepulsion","maxVelocity","minVelocity","stabilization","updateInterval","onlyDynamicEdges","timestep","layoutFailed","initPhysics","updatePhysicsData","nodesSolver","edgesSolver","gravitySolver","modelOptions","viewFunction","simulationStep","_emitStabilized","startTime","physicsTick","physicsTime","runDoubleSpeed","amountOfIterations","calculateForces","moveNodes","revert","_evaluateStepQuality","nodeIds","positions","vx","vy","dpos","reference","maxNodeVelocity","averageNodeVelocity","velocityAdaptiveThreshold","nodeVelocity","_performStep","totalVelocity","solve","targetIterations","_freezeNodes","_stabilizationBatch","_finalizeStabilization","_restoreFrozenNodes","colorFactor","forceSize","arrowSize","BarnesHutSolver","barnesHutTree","randomSeed","thetaInversed","overlapAvoidanceFactor","nodeCount","_formBarnesHutTree","_getForceContribution","NW","NE","SW","SE","parentBranch","childrenCount","centerOfMass","calcSize","_calculateForces","gravityForce","fx","fy","minX","minY","maxX","maxY","minimumTreeSize","rootSize","halfRootSize","_splitBranch","_placeInTree","totalMass","totalMassInv","biggestSize","skipMassUpdate","_updateBranchMass","_placeInRegion","region","seededRandom","containedNode","_insertRegion","childSize","_drawBranch","branch","RepulsionSolver","repulsingForce","HierarchicalRepulsionSolver","steepness","SpringSolver","edgeLength","node3","_calculateSpringForce","springForce","HierarchicalSpringSolver","springFx","springFy","_i2","totalFx","totalFy","_i3","correctionFx","correctionFy","_i4","_nodeId3","CentralGravitySolver","_BarnesHutSolver3","ForceAtlas2BasedRepulsionSolver","degree","_CentralGravitySolver3","ForceAtlas2BasedCentralGravitySolver","_NetworkUtil","_NetworkUtil2","_Cluster","_Cluster2","ClusterEngine","clusteredNodes","clusteredEdges","hubsize","_getHubSize","_checkOptions","nodesToCluster","refreshData","joinCondition","childNodesObj","childEdgesObj","clonedOptions","cloneOptions","_cluster","edgeCount","clusters","usedNodes","relevantEdgeCount","gatheringSuccessful","childNodeId","_getConnectedId","clusterByEdgeCount","clusterNodeProperties","parentNodeId","parentClonedOptions","childClonedOptions","clusterEdgeProperties","childNode","otherNodeId","childKeys","createEdges","_edge","newEdge","clusteringEdgeReplacingId","_backupEdgeOptions","processProperties","childNodesOptions","childEdgesOptions","_clonedOptions","clusterId","_getClusterPosition","clusterNode","containedNodes","containedEdges","_createClusterEdges","originalOptions","clusterNodeId","releaseFunction","clusterPosition","newPositions","_containedNode","_nodeId4","_containedNode2","_nodeId5","_containedNode3","edgesToBeDeleted","otherCluster","transferEdge","replacedEdge","_restoreEdge","nodesArray","reverse","average","averageSquared","hubCounter","largestHub","variance","standardDeviation","hubThreshold","NetworkUtil","allNodes","specificNodes","amountOfConnections","_Node3","Cluster","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","CanvasRenderer","redrawRequested","renderingActive","renderRequests","allowRedraw","hideEdgesOnDrag","hideNodesOnDrag","_determineBrowserMethod","_resizeNodes","_requestRedraw","_startRendering","cancelAnimationFrame","_renderStep","_drawEdges","_drawNodes","alwaysShow","topLeft","bottomRight","viewableArea","isSelected","isBoundingBoxOverlappingWith","browserType","Canvas","resizeTimer","resizeFunction","cameraState","hammerFrame","_cleanUp","previousWidth","previousHeight","widthRatio","heightRatio","newScale","currentViewCenter","distanceFromCenter","tabIndex","_prepareValue","emitEvent","oldWidth","oldHeight","previousRatio","_getCameraState","_setCameraState","_XconvertCanvasToDOM","_YconvertCanvasToDOM","_XconvertDOMtoCanvas","_YconvertDOMtoCanvas","View","animationSpeed","renderRefreshRate","animationEasingFunction","easingTime","sourceScale","targetScale","sourceTranslation","targetTranslation","lockedOnNodeId","lockedOnNodeOffset","touchTime","initialZoom","zoomLevel","positionDefined","numberOfNodes","yDistance","xZoomLevel","yZoomLevel","findCenter","animationOptions","nodePosition","lockedOnNode","animateView","locked","_transitionRedraw","viewCenter","_lockedRedraw","finished","_NavigationHandler","_NavigationHandler2","_Popup","_Popup2","InteractionHandler","navigationHandler","popup","popupObj","popupTimer","dragNodes","dragView","keyboard","speed","bindToWindow","navigationButtons","tooltipDelay","zoomView","pinched","checkSelectionChanges","_generateClickEvent","previouslySelectedEdgeCount","_getSelectedEdgeCount","previouslySelectedNodeCount","_getSelectedNodeCount","previousSelection","selectAdditionalOnPoint","selectOnPoint","selectedEdgesCount","selectedNodesCount","currentSelection","_determineIfDifferent2","_determineIfDifferent","nodesChanged","edgesChanged","nodeSelected","selectObject","selectionObj","xFixed","yFixed","scaleOld","preScaleDragPointer","scaleFrac","tx","ty","postScaleDragPointer","popupVisible","_checkHidePopup","setPosition","_checkShowPopup","hoverObject","pointerObj","previousPopupObjId","nodeUnderCursor","popupType","overlappingNodes","isOverlappingWith","getTitle","overlappingEdges","popupTargetType","popupTargetId","setText","_pointerToPositionObject","stillOnObj","overNode","NavigationHandler","iconsCreated","navigationHammers","boundFunctions","activated","configureKeyboardBindings","loadNavigationElements","cleanNavigation","navigationDOM","navigationDivs","navigationDivActions","_fit","bindToRedraw","_stopMovement","boundAction","unbindFromRedraw","Popup","doShow","SelectionHandler","hoverObj","selectConnectedEdges","hoverConnectedEdges","updateSelection","selectionChanged","deselectObject","emptySelection","DOM","highlightEdges","_selectConnectedEdges","_addToSelection","_removeFromSelection","canvasPos","returnNode","positionObject","_getAllNodesOverlappingWith","_getEdgesOverlappingWith","returnEdge","_getAllEdgesOverlappingWith","_unselectConnectedEdges","clusterSize","_addToHover","hoverChanged","blurObject","_hoverConnectedEdges","edgeIds","idArray","RangeError","LayoutEngine","initialRandomSeed","setPhysics","optionsBackup","improvedLayout","hierarchical","levelSeparation","nodeSpacing","treeSpacing","blockShifting","edgeMinimization","parentCentralization","sortMethod","setupHierarchicalLayout","layoutNetwork","prevHierarchicalState","adaptAllOptionsForHierarchicalLayout","MAX_LEVELS","clusterThreshold","startLength","before","clusterBridges","after","_declusterAll","info","kamadaKawai","_shiftToCenter","getRangeCore","clustersPresent","definedLevel","definedPositions","undefinedLevel","hierarchicalLevels","lastNodeOnLevel","hierarchicalChildrenReference","hierarchicalParentReference","hierarchicalTrees","treeIndex","distributionOrdering","distributionIndex","distributionOrderingPresence","_determineLevelsByHubsize","_determineLevelsDirected","_determineLevelsCustomCallback","distribution","_getDistribution","_generateMap","_placeNodesByHierarchy","_condenseHierarchy","stillShifting","branches","shiftTrees","treeSizes","getTreeSizes","shiftTree","_getPositionForHierarchy","_setPositionForHierarchy","getTreeSize","treeWidths","getBranchNodes","getBranchBoundary","branchMap","maxLevel","minSpace","maxSpace","branchNode","_getSpaceAroundNode2","_getSpaceAroundNode","_getSpaceAroundNode3","minSpaceNode","maxSpaceNode","getMaxLevel","getCollisionLevel","maxLevel1","maxLevel2","hasSameParent","parents1","parents2","shiftElementsCloser","levels","centerParents","levelNodes","branchShiftCallback","centerParent","diffAbs","branchNodes1","branchNodes2","_getBranchBoundary","_getBranchBoundary2","max1","_getBranchBoundary3","_getBranchBoundary4","min2","minSpace2","diffBranch","_shiftBlock","_centerParent","minimizeEdgeLength","allEdges","nodeLevel","C2","referenceNodes","aboveEdges","otherNode","getFx","getDFx","getGuess","guess","guessMap","dfx","moveBranch","branchNodes","_getBranchBoundary5","_getBranchBoundary6","minSpaceBranch","maxSpaceBranch","branchOffset","_getSpaceAroundNode4","_getSpaceAroundNode5","newPosition","minimizeEdgeLengthBottomUp","shiftBranchesCloserBottomUp","centerAllParents","centerAllParentsBottomUp","useMap","prevNode","prevPos","nextNode","nextPos","parents","parentId","minPos","maxPos","_i5","_getSpaceAroundNode6","_getSpaceAroundNode7","positionedNodes","nodeArray","_indexArrayToNodes","_sortNodeArray","handledNodeCount","_validataPositionAndContinue","parentLevel","_i6","childNodeLevel","_i7","previousPos","sharedParent","_findCommonParent","withChild","_placeBranchNodes","hubSize","levelDownstream","nodeA","nodeB","_crawlNetwork","minLevel","customCallback","levelByDirection","levelA","_setMinLevelToZero","fillInRelations","_this7","startingNodeId","crawler","tree","childA","childB","_this8","iterateParents","findParent","foundParent","doNotUpdate","ManipulationSystem","editMode","manipulationDiv","editModeDiv","closeDiv","manipulationHammers","temporaryUIFunctions","temporaryEventFunctions","temporaryIds","guiEnabled","inMode","selectedControlNode","initiallyActive","addNode","addEdge","editEdge","deleteNode","deleteEdge","controlNodeStyle","_restore","_setup","showManipulatorToolbar","_createEditButton","manipulationDOM","selectedNodeCount","selectedEdgeCount","selectedTotalCount","needSeperator","_createAddNodeButton","_createSeperator","_createAddEdgeButton","_createEditNodeButton","_createEditEdgeButton","_createDeleteButton","_bindHammerToDiv","toggleEditMode","_temporaryBindEvent","_createBackButton","_createDescription","_performAddNode","_getSelectedNode","finalizedData","_temporaryBindUI","_handleConnect","_finishConnect","_dragControlNode","edgeBeingEditedId","controlNodeFrom","_getNewTargetNode","controlNodeTo","_controlNodeTouch","_controlNodeDragStart","_controlNodeDrag","_controlNodeDragEnd","findBorderPositions","selectedNodes","selectedEdges","deleteFunction","_createWrappers","_removeManipulationDOM","_createButton","_cleanManipulatorHammers","_cleanupTemporaryNodesAndEdges","_unbindTemporaryUIs","_unbindTemporaryEvents","deleteBtnClass","labelClassName","newFunction","boundFunction","UIfunctionName","functionName","eventName","domElement","indexTempEdge","indexTempNode","lastTouch","fromSelect","toSelect","overlappingNodeIds","_performEditEdge","targetNode","connectionEdge","connectFromId","_performAddEdge","clickData","defaultData","sourceNodeId","targetNodeId","_FloydWarshall","_FloydWarshall2","KamadaKawai","edgeStrength","distanceSolver","edgesArray","ignoreClusters","D_matrix","getDistances","_createL_matrix","_createK_matrix","innerThreshold","maxInnerIterations","maxEnergy","highE_nodeId","dE_dx","dE_dy","delta_m","subIterations","_getHighestEnergyNode2","_getHighestEnergyNode","_getHighestEnergyNode3","_moveNode","_getEnergy2","_getEnergy","_getEnergy3","maxEnergyNodeId","dE_dx_max","dE_dy_max","nodeIdx","_getEnergy4","_getEnergy5","x_m","y_m","iIdx","x_i","y_i","denominator","K_matrix","L_matrix","d2E_dx2","d2E_dxdy","d2E_dy2","FloydWarshall","CanvasRenderingContext2D","square","s2","ir","triangleDown","star","diamond","r2d","kappa","ox","oy","xe","ye","xm","ym","wEllipse","hEllipse","ymb","yeb","xt","yt","xl","yl","xr","yr","patternLength","slope","distRemaining","patternIndex","dashLength","parseDOT","parseGraph","nextPreview","isAlphaNumeric","regexAlphaNumeric","setValue","graphs","attr","getToken","tokenType","TOKENTYPE","NULL","isComment","DELIMITER","c2","DELIMITERS","IDENTIFIER","newSyntaxError","UNKNOWN","chop","parseStatements","parseStatement","subgraph","parseSubgraph","parseEdge","parseAttributeStatement","parseNodeStatement","subgraphs","parseAttributeList","maxLength","forEach2","elem1","elem2","setProp","convertAttr","mapping","visProp","visPropI","graphData","dotNode","graphNode","NODE_ATTR_MAPPING","convertEdge","dotEdge","graphEdge","EDGE_ATTR_MAPPING","subEdge","fontsize","fontcolor","labelfontcolor","fontname","fillcolor","labeltooltip","{","}","[","]",";","=",",","->","--","gephiJSON","inheritColor","gEdges","gNodes","gEdge","gNode","edit","del","back","addDescription","edgeDescription","editEdgeDescription","createEdgeError","deleteClusterError","editClusterError"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyBA,cAEA,SAA2CA,EAAMC,GAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,IACQ,kBAAXG,SAAyBA,OAAOC,IAC9CD,UAAWH,GACe,gBAAZC,SACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,KACbK,KAAM,WACT,MAAgB,UAAUC,GAKhB,QAASC,GAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUP,OAGnC,IAAIC,GAASO,EAAiBD,IAC7BP,WACAS,GAAIF,EACJG,QAAQ,EAUT,OANAL,GAAQE,GAAUI,KAAKV,EAAOD,QAASC,EAAQ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LC,KAAM,OACN3N,QAAS,WACTC,QAAS,WACTvhC,SAAU,YACVwhC,SAAU,YACV0N,eAAgB,+CAChBC,gBAAiB,qEACjBC,oBAAqB,wEACrBC,gBAAiB,kCACjBC,mBAAoB,8BACpBC,iBAAkB,8BAEpBpzI,EAAe,MAAIA,EAAY,GAC/BA,EAAe,MAAIA,EAAY,GAG/BA,EAAY,IACV4yI,KAAM,YACNC,IAAK,iBACLC,KAAM,SACN3N,QAAS,oBACTC,QAAS,mBACTvhC,SAAU,mBACVwhC,SAAU,kBACV0N,eAAgB,oEAChBC,gBAAiB,8FACjBC,oBAAqB,0FACrBC,gBAAiB,0DACjBC,mBAAoB,wCACpBC,iBAAkB,yCAEpBpzI,EAAe,MAAIA,EAAY,GAG/BA,EAAY,IACV4yI,KAAM,SACNC,IAAK,qBACLC,KAAM,QACN3N,QAAS,cACTC,QAAS,gBACTvhC,SAAU,cACVwhC,SAAU,gBACV0N,eAAgB,0DAChBC,gBAAiB,8EACjBC,oBAAqB,2EACrBC,gBAAiB,8CACjBC,mBAAoB,iCACpBC,iBAAkB,gCAEpBpzI,EAAe,MAAIA,EAAY,GAG/BA,EAAY,IACV4yI,KAAM,WACNC,IAAK,uBACLC,KAAM,QACN3N,QAAS,iBACTC,QAAS,iBACTvhC,SAAU,gBACVwhC,SAAU,gBACV0N,eAAgB,uDAChBC,gBAAiB,6EACjBC,oBAAqB,kFACrBC,gBAAiB,wCACjBC,mBAAoB,0CACpBC,iBAAkB,0CAEpBpzI,EAAe,MAAIA,EAAY,GAC/BA,EAAe,MAAIA,EAAY","file":"vis.map"} \ No newline at end of file diff --git a/dist/vis.min.css b/dist/vis.min.css index 40d182cf..c324706b 100644 --- a/dist/vis.min.css +++ b/dist/vis.min.css @@ -1 +1 @@ -.vis-background,.vis-labelset,.vis-timeline{overflow:hidden}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper::after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}.vis-panel,.vis-timeline{padding:0;box-sizing:border-box}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:rgba(0,0,0,0);width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2 0,#385380 100%);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(to bottom,#3876c2 0,#385380 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380', GradientType=0 );box-shadow:#111927 0 0 1px 0;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8', GradientType=0 )}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:#fff solid 1px;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0);border-left-color:rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0);border-left-color:#f2faff;border-width:12px;margin-top:-12px}.vis-timeline{position:relative;border:1px solid #bfbfbf;margin:0}.vis-panel{position:absolute;margin:0}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-top{border-left-style:solid;border-right-style:solid}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px rgba(0,0,0,.8)}.vis-itemset,.vis-labelset,.vis-labelset .vis-label{position:relative;box-sizing:border-box}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-labelset .vis-label{left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label.draggable{cursor:pointer}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-itemset{padding:0;margin:0}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-item{position:absolute;color:#1A1A1A;border-color:#97B0F8;border-width:1px;background-color:#D5DDF6;display:inline-block}.vis-item.vis-point.vis-selected,.vis-item.vis-selected{background-color:#FFF785}.vis-item.vis-selected{border-color:#FFC200;z-index:2}.vis-editable.vis-selected{cursor:move}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:rgba(213,221,246,.4);box-sizing:border-box;padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item .vis-delete,.vis-item .vis-delete-rtl{background:url(img/timeline/delete.png) center no-repeat;height:24px;top:-4px;cursor:pointer}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.vis-background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-delete{position:absolute;width:24px;right:-24px}.vis-item .vis-delete-rtl{position:absolute;width:24px;left:-24px}.vis-item.vis-range .vis-drag-left{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0;right:-4px;cursor:e-resize}.vis-range.vis-item.vis-readonly .vis-drag-left,.vis-range.vis-item.vis-readonly .vis-drag-right{cursor:auto}.vis-time-axis{position:relative;overflow:hidden}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;overflow:hidden;box-sizing:border-box;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-vertical-rtl{position:absolute;border-right:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-current-time{background-color:#FF7F6E;width:2px;z-index:1}.vis-custom-time{background-color:#6E94FF;width:2px;cursor:move;z-index:1}div.vis-network div.vis-close,div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;-webkit-transform-origin:right bottom;-moz-transform-origin:right bottom;-ms-transform-origin:right bottom;-o-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.vis-legend{background-color:rgba(247,252,255,.65);padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px rgba(154,154,154,.55)}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}div.vis-network div.vis-manipulation{border-width:0;border-bottom:1px;border-style:solid;border-color:#d6d9d8;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(to bottom,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc', GradientType=0 );padding-top:4px;position:absolute;left:0;top:0;width:100%;height:28px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:5px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url(img/network/cross.png);user-select:none}div.vis-network div.vis-close:hover{opacity:.6}div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{float:left;font-family:verdana;font-size:12px;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin-left:10px;padding:0 8px;user-select:none}div.vis-network div.vis-manipulation div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,.2)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,.5)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url(img/network/backIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px transparent;cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px transparent}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:700}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url(img/network/addNodeIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit,div.vis-network div.vis-manipulation div.vis-button.vis-edit{background-image:url(img/network/editIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url(img/network/connectIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url(img/network/deleteIcon.png)}div.vis-network div.vis-edit-mode div.vis-label,div.vis-network div.vis-manipulation div.vis-label{margin:0 0 0 23px;line-height:25px}div.vis-network div.vis-manipulation div.vis-separator-line{float:left;display:inline-block;width:1px;height:21px;background-color:#bdbdbd;margin:0 7px 0 15px}div.vis-network-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;background-color:#f5f4ed;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,.2);pointer-events:none}div.vis-network div.vis-navigation div.vis-button{width:34px;height:34px;-moz-border-radius:17px;border-radius:17px;position:absolute;display:inline-block;background-position:2px 2px;background-repeat:no-repeat;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-navigation div.vis-button:hover{box-shadow:0 0 3px 3px rgba(56,207,21,.3)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url(img/network/upArrow.png);bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url(img/network/downArrow.png);bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url(img/network/leftArrow.png);bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url(img/network/rightArrow.png);bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url(img/network/plus.png);bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url(img/network/minus.png);bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url(img/network/zoomExtends.png);bottom:50px;right:15px}div.vis-color-picker{position:absolute;top:0;left:30px;margin-top:-140px;margin-left:30px;width:310px;height:444px;z-index:1;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:rgba(0,0,0,.5) 0 0 10px 0}div.vis-color-picker div.vis-arrow{position:absolute;top:147px;left:5px}div.vis-color-picker div.vis-arrow::after,div.vis-color-picker div.vis-arrow::before{right:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.vis-color-picker div.vis-arrow:after{border-color:rgba(255,255,255,0);border-right-color:#fff;border-width:30px;margin-top:-30px}div.vis-color-picker div.vis-color{position:absolute;width:289px;height:289px;cursor:pointer}div.vis-color-picker div.vis-brightness{position:absolute;top:313px}div.vis-color-picker div.vis-opacity{position:absolute;top:350px}div.vis-color-picker div.vis-selector{position:absolute;top:137px;left:137px;width:15px;height:15px;border-radius:15px;border:1px solid #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(to bottom,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313', GradientType=0 )}div.vis-color-picker div.vis-initial-color,div.vis-color-picker div.vis-new-color{width:140px;height:20px;top:380px;font-size:10px;color:rgba(0,0,0,.4);line-height:20px;position:absolute;vertical-align:middle}div.vis-color-picker div.vis-new-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:159px;text-align:right;padding-right:2px}div.vis-color-picker div.vis-initial-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:10px;text-align:left;padding-left:2px}div.vis-color-picker div.vis-label{position:absolute;width:300px;left:10px}div.vis-color-picker div.vis-label.vis-brightness{top:300px}div.vis-color-picker div.vis-label.vis-opacity{top:338px}div.vis-color-picker div.vis-button{position:absolute;width:68px;height:25px;border-radius:10px;vertical-align:middle;text-align:center;line-height:25px;top:410px;border:2px solid #d9d9d9;background-color:#f7f7f7;cursor:pointer}div.vis-color-picker div.vis-button.vis-cancel{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px} \ No newline at end of file +div.vis-network div.vis-close,div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-khtml-user-select:none}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper::after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:rgba(0,0,0,0);width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:-moz-linear-gradient(top,#3876c2 0,#385380 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#3876c2),color-stop(100%,#385380));background:-webkit-linear-gradient(top,#3876c2 0,#385380 100%);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(to bottom,#3876c2 0,#385380 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#3876c2', endColorstr='#385380', GradientType=0 );box-shadow:#111927 0 0 1px 0;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:-moz-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#9d9d9d),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(to bottom,#9d9d9d 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d9d9d', endColorstr='#c8c8c8', GradientType=0 )}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:-moz-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#dedede),color-stop(99%,#c8c8c8));background:-webkit-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(to bottom,#dedede 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#dedede', endColorstr='#c8c8c8', GradientType=0 );border:1px solid #999;box-shadow:#aaa 0 0 3px 0;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:#fff solid 1px;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0);border-left-color:rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0);border-left-color:#f2faff;border-width:12px;margin-top:-12px}div.vis-color-picker{position:absolute;top:0;left:30px;margin-top:-140px;margin-left:30px;width:310px;height:444px;z-index:1;padding:10px;border-radius:15px;background-color:#fff;display:none;box-shadow:rgba(0,0,0,.5) 0 0 10px 0}div.vis-color-picker div.vis-arrow{position:absolute;top:147px;left:5px}div.vis-color-picker div.vis-arrow::after,div.vis-color-picker div.vis-arrow::before{right:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.vis-color-picker div.vis-arrow:after{border-color:rgba(255,255,255,0);border-right-color:#fff;border-width:30px;margin-top:-30px}div.vis-color-picker div.vis-color{position:absolute;width:289px;height:289px;cursor:pointer}div.vis-color-picker div.vis-brightness{position:absolute;top:313px}div.vis-color-picker div.vis-opacity{position:absolute;top:350px}div.vis-color-picker div.vis-selector{position:absolute;top:137px;left:137px;width:15px;height:15px;border-radius:15px;border:1px solid #fff;background:#4c4c4c;background:-moz-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#4c4c4c),color-stop(12%,#595959),color-stop(25%,#666),color-stop(39%,#474747),color-stop(50%,#2c2c2c),color-stop(51%,#000),color-stop(60%,#111),color-stop(76%,#2b2b2b),color-stop(91%,#1c1c1c),color-stop(100%,#131313));background:-webkit-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-o-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:-ms-linear-gradient(top,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);background:linear-gradient(to bottom,#4c4c4c 0,#595959 12%,#666 25%,#474747 39%,#2c2c2c 50%,#000 51%,#111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#4c4c4c', endColorstr='#131313', GradientType=0 )}div.vis-color-picker div.vis-initial-color,div.vis-color-picker div.vis-new-color{width:140px;height:20px;top:380px;font-size:10px;color:rgba(0,0,0,.4);line-height:20px;vertical-align:middle;position:absolute}div.vis-color-picker div.vis-new-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:159px;text-align:right;padding-right:2px}div.vis-color-picker div.vis-initial-color{border:1px solid rgba(0,0,0,.1);border-radius:5px;left:10px;text-align:left;padding-left:2px}div.vis-color-picker div.vis-label{position:absolute;width:300px;left:10px}div.vis-color-picker div.vis-label.vis-brightness{top:300px}div.vis-color-picker div.vis-label.vis-opacity{top:338px}div.vis-color-picker div.vis-button{position:absolute;width:68px;height:25px;border-radius:10px;vertical-align:middle;text-align:center;line-height:25px;top:410px;border:2px solid #d9d9d9;background-color:#f7f7f7;cursor:pointer}div.vis-color-picker div.vis-button.vis-cancel{left:5px}div.vis-color-picker div.vis-button.vis-load{left:82px}div.vis-color-picker div.vis-button.vis-apply{left:159px}div.vis-color-picker div.vis-button.vis-save{left:236px}div.vis-color-picker input.vis-range{width:290px;height:20px}div.vis-network div.vis-manipulation{border-width:0;border-bottom:1px;border-style:solid;border-color:#d6d9d8;background:#fff;background:-moz-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(48%,#fcfcfc),color-stop(50%,#fafafa),color-stop(100%,#fcfcfc));background:-webkit-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-o-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:-ms-linear-gradient(top,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);background:linear-gradient(to bottom,#fff 0,#fcfcfc 48%,#fafafa 50%,#fcfcfc 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc', GradientType=0 );padding-top:4px;position:absolute;left:0;top:0;width:100%;height:28px}div.vis-network div.vis-edit-mode{position:absolute;left:0;top:5px;height:30px}div.vis-network div.vis-close{position:absolute;right:0;top:0;width:30px;height:30px;background-position:20px 3px;background-repeat:no-repeat;background-image:url(img/network/cross.png);user-select:none}div.vis-network div.vis-close:hover{opacity:.6}div.vis-network div.vis-edit-mode div.vis-button,div.vis-network div.vis-manipulation div.vis-button{float:left;font-family:verdana;font-size:12px;-moz-border-radius:15px;border-radius:15px;display:inline-block;background-position:0 0;background-repeat:no-repeat;height:24px;margin-left:10px;padding:0 8px;user-select:none}div.vis-network div.vis-manipulation div.vis-button:hover{box-shadow:1px 1px 8px rgba(0,0,0,.2)}div.vis-network div.vis-manipulation div.vis-button:active{box-shadow:1px 1px 8px rgba(0,0,0,.5)}div.vis-network div.vis-manipulation div.vis-button.vis-back{background-image:url(img/network/backIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-none:hover{box-shadow:1px 1px 8px transparent;cursor:default}div.vis-network div.vis-manipulation div.vis-button.vis-none:active{box-shadow:1px 1px 8px transparent}div.vis-network div.vis-manipulation div.vis-button.vis-none{padding:0}div.vis-network div.vis-manipulation div.notification{margin:2px;font-weight:700}div.vis-network div.vis-manipulation div.vis-button.vis-add{background-image:url(img/network/addNodeIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit,div.vis-network div.vis-manipulation div.vis-button.vis-edit{background-image:url(img/network/editIcon.png)}div.vis-network div.vis-edit-mode div.vis-button.vis-edit.vis-edit-mode{background-color:#fcfcfc;border:1px solid #ccc}div.vis-network div.vis-manipulation div.vis-button.vis-connect{background-image:url(img/network/connectIcon.png)}div.vis-network div.vis-manipulation div.vis-button.vis-delete{background-image:url(img/network/deleteIcon.png)}div.vis-network div.vis-edit-mode div.vis-label,div.vis-network div.vis-manipulation div.vis-label{margin:0 0 0 23px;line-height:25px}div.vis-network div.vis-manipulation div.vis-separator-line{float:left;display:inline-block;width:1px;height:21px;background-color:#bdbdbd;margin:0 7px 0 15px}div.vis-network div.vis-navigation div.vis-button{width:34px;height:34px;-moz-border-radius:17px;border-radius:17px;position:absolute;display:inline-block;background-position:2px 2px;background-repeat:no-repeat;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.vis-network div.vis-navigation div.vis-button:hover{box-shadow:0 0 3px 3px rgba(56,207,21,.3)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,.95)}div.vis-network div.vis-navigation div.vis-button.vis-up{background-image:url(img/network/upArrow.png);bottom:50px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-down{background-image:url(img/network/downArrow.png);bottom:10px;left:55px}div.vis-network div.vis-navigation div.vis-button.vis-left{background-image:url(img/network/leftArrow.png);bottom:10px;left:15px}div.vis-network div.vis-navigation div.vis-button.vis-right{background-image:url(img/network/rightArrow.png);bottom:10px;left:95px}div.vis-network div.vis-navigation div.vis-button.vis-zoomIn{background-image:url(img/network/plus.png);bottom:10px;right:15px}div.vis-network div.vis-navigation div.vis-button.vis-zoomOut{background-image:url(img/network/minus.png);bottom:10px;right:55px}div.vis-network div.vis-navigation div.vis-button.vis-zoomExtends{background-image:url(img/network/zoomExtends.png);bottom:50px;right:15px}div.vis-network-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;background-color:#f5f4ed;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,.2);pointer-events:none}.vis-current-time{background-color:#FF7F6E;width:2px;z-index:1}.vis-custom-time{background-color:#6E94FF;width:2px;cursor:move;z-index:1}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;-webkit-transform-origin:right bottom;-moz-transform-origin:right bottom;-ms-transform-origin:right bottom;-o-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.vis-legend{background-color:rgba(247,252,255,.65);padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px rgba(154,154,154,.55)}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-item{position:absolute;color:#1A1A1A;border-color:#97B0F8;border-width:1px;background-color:#D5DDF6;display:inline-block}.vis-item.vis-point.vis-selected,.vis-item.vis-selected{background-color:#FFF785}.vis-item.vis-selected{border-color:#FFC200;z-index:2}.vis-editable.vis-selected{cursor:move}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:rgba(213,221,246,.4);box-sizing:border-box;padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.vis-background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-onUpdateTime-tooltip{position:absolute;background:#4f81bd;color:#fff;width:200px;text-align:center;white-space:nowrap;padding:5px;border-radius:1px}.vis-item .vis-delete,.vis-item .vis-delete-rtl{position:absolute;top:0;width:24px;height:24px;box-sizing:border-box;padding:0 5px;cursor:pointer;-webkit-transition:background .2s linear;-moz-transition:background .2s linear;-ms-transition:background .2s linear;-o-transition:background .2s linear;transition:background .2s linear}.vis-item .vis-delete{right:-24px}.vis-item .vis-delete-rtl{left:-24px}.vis-item .vis-delete-rtl:after,.vis-item .vis-delete:after{content:"\00D7";color:red;font-family:arial,sans-serif;font-size:22px;font-weight:700;-webkit-transition:color .2s linear;-moz-transition:color .2s linear;-ms-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear}.vis-item .vis-delete-rtl:hover,.vis-item .vis-delete:hover{background:red}.vis-item .vis-delete-rtl:hover:after,.vis-item .vis-delete:hover:after{color:#fff}.vis-item .vis-drag-center{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.vis-item.vis-range .vis-drag-left,.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0}.vis-item.vis-range .vis-drag-left{left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-right{right:-4px;cursor:e-resize}.vis-range.vis-item.vis-readonly .vis-drag-left,.vis-range.vis-item.vis-readonly .vis-drag-right{cursor:auto}.vis-itemset{position:relative;padding:0;margin:0;box-sizing:border-box}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-labelset,.vis-labelset .vis-label{position:relative;box-sizing:border-box}.vis-labelset{overflow:hidden}.vis-labelset .vis-label{left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label.draggable{cursor:pointer}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-panel{position:absolute;padding:0;margin:0;box-sizing:border-box}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-left.vis-panel.vis-vertical-scroll,.vis-right.vis-panel.vis-vertical-scroll{height:100%;overflow-x:hidden;overflow-y:scroll}.vis-background,.vis-time-axis,.vis-timeline{overflow:hidden}.vis-left.vis-panel.vis-vertical-scroll{direction:rtl}.vis-left.vis-panel.vis-vertical-scroll .vis-content,.vis-right.vis-panel.vis-vertical-scroll{direction:ltr}.vis-right.vis-panel.vis-vertical-scroll .vis-content{direction:rtl}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-top{border-left-style:solid;border-right-style:solid}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{position:absolute;width:100%;height:1px;box-shadow:0 0 10px rgba(0,0,0,.8)}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}.vis-time-axis{position:relative}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;overflow:hidden;box-sizing:border-box;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-vertical-rtl{position:absolute;border-right:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-timeline{position:relative;border:1px solid #bfbfbf;padding:0;margin:0;box-sizing:border-box} \ No newline at end of file diff --git a/dist/vis.min.js b/dist/vis.min.js index 92b8ed75..4faffbc2 100644 --- a/dist/vis.min.js +++ b/dist/vis.min.js @@ -4,8 +4,8 @@ * * A dynamic, browser-based visualization library. * - * @version 4.16.1 - * @date 2016-04-18 + * @version 4.17.0 + * @date 2016-11-05 * * @license * Copyright (C) 2011-2016 Almende B.V, http://almende.com @@ -22,24 +22,24 @@ * * Vis.js may be distributed under either license. */ -"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){var o=i(1);o.extend(e,i(7)),o.extend(e,i(24)),o.extend(e,i(60))},function(t,e,i){var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},n=i(2),s=i(6);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)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=r.exec(t);if(i)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){return s.v4()},e.assignAllKeys=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"object"!==o(t[i])&&(t[i]=e)},e.fillIfDefined=function(t,i){var n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];for(var s in t)void 0!==i[s]&&("object"!==o(i[s])?void 0!==i[s]&&null!==i[s]||void 0===t[s]||n!==!0?t[s]=i[s]:delete t[s]:"object"===o(t[s])&&e.fillIfDefined(t[s],i[s],n))},e.protoExtend=function(t,e){for(var i=1;ii;i++)if(t[i]!=e[i])return!1;return!0},e.convert=function(t,i){var o;if(void 0!==t){if(null===t)return null;if(!i)return t;if("string"!=typeof i&&!(i instanceof String))throw new Error("Type must be a string");switch(i){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(n.isMoment(t))return new Date(t.valueOf());if(e.isString(t))return o=r.exec(t),o?new Date(Number(o[1])):n(t).toDate();throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return n(t);if(t instanceof Date)return n(t.valueOf());if(n.isMoment(t))return n(t);if(e.isString(t))return o=r.exec(t),n(o?Number(o[1]):t);throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(n.isMoment(t))return t.toDate().toISOString();if(e.isString(t))return o=r.exec(t),o?new Date(Number(o[1])).toISOString():new Date(t).toISOString();throw new Error("Cannot convert object of type "+e.getType(t)+" to type ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(e.isString(t)){o=r.exec(t);var s;return s=o?new Date(Number(o[1])).valueOf():new Date(t).valueOf(),"/Date("+s+")/"}throw new Error("Cannot convert object of type "+e.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+i+'"')}}};var r=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e="undefined"==typeof t?"undefined":o(t);return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},e.copyAndExtendArray=function(t,e){for(var i=[],o=0;oi;i++)e(t[i],i,t);else for(i in t)t.hasOwnProperty(i)&&e(t[i],i,t)},e.toArray=function(t){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(t[i]);return e},e.updateProperty=function(t,e,i){return t[e]!==i?(t[e]=i,!0):!1},e.throttle=function(t,e){var i=null,o=!1;return function n(){i?o=!0:(o=!1,t(),i=setTimeout(function(){i=null,o&&n()},e))}},e.addEventListener=function(t,e,i,o){t.addEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(-1!=t.indexOf("rgba"))return t;if(-1!=t.indexOf("rgb")){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=e.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(e.isValidHex(t)===!0){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t,r=t==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var a={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=a.split(t.style.cssText),n=a.split(i),s=e.extend(o,n);t.style.cssText=a.join(s)},e.removeCssText=function(t,e){var i=a.split(t.style.cssText),o=a.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=a.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==("undefined"==typeof i?"undefined":o(i))){for(var n=Object.create(i),s=0;s0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=(arguments.length<=3||void 0===arguments[3]?!1:arguments[3],arguments.length<=4||void 0===arguments[4]?{}:arguments[4]);if(null===e[i])t[i]=Object.create(o[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var n in e[i])e[i].hasOwnProperty(n)&&(t[i][n]=e[i][n])}},e.binarySearchCustom=function(t,e,i,o){for(var n=1e4,s=0,r=0,a=t.length-1;a>=r&&n>s;){var h=Math.floor((r+a)/2),d=t[h],l=void 0===o?d[i]:d[i][o],c=e(l);if(0==c)return h;-1==c?r=h+1:a=h-1,s++}return-1},e.binarySearchValue=function(t,e,i,o,n){for(var s,r,a,h,d=1e4,l=0,c=0,u=t.length-1,n=void 0!=n?n:function(t,e){return t==e?0:e>t?-1:1};u>=c&&d>l;){if(h=Math.floor(.5*(u+c)),s=t[Math.max(0,h-1)][i],r=t[h][i],a=t[Math.min(t.length-1,h+1)][i],0==n(r,e))return h;if(n(s,e)<0&&n(r,e)>0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?c=h+1:u=h-1,l++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return.5>t?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return.5>t?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return.5>t?16*t*t*t*t*t:1+16*--t*t*t*t*t}}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return ro.apply(null,arguments)}function i(t){ro=t}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function n(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function s(t,e){var i,o=[];for(i=0;i0)for(i in ho)o=ho[i],n=e[o],p(n)||(t[o]=n);return t}function m(t){f(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),lo===!1&&(lo=!0,e.updateOffset(this),lo=!1)}function v(t){return t instanceof m||null!=t&&null!=t._isAMomentObject}function g(t){return 0>t?Math.ceil(t):Math.floor(t)}function y(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=g(e)),i}function b(t,e,i){var o,n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(o=0;n>o;o++)(i&&t[o]!==e[o]||!i&&y(t[o])!==y(e[o]))&&r++;return r+s}function w(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function _(t,i){var o=!0;return a(function(){return null!=e.deprecationHandler&&e.deprecationHandler(null,t),o&&(w(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),o=!1),i.apply(this,arguments)},i)}function x(t,i){null!=e.deprecationHandler&&e.deprecationHandler(t,i),co[t]||(w(i),co[t]=!0)}function k(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function O(t){return"[object Object]"===Object.prototype.toString.call(t)}function M(t){var e,i;for(i in t)e=t[i],k(e)?this[i]=e:this["_"+i]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function D(t,e){var i,o=a({},t);for(i in e)r(e,i)&&(O(t[i])&&O(e[i])?(o[i]={},a(o[i],t[i]),a(o[i],e[i])):null!=e[i]?o[i]=e[i]:delete o[i]);return o}function S(t){null!=t&&this.set(t)}function C(t){return t?t.toLowerCase().replace("_","-"):t}function T(t){for(var e,i,o,n,s=0;s0;){if(o=E(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&b(n,i,!0)>=e-1)break;e--}s++}return null}function E(e){var i=null;if(!mo[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=po._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),P(i)}catch(o){}return mo[e]}function P(t,e){var i;return t&&(i=p(e)?R(t):I(t,e),i&&(po=i)),po._abbr}function I(t,e){return null!==e?(e.abbr=t,null!=mo[t]?(x("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=D(mo[t]._config,e)):null!=e.parentLocale&&(null!=mo[e.parentLocale]?e=D(mo[e.parentLocale]._config,e):x("parentLocaleUndefined","specified parentLocale is not defined yet")),mo[t]=new S(e),P(t),mo[t]):(delete mo[t],null)}function N(t,e){if(null!=e){var i;null!=mo[t]&&(e=D(mo[t]._config,e)),i=new S(e),i.parentLocale=mo[t],mo[t]=i,P(t)}else null!=mo[t]&&(null!=mo[t].parentLocale?mo[t]=mo[t].parentLocale:null!=mo[t]&&delete mo[t]);return mo[t]}function R(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return po;if(!o(t)){if(e=E(t))return e;t=[t]}return T(t)}function z(){return uo(mo)}function L(t,e){var i=t.toLowerCase();vo[i]=vo[i+"s"]=vo[e]=t}function A(t){return"string"==typeof t?vo[t]||vo[t.toLowerCase()]:void 0}function B(t){var e,i,o={};for(i in t)r(t,i)&&(e=A(i),e&&(o[e]=t[i]));return o}function F(t,i){return function(o){return null!=o?(H(this,t,o),e.updateOffset(this,i),this):j(this,t)}}function j(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function H(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function W(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=A(t),k(this[t]))return this[t](e);return this}function Y(t,e,i){var o=""+Math.abs(t),n=e-o.length,s=t>=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function G(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(wo[t]=n),e&&(wo[e[0]]=function(){return Y(n.apply(this,arguments),e[1],e[2])}),i&&(wo[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function V(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function U(t){var e,i,o=t.match(go);for(e=0,i=o.length;i>e;e++)wo[o[e]]?o[e]=wo[o[e]]:o[e]=V(o[e]);return function(e){var n,s="";for(n=0;i>n;n++)s+=o[n]instanceof Function?o[n].call(e,t):o[n];return s}}function q(t,e){return t.isValid()?(e=X(e,t.localeData()),bo[e]=bo[e]||U(e),bo[e](t)):t.localeData().invalidDate()}function X(t,e){function i(t){return e.longDateFormat(t)||t}var o=5;for(yo.lastIndex=0;o>=0&&yo.test(t);)t=t.replace(yo,i),yo.lastIndex=0,o-=1;return t}function Z(t,e,i){Bo[t]=k(e)?e:function(t,o){return t&&i?i:e}}function K(t,e){return r(Bo,t)?Bo[t](e._strict,e._locale):new RegExp(J(t))}function J(t){return Q(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function Q(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(o=function(t,i){i[e]=y(t)}),i=0;io;++o)s=h([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===e?(n=fo.call(this._shortMonthsParse,r),-1!==n?n:null):(n=fo.call(this._longMonthsParse,r),-1!==n?n:null):"MMM"===e?(n=fo.call(this._shortMonthsParse,r),-1!==n?n:(n=fo.call(this._longMonthsParse,r),-1!==n?n:null)):(n=fo.call(this._longMonthsParse,r),-1!==n?n:(n=fo.call(this._shortMonthsParse,r),-1!==n?n:null))}function rt(t,e,i){var o,n,s;if(this._monthsParseExact)return st.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;12>o;o++){if(n=h([2e3,o]),i&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),i||this._monthsParse[o]||(s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[o]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[o].test(t))return o;if(i&&"MMM"===e&&this._shortMonthsParse[o].test(t))return o;if(!i&&this._monthsParse[o].test(t))return o}}function at(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=y(e);else if(e=t.localeData().monthsParse(e),"number"!=typeof e)return t;return i=Math.min(t.date(),it(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function ht(t){return null!=t?(at(this,t),e.updateOffset(this,!0),this):j(this,"Month")}function dt(){return it(this.year(),this.month())}function lt(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ut.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function ct(t){return this._monthsParseExact?(r(this,"_monthsRegex")||ut.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function ut(){function t(t,e){return e.length-t.length}var e,i,o=[],n=[],s=[];for(e=0;12>e;e++)i=h([2e3,e]),o.push(this.monthsShort(i,"")),n.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(o.sort(t),n.sort(t),s.sort(t),e=0;12>e;e++)o[e]=Q(o[e]),n[e]=Q(n[e]),s[e]=Q(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+o.join("|")+")","i")}function pt(t){var e,i=t._a;return i&&-2===l(t).overflow&&(e=i[Ho]<0||i[Ho]>11?Ho:i[Wo]<1||i[Wo]>it(i[jo],i[Ho])?Wo:i[Yo]<0||i[Yo]>24||24===i[Yo]&&(0!==i[Go]||0!==i[Vo]||0!==i[Uo])?Yo:i[Go]<0||i[Go]>59?Go:i[Vo]<0||i[Vo]>59?Vo:i[Uo]<0||i[Uo]>999?Uo:-1,l(t)._overflowDayOfYear&&(jo>e||e>Wo)&&(e=Wo),l(t)._overflowWeeks&&-1===e&&(e=qo),l(t)._overflowWeekday&&-1===e&&(e=Xo),l(t).overflow=e),t}function ft(t){var e,i,o,n,s,r,a=t._i,h=tn.exec(a)||en.exec(a);if(h){for(l(t).iso=!0,e=0,i=nn.length;i>e;e++)if(nn[e][1].exec(h[1])){n=nn[e][0],o=nn[e][2]!==!1;break}if(null==n)return void(t._isValid=!1);if(h[3]){for(e=0,i=sn.length;i>e;e++)if(sn[e][1].exec(h[3])){s=(h[2]||" ")+sn[e][0];break}if(null==s)return void(t._isValid=!1)}if(!o&&null!=s)return void(t._isValid=!1);if(h[4]){if(!on.exec(h[4]))return void(t._isValid=!1);r="Z"}t._f=n+(s||"")+(r||""),Tt(t)}else t._isValid=!1}function mt(t){var i=rn.exec(t._i);return null!==i?void(t._d=new Date(+i[1])):(ft(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function vt(t,e,i,o,n,s,r){var a=new Date(t,e,i,o,n,s,r);return 100>t&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function gt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function yt(t){return bt(t)?366:365}function bt(t){return t%4===0&&t%100!==0||t%400===0}function wt(){return bt(this.year())}function _t(t,e,i){var o=7+e-i,n=(7+gt(t,0,o).getUTCDay()-e)%7;return-n+o-1}function xt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=_t(t,o,n),d=1+7*(e-1)+a+h;return 0>=d?(s=t-1,r=yt(s)+d):d>yt(t)?(s=t+1,r=d-yt(t)):(s=t,r=d),{year:s,dayOfYear:r}}function kt(t,e,i){var o,n,s=_t(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return 1>r?(n=t.year()-1,o=r+Ot(n,e,i)):r>Ot(t.year(),e,i)?(o=r-Ot(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function Ot(t,e,i){var o=_t(t,e,i),n=_t(t+1,e,i);return(yt(t)-o+n)/7}function Mt(t,e,i){return null!=t?t:null!=e?e:i}function Dt(t){var i=new Date(e.now());return t._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function St(t){var e,i,o,n,s=[];if(!t._d){for(o=Dt(t),t._w&&null==t._a[Wo]&&null==t._a[Ho]&&Ct(t),t._dayOfYear&&(n=Mt(t._a[jo],o[jo]),t._dayOfYear>yt(n)&&(l(t)._overflowDayOfYear=!0),i=gt(n,0,t._dayOfYear),t._a[Ho]=i.getUTCMonth(),t._a[Wo]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Yo]&&0===t._a[Go]&&0===t._a[Vo]&&0===t._a[Uo]&&(t._nextDay=!0,t._a[Yo]=0),t._d=(t._useUTC?gt:vt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Yo]=24)}}function Ct(t){var e,i,o,n,s,r,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,r=4,i=Mt(e.GG,t._a[jo],kt(At(),1,4).year),o=Mt(e.W,1),n=Mt(e.E,1),(1>n||n>7)&&(h=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,i=Mt(e.gg,t._a[jo],kt(At(),s,r).year),o=Mt(e.w,1),null!=e.d?(n=e.d,(0>n||n>6)&&(h=!0)):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s),1>o||o>Ot(i,s,r)?l(t)._overflowWeeks=!0:null!=h?l(t)._overflowWeekday=!0:(a=xt(i,o,n,s,r),t._a[jo]=a.year,t._dayOfYear=a.dayOfYear)}function Tt(t){if(t._f===e.ISO_8601)return void ft(t);t._a=[],l(t).empty=!0;var i,o,n,s,r,a=""+t._i,h=a.length,d=0;for(n=X(t._f,t._locale).match(go)||[],i=0;i0&&l(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),wo[s]?(o?l(t).empty=!1:l(t).unusedTokens.push(s),et(s,o,t)):t._strict&&!o&&l(t).unusedTokens.push(s);l(t).charsLeftOver=h-d,a.length>0&&l(t).unusedInput.push(a),l(t).bigHour===!0&&t._a[Yo]<=12&&t._a[Yo]>0&&(l(t).bigHour=void 0),l(t).parsedDateParts=t._a.slice(0),l(t).meridiem=t._meridiem,t._a[Yo]=Et(t._locale,t._a[Yo],t._meridiem),St(t),pt(t)}function Et(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&12>e&&(e+=12),o||12!==e||(e=0),e):e}function Pt(t){var e,i,o,n,s;if(0===t._f.length)return l(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;ns)&&(o=s,i=e));a(t,i||e)}function It(t){if(!t._d){var e=B(t._i);t._a=s([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),St(t)}}function Nt(t){var e=new m(pt(Rt(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Rt(t){var e=t._i,i=t._f;return t._locale=t._locale||R(t._l),null===e||void 0===i&&""===e?u({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),v(e)?new m(pt(e)):(o(i)?Pt(t):i?Tt(t):n(e)?t._d=e:zt(t),c(t)||(t._d=null),t))}function zt(t){var i=t._i;void 0===i?t._d=new Date(e.now()):n(i)?t._d=new Date(i.valueOf()):"string"==typeof i?mt(t):o(i)?(t._a=s(i.slice(0),function(t){return parseInt(t,10)}),St(t)):"object"==typeof i?It(t):"number"==typeof i?t._d=new Date(i):e.createFromInputFallback(t)}function Lt(t,e,i,o,n){var s={};return"boolean"==typeof i&&(o=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=n,s._l=i,s._i=t,s._f=e,s._strict=o,Nt(s)}function At(t,e,i,o){return Lt(t,e,i,o,!1)}function Bt(t,e){var i,n;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return At();for(i=e[0],n=1;nt&&(t=-t,i="-"),i+Y(~~(t/60),2)+e+Y(~~t%60,2)})}function Gt(t,e){var i=(e||"").match(t)||[],o=i[i.length-1]||[],n=(o+"").match(cn)||["-",0,0],s=+(60*n[1])+y(n[2]);return"+"===n[0]?s:-s}function Vt(t,i){var o,s;return i._isUTC?(o=i.clone(),s=(v(t)||n(t)?t.valueOf():At(t).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+s),e.updateOffset(o,!1),o):At(t).local()}function Ut(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function qt(t,i){var o,n=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=Gt(zo,t):Math.abs(t)<16&&(t=60*t),!this._isUTC&&i&&(o=Ut(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),n!==t&&(!i||this._changeInProgress?le(this,ne(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:Ut(this):null!=t?this:NaN}function Xt(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Zt(t){return this.utcOffset(0,t)}function Kt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ut(this),"m")),this}function Jt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Gt(Ro,this._i)),this}function Qt(t){return this.isValid()?(t=t?At(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function $t(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function te(){if(!p(this._isDSTShifted))return this._isDSTShifted;var t={};if(f(t,this),t=Rt(t),t._a){var e=t._isUTC?h(t._a):At(t._a);this._isDSTShifted=this.isValid()&&b(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function ee(){return this.isValid()?!this._isUTC:!1}function ie(){return this.isValid()?this._isUTC:!1}function oe(){return this.isValid()?this._isUTC&&0===this._offset:!1}function ne(t,e){var i,o,n,s=t,a=null;return Wt(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(a=un.exec(t))?(i="-"===a[1]?-1:1,s={y:0,d:y(a[Wo])*i,h:y(a[Yo])*i,m:y(a[Go])*i,s:y(a[Vo])*i,ms:y(a[Uo])*i}):(a=pn.exec(t))?(i="-"===a[1]?-1:1,s={y:se(a[2],i),M:se(a[3],i),w:se(a[4],i),d:se(a[5],i),h:se(a[6],i),m:se(a[7],i),s:se(a[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=ae(At(s.from),At(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new Ht(s),Wt(t)&&r(t,"_locale")&&(o._locale=t._locale),o}function se(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function re(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months, -i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function ae(t,e){var i;return t.isValid()&&e.isValid()?(e=Vt(e,t),t.isBefore(e)?i=re(t,e):(i=re(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function he(t){return 0>t?-1*Math.round(-1*t):Math.round(t)}function de(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(x(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=ne(i,o),le(this,n,t),this}}function le(t,i,o,n){var s=i._milliseconds,r=he(i._days),a=he(i._months);t.isValid()&&(n=null==n?!0:n,s&&t._d.setTime(t._d.valueOf()+s*o),r&&H(t,"Date",j(t,"Date")+r*o),a&&at(t,j(t,"Month")+a*o),n&&e.updateOffset(t,r||a))}function ce(t,e){var i=t||At(),o=Vt(i,this).startOf("day"),n=this.diff(o,"days",!0),s=-6>n?"sameElse":-1>n?"lastWeek":0>n?"lastDay":1>n?"sameDay":2>n?"nextDay":7>n?"nextWeek":"sameElse",r=e&&(k(e[s])?e[s]():e[s]);return this.format(r||this.localeData().calendar(s,this,At(i)))}function ue(){return new m(this)}function pe(t,e){var i=v(t)?t:At(t);return this.isValid()&&i.isValid()?(e=A(p(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()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)||0}function _e(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function xe(){var t=this.clone().utc();return 0s&&(e=s),Xe.call(this,t,e,i,o,n))}function Xe(t,e,i,o,n){var s=xt(t,e,i,o,n),r=gt(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Ze(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ke(t){return kt(t,this._week.dow,this._week.doy).week}function Je(){return this._week.dow}function Qe(){return this._week.doy}function $e(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function ti(t){var e=kt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function ei(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function ii(t,e){return o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]}function oi(t){return this._weekdaysShort[t.day()]}function ni(t){return this._weekdaysMin[t.day()]}function si(t,e,i){var o,n,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;7>o;++o)s=h([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?(n=fo.call(this._weekdaysParse,r),-1!==n?n:null):"ddd"===e?(n=fo.call(this._shortWeekdaysParse,r),-1!==n?n:null):(n=fo.call(this._minWeekdaysParse,r),-1!==n?n:null):"dddd"===e?(n=fo.call(this._weekdaysParse,r),-1!==n?n:(n=fo.call(this._shortWeekdaysParse,r),-1!==n?n:(n=fo.call(this._minWeekdaysParse,r),-1!==n?n:null))):"ddd"===e?(n=fo.call(this._shortWeekdaysParse,r),-1!==n?n:(n=fo.call(this._weekdaysParse,r),-1!==n?n:(n=fo.call(this._minWeekdaysParse,r),-1!==n?n:null))):(n=fo.call(this._minWeekdaysParse,r),-1!==n?n:(n=fo.call(this._weekdaysParse,r),-1!==n?n:(n=fo.call(this._shortWeekdaysParse,r),-1!==n?n:null)))}function ri(t,e,i){var o,n,s;if(this._weekdaysParseExact)return si.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;7>o;o++){if(n=h([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function ai(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ei(t,this.localeData()),this.add(t-e,"d")):e}function hi(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function di(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN}function li(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||pi.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex}function ci(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||pi.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex}function ui(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||pi.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex}function pi(){function t(t,e){return e.length-t.length}var e,i,o,n,s,r=[],a=[],d=[],l=[];for(e=0;7>e;e++)i=h([2e3,1]).day(e),o=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(o),a.push(n),d.push(s),l.push(o),l.push(n),l.push(s);for(r.sort(t),a.sort(t),d.sort(t),l.sort(t),e=0;7>e;e++)a[e]=Q(a[e]),d[e]=Q(d[e]),l[e]=Q(l[e]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function fi(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function mi(){return this.hours()%12||12}function vi(){return this.hours()||24}function gi(t,e){G(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function yi(t,e){return e._meridiemParse}function bi(t){return"p"===(t+"").toLowerCase().charAt(0)}function wi(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function _i(t,e){e[Uo]=y(1e3*("0."+t))}function xi(){return this._isUTC?"UTC":""}function ki(){return this._isUTC?"Coordinated Universal Time":""}function Oi(t){return At(1e3*t)}function Mi(){return At.apply(null,arguments).parseZone()}function Di(t,e,i){var o=this._calendar[t];return k(o)?o.call(e,i):o}function Si(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function Ci(){return this._invalidDate}function Ti(t){return this._ordinal.replace("%d",t)}function Ei(t){return t}function Pi(t,e,i,o){var n=this._relativeTime[i];return k(n)?n(t,e,i,o):n.replace(/%d/i,t)}function Ii(t,e){var i=this._relativeTime[t>0?"future":"past"];return k(i)?i(e):i.replace(/%s/i,e)}function Ni(t,e,i,o){var n=R(),s=h().set(o,e);return n[i](s,t)}function Ri(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return Ni(t,e,i,"month");var o,n=[];for(o=0;12>o;o++)n[o]=Ni(t,o,i,"month");return n}function zi(t,e,i,o){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var n=R(),s=t?n._week.dow:0;if(null!=i)return Ni(e,(i+s)%7,o,"day");var r,a=[];for(r=0;7>r;r++)a[r]=Ni(e,(r+s)%7,o,"day");return a}function Li(t,e){return Ri(t,e,"months")}function Ai(t,e){return Ri(t,e,"monthsShort")}function Bi(t,e,i){return zi(t,e,i,"weekdays")}function Fi(t,e,i){return zi(t,e,i,"weekdaysShort")}function ji(t,e,i){return zi(t,e,i,"weekdaysMin")}function Hi(){var t=this._data;return this._milliseconds=jn(this._milliseconds),this._days=jn(this._days),this._months=jn(this._months),t.milliseconds=jn(t.milliseconds),t.seconds=jn(t.seconds),t.minutes=jn(t.minutes),t.hours=jn(t.hours),t.months=jn(t.months),t.years=jn(t.years),this}function Wi(t,e,i,o){var n=ne(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function Yi(t,e){return Wi(this,t,e,1)}function Gi(t,e){return Wi(this,t,e,-1)}function Vi(t){return 0>t?Math.floor(t):Math.ceil(t)}function Ui(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||0>=s&&0>=r&&0>=a||(s+=864e5*Vi(Xi(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=g(s/1e3),h.seconds=t%60,e=g(t/60),h.minutes=e%60,i=g(e/60),h.hours=i%24,r+=g(i/24),n=g(qi(r)),a+=n,r-=Vi(Xi(n)),o=g(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function qi(t){return 4800*t/146097}function Xi(t){return 146097*t/4800}function Zi(t){var e,i,o=this._milliseconds;if(t=A(t),"month"===t||"year"===t)return e=this._days+o/864e5,i=this._months+qi(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Xi(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function Ki(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function Ji(t){return function(){return this.as(t)}}function Qi(t){return t=A(t),this[t+"s"]()}function $i(t){return function(){return this._data[t]}}function to(){return g(this.days()/7)}function eo(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function io(t,e,i){var o=ne(t).abs(),n=is(o.as("s")),s=is(o.as("m")),r=is(o.as("h")),a=is(o.as("d")),h=is(o.as("M")),d=is(o.as("y")),l=n=s&&["m"]||s=r&&["h"]||r=a&&["d"]||a=h&&["M"]||h=d&&["y"]||["yy",d];return l[2]=e,l[3]=+t>0,l[4]=i,eo.apply(null,l)}function oo(t,e){return void 0===os[t]?!1:void 0===e?os[t]:(os[t]=e,!0)}function no(t){var e=this.localeData(),i=io(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function so(){var t,e,i,o=ns(this._milliseconds)/1e3,n=ns(this._days),s=ns(this._months);t=g(o/60),e=g(t/60),o%=60,t%=60,i=g(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,c=o,u=this.asSeconds();return u?(0>u?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||c?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var ro,ao;ao=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,o=0;i>o;o++)if(o in e&&t.call(this,e[o],o,e))return!0;return!1};var ho=e.momentProperties=[],lo=!1,co={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var uo;uo=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)r(t,e)&&i.push(e);return i};var po,fo,mo={},vo={},go=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,yo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,bo={},wo={},_o=/\d/,xo=/\d\d/,ko=/\d{3}/,Oo=/\d{4}/,Mo=/[+-]?\d{6}/,Do=/\d\d?/,So=/\d\d\d\d?/,Co=/\d\d\d\d\d\d?/,To=/\d{1,3}/,Eo=/\d{1,4}/,Po=/[+-]?\d{1,6}/,Io=/\d+/,No=/[+-]?\d+/,Ro=/Z|[+-]\d\d:?\d\d/gi,zo=/Z|[+-]\d\d(?::?\d\d)?/gi,Lo=/[+-]?\d+(\.\d{1,3})?/,Ao=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Bo={},Fo={},jo=0,Ho=1,Wo=2,Yo=3,Go=4,Vo=5,Uo=6,qo=7,Xo=8;fo=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e=t?""+t:"+"+t}),G(0,["YY",2],0,function(){return this.year()%100}),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),L("year","y"),Z("Y",No),Z("YY",Do,xo),Z("YYYY",Eo,Oo),Z("YYYYY",Po,Mo),Z("YYYYYY",Po,Mo),$(["YYYYY","YYYYYY"],jo),$("YYYY",function(t,i){i[jo]=2===t.length?e.parseTwoDigitYear(t):y(t)}),$("YY",function(t,i){i[jo]=e.parseTwoDigitYear(t)}),$("Y",function(t,e){e[jo]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var an=F("FullYear",!0);e.ISO_8601=function(){};var hn=_("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=At.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:u()}),dn=_("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=At.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:u()}),ln=function(){return Date.now?Date.now():+new Date};Yt("Z",":"),Yt("ZZ",""),Z("Z",zo),Z("ZZ",zo),$(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Gt(zo,t)});var cn=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var un=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,pn=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;ne.fn=Ht.prototype;var fn=de(1,"add"),mn=de(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var vn=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),We("gggg","weekYear"),We("ggggg","weekYear"),We("GGGG","isoWeekYear"),We("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),Z("G",No),Z("g",No),Z("GG",Do,xo),Z("gg",Do,xo),Z("GGGG",Eo,Oo),Z("gggg",Eo,Oo),Z("GGGGG",Po,Mo),Z("ggggg",Po,Mo),tt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=y(t)}),tt(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),G("Q",0,"Qo","quarter"),L("quarter","Q"),Z("Q",_o),$("Q",function(t,e){e[Ho]=3*(y(t)-1)}),G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),Z("w",Do),Z("ww",Do,xo),Z("W",Do),Z("WW",Do,xo),tt(["w","ww","W","WW"],function(t,e,i,o){e[o.substr(0,1)]=y(t)});var gn={dow:0,doy:6};G("D",["DD",2],"Do","date"),L("date","D"),Z("D",Do),Z("DD",Do,xo),Z("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),$(["D","DD"],Wo),$("Do",function(t,e){e[Wo]=y(t.match(Do)[0],10)});var yn=F("Date",!0);G("d",0,"do","day"),G("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),G("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),G("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),Z("d",Do),Z("e",Do),Z("E",Do),Z("dd",function(t,e){return e.weekdaysMinRegex(t)}),Z("ddd",function(t,e){return e.weekdaysShortRegex(t)}),Z("dddd",function(t,e){return e.weekdaysRegex(t)}),tt(["dd","ddd","dddd"],function(t,e,i,o){var n=i._locale.weekdaysParse(t,o,i._strict);null!=n?e.d=n:l(i).invalidWeekday=t}),tt(["d","e","E"],function(t,e,i,o){e[o]=y(t)});var bn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),wn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),_n="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xn=Ao,kn=Ao,On=Ao;G("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),Z("DDD",To),Z("DDDD",ko),$(["DDD","DDDD"],function(t,e,i){i._dayOfYear=y(t)}),G("H",["HH",2],0,"hour"),G("h",["hh",2],0,mi),G("k",["kk",2],0,vi),G("hmm",0,0,function(){return""+mi.apply(this)+Y(this.minutes(),2)}),G("hmmss",0,0,function(){return""+mi.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+Y(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)}),gi("a",!0),gi("A",!1),L("hour","h"),Z("a",yi),Z("A",yi),Z("H",Do),Z("h",Do),Z("HH",Do,xo),Z("hh",Do,xo),Z("hmm",So),Z("hmmss",Co),Z("Hmm",So),Z("Hmmss",Co),$(["H","HH"],Yo),$(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),$(["h","hh"],function(t,e,i){e[Yo]=y(t),l(i).bigHour=!0}),$("hmm",function(t,e,i){var o=t.length-2;e[Yo]=y(t.substr(0,o)),e[Go]=y(t.substr(o)),l(i).bigHour=!0}),$("hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Yo]=y(t.substr(0,o)),e[Go]=y(t.substr(o,2)),e[Vo]=y(t.substr(n)),l(i).bigHour=!0}),$("Hmm",function(t,e,i){var o=t.length-2;e[Yo]=y(t.substr(0,o)),e[Go]=y(t.substr(o))}),$("Hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[Yo]=y(t.substr(0,o)),e[Go]=y(t.substr(o,2)),e[Vo]=y(t.substr(n))});var Mn=/[ap]\.?m?\.?/i,Dn=F("Hours",!0);G("m",["mm",2],0,"minute"),L("minute","m"),Z("m",Do),Z("mm",Do,xo),$(["m","mm"],Go);var Sn=F("Minutes",!1);G("s",["ss",2],0,"second"),L("second","s"),Z("s",Do),Z("ss",Do,xo),$(["s","ss"],Vo);var Cn=F("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return 10*this.millisecond()}),G(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),G(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),G(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),G(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),G(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),Z("S",To,_o),Z("SS",To,xo),Z("SSS",To,ko);var Tn;for(Tn="SSSS";Tn.length<=9;Tn+="S")Z(Tn,Io);for(Tn="S";Tn.length<=9;Tn+="S")$(Tn,_i);var En=F("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Pn=m.prototype;Pn.add=fn,Pn.calendar=ce,Pn.clone=ue,Pn.diff=be,Pn.endOf=Pe,Pn.format=ke,Pn.from=Oe,Pn.fromNow=Me,Pn.to=De,Pn.toNow=Se,Pn.get=W,Pn.invalidAt=je,Pn.isAfter=pe,Pn.isBefore=fe,Pn.isBetween=me,Pn.isSame=ve,Pn.isSameOrAfter=ge,Pn.isSameOrBefore=ye,Pn.isValid=Be,Pn.lang=vn,Pn.locale=Ce,Pn.localeData=Te,Pn.max=dn,Pn.min=hn,Pn.parsingFlags=Fe,Pn.set=W,Pn.startOf=Ee,Pn.subtract=mn,Pn.toArray=ze,Pn.toObject=Le,Pn.toDate=Re,Pn.toISOString=xe,Pn.toJSON=Ae,Pn.toString=_e,Pn.unix=Ne,Pn.valueOf=Ie,Pn.creationData=He,Pn.year=an,Pn.isLeapYear=wt,Pn.weekYear=Ye,Pn.isoWeekYear=Ge,Pn.quarter=Pn.quarters=Ze,Pn.month=ht,Pn.daysInMonth=dt,Pn.week=Pn.weeks=$e,Pn.isoWeek=Pn.isoWeeks=ti,Pn.weeksInYear=Ue,Pn.isoWeeksInYear=Ve,Pn.date=yn,Pn.day=Pn.days=ai,Pn.weekday=hi,Pn.isoWeekday=di,Pn.dayOfYear=fi,Pn.hour=Pn.hours=Dn,Pn.minute=Pn.minutes=Sn,Pn.second=Pn.seconds=Cn,Pn.millisecond=Pn.milliseconds=En,Pn.utcOffset=qt,Pn.utc=Zt,Pn.local=Kt,Pn.parseZone=Jt,Pn.hasAlignedHourOffset=Qt,Pn.isDST=$t,Pn.isDSTShifted=te,Pn.isLocal=ee,Pn.isUtcOffset=ie,Pn.isUtc=oe,Pn.isUTC=oe,Pn.zoneAbbr=xi,Pn.zoneName=ki,Pn.dates=_("dates accessor is deprecated. Use date instead.",yn),Pn.months=_("months accessor is deprecated. Use month instead",ht),Pn.years=_("years accessor is deprecated. Use year instead",an),Pn.zone=_("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Xt);var In=Pn,Nn={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Rn={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},zn="Invalid date",Ln="%d",An=/\d{1,2}/,Bn={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Fn=S.prototype;Fn._calendar=Nn,Fn.calendar=Di,Fn._longDateFormat=Rn,Fn.longDateFormat=Si,Fn._invalidDate=zn,Fn.invalidDate=Ci,Fn._ordinal=Ln,Fn.ordinal=Ti,Fn._ordinalParse=An,Fn.preparse=Ei,Fn.postformat=Ei,Fn._relativeTime=Bn,Fn.relativeTime=Pi,Fn.pastFuture=Ii,Fn.set=M,Fn.months=ot,Fn._months=Ko,Fn.monthsShort=nt,Fn._monthsShort=Jo,Fn.monthsParse=rt,Fn._monthsRegex=$o,Fn.monthsRegex=ct,Fn._monthsShortRegex=Qo,Fn.monthsShortRegex=lt,Fn.week=Ke,Fn._week=gn,Fn.firstDayOfYear=Qe,Fn.firstDayOfWeek=Je,Fn.weekdays=ii,Fn._weekdays=bn,Fn.weekdaysMin=ni,Fn._weekdaysMin=_n,Fn.weekdaysShort=oi,Fn._weekdaysShort=wn,Fn.weekdaysParse=ri,Fn._weekdaysRegex=xn,Fn.weekdaysRegex=li,Fn._weekdaysShortRegex=kn,Fn.weekdaysShortRegex=ci,Fn._weekdaysMinRegex=On,Fn.weekdaysMinRegex=ui,Fn.isPM=bi,Fn._meridiemParse=Mn,Fn.meridiem=wi,P("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=_("moment.lang is deprecated. Use moment.locale instead.",P),e.langData=_("moment.langData is deprecated. Use moment.localeData instead.",R);var jn=Math.abs,Hn=Ji("ms"),Wn=Ji("s"),Yn=Ji("m"),Gn=Ji("h"),Vn=Ji("d"),Un=Ji("w"),qn=Ji("M"),Xn=Ji("y"),Zn=$i("milliseconds"),Kn=$i("seconds"),Jn=$i("minutes"),Qn=$i("hours"),$n=$i("days"),ts=$i("months"),es=$i("years"),is=Math.round,os={s:45,m:45,h:22,d:26,M:11},ns=Math.abs,ss=Ht.prototype;ss.abs=Hi,ss.add=Yi,ss.subtract=Gi,ss.as=Zi,ss.asMilliseconds=Hn,ss.asSeconds=Wn,ss.asMinutes=Yn,ss.asHours=Gn,ss.asDays=Vn,ss.asWeeks=Un,ss.asMonths=qn,ss.asYears=Xn,ss.valueOf=Ki,ss._bubble=Ui,ss.get=Qi,ss.milliseconds=Zn,ss.seconds=Kn,ss.minutes=Jn,ss.hours=Qn,ss.days=$n,ss.weeks=to,ss.months=ts,ss.years=es,ss.humanize=no,ss.toISOString=so,ss.toString=so,ss.toJSON=so,ss.locale=Ce,ss.localeData=Te,ss.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",so),ss.lang=vn,G("X",0,0,"unix"),G("x",0,0,"valueOf"),Z("x",No),Z("X",Lo),$("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),$("x",function(t,e,i){i._d=new Date(y(t))}),e.version="2.13.0",i(At),e.fn=In,e.min=Ft,e.max=jt,e.now=ln,e.utc=h,e.unix=Oi,e.months=Li,e.isDate=n,e.locale=P,e.invalid=u,e.duration=ne,e.isMoment=v,e.weekdays=Bi,e.parseZone=Mi,e.localeData=R,e.isDuration=Wt,e.monthsShort=Ai,e.weekdaysMin=ji,e.defineLocale=I,e.updateLocale=N,e.locales=z,e.weekdaysShort=Fi,e.normalizeUnits=A,e.relativeTimeThreshold=oo,e.prototype=In;var rs=e;return rs})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>n&&(e[o+n++]=c[t])});16>n;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-v+(h-g)/1e4;if(0>d&&void 0===t.clockseq&&(r=r+1&16383),(0>d||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,g=h,m=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var c=a/4294967296*1e4&268435455;s[n++]=c>>>8&255,s[n++]=255&c,s[n++]=c>>>24&15|16,s[n++]=c>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var u=t.node||f,p=0;6>p;p++)s[n+p]=u[p];return e?e:o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;16>a;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],c={},u=0;256>u;u++)l[u]=(u+256).toString(16).substr(1),c[l[u]]=u;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],m=16383&(p[6]<<8|p[7]),v=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,function(){return this}())},function(t,e,i){e.util=i(1),e.DOMutil=i(8),e.DataSet=i(9),e.DataView=i(11),e.Queue=i(10),e.Graph3d=i(12),e.graph3d={Camera:i(16),Filter:i(17),Point2d:i(15),Point3d:i(14),Slider:i(18),StepNumber:i(19)},e.moment=i(2),e.Hammer=i(20),e.keycharm=i(23)},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s); -r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){0>n&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;n>o;o++){var s=i[o],r=this._options.type[s];"Date"==r||"ISODate"==r||"ASPDate"==r?this._type[s]="Date":this._type[s]=r}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(10);o.prototype.setOptions=function(t){t&&void 0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=r.extend(this,{replace:["add","update","remove"]})),"object"===n(t.queue)&&this._queue.setOptions(t.queue)))},o.prototype.on=function(t,e){var i=this._subscribers[t];i||(i=[],this._subscribers[t]=i),i.push({callback:e})},o.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},o.prototype.off=function(t,e){var i=this._subscribers[t];i&&(this._subscribers[t]=i.filter(function(t){return t.callback!=e}))},o.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},o.prototype._trigger=function(t,e,i){if("*"==t)throw new Error("Cannot trigger event *");var o=[];t in this._subscribers&&(o=o.concat(this._subscribers[t])),"*"in this._subscribers&&(o=o.concat(this._subscribers["*"]));for(var n=0,s=o.length;s>n;n++){var r=o[n];r.callback&&r.callback(t,e,i||null)}},o.prototype.add=function(t,e){var i,o=[],n=this;if(Array.isArray(t))for(var s=0,r=t.length;r>s;s++)i=n._addItem(t[s]),o.push(i);else{if(!(t instanceof Object))throw new Error("Unknown dataType");i=n._addItem(t),o.push(i)}return o.length&&this._trigger("add",{items:o},e),o},o.prototype.update=function(t,e){var i=[],o=[],n=[],r=[],a=this,h=a._fieldId,d=function(t){var e=t[h];if(a._data[e]){var d=s.extend({},a._data[e]);e=a._updateItem(t),o.push(e),r.push(t),n.push(d)}else e=a._addItem(t),i.push(e)};if(Array.isArray(t))for(var l=0,c=t.length;c>l;l++)t[l]instanceof Object?d(t[l]):console.warn("Ignoring input item, which is not an object at index "+l);else{if(!(t instanceof Object))throw new Error("Unknown dataType");d(t)}if(i.length&&this._trigger("add",{items:i},e),o.length){var u={items:o,oldData:n,data:r};this._trigger("update",u,e)}return i.concat(o)},o.prototype.get=function(t){var e,i,o,n=this,r=s.getType(arguments[0]);"String"==r||"Number"==r?(e=arguments[0],o=arguments[1]):"Array"==r?(i=arguments[0],o=arguments[1]):o=arguments[0];var a;if(o&&o.returnType){var h=["Array","Object"];a=-1==h.indexOf(o.returnType)?"Array":o.returnType}else a="Array";var d,l,c,u,p,f=o&&o.type||this._options.type,m=o&&o.filter,v=[];if(void 0!=e)d=n._getItem(e,f),d&&m&&!m(d)&&(d=null);else if(void 0!=i)for(u=0,p=i.length;p>u;u++)d=n._getItem(i[u],f),m&&!m(d)||v.push(d);else for(l=Object.keys(this._data),u=0,p=l.length;p>u;u++)c=l[u],d=n._getItem(c,f),m&&!m(d)||v.push(d);if(o&&o.order&&void 0==e&&this._sort(v,o.order),o&&o.fields){var g=o.fields;if(void 0!=e)d=this._filterFields(d,g);else for(u=0,p=v.length;p>u;u++)v[u]=this._filterFields(v[u],g)}if("Object"==a){var y,b={};for(u=0,p=v.length;p>u;u++)y=v[u],b[y.id]=y;return b}return void 0!=e?d:v},o.prototype.getIds=function(t){var e,i,o,n,s,r=this._data,a=t&&t.filter,h=t&&t.order,d=t&&t.type||this._options.type,l=Object.keys(r),c=[];if(a)if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&s.push(n);for(this._sort(s,h),e=0,i=s.length;i>e;e++)c.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=this._getItem(o,d),a(n)&&c.push(n[this._fieldId]);else if(h){for(s=[],e=0,i=l.length;i>e;e++)o=l[e],s.push(r[o]);for(this._sort(s,h),e=0,i=s.length;i>e;e++)c.push(s[e][this._fieldId])}else for(e=0,i=l.length;i>e;e++)o=l[e],n=r[o],c.push(n[this._fieldId]);return c},o.prototype.getDataSet=function(){return this},o.prototype.forEach=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=this._data,d=Object.keys(h);if(e&&e.order){var l=this.get(e);for(i=0,o=l.length;o>i;i++)n=l[i],s=n[this._fieldId],t(n,s)}else for(i=0,o=d.length;o>i;i++)s=d[i],n=this._getItem(s,a),r&&!r(n)||t(n,s)},o.prototype.map=function(t,e){var i,o,n,s,r=e&&e.filter,a=e&&e.type||this._options.type,h=[],d=this._data,l=Object.keys(d);for(i=0,o=l.length;o>i;i++)n=l[i],s=this._getItem(n,a),r&&!r(s)||h.push(t(s,n));return e&&e.order&&this._sort(h,e.order),h},o.prototype._filterFields=function(t,e){if(!t)return t;var i,o,n={},s=Object.keys(t),r=s.length;if(Array.isArray(e))for(i=0;r>i;i++)o=s[i],-1!=e.indexOf(o)&&(n[o]=t[o]);else for(i=0;r>i;i++)o=s[i],e.hasOwnProperty(o)&&(n[e[o]]=t[o]);return n},o.prototype._sort=function(t,e){if(s.isString(e)){var i=e;t.sort(function(t,e){var o=t[i],n=e[i];return o>n?1:n>o?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},o.prototype.remove=function(t,e){var i,o,n,s=[];if(Array.isArray(t))for(i=0,o=t.length;o>i;i++)n=this._remove(t[i]),null!=n&&s.push(n);else n=this._remove(t),null!=n&&s.push(n);return s.length&&this._trigger("remove",{items:s},e),s},o.prototype._remove=function(t){if(s.isNumber(t)||s.isString(t)){if(this._data[t])return delete this._data[t],this.length--,t}else if(t instanceof Object){var e=t[this._fieldId];if(void 0!==e&&this._data[e])return delete this._data[e],this.length--,e}return null},o.prototype.clear=function(t){var e=Object.keys(this._data);return this._data={},this.length=0,this._trigger("remove",{items:e},t),e},o.prototype.max=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||d>r)&&(s=h,r=d)}return s},o.prototype.min=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;i>e;e++){var a=n[e],h=o[a],d=h[t];null!=d&&(!s||r>d)&&(s=h,r=d)}return s},o.prototype.distinct=function(t){var e,i,o,n=this._data,r=Object.keys(n),a=[],h=this._options.type&&this._options.type[t]||null,d=0;for(e=0,o=r.length;o>e;e++){var l=r[e],c=n[l],u=c[t],p=!1;for(i=0;d>i;i++)if(a[i]==u){p=!0;break}p||void 0===u||(a[d]=u,d++)}if(h)for(e=0,o=a.length;o>e;e++)a[e]=s.convert(a[e],h);return a},o.prototype._addItem=function(t){var e=t[this._fieldId];if(void 0!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" already exists")}else e=s.randomUUID(),t[this._fieldId]=e;var i,o,n={},r=Object.keys(t);for(i=0,o=r.length;o>i;i++){var a=r[i],h=this._type[a];n[a]=s.convert(t[a],h)}return this._data[e]=n,this.length++,e},o.prototype._getItem=function(t,e){var i,o,n,r,a=this._data[t];if(!a)return null;var h={},d=Object.keys(a);if(e)for(n=0,r=d.length;r>n;n++)i=d[n],o=a[i],h[i]=s.convert(o,e[i]);else for(n=0,r=d.length;r>n;n++)i=d[n],o=a[i],h[i]=o;return h},o.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 0==e)throw new Error("Cannot update item: item has no id (item: "+JSON.stringify(t)+")");var i=this._data[e];if(!i)throw new Error("Cannot update item: no item with id "+e+" found");for(var o=Object.keys(t),n=0,r=o.length;r>n;n++){var a=o[n],h=this._type[a];i[a]=s.convert(t[a],h)}return e},t.exports=o},function(t,e){function i(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}i.prototype.setOptions=function(t){t&&"undefined"!=typeof t.delay&&(this.delay=t.delay),t&&"undefined"!=typeof t.max&&(this.max=t.max),this._flushIfNeeded()},i.extend=function(t,e){var o=new i(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){o.flush()};var n=[{name:"flush",original:void 0}];if(e&&e.replace)for(var s=0;sthis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var n=i(1),s=i(9);o.prototype.setData=function(t){var e,i,o,n;if(this._data&&(this._data.off&&this._data.off("*",this.listener),e=Object.keys(this._ids),this._ids={},this.length=0,this._trigger("remove",{items:e})),this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),o=0,n=e.length;n>o;o++)i=e[o],this._ids[i]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},o.prototype.refresh=function(){var t,e,i,o=this._data.getIds({filter:this._options&&this._options.filter}),n=Object.keys(this._ids),s={},r=[],a=[];for(e=0,i=o.length;i>e;e++)t=o[e],s[t]=!0,this._ids[t]||(r.push(t),this._ids[t]=!0);for(e=0,i=n.length;i>e;e++)t=n[e],s[t]||(a.push(t),delete this._ids[t]);this.length+=r.length-a.length,r.length&&this._trigger("add",{items:r}),a.length&&this._trigger("remove",{items:a})},o.prototype.get=function(t){var e,i,o,s=this,r=n.getType(arguments[0]);"String"==r||"Number"==r||"Array"==r?(e=arguments[0],i=arguments[1],o=arguments[2]):(i=arguments[0],o=arguments[1]);var a=n.extend({},this._options,i);this._options.filter&&i&&i.filter&&(a.filter=function(t){return s._options.filter(t)&&i.filter(t)});var h=[];return void 0!=e&&h.push(e),h.push(a),h.push(o),this._data&&this._data.get.apply(this._data,h)},o.prototype.getIds=function(t){var e;if(this._data){var i,o=this._options.filter;i=t&&t.filter?o?function(e){return o(e)&&t.filter(e)}:t.filter:o,e=this._data.getIds({filter:i,order:t&&t.order})}else e=[];return e},o.prototype.map=function(t,e){var i=[];if(this._data){var o,n=this._options.filter;o=e&&e.filter?n?function(t){return n(t)&&e.filter(t)}:e.filter:n,i=this._data.map(t,{filter:o,order:e&&e.order})}else i=[];return i},o.prototype.getDataSet=function(){for(var t=this;t instanceof o;)t=t._data;return t||null},o.prototype._onEvent=function(t,e,i){var o,n,s,r,a=e&&e.items,h=this._data,d=[],l=[],c=[],u=[];if(a&&h){switch(t){case"add":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r&&(this._ids[s]=!0,l.push(s));break;case"update":for(o=0,n=a.length;n>o;o++)s=a[o],r=this.get(s),r?this._ids[s]?(c.push(s),d.push(e.data[o])):(this._ids[s]=!0,l.push(s)):this._ids[s]&&(delete this._ids[s],u.push(s));break;case"remove":for(o=0,n=a.length;n>o;o++)s=a[o],this._ids[s]&&(delete this._ids[s],u.push(s))}this.length+=l.length-u.length,l.length&&this._trigger("add",{items:l},i),c.length&&this._trigger("update",{items:c,data:d},i),u.length&&this._trigger("remove",{items:u},i)}},o.prototype.on=s.prototype.on,o.prototype.off=s.prototype.off,o.prototype._trigger=s.prototype._trigger,o.prototype.subscribe=o.prototype.on,o.prototype.unsubscribe=o.prototype.off,t.exports=o},function(t,e,i){function o(t,e,i){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");this.containerElement=t,this.width="400px",this.height="400px",this.margin=10,this.defaultXCenter="55%",this.defaultYCenter="50%",this.xLabel="x",this.yLabel="y",this.zLabel="z";var n=function(t){return t};this.xValueLabel=n,this.yValueLabel=n,this.zValueLabel=n,this.filterLabel="time",this.legendLabel="value",this.style=o.STYLE.DOT,this.showPerspective=!0,this.showGrid=!0,this.keepAspectRatio=!0,this.showShadow=!1,this.showGrayBottom=!1,this.showTooltip=!1,this.verticalRatio=.5,this.animationInterval=1e3,this.animationPreload=!1,this.camera=new p,this.camera.setArmRotation(1,.5),this.camera.setArmLength(1.7),this.eye=new c(0,0,-1),this.dataTable=null,this.dataPoints=null,this.colX=void 0,this.colY=void 0,this.colZ=void 0,this.colValue=void 0,this.colFilter=void 0,this.xMin=0,this.xStep=void 0,this.xMax=1,this.yMin=0,this.yStep=void 0,this.yMax=1,this.zMin=0,this.zStep=void 0,this.zMax=1,this.valueMin=0,this.valueMax=1,this.xBarWidth=1,this.yBarWidth=1,this.axisColor="#4D4D4D",this.gridColor="#D3D3D3",this.dataColor={fill:"#7DC1FF",stroke:"#3267D2",strokeWidth:1},this.dotSizeRatio=.02,this.create(),this.setOptions(i),e&&this.setData(e)}function n(t){return"clientX"in t?t.clientX:t.targetTouches[0]&&t.targetTouches[0].clientX||0}function s(t){return"clientY"in t?t.clientY:t.targetTouches[0]&&t.targetTouches[0].clientY||0}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=i(13),h=i(9),d=i(11),l=i(1),c=i(14),u=i(15),p=i(16),f=i(17),m=i(18),v=i(19);a(o.prototype),o.prototype._setScale=function(){this.scale=new c(1/(this.xMax-this.xMin),1/(this.yMax-this.yMin),1/(this.zMax-this.zMin)),this.keepAspectRatio&&(this.scale.x3&&(this.colFilter=3);else{if(this.style!==o.STYLE.DOTCOLOR&&this.style!==o.STYLE.DOTSIZE&&this.style!==o.STYLE.BARCOLOR&&this.style!==o.STYLE.BARSIZE)throw'Unknown style "'+this.style+'"';this.colX=0,this.colY=1,this.colZ=2,this.colValue=3,t.getNumberOfColumns()>4&&(this.colFilter=4)}},o.prototype.getNumberOfRows=function(t){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;ot[o][e]&&(i.min=t[o][e]),i.maxt;t++){var f=(t-u)/(p-u),m=240*f,g=this._hsv2rgb(m,1,1);c.strokeStyle=g,c.beginPath(),c.moveTo(h,r+t),c.lineTo(a,r+t),c.stroke()}c.strokeStyle=this.axisColor,c.strokeRect(h,r,i,s)}if(this.style===o.STYLE.DOTSIZE&&(c.strokeStyle=this.axisColor,c.fillStyle=this.dataColor.fill,c.beginPath(),c.moveTo(h,r),c.lineTo(a,r),c.lineTo(a-i+e,d),c.lineTo(h,d),c.closePath(),c.fill(),c.stroke()),this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.DOTSIZE){var y=5,b=new v(this.valueMin,this.valueMax,(this.valueMax-this.valueMin)/5,!0);for(b.start(),b.getCurrent()0?this.yMin:this.yMax,n=this._convert3Dto2D(new c(_,r,this.zMin)),Math.cos(2*w)>0?(m.textAlign="center",m.textBaseline="top",n.y+=b):Math.sin(2*w)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.xValueLabel(i.getCurrent())+" ",n.x,n.y),i.next()}for(m.lineWidth=1,o=void 0===this.defaultYStep,i=new v(this.yMin,this.yMax,this.yStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,n=this._convert3Dto2D(new c(s,i.getCurrent(),this.zMin)),Math.cos(2*w)<0?(m.textAlign="center",m.textBaseline="top",n.y+=b):Math.sin(2*w)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(" "+this.yValueLabel(i.getCurrent())+" ",n.x,n.y),i.next();for(m.lineWidth=1,o=void 0===this.defaultZStep,i=new v(this.zMin,this.zMax,this.zStep,o),i.start(),i.getCurrent()0?this.xMin:this.xMax,r=Math.sin(w)<0?this.yMin:this.yMax;!i.end();)t=this._convert3Dto2D(new c(s,r,i.getCurrent())),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(t.x-b,t.y),m.stroke(),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(this.zValueLabel(i.getCurrent())+" ",t.x-5,t.y),i.next();m.lineWidth=1,t=this._convert3Dto2D(new c(s,r,this.zMin)),e=this._convert3Dto2D(new c(s,r,this.zMax)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),m.lineWidth=1,u=this._convert3Dto2D(new c(this.xMin,this.yMin,this.zMin)),p=this._convert3Dto2D(new c(this.xMax,this.yMin,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(u.x,u.y),m.lineTo(p.x,p.y),m.stroke(),u=this._convert3Dto2D(new c(this.xMin,this.yMax,this.zMin)),p=this._convert3Dto2D(new c(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(u.x,u.y),m.lineTo(p.x,p.y),m.stroke(),m.lineWidth=1,t=this._convert3Dto2D(new c(this.xMin,this.yMin,this.zMin)),e=this._convert3Dto2D(new c(this.xMin,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke(),t=this._convert3Dto2D(new c(this.xMax,this.yMin,this.zMin)),e=this._convert3Dto2D(new c(this.xMax,this.yMax,this.zMin)),m.strokeStyle=this.axisColor,m.beginPath(),m.moveTo(t.x,t.y),m.lineTo(e.x,e.y),m.stroke();var x=this.xLabel;x.length>0&&(l=.1/this.scale.y,s=(this.xMin+this.xMax)/2,r=Math.cos(w)>0?this.yMin-l:this.yMax+l,n=this._convert3Dto2D(new c(s,r,this.zMin)),Math.cos(2*w)>0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*w)<0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(x,n.x,n.y));var k=this.yLabel;k.length>0&&(d=.1/this.scale.x,s=Math.sin(w)>0?this.xMin-d:this.xMax+d,r=(this.yMin+this.yMax)/2,n=this._convert3Dto2D(new c(s,r,this.zMin)),Math.cos(2*w)<0?(m.textAlign="center",m.textBaseline="top"):Math.sin(2*w)>0?(m.textAlign="right",m.textBaseline="middle"):(m.textAlign="left",m.textBaseline="middle"),m.fillStyle=this.axisColor,m.fillText(k,n.x,n.y));var O=this.zLabel;O.length>0&&(h=30,s=Math.cos(w)>0?this.xMin:this.xMax,r=Math.sin(w)<0?this.yMin:this.yMax,a=(this.zMin+this.zMax)/2,n=this._convert3Dto2D(new c(s,r,a)),m.textAlign="right",m.textBaseline="middle",m.fillStyle=this.axisColor,m.fillText(O,n.x-h,n.y))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._redrawDataGrid=function(){var t,e,i,n,s,r,a,h,d,l,u,p,f=this.frame.canvas,m=f.getContext("2d");if(m.lineJoin="round",m.lineCap="round",!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(s=0;s0}else r=!0;r?(p=(t.point.z+e.point.z+i.point.z+n.point.z)/4,d=240*(1-(p-this.zMin)*this.scale.z/this.verticalRatio),l=1,this.showShadow?(u=Math.min(1+x.x/k/2,1),a=this._hsv2rgb(d,l,u),h=a):(u=1,a=this._hsv2rgb(d,l,u),h=this.axisColor)):(a="gray",h=this.axisColor),m.lineWidth=this._getStrokeWidth(t),m.fillStyle=a,m.strokeStyle=h,m.beginPath(),m.moveTo(t.screen.x,t.screen.y),m.lineTo(e.screen.x,e.screen.y),m.lineTo(n.screen.x,n.screen.y),m.lineTo(i.screen.x,i.screen.y),m.closePath(),m.fill(),m.stroke()}}else for(s=0;su&&(u=0);var p,f,m;this.style===o.STYLE.DOTCOLOR?(p=240*(1-(d.point.value-this.valueMin)*this.scale.value),f=this._hsv2rgb(p,1,1),m=this._hsv2rgb(p,1,.8)):this.style===o.STYLE.DOTSIZE?(f=this.dataColor.fill,m=this.dataColor.stroke):(p=240*(1-(d.point.z-this.zMin)*this.scale.z/this.verticalRatio),f=this._hsv2rgb(p,1,1),m=this._hsv2rgb(p,1,.8)),i.lineWidth=this._getStrokeWidth(d),i.strokeStyle=m,i.fillStyle=f,i.beginPath(),i.arc(d.screen.x,d.screen.y,u,0,2*Math.PI,!0),i.fill(),i.stroke()}}},o.prototype._redrawDataBar=function(){var t,e,i,n,s=this.frame.canvas,r=s.getContext("2d");if(!(void 0===this.dataPoints||this.dataPoints.length<=0)){for(t=0;t0){for(t=this.dataPoints[0],o.lineWidth=this._getStrokeWidth(t),o.lineJoin="round",o.lineCap="round",o.strokeStyle=this.dataColor.stroke,o.beginPath(),o.moveTo(t.screen.x,t.screen.y),e=1;e0?1:0>t?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=100,s=null,r=null,a=null,h=new u(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){s=this.dataPoints[i];var d=s.surfaces;if(d)for(var l=d.length-1;l>=0;l--){var c=d[l],p=c.corners,f=[p[0].screen,p[1].screen,p[2].screen],m=[p[2].screen,p[3].screen,p[0].screen];if(this._insideTriangle(h,f)||this._insideTriangle(h,m))return s}}else for(i=0;ib)&&n>b&&(a=b,r=s)}}return r},o.prototype._showTooltip=function(t){var e,i,o;this.tooltip?(e=this.tooltip.dom.content,i=this.tooltip.dom.line,o=this.tooltip.dom.dot):(e=document.createElement("div"),e.style.position="absolute",e.style.padding="10px",e.style.border="1px solid #4d4d4d",e.style.color="#1a1a1a",e.style.background="rgba(255,255,255,0.7)",e.style.borderRadius="2px",e.style.boxShadow="5px 5px 10px rgba(128,128,128,0.5)",i=document.createElement("div"),i.style.position="absolute",i.style.height="40px",i.style.width="0",i.style.borderLeft="1px solid #4d4d4d",o=document.createElement("div"),o.style.position="absolute",o.style.height="0",o.style.width="0",o.style.border="5px solid #4d4d4d",o.style.borderRadius="5px",this.tooltip={dataPoint:null,dom:{content:e,line:i,dot:o}}),this._hideTooltip(),this.tooltip.dataPoint=t,"function"==typeof this.showTooltip?e.innerHTML=this.showTooltip(t.point):e.innerHTML="
"+this.xLabel+":"+t.point.x+"
"+this.yLabel+":"+t.point.y+"
"+this.zLabel+":"+t.point.z+"
",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,a=o.offsetWidth,h=o.offsetHeight,d=t.screen.x-n/2;d=Math.min(Math.max(d,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=d+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-a/2+"px",o.style.top=t.screen.y-h/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},t.exports=o},function(t,e){function i(t){return t?o(t):void 0}function o(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,n=0;no;++o)i[o].apply(this,e)}return this},i.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},i.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e){function i(t,e,i){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0,this.z=void 0!==i?i:0}i.subtract=function(t,e){var o=new i;return o.x=t.x-e.x,o.y=t.y-e.y,o.z=t.z-e.z,o},i.add=function(t,e){var o=new i;return o.x=t.x+e.x,o.y=t.y+e.y,o.z=t.z+e.z,o},i.avg=function(t,e){return new i((t.x+e.x)/2,(t.y+e.y)/2,(t.z+e.z)/2)},i.crossProduct=function(t,e){var o=new i;return o.x=t.y*e.z-t.z*e.y,o.y=t.z*e.x-t.x*e.z,o.z=t.x*e.y-t.y*e.x,o},i.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},t.exports=i},function(t,e){function i(t,e){this.x=void 0!==t?t:0,this.y=void 0!==e?e:0}t.exports=i},function(t,e,i){function o(){this.armLocation=new n,this.armRotation={},this.armRotation.horizontal=0,this.armRotation.vertical=0,this.armLength=1.7,this.cameraLocation=new n,this.cameraRotation=new n(.5*Math.PI,0,0),this.calculateCameraOrientation()}var n=i(14);o.prototype.setArmLocation=function(t,e,i){this.armLocation.x=t,this.armLocation.y=e,this.armLocation.z=i,this.calculateCameraOrientation()},o.prototype.setArmRotation=function(t,e){void 0!==t&&(this.armRotation.horizontal=t),void 0!==e&&(this.armRotation.vertical=e,this.armRotation.vertical<0&&(this.armRotation.vertical=0),this.armRotation.vertical>.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},o.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},o.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},o.prototype.getArmLength=function(){return this.armLength},o.prototype.getCameraLocation=function(){return this.cameraLocation},o.prototype.getCameraRotation=function(){return this.cameraRotation},o.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=o},function(t,e,i){function o(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return t>e?1:e>t?-1:0}),this.values.length>0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(11);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?this.values[this.index]:void 0},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(t0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},o.prototype.setIndex=function(t){if(!(to&&(o=0),o>this.values.length-1&&(o=this.values.length-1),o},o.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,o=i+3;return o},o.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,o=this.leftToIndex(i);this.setIndex(o),n.preventDefault()},o.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",n.removeEventListener(document,"mousemove",this.onmousemove),n.removeEventListener(document,"mouseup",this.onmouseup),n.preventDefault()},t.exports=o},function(t,e){function i(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}i.prototype.setRange=function(t,e,i,o){this._start=t?t:0,this._end=e?e:0,this.setStep(i,o)},i.prototype.setStep=function(t,e){void 0===t||0>=t||(void 0!==e&&(this.prettyStep=e),this.prettyStep===!0?this._step=i.calculatePrettyStep(t):this._step=t)},i.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),n=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(o-t)<=Math.abs(s-t)&&(s=o),Math.abs(n-t)<=Math.abs(s-t)&&(s=n),0>=s&&(s=1),s},i.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},i.prototype.getStep=function(){return this._step},i.prototype.start=function(){this._current=this._start-this._start%this._step},i.prototype.next=function(){this._current+=this._step},i.prototype.end=function(){return this._current>this._end},t.exports=i},function(t,e,i){if("undefined"!=typeof window){var o=i(21),n=window.Hammer||i(22);t.exports=o(n,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);-1!==e&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return Array.isArray(t)?(l(t,i[e],i),!0):!1}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function u(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&ct(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==ft?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function v(t,e,i){l(w(e),function(e){t.addEventListener(e,i,!1)})}function g(t,e,i){l(w(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function w(t){return t.trim().split(/\s+/g)}function _(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function O(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=R(o);e.timeStamp=gt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=B(a,h),e.distance=A(a,h),P(i,e),e.offsetDirection=L(e.deltaX,e.deltaY);var d=z(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=vt(d.x)>vt(d.y)?d.x:d.y,e.scale=r?j(r.pointers,o):1,e.rotation=r?F(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Et&&s.eventType!==It||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function I(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=Nt&&(h>Tt||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,c=z(h,d,l);o=c.x,n=c.y,i=vt(c.x)>vt(c.y)?c.x:c.y,s=L(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function N(t){for(var e=[],i=0;in;)i+=t[n].clientX,o+=t[n].clientY,n++;return{x:mt(i/e),y:mt(o/e)}}function z(t,e,i){return{x:e/t||0,y:i/t||0}}function L(t,e){return t===e?Rt:vt(t)>=vt(e)?0>t?zt:Lt:0>e?At:Bt}function A(t,e,i){i||(i=Wt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function B(t,e,i){i||(i=Wt);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function F(t,e){return B(e[1],e[0],Yt)+B(t[1],t[0],Yt)}function j(t,e){return A(e[0],e[1],Yt)/A(t[0],t[1],Yt)}function H(){this.evEl=Vt,this.evWin=Ut,this.allow=!0,this.pressed=!1,S.apply(this,arguments)}function W(){this.evEl=Zt,this.evWin=Kt,S.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=Qt,this.evWin=$t,this.started=!1,S.apply(this,arguments)}function G(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(It|Nt)&&(i=k(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=ee,this.targetIds={},S.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Et|Pt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Et)for(n=0;na&&(e.push(t),a=e.length-1):n&(It|Nt)&&(i=!0),0>a||(e[a]=t,this.callback(this.manager,n,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var Jt={touchstart:Et,touchmove:Pt,touchend:It,touchcancel:Nt},Qt="touchstart",$t="touchstart touchmove touchend touchcancel";u(Y,S,{handler:function(t){var e=Jt[t.type];if(e===Et&&(this.started=!0),this.started){var i=G.call(this,t,e);e&(It|Nt)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}});var te={touchstart:Et,touchmove:Pt,touchend:It,touchcancel:Nt},ee="touchstart touchmove touchend touchcancel";u(V,S,{handler:function(t){var e=te[t.type],i=U.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}),u(q,S,{handler:function(t,e,i){var o=i.pointerType==Mt,n=i.pointerType==St;if(o)this.mouse.allow=!1;else if(n&&!this.mouse.allow)return;e&(It|Nt)&&(this.mouse.allow=!0),this.callback(t,e,i)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ie=O(pt.style,"touchAction"),oe=ie!==a,ne="compute",se="auto",re="manipulation",ae="none",he="pan-x",de="pan-y";X.prototype={set:function(t){t==ne&&(t=this.compute()),oe&&this.manager.element.style&&(this.manager.element.style[ie]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){f(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Z(t.join(" "))},preventDefaults:function(t){if(!oe){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var o=this.actions,n=b(o,ae),s=b(o,de),r=b(o,he);if(n){var a=1===t.pointers.length,h=t.distance<2,d=t.deltaTime<250;if(a&&h&&d)return}if(!r||!s)return n||s&&i&Ft||r&&i&jt?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var le=1,ce=2,ue=4,pe=8,fe=pe,me=16,ve=32;K.prototype={defaults:{},set:function(t){return ct(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(d(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=$(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return d(t,"dropRecognizeWith",this)?this:(t=$(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(d(t,"requireFailure",this))return this;var e=this.requireFail;return t=$(t,this),-1===_(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(d(t,"dropRequireFailure",this))return this;t=$(t,this);var e=_(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;pe>o&&e(i.options.event+J(o)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),o>=pe&&e(i.options.event+J(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ve)},canEmit:function(){for(var t=0;ts?zt:Lt,i=s!=this.pX,o=Math.abs(t.deltaX)):(n=0===r?Rt:0>r?At:Bt,i=r!=this.pY,o=Math.abs(t.deltaY))),t.direction=n,i&&o>e.threshold&&n&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&ce||!(this.state&ce)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Q(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),u(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ce)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),u(ot,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[se]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(It|Nt)&&!n)this.reset();else if(t.eventType&Et)this.reset(),this._timer=h(function(){this.state=fe,this.tryEmit()},e.time,this);else if(t.eventType&It)return fe;return ve},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===fe&&(t&&t.eventType&It?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=gt(),this.manager.emit(this.options.event,this._input)))}}),u(nt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ae]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ce)}}),u(st,tt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Ft|jt,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ft|jt)?e=t.overallVelocity:i&Ft?e=t.overallVelocityX:i&jt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&vt(e)>this.options.velocity&&t.eventType&It},emit:function(t){var e=Q(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),u(rt,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[re]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distance=e;e++)r[String.fromCharCode(e)]={code:65+(e-97),shift:!1};for(e=65;90>=e;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;9>=e;e++)r[""+e]={code:48+e,shift:!1};for(e=1;12>=e;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;9>=e;e++)r["num"+e]={code:96+e,shift:!1};r["num*"]={code:106,shift:!1},r["num+"]={code:107,shift:!1},r["num-"]={code:109,shift:!1},r["num/"]={code:111,shift:!1},r["num."]={code:110,shift:!1},r.left={code:37,shift:!1},r.up={code:38,shift:!1},r.right={code:39,shift:!1},r.down={code:40,shift:!1},r.space={code:32,shift:!1},r.enter={code:13,shift:!1},r.shift={code:16,shift:void 0},r.esc={code:27,shift:!1},r.backspace={code:8,shift:!1},r.tab={code:9,shift:!1},r.ctrl={code:17,shift:!1},r.alt={code:18,shift:!1},r["delete"]={code:46,shift:!1},r.pageup={code:33,shift:!1},r.pagedown={code:34,shift:!1},r["="]={code:187,shift:!1},r["-"]={code:189,shift:!1},r["]"]={code:221,shift:!1},r["["]={code:219,shift:!1};var a=function(t){d(t,"keydown")},h=function(t){d(t,"keyup")},d=function(t,e){if(void 0!==s[e][t.keyCode]){for(var o=s[e][t.keyCode],n=0;ne)&&(n=e),(null===s||i>s)&&(s=i)}),null!==n&&null!==s){var r=(n+s)/2,a=Math.max(this.range.end-this.range.start,1.1*(s-n)),h=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(r-a/2,r+a/2,h)}}},n.prototype.fit=function(t){var e,i=t&&void 0!==t.animation?t.animation:!0,o=this.itemsData&&this.itemsData.getDataSet();1===o.length&&void 0===o.get()[0].end?(e=this.getDataRange(),this.moveTo(e.min.valueOf(),{animation:i})):(e=this.getItemRange(),this.range.setRange(e.min,e.max,i))},n.prototype.getItemRange=function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,o=null!==e.max?e.max.valueOf():null,n=null,s=null;if(null!=i&&null!=o){var r,a,h,d,c;!function(){var e=function(t){return l.convert(t.data.start,"Date").valueOf()},u=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return l.convert(e,"Date").valueOf()};r=o-i,0>=r&&(r=10),a=r/t.props.center.width,l.forEach(t.itemSet.items,function(t){t.show(),t.repositionX();var r=e(t),h=u(t);if(this.options.rtl)var d=r-(t.getWidthRight()+10)*a,l=h+(t.getWidthLeft()+10)*a;else var d=r-(t.getWidthLeft()+10)*a,l=h+(t.getWidthRight()+10)*a;i>d&&(i=d,n=t),l>o&&(o=l,s=t)}.bind(t)),n&&s&&(h=n.getWidthLeft()+10,d=s.getWidthRight()+10,c=t.props.center.width-h-d,c>0&&(t.options.rtl?(i=e(n)-d*r/c,o=u(s)+h*r/c):(i=e(n)-h*r/c,o=u(s)+d*r/c)))}()}return{min:null!=i?new Date(i):null,max:null!=o?new Date(o):null}},n.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=l.convert(i.start,"Date").valueOf(),n=l.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||t>o)&&(t=o),(null===e||n>e)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY;if(this.options.rtl)var o=l.getAbsoluteRight(this.dom.centerContainer)-e;else var o=e-l.getAbsoluteLeft(this.dom.centerContainer);var n=i-l.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=g.customTimeFromTarget(t),h=this.itemSet.options.snap||null,d=this.body.util.getScale(),c=this.body.util.getStep(),u=this._toTime(o),p=h?h(u,d,c):u,f=l.getTarget(t),m=null;return null!=s?m="item":null!=a?m="custom-time":l.hasParent(f,this.timeAxis.dom.foreground)?m="axis":this.timeAxis2&&l.hasParent(f,this.timeAxis2.dom.foreground)?m="axis":l.hasParent(f,this.itemSet.dom.labelSet)?m="group-label":l.hasParent(f,this.currentTime.bar)?m="current-time":l.hasParent(f,this.dom.center)&&(m="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:m,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:u,snappedTime:p}},t.exports=n},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},t.optionsContainer=document.createElement("div"),t.optionsContainer.className="vis-configuration vis-config-option-container",t.domElements.push(t.optionsContainer),t.domElements.push(e)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?o-1:0),r=1;o>r;r++)n[r-1]=e[r];return n.forEach(function(t){s.appendChild(t)}),i.domElements.push(s),{v:i.domElements.length}}();if("object"===("undefined"==typeof a?"undefined":s(a)))return a.v}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,i===!0?o.innerHTML=""+t+":":o.innerHTML=t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&-1!==t.indexOf(e)&&(n=t.indexOf(e));for(var s=0;se&&n>e*c?(a.min=Math.ceil(e*c),l=a.min,d="range increased"):n>e/c&&(a.min=Math.ceil(e/c),l=a.min,d="range increased"),e*c>s&&1!==s&&(a.max=Math.ceil(e*c),l=a.max,d="range increased"),a.value=e}else a.value=o;var u=document.createElement("input");u.className="vis-configuration vis-config-rangeinput",u.value=a.value;var p=this;a.onchange=function(){u.value=this.value,p._update(Number(this.value),i)},a.oninput=function(){u.value=this.value};var f=this._makeLabel(i[i.length-1],i),m=this._makeItem(i,f,a,u);""!==d&&this.popupHistory[m]!==l&&(this.popupHistory[m]=l,this._setupPopup(d,m))}},{key:"_setupPopup",value:function(t,e){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCountervar options = "+JSON.stringify(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;es;s++)for(r=0;rp?p+1:p;var f=l/this.r,m=a.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=p,m.s=f;var v=a.HSVToRGB(m.h,m.s,m.v);v.a=this.color.a,this.color=v,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}();e["default"]=h},function(t,e,i){i(20);e.onTouch=function(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)},e.onRelease=function(t,e){return e.inputHandler=function(t){t.isFinal&&e(t)},t.on("hammer.input",e.inputHandler)},e.offTouch=function(t,e){t.off("hammer.input",e.inputHandler)},e.offRelease=e.offTouch,e.disablePreventDefaultVertically=function(t){var e="pan-y";return t.getTouchAction=function(){return[e]},t}},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=function(){function t(t,e){for(var i=0;is.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""),d):n.distance<=r?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e),d):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print(Object.keys(i))+t.printLocation(o,e),d),a=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3],s=1e9,a="",h=[],d=e.toLowerCase(),l=void 0;for(var c in i){var u=void 0;if(void 0!==i[c].__type__&&n===!0){var p=t.findInOptions(e,i[c],r.copyAndExtendArray(o,c));s>p.distance&&(a=p.closestMatch,h=p.path,s=p.distance,l=p.indexMatch)}else-1!==c.toLowerCase().indexOf(d)&&(l=c),u=t.levenshteinDistance(e,c),s>u&&(a=c,h=r.copyArray(o),s=u)}return{closestMatch:a,path:h,distance:s,indexMatch:l}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length<=2||void 0===arguments[2]?"Problem value found at: \n":arguments[2],o="\n\n"+i+"options = {\n",n=0;ns;s++)o+=" ";o+=t[n]+": {\n"}for(var r=0;ru,r=s||null===n?n:l+(n-l)*i,p=s||null===a?a:c+(a-c)*i;y=h._applyRange(r,p),d.updateHiddenDates(h.options.moment,h.body,h.options.hiddenDates),v=v||y,y&&h.body.emitter.emit("rangechange",{start:new Date(h.start),end:new Date(h.end),byUser:o}),s?v&&h.body.emitter.emit("rangechanged",{start:new Date(h.start),end:new Date(h.end),byUser:o}):h.animationTimer=setTimeout(w,20)}};return g()}var y=this._applyRange(n,a);if(d.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),y){var b={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",b),this.body.emitter.emit("rangechanged",b)}},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?r.convert(t,"Date").valueOf():this.start,n=null!=e?r.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(o>n&&(n=o),null!==a&&a>o&&(i=a-o,o+=i,n+=i,null!=s&&n>s&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=a&&a>o&&(o=a)),null!==this.options.zoomMin){var h=parseFloat(this.options.zoomMin);0>h&&(h=0),h>n-o&&(this.end-this.start===h&&o>this.start&&nd&&(d=0),n-o>d&&(this.end-this.start===d&&othis.end?(o=this.start,n=this.end):(i=n-o-d,o+=i/2,n-=i/2))}var l=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;n(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start,s=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);o-=s;var r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;if(this.options.rtl)var a=i/r*o;else var a=-i/r*o;var h=this.props.touch.start+a,l=this.props.touch.end+a,c=d.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0),u=d.snapAwayFromHidden(this.body.hiddenDates,l,this.previousDelta-i,!0);if(c!=h||u!=l)return this.deltaDifference+=i,this.props.touch.start=c,this.props.touch.end=u,void this._onDrag(t);this.previousDelta=i,this._applyRange(h,l);var p=new Date(this.start),f=new Date(this.end);this.body.emitter.emit("rangechange",{start:p,end:f,byUser:!0})}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0}))},o.prototype._onMouseWheel=function(t){if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&(!this.options.zoomKey||t[this.options.zoomKey])){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),e){var i;i=0>e?1-e/5:1/(1+e/5);var o=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center),n=this._pointerToDate(o);this.zoom(i,n,e)}t.preventDefault()}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center));var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),s=o-n,r=i-n+(this.props.touch.start-(i-n))*e,a=i+s+(this.props.touch.end-(i+s))*e; -this.startToFront=0>=1-e,this.endToFront=0>=e-1;var h=d.snapAwayFromHidden(this.body.hiddenDates,r,1-e,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);h==r&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX;if(this.options.rtl)var i=e-r.getAbsoluteLeft(this.body.dom.centerContainer);else var i=r.getAbsoluteRight(this.body.dom.centerContainer)-e;var o=this.body.util.toTime(i);return o>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(n(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.getPointer=function(t,e){return this.options.rtl?{x:r.getAbsoluteRight(e)-t.x,y:t.y-r.getAbsoluteTop(e)}:{x:t.x-r.getAbsoluteLeft(e),y:t.y-r.getAbsoluteTop(e)}},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=d.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);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){function i(t,e){this.options=null,this.props=null}i.prototype.setOptions=function(t){t&&util.extend(this.options,t)},i.prototype.redraw=function(){return!1},i.prototype.destroy=function(){},i.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=i},function(t,e){e.convertHiddenOptions=function(t,i,o){if(o&&!Array.isArray(o))return e.convertHiddenOptions(t,i,[o]);if(i.hiddenDates=[],o&&1==Array.isArray(o)){for(var n=0;n=4*a){var u=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(u=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-u,"days"),p.add(1,"weeks");break;case"weekly":var f=l.diff(d,"days"),m=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(m),l.day(m),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(u=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(u,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(u=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(u,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;p>d;)switch(i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()}),o[h].repeat){case"daily":d.add(1,"days"),l.add(1,"days");break;case"weekly":d.add(1,"weeks"),l.add(1,"weeks");break;case"monthly":d.add(1,"months"),l.add(1,"months");break;case"yearly":d.add(1,"y"),l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}i.hiddenDates.push({start:d.valueOf(),end:l.valueOf()})}}e.removeDuplicates(i);var v=e.isHidden(i.range.start,i.hiddenDates),g=e.isHidden(i.range.end,i.hiddenDates),y=i.range.start,b=i.range.end;1==v.hidden&&(y=1==i.range.startToFront?v.startDate-1:v.endDate+1),1==g.hidden&&(b=1==i.range.endToFront?g.startDate-1:g.endDate+1),1!=v.hidden&&1!=g.hidden||i.range._applyRange(y,b)}},e.removeDuplicates=function(t){for(var e=t.hiddenDates,i=[],o=0;o=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(var o=0;o=r&&a>n){o=!0;break}}if(1==o&&n=e&&i>r&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?0>o?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&n>t)return{hidden:!0,startDate:o,endDate:n}}return{hidden:!1,startDate:o,endDate:n}}},function(t,e,i){function o(){}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(13),r=i(20),a=i(28),h=i(1),d=(i(9),i(11),i(30),i(34),i(44)),l=i(45),c=i(32),u=i(46);s(o.prototype),o.prototype._create=function(t){function e(t){i.isActive()&&i.emit("mousewheel",t)}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.root.className="vis-timeline",this.dom.background.className="vis-panel vis-background",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical",this.dom.backgroundHorizontal.className="vis-panel vis-background vis-horizontal",this.dom.centerContainer.className="vis-panel vis-center",this.dom.leftContainer.className="vis-panel vis-left",this.dom.rightContainer.className="vis-panel vis-right",this.dom.top.className="vis-panel vis-top",this.dom.bottom.className="vis-panel vis-bottom",this.dom.left.className="vis-content",this.dom.center.className="vis-content",this.dom.right.className="vis-content",this.dom.shadowTop.className="vis-shadow vis-top",this.dom.shadowBottom.className="vis-shadow vis-bottom",this.dom.shadowTopLeft.className="vis-shadow vis-top",this.dom.shadowBottomLeft.className="vis-shadow vis-bottom",this.dom.shadowTopRight.className="vis-shadow vis-top",this.dom.shadowBottomRight.className="vis-shadow vis-bottom",this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.on("rangechange",function(){this.initialDrawDone===!0&&this._redraw()}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("pan",this._onDrag.bind(this));var i=this;this.on("_change",function(t){t&&1==t.queue?i._redrawTimer||(i._redrawTimer=setTimeout(function(){i._redrawTimer=null,i._redraw()},0)):i._redraw()}),this.hammer=new r(this.dom.root);var o=this.hammer.get("pinch").set({enable:!0});a.disablePreventDefaultVertically(o),this.hammer.get("pan").set({threshold:5,direction:r.DIRECTION_HORIZONTAL}),this.listeners={};var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];if(n.forEach(function(t){var e=function(e){i.isActive()&&i.emit(t,e)};i.hammer.on(t,e),i.listeners[t]=e}),a.onTouch(this.hammer,function(t){i.emit("touch",t)}.bind(this)),a.onRelease(this.hammer,function(t){i.emit("release",t)}.bind(this)),this.dom.root.addEventListener("mousewheel",e),this.dom.root.addEventListener("DOMMouseScroll",e),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},o.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","rtl","throttleRedraw"];if(h.selectiveExtend(e,this.options,t),this.options.rtl){var i=this.dom.leftContainer;this.dom.leftContainer=this.dom.rightContainer,this.dom.rightContainer=i,this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"}if(this.options.orientation={item:void 0,axis:void 0},"orientation"in t&&("string"==typeof t.orientation?this.options.orientation={item:t.orientation,axis:t.orientation}:"object"===n(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var o=this.timeAxis2=new d(this.body);o.setOptions=function(t){var e=t?h.extend({},t):{};e.orientation="top",d.prototype.setOptions.call(o,e)},this.components.push(o)}}else if(this.timeAxis2){var s=this.components.indexOf(this.timeAxis2);-1!==s&&this.components.splice(s,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&c.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new l(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var r=h.deepExtend({},this.options);this.components.forEach(function(t){h.deepExtend(r,t.options)}),this.configurator.setModuleOptions({global:r})}this._origRedraw?this._redraw():(this._origRedraw=this._redraw.bind(this),this._redraw=h.throttle(this._origRedraw,this.options.throttleRedraw))},o.prototype.isActive=function(){return!this.activator||this.activator.active},o.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},o.prototype.setCustomTime=function(t,e){var i=this.customTimes.filter(function(t){return e===t.options.id});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));i.length>0&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));return e[0].getCustomTime()},o.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));return i.length>0?i[0].setCustomTitle(t):void 0},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?h.convert(t,"Date").valueOf():new Date,o=this.customTimes.some(function(t){return t.options.id===e});if(o)throw new Error("A custom time with id "+JSON.stringify(e)+" already exists");var n=new u(this.body,h.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var i=e.max-e.min,o=new Date(e.min.valueOf()-.01*i),n=new Date(e.max.valueOf()+.01*i),s=t&&void 0!==t.animation?t.animation:!0;this.range.setRange(o,n,s)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i){var o;if(1==arguments.length){var n=arguments[0];o=void 0!==n.animation?n.animation:!0,this.range.setRange(n.start,n.end,o)}else o=i&&void 0!==i.animation?i.animation:!0,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=h.convert(t,"Date").valueOf(),n=o-i/2,s=o+i/2,r=e&&void 0!==e.animation?e.animation:!0;this.range.setRange(n,s,r)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.root.offsetWidth){c.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(h.addClassName(o.root,"vis-top"),h.removeClassName(o.root,"vis-bottom")):(h.removeClassName(o.root,"vis-top"),h.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=h.option.asSize(e.maxHeight,""),o.root.style.minHeight=h.option.asSize(e.minHeight,""),o.root.style.width=h.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var n=o.root.offsetHeight-o.root.clientHeight,s=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(s=n),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var a=Math.max(i.left.height,i.center.height,i.right.height),d=i.top.height+a+i.bottom.height+n+i.border.top+i.border.bottom;o.root.style.height=h.option.asSize(e.height,d+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-n;var l=i.root.height-i.top.height-i.bottom.height-n;i.centerContainer.height=l,i.leftContainer.height=l,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-s,i.left.width=o.leftContainer.clientWidth||-i.border.left,i.leftContainer.width=i.left.width,i.right.width=o.rightContainer.clientWidth||-i.border.right,i.rightContainer.width=i.right.width;var u=i.root.width-i.left.width-i.right.width-s;i.center.width=u,i.centerContainer.width=u,i.top.width=u,i.bottom.width=u,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.rightContainer.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px",this._updateScrollTop();var p=this.props.scrollTop;"top"!=e.orientation.item&&(p+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=p+"px",o.left.style.left="0",o.left.style.top=p+"px",o.right.style.left="0",o.right.style.top=p+"px";var f=0==this.props.scrollTop?"hidden":"",m=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=f,o.shadowBottom.style.visibility=m,o.shadowTopLeft.style.visibility=f,o.shadowBottomLeft.style.visibility=m,o.shadowTopRight.style.visibility=f,o.shadowBottomRight.style.visibility=m;var v=this.props.center.height>this.props.centerContainer.height;this.hammer.get("pan").set({direction:v?r.DIRECTION_ALL:r.DIRECTION_HORIZONTAL}),this.components.forEach(function(e){t=e.redraw()||t});var g=5;if(t){if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTope;e++)o=this.selection[e],n=this.items[o],n&&n.unselect();for(this.selection=[],e=0,i=t.length;i>e;e++)o=t[e],n=this.items[o],n&&(this.selection.push(o),n.select())},o.prototype.getSelection=function(){return this.selection.concat([])},o.prototype.getVisibleItems=function(){var t=this.body.range.getRange();if(this.options.rtl)var e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end);else var i=this.body.util.toScreen(t.start),e=this.body.util.toScreen(t.end);var o=[];for(var n in this.groups)if(this.groups.hasOwnProperty(n))for(var s=this.groups[n],r=s.visibleItems,a=0;ae&&o.push(h.id):h.lefti&&o.push(h.id)}return o},o.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;o>i;i++)if(e[i]==t){e.splice(i,1);break}},o.prototype.redraw=function(){var t=this.options.margin,e=this.body.range,i=r.option.asSize,o=this.options,n=o.orientation.item,s=!1,a=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,a.className="vis-itemset",s=this._orderGroups()||s;var h=e.end-e.start,d=h!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth;d&&(this.stackDirty=!0), -this.lastVisibleInterval=h,this.props.lastWidth=this.props.width;var l=this.stackDirty,c=this._firstGroup(),u={item:t.item,axis:t.axis},p={item:t.item,axis:t.item.vertical/2},f=0,m=t.axis+t.item.vertical;return this.groups[y].redraw(e,p,l),r.forEach(this.groups,function(t){var i=t==c?u:p,o=t.redraw(e,i,l);s=o||s,f+=t.height}),f=Math.max(f,m),this.stackDirty=!1,a.style.height=i(f),this.props.width=a.offsetWidth,this.props.height=f,this.dom.axis.style.top=i("top"==n?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right="0":this.dom.axis.style.left="0",s=this._isResized()||s},o.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t],i=this.groups[e]||this.groups[g];return i||null},o.prototype._updateUngrouped=function(){var t,e,i=this.groups[g];this.groups[y];if(this.groupsData){if(i){i.hide(),delete this.groups[g];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var o=this._getGroupId(t.data),n=this.groups[o];n&&n.add(t)||t.hide()}}}else if(!i){var s=null,r=null;i=new c(s,r,this),this.groups[g]=i;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],i.add(t));i.show()}},o.prototype.getLabelSet=function(){return this.dom.labelSet},o.prototype.setItems=function(t){var e,i=this,o=this.itemsData;if(t){if(!(t instanceof a||t instanceof h))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(o&&(r.forEach(this.itemListeners,function(t,e){o.off(e,t)}),e=o.getIds(),this._onRemove(e)),this.itemsData){var n=this.id;r.forEach(this.itemListeners,function(t,e){i.itemsData.on(e,t,n)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},o.prototype.getItems=function(){return this.itemsData},o.prototype.setGroups=function(t){var e,i=this;if(this.groupsData&&(r.forEach(this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof a||t instanceof h))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;r.forEach(this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},o.prototype.getGroups=function(){return this.groupsData},o.prototype.removeItem=function(t){var e=this.itemsData.get(t),i=this.itemsData.getDataSet();e&&this.options.onRemove(e,function(e){e&&i.remove(t)})},o.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},o.prototype._getGroupId=function(t){var e=this._getType(t);return"background"==e&&void 0==t.group?y:this.groupsData?t.group:g},o.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var i,n=e.itemsData.get(t,e.itemOptions),s=e.items[t],r=e._getType(n),a=o.types[r];if(s&&(a&&s instanceof a?e._updateItem(s,n):(i=s.selected,e._removeItem(s),s=null)),!s){if(!a)throw"rangeoverflow"==r?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+r+'"');s=new a(n,e.conversion,e.options),s.id=t,e._addItem(s),i&&(this.selection.push(t),s.select())}}.bind(this)),this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0})},o.prototype._onAdd=o.prototype._onUpdate,o.prototype._onRemove=function(t){var e=0,i=this;t.forEach(function(t){var o=i.items[t];o&&(e++,i._removeItem(o))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0}))},o.prototype._order=function(){r.forEach(this.groups,function(t){t.order()})},o.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},o.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var i=e.groupsData.get(t),o=e.groups[t];if(o)o.setData(i);else{if(t==g||t==y)throw new Error("Illegal group id. "+t+" is a reserved id.");var n=Object.create(e.options);r.extend(n,{height:null}),o=new c(t,i,e),e.groups[t]=o;for(var s in e.items)if(e.items.hasOwnProperty(s)){var a=e.items[s];a.data.group==t&&o.add(a)}o.order(),o.show()}}),this.body.emitter.emit("_change",{queue:!0})},o.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var i=e[t];i&&(i.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},o.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder}),e=!r.equalArray(t,this.groupIds);if(e){var i=this.groups;t.forEach(function(t){i[t].hide()}),t.forEach(function(t){i[t].show()}),this.groupIds=t}return e}return!1},o.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),i=this.groups[e];i&&i.add(t)},o.prototype._updateItem=function(t,e){var i=t.data.group,o=t.data.subgroup;if(t.setData(e),i!=t.data.group||o!=t.data.subgroup){var n=this.groups[i];n&&n.remove(t);var s=this._getGroupId(t.data),r=this.groups[s];r&&r.add(t)}},o.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);-1!=e&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},o.prototype._constructByEndArray=function(t){for(var e=[],i=0;in+s)return}else{var a=e.height;if(n+a-s>o)return}}if(e&&e!=this.groupTouchParams.group){var h=this.groupsData,d=h.get(e.groupId),l=h.get(this.groupTouchParams.group.groupId);l&&d&&(this.options.groupOrderSwap(l,d,this.groupsData),this.groupsData.update(l),this.groupsData.update(d));var c=this.groupsData.getIds({order:this.options.groupOrder});if(!r.equalArray(c,this.groupTouchParams.originalOrder))for(var h=this.groupsData,u=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,f=Math.min(u.length,c.length),m=0,v=0,g=0;f>m;){for(;f>m+v&&f>m+g&&c[m+v]==u[m+g];)m++;if(m+v>=f)break;if(c[m+v]!=p)if(u[m+g]!=p){var y=c.indexOf(u[m+g]),b=h.get(c[m+v]),w=h.get(u[m+g]);this.options.groupOrderSwap(b,w,h),h.update(b),h.update(w);var _=c[m+v];c[m+v]=u[m+g],c[y]=_,m++}else g=1;else v=1}}}},o.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=r.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!r.equalArray(n,e.groupTouchParams.originalOrder))for(var s=e.groupTouchParams.originalOrder,a=Math.min(s.length,n.length),h=0;a>h;){for(;a>h&&n[h]==s[h];)h++;if(h>=a)break;var d=n.indexOf(s[h]),l=o.get(n[h]),c=o.get(s[h]);e.options.groupOrderSwap(l,c,o),groupsData.update(l),groupsData.update(c);var u=n[h];n[h]=s[h],n[d]=u,h++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),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,event:t})}},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(o){var n=e.itemsData.get(o.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}else{if(this.options.rtl)var s=r.getAbsoluteRight(this.dom.frame),a=s-t.center.x;else var s=r.getAbsoluteLeft(this.dom.frame),a=t.center.x-s;var h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),c={start:i?i(h,d,l):h,content:"new item"};if("range"===this.options.type){var u=this.body.util.toTime(a+this.props.width/5);c.end=i?i(u,d,l):u}c[this.itemsData._fieldId]=r.randomUUID();var p=this.groupFromTarget(t);p&&(c.group=p.groupId),c=this._cloneItemData(c),this.options.onAdd(c,function(t){t&&e.itemsData.getDataSet().add(t)})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[],n=t.srcEvent&&t.srcEvent.shiftKey||!1;if(n&&this.options.multiselect){var s=this.itemsData.get(e.id).group,r=void 0;this.options.multiselectPerGroup&&i.length>0&&(r=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=r&&r!=s||i.push(e.id);var a=o._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||r==s){i=[];for(var h in this.items)if(this.items.hasOwnProperty(h)){var d=this.items[h],l=d.data.start,c=void 0!==d.data.end?d.data.end:l;!(l>=a.min&&c<=a.max)||this.options.multiselectPerGroup&&r!=this.itemsData.get(d.id).group||d instanceof v||i.push(d.id)}}}else{var u=i.indexOf(e.id);-1==u?i.push(e.id):i.splice(u,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,i=0;ia&&ea)return n}else if(0===i&&e0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*n>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),15*s>t&&(this.scale="minute",this.step=15),10*s>t&&(this.scale="minute",this.step=10),5*s>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.switchedYear=!1,this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.switchedMonth=!1,this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.switchedDay=!1,this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},o.prototype.getLabelMinor=function(t){void 0==t&&(t=this.current);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getLabelMajor=function(t){void 0==t&&(t=this.current);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/h%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(s().add(1,"day"),"day")?" vis-tomorrow":t.isSame(s().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}function n(t){return t.isSame(new Date,"year")?" vis-current-year":""}var s=this.moment,r=this.moment(this.current),a=r.locale?r.locale("en"):r.lang("en"),h=this.step;switch(this.scale){case"millisecond":return t(a.milliseconds()).trim();case"second":return t(a.seconds()).trim();case"minute":return t(a.minutes()).trim();case"hour":var d=a.hours();return 4==this.step&&(d=d+"-h"+(d+4)),"vis-h"+d+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+i(a)+t(a.date());case"day":var l=a.date(),c=a.format("MMMM").toLowerCase();return"vis-day"+l+" vis-"+c+o(a)+t(l-1);case"month":return"vis-"+a.format("MMMM").toLowerCase()+o(a)+t(a.month());case"year":var u=a.year();return"vis-year"+u+n(a)+t(u);default:return""}},t.exports=o},function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(1),s=i(37);i(38);o.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e;if(e=this.itemSet.options&&this.itemSet.options.groupTemplate?this.itemSet.options.groupTemplate(t):t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?n.removeClassName(this.dom.inner,"vis-hidden"):n.addClassName(this.dom.inner,"vis-hidden");var i=t&&t.className||null;i!=this.className&&(this.className&&(n.removeClassName(this.dom.label,this.className),n.removeClassName(this.dom.foreground,this.className),n.removeClassName(this.dom.background,this.className),n.removeClassName(this.dom.axis,this.className)),n.addClassName(this.dom.label,i),n.addClassName(this.dom.foreground,i),n.addClassName(this.dom.background,i),n.addClassName(this.dom.axis,i),this.className=i),this.style&&(n.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(n.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;if(r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,n.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),this._calculateSubGroupHeights(),"function"==typeof this.itemSet.options.order){if(i){var a=this,h=!1;n.forEach(this.items,function(t){t.displayed||(t.redraw(),a.visibleItems.push(t)),t.repositionX(h)});var d=this.orderedItems.byStart.slice().sort(function(t,e){return a.itemSet.options.order(t.data,e.data)});s.stack(d,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?s.stack(this.visibleItems,e,i):s.nostack(this.visibleItems,e,this.subgroups);var l=this._calculateHeight(e),c=this.dom.foreground;this.top=c.offsetTop,this.right=c.offsetLeft,this.width=c.offsetWidth,o=n.updateProperty(this,"height",l)||o,o=n.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=n.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=l+"px",this.dom.foreground.style.height=l+"px",this.dom.label.style.height=l+"px";for(var u=0,p=this.visibleItems.length;p>u;u++){var f=this.visibleItems[u];f.repositionY(e)}return o},o.prototype._calculateSubGroupHeights=function(){if(Object.keys(this.subgroups).length>0){var t=this;this.resetSubgroups(),n.forEach(this.visibleItems,function(e){void 0!==e.data.subgroup&&(t.subgroups[e.data.subgroup].height=Math.max(t.subgroups[e.data.subgroup].height,e.height),t.subgroups[e.data.subgroup].visible=!0)})}},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,s=i[0].top+i[0].height;if(n.forEach(i,function(t){o=Math.min(o,t.top),s=Math.max(s,t.top+t.height)}),o>t.axis){var r=o-t.axis;s-=r,n.forEach(i,function(t){t.top-=r})}e=s+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),-1==this.visibleItems.indexOf(t)){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;it?-1:l>=t?0:1};if(e.length>0)for(s=0;sl}),1==this.checkRangedItems)for(this.checkRangedItems=!1,s=0;sl})}for(s=0;s=0&&(s=e[r],!n(s));r--)void 0===o[s.id]&&(o[s.id]=!0,i.push(s));for(r=t+1;rn;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,l.options.rtl)){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].indexe.right&&t.top-o.vertical+ie.top:t.left-o.horizontal+ie.left&&t.top-o.vertical+ie.top}},function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,this.options=i,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var n=(i(20),i(39));o.prototype=new n(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){return this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintDeleteButton(t.box),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end);void 0!==t&&t!==!0||(-o>n&&(n=-o),s>2*o&&(s=2*o));var r=Math.max(s-n,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=r+this.props.content.width,i=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=r,i=Math.min(s-n,this.props.content.width)),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.options.rtl?this.dom.content.style.right="0":this.dom.content.style.left="0";break;case"right":this.options.rtl?this.dom.content.style.right=Math.max(r-i,0)+"px":this.dom.content.style.left=Math.max(r-i,0)+"px";break;case"center":this.options.rtl?this.dom.content.style.right=Math.max((r-i)/2,0)+"px":this.dom.content.style.left=Math.max((r-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:0>n?-n:0,this.options.rtl?this.dom.content.style.right=e+"px":this.dom.content.style.left=e+"px"}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.editable=null,this.data&&this.data.hasOwnProperty("editable")&&"boolean"==typeof this.data.editable&&(this.editable=t.editable)}var n=i(20),s=i(1);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),t.hasOwnProperty("editable")&&"boolean"==typeof t.editable&&(this.editable=t.editable),this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.remove||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.deleteButton){var i=this,o=document.createElement("div");this.options.rtl?o.className="vis-delete-rtl":o.className="vis-delete",o.title="Delete this item",new n(o).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(o),this.dom.deleteButton=o}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._updateContents=function(t){var e;if(this.options.template){var i=this.parent.itemSet.itemsData.get(this.id);e=this.options.template(i)}else e=this.data.content;var o=this._contentToString(this.content)!==this._contentToString(e);if(o){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("vis-title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;in;n++){var r=this.visibleItems[n];r.repositionY(e)}return o},o.prototype.show=function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=o},function(t,e,i){function o(t,e,i){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},this.options=i,t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);n.call(this,t,e,i)}var n=i(39);i(1);o.prototype=new n(null,null,null),o.prototype.isVisible=function(t){var e=(t.end-t.start)/4;return this.data.start>t.start-e&&this.data.startt.start-e&&this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation.item;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,n=this.parent.subgroups,r=n[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in n)n.hasOwnProperty(h)&&1==n[h].visible&&n[h].indexr&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof s?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},t.exports=o},function(t,e,i){function o(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:a.FORMAT,moment:d,timeAxis:null},this.options=s.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(31),a=i(35),h=i(32),d=i(2);o.prototype=new r,o.prototype.setOptions=function(t){t&&(s.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),s.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===n(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof d.locale?d.locale(t.locale):d.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},o.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},o.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o;this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=s.convert(this.body.range.start,"Number"),i=s.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),n=o-h.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,o);n-=this.body.util.toTime(0).valueOf();var r=new a(new Date(e),new Date(i),n,this.body.hiddenDates);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;var d=this.dom;d.redundant.lines=d.lines,d.redundant.majorTexts=d.majorTexts,d.redundant.minorTexts=d.minorTexts,d.lines=[],d.majorTexts=[],d.minorTexts=[];var c,u,p,f,m,v,g,y,b,w,_=0,x=void 0,k=0,O=1e3;for(r.start(),u=r.getCurrent(),f=this.body.util.toScreen(u);r.hasNext()&&O>k;){k++,m=r.isMajor(),w=r.getClassName(),b=r.getLabelMinor(),c=u,p=f,r.next(),u=r.getCurrent(),v=r.isMajor(),f=this.body.util.toScreen(u),g=_,_=f-p;var M=_>=.4*g;if(this.options.showMinorLabels&&M){var D=this._repaintMinorText(p,b,t,w);D.style.width=_+"px"}m&&this.options.showMajorLabels?(p>0&&(void 0==x&&(x=p),D=this._repaintMajorText(p,r.getLabelMajor(),t,w)),y=this._repaintMajorLine(p,_,t,w)):M?y=this._repaintMinorLine(p,_,t,w):y&&(y.style.width=parseInt(y.style.width)+_+"px")}if(k!==O||l||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to "+O+" lines."),l=!0),this.options.showMajorLabels){var S=this.body.util.toTime(0),C=r.getLabelMajor(S),T=C.length*(this.props.majorCharWidth||10)+10;(void 0==x||x>T)&&this._repaintMajorText(0,C,t,w)}s.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},o.prototype._repaintMinorText=function(t,e,i,o){var n=this.dom.redundant.minorTexts.shift();if(!n){var s=document.createTextNode("");n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.minorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.top="top"==i?this.props.majorLabelHeight+"px":"0",this.options.rtl?(n.style.left="",n.style.right=t+"px"):n.style.left=t+"px",n.className="vis-text vis-minor "+o,n},o.prototype._repaintMajorText=function(t,e,i,o){var n=this.dom.redundant.majorTexts.shift();if(!n){var s=document.createTextNode(e);n=document.createElement("div"),n.appendChild(s),this.dom.foreground.appendChild(n)}return this.dom.majorTexts.push(n),n.childNodes[0].nodeValue=e,n.className="vis-text vis-major "+o,n.style.top="top"==i?"0":this.props.minorLabelHeight+"px",this.options.rtl?(n.style.left="",n.style.right=t+"px"):n.style.left=t+"px",n},o.prototype._repaintMinorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top=s.majorLabelHeight+"px":n.style.top=this.body.domProps.top.height+"px",n.style.height=s.minorLineHeight+"px",this.options.rtl?(n.style.left="",n.style.right=t-s.minorLineWidth/2+"px",n.className="vis-grid vis-vertical-rtl vis-minor "+o):(n.style.left=t-s.minorLineWidth/2+"px",n.className="vis-grid vis-vertical vis-minor "+o),n.style.width=e+"px",n},o.prototype._repaintMajorLine=function(t,e,i,o){var n=this.dom.redundant.lines.shift();n||(n=document.createElement("div"),this.dom.background.appendChild(n)),this.dom.lines.push(n);var s=this.props;return"top"==i?n.style.top="0":n.style.top=this.body.domProps.top.height+"px",this.options.rtl?(n.style.left="",n.style.right=t-s.majorLineWidth/2+"px",n.className="vis-grid vis-vertical-rtl vis-major "+o):(n.style.left=t-s.majorLineWidth/2+"px",n.className="vis-grid vis-vertical vis-major "+o),n.style.height=s.majorLineHeight+"px",n.style.width=e+"px",n},o.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth};var l=!1;t.exports=o},function(t,e,i){function o(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=a(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this,i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];i.forEach(function(t){e.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(i){n(i.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=s(),this.escListener=this.deactivate.bind(this)}function n(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var s=i(23),r=i(13),a=i(20),h=i(1);r(o.prototype),o.current=null,o.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.hammer.destroy(),this.hammer=null},o.prototype.activate=function(){o.current&&o.current.deactivate(),o.current=this,this.active=!0,this.dom.overlay.style.display="none",h.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},o.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",h.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},o.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},t.exports=o},function(t,e,i){function o(t,e){this.body=t,this.defaultOptions={moment:a,locales:h,locale:"en",id:void 0,title:void 0},this.options=s.extend({},this.defaultOptions),e&&e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this.setOptions(e),this._create()}var n=i(20),s=i(1),r=i(31),a=i(2),h=i(47);o.prototype=new r,o.prototype.setOptions=function(t){t&&s.selectiveExtend(["moment","locale","locales","id"],this.options,t)},o.prototype._create=function(){var t=document.createElement("div");t["custom-time"]=this,t.className="vis-custom-time "+(this.options.id||""),t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t;var e=document.createElement("div");e.style.position="relative",e.style.top="0px",e.style.left="-10px",e.style.height="100%",e.style.width="20px",t.appendChild(e),this.hammer=new n(e),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:n.DIRECTION_HORIZONTAL})},o.prototype.destroy=function(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null},o.prototype.redraw=function(){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));var e=this.body.util.toScreen(this.customTime),i=this.options.locales[this.options.locale];i||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline.html#Localization"),this.warned=!0),i=this.options.locales.en);var o=this.options.title;return void 0===o&&(o=i.time+": "+this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss"),o=o.charAt(0).toUpperCase()+o.substring(1)),this.bar.style.left=e+"px",this.bar.title=o,!1},o.prototype.hide=function(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)},o.prototype.setCustomTime=function(t){this.customTime=s.convert(t,"Date"),this.redraw()},o.prototype.getCustomTime=function(){return new Date(this.customTime.valueOf())},o.prototype.setCustomTitle=function(t){this.options.title=t},o.prototype._onDragStart=function(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()},o.prototype._onDrag=function(t){if(this.eventParams.dragging){var e=this.body.util.toScreen(this.eventParams.customTime)+t.deltaX,i=this.body.util.toTime(e);this.setCustomTime(i),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()) -}),t.stopPropagation()}},o.prototype._onDragEnd=function(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf())}),t.stopPropagation())},o.customTimeFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("custom-time"))return e["custom-time"];e=e.parentNode}return null},t.exports=o},function(t,e){e.en={current:"current",time:"time"},e.en_EN=e.en,e.en_US=e.en,e.nl={current:"huidige",time:"tijd"},e.nl_NL=e.nl,e.nl_BE=e.nl},function(t,e,i){function o(t,e){this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,moment:r,locales:a,locale:"en"},this.options=n.extend({},this.defaultOptions),this.offset=0,this._create(),this.setOptions(e)}var n=i(1),s=i(31),r=i(2),a=i(47);o.prototype=new s,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t},o.prototype.destroy=function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null},o.prototype.setOptions=function(t){t&&n.selectiveExtend(["rtl","showCurrentTime","moment","locale","locales"],this.options,t)},o.prototype.redraw=function(){if(this.options.showCurrentTime){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());var e=this.options.moment((new Date).valueOf()+this.offset),i=this.body.util.toScreen(e),o=this.options.locales[this.options.locale];o||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline/#Localization"),this.warned=!0),o=this.options.locales.en);var n=o.current+" "+o.time+": "+e.format("dddd, MMMM Do YYYY, H:mm:ss");n=n.charAt(0).toUpperCase()+n.substring(1),this.options.rtl?this.bar.style.right=i+"px":this.bar.style.left=i+"px",this.bar.title=n}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1},o.prototype.start=function(){function t(){e.stop();var i=e.body.range.conversion(e.body.domProps.center.width).scale,o=1/i/10;30>o&&(o=30),o>1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="date",a="object",h="dom",d="moment",l="any",c={configure:{enabled:{"boolean":o},filter:{"boolean":o,"function":"function"},container:{dom:h},__type__:{object:a,"boolean":o,"function":"function"}},align:{string:i},rtl:{"boolean":o,undefined:"undefined"},autoResize:{"boolean":o},throttleRedraw:{number:n},clickToUse:{"boolean":o},dataAttributes:{string:i,array:s},editable:{add:{"boolean":o,undefined:"undefined"},remove:{"boolean":o,undefined:"undefined"},updateGroup:{"boolean":o,undefined:"undefined"},updateTime:{"boolean":o,undefined:"undefined"},__type__:{"boolean":o,object:a}},end:{number:n,date:r,string:i,moment:d},format:{minorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a}},majorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a}},__type__:{object:a}},moment:{"function":"function"},groupOrder:{string:i,"function":"function"},groupEditable:{add:{"boolean":o,undefined:"undefined"},remove:{"boolean":o,undefined:"undefined"},order:{"boolean":o,undefined:"undefined"},__type__:{"boolean":o,object:a}},groupOrderSwap:{"function":"function"},height:{string:i,number:n},hiddenDates:{start:{date:r,number:n,string:i,moment:d},end:{date:r,number:n,string:i,moment:d},repeat:{string:i},__type__:{object:a,array:s}},itemsAlwaysDraggable:{"boolean":o},locale:{string:i},locales:{__any__:{any:l},__type__:{object:a}},margin:{axis:{number:n},item:{horizontal:{number:n,undefined:"undefined"},vertical:{number:n,undefined:"undefined"},__type__:{object:a,number:n}},__type__:{object:a,number:n}},max:{date:r,number:n,string:i,moment:d},maxHeight:{number:n,string:i},maxMinorChars:{number:n},min:{date:r,number:n,string:i,moment:d},minHeight:{number:n,string:i},moveable:{"boolean":o},multiselect:{"boolean":o},multiselectPerGroup:{"boolean":o},onAdd:{"function":"function"},onUpdate:{"function":"function"},onMove:{"function":"function"},onMoving:{"function":"function"},onRemove:{"function":"function"},onAddGroup:{"function":"function"},onMoveGroup:{"function":"function"},onRemoveGroup:{"function":"function"},order:{"function":"function"},orientation:{axis:{string:i,undefined:"undefined"},item:{string:i,undefined:"undefined"},__type__:{string:i,object:a}},selectable:{"boolean":o},showCurrentTime:{"boolean":o},showMajorLabels:{"boolean":o},showMinorLabels:{"boolean":o},stack:{"boolean":o},snap:{"function":"function","null":"null"},start:{date:r,number:n,string:i,moment:d},template:{"function":"function"},groupTemplate:{"function":"function"},timeAxis:{scale:{string:i,undefined:"undefined"},step:{number:n,undefined:"undefined"},__type__:{object:a}},type:{string:i},width:{string:i,number:n},zoomable:{"boolean":o},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:n},zoomMin:{number:n},__type__:{object:a}},u={global:{align:["center","left","right"],direction:!1,autoResize:!0,throttleRedraw:[10,0,1e3,10],clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",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:""}},groupsDraggable:!1,height:"",locale:"",margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,start:"",type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1]}};e.allOptions=c,e.configureOptions=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e,i,o){if(!(Array.isArray(i)||i instanceof c||i instanceof u)&&i instanceof Object){var n=o;o=i,i=n}var s=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:d,width:null,height:null,maxHeight:null,minHeight:null},this.options=l.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new p(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new m(this.body),this.components.push(this.timeAxis),this.currentTime=new v(this.body),this.components.push(this.currentTime),this.linegraph=new y(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){s.emit("click",s.getEventProperties(t))}),this.on("doubletap",function(t){s.emit("doubleClick",s.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var s=i(26),r=o(s),a=i(29),h=o(a),d=(i(13),i(20),i(2)),l=i(1),c=i(9),u=i(11),p=i(30),f=i(33),m=i(44),v=i(48),g=i(46),y=i(51),b=i(29).printStyle,w=i(59).allOptions,_=i(59).configureOptions;n.prototype=new f,n.prototype.setOptions=function(t){var e=h["default"].validate(t,w);e===!0&&console.log("%cErrors have been found in the supplied options object.",b),f.prototype.setOptions.call(this,t)},n.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t instanceof c||t instanceof u?t:new c(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.linegraph&&this.linegraph.setItems(e),i)if(void 0!=this.options.start||void 0!=this.options.end){var o=void 0!=this.options.start?this.options.start:null,n=void 0!=this.options.end?this.options.end:null;this.setWindow(o,n,{animation:!1})}else this.fit({animation:!1})},n.prototype.setGroups=function(t){var e;e=t?t instanceof c||t instanceof u?t:new c(t):null,this.groupsData=e,this.linegraph.setGroups(e)},n.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},n.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]):!1},n.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var o=0;os?s:t,e=null==e?s:s>e?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,o=e-l.getAbsoluteLeft(this.dom.centerContainer),n=i-l.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(o),r=g.customTimeFromTarget(t),a=l.getTarget(t),h=null;l.hasParent(a,this.timeAxis.dom.foreground)?h="axis":this.timeAxis2&&l.hasParent(a,this.timeAxis2.dom.foreground)?h="axis":l.hasParent(a,this.linegraph.yAxisLeft.dom.frame)?h="data-axis":l.hasParent(a,this.linegraph.yAxisRight.dom.frame)?h="data-axis":l.hasParent(a,this.linegraph.legendLeft.dom.frame)?h="legend":l.hasParent(a,this.linegraph.legendRight.dom.frame)?h="legend":null!=r?h="custom-time":l.hasParent(a,this.currentTime.bar)?h="current-time":l.hasParent(a,this.dom.center)&&(h="background");var d=[],c=this.linegraph.yAxisLeft,u=this.linegraph.yAxisRight;return c.hidden||d.push(c.screenToValue(n)),u.hidden||d.push(u.screenToValue(n)),{event:t,what:h,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:s,value:d}},n.prototype._createConfigurator=function(){return new r["default"](this,this.dom.container,_)},t.exports=n},function(t,e,i){function o(t,e){this.id=s.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=s.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var i=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,o){i._onAdd(e.items)},update:function(t,e,o){i._onUpdate(e.items)},remove:function(t,e,o){i._onRemove(e.items)}},this.groupListeners={add:function(t,e,o){i._onAddGroups(e.items)},update:function(t,e,o){i._onUpdateGroups(e.items)},remove:function(t,e,o){i._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){i.lastStart=i.body.range.start,i.svg.style.left=s.option.asSize(-i.props.width),i.forceGraphUpdate=!0,i.redraw.call(i)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=i(8),a=i(9),h=i(11),d=i(31),l=i(52),c=i(54),u=i(58),p=i(55),f=i(57),m=i(56),v="__ungrouped__";o.prototype=new d,o.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new l(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new l(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new u(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new u(this.body,this.options.legend,"right",this.options.groups),this.show()},o.prototype.setOptions=function(t){if(t){var e=["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))i?-1:1});for(var o=new Array(t.length),n=0;n0){var h={};for(this._getRelevantData(a,h,n,s),this._applySampling(a,h),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(a[e])||(l[a[e]]=f.calcPath(h[a[e]],t)),f.draw(l[a[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||m.draw(h[a[e]],t,this.framework);break;case"bar":}}}return r.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,0==o?t[a].y=t[a].orginalY+r.y:t[a].y=t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var n,r,a,h;if(t.length>0)for(r=0;rt?-1:1},c=Math.max(0,s.binarySearchValue(d,i,"x","before",l)),u=Math.min(d.length,s.binarySearchValue(d,o,"x","after",l)+1);0>=u&&(u=d.length);var p=new Array(u-c);for(a=c;u>a;a++)h=n.itemsData[a],p[a-c]=h;e[t[r]]=p}else e[t[r]]=n.itemsData}},o.prototype._applySampling=function(t,e){var i;if(t.length>0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;r>l;l+=s){var c=Math.round(l/s);d[c]=n[l]}e[t[o]]=d.splice(0,Math.round(r/s))}}},o.prototype._getYRanges=function(t,e,i){var o,n,s,r,a=[],h=[];if(t.length>0){for(s=0;s0&&(n=this.groups[t[s]],r.stack===!0&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n.getItems()):h=h.concat(n.getItems()):i[t[s]]=n.getYRange(o,t[s]));p.getStackedYRange(a,i,t,"__barStackLeft","left"),p.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var c=0;ci?i:a,d=o>d?o:d):(r=!0,h=h>i?i:h,l=o>l?o:l));1==s&&this.yAxisLeft.setRange(a,d),1==r&&this.yAxisRight.setRange(h,l)}n=this._toggleAxisVisiblity(s,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(r,this.yAxisRight)||n,1==r&&1==s?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!s,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(1==r?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;for(var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"],c=0;ct?-1:1});for(var a=0;a=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),t.master===!0&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var d=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(d=this.props.titleCharHeight);var l=this.options.icons===!0?Math.max(this.options.iconWidth,d)+this.options.labelOffsetX+15:d+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&this.options.visible===!0?(this.width=this.maxLabelSize+l,this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var r=s.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"===i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize.5*(h.magnitudefactor*h.minorSteps[h.minorStepIdx])?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}i.prototype.setCharHeight=function(t){this.majorCharHeight=t},i.prototype.setHeight=function(t){this.containerHeight=t},i.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;0>i&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(n===!0)break}},i.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0},i.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},i.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},i.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},i.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},i.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&o-i>c?(s(),d=!1):d=!0}}},i.prototype.convertValue=function(t){return this.containerHeight-(t-this._start)*this.scale},i.prototype.screenToValue=function(t){return(this.containerHeight-t)/this.scale+this._start},t.exports=i},function(t,e,i){function o(t,e,i,o){this.id=e;var n=["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"];this.options=s.selectiveBridgeObject(n,i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=o,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible?!0:t.visible}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=i(1),r=(i(8),i(55)),a=i(57),h=i(56);o.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&s.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];s.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),s.mergeOptions(this.options,t,"interpolation"),s.mergeOptions(this.options,t,"drawPoints"),s.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==n(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible?!0:t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");i={svg:s,svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":a.drawIcon(this,o,n,t,e,i);break;case"points":case"point":h.drawIcon(this,o,n,t,e,i);break;case"bar":r.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=i>t?i:t,n=0,"left"===e.options.barChart.align?n-=.5*t:"right"===e.options.barChart.align&&(n+=.5*t)):(o=e.options.barChart.width,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.getStackedYRange=function(t,e,i,n,s){if(t.length>0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){var i=[];return i=1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var c={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,c,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o=e;if(i)for(var n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(var n=1;nl;l++)e=0==l?t[0]:t[l-1],i=t[l],o=t[l+1],n=d>l+2?t[l+2]:o,s={screen_x:(-e.screen_x+6*i.screen_x+o.screen_x)*h,screen_y:(-e.screen_y+6*i.screen_y+o.screen_y)*h},r={screen_x:(i.screen_x+6*o.screen_x-n.screen_x)*h,screen_y:(i.screen_y+6*o.screen_y-n.screen_y)*h},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([o.screen_x,o.screen_y]);return a},o._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var o,n,s,r,a,h,d,l,c,u,p,f,m,v,g,y,b,w,_,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var k=t.length,O=0;k-1>O;O++)o=0==O?t[0]:t[O-1],n=t[O],s=t[O+1],r=k>O+2?t[O+2]:s,d=Math.sqrt(Math.pow(o.screen_x-n.screen_x,2)+Math.pow(o.screen_y-n.screen_y,2)),l=Math.sqrt(Math.pow(n.screen_x-s.screen_x,2)+Math.pow(n.screen_y-s.screen_y,2)),c=Math.sqrt(Math.pow(s.screen_x-r.screen_x,2)+Math.pow(s.screen_y-r.screen_y,2)),v=Math.pow(c,i),y=Math.pow(c,2*i),g=Math.pow(l,i),b=Math.pow(l,2*i),_=Math.pow(d,i),w=Math.pow(d,2*i),u=2*w+3*_*g+b,p=2*y+3*v*g+b,f=3*_*(_+g),f>0&&(f=1/f),m=3*v*(v+g),m>0&&(m=1/m),a={screen_x:(-b*o.screen_x+u*n.screen_x+w*s.screen_x)*f,screen_y:(-b*o.screen_y+u*n.screen_y+w*s.screen_y)*f},h={screen_x:(y*n.screen_x+p*s.screen_x-b*r.screen_x)*m,screen_y:(y*n.screen_y+p*s.screen_y-b*r.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;it?-1:1});for(var i=0;i")}this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort(function(t,e){return e>t?-1:1}),s.resetElements(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),o=i,n=this.options.iconSize,r=.75*this.options.iconSize,a=i+.5*r+3;this.svg.style.width=n+5+i+"px";for(var h=0;h0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,e={},e.color=this.groups[this.groupsArray[i]],this.groups[t]=e}else{var o=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,e={},e.color=this.defaultGroups[o],this.groups[t]=e}return e}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e["default"]=r},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;it.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["color","font","fixed","shadow"];if(A.selectiveNotDeepExtend(n,t,e,i),A.mergeOptions(t,e,"shadow",i,o),void 0!==e.color&&null!==e.color){var s=A.parseColor(e.color);A.fillIfDefined(t.color,s)}else i===!0&&null===e.color&&(t.color=A.bridgeObject(o.color));void 0!==e.fixed&&null!==e.fixed&&("boolean"==typeof e.fixed?(t.fixed.x=e.fixed,t.fixed.y=e.fixed):(void 0!==e.fixed.x&&"boolean"==typeof e.fixed.x&&(t.fixed.x=e.fixed.x),void 0!==e.fixed.y&&"boolean"==typeof e.fixed.y&&(t.fixed.y=e.fixed.y))),void 0!==e.font&&null!==e.font?a["default"].parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=A.bridgeObject(o.font)),void 0!==e.scaling&&A.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)}}]),t}();e["default"]=B},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);var h=this.size.yLine,d=this._getColor(a),l=n(d,2),c=l[0],u=l[1],p=this._setAlignment(t,i,h,s),f=n(p,2);i=f[0],h=f[1],t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,t.fillStyle=c,this.isEdgeLabel||"left"!==this.fontOptions.align?t.textAlign="center":(t.textAlign=this.fontOptions.align,i-=.5*this.size.width),this.fontOptions.strokeWidth>0&&(t.lineWidth=this.fontOptions.strokeWidth,t.strokeStyle=u,t.lineJoin="round");for(var m=0;m0&&t.strokeText(this.lines[m],i,h),t.fillText(this.lines[m],i,h),h+=r}},{key:"_setAlignment",value:function(t,e,i,o){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){e=0,i=0;var n=2;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=2*n):t.textBaseline="middle"}else t.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t){var e=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(t<=this.nodeOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-t)));e=a.overrideOpacity(e,o),i=a.overrideOpacity(i,o)}return[e,i]}},{key:"getTextSize",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i={width:this._processLabel(t,e),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};return i}},{key:"calculateLabelSize",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?0:arguments[2],o=arguments.length<=3||void 0===arguments[3]?0:arguments[3],n=arguments.length<=4||void 0===arguments[4]?"middle":arguments[4];this.labelDirty===!0&&(this.size.width=this._processLabel(t,e)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(t,e){var i=0,o=[""],n=0;if(void 0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=t.measureText(o[0]).width;for(var s=1;n>s;s++){var r=t.measureText(o[s]).width;i=r>i?r:i}}return this.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];if("string"==typeof e.font){var o=e.font.split(" ");t.size=o[0].replace("px",""),t.face=o[1],t.color=o[2]}else"object"===s(e.font)&&a.fillIfDefined(t,e.font,i);t.size=Number(t.size)}}]),t}();e["default"]=h},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height;var n=this.options.shapeProperties.borderRadius;this.boundingBox.left=this.left-n,this.boundingBox.top=this.top-n,this.boundingBox.bottom=this.top+this.height+n,this.boundingBox.right=this.left+this.width+n}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),e}(d["default"]);e["default"]=l},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ithis.imageObj.height?(o=this.imageObj.width/this.imageObj.height,e=2*this.options.size*o||this.imageObj.width,i=2*this.options.size||this.imageObj.height):(o=this.imageObj.width&&this.imageObj.height?this.imageObj.height/this.imageObj.width:1,e=2*this.options.size,i=2*this.options.size*o):(e=this.imageObj.width,i=this.imageObj.height),this.width=e,this.height=i,this.radius=.5*this.width}}},{key:"_drawRawCircle",value:function(t,e,i,o,n,s){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.circle(e,i,s),this.enableShadow(t),t.fill(),this.disableShadow(t),t.save(),h>0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore()}},{key:"_drawImageAtPosition",value:function(t){if(0!=this.imageObj.width){t.globalAlpha=1,this.enableShadow(t);var e=this.imageObj.width/this.width/this.body.view.scale;if(e>2&&this.options.shapeProperties.interpolation===!0){var i=this.imageObj.width,o=this.imageObj.height,n=document.createElement("canvas");n.width=i,n.height=i;var s=n.getContext("2d");e*=.5,i*=.5,o*=.5,s.drawImage(this.imageObj,0,0,i,o);for(var r=0,a=1;e>2&&4>a;)s.drawImage(n,r,0,i,o,r+i,0,i/2,o/2),r+=i,e*=.5,i*=.5,o*=.5,a+=1;t.drawImage(n,r,0,i,o,this.left,this.top,this.width,this.height)}else t.drawImage(this.imageObj,this.left,this.top,this.width,this.height);this.disableShadow(t)}}},{key:"_drawImageLabel",value:function(t,e,i,o){var n,s=0;if(void 0!==this.height){s=.5*this.height;var r=this.labelModule.getTextSize(t);r.lineCount>=1&&(s+=r.height/2)}n=i+s,this.options.label&&(this.labelOffset=s),this.labelModule.draw(t,e,n,o,"hanging")}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),void 0!==this.options.label){var l=n+.5*this.height+3;this.labelModule.draw(t,o,l,s,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+3))}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,o=.5*this.height,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},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0){var i=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+i)}}},{key:"_icon",value:function(t,e,i,o){var n=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+n+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t),t.fillText(this.options.icon.code,e,i),this.disableShadow(t)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),t.closePath()}this._drawImageAtPosition(t),this._drawImageLabel(t,e,i,o||n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.top=this.top,this.boundingBox.left=this.left,this.boundingBox.right=this.left+this.width,this.boundingBox.bottom=this.top+this.height,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder", -value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;ii.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),s=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,s.x,s.y,n)}}}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=10,i=this.from.x,o=this.from.y,n=this.to.x,s=this.to.y,r=t.left,a=t.top,h=this.edgeType.getDistanceToEdge(i,o,n,s,r,a);return e>h}return!1}},{key:"_rotateForLabelAlignment",value:function(t){var e=this.from.y-this.to.y,i=this.from.x-this.to.x,o=Math.atan2(e,i);(-1>o&&0>i||o>0&&0>i)&&(o+=Math.PI),t.rotate(o)}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],n=["arrowStrikethrough","id","from","hidden","hoverWidth","label","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width"];if(g.selectiveDeepExtend(n,t,e,i),g.mergeOptions(t,e,"smooth",i,o),g.mergeOptions(t,e,"shadow",i,o),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:i===!0&&null===e.dashes&&(t.dashes=Object.create(o.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),g.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)):i===!0&&null===e.scaling&&(t.scaling=Object.create(o.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var r=e.arrows.toLowerCase();t.arrows.to.enabled=-1!=r.indexOf("to"),t.arrows.middle.enabled=-1!=r.indexOf("middle"),t.arrows.from.enabled=-1!=r.indexOf("from")}else{if("object"!==s(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+JSON.stringify(e.arrows));g.mergeOptions(t.arrows,e.arrows,"to",i,o.arrows),g.mergeOptions(t.arrows,e.arrows,"middle",i,o.arrows),g.mergeOptions(t.arrows,e.arrows,"from",i,o.arrows)}else i===!0&&null===e.arrows&&(t.arrows=Object.create(o.arrows));if(void 0!==e.color&&null!==e.color)if(t.color=g.deepExtend({},t.color,!0),g.isString(e.color))t.color.color=e.color,t.color.highlight=e.color,t.color.hover=e.color,t.color.inherit=!1;else{var a=!1;void 0!==e.color.color&&(t.color.color=e.color.color,a=!0),void 0!==e.color.highlight&&(t.color.highlight=e.color.highlight,a=!0),void 0!==e.color.hover&&(t.color.hover=e.color.hover,a=!0),void 0!==e.color.inherit&&(t.color.inherit=e.color.inherit),void 0!==e.color.opacity&&(t.color.opacity=Math.min(1,Math.max(0,e.color.opacity))),void 0===e.color.inherit&&a===!0&&(t.color.inherit=!1)}else i===!0&&null===e.color&&(t.color=g.bridgeObject(o.color));void 0!==e.font&&null!==e.font?h["default"].parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=g.bridgeObject(o.font))}}]),t}();e["default"]=y},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var i=0;iMath.abs(e)||this.options.smooth.forceDirection===!0||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var r=arguments.length<=6||void 0===arguments[6]?this._getViaCoordinates():arguments[6],h=a(r,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,s,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?this._getViaCoordinates():arguments[1],i=a(e,2),o=i[0],n=i[1],s=t,r=[];r[0]=Math.pow(1-s,3),r[1]=3*s*Math.pow(1-s,2),r[2]=3*Math.pow(s,2)*(1-s),r[3]=Math.pow(s,3);var h=r[0]*this.fromPoint.x+r[1]*o.x+r[2]*n.x+r[3]*this.toPoint.x,d=r[0]*this.fromPoint.y+r[1]*o.y+r[2]*n.y+r[3]*this.toPoint.y;return{x:h,y:d}}}]),e}(l["default"]);e["default"]=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;il;l++)c=.1*l,v[0]=Math.pow(1-c,3),v[1]=3*c*Math.pow(1-c,2),v[2]=3*Math.pow(c,2)*(1-c),v[3]=Math.pow(c,3),u=v[0]*t+v[1]*r.x+v[2]*a.x+v[3]*i,p=v[0]*e+v[1]*r.y+v[2]*a.y+v[3]*o,l>0&&(d=this._getDistanceToLine(f,m,u,p,n,s),h=h>d?d:h),f=u,m=p;return h}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i=l&&h>d;){var m=.5*(l+c);if(i=this.getPoint(m,a),o=Math.atan2(p.y-i.y,p.x-i.x),n=p.distanceToBorder(e,o),s=Math.sqrt(Math.pow(i.x-p.x,2)+Math.pow(i.y-p.y,2)),r=n-s,Math.abs(r)r?f===!1?l=m:c=m:f===!1?c=m:l=m,d++}return i.t=m,i}},{key:"_getDistanceToBezierEdge",value:function(t,e,i,o,n,s,r){var a=1e9,h=void 0,d=void 0,l=void 0,c=void 0,u=void 0,p=t,f=e;for(d=1;10>d;d++)l=.1*d,c=Math.pow(1-l,2)*t+2*l*(1-l)*r.x+Math.pow(l,2)*i,u=Math.pow(1-l,2)*e+2*l*(1-l)*r.y+Math.pow(l,2)*o,d>0&&(h=this._getDistanceToLine(p,f,c,u,n,s),a=a>h?h:a),p=c,f=u;return a}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var i=0;io.shape.height?(e=o.x+.5*o.shape.width,i=o.y-n):(e=o.x+n,i=o.y-.5*o.shape.height),[e,i,n]}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=10,d=0,l=this.options.selfReferenceSize,c=void 0,u=void 0,p=void 0,f=void 0,m=void 0,v=.05,g=.5*(s+r);r>=s&&h>d&&(g=.5*(s+r),c=this._pointOnCircle(o,n,l,g),u=Math.atan2(t.y-c.y,t.x-c.x),p=t.distanceToBorder(e,u),f=Math.sqrt(Math.pow(c.x-t.x,2)+Math.pow(c.y-t.y,2)), -m=p-f,!(Math.abs(m)0?a>0?s=g:r=g:a>0?r=g:s=g,d++;return c.t=g,c}},{key:"getLineWidth",value:function(t,e){return t===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):e===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i){var o=this.options.color;if(o.inherit!==!1){if("both"===o.inherit&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,a=void 0;return s=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(s=r.overrideOpacity(this.from.options.color.border,this.options.color.opacity),a=r.overrideOpacity(this.to.options.color.border,this.options.color.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,a),n}this.colorDirty===!0&&("to"===o.inherit?(this.color.highlight=this.to.options.color.highlight.border,this.color.hover=this.to.options.color.hover.border,this.color.color=r.overrideOpacity(this.to.options.color.border,o.opacity)):(this.color.highlight=this.from.options.color.highlight.border,this.color.hover=this.from.options.color.hover.border,this.color.color=r.overrideOpacity(this.from.options.color.border,o.opacity)))}else this.colorDirty===!0&&(this.color.highlight=o.highlight,this.color.hover=o.hover,this.color.color=r.overrideOpacity(o.color,o.opacity));return this.colorDirty=!1,e===!0?this.color.highlight:i===!0?this.color.hover:this.color.color}},{key:"_circle",value:function(t,e,i,o){this.enableShadow(t),t.beginPath(),t.arc(e,i,o,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t)}},{key:"getDistanceToEdge",value:function(t,e,i,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(t,e,i,o,s,r,a);else{var d=this._getCircleData(),l=n(d,3),c=l[0],u=l[1],p=l[2],f=c-s,m=u-r;h=Math.abs(Math.sqrt(f*f+m*m)-p)}return this.labelModule.size.lefts&&this.labelModule.size.topr?0:h}},{key:"_getDistanceToLine",value:function(t,e,i,o,n,s){var r=i-t,a=o-e,h=r*r+a*a,d=((n-t)*r+(s-e)*a)/h;d>1?d=1:0>d&&(d=0);var l=t+d*r,c=e+d*a,u=l-n,p=c-s;return Math.sqrt(u*u+p*p)}},{key:"getArrowData",value:function(t,e,i,o,s){var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,c=void 0,u=this.getLineWidth(o,s);if("from"===e?(h=this.from,d=this.to,l=.1,c=this.options.arrows.from.scaleFactor):"to"===e?(h=this.to,d=this.from,l=-.1,c=this.options.arrows.to.scaleFactor):(h=this.to,d=this.from,c=this.options.arrows.middle.scaleFactor),h!=d)if("middle"!==e)if(this.options.smooth.enabled===!0){a=this.findBorderPosition(h,t,{via:i});var p=this.getPoint(Math.max(0,Math.min(1,a.t+l)),i);r=Math.atan2(a.y-p.y,a.x-p.x)}else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.findBorderPosition(h,t);else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.getPoint(.5,i);else{var f=this._getCircleData(t),m=n(f,3),v=m[0],g=m[1],y=m[2];"from"===e?(a=this.findBorderPosition(this.from,t,{x:v,y:g,low:.25,high:.6,direction:-1}),r=-2*a.t*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===e?(a=this.findBorderPosition(this.from,t,{x:v,y:g,low:.6,high:1,direction:1}),r=-2*a.t*Math.PI+1.5*Math.PI-1.1*Math.PI):(a=this._pointOnCircle(v,g,y,.175),r=3.9269908169872414)}var b=15*c+3*u,w=a.x-.9*b*Math.cos(r),_=a.y-.9*b*Math.sin(r),x={x:w,y:_};return{point:a,core:x,angle:r,length:b}}},{key:"drawArrowHead",value:function(t,e,i,o){t.strokeStyle=this.getColor(t,e,i),t.fillStyle=t.strokeStyle,t.lineWidth=this.getLineWidth(e,i),t.arrow(o.point.x,o.point.y,o.angle,o.length),this.enableShadow(t),t.fill(),this.disableShadow(t)}},{key:"enableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor=this.options.shadow.color,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"]=a},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s):this.from.x>this.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s)),"discrete"===o&&(t=i*s>n?this.from.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n)),"discrete"===o&&(e=i*n>s?this.from.y:e));else if("straightCross"===o)Math.abs(this.from.x-this.to.x)<=Math.abs(this.from.y-this.to.y)?(t=this.from.x,e=this.from.yMath.abs(this.from.y-this.to.y)&&(t=this.from.x=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s,t=this.to.xthis.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s,t=this.to.x>t?this.to.x:t):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s,t=this.to.x>t?this.to.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n,e=this.to.y1||this.startedStabilization===!0)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsTick",value:function(){if(this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0),this.stabilized===!1){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var t=1.2;this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.calculateForces(),this.moveNodes(),this.revert(),this.timestep=.5*this.timestep,this.calculateForces(),this.moveNodes(),this.calculateForces(),this.moveNodes(),this._evaluateStepQuality()===!0?this.timestep=t*this.timestep:this.timestep/ts))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=this.options.maxVelocity?this.options.maxVelocity:1e9,i=0,o=0,n=5,s=0;se?s[t].x>0?e:-e:s[t].x,i.x+=s[t].x*o}else n[t].x=0,s[t].x=0;if(i.options.fixed.y===!1){var h=this.modelOptions.damping*s[t].y,d=(n[t].y-h)/i.options.mass;s[t].y+=d*o,s[t].y=Math.abs(s[t].y)>e?s[t].y>0?e:-e:s[t].y,i.y+=s[t].y*o}else n[t].y=0,s[t].y=0;var l=Math.sqrt(Math.pow(s[t].x,2)+Math.pow(s[t].y,2));return l}},{key:"calculateForces",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve()}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&t[e].x&&t[e].y&&(this.freezeCache[e]={x:t[e].options.fixed.x,y:t[e].options.fixed.y},t[e].options.fixed.x=!0,t[e].options.fixed.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.options.stabilization.iterations:arguments[0];return"number"!=typeof e&&(console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",this.options.stabilization.iterations),e=this.options.stabilization.iterations),0===this.physicsBody.physicsNodeIndices.length?void(this.ready=!0):(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,void setTimeout(function(){return t._stabilizationBatch()},0))}},{key:"_stabilizationBatch",value:function(){this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0);for(var t=0;this.stabilized===!1&&t0){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(e,i);this.barnesHutTree=n;for(var s=0;o>s;s++)t=e[i[s]],t.options.mass>0&&(this._getForceContribution(n.root.children.NW,t),this._getForceContribution(n.root.children.NE,t),this._getForceContribution(n.root.children.SW,t),this._getForceContribution(n.root.children.SE,t))}}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=t.centerOfMass.x-e.x,o=t.centerOfMass.y-e.y,n=Math.sqrt(i*i+o*o),n*t.calcSize>this.thetaInversed?this._calculateForces(n,i,o,e,t):4===t.childrenCount?(this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)):t.children.data.id!=e.id&&this._calculateForces(n,i,o,e,t)}}},{key:"_calculateForces",value:function(t,e,i,o,n){0===t&&(t=.1,e=t),this.overlapAvoidanceFactor<1&&(t=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,t-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,o=e.length,n=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;o>h;h++){var d=t[e[h]].x,l=t[e[h]].y;t[e[h]].options.mass>0&&(n>d&&(n=d),d>r&&(r=d),s>l&&(s=l),l>a&&(a=l))}var c=Math.abs(r-n)-Math.abs(a-s);c>0?(s-=.5*c,a+=.5*c):(n+=.5*c,r-=.5*c);var u=1e-5,p=Math.max(u,Math.abs(r-n)),f=.5*p,m=.5*(n+r),v=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-f,maxX:m+f,minY:v-f,maxY:v+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var y=0;o>y;y++)i=t[e[y]],i.options.mass>0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.mass+e.options.mass,o=1/i;t.centerOfMass.x=t.centerOfMass.x*t.mass+e.x*e.options.mass,t.centerOfMass.x*=o,t.centerOfMass.y=t.centerOfMass.y*t.mass+e.y*e.options.mass,t.centerOfMass.y*=o,t.mass=i;var n=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NW"):this._placeInRegion(t,e,"SW"):t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NE"):this._placeInRegion(t,e,"SE")}},{key:"_placeInRegion",value:function(t,e,i){switch(t.children[i].childrenCount){case 0:t.children[i].children.data=e,t.children[i].childrenCount=1,this._updateBranchMass(t.children[i],e);break;case 1:t.children[i].children.data.x===e.x&&t.children[i].children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(t.children[i]),this._placeInTree(t.children[i],e));break;case 4:this._placeInTree(t.children[i],e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY), -e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e["default"]=n},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii&&(s=.5*c>i?1:u*i+p,s/=i,o=t*s,n=e*s,l[r.id].x-=o,l[r.id].y-=n,l[a.id].x+=o,l[a.id].y+=n)}}}]),t}();e["default"]=n},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ii?-Math.pow(f*i,2)+Math.pow(f*p,2):0,0===i?i=.01:s/=i,o=t*s,n=e*s,u[r.id].x-=o,u[r.id].y-=n,u[a.id].x+=o,u[a.id].y+=n}}}]),t}();e["default"]=n},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(d["default"]);e["default"]=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i=t&&i.push(n.id)}for(var r=0;r0&&Object.keys(p).length>0&&m===!0&&o.push({nodes:u,edges:p})}}}for(var b=0;bo?r.x:o,n=r.ys?r.y:s;return{x:.5*(i+o),y:.5*(n+s)}}},{key:"openCluster",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!0:arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");if(void 0===this.body.nodes[t])throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(void 0===this.body.nodes[t].containedNodes)return void console.log("The node:"+t+" is not a cluster.");var o=this.body.nodes[t],n=o.containedNodes,s=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var r={},a={x:o.x,y:o.y};for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];r[d]={x:l.x,y:l.y}}var u=e.releaseFunction(a,r);for(var p in n)if(n.hasOwnProperty(p)){var f=this.body.nodes[p];void 0!==u[p]&&(f.x=void 0===u[p].x?o.x:u[p].x,f.y=void 0===u[p].y?o.y:u[p].y)}}else for(var m in n)if(n.hasOwnProperty(m)){var v=this.body.nodes[m];v=n[m],v.options.fixed.x===!1&&(v.x=o.x),v.options.fixed.y===!1&&(v.y=o.y)}for(var g in n)if(n.hasOwnProperty(g)){var y=this.body.nodes[g];y.vx=o.vx,y.vy=o.vy,y.setOptions({hidden:!1,physics:!0}),delete this.clusteredNodes[g]}for(var b=[],w=0;wo;)e.push(this.body.nodes[t].id),t=this.clusteredNodes[t].clusterId,o++;return e.push(this.body.nodes[t].id),e.reverse(),e}},{key:"_getConnectedId",value:function(t,e){return t.toId!=e?t.toId:t.fromId!=e?t.fromId:t.fromId}},{key:"_getHubSize",value:function(){for(var t=0,e=0,i=0,o=0,n=0;no&&(o=s.edges.length),t+=s.edges.length,e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}}]),t}();e["default"]=u},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0)for(var a=0;ae.shape.boundingBox.left&&(s=e.shape.boundingBox.left),re.shape.boundingBox.top&&(o=e.shape.boundingBox.top),n0)for(var a=0;ae.x&&(s=e.x),re.y&&(o=e.y),n0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,t.requiresTimeout===!0?clearTimeout(t.renderTimer):cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];s.selectiveDeepExtend(e,this.options,t)}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&void 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.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(function(){t._redraw(!1)},0):window.requestAnimationFrame(function(){t._redraw(!1)}))}},{key:"_redraw",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];if(this.allowRedraw===!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(),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;if(e.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),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),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),t===!0&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){var t=this.canvas.frame.canvas.getContext("2d");void 0===this.pixelRatio&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=20,a=this.canvas.DOMtoCanvas({x:-r,y:-r}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+r,y:this.canvas.frame.canvas.clientHeight+r}),d={top:a.y,left:a.x,bottom:h.y,right:h.x},l=0;l0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(-1!==t.indexOf("%")||-1!==t.indexOf("px"))return t;if(-1===t.indexOf("%"))return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext){var t=this.frame.canvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1), -this.frame.canvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:s.DIRECTION_ALL}),r.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new s(this.frame),r.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var t=arguments.length<=0||void 0===arguments[0]?this.options.width:arguments[0],e=arguments.length<=1||void 0===arguments[1]?this.options.height:arguments[1];t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.frame.canvas.getContext("2d"),r=this.pixelRatio;return this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e?(this._getCameraState(r),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,i=!0):(this.frame.canvas.width==Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&this.frame.canvas.height==Math.round(this.frame.canvas.clientHeight*this.pixelRatio)||this._getCameraState(r),this.frame.canvas.width!=Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&(this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=!0),this.frame.canvas.height!=Math.round(this.frame.canvas.clientHeight*this.pixelRatio)&&(this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),i=!0)),i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();e["default"]=h},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=a["default"].getRange(this.body.nodes,t.nodes);var h=this.body.nodeIndices.length;o=12.662/(h+7.4147)+.0964822;var d=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),i=a["default"].getRange(this.body.nodes,t.nodes);var l=1.1*Math.abs(i.maxX-i.minX),c=1.1*Math.abs(i.maxY-i.minY),u=this.canvas.frame.canvas.clientWidth/l,p=this.canvas.frame.canvas.clientHeight/c;o=p>=u?u:p}o>1?o=1:0===o&&(o=1);var f=a["default"].findCenter(i),m={position:f,scale:o,animation:t.animation};this.moveTo(m)}},{key:"focus",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){return void 0===t?void(t={}):(void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),t.animation===!1&&(t.animation={duration:0}),t.animation===!0&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),void this.animateView(t))}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),t.locked===!0&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length<=0||void 0===arguments[0]?!1:arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=t===!0?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();e["default"]=d},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],o=this.selectionHandler._getSelectedEdgeCount(),n=this.selectionHandler._getSelectedNodeCount(),s=this.selectionHandler.getSelection(),r=void 0;r=i===!0?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var a=this.selectionHandler._getSelectedEdgeCount(),h=this.selectionHandler._getSelectedNodeCount(),d=this.selectionHandler.getSelection(),l=this._determineIfDifferent(s,d),c=l.nodesChanged,u=l.edgesChanged,p=!1;h-n>0?(this.selectionHandler._generateClickEvent("selectNode",e,t),r=!0,p=!0):c===!0&&h>0?(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),this.selectionHandler._generateClickEvent("selectNode",e,t),p=!0,r=!0):0>h-n&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),r=!0),a-o>0&&p===!1?(this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):a>0&&u===!0?(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):0>a-o&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),r=!0),r===!0&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineIfDifferent",value:function(t,e){for(var i=!1,o=!1,n=0;nt&&(t=1e-5),t>10&&(t=10);var o=void 0;void 0!==this.drag&&this.drag.dragging===!0&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=t/i,r=(1-s)*e.x+n.x*s,a=(1-s)*e.y+n.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),t>i?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}}},{key:"onMouseWheel",value:function(t){if(this.options.zoomView===!0){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),0!==e){var i=this.body.view.scale,o=e/10;0>e&&(o/=1-o),i*=1+o;var n=this.getPointer({x:t.clientX,y:t.clientY});this.zoom(i,n)}t.preventDefault()}}},{key:"onMouseMove",value:function(t){var e=this,i=this.getPointer({x:t.clientX,y:t.clientY}),o=!1;if(void 0!==this.popup&&(this.popup.hidden===!1&&this._checkHidePopup(i),this.popup.hidden===!1&&(o=!0,this.popup.setPosition(i.x+3,i.y-5),this.popup.show())),this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),o===!1&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=setTimeout(function(){return e._checkShowPopup(i)},this.options.tooltipDelay))),this.options.hover===!0){var n=this.selectionHandler.getNodeAt(i);void 0===n&&(n=this.selectionHandler.getEdgeAt(i)),this.selectionHandler.hoverObject(n)}}},{key:"_checkShowPopup",value:function(t){var e=this.canvas._XconvertDOMtoCanvas(t.x),i=this.canvas._YconvertDOMtoCanvas(t.y),o={left:e,top:i,right:e,bottom:i},n=void 0===this.popupObj?void 0:this.popupObj.id,s=!1,r="node";if(void 0===this.popupObj){for(var a=this.body.nodeIndices,h=this.body.nodes,l=void 0,c=[],u=0;u0&&(this.popupObj=h[c[c.length-1]],s=!0)}if(void 0===this.popupObj&&s===!1){for(var p=this.body.edgeIndices,f=this.body.edges,m=void 0,v=[],g=0;g0&&(this.popupObj=f[v[v.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new d["default"](this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e),i===!0)){var o=this.selectionHandler.getNodeAt(t);i=o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e["default"]=c},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){this.body.view.scale*=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale})}},{key:"_zoomOut",value:function(){this.body.view.scale/=1+this.options.keyboard.speed.zoom,this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=a({container:window,preventDefault:!0}):this.keycharm=a({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e["default"]=h},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;io&&(s=o-e-this.padding),sn&&(r=n-i-this.padding),r0?e===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,o=0;o0?e===!0?this.body.edges[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_addToSelection",value:function(t){t instanceof a["default"]?this.selectionObj.nodes[t.id]=t:this.selectionObj.edges[t.id]=t}},{key:"_addToHover",value:function(t){t instanceof a["default"]?this.hoverObj.nodes[t.id]=t:this.hoverObj.edges[t.id]=t}},{key:"_removeFromSelection",value:function(t){t instanceof a["default"]?(delete this.selectionObj.nodes[t.id],this._unselectConnectedEdges(t)):delete this.selectionObj.edges[t.id]}},{key:"unselectAll",value:function(){for(var t in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].unselect();for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&this.selectionObj.edges[e].unselect();this.selectionObj={nodes:{},edges:{}}}},{key:"_getSelectedNodeCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedNode",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return this.selectionObj.nodes[t]}},{key:"_getSelectedEdge",value:function(){for(var t in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(t))return this.selectionObj.edges[t]}},{key:"_getSelectedEdgeCount",value:function(){var t=0;for(var e in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(e)&&(t+=1);return t}},{key:"_getSelectedObjectCount",value:function(){var t=0;for(var e in this.selectionObj.nodes)this.selectionObj.nodes.hasOwnProperty(e)&&(t+=1);for(var i in this.selectionObj.edges)this.selectionObj.edges.hasOwnProperty(i)&&(t+=1);return t}},{key:"_selectionIsEmpty",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t))return!1;for(var e in this.selectionObj.edges)if(this.selectionObj.edges.hasOwnProperty(e))return!1;return!0}},{key:"_clusterInSelection",value:function(){for(var t in this.selectionObj.nodes)if(this.selectionObj.nodes.hasOwnProperty(t)&&this.selectionObj.nodes[t].clusterSize>1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(i===!0)return this.body.emitter.emit("refresh"),l.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(this.options.hierarchical.enabled===!0){void 0===t.physics||t.physics===!0?(t.physics={enabled:void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,solver:"hierarchicalRepulsion"},this.optionsBackup.physics.enabled=void 0===this.optionsBackup.physics.enabled?!0:this.optionsBackup.physics.enabled,this.optionsBackup.physics.solver=this.optionsBackup.physics.solver||"barnesHut"):"object"===r(t.physics)?(this.optionsBackup.physics.enabled=void 0===t.physics.enabled?!0:t.physics.enabled,this.optionsBackup.physics.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):t.physics!==!1&&(this.optionsBackup.physics.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var e="horizontal";"RL"!==this.options.hierarchical.direction&&"LR"!==this.options.hierarchical.direction||(e="vertical"),void 0===t.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1}):void 0===t.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1):"boolean"==typeof t.edges.smooth?(this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:e}):(void 0!==t.edges.smooth.type&&"dynamic"!==t.edges.smooth.type&&(e=t.edges.smooth.type),this.optionsBackup.edges={smooth:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:void 0===t.edges.smooth.type?"dynamic":t.edges.smooth.type,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection},t.edges.smooth={enabled:void 0===t.edges.smooth.enabled?!0:t.edges.smooth.enabled,type:e,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0===t.edges.smooth.forceDirection?!1:t.edges.smooth.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",e)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var e=0;es){for(var r=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;var a=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();var h=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._shiftToCenter();for(var d=70,l=0;l0){var t=void 0,e=void 0,i=!1,o=!0,n=!1;this.hierarchicalLevels={},this.lastNodeOnLevel={},this.hierarchicalChildrenReference={},this.hierarchicalParentReference={},this.hierarchicalTrees={},this.treeIndex=-1,this.distributionOrdering={},this.distributionIndex={},this.distributionOrderingPresence={};for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0===t.options.x&&void 0===t.options.y&&(o=!1),void 0!==t.options.level?(i=!0,this.hierarchicalLevels[e]=t.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");n===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():"directed"===this.options.hierarchical.sortMethod?this._determineLevelsDirected():"custom"===this.options.hierarchical.sortMethod&&this._determineLevelsCustomCallback());for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&void 0===this.hierarchicalLevels[s]&&(this.hierarchicalLevels[s]=0);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},o=function(){for(var e=a(),i=0;i0)for(var n=0;n=l&&(r=Math.min(c,r),a=Math.max(c,a))}return[r,a,o,n]},l=function _(e){var i=t.hierarchicalLevels[e];if(t.hierarchicalChildrenReference[e]){var o=t.hierarchicalChildrenReference[e];if(o.length>0)for(var n=0;n1)for(var a=0;at.options.hierarchical.nodeSpacing){var u={};u[i.id]=!0;var p={};p[o.id]=!0,h(i,u),h(o,p);var f=c(i,o),m=d(u,f),v=s(m,4),g=(v[0],v[1]),y=(v[2],v[3],d(p,f)),b=s(y,4),w=b[0],_=(b[1],b[2]),x=(b[3],Math.abs(g-w));if(x>t.options.hierarchical.nodeSpacing){var k=g-w+t.options.hierarchical.nodeSpacing;k<-_+t.options.hierarchical.nodeSpacing&&(k=-_+t.options.hierarchical.nodeSpacing),0>k&&(t._shiftBlock(o.id,k),e=!0,n===!0&&t._centerParent(o))}}},m=function(o,n){for(var r=n.id,a=n.edges,l=t.hierarchicalLevels[n.id],c=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,u={},p=[],f=0;fr;r++){var a=g(o,i),h=y(o,i),d=40,l=Math.max(-d,Math.min(d,Math.round(a/h)));if(o-=l,void 0!==s[o])break;s[o]=r}return o},w=function(o){var r=t._getPositionForHierarchy(n);if(void 0===i[n.id]){var a={};a[n.id]=!0,h(n,a),i[n.id]=a}var l=d(i[n.id]),c=s(l,4),u=(c[0],c[1],c[2]),p=c[3],f=o-r,m=0;f>0?m=Math.min(f,p-t.options.hierarchical.nodeSpacing):0>f&&(m=-Math.min(-f,u-t.options.hierarchical.nodeSpacing)),0!=m&&(t._shiftBlock(n.id,m),e=!0)},_=function(i){var o=t._getPositionForHierarchy(n),r=t._getSpaceAroundNode(n),a=s(r,2),h=a[0],d=a[1],l=i-o,c=o;l>0?c=Math.min(o+(d-t.options.hierarchical.nodeSpacing),i):0>l&&(c=Math.max(o-(h-t.options.hierarchical.nodeSpacing),i)),c!==o&&(t._setPositionForHierarchy(n,c,void 0,!0),e=!0)},x=b(o,p);w(x),x=b(o,a),_(x)},v=function(i){var o=Object.keys(t.distributionOrdering);o=o.reverse();for(var n=0;i>n;n++){e=!1;for(var s=0;sn&&(e=!1,p(f,o,!0),e===!0);n++);},y=function(){for(var e in t.body.nodes)t.body.nodes.hasOwnProperty(e)&&t._centerParent(t.body.nodes[e])},b=function(){var e=Object.keys(t.distributionOrdering);e=e.reverse();for(var i=0;i0)for(var d=0;dg&&Math.abs(g)0&&Math.abs(g)0&&(r=this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing),this._setPositionForHierarchy(s,r,e),this._validataPositionAndContinue(s,e,r),o++}}}}},{key:"_placeBranchNodes",value:function(t,e){if(void 0!==this.hierarchicalChildrenReference[t]){for(var i=[],o=0;oe&&void 0===this.positionedNodes[s.id]))return;var a=void 0;a=0===n?this._getPositionForHierarchy(this.body.nodes[t]):this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing,this._setPositionForHierarchy(s,a,r),this._validataPositionAndContinue(s,r,a)}for(var h=1e9,d=-1e9,l=0;l0&&(e=this._getHubSize(),0!==e);)for(var o in this.body.nodes)if(this.body.nodes.hasOwnProperty(o)){var n=this.body.nodes[o];n.edges.length===e&&this._crawlNetwork(i,o)}}},{key:"_determineLevelsCustomCallback",value:function(){var t=this,e=1e5,i=function(t,e,i){},o=function(o,n,s){var r=t.hierarchicalLevels[o.id];void 0===r&&(t.hierarchicalLevels[o.id]=e);var a=i(d["default"].cloneOptions(o,"node"),d["default"].cloneOptions(n,"node"),d["default"].cloneOptions(s,"edge"));t.hierarchicalLevels[n.id]=t.hierarchicalLevels[o.id]+a};this._crawlNetwork(o),this._setMinLevelToZero()}},{key:"_determineLevelsDirected",value:function(){var t=this,e=1e4,i=function(i,o,n){var s=t.hierarchicalLevels[i.id];void 0===s&&(t.hierarchicalLevels[i.id]=e),n.toId==o.id?t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]+1:t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]-1};this._crawlNetwork(i),this._setMinLevelToZero()}},{key:"_setMinLevelToZero",value:function(){var t=1e9;for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&void 0!==this.hierarchicalLevels[e]&&(t=Math.min(this.hierarchicalLevels[e],t));for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&void 0!==this.hierarchicalLevels[i]&&(this.hierarchicalLevels[i]-=t)}},{key:"_generateMap",value:function(){var t=this,e=function(e,i){if(t.hierarchicalLevels[i.id]>t.hierarchicalLevels[e.id]){var o=e.id,n=i.id;void 0===t.hierarchicalChildrenReference[o]&&(t.hierarchicalChildrenReference[o]=[]),t.hierarchicalChildrenReference[o].push(n),void 0===t.hierarchicalParentReference[n]&&(t.hierarchicalParentReference[n]=[]),t.hierarchicalParentReference[n].push(o)}};this._crawlNetwork(e)}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?function(){}:arguments[0],i=arguments[1],o={},n=0,s=function d(i,n){if(void 0===o[i.id]){void 0===t.hierarchicalTrees[i.id]&&(t.hierarchicalTrees[i.id]=n,t.treeIndex=Math.max(n,t.treeIndex)),o[i.id]=!0;for(var s=void 0,r=0;r1&&("UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?t.sort(function(t,e){return t.x-e.x}):t.sort(function(t,e){return t.y-e.y}))}}]),t}();e["default"]=c},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0&&this.options.deleteNode!==!1?(n===!0&&this._createSeperator(4),this._createDeleteButton(o)):0===t&&this.options.deleteEdge!==!1&&(n===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(e.isCluster!==!0){var i=s.deepExtend({},e.options,!1); -if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var t=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId?!function(){var e=t.body.edges[t.edgeBeingEditedId],i=t._getNewTargetNode(e.from.x,e.from.y),o=t._getNewTargetNode(e.to.x,e.to.y);t.temporaryIds.nodes.push(i.id),t.temporaryIds.nodes.push(o.id),t.body.nodes[i.id]=i,t.body.nodeIndices.push(i.id),t.body.nodes[o.id]=o,t.body.nodeIndices.push(o.id),t._temporaryBindUI("onTouch",t._controlNodeTouch.bind(t)),t._temporaryBindUI("onTap",function(){}),t._temporaryBindUI("onHold",function(){}),t._temporaryBindUI("onDragStart",t._controlNodeDragStart.bind(t)),t._temporaryBindUI("onDrag",t._controlNodeDrag.bind(t)),t._temporaryBindUI("onDragEnd",t._controlNodeDragEnd.bind(t)),t._temporaryBindUI("onMouseMove",function(){}),t._temporaryBindEvent("beforeDrawing",function(t){var n=e.edgeType.findBorderPositions(t);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),t.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(e.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:e,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=s.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+s.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:t,right:t,top:e,bottom:e},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},s.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(s.recursiveDOMDelete(this.editModeDiv),s.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=s.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var o=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(-1===this.temporaryIds.nodes.indexOf(n[r])){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(t){var e=this,i={id:s.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,o={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,o={id:this.edgeBeingEditedId,from:t,to:e};if("function"==typeof this.options.editEdge){if(2!==this.options.editEdge.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editEdge(o,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e["default"]=h},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="object",a="dom",h="any",d={configure:{enabled:{"boolean":o},filter:{"boolean":o,string:i,array:s,"function":"function"},container:{dom:a},showButton:{"boolean":o},__type__:{object:r,"boolean":o,string:i,array:s,"function":"function"}},edges:{arrows:{to:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},middle:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},from:{enabled:{"boolean":o},scaleFactor:{number:n},__type__:{object:r,"boolean":o}},__type__:{string:["from","to","middle"],object:r}},arrowStrikethrough:{"boolean":o},color:{color:{string:i},highlight:{string:i},hover:{string:i},inherit:{string:["from","to","both"],"boolean":o},opacity:{number:n},__type__:{object:r,string:i}},dashes:{"boolean":o,array:s},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},align:{string:["horizontal","top","middle","bottom"]},__type__:{object:r,string:i}},hidden:{"boolean":o},hoverWidth:{"function":"function",number:n},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},length:{number:n,undefined:"undefined"},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},selectionWidth:{"function":"function",number:n},selfReferenceSize:{number:n},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},smooth:{enabled:{"boolean":o},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:n},forceDirection:{string:["horizontal","vertical","none"],"boolean":o},__type__:{object:r,"boolean":o}},title:{string:i,undefined:"undefined"},width:{number:n},value:{number:n,undefined:"undefined"},__type__:{object:r}},groups:{useDefaultGroups:{"boolean":o},__any__:"get from nodes, will be overwritten below",__type__:{object:r}},interaction:{dragNodes:{"boolean":o},dragView:{"boolean":o},hideEdgesOnDrag:{"boolean":o},hideNodesOnDrag:{"boolean":o},hover:{"boolean":o},keyboard:{enabled:{"boolean":o},speed:{x:{number:n},y:{number:n},zoom:{number:n},__type__:{object:r}},bindToWindow:{"boolean":o},__type__:{object:r,"boolean":o}},multiselect:{"boolean":o},navigationButtons:{"boolean":o},selectable:{"boolean":o},selectConnectedEdges:{"boolean":o},hoverConnectedEdges:{"boolean":o},tooltipDelay:{number:n},zoomView:{"boolean":o},__type__:{object:r}},layout:{randomSeed:{undefined:"undefined",number:n},improvedLayout:{"boolean":o},hierarchical:{enabled:{"boolean":o},levelSeparation:{number:n},nodeSpacing:{number:n},treeSpacing:{number:n},blockShifting:{"boolean":o},edgeMinimization:{"boolean":o},parentCentralization:{"boolean":o},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:r,"boolean":o}},__type__:{object:r}},manipulation:{enabled:{"boolean":o},initiallyActive:{"boolean":o},addNode:{"boolean":o,"function":"function"},addEdge:{"boolean":o,"function":"function"},editNode:{"function":"function"},editEdge:{"boolean":o,"function":"function"},deleteNode:{"boolean":o,"function":"function"},deleteEdge:{"boolean":o,"function":"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:r,"boolean":o}},nodes:{borderWidth:{number:n},borderWidthSelected:{number:n,undefined:"undefined"},brokenImage:{string:i,undefined:"undefined"},color:{border:{string:i},background:{string:i},highlight:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},hover:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},__type__:{object:r,string:i}},fixed:{x:{"boolean":o},y:{"boolean":o},__type__:{object:r,"boolean":o}},font:{align:{string:i},color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},__type__:{object:r,string:i}},group:{string:i,number:n,undefined:"undefined"},hidden:{"boolean":o},icon:{face:{string:i},code:{string:i},size:{number:n},color:{string:i},__type__:{object:r}},id:{string:i,number:n},image:{string:i,undefined:"undefined"},label:{string:i,undefined:"undefined"},labelHighlightBold:{"boolean":o},level:{number:n,undefined:"undefined"},mass:{number:n},physics:{"boolean":o},scaling:{min:{number:n},max:{number:n},label:{enabled:{"boolean":o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,"boolean":o}},customScalingFunction:{"function":"function"},__type__:{object:r}},shadow:{enabled:{"boolean":o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,"boolean":o}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon"]},shapeProperties:{borderDashes:{"boolean":o,array:s},borderRadius:{number:n},interpolation:{"boolean":o},useImageSize:{"boolean":o},useBorderWithImage:{"boolean":o},__type__:{object:r}},size:{number:n},title:{string:i,undefined:"undefined"},value:{number:n,undefined:"undefined"},x:{number:n},y:{number:n},__type__:{object:r}},physics:{enabled:{"boolean":o},barnesHut:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},forceAtlas2Based:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},repulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},hierarchicalRepulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},maxVelocity:{number:n},minVelocity:{number:n},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{"boolean":o},iterations:{number:n},updateInterval:{number:n},onlyDynamicEdges:{"boolean":o},fit:{"boolean":o},__type__:{object:r,"boolean":o}},timestep:{number:n},adaptiveTimestep:{"boolean":o},__type__:{object:r,"boolean":o}},autoResize:{"boolean":o},clickToUse:{"boolean":o},locale:{string:i},locales:{__any__:{any:h},__type__:{object:r}},height:{string:i},width:{string:i},__type__:{object:r}};d.groups.__any__=d.nodes,d.manipulation.controlNodeStyle=d.nodes;var l={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05]},middle:{enabled:!1,scaleFactor:[1,0,3,.05]},from:{enabled:!1,scaleFactor:[1,0,3,.05]}},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.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,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]},global:{locale:["en","nl"]}};e.allOptions=d,e.configureOptions=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{"default":t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(h){n=!0,s=h}finally{try{!o&&a["return"]&&a["return"]()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var i=0;in&&h>a;){a+=1;var v=this._getHighestEnergyNode(i),g=s(v,4);for(c=g[0],l=g[1],u=g[2],p=g[3],f=l,m=0;f>r&&d>m;){m+=1,this._moveNode(c,u,p);var y=this._getEnergy(c),b=s(y,3);f=b[0],u=b[1],p=b[2]}}}},{key:"_getHighestEnergyNode",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=0,n=e[0],r=0,a=0,h=0;ho&&(o=u,n=d,r=p,a=f)}}return[n,o,r,a]}},{key:"_getEnergy",value:function(t){for(var e=this.body.nodeIndices,i=this.body.nodes,o=i[t].x,n=i[t].y,s=0,r=0,a=0;al;l++)for(var c=0;d-1>c;c++)for(var u=c+1;d>u;u++)o[e[c]][e[u]]=Math.min(o[e[c]][e[u]],o[e[c]][e[l]]+o[e[l]][e[u]]),o[e[u]][e[c]]=o[e[c]][e[u]];return o}}]),t}();e["default"]=n},function(t,e){"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.circle=function(t,e,i){this.beginPath(),this.arc(t,e,i,0,2*Math.PI,!1),this.closePath()},CanvasRenderingContext2D.prototype.square=function(t,e,i){this.beginPath(),this.rect(t-i,e-i,2*i,2*i),this.closePath()},CanvasRenderingContext2D.prototype.triangle=function(t,e,i){this.beginPath(),i*=1.15,e+=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e-(r-s)),this.lineTo(t+n,e+s),this.lineTo(t-n,e+s),this.lineTo(t,e-(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.triangleDown=function(t,e,i){this.beginPath(),i*=1.15,e-=.275*i;var o=2*i,n=o/2,s=Math.sqrt(3)/6*o,r=Math.sqrt(o*o-n*n);this.moveTo(t,e+(r-s)), -this.lineTo(t+n,e-s),this.lineTo(t-n,e-s),this.lineTo(t,e+(r-s)),this.closePath()},CanvasRenderingContext2D.prototype.star=function(t,e,i){this.beginPath(),i*=.82,e+=.1*i;for(var o=0;10>o;o++){var n=o%2===0?1.3*i:.5*i;this.lineTo(t+n*Math.sin(2*o*Math.PI/10),e-n*Math.cos(2*o*Math.PI/10))}this.closePath()},CanvasRenderingContext2D.prototype.diamond=function(t,e,i){this.beginPath(),this.lineTo(t,e+i),this.lineTo(t+i,e),this.lineTo(t,e-i),this.lineTo(t-i,e),this.closePath()},CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,o,n){var s=Math.PI/180;0>i-2*n&&(n=i/2),0>o-2*n&&(n=o/2),this.beginPath(),this.moveTo(t+n,e),this.lineTo(t+i-n,e),this.arc(t+i-n,e+n,n,270*s,360*s,!1),this.lineTo(t+i,e+o-n),this.arc(t+i-n,e+o-n,n,0,90*s,!1),this.lineTo(t+n,e+o),this.arc(t+n,e+o-n,n,90*s,180*s,!1),this.lineTo(t,e+n),this.arc(t+n,e+n,n,180*s,270*s,!1),this.closePath()},CanvasRenderingContext2D.prototype.ellipse=function(t,e,i,o){var n=.5522848,s=i/2*n,r=o/2*n,a=t+i,h=e+o,d=t+i/2,l=e+o/2;this.beginPath(),this.moveTo(t,l),this.bezierCurveTo(t,l-r,d-s,e,d,e),this.bezierCurveTo(d+s,e,a,l-r,a,l),this.bezierCurveTo(a,l+r,d+s,h,d,h),this.bezierCurveTo(d-s,h,t,l+r,t,l),this.closePath()},CanvasRenderingContext2D.prototype.database=function(t,e,i,o){var n=1/3,s=i,r=o*n,a=.5522848,h=s/2*a,d=r/2*a,l=t+s,c=e+r,u=t+s/2,p=e+r/2,f=e+(o-r/2),m=e+o;this.beginPath(),this.moveTo(l,p),this.bezierCurveTo(l,p+d,u+h,c,u,c),this.bezierCurveTo(u-h,c,t,p+d,t,p),this.bezierCurveTo(t,p-d,u-h,e,u,e),this.bezierCurveTo(u+h,e,l,p-d,l,p),this.lineTo(l,f),this.bezierCurveTo(l,f+d,u+h,m,u,m),this.bezierCurveTo(u-h,m,t,f+d,t,f),this.lineTo(t,p)},CanvasRenderingContext2D.prototype.arrow=function(t,e,i,o){var n=t-o*Math.cos(i),s=e-o*Math.sin(i),r=t-.9*o*Math.cos(i),a=e-.9*o*Math.sin(i),h=n+o/3*Math.cos(i+.5*Math.PI),d=s+o/3*Math.sin(i+.5*Math.PI),l=n+o/3*Math.cos(i-.5*Math.PI),c=s+o/3*Math.sin(i-.5*Math.PI);this.beginPath(),this.moveTo(t,e),this.lineTo(h,d),this.lineTo(r,a),this.lineTo(l,c),this.closePath()},CanvasRenderingContext2D.prototype.dashedLine=function(t,e,i,o,n){this.beginPath(),this.moveTo(t,e);for(var s=n.length,r=i-t,a=o-e,h=a/r,d=Math.sqrt(r*r+a*a),l=0,c=!0,u=0,p=n[0];d>=.1;)p=n[l++%s],p>d&&(p=d),u=Math.sqrt(p*p/(1+h*h)),u=0>r?-u:u,t+=u,e+=h*u,c===!0?this.lineTo(t,e):this.moveTo(t,e),d-=p,c=!c})},function(t,e){function i(t){return P=t,p()}function o(){I=0,N=P.charAt(0)}function n(){I++,N=P.charAt(I)}function s(){return P.charAt(I+1)}function r(t){return L.test(t)}function a(t,e){if(t||(t={}),e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function h(t,e,i){for(var o=e.split("."),n=t;o.length;){var s=o.shift();o.length?(n[s]||(n[s]={}),n=n[s]):n[s]=i}}function d(t,e){for(var i,o,n=null,s=[t],r=t;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,o=r.nodes.length;o>i;i++)if(e.id===r.nodes[i].id){n=r.nodes[i];break}for(n||(n={id:e.id},t.node&&(n.attr=a(n.attr,t.node))),i=s.length-1;i>=0;i--){var h=s[i];h.nodes||(h.nodes=[]),-1===h.nodes.indexOf(n)&&h.nodes.push(n)}e.attr&&(n.attr=a(n.attr,e.attr))}function l(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=a({},t.edge);e.attr=a(i,e.attr)}}function c(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=a({},t.edge)),s.attr=a(s.attr||{},n),s}function u(){for(z=T.NULL,R="";" "===N||" "===N||"\n"===N||"\r"===N;)n();do{var t=!1;if("#"===N){for(var e=I-1;" "===P.charAt(e)||" "===P.charAt(e);)e--;if("\n"===P.charAt(e)||""===P.charAt(e)){for(;""!=N&&"\n"!=N;)n();t=!0}}if("/"===N&&"/"===s()){for(;""!=N&&"\n"!=N;)n();t=!0}if("/"===N&&"*"===s()){for(;""!=N;){if("*"===N&&"/"===s()){n(),n();break}n()}t=!0}for(;" "===N||" "===N||"\n"===N||"\r"===N;)n()}while(t);if(""===N)return void(z=T.DELIMITER);var i=N+s();if(E[i])return z=T.DELIMITER,R=i,n(),void n();if(E[N])return z=T.DELIMITER,R=N,void n();if(r(N)||"-"===N){for(R+=N,n();r(N);)R+=N,n();return"false"===R?R=!1:"true"===R?R=!0:isNaN(Number(R))||(R=Number(R)),void(z=T.IDENTIFIER)}if('"'===N){for(n();""!=N&&('"'!=N||'"'===N&&'"'===s());)R+=N,'"'===N&&n(),n();if('"'!=N)throw _('End of string " expected');return n(),void(z=T.IDENTIFIER)}for(z=T.UNKNOWN;""!=N;)R+=N,n();throw new SyntaxError('Syntax error in part "'+x(R,30)+'"')}function p(){var t={};if(o(),u(),"strict"===R&&(t.strict=!0,u()),"graph"!==R&&"digraph"!==R||(t.type=R,u()),z===T.IDENTIFIER&&(t.id=R,u()),"{"!=R)throw _("Angle bracket { expected");if(u(),f(t),"}"!=R)throw _("Angle bracket } expected");if(u(),""!==R)throw _("End of file expected");return u(),delete t.node,delete t.edge,delete t.graph,t}function f(t){for(;""!==R&&"}"!=R;)m(t),";"===R&&u()}function m(t){var e=v(t);if(e)return void b(t,e);var i=g(t);if(!i){if(z!=T.IDENTIFIER)throw _("Identifier expected");var o=R;if(u(),"="===R){if(u(),z!=T.IDENTIFIER)throw _("Identifier expected");t[o]=R,u()}else y(t,o)}}function v(t){var e=null;if("subgraph"===R&&(e={},e.type="subgraph",u(),z===T.IDENTIFIER&&(e.id=R,u())),"{"===R){if(u(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,f(e),"}"!=R)throw _("Angle bracket } expected");u(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function g(t){return"node"===R?(u(),t.node=w(),"node"):"edge"===R?(u(),t.edge=w(),"edge"):"graph"===R?(u(),t.graph=w(),"graph"):null}function y(t,e){var i={id:e},o=w();o&&(i.attr=o),d(t,i),b(t,e)}function b(t,e){for(;"->"===R||"--"===R;){var i,o=R;u();var n=v(t);if(n)i=n;else{if(z!=T.IDENTIFIER)throw _("Identifier or subgraph expected");i=R,d(t,{id:i}),u()}var s=w(),r=c(t,e,i,o,s);l(t,r),e=i}}function w(){for(var t=null;"["===R;){for(u(),t={};""!==R&&"]"!=R;){if(z!=T.IDENTIFIER)throw _("Attribute name expected");var e=R;if(u(),"="!=R)throw _("Equal sign = expected");if(u(),z!=T.IDENTIFIER)throw _("Attribute value expected");var i=R;h(t,e,i),u(),","==R&&u()}if("]"!=R)throw _("Bracket ] expected");u()}return t}function _(t){return new SyntaxError(t+', got "'+x(R,30)+'" (char '+I+")")}function x(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function k(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}function O(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r":!0,"--":!0},P="",I=0,N="",R="",z=T.NULL,L=/[a-zA-Z_0-9.:#]/;e.parseDOT=i,e.DOTToGraph=D},function(t,e){function i(t,e){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(n.nodes.fixed=e.fixed),void 0!==e.parseColor&&(n.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(n.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;a2&&void 0!==arguments[2]&&arguments[2];for(var s in t)void 0!==i[s]&&("object"!==o(i[s])?void 0!==i[s]&&null!==i[s]||void 0===t[s]||n!==!0?t[s]=i[s]:delete t[s]:"object"===o(t[s])&&e.fillIfDefined(t[s],i[s],n))},e.protoExtend=function(t,e){for(var i=1;i3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s=2;s3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(o))throw new TypeError("Arrays are not supported by deepExtend");for(var s in o)if(o.hasOwnProperty(s)&&t.indexOf(s)==-1)if(o[s]&&o[s].constructor===Object)void 0===i[s]&&(i[s]={}),i[s].constructor===Object?e.deepExtend(i[s],o[s]):null===o[s]&&void 0!==i[s]&&n===!0?delete i[s]:i[s]=o[s];else if(Array.isArray(o[s])){i[s]=[];for(var r=0;r=0&&(e="DOMMouseScroll"),t.addEventListener(e,i,o)):t.attachEvent("on"+e,i)},e.removeEventListener=function(t,e,i,o){t.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,i,o)):t.detachEvent("on"+e,i)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var i=t;i;){if(i===e)return!0;i=i.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,i){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":i||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,i,o){return e+e+i+i+o+o});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?{r:parseInt(i[1],16),g:parseInt(i[2],16),b:parseInt(i[3],16)}:null},e.overrideOpacity=function(t,i){if(t.indexOf("rgba")!=-1)return t;if(t.indexOf("rgb")!=-1){var o=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+o[0]+","+o[1]+","+o[2]+","+i+")"}var o=e.hexToRGB(t);return null==o?t:"rgba("+o.r+","+o.g+","+o.b+","+i+")"},e.RGBToHex=function(t,e,i){return"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1)},e.parseColor=function(t){var i;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var o=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(o[0],o[1],o[2])}if(e.isValidHex(t)===!0){var n=e.hexToHSV(t),s={h:n.h,s:.8*n.s,v:Math.min(1,1.02*n.v)},r={h:n.h,s:Math.min(1,1.25*n.s),v:.8*n.v},a=e.HSVToHex(r.h,r.s,r.v),h=e.HSVToHex(s.h,s.s,s.v);i={background:t,border:a,highlight:{background:h,border:a},hover:{background:h,border:a}}}else i={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else i={},i.background=t.background||void 0,i.border=t.border||void 0,e.isString(t.highlight)?i.highlight={border:t.highlight,background:t.highlight}:(i.highlight={},i.highlight.background=t.highlight&&t.highlight.background||void 0,i.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?i.hover={border:t.hover,background:t.hover}:(i.hover={},i.hover.background=t.hover&&t.hover.background||void 0,i.hover.border=t.hover&&t.hover.border||void 0);return i},e.RGBToHSV=function(t,e,i){t/=255,e/=255,i/=255;var o=Math.min(t,Math.min(e,i)),n=Math.max(t,Math.max(e,i));if(o==n)return{h:0,s:0,v:o};var s=t==o?e-i:i==o?t-e:i-t,r=t==o?3:i==o?1:5,a=60*(r-s/(n-o))/360,h=(n-o)/n,d=n;return{h:a,s:h,v:d}};var a={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var i=t.split(":"),o=i[0].trim(),n=i[1].trim();e[o]=n}}),e},join:function(t){return Object.keys(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,i){var o=a.split(t.style.cssText),n=a.split(i),s=e.extend(o,n);t.style.cssText=a.join(s)},e.removeCssText=function(t,e){var i=a.split(t.style.cssText),o=a.split(e);for(var n in o)o.hasOwnProperty(n)&&delete i[n];t.style.cssText=a.join(i)},e.HSVToRGB=function(t,e,i){var o,n,s,r=Math.floor(6*t),a=6*t-r,h=i*(1-e),d=i*(1-a*e),l=i*(1-(1-a)*e);switch(r%6){case 0:o=i,n=l,s=h;break;case 1:o=d,n=i,s=h;break;case 2:o=h,n=i,s=l;break;case 3:o=h,n=d,s=i;break;case 4:o=l,n=h,s=i;break;case 5:o=i,n=h,s=d}return{r:Math.floor(255*o),g:Math.floor(255*n),b:Math.floor(255*s)}},e.HSVToHex=function(t,i,o){var n=e.HSVToRGB(t,i,o);return e.RGBToHex(n.r,n.g,n.b)},e.hexToHSV=function(t){var i=e.hexToRGB(t);return e.RGBToHSV(i.r,i.g,i.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,i){if("object"==("undefined"==typeof i?"undefined":o(i))){for(var n=Object.create(i),s=0;s0&&e(o,t[n-1])<0;n--)t[n]=t[n-1];t[n]=o}return t},e.mergeOptions=function(t,e,i){var o=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]?arguments[4]:{});if(null===e[i])t[i]=Object.create(o[i]);else if(void 0!==e[i])if("boolean"==typeof e[i])t[i].enabled=e[i];else{void 0===e[i].enabled&&(t[i].enabled=!0);for(var n in e[i])e[i].hasOwnProperty(n)&&(t[i][n]=e[i][n])}},e.binarySearchCustom=function(t,e,i,o){for(var n=1e4,s=0,r=0,a=t.length-1;r<=a&&s0)return"before"==o?Math.max(0,h-1):h;if(n(r,e)<0&&n(a,e)>0)return"before"==o?h:Math.min(t.length-1,h+1);n(r,e)<0?c=h+1:u=h-1,l++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},e.getScrollBarWidth=function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var o=t.offsetWidth;return i==o&&(o=e.clientWidth),document.body.removeChild(e),i-o}},function(t,e,i){t.exports="undefined"!=typeof window&&window.moment||i(3)},function(t,e,i){(function(t){!function(e,i){t.exports=i()}(this,function(){function e(){return fo.apply(null,arguments)}function i(t){fo=t}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function n(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){var e;for(e in t)return!1;return!0}function r(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function a(t,e){var i,o=[];for(i=0;i0)for(i in vo)o=vo[i],n=e[o],m(n)||(t[o]=n);return t}function g(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),go===!1&&(go=!0,e.updateOffset(this),go=!1)}function y(t){return t instanceof g||null!=t&&null!=t._isAMomentObject}function b(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function _(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=b(e)),i}function w(t,e,i){var o,n=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(o=0;o0?"future":"past"];return D(i)?i(e):i.replace(/%s/i,e)}function L(t,e){var i=t.toLowerCase();Co[i]=Co[i+"s"]=Co[e]=t}function z(t){return"string"==typeof t?Co[t]||Co[t.toLowerCase()]:void 0}function A(t){var e,i,o={};for(i in t)h(t,i)&&(e=z(i),e&&(o[e]=t[i]));return o}function B(t,e){To[t]=e}function j(t){var e=[];for(var i in t)e.push({unit:i,priority:To[i]});return e.sort(function(t,e){return t.priority-e.priority}),e}function F(t,i){return function(o){return null!=o?(W(this,t,o),e.updateOffset(this,i),this):H(this,t)}}function H(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function W(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function Y(t){return t=z(t),D(this[t])?this[t]():this}function G(t,e){if("object"==typeof t){t=A(t);for(var i=j(t),o=0;o=0;return(s?i?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+o}function U(t,e,i,o){var n=o;"string"==typeof o&&(n=function(){return this[o]()}),t&&(Io[t]=n),e&&(Io[e[0]]=function(){return V(n.apply(this,arguments),e[1],e[2])}),i&&(Io[i]=function(){return this.localeData().ordinal(n.apply(this,arguments),t)})}function q(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function X(t){var e,i,o=t.match(Eo);for(e=0,i=o.length;e=0&&Mo.test(t);)t=t.replace(Mo,i),Mo.lastIndex=0,o-=1;return t}function J(t,e,i){Ko[t]=D(e)?e:function(t,o){return t&&i?i:e}}function Q(t,e){return h(Ko,t)?Ko[t](e._strict,e._locale):new RegExp($(t))}function $(t){return tt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,o,n){return e||i||o||n}))}function tt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function et(t,e){var i,o=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(o=function(t,i){i[e]=_(t)}),i=0;i=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function bt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function _t(t,e,i){var o=7+e-i,n=(7+bt(t,0,o).getUTCDay()-e)%7;return-n+o-1}function wt(t,e,i,o,n){var s,r,a=(7+i-o)%7,h=_t(t,o,n),d=1+7*(e-1)+a+h;return d<=0?(s=t-1,r=mt(s)+d):d>mt(t)?(s=t+1,r=d-mt(t)):(s=t,r=d),{year:s,dayOfYear:r}}function xt(t,e,i){var o,n,s=_t(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?(n=t.year()-1,o=r+kt(n,e,i)):r>kt(t.year(),e,i)?(o=r-kt(t.year(),e,i),n=t.year()+1):(n=t.year(),o=r),{week:o,year:n}}function kt(t,e,i){var o=_t(t,e,i),n=_t(t+1,e,i);return(mt(t)-o+n)/7}function Ot(t){return xt(t,this._week.dow,this._week.doy).week}function Dt(){return this._week.dow}function St(){return this._week.doy}function Ct(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Tt(t){var e=xt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Et(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Mt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Pt(t,e){return t?o(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:this._weekdays}function It(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Nt(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Rt(t,e,i){var o,n,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)s=l([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?(n=_o.call(this._weekdaysParse,r),n!==-1?n:null):"ddd"===e?(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:null):(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null):"dddd"===e?(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null))):"ddd"===e?(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:null))):(n=_o.call(this._minWeekdaysParse,r),n!==-1?n:(n=_o.call(this._weekdaysParse,r),n!==-1?n:(n=_o.call(this._shortWeekdaysParse,r),n!==-1?n:null)))}function Lt(t,e,i){var o,n,s;if(this._weekdaysParseExact)return Rt.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(n=l([2e3,1]).day(o),i&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(n,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(n,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(n,"").replace(".",".?")+"$","i")),this._weekdaysParse[o]||(s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[o]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(i&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(i&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!i&&this._weekdaysParse[o].test(t))return o}}function zt(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Et(t,this.localeData()),this.add(t-e,"d")):e}function At(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Bt(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Mt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function jt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=yn),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ft(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=bn),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ht(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=_n),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Wt(){function t(t,e){return e.length-t.length}var e,i,o,n,s,r=[],a=[],h=[],d=[];for(e=0;e<7;e++)i=l([2e3,1]).day(e),o=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(o),a.push(n),h.push(s),d.push(o),d.push(n),d.push(s);for(r.sort(t),a.sort(t),h.sort(t),d.sort(t),e=0;e<7;e++)a[e]=tt(a[e]),h[e]=tt(h[e]),d[e]=tt(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Yt(){return this.hours()%12||12}function Gt(){return this.hours()||24}function Vt(t,e){U(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ut(t,e){return e._meridiemParse}function qt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Xt(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Zt(t){return t?t.toLowerCase().replace("_","-"):t}function Kt(t){for(var e,i,o,n,s=0;s0;){if(o=Jt(n.slice(0,e).join("-")))return o;if(i&&i.length>=e&&w(n,i,!0)>=e-1)break;e--}s++}return null}function Jt(e){var i=null;if(!Dn[e]&&"undefined"!=typeof t&&t&&t.exports)try{i=wn._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),Qt(i)}catch(t){}return Dn[e]}function Qt(t,e){var i;return t&&(i=m(e)?ee(t):$t(t,e),i&&(wn=i)),wn._abbr}function $t(t,e){if(null!==e){var i=On;return e.abbr=t,null!=Dn[t]?(O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Dn[t]._config):null!=e.parentLocale&&(null!=Dn[e.parentLocale]?i=Dn[e.parentLocale]._config:O("parentLocaleUndefined","specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/")),Dn[t]=new T(C(i,e)),Qt(t),Dn[t]}return delete Dn[t],null}function te(t,e){if(null!=e){var i,o=On;null!=Dn[t]&&(o=Dn[t]._config),e=C(o,e),i=new T(e),i.parentLocale=Dn[t],Dn[t]=i,Qt(t)}else null!=Dn[t]&&(null!=Dn[t].parentLocale?Dn[t]=Dn[t].parentLocale:null!=Dn[t]&&delete Dn[t]);return Dn[t]}function ee(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return wn;if(!o(t)){if(e=Jt(t))return e;t=[t]}return Kt(t)}function ie(){return bo(Dn)}function oe(t){var e,i=t._a;return i&&u(t).overflow===-2&&(e=i[$o]<0||i[$o]>11?$o:i[tn]<1||i[tn]>nt(i[Qo],i[$o])?tn:i[en]<0||i[en]>24||24===i[en]&&(0!==i[on]||0!==i[nn]||0!==i[sn])?en:i[on]<0||i[on]>59?on:i[nn]<0||i[nn]>59?nn:i[sn]<0||i[sn]>999?sn:-1,u(t)._overflowDayOfYear&&(etn)&&(e=tn),u(t)._overflowWeeks&&e===-1&&(e=rn),u(t)._overflowWeekday&&e===-1&&(e=an),u(t).overflow=e),t}function ne(t){var e,i,o,n,s,r,a=t._i,h=Sn.exec(a)||Cn.exec(a);if(h){for(u(t).iso=!0,e=0,i=En.length;emt(n)&&(u(t)._overflowDayOfYear=!0),i=bt(n,0,t._dayOfYear),t._a[$o]=i.getUTCMonth(),t._a[tn]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[en]&&0===t._a[on]&&0===t._a[nn]&&0===t._a[sn]&&(t._nextDay=!0,t._a[en]=0),t._d=(t._useUTC?bt:yt).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[en]=24)}}function de(t){var e,i,o,n,s,r,a,h;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(s=1,r=4,i=re(e.GG,t._a[Qo],xt(ye(),1,4).year),o=re(e.W,1),n=re(e.E,1),(n<1||n>7)&&(h=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,i=re(e.gg,t._a[Qo],xt(ye(),s,r).year),o=re(e.w,1),null!=e.d?(n=e.d,(n<0||n>6)&&(h=!0)):null!=e.e?(n=e.e+s,(e.e<0||e.e>6)&&(h=!0)):n=s),o<1||o>kt(i,s,r)?u(t)._overflowWeeks=!0:null!=h?u(t)._overflowWeekday=!0:(a=wt(i,o,n,s,r),t._a[Qo]=a.year,t._dayOfYear=a.dayOfYear)}function le(t){if(t._f===e.ISO_8601)return void ne(t);t._a=[],u(t).empty=!0;var i,o,n,s,r,a=""+t._i,h=a.length,d=0;for(n=K(t._f,t._locale).match(Eo)||[],i=0;i0&&u(t).unusedInput.push(r),a=a.slice(a.indexOf(o)+o.length),d+=o.length),Io[s]?(o?u(t).empty=!1:u(t).unusedTokens.push(s),ot(s,o,t)):t._strict&&!o&&u(t).unusedTokens.push(s);u(t).charsLeftOver=h-d,a.length>0&&u(t).unusedInput.push(a),t._a[en]<=12&&u(t).bigHour===!0&&t._a[en]>0&&(u(t).bigHour=void 0),u(t).parsedDateParts=t._a.slice(0),u(t).meridiem=t._meridiem,t._a[en]=ce(t._locale,t._a[en],t._meridiem),he(t),oe(t)}function ce(t,e,i){var o;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(o=t.isPM(i),o&&e<12&&(e+=12),o||12!==e||(e=0),e):e}function ue(t){var e,i,o,n,s;if(0===t._f.length)return u(t).invalidFormat=!0,void(t._d=new Date(NaN));for(n=0;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ze(){if(!m(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),t=me(t),t._a){var e=t._isUTC?l(t._a):ye(t._a);this._isDSTShifted=this.isValid()&&w(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ae(){return!!this.isValid()&&!this._isUTC}function Be(){return!!this.isValid()&&this._isUTC}function je(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Fe(t,e){var i,o,n,s=t,r=null;return ke(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(r=zn.exec(t))?(i="-"===r[1]?-1:1,s={y:0,d:_(r[tn])*i,h:_(r[en])*i,m:_(r[on])*i,s:_(r[nn])*i,ms:_(Oe(1e3*r[sn]))*i}):(r=An.exec(t))?(i="-"===r[1]?-1:1,s={y:He(r[2],i),M:He(r[3],i),w:He(r[4],i),d:He(r[5],i),h:He(r[6],i),m:He(r[7],i),s:He(r[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(n=Ye(ye(s.from),ye(s.to)),s={},s.ms=n.milliseconds,s.M=n.months),o=new xe(s),ke(t)&&h(t,"_locale")&&(o._locale=t._locale),o}function He(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function We(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Ye(t,e){var i;return t.isValid()&&e.isValid()?(e=Ce(e,t),t.isBefore(e)?i=We(t,e):(i=We(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Ge(t,e){return function(i,o){var n,s;return null===o||isNaN(+o)||(O(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=i,i=o,o=s),i="string"==typeof i?+i:i,n=Fe(i,o),Ve(this,n,t),this}}function Ve(t,i,o,n){var s=i._milliseconds,r=Oe(i._days),a=Oe(i._months);t.isValid()&&(n=null==n||n,s&&t._d.setTime(t._d.valueOf()+s*o),r&&W(t,"Date",H(t,"Date")+r*o),a&&dt(t,H(t,"Month")+a*o),n&&e.updateOffset(t,r||a))}function Ue(t,e){var i=t.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function qe(t,i){var o=t||ye(),n=Ce(o,this).startOf("day"),s=e.calendarFormat(this,n)||"sameElse",r=i&&(D(i[s])?i[s].call(this,o):i[s]);return this.format(r||this.localeData().calendar(s,this,ye(o)))}function Xe(){return new g(this)}function Ze(t,e){var i=y(t)?t:ye(t);return!(!this.isValid()||!i.isValid())&&(e=z(m(e)?"millisecond":e),"millisecond"===e?this.valueOf()>i.valueOf():i.valueOf()s&&(e=s),Mi.call(this,t,e,i,o,n))}function Mi(t,e,i,o,n){var s=wt(t,e,i,o,n),r=bt(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Pi(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ii(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Ni(t,e){e[sn]=_(1e3*("0."+t))}function Ri(){return this._isUTC?"UTC":""}function Li(){return this._isUTC?"Coordinated Universal Time":""}function zi(t){return ye(1e3*t)}function Ai(){return ye.apply(null,arguments).parseZone()}function Bi(t){return t}function ji(t,e,i,o){var n=ee(),s=l().set(o,e);return n[i](s,t)}function Fi(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ji(t,e,i,"month");var o,n=[];for(o=0;o<12;o++)n[o]=ji(t,o,i,"month");return n}function Hi(t,e,i,o){"boolean"==typeof t?("number"==typeof e&&(i=e,e=void 0),e=e||""):(e=t,i=e,t=!1,"number"==typeof e&&(i=e,e=void 0),e=e||"");var n=ee(),s=t?n._week.dow:0;if(null!=i)return ji(e,(i+s)%7,o,"day");var r,a=[];for(r=0;r<7;r++)a[r]=ji(e,(r+s)%7,o,"day");return a}function Wi(t,e){return Fi(t,e,"months")}function Yi(t,e){return Fi(t,e,"monthsShort")}function Gi(t,e,i){return Hi(t,e,i,"weekdays")}function Vi(t,e,i){return Hi(t,e,i,"weekdaysShort")}function Ui(t,e,i){return Hi(t,e,i,"weekdaysMin")}function qi(){var t=this._data;return this._milliseconds=Zn(this._milliseconds),this._days=Zn(this._days),this._months=Zn(this._months),t.milliseconds=Zn(t.milliseconds),t.seconds=Zn(t.seconds),t.minutes=Zn(t.minutes),t.hours=Zn(t.hours),t.months=Zn(t.months),t.years=Zn(t.years),this}function Xi(t,e,i,o){var n=Fe(e,i);return t._milliseconds+=o*n._milliseconds,t._days+=o*n._days,t._months+=o*n._months,t._bubble()}function Zi(t,e){return Xi(this,t,e,1)}function Ki(t,e){return Xi(this,t,e,-1)}function Ji(t){return t<0?Math.floor(t):Math.ceil(t)}function Qi(){var t,e,i,o,n,s=this._milliseconds,r=this._days,a=this._months,h=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*Ji(to(a)+r),r=0,a=0),h.milliseconds=s%1e3,t=b(s/1e3),h.seconds=t%60,e=b(t/60),h.minutes=e%60,i=b(e/60),h.hours=i%24,r+=b(i/24),n=b($i(r)),a+=n,r-=Ji(to(n)),o=b(a/12),a%=12,h.days=r,h.months=a,h.years=o,this}function $i(t){return 4800*t/146097}function to(t){return 146097*t/4800}function eo(t){var e,i,o=this._milliseconds;if(t=z(t),"month"===t||"year"===t)return e=this._days+o/864e5,i=this._months+$i(e),"month"===t?i:i/12;switch(e=this._days+Math.round(to(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function io(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12)}function oo(t){return function(){return this.as(t)}}function no(t){return t=z(t),this[t+"s"]()}function so(t){return function(){return this._data[t]}}function ro(){return b(this.days()/7)}function ao(t,e,i,o,n){return n.relativeTime(e||1,!!i,t,o)}function ho(t,e,i){var o=Fe(t).abs(),n=cs(o.as("s")),s=cs(o.as("m")),r=cs(o.as("h")),a=cs(o.as("d")),h=cs(o.as("M")),d=cs(o.as("y")),l=n0,l[4]=i,ao.apply(null,l)}function lo(t){return void 0===t?cs:"function"==typeof t&&(cs=t,!0)}function co(t,e){return void 0!==us[t]&&(void 0===e?us[t]:(us[t]=e,!0))}function uo(t){var e=this.localeData(),i=ho(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function po(){var t,e,i,o=ps(this._milliseconds)/1e3,n=ps(this._days),s=ps(this._months);t=b(o/60),e=b(t/60),o%=60,t%=60,i=b(s/12),s%=12;var r=i,a=s,h=n,d=e,l=t,c=o,u=this.asSeconds();return u?(u<0?"-":"")+"P"+(r?r+"Y":"")+(a?a+"M":"")+(h?h+"D":"")+(d||l||c?"T":"")+(d?d+"H":"")+(l?l+"M":"")+(c?c+"S":""):"P0D"}var fo,mo;mo=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,o=0;o68?1900:2e3)};var pn=F("FullYear",!0);U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),B("week",5),B("isoWeek",5),J("w",Bo),J("ww",Bo,Ro),J("W",Bo),J("WW",Bo,Ro),it(["w","ww","W","WW"],function(t,e,i,o){e[o.substr(0,1)]=_(t)});var fn={dow:0,doy:6};U("d",0,"do","day"),U("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),U("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),U("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),B("day",11),B("weekday",11),B("isoWeekday",11),J("d",Bo),J("e",Bo),J("E",Bo),J("dd",function(t,e){return e.weekdaysMinRegex(t)}),J("ddd",function(t,e){return e.weekdaysShortRegex(t)}),J("dddd",function(t,e){return e.weekdaysRegex(t)}),it(["dd","ddd","dddd"],function(t,e,i,o){var n=i._locale.weekdaysParse(t,o,i._strict);null!=n?e.d=n:u(i).invalidWeekday=t}),it(["d","e","E"],function(t,e,i,o){e[o]=_(t)});var mn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),vn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),gn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),yn=Zo,bn=Zo,_n=Zo;U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Yt),U("k",["kk",2],0,Gt),U("hmm",0,0,function(){return""+Yt.apply(this)+V(this.minutes(),2)}),U("hmmss",0,0,function(){return""+Yt.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),U("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),U("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Vt("a",!0),Vt("A",!1),L("hour","h"),B("hour",13),J("a",Ut),J("A",Ut),J("H",Bo),J("h",Bo),J("HH",Bo,Ro),J("hh",Bo,Ro),J("hmm",jo),J("hmmss",Fo),J("Hmm",jo),J("Hmmss",Fo),et(["H","HH"],en),et(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),et(["h","hh"],function(t,e,i){e[en]=_(t),u(i).bigHour=!0}),et("hmm",function(t,e,i){var o=t.length-2;e[en]=_(t.substr(0,o)),e[on]=_(t.substr(o)),u(i).bigHour=!0}),et("hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[en]=_(t.substr(0,o)),e[on]=_(t.substr(o,2)),e[nn]=_(t.substr(n)),u(i).bigHour=!0}),et("Hmm",function(t,e,i){var o=t.length-2;e[en]=_(t.substr(0,o)),e[on]=_(t.substr(o))}),et("Hmmss",function(t,e,i){var o=t.length-4,n=t.length-2;e[en]=_(t.substr(0,o)),e[on]=_(t.substr(o,2)),e[nn]=_(t.substr(n))});var wn,xn=/[ap]\.?m?\.?/i,kn=F("Hours",!0),On={calendar:wo,longDateFormat:xo,invalidDate:ko,ordinal:Oo,ordinalParse:Do,relativeTime:So,months:dn,monthsShort:ln,week:fn,weekdays:mn,weekdaysMin:gn,weekdaysShort:vn,meridiemParse:xn},Dn={},Sn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Cn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Tn=/Z|[+-]\d\d(?::?\d\d)?/,En=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Mn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Pn=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=k("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),e.ISO_8601=function(){};var In=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=ye.apply(null,arguments);return this.isValid()&&t.isValid()?tthis?this:t:f()}),Rn=function(){return Date.now?Date.now():+new Date};De("Z",":"),De("ZZ",""),J("Z",qo),J("ZZ",qo),et(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=Se(qo,t)});var Ln=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var zn=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,An=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Fe.fn=xe.prototype;var Bn=Ge(1,"add"),jn=Ge(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Fn=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});U(0,["gg",2],0,function(){return this.weekYear()%100}),U(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Oi("gggg","weekYear"),Oi("ggggg","weekYear"),Oi("GGGG","isoWeekYear"),Oi("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),B("weekYear",1),B("isoWeekYear",1),J("G",Vo),J("g",Vo),J("GG",Bo,Ro),J("gg",Bo,Ro),J("GGGG",Wo,zo),J("gggg",Wo,zo),J("GGGGG",Yo,Ao),J("ggggg",Yo,Ao),it(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,o){e[o.substr(0,2)]=_(t)}),it(["gg","GG"],function(t,i,o,n){i[n]=e.parseTwoDigitYear(t)}),U("Q",0,"Qo","quarter"),L("quarter","Q"),B("quarter",7),J("Q",No),et("Q",function(t,e){e[$o]=3*(_(t)-1)}),U("D",["DD",2],"Do","date"),L("date","D"),B("date",9),J("D",Bo),J("DD",Bo,Ro),J("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),et(["D","DD"],tn),et("Do",function(t,e){e[tn]=_(t.match(Bo)[0],10)});var Hn=F("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),B("dayOfYear",4),J("DDD",Ho),J("DDDD",Lo),et(["DDD","DDDD"],function(t,e,i){i._dayOfYear=_(t)}),U("m",["mm",2],0,"minute"),L("minute","m"),B("minute",14),J("m",Bo),J("mm",Bo,Ro),et(["m","mm"],on);var Wn=F("Minutes",!1);U("s",["ss",2],0,"second"),L("second","s"),B("second",15),J("s",Bo),J("ss",Bo,Ro),et(["s","ss"],nn);var Yn=F("Seconds",!1);U("S",0,0,function(){return~~(this.millisecond()/100)}),U(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,function(){return 10*this.millisecond()}),U(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),U(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),U(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),U(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),U(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),B("millisecond",16),J("S",Ho,No),J("SS",Ho,Ro),J("SSS",Ho,Lo);var Gn;for(Gn="SSSS";Gn.length<=9;Gn+="S")J(Gn,Go);for(Gn="S";Gn.length<=9;Gn+="S")et(Gn,Ni);var Vn=F("Milliseconds",!1);U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var Un=g.prototype;Un.add=Bn,Un.calendar=qe,Un.clone=Xe,Un.diff=ei,Un.endOf=pi,Un.format=si,Un.from=ri,Un.fromNow=ai,Un.to=hi,Un.toNow=di,Un.get=Y,Un.invalidAt=xi,Un.isAfter=Ze,Un.isBefore=Ke,Un.isBetween=Je,Un.isSame=Qe,Un.isSameOrAfter=$e,Un.isSameOrBefore=ti,Un.isValid=_i,Un.lang=Fn,Un.locale=li,Un.localeData=ci,Un.max=Nn,Un.min=In,Un.parsingFlags=wi,Un.set=G,Un.startOf=ui,Un.subtract=jn,Un.toArray=gi,Un.toObject=yi,Un.toDate=vi,Un.toISOString=ni,Un.toJSON=bi,Un.toString=oi,Un.unix=mi,Un.valueOf=fi,Un.creationData=ki,Un.year=pn,Un.isLeapYear=gt,Un.weekYear=Di,Un.isoWeekYear=Si,Un.quarter=Un.quarters=Pi,Un.month=lt,Un.daysInMonth=ct,Un.week=Un.weeks=Ct,Un.isoWeek=Un.isoWeeks=Tt,Un.weeksInYear=Ti,Un.isoWeeksInYear=Ci,Un.date=Hn,Un.day=Un.days=zt,Un.weekday=At,Un.isoWeekday=Bt,Un.dayOfYear=Ii,Un.hour=Un.hours=kn,Un.minute=Un.minutes=Wn,Un.second=Un.seconds=Yn,Un.millisecond=Un.milliseconds=Vn,Un.utcOffset=Ee,Un.utc=Pe,Un.local=Ie,Un.parseZone=Ne,Un.hasAlignedHourOffset=Re,Un.isDST=Le,Un.isLocal=Ae,Un.isUtcOffset=Be,Un.isUtc=je,Un.isUTC=je,Un.zoneAbbr=Ri,Un.zoneName=Li,Un.dates=k("dates accessor is deprecated. Use date instead.",Hn),Un.months=k("months accessor is deprecated. Use month instead",lt),Un.years=k("years accessor is deprecated. Use year instead",pn),Un.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Me),Un.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ze);var qn=Un,Xn=T.prototype;Xn.calendar=E,Xn.longDateFormat=M,Xn.invalidDate=P,Xn.ordinal=I,Xn.preparse=Bi,Xn.postformat=Bi,Xn.relativeTime=N,Xn.pastFuture=R,Xn.set=S,Xn.months=st,Xn.monthsShort=rt,Xn.monthsParse=ht,Xn.monthsRegex=pt,Xn.monthsShortRegex=ut,Xn.week=Ot,Xn.firstDayOfYear=St,Xn.firstDayOfWeek=Dt,Xn.weekdays=Pt,Xn.weekdaysMin=Nt,Xn.weekdaysShort=It,Xn.weekdaysParse=Lt,Xn.weekdaysRegex=jt,Xn.weekdaysShortRegex=Ft,Xn.weekdaysMinRegex=Ht,Xn.isPM=qt,Xn.meridiem=Xt,Qt("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),e.lang=k("moment.lang is deprecated. Use moment.locale instead.",Qt),e.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ee);var Zn=Math.abs,Kn=oo("ms"),Jn=oo("s"),Qn=oo("m"),$n=oo("h"),ts=oo("d"),es=oo("w"),is=oo("M"),os=oo("y"),ns=so("milliseconds"),ss=so("seconds"),rs=so("minutes"),as=so("hours"),hs=so("days"),ds=so("months"),ls=so("years"),cs=Math.round,us={s:45,m:45,h:22,d:26,M:11},ps=Math.abs,fs=xe.prototype;fs.abs=qi,fs.add=Zi,fs.subtract=Ki,fs.as=eo,fs.asMilliseconds=Kn,fs.asSeconds=Jn,fs.asMinutes=Qn,fs.asHours=$n,fs.asDays=ts,fs.asWeeks=es,fs.asMonths=is,fs.asYears=os,fs.valueOf=io,fs._bubble=Qi,fs.get=no,fs.milliseconds=ns,fs.seconds=ss,fs.minutes=rs,fs.hours=as,fs.days=hs,fs.weeks=ro,fs.months=ds,fs.years=ls,fs.humanize=uo,fs.toISOString=po,fs.toString=po,fs.toJSON=po,fs.locale=li,fs.localeData=ci,fs.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",po),fs.lang=Fn,U("X",0,0,"unix"),U("x",0,0,"valueOf"),J("x",Vo),J("X",Xo),et("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),et("x",function(t,e,i){i._d=new Date(_(t))}),e.version="2.15.2",i(ye),e.fn=qn,e.min=_e,e.max=we,e.now=Rn,e.utc=l,e.unix=zi,e.months=Wi,e.isDate=r,e.locale=Qt,e.invalid=f,e.duration=Fe,e.isMoment=y,e.weekdays=Gi,e.parseZone=Ai,e.localeData=ee,e.isDuration=ke,e.monthsShort=Yi,e.weekdaysMin=Ui,e.defineLocale=$t,e.updateLocale=te,e.locales=ie,e.weekdaysShort=Vi,e.normalizeUnits=z,e.relativeTimeRounding=lo,e.relativeTimeThreshold=co,e.calendarFormat=Ue,e.prototype=qn;var ms=e;return ms})}).call(e,i(4)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function i(t){throw new Error("Cannot find module '"+t+"'.")}i.keys=function(){return[]},i.resolve=i,t.exports=i,i.id=5},function(t,e){(function(e){function i(t,e,i){var o=e&&i||0,n=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){n<16&&(e[o+n++]=c[t])});n<16;)e[o+n++]=0;return e}function o(t,e){var i=e||0,o=l;return o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+"-"+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]+o[t[i++]]}function n(t,e,i){var n=e&&i||0,s=e||[];t=t||{};var r=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),h=void 0!==t.nsecs?t.nsecs:g+1,d=a-v+(h-g)/1e4;if(d<0&&void 0===t.clockseq&&(r=r+1&16383),(d<0||a>v)&&void 0===t.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");v=a,g=h,m=r,a+=122192928e5;var l=(1e4*(268435455&a)+h)%4294967296;s[n++]=l>>>24&255,s[n++]=l>>>16&255,s[n++]=l>>>8&255,s[n++]=255&l;var c=a/4294967296*1e4&268435455;s[n++]=c>>>8&255,s[n++]=255&c,s[n++]=c>>>24&15|16,s[n++]=c>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var u=t.node||f,p=0;p<6;p++)s[n+p]=u[p];return e?e:o(s)}function s(t,e,i){var n=e&&i||0;"string"==typeof t&&(e="binary"==t?new Array(16):null, +t=null),t=t||{};var s=t.random||(t.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e)for(var a=0;a<16;a++)e[n+a]=s[a];return e||o(s)}var r,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);r=function(){return crypto.getRandomValues(h),h}}if(!r){var d=new Array(16);r=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),d[e]=t>>>((3&e)<<3)&255;return d}}for(var l=[],c={},u=0;u<256;u++)l[u]=(u+256).toString(16).substr(1),c[l[u]]=u;var p=r(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],m=16383&(p[6]<<8|p[7]),v=0,g=0,y=s;y.v1=n,y.v4=s,y.parse=i,y.unparse=o,t.exports=y}).call(e,function(){return this}())},function(t,e,i){e.util=i(1),e.DOMutil=i(8),e.DataSet=i(9),e.DataView=i(11),e.Queue=i(10),e.Graph3d=i(12),e.graph3d={Camera:i(16),Filter:i(17),Point2d:i(15),Point3d:i(14),Slider:i(18),StepNumber:i(19)},e.moment=i(2),e.Hammer=i(22),e.keycharm=i(25)},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var i=0;i0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElementNS("http://www.w3.org/2000/svg",t),i.appendChild(o)):(o=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},i.appendChild(o)),e[t].used.push(o),o},e.getDOMElement=function(t,e,i,o){var n;return e.hasOwnProperty(t)?e[t].redundant.length>0?(n=e[t].redundant[0],e[t].redundant.shift()):(n=document.createElement(t),void 0!==o?i.insertBefore(n,o):i.appendChild(n)):(n=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==o?i.insertBefore(n,o):i.appendChild(n)),e[t].used.push(n),n},e.drawPoint=function(t,i,o,n,s,r){var a;if("circle"==o.style?(a=e.getSVGElement("circle",n,s),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",i),a.setAttributeNS(null,"r",.5*o.size)):(a=e.getSVGElement("rect",n,s),a.setAttributeNS(null,"x",t-.5*o.size),a.setAttributeNS(null,"y",i-.5*o.size),a.setAttributeNS(null,"width",o.size),a.setAttributeNS(null,"height",o.size)),void 0!==o.styles&&a.setAttributeNS(null,"style",o.styles),a.setAttributeNS(null,"class",o.className+" vis-point"),r){var h=e.getSVGElement("text",n,s);r.xOffset&&(t+=r.xOffset),r.yOffset&&(i+=r.yOffset),r.content&&(h.textContent=r.content),r.className&&h.setAttributeNS(null,"class",r.className+" vis-label"),h.setAttributeNS(null,"x",t),h.setAttributeNS(null,"y",i)}return a},e.drawBar=function(t,i,o,n,s,r,a,h){if(0!=n){n<0&&(n*=-1,i-=n);var d=e.getSVGElement("rect",r,a);d.setAttributeNS(null,"x",t-.5*o),d.setAttributeNS(null,"y",i),d.setAttributeNS(null,"width",o),d.setAttributeNS(null,"height",n),d.setAttributeNS(null,"class",s),h&&d.setAttributeNS(null,"style",h)}}},function(t,e,i){function o(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var i=Object.keys(this._options.type),o=0,n=i.length;on?1:or)&&(s=h,r=d)}return s},o.prototype.min=function(t){var e,i,o=this._data,n=Object.keys(o),s=null,r=null;for(e=0,i=n.length;ethis.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},i.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=i},function(t,e,i){function o(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var i=this;this.listener=function(){i._onEvent.apply(i,arguments)},this.setData(t)}var n=i(1),s=i(9);o.prototype.setData=function(t){var e,i,o,n,s;if(this._data){for(this._data.off&&this._data.off("*",this.listener),e=this._data.getIds({filter:this._options&&this._options.filter}),s=[],o=0,n=e.length;o0&&(h[n-1].pointNext=r),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"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas);var t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(t),this.frame.filter=document.createElement("div"),this.frame.filter.style.position="absolute",this.frame.filter.style.bottom="0px",this.frame.filter.style.left="0px",this.frame.filter.style.width="100%",this.frame.appendChild(this.frame.filter);var e=this,i=function(t){e._onMouseDown(t)},o=function(t){e._onTouchStart(t)},n=function(t){e._onWheel(t)},s=function(t){e._onTooltip(t)};d.addEventListener(this.frame.canvas,"keydown",onkeydown),d.addEventListener(this.frame.canvas,"mousedown",i),d.addEventListener(this.frame.canvas,"touchstart",o),d.addEventListener(this.frame.canvas,"mousewheel",n),d.addEventListener(this.frame.canvas,"mousemove",s),this.containerElement.appendChild(this.frame)},o.prototype.setSize=function(t,e){this.frame.style.width=t,this.frame.style.height=e,this._resizeCanvas()},o.prototype._resizeCanvas=function(){this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=this.frame.canvas.clientWidth,this.frame.canvas.height=this.frame.canvas.clientHeight,this.frame.filter.style.width=this.frame.canvas.clientWidth-20+"px"},o.prototype.animationStart=function(){if(!this.frame.filter||!this.frame.filter.slider)throw new Error("No animation available");this.frame.filter.slider.play()},o.prototype.animationStop=function(){this.frame.filter&&this.frame.filter.slider&&this.frame.filter.slider.stop()},o.prototype._resizeCenter=function(){"%"===this.xCenter.charAt(this.xCenter.length-1)?this.currentXCenter=parseFloat(this.xCenter)/100*this.frame.canvas.clientWidth:this.currentXCenter=parseFloat(this.xCenter),"%"===this.yCenter.charAt(this.yCenter.length-1)?this.currentYCenter=parseFloat(this.yCenter)/100*(this.frame.canvas.clientHeight-this.frame.filter.clientHeight):this.currentYCenter=parseFloat(this.yCenter)},o.prototype.getCameraPosition=function(){var t=this.camera.getArmRotation();return t.distance=this.camera.getArmLength(),t},o.prototype._readData=function(t){this._dataInitialize(t,this.style),this.dataFilter?this.dataPoints=this.dataFilter._getDataPoints():this.dataPoints=this._getDataPoints(this.dataTable),this._redrawFilter()},o.prototype.setData=function(t){this._readData(t),this.redraw(),this.animationAutoStart&&this.dataFilter&&this.animationStart()},o.prototype.setOptions=function(t){this.animationStop(),v.setOptions(t,this),this.setPointDrawingMethod(),this.setSize(this.width,this.height),this.dataTable&&this.setData(this.dataTable),this.animationAutoStart&&this.dataFilter&&this.animationStart()},o.prototype.setPointDrawingMethod=function(){var t=void 0;switch(this.style){case o.STYLE.BAR:t=o.prototype._redrawBarGraphPoint;break;case o.STYLE.BARCOLOR:t=o.prototype._redrawBarColorGraphPoint;break;case o.STYLE.BARSIZE:t=o.prototype._redrawBarSizeGraphPoint;break;case o.STYLE.DOT:t=o.prototype._redrawDotGraphPoint;break;case o.STYLE.DOTLINE:t=o.prototype._redrawDotLineGraphPoint;break;case o.STYLE.DOTCOLOR:t=o.prototype._redrawDotColorGraphPoint;break;case o.STYLE.DOTSIZE:t=o.prototype._redrawDotSizeGraphPoint;break;case o.STYLE.SURFACE:t=o.prototype._redrawSurfaceGraphPoint;break;case o.STYLE.GRID:t=o.prototype._redrawGridGraphPoint;break;case o.STYLE.LINE:t=o.prototype._redrawLineGraphPoint;break;default:throw new Error("Can not determine point drawing method for graph style '"+this.style+"'")}this._pointDrawingMethod=t},o.prototype.redraw=function(){if(void 0===this.dataPoints)throw new Error("Graph data not initialized");this._resizeCanvas(),this._resizeCenter(),this._redrawSlider(),this._redrawClear(),this._redrawAxis(),this._redrawDataGraph(),this._redrawInfo(),this._redrawLegend()},o.prototype._getContext=function(){var t=this.frame.canvas,e=t.getContext("2d");return e.lineJoin="round",e.lineCap="round",e},o.prototype._redrawClear=function(){var t=this.frame.canvas,e=t.getContext("2d");e.clearRect(0,0,t.width,t.height)},o.prototype._dotSize=function(){return this.frame.clientWidth*this.dotSizeRatio},o.prototype._getLegendWidth=function(){var t;if(this.style===o.STYLE.DOTSIZE){var e=this._dotSize();t=e/2+2*e}else t=this.style===o.STYLE.BARSIZE?this.xBarWidth:20;return t},o.prototype._redrawLegend=function(){if(this.showLegend===!0&&this.style!==o.STYLE.LINE&&this.style!==o.STYLE.BARSIZE){var t=this.style===o.STYLE.BARSIZE||this.style===o.STYLE.DOTSIZE,e=this.style===o.STYLE.DOTSIZE||this.style===o.STYLE.DOTCOLOR||this.style===o.STYLE.BARCOLOR,i=Math.max(.25*this.frame.clientHeight,100),n=this.margin,s=this._getLegendWidth(),r=this.frame.clientWidth-this.margin,a=r-s,h=n+i,d=this._getContext();if(d.lineWidth=1,d.font="14px arial",t===!1){var l,u=0,p=i;for(l=u;l0?(t.textAlign="center",t.textBaseline="top",s.y+=n):Math.sin(2*o)<0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},o.prototype.drawAxisLabelY=function(t,e,i,o,n){void 0===n&&(n=0);var s=this._convert3Dto2D(e);Math.cos(2*o)<0?(t.textAlign="center",t.textBaseline="top",s.y+=n):Math.sin(2*o)>0?(t.textAlign="right",t.textBaseline="middle"):(t.textAlign="left",t.textBaseline="middle"),t.fillStyle=this.axisColor,t.fillText(i,s.x,s.y)},o.prototype.drawAxisLabelZ=function(t,e,i,o){void 0===o&&(o=0);var n=this._convert3Dto2D(e);t.textAlign="right",t.textBaseline="middle",t.fillStyle=this.axisColor,t.fillText(i,n.x-o,n.y)},o.prototype._line3d=function(t,e,i,o){var n=this._convert3Dto2D(e),s=this._convert3Dto2D(i);this._line(t,n,s,o)},o.prototype._redrawAxis=function(){var t,e,i,o,n,s,r,a,h,d,u,p=this._getContext();p.font=24/this.camera.getArmLength()+"px arial";var m=.025/this.scale.x,v=.025/this.scale.y,g=5/this.camera.getArmLength(),y=this.camera.getArmRotation().horizontal,b=new c(Math.cos(y),Math.sin(y)),_=this.xRange,w=this.yRange,x=this.zRange;for(p.lineWidth=1,o=void 0===this.defaultXStep,i=new f(_.min,_.max,this.xStep,o),i.start(!0);!i.end();){var k=i.getCurrent();this.showGrid?(t=new l(k,w.min,x.min),e=new l(k,w.max,x.min),this._line3d(p,t,e,this.gridColor)):(t=new l(k,w.min,x.min),e=new l(k,w.min+m,x.min),this._line3d(p,t,e,this.axisColor),t=new l(k,w.max,x.min),e=new l(k,w.max-m,x.min),this._line3d(p,t,e,this.axisColor)),r=b.x>0?w.min:w.max;var O=new l(k,r,x.min),D=" "+this.xValueLabel(k)+" ";this.drawAxisLabelX(p,O,D,y,g),i.next()}for(p.lineWidth=1,o=void 0===this.defaultYStep,i=new f(w.min,w.max,this.yStep,o),i.start(!0);!i.end();){var S=i.getCurrent();this.showGrid?(t=new l(_.min,S,x.min),e=new l(_.max,S,x.min),this._line3d(p,t,e,this.gridColor)):(t=new l(_.min,S,x.min),e=new l(_.min+v,S,x.min),this._line3d(p,t,e,this.axisColor),t=new l(_.max,S,x.min),e=new l(_.max-v,S,x.min),this._line3d(p,t,e,this.axisColor)),s=b.y>0?_.min:_.max,O=new l(s,S,x.min);var D=" "+this.yValueLabel(S)+" ";this.drawAxisLabelY(p,O,D,y,g),i.next()}for(p.lineWidth=1,o=void 0===this.defaultZStep,i=new f(x.min,x.max,this.zStep,o), +i.start(!0),s=b.x>0?_.min:_.max,r=b.y<0?w.min:w.max;!i.end();){var C=i.getCurrent(),T=new l(s,r,C),E=this._convert3Dto2D(T);e=new c(E.x-g,E.y),this._line(p,E,e,this.axisColor);var D=this.zValueLabel(C)+" ";this.drawAxisLabelZ(p,T,D,5),i.next()}p.lineWidth=1,t=new l(s,r,x.min),e=new l(s,r,x.max),this._line3d(p,t,e,this.axisColor);var M,P;p.lineWidth=1,M=new l(_.min,w.min,x.min),P=new l(_.max,w.min,x.min),this._line3d(p,M,P,this.axisColor),M=new l(_.min,w.max,x.min),P=new l(_.max,w.max,x.min),this._line3d(p,M,P,this.axisColor),p.lineWidth=1,t=new l(_.min,w.min,x.min),e=new l(_.min,w.max,x.min),this._line3d(p,t,e,this.axisColor),t=new l(_.max,w.min,x.min),e=new l(_.max,w.max,x.min),this._line3d(p,t,e,this.axisColor);var I=this.xLabel;I.length>0&&(u=.1/this.scale.y,s=_.center()/2,r=b.x>0?w.min-u:w.max+u,n=new l(s,r,x.min),this.drawAxisLabelX(p,n,I,y));var N=this.yLabel;N.length>0&&(d=.1/this.scale.x,s=b.y>0?_.min-d:_.max+d,r=w.center()/2,n=new l(s,r,x.min),this.drawAxisLabelY(p,n,N,y));var R=this.zLabel;R.length>0&&(h=30,s=b.x>0?_.min:_.max,r=b.y<0?w.min:w.max,a=x.center()/2,n=new l(s,r,a),this.drawAxisLabelZ(p,n,R,h))},o.prototype._hsv2rgb=function(t,e,i){var o,n,s,r,a,h;switch(r=i*e,a=Math.floor(t/60),h=r*(1-Math.abs(t/60%2-1)),a){case 0:o=r,n=h,s=0;break;case 1:o=h,n=r,s=0;break;case 2:o=0,n=r,s=h;break;case 3:o=0,n=h,s=r;break;case 4:o=h,n=0,s=r;break;case 5:o=r,n=0,s=h;break;default:o=0,n=0,s=0}return"RGB("+parseInt(255*o)+","+parseInt(255*n)+","+parseInt(255*s)+")"},o.prototype._getStrokeWidth=function(t){return void 0!==t?this.showPerspective?1/-t.trans.z*this.dataColor.strokeWidth:-(this.eye.z/this.camera.getArmLength())*this.dataColor.strokeWidth:this.dataColor.strokeWidth},o.prototype._redrawBar=function(t,e,i,o,n,s){var r,a,h=this,d=e.point,c=this.zRange.min,u=[{point:new l(d.x-i,d.y-o,d.z)},{point:new l(d.x+i,d.y-o,d.z)},{point:new l(d.x+i,d.y+o,d.z)},{point:new l(d.x-i,d.y+o,d.z)}],p=[{point:new l(d.x-i,d.y-o,c)},{point:new l(d.x+i,d.y-o,c)},{point:new l(d.x+i,d.y+o,c)},{point:new l(d.x-i,d.y+o,c)}];u.forEach(function(t){t.screen=h._convert3Dto2D(t.point)}),p.forEach(function(t){t.screen=h._convert3Dto2D(t.point)});var f=[{corners:u,center:l.avg(p[0].point,p[2].point)},{corners:[u[0],u[1],p[1],p[0]],center:l.avg(p[1].point,p[0].point)},{corners:[u[1],u[2],p[2],p[1]],center:l.avg(p[2].point,p[1].point)},{corners:[u[2],u[3],p[3],p[2]],center:l.avg(p[3].point,p[2].point)},{corners:[u[3],u[0],p[0],p[3]],center:l.avg(p[0].point,p[3].point)}];for(e.surfaces=f,r=0;r0}if(a){var p,f=(e.point.z+i.point.z+o.point.z+n.point.z)/4,m=240*(1-(f-this.zRange.min)*this.scale.z/this.verticalRatio),v=1;this.showShadow?(p=Math.min(1+c.x/u/2,1),s=this._hsv2rgb(m,v,p),r=s):(p=1,s=this._hsv2rgb(m,v,p),r=this.axisColor)}else s="gray",r=this.axisColor;t.lineWidth=this._getStrokeWidth(e);var g=[e,i,n,o];this._polygon(t,g,s,r)}},o.prototype._drawGridLine=function(t,e,i){if(void 0!==e&&void 0!==i){var o=(e.point.z+i.point.z)/2,n=240*(1-(o-this.zRange.min)*this.scale.z/this.verticalRatio);t.lineWidth=2*this._getStrokeWidth(e),t.strokeStyle=this._hsv2rgb(n,1,1),this._line(t,e.screen,i.screen)}},o.prototype._redrawGridGraphPoint=function(t,e){this._drawGridLine(t,e,e.pointRight),this._drawGridLine(t,e,e.pointTop)},o.prototype._redrawLineGraphPoint=function(t,e){void 0!==e.pointNext&&(t.lineWidth=this._getStrokeWidth(e),t.strokeStyle=this.dataColor.stroke,this._line(t,e.screen,e.pointNext.screen))},o.prototype._redrawDataGraph=function(){var t,e=this._getContext();if(!(void 0===this.dataPoints||this.dataPoints.length<=0))for(this._calcTranslations(this.dataPoints),t=0;t0?1:t<0?-1:0}var o=e[0],n=e[1],s=e[2],r=i((n.x-o.x)*(t.y-o.y)-(n.y-o.y)*(t.x-o.x)),a=i((s.x-n.x)*(t.y-n.y)-(s.y-n.y)*(t.x-n.x)),h=i((o.x-s.x)*(t.y-s.y)-(o.y-s.y)*(t.x-s.x));return!(0!=r&&0!=a&&r!=a||0!=a&&0!=h&&a!=h||0!=r&&0!=h&&r!=h)},o.prototype._dataPointFromXY=function(t,e){var i,n=100,s=null,r=null,a=null,h=new c(t,e);if(this.style===o.STYLE.BAR||this.style===o.STYLE.BARCOLOR||this.style===o.STYLE.BARSIZE)for(i=this.dataPoints.length-1;i>=0;i--){s=this.dataPoints[i];var d=s.surfaces;if(d)for(var l=d.length-1;l>=0;l--){var u=d[l],p=u.corners,f=[p[0].screen,p[1].screen,p[2].screen],m=[p[2].screen,p[3].screen,p[0].screen];if(this._insideTriangle(h,f)||this._insideTriangle(h,m))return s}}else for(i=0;i"+this.xLabel+":"+t.point.x+""+this.yLabel+":"+t.point.y+""+this.zLabel+":"+t.point.z+"",e.style.left="0",e.style.top="0",this.frame.appendChild(e),this.frame.appendChild(i),this.frame.appendChild(o);var n=e.offsetWidth,s=e.offsetHeight,r=i.offsetHeight,a=o.offsetWidth,h=o.offsetHeight,d=t.screen.x-n/2;d=Math.min(Math.max(d,10),this.frame.clientWidth-10-n),i.style.left=t.screen.x+"px",i.style.top=t.screen.y-r+"px",e.style.left=d+"px",e.style.top=t.screen.y-r-s+"px",o.style.left=t.screen.x-a/2+"px",o.style.top=t.screen.y-h/2+"px"},o.prototype._hideTooltip=function(){if(this.tooltip){this.tooltip.dataPoint=null;for(var t in this.tooltip.dom)if(this.tooltip.dom.hasOwnProperty(t)){var e=this.tooltip.dom[t];e&&e.parentNode&&e.parentNode.removeChild(e)}}},o.prototype.setCameraPosition=function(t){v.setCameraPosition(t,this),this.redraw()},t.exports=o},function(t,e){function i(t){if(t)return o(t)}function o(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},i.prototype.once=function(t,e){function i(){o.off(t,i),e.apply(this,arguments)}var o=this;return this._callbacks=this._callbacks||{},i.fn=e,this.on(t,i),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks[t];if(!i)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var o,n=0;n.5*Math.PI&&(this.armRotation.vertical=.5*Math.PI)),void 0===t&&void 0===e||this.calculateCameraOrientation()},o.prototype.getArmRotation=function(){var t={};return t.horizontal=this.armRotation.horizontal,t.vertical=this.armRotation.vertical,t},o.prototype.setArmLength=function(t){void 0!==t&&(this.armLength=t,this.armLength<.71&&(this.armLength=.71),this.armLength>5&&(this.armLength=5),this.calculateCameraOrientation())},o.prototype.getArmLength=function(){return this.armLength},o.prototype.getCameraLocation=function(){return this.cameraLocation},o.prototype.getCameraRotation=function(){return this.cameraRotation},o.prototype.calculateCameraOrientation=function(){this.cameraLocation.x=this.armLocation.x-this.armLength*Math.sin(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.y=this.armLocation.y-this.armLength*Math.cos(this.armRotation.horizontal)*Math.cos(this.armRotation.vertical),this.cameraLocation.z=this.armLocation.z+this.armLength*Math.sin(this.armRotation.vertical),this.cameraRotation.x=Math.PI/2-this.armRotation.vertical,this.cameraRotation.y=0,this.cameraRotation.z=-this.armRotation.horizontal},t.exports=o},function(t,e,i){function o(t,e,i){this.data=t,this.column=e,this.graph=i,this.index=void 0,this.value=void 0,this.values=i.getDistinctValues(t.get(),this.column),this.values.sort(function(t,e){return t>e?1:t0&&this.selectValue(0),this.dataPoints=[],this.loaded=!1,this.onLoadCallback=void 0,i.animationPreload?(this.loaded=!1,this.loadInBackground()):this.loaded=!0}var n=i(11);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(){if(void 0!==this.index)return this.values[this.index]},o.prototype.getValues=function(){return this.values},o.prototype.getValue=function(t){if(t>=this.values.length)throw new 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 new 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(t0&&(t--,this.setIndex(t))},o.prototype.next=function(){var t=this.getIndex();t0?this.setIndex(0):this.index=void 0},o.prototype.setIndex=function(t){if(!(tthis.values.length-1&&(o=this.values.length-1),o},o.prototype.indexToLeft=function(t){var e=parseFloat(this.frame.bar.style.width)-this.frame.slide.clientWidth-10,i=t/(this.values.length-1)*e,o=i+3;return o},o.prototype._onMouseMove=function(t){var e=t.clientX-this.startClientX,i=this.startSlideX+e,o=this.leftToIndex(i);this.setIndex(o),n.preventDefault()},o.prototype._onMouseUp=function(t){this.frame.style.cursor="auto",n.removeEventListener(document,"mousemove",this.onmousemove),n.removeEventListener(document,"mouseup",this.onmouseup),n.preventDefault()},t.exports=o},function(t,e){function i(t,e,i,o){this._start=0,this._end=0,this._step=1,this.prettyStep=!0,this.precision=5,this._current=0,this.setRange(t,e,i,o)}i.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},i.prototype.setRange=function(t,e,i,o){if(!this.isNumeric(t))throw new Error("Parameter 'start' is not numeric; value: "+t);if(!this.isNumeric(e))throw new Error("Parameter 'end' is not numeric; value: "+t);if(!this.isNumeric(i))throw new Error("Parameter 'step' is not numeric; value: "+t);this._start=t?t:0,this._end=e?e:0,this.setStep(i,o)},i.prototype.setStep=function(t,e){void 0===t||t<=0||(void 0!==e&&(this.prettyStep=e),this.prettyStep===!0?this._step=i.calculatePrettyStep(t):this._step=t)},i.calculatePrettyStep=function(t){var e=function(t){return Math.log(t)/Math.LN10},i=Math.pow(10,Math.round(e(t))),o=2*Math.pow(10,Math.round(e(t/2))),n=5*Math.pow(10,Math.round(e(t/5))),s=i;return Math.abs(o-t)<=Math.abs(s-t)&&(s=o),Math.abs(n-t)<=Math.abs(s-t)&&(s=n),s<=0&&(s=1),s},i.prototype.getCurrent=function(){return parseFloat(this._current.toPrecision(this.precision))},i.prototype.getStep=function(){return this._step},i.prototype.start=function(t){void 0===t&&(t=!1),this._current=this._start-this._start%this._step,t&&this.getCurrent()this._end},t.exports=i},function(t,e){function i(){this.min=void 0,this.max=void 0}i.prototype.adjust=function(t){void 0!==t&&((void 0===this.min||this.min>t)&&(this.min=t),(void 0===this.max||this.maxi)throw new Error("Passed expansion value makes range invalid");this.min=e,this.max=i}},i.prototype.range=function(){return this.max-this.min},i.prototype.center=function(){return(this.min+this.max)/2},t.exports=i},function(t,e,i){function o(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function n(t){return void 0===t||""===t?t:t.charAt(0).toUpperCase()+t.slice(1)}function s(t,e){return void 0===t||""===t?e:t+n(e)}function r(t,e,i,o){var n,r;for(var a in i)n=i[a],r=s(o,n),e[r]=t[n]}function a(t,e,i,o){var n,r;for(var a in i)n=i[a],void 0!==t[n]&&(r=s(o,n),e[r]=t[n])}function h(t,e){if(void 0===t||o(t))throw new Error("No DEFAULTS passed");if(void 0===e)throw new Error("No dst passed");D=t,r(t,e,k),r(t,e,O,"default"),l(t,e),e.margin=10,e.showGrayBottom=!1,e.showTooltip=!1,e.eye=new _(0,0,-1)}function d(t,e){if(void 0!==t){if(void 0===e)throw new Error("No dst passed");if(void 0===D||o(D))throw new Error("DEFAULTS not set for module Settings");a(t,e,k),a(t,e,O,"default"),l(t,e)}}function l(t,e){void 0!==t.backgroundColor&&m(t.backgroundColor,e),v(t.dataColor,e),f(t.style,e),c(t.showLegend,e),g(t.cameraPosition,e),void 0!==t.tooltip&&(e.showTooltip=t.tooltip)}function c(t,e){if(void 0===t){var i=void 0===D.showLegend;if(i){var o=e.style===w.DOTCOLOR||e.style===w.DOTSIZE;e.showLegend=o}}else e.showLegend=t}function u(t){var e=x[t];return void 0===e?-1:e}function p(t){var e=!1;for(var i in w)if(w[i]===t){e=!0;break}return e}function f(t,e){if(void 0!==t){var i;if("string"==typeof t){if(i=u(t),i===-1)throw new Error("Style '"+t+"' is invalid")}else{if(!p(t))throw new Error("Style '"+t+"' is invalid");i=t}e.style=i}}function m(t,e){var i="white",o="gray",n=1;if("string"==typeof t)i=t,o="none",n=0;else{if("object"!==("undefined"==typeof t?"undefined":y(t)))throw new Error("Unsupported type of backgroundColor");void 0!==t.fill&&(i=t.fill),void 0!==t.stroke&&(o=t.stroke),void 0!==t.strokeWidth&&(n=t.strokeWidth)}e.frame.style.backgroundColor=i,e.frame.style.borderColor=o,e.frame.style.borderWidth=n+"px",e.frame.style.borderStyle="solid"}function v(t,e){void 0!==t&&(void 0===e.dataColor&&(e.dataColor={}),"string"==typeof t?(e.dataColor.fill=t,e.dataColor.stroke=t):(t.fill&&(e.dataColor.fill=t.fill),t.stroke&&(e.dataColor.stroke=t.stroke),void 0!==t.strokeWidth&&(e.dataColor.strokeWidth=t.strokeWidth)))}function g(t,e){var i=t;void 0!==i&&(void 0===e.camera&&(e.camera=new b),e.camera.setArmRotation(i.horizontal,i.vertical),e.camera.setArmLength(i.distance))}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b=i(16),_=i(14),w={BAR:0,BARCOLOR:1,BARSIZE:2,DOT:3,DOTLINE:4,DOTCOLOR:5,DOTSIZE:6,GRID:7,LINE:8,SURFACE:9},x={dot:w.DOT,"dot-line":w.DOTLINE,"dot-color":w.DOTCOLOR,"dot-size":w.DOTSIZE,line:w.LINE,grid:w.GRID,surface:w.SURFACE,bar:w.BAR,"bar-color":w.BARCOLOR,"bar-size":w.BARSIZE},k=["width","height","filterLabel","legendLabel","xLabel","yLabel","zLabel","xValueLabel","yValueLabel","zValueLabel","showGrid","showPerspective","showShadow","keepAspectRatio","verticalRatio","dotSizeRatio","showAnimationControls","animationInterval","animationPreload","animationAutoStart","axisColor","gridColor","xCenter","yCenter"],O=["xBarWidth","yBarWidth","valueMin","valueMax","xMin","xMax","xStep","yMin","yMax","yStep","zMin","zMax","zStep"],D=void 0;t.exports.STYLE=w,t.exports.setDefaults=h,t.exports.setOptions=d,t.exports.setCameraPosition=g},function(t,e,i){if("undefined"!=typeof window){var o=i(23),n=window.Hammer||i(24);t.exports=o(n,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,i){var o,n,s;!function(i){n=[],o=i,s="function"==typeof o?o.apply(e,n):o,!(void 0!==s&&(t.exports=s))}(function(){var t=null;return function e(i,o){function n(t){return t.match(/[^ ]+/g)}function s(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var i=!1;e.stopPropagation=function(){i=!0};var o=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof o&&(e.srcEvent.stopPropagation=function(){o(),e.stopPropagation()}),e.firstTarget=t;for(var n=t;n&&!i;){var s=n.hammer;if(s)for(var r,a=0;a0?d._handlers[t]=o:(i.off(t,s),delete d._handlers[t]))}),d},d.emit=function(e,o){t=o.target,i.emit(e,o)},d.destroy=function(){var t=i.element.hammer,e=t.indexOf(d);e!==-1&&t.splice(e,1),t.length||delete i.element.hammer,d._handlers={},i.destroy()},d}})},function(t,e,i){var o;!function(n,s,r,a){function h(t,e,i){return setTimeout(p(t,i),e)}function d(t,e,i){return!!Array.isArray(t)&&(l(t,i[e],i),!0)}function l(t,e,i){var o;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==a)for(o=0;o\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=n.console&&(n.console.warn||n.console.log);return s&&s.call(n.console,o,i),t.apply(this,arguments)}}function u(t,e,i){var o,n=e.prototype;o=t.prototype=Object.create(n),o.constructor=t,o._super=n,i&&mt(o,i)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==yt?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function v(t,e,i){l(_(e),function(e){t.addEventListener(e,i,!1)})}function g(t,e,i){l(_(e),function(e){t.removeEventListener(e,i,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function _(t){return t.trim().split(/\s+/g)}function w(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var o=0;oi[e]}):o.sort()),o}function O(t,e){for(var i,o,n=e[0].toUpperCase()+e.slice(1),s=0;s1&&!i.firstMultiple?i.firstMultiple=N(e):1===n&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,h=e.center=R(o);e.timeStamp=wt(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=B(a,h),e.distance=A(a,h),P(i,e),e.offsetDirection=z(e.deltaX,e.deltaY);var d=L(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=d.x,e.overallVelocityY=d.y,e.overallVelocity=_t(d.x)>_t(d.y)?d.x:d.y,e.scale=r?F(r.pointers,o):1,e.rotation=r?j(r.pointers,o):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,I(i,e);var l=t.element;y(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function P(t,e){var i=e.center,o=t.offsetDelta||{},n=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Rt&&s.eventType!==zt||(n=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},o=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=n.x+(i.x-o.x),e.deltaY=n.y+(i.y-o.y)}function I(t,e){var i,o,n,s,r=t.lastInterval||e,h=e.timeStamp-r.timeStamp;if(e.eventType!=At&&(h>Nt||r.velocity===a)){var d=e.deltaX-r.deltaX,l=e.deltaY-r.deltaY,c=L(h,d,l);o=c.x,n=c.y,i=_t(c.x)>_t(c.y)?c.x:c.y,s=z(d,l),t.lastInterval=e}else i=r.velocity,o=r.velocityX,n=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=n,e.direction=s}function N(t){for(var e=[],i=0;i=_t(e)?t<0?jt:Ft:e<0?Ht:Wt}function A(t,e,i){i||(i=Ut);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return Math.sqrt(o*o+n*n)}function B(t,e,i){i||(i=Ut);var o=e[i[0]]-t[i[0]],n=e[i[1]]-t[i[1]];return 180*Math.atan2(n,o)/Math.PI}function j(t,e){return B(e[1],e[0],qt)+B(t[1],t[0],qt)}function F(t,e){return A(e[0],e[1],qt)/A(t[0],t[1],qt)}function H(){this.evEl=Zt,this.evWin=Kt,this.pressed=!1,C.apply(this,arguments)}function W(){this.evEl=$t,this.evWin=te,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function Y(){this.evTarget=ie,this.evWin=oe,this.started=!1,C.apply(this,arguments)}function G(t,e){var i=x(t.touches),o=x(t.changedTouches);return e&(zt|At)&&(i=k(i.concat(o),"identifier",!0)),[i,o]}function V(){this.evTarget=se,this.targetIds={},C.apply(this,arguments)}function U(t,e){var i=x(t.touches),o=this.targetIds;if(e&(Rt|Lt)&&1===i.length)return o[i[0].identifier]=!0,[i,i];var n,s,r=x(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return y(t.target,h)}),e===Rt)for(n=0;n-1&&o.splice(t,1)};setTimeout(n,re)}}function K(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,o=0;o-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,o=this.state;o<_e&&e(i.options.event+et(o)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),o>=_e&&e(i.options.event+et(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ke)},canEmit:function(){for(var t=0;te.threshold&&n&e.direction},attrTest:function(t){return nt.prototype.attrTest.call(this,t)&&(this.state&ye||!(this.state&ye)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=it(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),u(rt,nt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[pe]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ye)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),u(at,tt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distancee.time;if(this._input=t,!o||!i||t.eventType&(zt|At)&&!n)this.reset();else if(t.eventType&Rt)this.reset(),this._timer=h(function(){this.state=we,this.tryEmit()},e.time,this);else if(t.eventType&zt)return we;return ke},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===we&&(t&&t.eventType&zt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=wt(),this.manager.emit(this.options.event,this._input)))}}),u(ht,nt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[pe]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ye)}}),u(dt,nt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Yt|Gt,pointers:1},getTouchAction:function(){return st.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Yt|Gt)?e=t.overallVelocity:i&Yt?e=t.overallVelocityX:i&Gt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&_t(e)>this.options.velocity&&t.eventType&zt},emit:function(t){var e=it(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),u(lt,tt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,o=t.distances)&&(s=i)}),null!==n&&null!==s){var r=(n+s)/2,a=Math.max(this.range.end-this.range.start,1.1*(s-n)),h=!e||void 0===e.animation||e.animation;this.range.setRange(r-a/2,r+a/2,h)}}},n.prototype.fit=function(t){var e,i=!t||void 0===t.animation||t.animation,o=this.itemsData&&this.itemsData.getDataSet();1===o.length&&void 0===o.get()[0].end?(e=this.getDataRange(),this.moveTo(e.min.valueOf(),{animation:i})):(e=this.getItemRange(),this.range.setRange(e.min,e.max,i))},n.prototype.getItemRange=function(){var t=this,e=this.getDataRange(),i=null!==e.min?e.min.valueOf():null,o=null!==e.max?e.max.valueOf():null,n=null,s=null;if(null!=i&&null!=o){var r,a,h,d,c;!function(){var e=function(t){return l.convert(t.data.start,"Date").valueOf()},u=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return l.convert(e,"Date").valueOf()};r=o-i,r<=0&&(r=10),a=r/t.props.center.width,l.forEach(t.itemSet.items,function(t){t.show(),t.repositionX();var r=e(t),h=u(t);if(this.options.rtl)var d=r-(t.getWidthRight()+10)*a,l=h+(t.getWidthLeft()+10)*a;else var d=r-(t.getWidthLeft()+10)*a,l=h+(t.getWidthRight()+10)*a;do&&(o=l,s=t)}.bind(t)),n&&s&&(h=n.getWidthLeft()+10,d=s.getWidthRight()+10,c=t.props.center.width-h-d,c>0&&(t.options.rtl?(i=e(n)-d*r/c,o=u(s)+h*r/c):(i=e(n)-h*r/c,o=u(s)+d*r/c)))}()}return{min:null!=i?new Date(i):null,max:null!=o?new Date(o):null}},n.prototype.getDataRange=function(){var t=null,e=null,i=this.itemsData&&this.itemsData.getDataSet();return i&&i.forEach(function(i){var o=l.convert(i.start,"Date").valueOf(),n=l.convert(void 0!=i.end?i.end:i.start,"Date").valueOf();(null===t||oe)&&(e=n)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},n.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY;if(this.options.rtl)var o=l.getAbsoluteRight(this.dom.centerContainer)-e;else var o=e-l.getAbsoluteLeft(this.dom.centerContainer);var n=i-l.getAbsoluteTop(this.dom.centerContainer),s=this.itemSet.itemFromTarget(t),r=this.itemSet.groupFromTarget(t),a=g.customTimeFromTarget(t),h=this.itemSet.options.snap||null,d=this.body.util.getScale(),c=this.body.util.getStep(),u=this._toTime(o),p=h?h(u,d,c):u,f=l.getTarget(t),m=null;return null!=s?m="item":null!=a?m="custom-time":l.hasParent(f,this.timeAxis.dom.foreground)?m="axis":this.timeAxis2&&l.hasParent(f,this.timeAxis2.dom.foreground)?m="axis":l.hasParent(f,this.itemSet.dom.labelSet)?m="group-label":l.hasParent(f,this.currentTime.bar)?m="current-time":l.hasParent(f,this.dom.center)&&(m="background"),{event:t,item:s?s.id:null,group:r?r.groupId:null,what:m,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:n,time:u,snappedTime:p}},t.exports=n},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:1;n(this,t),this.parent=e,this.changedOptions=[],this.container=i,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},d.extend(this.options,this.defaultOptions),this.configureOptions=o,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new h.default(s),this.wrapper=void 0}return r(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;"string"==typeof t?this.options.filter=t:t instanceof Array?this.options.filter=t.join():"object"===("undefined"==typeof t?"undefined":s(t))?(void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)):"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0),this.options.filter===!1&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,this.options.enabled===!0&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){var t=this;this._clean(),this.changedOptions=[];var e=this.options.filter,i=0,o=!1;for(var n in this.configureOptions)this.configureOptions.hasOwnProperty(n)&&(this.allowCreation=!1,o=!1,"function"==typeof e?(o=e(n,[]),o=o||this._handleObject(this.configureOptions[n],[n],!0)):e!==!0&&e.indexOf(n)===-1||(o=!0),o!==!1&&(this.allowCreation=!0,i>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),i++);this.options.showButton===!0&&!function(){var e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerHTML="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},t.optionsContainer=document.createElement("div"),t.optionsContainer.className="vis-configuration vis-config-option-container",t.domElements.push(t.optionsContainer),t.domElements.push(e)}(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t1?o-1:0),r=1;r2&&void 0!==arguments[2]&&arguments[2],o=document.createElement("div");return o.className="vis-configuration vis-config-label vis-config-s"+e.length,i===!0?o.innerHTML=""+t+":":o.innerHTML=t+":",o}},{key:"_makeDropdown",value:function(t,e,i){var o=document.createElement("select");o.className="vis-configuration vis-config-select";var n=0;void 0!==e&&t.indexOf(e)!==-1&&(n=t.indexOf(e));for(var s=0;ss&&1!==s&&(a.max=Math.ceil(e*l),d=a.max,h="range increased"),a.value=e}else a.value=o;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=a.value;var u=this;a.onchange=function(){c.value=this.value,u._update(Number(this.value),i)},a.oninput=function(){c.value=this.value};var p=this._makeLabel(i[i.length-1],i),f=this._makeItem(i,p,a,c);""!==h&&this.popupHistory[f]!==d&&(this.popupHistory[f]=d,this._setupPopup(h,f))}},{key:"_setupPopup",value:function(t,e){var i=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,n=this.options.filter,s=!1;for(var r in t)if(t.hasOwnProperty(r)){o=!0;var a=t[r],h=d.copyAndExtendArray(e,r);if("function"==typeof n&&(o=n(r,e),o===!1&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,o=this._handleObject(a,h,!0),this.allowCreation=i===!1)),o!==!1){s=!0;var l=this._getValue(h);if(a instanceof Array)this._handleArray(a,l,h);else if("string"==typeof a)this._makeTextInput(a,l,h);else if("boolean"==typeof a)this._makeCheckbox(a,l,h);else if(a instanceof Object){var c=!0;if(e.indexOf("physics")!==-1&&this.moduleOptions.physics.solver!==r&&(c=!1),c===!0)if(void 0!==a.enabled){var u=d.copyAndExtendArray(h,"enabled"),p=this._getValue(u);if(p===!0){var f=this._makeLabel(r,h,!0);this._makeItem(h,f),s=this._handleObject(a,h)||s}else this._makeCheckbox(a,p,h)}else{var m=this._makeLabel(r,h,!0);this._makeItem(h,m),s=this._handleObject(a,h)||s}}else console.error("dont know how to handle",a,r,h)}}return s}},{key:"_handleArray",value:function(t,e,i){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,i),t[1]!==e&&this.changedOptions.push({path:i,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,i),t[0]!==e&&this.changedOptions.push({path:i,value:Number(e)}))}},{key:"_update",value:function(t,e){var i=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",i),this.initialized=!0,this.parent.setOptions(i)}},{key:"_constructOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i;t="true"===t||t,t="false"!==t&&t;for(var n=0;nvar options = "+JSON.stringify(t,null,2)+""}},{key:"getOptions",value:function(){for(var t={},e=0;e0&&void 0!==arguments[0]?arguments[0]:1;o(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return n(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){var e={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};if("string"==typeof t)return e[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var i=void 0,o=this._isColorString(t);if(void 0!==o&&(t=o),a.isString(t)===!0){if(a.isValidRGB(t)===!0){var n=t.substr(4).substr(0,t.length-5).split(",");i={r:n[0],g:n[1],b:n[2],a:1}}else if(a.isValidRGBA(t)===!0){var s=t.substr(5).substr(0,t.length-6).split(",");i={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(a.isValidHex(t)===!0){var r=a.hexToRGB(t);i={r:r.r,g:r.g,b:r.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var h=void 0!==t.a?t.a:"1.0";i={r:t.r,g:t.g,b:t.b,a:h}}if(void 0===i)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+JSON.stringify(t));this._setColor(i,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e===!0&&(this.previousColor=a.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e===!0&&(this.initialColor=a.extend({},t)),this.color=t;var i=a.RGBToHSV(t.r,t.g,t.b),o=2*Math.PI,n=this.r*i.s,s=this.centerCoordinates.x+n*Math.sin(o*i.h),r=this.centerCoordinates.y+n*Math.cos(o*i.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=r-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=a.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var i=a.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=a.RGBToHSV(t.r,t.g,t.b),i=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1)),i.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var o=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,o,n),i.putImageData(this.hueCircle,0,0),i.fillStyle="rgba(0,0,0,"+(1-e.v)+")",i.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),i.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new s(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),r.onTouch(this.hammer,function(e){t._moveSelector(e)}),this.hammer.on("tap",function(e){t._moveSelector(e)}),this.hammer.on("panstart",function(e){t._moveSelector(e)}),this.hammer.on("panmove",function(e){t._moveSelector(e)}),this.hammer.on("panend",function(e){t._moveSelector(e)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,e,i);var o=void 0,n=void 0,s=void 0,r=void 0;this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;var h=2*Math.PI/360,d=1/360,l=1/this.r,c=void 0;for(s=0;s<360;s++)for(r=0;rs.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(n.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""),d):n.distance<=r?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+n.closestMatch+'"?'+t.printLocation(n.path,e),d):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print(Object.keys(i))+t.printLocation(o,e),d),a=!0}},{key:"findInOptions",value:function(e,i,o){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,a="",h=[],d=e.toLowerCase(),l=void 0;for(var c in i){var u=void 0;if(void 0!==i[c].__type__&&n===!0){var p=t.findInOptions(e,i[c],r.copyAndExtendArray(o,c));s>p.distance&&(a=p.closestMatch,h=p.path,s=p.distance,l=p.indexMatch)}else c.toLowerCase().indexOf(d)!==-1&&(l=c),u=t.levenshteinDistance(e,c),s>u&&(a=c,h=r.copyArray(o),s=u)}return{closestMatch:a,path:h,distance:s,indexMatch:l}}},{key:"printLocation",value:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",o="\n\n"+i+"options = {\n",n=0;nu,p=r||null===n?n:l+(n-l)*s,g=r||null===a?a:c+(a-c)*s;y=h._applyRange(p,g),d.updateHiddenDates(h.options.moment,h.body,h.options.hiddenDates),v=v||y,y&&h.body.emitter.emit("rangechange",{start:new Date(h.start),end:new Date(h.end),byUser:o}),r?v&&h.body.emitter.emit("rangechanged",{start:new Date(h.start),end:new Date(h.end),byUser:o}):h.animationTimer=setTimeout(t,20)}};return g()}var y=this._applyRange(n,a);if(d.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),y){var b={start:new Date(this.start),end:new Date(this.end),byUser:o};this.body.emitter.emit("rangechange",b),this.body.emitter.emit("rangechanged",b)}},o.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},o.prototype._applyRange=function(t,e){var i,o=null!=t?r.convert(t,"Date").valueOf():this.start,n=null!=e?r.convert(e,"Date").valueOf():this.end,s=null!=this.options.max?r.convert(this.options.max,"Date").valueOf():null,a=null!=this.options.min?r.convert(this.options.min,"Date").valueOf():null;if(isNaN(o)||null===o)throw new Error('Invalid start "'+t+'"');if(isNaN(n)||null===n)throw new Error('Invalid end "'+e+'"');if(ns&&(n=s)),null!==s&&n>s&&(i=n-s,o-=i,n-=i,null!=a&&othis.start&&nd&&(this.end-this.start===d&&othis.end?(o=this.start,n=this.end):(i=n-o-d,o+=i/2,n-=i/2))}var l=this.start!=o||this.end!=n;return o>=this.start&&o<=this.end||n>=this.start&&n<=this.end||this.start>=o&&this.start<=n||this.end>=o&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=o,this.end=n,l},o.prototype.getRange=function(){return{start:this.start,end:this.end}},o.prototype.conversion=function(t,e){return o.conversion(this.start,this.end,t,e)},o.conversion=function(t,e,i,o){return void 0===o&&(o=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-o)}:{offset:0,scale:1}},o.prototype._onDragStart=function(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor="move"))},o.prototype._onDrag=function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;n(e);var i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;var o=this.props.touch.end-this.props.touch.start,s=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);o-=s;var r="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;if(this.options.rtl)var a=i/r*o;else var a=-i/r*o;var h=this.props.touch.start+a,l=this.props.touch.end+a,c=d.snapAwayFromHidden(this.body.hiddenDates,h,this.previousDelta-i,!0),u=d.snapAwayFromHidden(this.body.hiddenDates,l,this.previousDelta-i,!0);if(c!=h||u!=l)return this.deltaDifference+=i, +this.props.touch.start=c,this.props.touch.end=u,void this._onDrag(t);this.previousDelta=i,this._applyRange(h,l);var p=new Date(this.start),f=new Date(this.end);this.body.emitter.emit("rangechange",{start:p,end:f,byUser:!0}),this.body.emitter.emit("panmove")}},o.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0}))},o.prototype._onMouseWheel=function(t){t.preventDefault();var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable){if(this.options.horizontalScroll){var i=e*(this.end-this.start)/20,o=this.start-i,n=this.end-i;this.setRange(o,n)}}else if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var s;s=e<0?1-e/5:1/(1+e/5);var r=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center),a=this._pointerToDate(r);this.zoom(s,a,e)}},o.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},o.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center));var e=1/(t.scale+this.scaleOffset),i=this._pointerToDate(this.props.touch.center),o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,i),s=o-n,r=i-n+(this.props.touch.start-(i-n))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var h=d.snapAwayFromHidden(this.body.hiddenDates,r,1-e,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);h==r&&l==a||(this.props.touch.start=h,this.props.touch.end=l,this.scaleOffset=1-t.scale,r=h,a=l),this.setRange(r,a,!1,!0),this.startToFront=!1,this.endToFront=!0}},o.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX;if(this.options.rtl)var i=e-r.getAbsoluteLeft(this.body.dom.centerContainer);else var i=r.getAbsoluteRight(this.body.dom.centerContainer)-e;var o=this.body.util.toTime(i);return o>=this.start&&o<=this.end},o.prototype._pointerToDate=function(t){var e,i=this.options.direction;if(n(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();var o=this.body.domProps.center.height;return e=this.conversion(o),t.y/e.scale+e.offset},o.prototype.getPointer=function(t,e){return this.options.rtl?{x:r.getAbsoluteRight(e)-t.x,y:t.y-r.getAbsoluteTop(e)}:{x:t.x-r.getAbsoluteLeft(e),y:t.y-r.getAbsoluteTop(e)}},o.prototype.zoom=function(t,e,i){null==e&&(e=(this.start+this.end)/2);var o=d.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),n=d.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=o-n,r=e-n+(this.start-(e-n))*t,a=e+s+(this.end-(e+s))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);var h=d.snapAwayFromHidden(this.body.hiddenDates,r,i,!0),l=d.snapAwayFromHidden(this.body.hiddenDates,a,-i,!0);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){function o(t,e){this.options=null,this.props=null}var n=i(1);o.prototype.setOptions=function(t){t&&n.extend(this.options,t)},o.prototype.redraw=function(){return!1},o.prototype.destroy=function(){},o.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=o},function(t,e){e.convertHiddenOptions=function(t,i,o){if(o&&!Array.isArray(o))return e.convertHiddenOptions(t,i,[o]);if(i.hiddenDates=[],o&&1==Array.isArray(o)){for(var n=0;n=4*a){var u=0,p=s.clone();switch(o[h].repeat){case"daily":d.day()!=l.day()&&(u=1),d.dayOfYear(n.dayOfYear()),d.year(n.year()),d.subtract(7,"days"),l.dayOfYear(n.dayOfYear()),l.year(n.year()),l.subtract(7-u,"days"),p.add(1,"weeks");break;case"weekly":var f=l.diff(d,"days"),m=d.day();d.date(n.date()),d.month(n.month()),d.year(n.year()),l=d.clone(),d.day(m),l.day(m),l.add(f,"days"),d.subtract(1,"weeks"),l.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":d.month()!=l.month()&&(u=1),d.month(n.month()),d.year(n.year()),d.subtract(1,"months"),l.month(n.month()),l.year(n.year()),l.subtract(1,"months"),l.add(u,"months"),p.add(1,"months");break;case"yearly":d.year()!=l.year()&&(u=1),d.year(n.year()),d.subtract(1,"years"),l.year(n.year()),l.subtract(1,"years"),l.add(u,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",o[h].repeat)}for(;d=e[o].start&&e[n].end<=e[o].end?e[n].remove=!0:e[n].start>=e[o].start&&e[n].start<=e[o].end?(e[o].end=e[n].end,e[n].remove=!0):e[n].end>=e[o].start&&e[n].end<=e[o].end&&(e[o].start=e[n].start,e[n].remove=!0));for(var o=0;o=r&&nt.range.end){var h={start:t.range.start,end:i};i=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,h,i);var n=t.range.conversion(o,r);return(i.valueOf()-n.offset)*n.scale}i=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,t.range,i);var n=t.range.conversion(o,r);return(i.valueOf()-n.offset)*n.scale},e.toTime=function(t,i,o){if(0==t.body.hiddenDates.length){var n=t.range.conversion(o);return new Date(i/n.scale+n.offset)}var s=e.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end),r=t.range.end-t.range.start-s,a=r*i/o,h=e.getAccumulatedHiddenDuration(t.body.hiddenDates,t.range,a),d=new Date(h+a+t.range.start);return d},e.getHiddenDurationBetween=function(t,e,i){for(var o=0,n=0;n=e&&r=e&&r<=i&&(o+=r-s)}return o},e.correctTimeForHidden=function(t,i,o,n){return n=t(n).toDate().valueOf(),n-=e.getHiddenDurationBefore(t,i,o,n)},e.getHiddenDurationBefore=function(t,e,i,o){var n=0;o=t(o).toDate().valueOf();for(var s=0;s=i.start&&a=a&&(n+=a-r)}return n},e.getAccumulatedHiddenDuration=function(t,e,i){for(var o=0,n=0,s=e.start,r=0;r=e.start&&h=i)break;o+=h-a}}return o},e.snapAwayFromHidden=function(t,i,o,n){var s=e.isHidden(i,t);return 1==s.hidden?o<0?1==n?s.startDate-(s.endDate-i)-1:s.startDate-1:1==n?s.endDate+(i-s.startDate)+1:s.endDate+1:i},e.isHidden=function(t,e){for(var i=0;i=o&&t0&&i[0].setCustomTime(t)},o.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));return e[0].getCustomTime()},o.prototype.setCustomTimeTitle=function(t,e){var i=this.customTimes.filter(function(t){return t.options.id===e});if(0===i.length)throw new Error("No custom time bar found with id "+JSON.stringify(e));if(i.length>0)return i[0].setCustomTitle(t)},o.prototype.getEventProperties=function(t){return{event:t}},o.prototype.addCustomTime=function(t,e){var i=void 0!==t?h.convert(t,"Date").valueOf():new Date,o=this.customTimes.some(function(t){return t.options.id===e});if(o)throw new Error("A custom time with id "+JSON.stringify(e)+" already exists");var n=new u(this.body,h.extend({},this.options,{time:i,id:e}));return this.customTimes.push(n),this.components.push(n),this._redraw(),e},o.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+JSON.stringify(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},o.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},o.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var i=e.max-e.min,o=new Date(e.min.valueOf()-.01*i),n=new Date(e.max.valueOf()+.01*i),s=!t||void 0===t.animation||t.animation;this.range.setRange(o,n,s)}},o.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},o.prototype.setWindow=function(t,e,i){var o;if(1==arguments.length){var n=arguments[0];o=void 0===n.animation||n.animation,this.range.setRange(n.start,n.end,o)}else o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,o)},o.prototype.moveTo=function(t,e){var i=this.range.end-this.range.start,o=h.convert(t,"Date").valueOf(),n=o-i/2,s=o+i/2,r=!e||void 0===e.animation||e.animation;this.range.setRange(n,s,r)},o.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},o.prototype.zoomIn=function(t){if(!(!t||t<0||t>1)){var e=this.getWindow(),i=e.start.valueOf(),o=e.end.valueOf(),n=o-i,s=n/(1+t),r=(n-s)/2,a=i+r,h=o-r;this.setWindow({start:a,end:h})}},o.prototype.zoomOut=function(t){if(!(!t||t<0||t>1)){var e=this.getWindow(),i=e.start.valueOf(),o=e.end.valueOf(),n=o-i,s=i-n*t/2,r=o+n*t/2;this.setWindow({start:s,end:r})}},o.prototype.redraw=function(){this._redraw()},o.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,i=this.props,o=this.dom;if(o&&o.container&&0!=o.root.offsetWidth){c.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(h.addClassName(o.root,"vis-top"),h.removeClassName(o.root,"vis-bottom")):(h.removeClassName(o.root,"vis-top"),h.addClassName(o.root,"vis-bottom")),o.root.style.maxHeight=h.option.asSize(e.maxHeight,""),o.root.style.minHeight=h.option.asSize(e.minHeight,""),o.root.style.width=h.option.asSize(e.width,""),i.border.left=(o.centerContainer.offsetWidth-o.centerContainer.clientWidth)/2,i.border.right=i.border.left,i.border.top=(o.centerContainer.offsetHeight-o.centerContainer.clientHeight)/2,i.border.bottom=i.border.top;var n=o.root.offsetHeight-o.root.clientHeight,s=o.root.offsetWidth-o.root.clientWidth;0===o.centerContainer.clientHeight&&(i.border.left=i.border.top,i.border.right=i.border.left),0===o.root.clientHeight&&(s=n),i.center.height=o.center.offsetHeight,i.left.height=o.left.offsetHeight,i.right.height=o.right.offsetHeight,i.top.height=o.top.clientHeight||-i.border.top,i.bottom.height=o.bottom.clientHeight||-i.border.bottom;var a=Math.max(i.left.height,i.center.height,i.right.height),d=i.top.height+a+i.bottom.height+n+i.border.top+i.border.bottom;o.root.style.height=h.option.asSize(e.height,d+"px"),i.root.height=o.root.offsetHeight,i.background.height=i.root.height-n;var l=i.root.height-i.top.height-i.bottom.height-n;i.centerContainer.height=l,i.leftContainer.height=l,i.rightContainer.height=i.leftContainer.height,i.root.width=o.root.offsetWidth,i.background.width=i.root.width-s,this.initialDrawDone||(i.scrollbarWidth=h.getScrollBarWidth()),this.options.verticalScroll?this.options.rtl?(i.left.width=o.leftContainer.clientWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth+i.scrollbarWidth||-i.border.right):(i.left.width=o.leftContainer.clientWidth+i.scrollbarWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth||-i.border.right):(i.left.width=o.leftContainer.clientWidth||-i.border.left,i.right.width=o.rightContainer.clientWidth||-i.border.right),i.leftContainer.width=i.left.width,i.rightContainer.width=i.right.width;var u=i.root.width-i.left.width-i.right.width-s;i.center.width=u,i.centerContainer.width=u,i.top.width=u,i.bottom.width=u,o.background.style.height=i.background.height+"px",o.backgroundVertical.style.height=i.background.height+"px",o.backgroundHorizontal.style.height=i.centerContainer.height+"px",o.centerContainer.style.height=i.centerContainer.height+"px",o.leftContainer.style.height=i.leftContainer.height+"px",o.rightContainer.style.height=i.rightContainer.height+"px",o.background.style.width=i.background.width+"px",o.backgroundVertical.style.width=i.centerContainer.width+"px",o.backgroundHorizontal.style.width=i.background.width+"px",o.centerContainer.style.width=i.center.width+"px",o.top.style.width=i.top.width+"px",o.bottom.style.width=i.bottom.width+"px",o.background.style.left="0",o.background.style.top="0",o.backgroundVertical.style.left=i.left.width+i.border.left+"px",o.backgroundVertical.style.top="0",o.backgroundHorizontal.style.left="0",o.backgroundHorizontal.style.top=i.top.height+"px",o.centerContainer.style.left=i.left.width+"px",o.centerContainer.style.top=i.top.height+"px",o.leftContainer.style.left="0",o.leftContainer.style.top=i.top.height+"px",o.rightContainer.style.left=i.left.width+i.center.width+"px",o.rightContainer.style.top=i.top.height+"px",o.top.style.left=i.left.width+"px",o.top.style.top="0",o.bottom.style.left=i.left.width+"px",o.bottom.style.top=i.top.height+i.centerContainer.height+"px";var p=this._updateScrollTop();"top"!=e.orientation.item&&(p+=Math.max(this.props.centerContainer.height-this.props.center.height-this.props.border.top-this.props.border.bottom,0)),o.center.style.left="0",o.center.style.top=p+"px",o.left.style.left="0",o.right.style.left="0";var f=0==this.props.scrollTop?"hidden":"",m=this.props.scrollTop==this.props.scrollTopMin?"hidden":"";o.shadowTop.style.visibility=f,o.shadowBottom.style.visibility=m,o.shadowTopLeft.style.visibility=f,o.shadowBottomLeft.style.visibility=m,o.shadowTopRight.style.visibility=f,o.shadowBottomRight.style.visibility=m,this.options.verticalScroll?(o.shadowTopRight.style.visibility="hidden",o.shadowBottomRight.style.visibility="hidden",o.shadowTopLeft.style.visibility="hidden",o.shadowBottomLeft.style.visibility="hidden"):(o.left.style.top=p+"px",o.right.style.top=p+"px");var v=this.props.center.height>this.props.centerContainer.height;this.hammer.get("pan").set({direction:v?r.DIRECTION_ALL:r.DIRECTION_HORIZONTAL}),this.components.forEach(function(e){t=e.redraw()||t});var g=5;if(t){if(this.redrawCount0&&(this.props.scrollTop=0),this.props.scrollTope&&o.push(h.id):h.lefti&&o.push(h.id)}return o},o.prototype._deselect=function(t){for(var e=this.selection,i=0,o=e.length;io)return}}if(e&&e!=this.groupTouchParams.group){var h=this.groupsData,d=h.get(e.groupId),l=h.get(this.groupTouchParams.group.groupId);l&&d&&(this.options.groupOrderSwap(l,d,this.groupsData),this.groupsData.update(l),this.groupsData.update(d));var c=this.groupsData.getIds({order:this.options.groupOrder});if(!r.equalArray(c,this.groupTouchParams.originalOrder))for(var h=this.groupsData,u=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,f=Math.min(u.length,c.length),m=0,v=0,g=0;m=f)break;if(c[m+v]!=p)if(u[m+g]!=p){var y=c.indexOf(u[m+g]),b=h.get(c[m+v]),_=h.get(u[m+g]);this.options.groupOrderSwap(b,_,h),h.update(b),h.update(_);var w=c[m+v];c[m+v]=u[m+g],c[y]=w,m++}else g=1;else v=1}}}},o.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,i=e.groupTouchParams.group.groupId,o=e.groupsData.getDataSet(),n=r.extend({},o.get(i));e.options.onMoveGroup(n,function(t){if(t)t[o._fieldId]=i,o.update(t);else{var n=o.getIds({order:e.options.groupOrder});if(!r.equalArray(n,e.groupTouchParams.originalOrder))for(var s=e.groupTouchParams.originalOrder,a=Math.min(s.length,n.length),h=0;h=a)break;var d=n.indexOf(s[h]),l=o.get(n[h]),c=o.get(s[h]);e.options.groupOrderSwap(l,c,o),groupsData.update(l),groupsData.update(c);var u=n[h];n[h]=s[h],n[d]=u,h++}}}),e.body.emitter.emit("groupDragged",{groupId:i})}},o.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),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,event:t})}},o.prototype._onMouseOver=function(t){var e=this.itemFromTarget(t);e&&this.body.emitter.emit("itemover",{item:e.id,event:t})},o.prototype._onMouseOut=function(t){var e=this.itemFromTarget(t);e&&this.body.emitter.emit("itemout",{item:e.id,event:t})},o.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,i=this.options.snap||null,o=this.itemFromTarget(t);if(o){var n=e.itemsData.get(o.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}else{if(this.options.rtl)var s=r.getAbsoluteRight(this.dom.frame),a=s-t.center.x;else var s=r.getAbsoluteLeft(this.dom.frame),a=t.center.x-s;var h=this.body.util.toTime(a),d=this.body.util.getScale(),l=this.body.util.getStep(),c={start:i?i(h,d,l):h,content:"new item"};if("drop"==t.type){var n=JSON.parse(t.dataTransfer.getData("text/plain"));if(c.content=n.content,c.type=n.type||"box",c[this.itemsData._fieldId]=n.id||r.randomUUID(),"range"==n.type||n.end&&n.start)if(n.end)c.end=new Date(c.start._i).getTime()+new Date(n.end).getTime()-new Date(n.start).getTime();else{var u=this.body.util.toTime(a+this.props.width/5);c.end=i?i(u,d,l):u}}else if(c[this.itemsData._fieldId]=r.randomUUID(),"range"===this.options.type){var u=this.body.util.toTime(a+this.props.width/5);c.end=i?i(u,d,l):u}var p=this.groupFromTarget(t);p&&(c.group=p.groupId),c=this._cloneItemData(c),this.options.onAdd(c,function(i){i&&(e.itemsData.getDataSet().add(i),"drop"==t.type&&e.setSelection([i.id]))})}}},o.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var i=this.options.multiselect?this.getSelection():[],n=t.srcEvent&&t.srcEvent.shiftKey||!1;if(n&&this.options.multiselect){var s=this.itemsData.get(e.id).group,r=void 0;this.options.multiselectPerGroup&&i.length>0&&(r=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&void 0!=r&&r!=s||i.push(e.id);var a=o._getItemRange(this.itemsData.get(i,this.itemOptions));if(!this.options.multiselectPerGroup||r==s){i=[];for(var h in this.items)if(this.items.hasOwnProperty(h)){var d=this.items[h],l=d.data.start,c=void 0!==d.data.end?d.data.end:l;!(l>=a.min&&c<=a.max)||this.options.multiselectPerGroup&&r!=this.itemsData.get(d.id).group||d instanceof v||i.push(d.id)}}}else{var u=i.indexOf(e.id);u==-1?i.push(e.id):i.splice(u,1)}this.setSelection(i),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},o._getItemRange=function(t){var e=null,i=null;return t.forEach(function(t){(null==i||t.starte)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}},o.prototype.itemFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},o.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,i=0;ia&&ea)return n}else if(0===i&&e0?t.step:1,this.autoScale=!1)},o.prototype.setAutoScale=function(t){this.autoScale=t},o.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,i=2592e6,o=864e5,n=36e5,s=6e4,r=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*i>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),5*o>t&&(this.scale="day",this.step=5),2*o>t&&(this.scale="day",this.step=2),o>t&&(this.scale="day",this.step=1),o/2>t&&(this.scale="weekday",this.step=1),4*n>t&&(this.scale="hour",this.step=4),n>t&&(this.scale="hour",this.step=1),15*s>t&&(this.scale="minute",this.step=15),10*s>t&&(this.scale="minute",this.step=10),5*s>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15*r>t&&(this.scale="second",this.step=15),10*r>t&&(this.scale="second",this.step=10),5*r>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},o.snap=function(t,e,i){var o=n(t);if("year"==e){var s=o.year()+Math.round(o.month()/12);o.year(Math.round(s/i)*i),o.month(0),o.date(0),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("month"==e)o.date()>15?(o.date(1),o.add(1,"month")):o.date(1),o.hours(0),o.minutes(0),o.seconds(0),o.milliseconds(0);else if("day"==e){switch(i){case 5:case 2:o.hours(24*Math.round(o.hours()/24));break;default:o.hours(12*Math.round(o.hours()/12))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:o.hours(12*Math.round(o.hours()/12));break;default:o.hours(6*Math.round(o.hours()/6))}o.minutes(0),o.seconds(0),o.milliseconds(0)}else if("hour"==e){switch(i){case 4:o.minutes(60*Math.round(o.minutes()/60));break;default:o.minutes(30*Math.round(o.minutes()/30))}o.seconds(0),o.milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:o.minutes(5*Math.round(o.minutes()/5)),o.seconds(0);break;case 5:o.seconds(60*Math.round(o.seconds()/60));break;default:o.seconds(30*Math.round(o.seconds()/30))}o.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:o.seconds(5*Math.round(o.seconds()/5)),o.milliseconds(0);break;case 5:o.milliseconds(1e3*Math.round(o.milliseconds()/1e3));break;default:o.milliseconds(500*Math.round(o.milliseconds()/500))}else if("millisecond"==e){var r=i>5?i/2:1;o.milliseconds(Math.round(o.milliseconds()/r)*r)}return o},o.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},o.prototype.getLabelMinor=function(t){if(void 0==t&&(t=this.current),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getLabelMajor=function(t){if(void 0==t&&(t=this.current),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},o.prototype.getClassName=function(){function t(t){return t/h%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(s().add(1,"day"),"day")?" vis-tomorrow":t.isSame(s().add(-1,"day"),"day")?" vis-yesterday":""}function i(t){return t.isSame(new Date,"week")?" vis-current-week":""}function o(t){return t.isSame(new Date,"month")?" vis-current-month":""}function n(t){return t.isSame(new Date,"year")?" vis-current-year":""}var s=this.moment,r=this.moment(this.current),a=r.locale?r.locale("en"):r.lang("en"),h=this.step;switch(this.scale){case"millisecond":return e(a)+t(a.milliseconds()).trim();case"second":return e(a)+t(a.seconds()).trim();case"minute":return e(a)+t(a.minutes()).trim();case"hour":return"vis-h"+a.hours()+(4==this.step?"-h"+(a.hours()+4):"")+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+i(a)+t(a.date());case"day":return"vis-day"+a.date()+" vis-"+a.format("MMMM").toLowerCase()+e(a)+o(a)+this.step<=2?e(a):""+this.step<=2?" vis-"+a.format("dddd").toLowerCase():""+t(a.date()-1);case"month":return"vis-"+a.format("MMMM").toLowerCase()+o(a)+t(a.month());case"year":var d=a.year();return"vis-year"+d+n(a)+t(d);default:return""}},t.exports=o},function(t,e,i){function o(t,e,i){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var o=this;this.itemSet.body.emitter.on("checkRangedItems",function(){o.checkRangedItems=!0}),this._create(),this.setData(e)}var n=i(1),s=i(39);i(40);o.prototype._create=function(){var t=document.createElement("div"); +this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var i=document.createElement("div");i.className="vis-group",i["timeline-group"]=this,this.dom.foreground=i,this.dom.background=document.createElement("div"),this.dom.background.className="vis-group",this.dom.axis=document.createElement("div"),this.dom.axis.className="vis-group",this.dom.marker=document.createElement("div"),this.dom.marker.style.visibility="hidden",this.dom.marker.innerHTML="?",this.dom.background.appendChild(this.dom.marker)},o.prototype.setData=function(t){var e,i;if(this.itemSet.options&&this.itemSet.options.groupTemplate?(i=this.itemSet.options.groupTemplate.bind(this),e=i(t,this.dom.inner)):e=t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object?i(t,this.dom.inner):void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?n.removeClassName(this.dom.inner,"vis-hidden"):n.addClassName(this.dom.inner,"vis-hidden");var o=t&&t.className||null;o!=this.className&&(this.className&&(n.removeClassName(this.dom.label,this.className),n.removeClassName(this.dom.foreground,this.className),n.removeClassName(this.dom.background,this.className),n.removeClassName(this.dom.axis,this.className)),n.addClassName(this.dom.label,o),n.addClassName(this.dom.foreground,o),n.addClassName(this.dom.background,o),n.addClassName(this.dom.axis,o),this.className=o),this.style&&(n.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(n.addCssText(this.dom.label,t.style),this.style=t.style)},o.prototype.getLabelWidth=function(){return this.props.label.width},o.prototype.redraw=function(t,e,i){var o=!1,r=this.dom.marker.clientHeight;r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,n.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),i=!0),this._calculateSubGroupHeights(),this.isVisible=this._isGroupVisible(t,e);var a=this.dom.foreground;if(this.top=a.offsetTop,this.right=a.offsetLeft,this.width=a.offsetWidth,this.isVisible=this._isGroupVisible(t,e),"function"==typeof this.itemSet.options.order){if(i){var h=this,d=!1;n.forEach(this.items,function(t){t.displayed||(t.redraw(),h.visibleItems.push(t)),t.repositionX(d)});var l=this.orderedItems.byStart.slice().sort(function(t,e){return h.itemSet.options.order(t.data,e.data)});s.stack(l,e,!0)}this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateVisibleItems(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?s.stack(this.visibleItems,e,i):s.nostack(this.visibleItems,e,this.subgroups);if(!this.isVisible&&this.height)return o=!1;var c=this._calculateHeight(e),a=this.dom.foreground;this.top=a.offsetTop,this.right=a.offsetLeft,this.width=a.offsetWidth,o=n.updateProperty(this,"height",c)||o,o=n.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||o,o=n.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||o,this.dom.background.style.height=c+"px",this.dom.foreground.style.height=c+"px",this.dom.label.style.height=c+"px";for(var u=0,p=this.visibleItems.length;u0){var t=this;this.resetSubgroups(),n.forEach(this.visibleItems,function(e){void 0!==e.data.subgroup&&(t.subgroups[e.data.subgroup].height=Math.max(t.subgroups[e.data.subgroup].height,e.height),t.subgroups[e.data.subgroup].visible=!0)})}},o.prototype._isGroupVisible=function(t,e){var i=this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop;return i},o.prototype._calculateHeight=function(t){var e,i=this.visibleItems;if(i.length>0){var o=i[0].top,s=i[0].top+i[0].height;if(n.forEach(i,function(t){o=Math.min(o,t.top),s=Math.max(s,t.top+t.height)}),o>t.axis){var r=o-t.axis;s-=r,n.forEach(i,function(t){t.top-=r})}e=s+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},o.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},o.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);var o=this.dom.axis;o.parentNode&&o.parentNode.removeChild(o)},o.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(void 0===this.subgroups[t.data.subgroup]&&(this.subgroups[t.data.subgroup]={height:0,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),this.subgroups[t.data.subgroup].items.push(t)),this.orderSubgroups(),this.visibleItems.indexOf(t)==-1){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},o.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var i=0;i0)for(var r=0;rl}),1==this.checkRangedItems)for(this.checkRangedItems=!1,r=0;rl})}for(var r=0;r=0;s--){var r=e[s];if(n(r))break;void 0===o[r.id]&&(o[r.id]=!0,i.push(r))}for(var s=t+1;se.right&&t.top-o.vertical+ie.top:t.left-o.horizontal+ie.left&&t.top-o.vertical+ie.top}},function(t,e,i){function o(t,e,i){if(this.props={content:{width:0}},this.overflow=!1,this.options=i,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}n.call(this,t,e,i)}var n=(i(22),i(41));o.prototype=new n(null,null,null),o.prototype.baseClassName="vis-item vis-range",o.prototype.isVisible=function(t){return this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.box),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var i=(this.options.editable.updateTime||this.options.editable.updateGroup||this.editable===!0)&&this.editable!==!1,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(i?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+o,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintOnItemUpdateTimeTooltip(t.box),this._repaintDeleteButton(t.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()},o.prototype.show=function(){this.displayed||this.redraw()},o.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},o.prototype.repositionX=function(t){var e,i,o=this.parent.width,n=this.conversion.toScreen(this.data.start),s=this.conversion.toScreen(this.data.end);void 0!==t&&t!==!0||(n<-o&&(n=-o),s>2*o&&(s=2*o));var r=Math.max(s-n+.5,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=r+this.props.content.width,i=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=r,i=Math.min(s-n,this.props.content.width)),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=r+"px",this.options.align){case"left":this.options.rtl?this.dom.content.style.right="0":this.dom.content.style.left="0";break;case"right":this.options.rtl?this.dom.content.style.right=Math.max(r-i,0)+"px":this.dom.content.style.left=Math.max(r-i,0)+"px";break;case"center":this.options.rtl?this.dom.content.style.right=Math.max((r-i)/2,0)+"px":this.dom.content.style.left=Math.max((r-i)/2,0)+"px";break;default:e=this.overflow?s>0?Math.max(-n,0):-i:n<0?-n:0,this.options.rtl?this.dom.content.style.right=e+"px":(this.dom.content.style.left=e+"px",this.dom.content.style.width="calc(100% - "+e+"px)")}},o.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},o.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},o.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=o},function(t,e,i){function o(t,e,i){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=i||{},this.selected=!1,this.displayed=!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.editable=null,this.data&&this.data.hasOwnProperty("editable")&&"boolean"==typeof this.data.editable&&(this.editable=t.editable)}var n=i(22),s=i(1),r=i(2);o.prototype.stack=!0,o.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),t.hasOwnProperty("editable")&&"boolean"==typeof t.editable&&(this.editable=t.editable),this.data=t,this.dirty=!0,this.displayed&&this.redraw()},o.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},o.prototype.isVisible=function(t){return!1},o.prototype.show=function(){return!1},o.prototype.hide=function(){return!1},o.prototype.redraw=function(){},o.prototype.repositionX=function(){},o.prototype.repositionY=function(){},o.prototype._repaintDeleteButton=function(t){var e=(this.options.editable.remove||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.deleteButton){var i=this,o=document.createElement("div");this.options.rtl?o.className="vis-delete-rtl":o.className="vis-delete",o.title="Delete this item",new n(o).on("tap",function(t){t.stopPropagation(),i.parent.removeFromDataSet(i)}),t.appendChild(o),this.dom.deleteButton=o}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},o.prototype._repaintOnItemUpdateTimeTooltip=function(t){if(this.options.tooltipOnItemUpdateTime){var e=(this.options.editable.updateTime||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){var i=document.createElement("div");i.className="vis-onUpdateTime-tooltip",t.appendChild(i),this.dom.onItemUpdateTimeTooltip=i}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden",this.options.rtl?this.dom.onItemUpdateTimeTooltip.style.right=this.dom.content.style.right:this.dom.onItemUpdateTimeTooltip.style.left=this.dom.content.style.left;var o,n=50,s=this.parent.itemSet.body.domProps.scrollTop;o="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;var a=o+this.parent.top-n<-s;a?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top=this.height+2+"px"):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom=this.height+2+"px");var h,d;this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template?(d=this.options.tooltipOnItemUpdateTime.template.bind(this),h=d(this.data)):(h="start: "+r(this.data.start).format("MM/DD/YYYY hh:mm"),this.data.end&&(h+="
end: "+r(this.data.end).format("MM/DD/YYYY hh:mm"))),this.dom.onItemUpdateTimeTooltip.innerHTML=h}}},o.prototype._updateContents=function(t){var e,i;if(this.options.template){var o=this.parent.itemSet.itemsData.get(this.id);i=this.options.template.bind(this),e=i(o,t)}else e=this.data.content;if(e instanceof Object&&!(e instanceof Element))i(o,t);else{var n=this._contentToString(this.content)!==this._contentToString(e);if(n){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}}},o.prototype._updateTitle=function(t){null!=this.data.title?t.title=this.data.title||"":t.removeAttribute("vis-title")},o.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Object.keys(this.data)}for(var i=0;it.start&&this.data.start.getTime()-nt.start&&this.data.start.getTime()t.start&&this.data.start.getTime()-n/2t.start&&this.data.startt.start},o.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateTitle(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},o.prototype.show=r.prototype.show,o.prototype.hide=r.prototype.hide,o.prototype.repositionX=r.prototype.repositionX,o.prototype.repositionY=function(t){var e="top"===this.options.orientation.item;this.dom.content.style.top=e?"":"0",this.dom.content.style.bottom=e?"0":"";var i;if(void 0!==this.data.subgroup){var o=this.data.subgroup,n=this.parent.subgroups,r=n[o].index;if(1==e){i=this.parent.subgroups[o].height+t.item.vertical,i+=0==r?t.axis-.5*t.item.vertical:0;var a=this.parent.top;for(var h in n)n.hasOwnProperty(h)&&1==n[h].visible&&n[h].indexr&&(a+=l)}i=this.parent.subgroups[o].height+t.item.vertical,this.dom.box.style.top=this.parent.height-d+a+"px",this.dom.box.style.bottom=""}}else this.parent instanceof s?(i=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.top=e?"0":"",this.dom.box.style.bottom=e?"":"0"):(i=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=i+"px"},t.exports=o},function(t,e,i){function o(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:a.FORMAT,moment:d,timeAxis:null},this.options=s.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=i(1),r=i(33),a=i(37),h=i(34),d=i(2);o.prototype=new r,o.prototype.setOptions=function(t){t&&(s.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),s.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===n(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof d.locale?d.locale(t.locale):d.lang(t.locale)))},o.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},o.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},o.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,i=this.dom.background,o="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,n=e.parentNode!==o; +this._calculateCharSize();var s=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,r=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=s?t.minorCharHeight:0,t.majorLabelHeight=r?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,h=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height=this.props.height+"px",this._repaintLabels(),a?o.insertBefore(e,a):o.appendChild(e),h?this.body.dom.backgroundVertical.insertBefore(i,h):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||n},o.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=s.convert(this.body.range.start,"Number"),i=s.convert(this.body.range.end,"Number"),o=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),n=o-h.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,o);n-=this.body.util.toTime(0).valueOf();var r=new a(new Date(e),new Date(i),n,this.body.hiddenDates);r.setMoment(this.options.moment),this.options.format&&r.setFormat(this.options.format),this.options.timeAxis&&r.setScale(this.options.timeAxis),this.step=r;var d=this.dom;d.redundant.lines=d.lines,d.redundant.majorTexts=d.majorTexts,d.redundant.minorTexts=d.minorTexts,d.lines=[],d.majorTexts=[],d.minorTexts=[];var c,u,p,f,m,v,g,y,b,_,w=0,x=void 0,k=0,O=1e3;for(r.start(),u=r.getCurrent(),f=this.body.util.toScreen(u);r.hasNext()&&k=.4*g;if(this.options.showMinorLabels&&D){var S=this._repaintMinorText(p,b,t,_);S.style.width=w+"px"}m&&this.options.showMajorLabels?(p>0&&(void 0==x&&(x=p),S=this._repaintMajorText(p,r.getLabelMajor(),t,_)),y=this._repaintMajorLine(p,w,t,_)):D?y=this._repaintMinorLine(p,w,t,_):y&&(y.style.width=parseInt(y.style.width)+w+"px")}if(k!==O||l||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to "+O+" lines."),l=!0),this.options.showMajorLabels){var C=this.body.util.toTime(0),T=r.getLabelMajor(C),E=T.length*(this.props.majorCharWidth||10)+10;(void 0==x||E1e3&&(o=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,o)}var e=this;t()},o.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},o.prototype.setCurrentTime=function(t){var e=n.convert(t,"Date").valueOf(),i=(new Date).valueOf();this.offset=e-i,this.redraw()},o.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=o},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="date",a="object",h="dom",d="moment",l="any",c={configure:{enabled:{boolean:o},filter:{boolean:o,function:"function"},container:{dom:h},__type__:{object:a,boolean:o,function:"function"}},align:{string:i},rtl:{boolean:o,undefined:"undefined"},verticalScroll:{boolean:o,undefined:"undefined"},horizontalScroll:{boolean:o,undefined:"undefined"},autoResize:{boolean:o},clickToUse:{boolean:o},dataAttributes:{string:i,array:s},editable:{add:{boolean:o,undefined:"undefined"},remove:{boolean:o,undefined:"undefined"},updateGroup:{boolean:o,undefined:"undefined"},updateTime:{boolean:o,undefined:"undefined"},__type__:{boolean:o,object:a}},end:{number:n,date:r,string:i,moment:d},format:{minorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a,function:"function"}},majorLabels:{millisecond:{string:i,undefined:"undefined"},second:{string:i,undefined:"undefined"},minute:{string:i,undefined:"undefined"},hour:{string:i,undefined:"undefined"},weekday:{string:i,undefined:"undefined"},day:{string:i,undefined:"undefined"},month:{string:i,undefined:"undefined"},year:{string:i,undefined:"undefined"},__type__:{object:a,function:"function"}},__type__:{object:a}},moment:{function:"function"},groupOrder:{string:i,function:"function"},groupEditable:{add:{boolean:o,undefined:"undefined"},remove:{boolean:o,undefined:"undefined"},order:{boolean:o,undefined:"undefined"},__type__:{boolean:o,object:a}},groupOrderSwap:{function:"function"},height:{string:i,number:n},hiddenDates:{start:{date:r,number:n,string:i,moment:d},end:{date:r,number:n,string:i,moment:d},repeat:{string:i},__type__:{object:a,array:s}},itemsAlwaysDraggable:{boolean:o},locale:{string:i},locales:{__any__:{any:l},__type__:{object:a}},margin:{axis:{number:n},item:{horizontal:{number:n,undefined:"undefined"},vertical:{number:n,undefined:"undefined"},__type__:{object:a,number:n}},__type__:{object:a,number:n}},max:{date:r,number:n,string:i,moment:d},maxHeight:{number:n,string:i},maxMinorChars:{number:n},min:{date:r,number:n,string:i,moment:d},minHeight:{number:n,string:i},moveable:{boolean:o},multiselect:{boolean:o},multiselectPerGroup:{boolean:o},onAdd:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},order:{function:"function"},orientation:{axis:{string:i,undefined:"undefined"},item:{string:i,undefined:"undefined"},__type__:{string:i,object:a}},selectable:{boolean:o},showCurrentTime:{boolean:o},showMajorLabels:{boolean:o},showMinorLabels:{boolean:o},stack:{boolean:o},snap:{function:"function",null:"null"},start:{date:r,number:n,string:i,moment:d},template:{function:"function"},groupTemplate:{function:"function"},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:o,object:a}},timeAxis:{scale:{string:i,undefined:"undefined"},step:{number:n,undefined:"undefined"},__type__:{object:a}},type:{string:i},width:{string:i,number:n},zoomable:{boolean:o},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:n},zoomMin:{number:n},__type__:{object:a}},u={global:{align:["center","left","right"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",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:""}},groupsDraggable:!1,height:"",locale:"",margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,start:"",tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1]}};e.allOptions=c,e.configureOptions=u},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e,i,o){if(!(Array.isArray(i)||i instanceof c||i instanceof u)&&i instanceof Object){var n=o;o=i,i=n}var s=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:d,width:null,height:null,maxHeight:null,minHeight:null},this.options=l.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new p(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new m(this.body),this.components.push(this.timeAxis),this.currentTime=new v(this.body),this.components.push(this.currentTime),this.linegraph=new y(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){s.emit("click",s.getEventProperties(t))}),this.on("doubletap",function(t){s.emit("doubleClick",s.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},o&&this.setOptions(o),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}var s=i(28),r=o(s),a=i(31),h=o(a),d=(i(13),i(22),i(2)),l=i(1),c=i(9),u=i(11),p=i(32),f=i(35),m=i(46),v=i(50),g=i(48),y=i(53),b=i(31).printStyle,_=i(61).allOptions,w=i(61).configureOptions;n.prototype=new f,n.prototype.setOptions=function(t){var e=h.default.validate(t,_);e===!0&&console.log("%cErrors have been found in the supplied options object.",b),f.prototype.setOptions.call(this,t)},n.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?t instanceof c||t instanceof u?t:new c(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.linegraph&&this.linegraph.setItems(e),i)if(void 0!=this.options.start||void 0!=this.options.end){var o=void 0!=this.options.start?this.options.start:null,n=void 0!=this.options.end?this.options.end:null;this.setWindow(o,n,{animation:!1})}else this.fit({animation:!1})},n.prototype.setGroups=function(t){var e;e=t?t instanceof c||t instanceof u?t:new c(t):null,this.groupsData=e,this.linegraph.setGroups(e)},n.prototype.getLegend=function(t,e,i){return void 0===e&&(e=15),void 0===i&&(i=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,i):"cannot find group:'"+t+"'"},n.prototype.isGroupVisible=function(t){return void 0!==this.linegraph.groups[t]&&(this.linegraph.groups[t].visible&&(void 0===this.linegraph.options.groups.visibility[t]||1==this.linegraph.options.groups.visibility[t]))},n.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(i)&&1==this.linegraph.groups[i].visible)for(var o=0;os?s:t,e=null==e?s:e0){var h={};for(this._getRelevantData(a,h,n,s),this._applySampling(a,h),e=0;e0)switch(t.options.style){case"line":l.hasOwnProperty(a[e])||(l[a[e]]=f.calcPath(h[a[e]],t)),f.draw(l[a[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||m.draw(h[a[e]],t,this.framework);break;case"bar":}}}return r.cleanupElements(this.svgElements),!1},o.prototype._stack=function(t,e){var i,o,n,s,r;i=0;for(var a=0;at[a].x){r=e[h],s=0==h?r:e[h-1],i=h;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),o=r.x-s.x,n=r.y-s.y,0==o?t[a].y=t[a].orginalY+r.y:t[a].y=t[a].orginalY+n/o*(t[a].x-s.x)+s.y}},o.prototype._getRelevantData=function(t,e,i,o){var n,r,a,h;if(t.length>0)for(r=0;r0)for(var o=0;o0){var s=1,r=n.length,a=this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x),h=r/a;s=Math.min(Math.ceil(.2*r),Math.max(1,Math.round(h)));for(var d=new Array(r),l=0;l0){for(s=0;s0&&(n=this.groups[t[s]],r.stack===!0&&"bar"===r.style?"left"===r.yAxisOrientation?a=a.concat(n.getItems()):h=h.concat(n.getItems()):i[t[s]]=n.getYRange(o,t[s]));p.getStackedYRange(a,i,t,"__barStackLeft","left"),p.getStackedYRange(h,i,t,"__barStackRight","right")}},o.prototype._updateYAxis=function(t,e){var i,o,n=!1,s=!1,r=!1,a=1e9,h=1e9,d=-1e9,l=-1e9;if(t.length>0){for(var c=0;ci?i:a,d=di?i:h,l=l=0&&t._redrawLabel(o-2,e.val,i,"vis-y-axis vis-major",t.props.majorCharHeight),t.master===!0&&(n?t._redrawLine(o,i,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(o,i,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var d=0;void 0!==this.options[i].title&&void 0!==this.options[i].title.text&&(d=this.props.titleCharHeight);var l=this.options.icons===!0?Math.max(this.options.iconWidth,d)+this.options.labelOffsetX+15:d+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-l&&this.options.visible===!0?(this.width=this.maxLabelSize+l,this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSizethis.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+l),this.options.width=this.width+"px",s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(s.cleanupElements(this.DOMelements.lines),s.cleanupElements(this.DOMelements.labels),e=!1),e},o.prototype.convertValue=function(t){return this.scale.convertValue(t)},o.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},o.prototype._redrawLabel=function(t,e,i,o,n){var r=s.getDOMElement("div",this.DOMelements.labels,this.dom.frame);r.className=o,r.innerHTML=e,"left"===i?(r.style.left="-"+this.options.labelOffsetX+"px",r.style.textAlign="right"):(r.style.right="-"+this.options.labelOffsetX+"px",r.style.textAlign="left"),r.style.top=t-.5*n+this.options.labelOffsetY+"px",e+="";var a=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=n,this.majorCharHeight=s,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=r,this.autoScaleStart=i,this.autoScaleEnd=o,this.formattingFunction=a,i||o){var h=this,d=function(t){var e=t-t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx]);return t%(h.magnitudefactor*h.minorSteps[h.minorStepIdx])>.5*(h.magnitudefactor*h.minorSteps[h.minorStepIdx])?e+h.magnitudefactor*h.minorSteps[h.minorStepIdx]:e};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=d(this._start)),o&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=d(this._end)),this.determineScale()}}i.prototype.setCharHeight=function(t){this.majorCharHeight=t},i.prototype.setHeight=function(t){this.containerHeight=t},i.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,i=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,i);var o=0;i<0&&(o=i);for(var n=!1,s=o;Math.abs(s)<=Math.abs(i);s++){this.magnitudefactor=Math.pow(10,s);for(var r=0;r=e){n=!0,this.minorStepIdx=r;break}}if(n===!0)break}},i.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0},i.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},i.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},i.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},i.prototype.getLines=function(){for(var t=[],e=this.getStep(),i=(e-this._start%e)%e,o=this._start+i;this._end-o>1e-5;o+=e)o!=this._start&&t.push({major:this.is_major(o),y:this.convertValue(o),val:this.formatValue(o)});return t},i.prototype.followScale=function(t){var e=this.minorStepIdx,i=this._start,o=this._end,n=this,s=function(){n.magnitudefactor*=2},r=function(){n.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdxo+1e-5)r(),d=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),d=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&ce.x?1:-1})):this.itemsData=[]},o.prototype.getItems=function(){return this.itemsData},o.prototype.setZeroPosition=function(t){this.zeroPosition=t},o.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];s.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),s.mergeOptions(this.options,t,"interpolation"),s.mergeOptions(this.options,t,"drawPoints"),s.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==n(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5))}},o.prototype.update=function(t){this.group=t,this.content=t.content||"graph",this.className=t.className||this.className||"vis-graph-group"+this.groupsUsingDefaultStyles[0]%10,this.visible=void 0===t.visible||t.visible,this.style=t.style,this.setOptions(t.options)},o.prototype.getLegend=function(t,e,i,o,n){if(void 0==i||null==i){var s=document.createElementNS("http://www.w3.org/2000/svg","svg");i={svg:s,svgElements:{},options:this.options,groups:[this]}}switch(void 0!=o&&null!=o||(o=0),void 0!=n&&null!=n||(n=.5*e),this.options.style){case"line":a.drawIcon(this,o,n,t,e,i);break;case"points":case"point":h.drawIcon(this,o,n,t,e,i);break;case"bar":r.drawIcon(this,o,n,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},o.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,o=0;ot[o].y?t[o].y:e,i=i0&&(i=Math.min(i,Math.abs(e[o-1].screen_x-e[o].screen_x))),0===i&&(void 0===t[e[o].screen_x]&&(t[e[o].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[o].screen_x].amount+=1)},o._getSafeDrawData=function(t,e,i){var o,n;return t0?(o=t0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:o,n=nt[r].accumulatedNegative?t[r].accumulatedNegative:o,o=o>t[r].accumulatedPositive?t[r].accumulatedPositive:o,n=n0){var i=[];return i=1==e.options.interpolation.enabled?o._catmullRom(t,e):o._linear(t)}},o.drawIcon=function(t,e,i,o,s,r){var a,h,d=.5*s,l=n.getSVGElement("rect",r.svgElements,r.svg);if(l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",i-d),l.setAttributeNS(null,"width",o),l.setAttributeNS(null,"height",2*d),l.setAttributeNS(null,"class","vis-outline"),a=n.getSVGElement("path",r.svgElements,r.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+o)+","+i),1==t.options.shaded.enabled&&(h=n.getSVGElement("path",r.svgElements,r.svg),"top"==t.options.shaded.orientation?h.setAttributeNS(null,"d","M"+e+", "+(i-d)+"L"+e+","+i+" L"+(e+o)+","+i+" L"+(e+o)+","+(i-d)):h.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+d)+" L"+(e+o)+","+(i+d)+"L"+(e+o)+","+i),h.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&h.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var c={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};n.drawPoint(e+.5*o,i,c,r.svgElements,r.svg)}},o.drawShading=function(t,e,i,o){if(1==e.options.shaded.enabled){var s=Number(o.svg.style.height.replace("px","")),r=n.getSVGElement("path",o.svgElements,o.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var h,d=0;d="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),h="group"==e.options.shaded.orientation&&null!=i&&void 0!=i?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+i[i.length-1][0]+","+i[i.length-1][1]+" "+this.serializePath(i,a,!0)+i[0][0]+","+i[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+d+" H"+t[0][0]+" Z",r.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&r.setAttributeNS(null,"style",e.options.shaded.style),r.setAttributeNS(null,"d",h)}},o.draw=function(t,e,i){if(null!=t&&void 0!=t){var o=n.getSVGElement("path",i.svgElements,i.svg);o.setAttributeNS(null,"class",e.className),void 0!==e.style&&o.setAttributeNS(null,"style",e.style);var s="L";1==e.options.interpolation.enabled&&(s="C"),o.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,s,!1))}},o.serializePath=function(t,e,i){if(t.length<2)return"";var o=e;if(i)for(var n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(var n=1;n0&&(f=1/f),m=3*v*(v+g),m>0&&(m=1/m),a={screen_x:(-b*o.screen_x+u*n.screen_x+_*s.screen_x)*f,screen_y:(-b*o.screen_y+u*n.screen_y+_*s.screen_y)*f},h={screen_x:(y*n.screen_x+p*s.screen_x-b*r.screen_x)*m,screen_y:(y*n.screen_y+p*s.screen_y-b*r.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=n),0==h.screen_x&&0==h.screen_y&&(h=s),x.push([a.screen_x,a.screen_y]),x.push([h.screen_x,h.screen_y]),x.push([s.screen_x,s.screen_y]);return x},o._linear=function(t){for(var e=[],i=0;i")}this.dom.textArea.innerHTML=s,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},o.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Object.keys(this.groups);t.sort(function(t,e){return t0){var i=this.groupIndex%this.groupsArray.length;this.groupIndex++,e={},e.color=this.groups[this.groupsArray[i]],this.groups[t]=e}else{var o=this.defaultIndex%this.defaultGroups.length;this.defaultIndex++,e={},e.color=this.defaultGroups[o],this.groups[t]=e}return e}},{key:"add",value:function(t,e){return this.groups[t]=e,this.groupsArray.push(t),e}}]),t}();e.default=r},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]&&arguments[1],o=this.body.data.nodes;if(t instanceof c||t instanceof u)this.body.data.nodes=t;else if(Array.isArray(t))this.body.data.nodes=new c,this.body.data.nodes.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new c}o&&l.forEach(this.nodesListeners,function(t,e){o.off(e,t)}),this.body.nodes={},this.body.data.nodes&&!function(){var t=e;l.forEach(e.nodesListeners,function(e,i){t.body.data.nodes.on(i,e)});var i=e.body.data.nodes.getIds();e.add(i,!0)}(),i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=[],n=0;n1&&void 0!==arguments[1]?arguments[1]:a.default;return new e(t,this.body,this.images,this.groups,this.options)}},{key:"refresh",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.body.nodes;for(var i in e){var o=void 0;e.hasOwnProperty(i)&&(o=e[i]);var n=this.body.data.nodes._data[i];void 0!==o&&void 0!==n&&(t===!0&&o.setOptions({x:null,y:null}),o.setOptions({fixed:!1}),o.setOptions(n))}}},{key:"getPositions",value:function(t){var e={};if(void 0!==t){if(Array.isArray(t)===!0){for(var i=0;it.left&&this.shape.topt.top}},{key:"isBoundingBoxOverlappingWith",value:function(t){return this.shape.boundingBox.leftt.left&&this.shape.boundingBox.topt.top}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=["color","font","fixed","shadow"];if(A.selectiveNotDeepExtend(n,t,e,i),A.mergeOptions(t,e,"shadow",i,o),void 0!==e.color&&null!==e.color){var s=A.parseColor(e.color);A.fillIfDefined(t.color,s)}else i===!0&&null===e.color&&(t.color=A.bridgeObject(o.color));void 0!==e.fixed&&null!==e.fixed&&("boolean"==typeof e.fixed?(t.fixed.x=e.fixed,t.fixed.y=e.fixed):(void 0!==e.fixed.x&&"boolean"==typeof e.fixed.x&&(t.fixed.x=e.fixed.x),void 0!==e.fixed.y&&"boolean"==typeof e.fixed.y&&(t.fixed.y=e.fixed.y))),void 0!==e.font&&null!==e.font?a.default.parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=A.bridgeObject(o.font)),void 0!==e.scaling&&A.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)}}]),t}();e.default=B},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){n=!0,s=t}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2];o(this,t),this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(i),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}return r(t,[{key:"setOptions",value:function(e){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.nodeOptions=e,this.fontOptions=a.deepExtend({},e.font,!0),void 0!==e.label&&(this.labelDirty=!0),void 0!==e.font&&(t.parseOptions(this.fontOptions,e,i),"string"==typeof e.font?this.baseSize=this.fontOptions.size:"object"===s(e.font)&&void 0!==e.font.size&&(this.baseSize=e.font.size))}},{key:"draw",value:function(t,e,i,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"middle";if(void 0!==this.nodeOptions.label){var s=this.fontOptions.size*this.body.view.scale;this.nodeOptions.label&&s4&&void 0!==arguments[4]?arguments[4]:"middle",r=this.fontOptions.size,a=r*this.body.view.scale;a>=this.nodeOptions.scaling.label.maxVisible&&(r=Number(this.nodeOptions.scaling.label.maxVisible)/this.body.view.scale);var h=this.size.yLine,d=this._getColor(a),l=n(d,2),c=l[0],u=l[1],p=this._setAlignment(t,i,h,s),f=n(p,2);i=f[0],h=f[1],t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+r+"px "+this.fontOptions.face,t.fillStyle=c,this.isEdgeLabel||"left"!==this.fontOptions.align?t.textAlign="center":(t.textAlign=this.fontOptions.align,i-=.5*this.size.width),this.fontOptions.strokeWidth>0&&(t.lineWidth=this.fontOptions.strokeWidth,t.strokeStyle=u,t.lineJoin="round");for(var m=0;m0&&t.strokeText(this.lines[m],i,h),t.fillText(this.lines[m],i,h),h+=r}},{key:"_setAlignment",value:function(t,e,i,o){if(this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&this.pointToSelf===!1){e=0,i=0;var n=2;"top"===this.fontOptions.align?(t.textBaseline="alphabetic",i-=2*n):"bottom"===this.fontOptions.align?(t.textBaseline="hanging",i+=2*n):t.textBaseline="middle"}else t.textBaseline=o;return[e,i]}},{key:"_getColor",value:function(t){var e=this.fontOptions.color||"#000000",i=this.fontOptions.strokeColor||"#ffffff";if(t<=this.nodeOptions.scaling.label.drawThreshold){var o=Math.max(0,Math.min(1,1-(this.nodeOptions.scaling.label.drawThreshold-t)));e=a.overrideOpacity(e,o),i=a.overrideOpacity(i,o)}return[e,i]}},{key:"getTextSize",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i={width:this._processLabel(t,e),height:this.fontOptions.size*this.lineCount,lineCount:this.lineCount};return i}},{key:"calculateLabelSize",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"middle";this.labelDirty===!0&&(this.size.width=this._processLabel(t,e)),this.size.height=this.fontOptions.size*this.lineCount,this.size.left=i-.5*this.size.width,this.size.top=o-.5*this.size.height,this.size.yLine=o+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===n&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4),this.labelDirty=!1}},{key:"_processLabel",value:function(t,e){var i=0,o=[""],n=0;if(void 0!==this.nodeOptions.label){o=String(this.nodeOptions.label).split("\n"),n=o.length,t.font=(e&&this.nodeOptions.labelHighlightBold?"bold ":"")+this.fontOptions.size+"px "+this.fontOptions.face,i=t.measureText(o[0]).width;for(var s=1;si?r:i}}return this.lines=o,this.lineCount=n,i}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"==typeof e.font){var o=e.font.split(" ");t.size=o[0].replace("px",""),t.face=o[1],t.color=o[2]}else"object"===s(e.font)&&a.fillIfDefined(t,e.font,i);t.size=Number(t.size)}}]),t}();e.default=h},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height;var n=this.options.shapeProperties.borderRadius;this.boundingBox.left=this.left-n,this.boundingBox.top=this.top-n,this.boundingBox.bottom=this.top+this.height+n,this.boundingBox.right=this.left+this.width+n}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(e)),Math.abs(this.height/2/Math.sin(e)))+i}}]),e}(d.default);e.default=l},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;ithis.imageObj.height?(o=this.imageObj.width/this.imageObj.height,e=2*this.options.size*o||this.imageObj.width,i=2*this.options.size||this.imageObj.height):(o=this.imageObj.width&&this.imageObj.height?this.imageObj.height/this.imageObj.width:1,e=2*this.options.size,i=2*this.options.size*o):(e=this.imageObj.width,i=this.imageObj.height),this.width=e,this.height=i,this.radius=.5*this.width}}},{key:"_drawRawCircle",value:function(t,e,i,o,n,s){var r=this.options.borderWidth,a=this.options.borderWidthSelected||2*this.options.borderWidth,h=(o?a:r)/this.body.view.scale;t.lineWidth=Math.min(this.width,h),t.strokeStyle=o?this.options.color.highlight.border:n?this.options.color.hover.border:this.options.color.border,t.fillStyle=o?this.options.color.highlight.background:n?this.options.color.hover.background:this.options.color.background,t.circle(e,i,s),this.enableShadow(t),t.fill(),this.disableShadow(t),t.save(),h>0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore()}},{key:"_drawImageAtPosition",value:function(t){if(0!=this.imageObj.width){t.globalAlpha=1,this.enableShadow(t);var e=this.imageObj.width/this.width/this.body.view.scale;if(e>2&&this.options.shapeProperties.interpolation===!0){var i=this.imageObj.width,o=this.imageObj.height,n=document.createElement("canvas");n.width=i,n.height=i;var s=n.getContext("2d");e*=.5,i*=.5,o*=.5,s.drawImage(this.imageObj,0,0,i,o);for(var r=0,a=1;e>2&&a<4;)s.drawImage(n,r,0,i,o,r+i,0,i/2,o/2),r+=i,e*=.5,i*=.5,o*=.5,a+=1;t.drawImage(n,r,0,i,o,this.left,this.top,this.width,this.height)}else t.drawImage(this.imageObj,this.left,this.top,this.width,this.height);this.disableShadow(t)}}},{key:"_drawImageLabel",value:function(t,e,i,o){var n,s=0;if(void 0!==this.height){s=.5*this.height;var r=this.labelModule.getTextSize(t);r.lineCount>=1&&(s+=r.height/2)}n=i+s,this.options.label&&(this.labelOffset=s),this.labelModule.draw(t,e,n,o,"hanging")}}]),e}(d.default);e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d.default);e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t), +t.stroke(),this.disableBorderDashes(t)),t.restore(),void 0!==this.options.label){var l=n+.5*this.height+3;this.labelModule.draw(t,o,l,s,"hanging")}this.updateBoundingBox(o,n)}},{key:"updateBoundingBox",value:function(t,e){this.boundingBox.top=e-this.options.size,this.boundingBox.left=t-this.options.size,this.boundingBox.right=t+this.options.size,this.boundingBox.bottom=e+this.options.size,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+3))}}]),e}(d.default);e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),this.updateBoundingBox(e,i,t,o),this.labelModule.draw(t,e,i,o)}},{key:"updateBoundingBox",value:function(t,e,i,o){this.resize(i,o),this.left=t-.5*this.width,this.top=e-.5*this.height,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"distanceToBorder",value:function(t,e){this.resize(t);var i=.5*this.width,o=.5*this.height,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},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0){var i=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+i)}}},{key:"_icon",value:function(t,e,i,o){var n=Number(this.options.icon.size);void 0!==this.options.icon.code?(t.font=(o?"bold ":"")+n+"px "+this.options.icon.face,t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",this.enableShadow(t),t.fillText(this.options.icon.code,e,i),this.disableShadow(t)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d.default);e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(this.enableBorderDashes(t),t.stroke(),this.disableBorderDashes(t)),t.restore(),t.closePath()}this._drawImageAtPosition(t),this._drawImageLabel(t,e,i,o||n),this.updateBoundingBox(e,i)}},{key:"updateBoundingBox",value:function(t,e){this.resize(),this.left=t-this.width/2,this.top=e-this.height/2,this.boundingBox.top=this.top,this.boundingBox.left=this.left,this.boundingBox.right=this.left+this.width,this.boundingBox.bottom=this.top+this.height,void 0!==this.options.label&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(t,e){return this._distanceToBorder(t,e)}}]),e}(d.default);e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]&&arguments[1],o=this.body.data.edges;if(t instanceof c||t instanceof u)this.body.data.edges=t;else if(Array.isArray(t))this.body.data.edges=new c,this.body.data.edges.add(t);else{if(t)throw new TypeError("Array or DataSet expected");this.body.data.edges=new c}if(o&&l.forEach(this.edgesListeners,function(t,e){o.off(e,t)}),this.body.edges={},this.body.data.edges){l.forEach(this.edgesListeners,function(t,i){e.body.data.edges.on(i,t)});var n=this.body.data.edges.getIds();this.add(n,!0)}i===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.edges,o=this.body.data.edges,n=0;ni.shape.height?(r=i.x+.5*i.shape.width,a=i.y-h):(r=i.x+h,a=i.y-.5*i.shape.height),s=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(t,s.x,s.y,n)}}}},{key:"isOverlappingWith",value:function(t){if(this.connected){var e=10,i=this.from.x,o=this.from.y,n=this.to.x,s=this.to.y,r=t.left,a=t.top,h=this.edgeType.getDistanceToEdge(i,o,n,s,r,a);return h0&&i<0)&&(o+=Math.PI),t.rotate(o)}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}}],[{key:"parseOptions",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=["arrowStrikethrough","id","from","hidden","hoverWidth","label","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","to","title","value","width"];if(g.selectiveDeepExtend(n,t,e,i),g.mergeOptions(t,e,"smooth",i,o),g.mergeOptions(t,e,"shadow",i,o),void 0!==e.dashes&&null!==e.dashes?t.dashes=e.dashes:i===!0&&null===e.dashes&&(t.dashes=Object.create(o.dashes)),void 0!==e.scaling&&null!==e.scaling?(void 0!==e.scaling.min&&(t.scaling.min=e.scaling.min),void 0!==e.scaling.max&&(t.scaling.max=e.scaling.max),g.mergeOptions(t.scaling,e.scaling,"label",i,o.scaling)):i===!0&&null===e.scaling&&(t.scaling=Object.create(o.scaling)),void 0!==e.arrows&&null!==e.arrows)if("string"==typeof e.arrows){var r=e.arrows.toLowerCase();t.arrows.to.enabled=r.indexOf("to")!=-1,t.arrows.middle.enabled=r.indexOf("middle")!=-1,t.arrows.from.enabled=r.indexOf("from")!=-1}else{if("object"!==s(e.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+JSON.stringify(e.arrows));g.mergeOptions(t.arrows,e.arrows,"to",i,o.arrows),g.mergeOptions(t.arrows,e.arrows,"middle",i,o.arrows),g.mergeOptions(t.arrows,e.arrows,"from",i,o.arrows)}else i===!0&&null===e.arrows&&(t.arrows=Object.create(o.arrows));if(void 0!==e.color&&null!==e.color)if(t.color=g.deepExtend({},t.color,!0),g.isString(e.color))t.color.color=e.color,t.color.highlight=e.color,t.color.hover=e.color,t.color.inherit=!1;else{var a=!1;void 0!==e.color.color&&(t.color.color=e.color.color,a=!0),void 0!==e.color.highlight&&(t.color.highlight=e.color.highlight,a=!0),void 0!==e.color.hover&&(t.color.hover=e.color.hover,a=!0),void 0!==e.color.inherit&&(t.color.inherit=e.color.inherit),void 0!==e.color.opacity&&(t.color.opacity=Math.min(1,Math.max(0,e.color.opacity))),void 0===e.color.inherit&&a===!0&&(t.color.inherit=!1)}else i===!0&&null===e.color&&(t.color=g.bridgeObject(o.color));void 0!==e.font&&null!==e.font?h.default.parseOptions(t.font,e):i===!0&&null===e.font&&(t.font=g.bridgeObject(o.font))}}]),t}();e.default=y},function(t,e,i){ +function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){n=!0,s=t}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var i=0;iMath.abs(e)||this.options.smooth.forceDirection===!0||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(o=this.from.y,s=this.to.y,i=this.from.x-r*t,n=this.to.x+r*t):(o=this.from.y-r*e,s=this.to.y+r*e,i=this.from.x,n=this.to.x),[{x:i,y:o},{x:n,y:s}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),h=a(r,2),d=h[0],l=h[1];return this._getDistanceToBezierEdge(t,e,i,o,n,s,d,l)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=a(e,2),o=i[0],n=i[1],s=t,r=[];r[0]=Math.pow(1-s,3),r[1]=3*s*Math.pow(1-s,2),r[2]=3*Math.pow(s,2)*(1-s),r[3]=Math.pow(s,3);var h=r[0]*this.fromPoint.x+r[1]*o.x+r[2]*n.x+r[3]*this.toPoint.x,d=r[0]*this.fromPoint.y+r[1]*o.y+r[2]*n.y+r[3]*this.toPoint.y;return{x:h,y:d}}}]),e}(l.default);e.default=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&(d=this._getDistanceToLine(f,m,u,p,n,s),h=d2&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),h=10,d=0,l=0,c=1,u=.2,p=this.to,f=!1;for(t.id===this.from.id&&(p=this.from,f=!0);l<=c&&d0&&(h=this._getDistanceToLine(p,f,c,u,n,s),a=ho.shape.height?(e=o.x+.5*o.shape.width,i=o.y-n):(e=o.x+n,i=o.y-.5*o.shape.height),[e,i,n]}},{key:"_pointOnCircle",value:function(t,e,i,o){var n=2*o*Math.PI;return{x:t+i*Math.cos(n),y:e-i*Math.sin(n)}}},{key:"_findBorderPositionCircle",value:function(t,e,i){for(var o=i.x,n=i.y,s=i.low,r=i.high,a=i.direction,h=10,d=0,l=this.options.selfReferenceSize,c=void 0,u=void 0,p=void 0,f=void 0,m=void 0,v=.05,g=.5*(s+r);s<=r&&d0?a>0?s=g:r=g:a>0?r=g:s=g,d++;return c.t=g,c}},{key:"getLineWidth",value:function(t,e){return t===!0?Math.max(this.selectionWidth,.3/this.body.view.scale):e===!0?Math.max(this.hoverWidth,.3/this.body.view.scale):Math.max(this.options.width,.3/this.body.view.scale)}},{key:"getColor",value:function(t,e,i){var o=this.options.color;if(o.inherit!==!1){if("both"===o.inherit&&this.from.id!==this.to.id){var n=t.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),s=void 0,a=void 0;return s=this.from.options.color.highlight.border,a=this.to.options.color.highlight.border,this.from.selected===!1&&this.to.selected===!1?(s=r.overrideOpacity(this.from.options.color.border,this.options.color.opacity),a=r.overrideOpacity(this.to.options.color.border,this.options.color.opacity)):this.from.selected===!0&&this.to.selected===!1?a=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(s=this.from.options.color.border),n.addColorStop(0,s),n.addColorStop(1,a),n}this.colorDirty===!0&&("to"===o.inherit?(this.color.highlight=this.to.options.color.highlight.border,this.color.hover=this.to.options.color.hover.border,this.color.color=r.overrideOpacity(this.to.options.color.border,o.opacity)):(this.color.highlight=this.from.options.color.highlight.border,this.color.hover=this.from.options.color.hover.border,this.color.color=r.overrideOpacity(this.from.options.color.border,o.opacity)))}else this.colorDirty===!0&&(this.color.highlight=o.highlight,this.color.hover=o.hover,this.color.color=r.overrideOpacity(o.color,o.opacity));return this.colorDirty=!1,e===!0?this.color.highlight:i===!0?this.color.hover:this.color.color}},{key:"_circle",value:function(t,e,i,o){this.enableShadow(t),t.beginPath(),t.arc(e,i,o,0,2*Math.PI,!1),t.stroke(),this.disableShadow(t)}},{key:"getDistanceToEdge",value:function(t,e,i,o,s,r,a){var h=0;if(this.from!=this.to)h=this._getDistanceToEdge(t,e,i,o,s,r,a);else{var d=this._getCircleData(),l=n(d,3),c=l[0],u=l[1],p=l[2],f=c-s,m=u-r;h=Math.abs(Math.sqrt(f*f+m*m)-p)}return this.labelModule.size.lefts&&this.labelModule.size.topr?0:h}},{key:"_getDistanceToLine",value:function(t,e,i,o,n,s){var r=i-t,a=o-e,h=r*r+a*a,d=((n-t)*r+(s-e)*a)/h;d>1?d=1:d<0&&(d=0);var l=t+d*r,c=e+d*a,u=l-n,p=c-s;return Math.sqrt(u*u+p*p)}},{key:"getArrowData",value:function(t,e,i,o,s){var r=void 0,a=void 0,h=void 0,d=void 0,l=void 0,c=void 0,u=void 0,p=this.getLineWidth(o,s);if("from"===e?(h=this.from,d=this.to,l=.1,c=this.options.arrows.from.scaleFactor,u=this.options.arrows.from.type):"to"===e?(h=this.to,d=this.from,l=-.1,c=this.options.arrows.to.scaleFactor,u=this.options.arrows.to.type):(h=this.to,d=this.from,c=this.options.arrows.middle.scaleFactor,u=this.options.arrows.middle.type),h!=d)if("middle"!==e)if(this.options.smooth.enabled===!0){a=this.findBorderPosition(h,t,{via:i});var f=this.getPoint(Math.max(0,Math.min(1,a.t+l)),i);r=Math.atan2(a.y-f.y,a.x-f.x)}else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.findBorderPosition(h,t);else r=Math.atan2(h.y-d.y,h.x-d.x),a=this.getPoint(.5,i);else{var m=this._getCircleData(t),v=n(m,3),g=v[0],y=v[1],b=v[2];"from"===e?(a=this.findBorderPosition(this.from,t,{x:g,y:y,low:.25,high:.6,direction:-1}),r=a.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI):"to"===e?(a=this.findBorderPosition(this.from,t,{x:g,y:y,low:.6,high:1,direction:1}),r=a.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI):(a=this._pointOnCircle(g,y,b,.175),r=3.9269908169872414)}var _=15*c+3*p,w=a.x-.9*_*Math.cos(r),x=a.y-.9*_*Math.sin(r),k={x:w,y:x};return{point:a,core:k,angle:r,length:_,type:u}}},{key:"drawArrowHead",value:function(t,e,i,o){t.strokeStyle=this.getColor(t,e,i),t.fillStyle=t.strokeStyle,t.lineWidth=this.getLineWidth(e,i),o.type&&"circle"===o.type.toLowerCase()?t.circleEndpoint(o.point.x,o.point.y,o.angle,o.length):t.arrowEndpoint(o.point.x,o.point.y,o.angle,o.length),this.enableShadow(t),t.fill(),this.disableShadow(t)}},{key:"enableShadow",value:function(t){this.options.shadow.enabled===!0&&(t.shadowColor=this.options.shadow.color,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=a},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){n=!0,s=t}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),h=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:this.via,i=t,o=void 0,n=void 0;if(this.from===this.to){var s=this._getCircleData(this.from),r=a(s,3),h=r[0],d=r[1],l=r[2],c=2*Math.PI*(1-i);o=h+l*Math.sin(c),n=d+l-l*(1-Math.cos(c))}else o=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,n=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y;return{x:o,y:n}}},{key:"_findBorderPosition",value:function(t,e){return this._findBorderPositionBezier(t,e,this.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){return this._getDistanceToBezierEdge(t,e,i,o,n,s,this.via)}}]),e}(l.default);e.default=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s):this.from.x>this.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s)),"discrete"===o&&(t=nMath.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n)),"discrete"===o&&(e=sMath.abs(this.from.y-this.to.y)&&(t=this.from.x=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*s,e=this.from.y-i*s,t=this.to.xthis.to.x&&(t=this.from.x-i*s,e=this.from.y-i*s,t=this.to.x>t?this.to.x:t):this.from.ythis.to.x&&(t=this.from.x-i*s,e=this.from.y+i*s,t=this.to.x>t?this.to.x:t)):Math.abs(this.from.x-this.to.x)>Math.abs(this.from.y-this.to.y)&&(this.from.y>=this.to.y?this.from.x<=this.to.x?(t=this.from.x+i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.x>this.to.x&&(t=this.from.x-i*n,e=this.from.y-i*n,e=this.to.y>e?this.to.y:e):this.from.ythis.to.x&&(t=this.from.x-i*n,e=this.from.y+i*n,e=this.to.y2&&void 0!==arguments[2]?arguments[2]:{};return this._findBorderPositionBezier(t,e,i.via)}},{key:"_getDistanceToEdge",value:function(t,e,i,o,n,s){var r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(t,e,i,o,n,s,r)}},{key:"getPoint",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),i=t,o=Math.pow(1-i,2)*this.fromPoint.x+2*i*(1-i)*e.x+Math.pow(i,2)*this.toPoint.x,n=Math.pow(1-i,2)*this.fromPoint.y+2*i*(1-i)*e.y+Math.pow(i,2)*this.toPoint.y;return{x:o,y:n}}}]),e}(d.default);e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(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&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0])||arguments[0];this.stabilized=!0,t===!0&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,t===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var t=Date.now();this.physicsTick();var e=Date.now()-t;(e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&setTimeout(function(){t.body.emitter.emit("stabilized",{iterations:e}),t.startedStabilization=!1,t.stabilizationIterations=0},0)}},{key:"physicsTick",value:function(){if(this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0),this.stabilized===!1){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var t=1.2;this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.calculateForces(),this.moveNodes(),this.revert(),this.timestep=.5*this.timestep,this.calculateForces(),this.moveNodes(),this.calculateForces(),this.moveNodes(),this._evaluateStepQuality()===!0?this.timestep=t*this.timestep:this.timestep/ts))return!1;return!0}},{key:"moveNodes",value:function(){for(var t=this.physicsBody.physicsNodeIndices,e=this.options.maxVelocity?this.options.maxVelocity:1e9,i=0,o=0,n=5,s=0;se?s[t].x>0?e:-e:s[t].x,i.x+=s[t].x*o}else n[t].x=0,s[t].x=0;if(i.options.fixed.y===!1){var h=this.modelOptions.damping*s[t].y,d=(n[t].y-h)/i.options.mass;s[t].y+=d*o,s[t].y=Math.abs(s[t].y)>e?s[t].y>0?e:-e:s[t].y,i.y+=s[t].y*o}else n[t].y=0,s[t].y=0;var l=Math.sqrt(Math.pow(s[t].x,2)+Math.pow(s[t].y,2));return l}},{key:"calculateForces",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve()}},{key:"_freezeNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&t[e].x&&t[e].y&&(this.freezeCache[e]={x:t[e].options.fixed.x,y:t[e].options.fixed.y},t[e].options.fixed.x=!0,t[e].options.fixed.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var t=this.body.nodes;for(var e in t)t.hasOwnProperty(e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;return"number"!=typeof e&&(console.log("The stabilize method needs a numeric amount of iterations. Switching to default: ",this.options.stabilization.iterations),e=this.options.stabilization.iterations),0===this.physicsBody.physicsNodeIndices.length?void(this.ready=!0):(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,void setTimeout(function(){return t._stabilizationBatch()},0))}},{key:"_stabilizationBatch",value:function(){this.startedStabilization===!1&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0);for(var t=0;this.stabilized===!1&&t0){var t=void 0,e=this.body.nodes,i=this.physicsBody.physicsNodeIndices,o=i.length,n=this._formBarnesHutTree(e,i);this.barnesHutTree=n;for(var s=0;s0&&(this._getForceContribution(n.root.children.NW,t),this._getForceContribution(n.root.children.NE,t),this._getForceContribution(n.root.children.SW,t),this._getForceContribution(n.root.children.SE,t))}}},{key:"_getForceContribution",value:function(t,e){if(t.childrenCount>0){var i=void 0,o=void 0,n=void 0;i=t.centerOfMass.x-e.x,o=t.centerOfMass.y-e.y,n=Math.sqrt(i*i+o*o),n*t.calcSize>this.thetaInversed?this._calculateForces(n,i,o,e,t):4===t.childrenCount?(this._getForceContribution(t.children.NW,e),this._getForceContribution(t.children.NE,e),this._getForceContribution(t.children.SW,e),this._getForceContribution(t.children.SE,e)):t.children.data.id!=e.id&&this._calculateForces(n,i,o,e,t)}}},{key:"_calculateForces",value:function(t,e,i,o,n){0===t&&(t=.1,e=t),this.overlapAvoidanceFactor<1&&o.shape.radius&&(t=Math.max(.1+this.overlapAvoidanceFactor*o.shape.radius,t-o.shape.radius));var s=this.options.gravitationalConstant*n.mass*o.options.mass/Math.pow(t,3),r=e*s,a=i*s;this.physicsBody.forces[o.id].x+=r,this.physicsBody.forces[o.id].y+=a}},{key:"_formBarnesHutTree",value:function(t,e){for(var i=void 0,o=e.length,n=t[e[0]].x,s=t[e[0]].y,r=t[e[0]].x,a=t[e[0]].y,h=1;h0&&(dr&&(r=d),la&&(a=l))}var c=Math.abs(r-n)-Math.abs(a-s);c>0?(s-=.5*c,a+=.5*c):(n+=.5*c,r-=.5*c);var u=1e-5,p=Math.max(u,Math.abs(r-n)),f=.5*p,m=.5*(n+r),v=.5*(s+a),g={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-f,maxX:m+f,minY:v-f,maxY:v+f},size:p,calcSize:1/p,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(g.root);for(var y=0;y0&&this._placeInTree(g.root,i);return g}},{key:"_updateBranchMass",value:function(t,e){var i=t.mass+e.options.mass,o=1/i;t.centerOfMass.x=t.centerOfMass.x*t.mass+e.x*e.options.mass,t.centerOfMass.x*=o,t.centerOfMass.y=t.centerOfMass.y*t.mass+e.y*e.options.mass,t.centerOfMass.y*=o,t.mass=i;var n=Math.max(Math.max(e.height,e.radius),e.width);t.maxWidth=t.maxWidthe.x?t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NW"):this._placeInRegion(t,e,"SW"):t.children.NW.range.maxY>e.y?this._placeInRegion(t,e,"NE"):this._placeInRegion(t,e,"SE")}},{key:"_placeInRegion",value:function(t,e,i){switch(t.children[i].childrenCount){case 0:t.children[i].children.data=e,t.children[i].childrenCount=1,this._updateBranchMass(t.children[i],e);break;case 1:t.children[i].children.data.x===e.x&&t.children[i].children.data.y===e.y?(e.x+=this.seededRandom(),e.y+=this.seededRandom()):(this._splitBranch(t.children[i]),this._placeInTree(t.children[i],e));break;case 4:this._placeInTree(t.children[i],e)}}},{key:"_splitBranch",value:function(t){var e=null;1===t.childrenCount&&(e=t.children.data,t.mass=0,t.centerOfMass.x=0,t.centerOfMass.y=0),t.childrenCount=4,t.children.data=null,this._insertRegion(t,"NW"),this._insertRegion(t,"NE"),this._insertRegion(t,"SW"),this._insertRegion(t,"SE"),null!=e&&this._placeInTree(t,e)}},{key:"_insertRegion",value:function(t,e){var i=void 0,o=void 0,n=void 0,s=void 0,r=.5*t.size;switch(e){case"NW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY,s=t.range.minY+r;break;case"NE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY,s=t.range.minY+r;break;case"SW":i=t.range.minX,o=t.range.minX+r,n=t.range.minY+r,s=t.range.maxY;break;case"SE":i=t.range.minX+r,o=t.range.maxX,n=t.range.minY+r,s=t.range.maxY}t.children[e]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:o,minY:n,maxY:s},size:.5*t.size,calcSize:2*t.calcSize,children:{data:null},maxWidth:0,level:t.level+1,childrenCount:0}}},{key:"_debug",value:function(t,e){void 0!==this.barnesHutTree&&(t.lineWidth=1,this._drawBranch(this.barnesHutTree.root,t,e))}},{key:"_drawBranch",value:function(t,e,i){void 0===i&&(i="#FF0000"),4===t.childrenCount&&(this._drawBranch(t.children.NW,e),this._drawBranch(t.children.NE,e),this._drawBranch(t.children.SE,e),this._drawBranch(t.children.SW,e)),e.strokeStyle=i,e.beginPath(),e.moveTo(t.range.minX,t.range.minY),e.lineTo(t.range.maxX,t.range.minY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.minY),e.lineTo(t.range.maxX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.maxX,t.range.maxY),e.lineTo(t.range.minX,t.range.maxY),e.stroke(),e.beginPath(),e.moveTo(t.range.minX,t.range.maxY),e.lineTo(t.range.minX,t.range.minY),e.stroke()}}]),t}();e.default=n},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i0){var s=n.edges.length+1,r=this.options.centralGravity*s*n.options.mass;o[n.id].x=e*r,o[n.id].y=i*r}}}]),e}(d.default);e.default=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i=t&&i.push(n.id)}for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(void 0===t.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");t=this._checkOptions(t);for(var i={},o={},n=0;n2&&void 0!==arguments[2])||arguments[2];e=this._checkOptions(e);for(var o=[],n={},s=void 0,r=void 0,a=void 0,d=void 0,l=void 0,c=0;c0&&Object.keys(p).length>0&&m===!0&&o.push({nodes:u,edges:p})}}}for(var b=0;b1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(1,t,e)}},{key:"clusterBridges",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.clusterByEdgeCount(2,t,e)}},{key:"clusterByConnection",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[t])throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[t];e=this._checkOptions(e,o),void 0===e.clusterNodeProperties.x&&(e.clusterNodeProperties.x=o.x),void 0===e.clusterNodeProperties.y&&(e.clusterNodeProperties.y=o.y),void 0===e.clusterNodeProperties.fixed&&(e.clusterNodeProperties.fixed={},e.clusterNodeProperties.fixed.x=o.options.fixed.x,e.clusterNodeProperties.fixed.y=o.options.fixed.y);var n={},s={},r=o.id,a=h.default.cloneOptions(o);n[r]=o;for(var d=0;d-1&&(s[v.id]=v)}this._cluster(n,s,e,i)}},{key:"_createClusterEdges",value:function(t,e,i,o){for(var n=void 0,s=void 0,r=void 0,a=void 0,d=void 0,l=void 0,u=Object.keys(t),p=[],f=0;f0&&void 0!==arguments[0]?arguments[0]:{};return void 0===t.clusterEdgeProperties&&(t.clusterEdgeProperties={}),void 0===t.clusterNodeProperties&&(t.clusterNodeProperties={}),t}},{key:"_cluster",value:function(t,e,i){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(0!=Object.keys(t).length&&(1!=Object.keys(t).length||1==i.clusterNodeProperties.allowSingleNodeCluster)){for(var n in t)if(t.hasOwnProperty(n)&&void 0!==this.clusteredNodes[n])return;var s=c.deepExtend({},i.clusterNodeProperties);if(void 0!==i.processProperties){var r=[];for(var a in t)if(t.hasOwnProperty(a)){var d=h.default.cloneOptions(t[a]);r.push(d)}var u=[];for(var p in e)if(e.hasOwnProperty(p)&&"clusterEdge:"!==p.substr(0,12)){var f=h.default.cloneOptions(e[p],"edge");u.push(f)}if(s=i.processProperties(s,r,u),!s)throw new Error("The processProperties function does not return properties!")}void 0===s.id&&(s.id="cluster:"+c.randomUUID());var m=s.id;void 0===s.label&&(s.label="cluster");var v=void 0;void 0===s.x&&(v=this._getClusterPosition(t),s.x=v.x),void 0===s.y&&(void 0===v&&(v=this._getClusterPosition(t)),s.y=v.y),s.id=m;var g=this.body.functions.createNode(s,l.default);g.isCluster=!0,g.containedNodes=t,g.containedEdges=e,g.clusterEdgeProperties=i.clusterEdgeProperties,this.body.nodes[s.id]=g,this._createClusterEdges(t,e,s,i.clusterEdgeProperties);for(var y in e)if(e.hasOwnProperty(y)&&void 0!==this.body.edges[y]){var b=this.body.edges[y];this._backupEdgeOptions(b),b.setOptions({physics:!1,hidden:!0})}for(var _ in t)t.hasOwnProperty(_)&&(this.clusteredNodes[_]={clusterId:s.id,node:this.body.nodes[_]},this.body.nodes[_].setOptions({hidden:!0,physics:!1}));s.id=void 0,o===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(t){void 0===this.clusteredEdges[t.id]&&(this.clusteredEdges[t.id]={physics:t.options.physics,hidden:t.options.hidden})}},{key:"_restoreEdge",value:function(t){var e=this.clusteredEdges[t.id];void 0!==e&&(t.setOptions({physics:e.physics,hidden:e.hidden}),delete this.clusteredEdges[t.id])}},{key:"isCluster",value:function(t){return void 0!==this.body.nodes[t]?this.body.nodes[t].isCluster===!0:(console.log("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(t){for(var e=Object.keys(t),i=t[e[0]].x,o=t[e[0]].x,n=t[e[0]].y,s=t[e[0]].y,r=void 0,a=1;ao?r.x:o,n=r.ys?r.y:s;return{x:.5*(i+o),y:.5*(n+s)}}},{key:"openCluster",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(void 0===t)throw new Error("No clusterNodeId supplied to openCluster.");if(void 0===this.body.nodes[t])throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(void 0===this.body.nodes[t].containedNodes)return void console.log("The node:"+t+" is not a cluster.");var o=this.body.nodes[t],n=o.containedNodes,s=o.containedEdges;if(void 0!==e&&void 0!==e.releaseFunction&&"function"==typeof e.releaseFunction){var r={},a={x:o.x,y:o.y};for(var d in n)if(n.hasOwnProperty(d)){var l=this.body.nodes[d];r[d]={x:l.x,y:l.y}}var u=e.releaseFunction(a,r);for(var p in n)if(n.hasOwnProperty(p)){var f=this.body.nodes[p];void 0!==u[p]&&(f.x=void 0===u[p].x?o.x:u[p].x,f.y=void 0===u[p].y?o.y:u[p].y)}}else for(var m in n)if(n.hasOwnProperty(m)){var v=this.body.nodes[m];v=n[m],v.options.fixed.x===!1&&(v.x=o.x),v.options.fixed.y===!1&&(v.y=o.y)}for(var g in n)if(n.hasOwnProperty(g)){var y=this.body.nodes[g];y.vx=o.vx,y.vy=o.vy,y.setOptions({hidden:!1,physics:!0}),delete this.clusteredNodes[g]}for(var b=[],_=0;_o&&(o=s.edges.length),t+=s.edges.length, +e+=Math.pow(s.edges.length,2),i+=1}t/=i,e/=i;var r=e-Math.pow(t,2),a=Math.sqrt(r),h=Math.floor(t+2*a);return h>o&&(h=o),h}}]),t}();e.default=u},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:[],o=1e9,n=-1e9,s=1e9,r=-1e9;if(i.length>0)for(var a=0;ae.shape.boundingBox.left&&(s=e.shape.boundingBox.left),re.shape.boundingBox.top&&(o=e.shape.boundingBox.top),n1&&void 0!==arguments[1]?arguments[1]:[],o=1e9,n=-1e9,s=1e9,r=-1e9;if(i.length>0)for(var a=0;ae.x&&(s=e.x),re.y&&(o=e.y),n0,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,t.renderingActive=!1,t.requiresTimeout===!0?clearTimeout(t.renderTimer):cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(t){if(void 0!==t){var e=["hideEdgesOnDrag","hideNodesOnDrag"];s.selectiveDeepExtend(e,this.options,t)}}},{key:"_startRendering",value:function(){this.renderingActive===!0&&void 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.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var t=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this.requiresTimeout===!0?window.setTimeout(function(){t._redraw(!1)},0):window.requestAnimationFrame(function(){t._redraw(!1)}))}},{key:"_redraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.allowRedraw===!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(),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;if(e.clearRect(0,0,i,o),0===this.canvas.frame.clientWidth)return;e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale),e.beginPath(),this.body.emitter.emit("beforeDrawing",e),e.closePath(),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),e.beginPath(),this.body.emitter.emit("afterDrawing",e),e.closePath(),e.restore(),t===!0&&e.clearRect(0,0,i,o)}}},{key:"_resizeNodes",value:function(){var t=this.canvas.frame.canvas.getContext("2d");void 0===this.pixelRatio&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale);var e=this.body.nodes,i=void 0;for(var o in e)e.hasOwnProperty(o)&&(i=e[o],i.resize(t),i.updateBoundingBox(t,i.selected));t.restore()}},{key:"_drawNodes",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.body.nodes,o=this.body.nodeIndices,n=void 0,s=[],r=20,a=this.canvas.DOMtoCanvas({x:-r,y:-r}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+r,y:this.canvas.frame.canvas.clientHeight+r}),d={top:a.y,left:a.x,bottom:h.y,right:h.x},l=0;l0&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/t,this.cameraState.previousHeight=this.frame.canvas.height/t,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/t,y:.5*this.frame.canvas.height/t}))}},{key:"_setCameraState",value:function(){if(void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&this.cameraState.previousWidth>0){var t=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,e=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,i=this.cameraState.scale;1!=t&&1!=e?i=.5*this.cameraState.scale*(t+e):1!=t?i=this.cameraState.scale*t:1!=e&&(i=this.cameraState.scale*e),this.body.view.scale=i;var o=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),n={x:o.x-this.cameraState.position.x,y:o.y-this.cameraState.position.y};this.body.view.translation.x+=n.x*this.body.view.scale,this.body.view.translation.y+=n.y*this.body.view.scale}}},{key:"_prepareValue",value:function(t){if("number"==typeof t)return t+"px";if("string"==typeof t){if(t.indexOf("%")!==-1||t.indexOf("px")!==-1)return t;if(t.indexOf("%")===-1)return t+"px"}throw new Error("Could not use the value supplied for width or height:"+t)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=900,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext){var t=this.frame.canvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.frame.canvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new s(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:s.DIRECTION_ALL}),r.onTouch(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("mousewheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("DOMMouseScroll",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new s(this.frame),r.onRelease(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.height;t=this._prepareValue(t),e=this._prepareValue(e);var i=!1,o=this.frame.canvas.width,n=this.frame.canvas.height,s=this.frame.canvas.getContext("2d"),r=this.pixelRatio;return this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),t!=this.options.width||e!=this.options.height||this.frame.style.width!=t||this.frame.style.height!=e?(this._getCameraState(r),this.frame.style.width=t,this.frame.style.height=e,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=t,this.options.height=e,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},i=!0):(this.frame.canvas.width==Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&this.frame.canvas.height==Math.round(this.frame.canvas.clientHeight*this.pixelRatio)||this._getCameraState(r),this.frame.canvas.width!=Math.round(this.frame.canvas.clientWidth*this.pixelRatio)&&(this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),i=!0),this.frame.canvas.height!=Math.round(this.frame.canvas.clientHeight*this.pixelRatio)&&(this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),i=!0)),i===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(o/this.pixelRatio),oldHeight:Math.round(n/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,i}},{key:"_XconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(t){return(t-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(t){return t*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(t){return{x:this._XconvertCanvasToDOM(t.x),y:this._YconvertCanvasToDOM(t.y)}}},{key:"DOMtoCanvas",value:function(t){return{x:this._XconvertDOMtoCanvas(t.x),y:this._YconvertDOMtoCanvas(t.y)}}}]),t}();e.default=h},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{};this.options=t}},{key:"fit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{nodes:[]},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=void 0,o=void 0;if(void 0!==t.nodes&&0!==t.nodes.length||(t.nodes=this.body.nodeIndices),e===!0){var n=0;for(var s in this.body.nodes)if(this.body.nodes.hasOwnProperty(s)){var r=this.body.nodes[s];r.predefinedPosition===!0&&(n+=1)}if(n>.5*this.body.nodeIndices.length)return void this.fit(t,!1);i=a.default.getRange(this.body.nodes,t.nodes);var h=this.body.nodeIndices.length;o=12.662/(h+7.4147)+.0964822;var d=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600);o*=d}else{this.body.emitter.emit("_resizeNodes"),i=a.default.getRange(this.body.nodes,t.nodes);var l=1.1*Math.abs(i.maxX-i.minX),c=1.1*Math.abs(i.maxY-i.minY),u=this.canvas.frame.canvas.clientWidth/l,p=this.canvas.frame.canvas.clientHeight/c;o=u<=p?u:p}o>1?o=1:0===o&&(o=1);var f=a.default.findCenter(i),m={position:f,scale:o,animation:t.animation};this.moveTo(m)}},{key:"focus",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0!==this.body.nodes[t]){var i={x:this.body.nodes[t].x,y:this.body.nodes[t].y};e.position=i,e.lockedOnNode=t,this.moveTo(e)}else console.log("Node: "+t+" cannot be found.")}},{key:"moveTo",value:function(t){return void 0===t?void(t={}):(void 0===t.offset&&(t.offset={x:0,y:0}),void 0===t.offset.x&&(t.offset.x=0),void 0===t.offset.y&&(t.offset.y=0),void 0===t.scale&&(t.scale=this.body.view.scale),void 0===t.position&&(t.position=this.getViewPosition()),void 0===t.animation&&(t.animation={duration:0}),t.animation===!1&&(t.animation={duration:0}),t.animation===!0&&(t.animation={}),void 0===t.animation.duration&&(t.animation.duration=1e3),void 0===t.animation.easingFunction&&(t.animation.easingFunction="easeInOutQuad"),void this.animateView(t))}},{key:"animateView",value:function(t){if(void 0!==t){this.animationEasingFunction=t.animation.easingFunction,this.releaseNode(),t.locked===!0&&(this.lockedOnNodeId=t.lockedOnNode,this.lockedOnNodeOffset=t.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=t.scale,this.body.view.scale=this.targetScale;var e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.position.x,y:e.y-t.position.y};this.targetTranslation={x:this.sourceTranslation.x+i.x*this.targetScale+t.offset.x,y:this.sourceTranslation.y+i.y*this.targetScale+t.offset.y},0===t.animation.duration?void 0!=this.lockedOnNodeId?(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*t.animation.duration*.001)||1/60,this.animationEasingFunction=t.animation.easingFunction,this.viewFunction=this._transitionRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))}}},{key:"_lockedRedraw",value:function(){var t={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},e=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),i={x:e.x-t.x,y:e.y-t.y},o=this.body.view.translation,n={x:o.x+i.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:o.y+i.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=n}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=t===!0?1:this.easingTime;var e=h.easingFunctions[this.animationEasingFunction](this.easingTime);this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},this.easingTime>=1&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,void 0!=this.lockedOnNodeId&&(this.viewFunction=this._lockedRedraw.bind(this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),t}();e.default=d},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i50&&(this.drag.pointer=this.getPointer(t.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect&&(t.changedPointers[0].ctrlKey||t.changedPointers[0].metaKey);this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e)}},{key:"onDoubleTap",value:function(t){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("doubleClick",t,e)}},{key:"onHold",value:function(t){var e=this.getPointer(t.center),i=this.selectionHandler.options.multiselect;this.checkSelectionChanges(e,t,i),this.selectionHandler._generateClickEvent("click",t,e),this.selectionHandler._generateClickEvent("hold",t,e)}},{key:"onRelease",value:function(t){if((new Date).valueOf()-this.touchTime>10){var e=this.getPointer(t.center);this.selectionHandler._generateClickEvent("release",t,e),this.touchTime=(new Date).valueOf()}}},{key:"onContext",value:function(t){var e=this.getPointer({x:t.clientX,y:t.clientY});this.selectionHandler._generateClickEvent("oncontext",t,e)}},{key:"checkSelectionChanges",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.selectionHandler._getSelectedEdgeCount(),n=this.selectionHandler._getSelectedNodeCount(),s=this.selectionHandler.getSelection(),r=void 0;r=i===!0?this.selectionHandler.selectAdditionalOnPoint(t):this.selectionHandler.selectOnPoint(t);var a=this.selectionHandler._getSelectedEdgeCount(),h=this.selectionHandler._getSelectedNodeCount(),d=this.selectionHandler.getSelection(),l=this._determineIfDifferent(s,d),c=l.nodesChanged,u=l.edgesChanged,p=!1;h-n>0?(this.selectionHandler._generateClickEvent("selectNode",e,t),r=!0,p=!0):c===!0&&h>0?(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),this.selectionHandler._generateClickEvent("selectNode",e,t),p=!0,r=!0):h-n<0&&(this.selectionHandler._generateClickEvent("deselectNode",e,t,s),r=!0),a-o>0&&p===!1?(this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):a>0&&u===!0?(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),this.selectionHandler._generateClickEvent("selectEdge",e,t),r=!0):a-o<0&&(this.selectionHandler._generateClickEvent("deselectEdge",e,t,s),r=!0),r===!0&&this.selectionHandler._generateClickEvent("select",e,t)}},{key:"_determineIfDifferent",value:function(t,e){for(var i=!1,o=!1,n=0;n10&&(t=10);var o=void 0;void 0!==this.drag&&this.drag.dragging===!0&&(o=this.canvas.DOMtoCanvas(this.drag.pointer));var n=this.body.view.translation,s=t/i,r=(1-s)*e.x+n.x*s,a=(1-s)*e.y+n.y*s;if(this.body.view.scale=t,this.body.view.translation={x:r,y:a},void 0!=o){var h=this.canvas.canvasToDOM(o);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),i0&&(this.popupObj=h[c[c.length-1]],s=!0)}if(void 0===this.popupObj&&s===!1){for(var p=this.body.edgeIndices,f=this.body.edges,m=void 0,v=[],g=0;g0&&(this.popupObj=f[v[v.length-1]],r="edge")}void 0!==this.popupObj?this.popupObj.id!==n&&(void 0===this.popup&&(this.popup=new d.default(this.canvas.frame)),this.popup.popupTargetType=r,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(t.x+3,t.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(t){var e=this.selectionHandler._pointerToPositionObject(t),i=!1;if("node"===this.popup.popupTargetType){if(void 0!==this.body.nodes[this.popup.popupTargetId]&&(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(e),i===!0)){var o=this.selectionHandler.getNodeAt(t);i=o.id===this.popup.popupTargetId}}else void 0===this.selectionHandler.getNodeAt(t)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(e));i===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}();e.default=c},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var t in this.boundFunctions)this.boundFunctions.hasOwnProperty(t)&&(this.body.emitter.off("initRedraw",this.boundFunctions[t]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var t=this.body.view.scale,e=this.body.view.scale*(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,o=e/t,n=(1-o)*this.canvas.canvasViewCenter.x+i.x*o,s=(1-o)*this.canvas.canvasViewCenter.y+i.y*o;this.body.view.scale=e,this.body.view.translation={x:n,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale})}},{key:"_zoomOut",value:function(){var t=this.body.view.scale,e=this.body.view.scale/(1+this.options.keyboard.speed.zoom),i=this.body.view.translation,o=e/t,n=(1-o)*this.canvas.canvasViewCenter.x+i.x*o,s=(1-o)*this.canvas.canvasViewCenter.y+i.y*o;this.body.view.scale=e,this.body.view.translation={x:n,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale})}},{key:"configureKeyboardBindings",value:function(){var t=this;void 0!==this.keycharm&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=a({container:window,preventDefault:!0}):this.keycharm=a({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0&&(this.keycharm.bind("up",function(){t.bindToRedraw("_moveUp")},"keydown"),this.keycharm.bind("down",function(){t.bindToRedraw("_moveDown")},"keydown"),this.keycharm.bind("left",function(){t.bindToRedraw("_moveLeft")},"keydown"),this.keycharm.bind("right",function(){t.bindToRedraw("_moveRight")},"keydown"),this.keycharm.bind("=",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("-",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("[",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("]",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),this.keycharm.bind("pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),this.keycharm.bind("up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),this.keycharm.bind("down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),this.keycharm.bind("left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),this.keycharm.bind("right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),this.keycharm.bind("=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),this.keycharm.bind("]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),this.keycharm.bind("pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),t}();e.default=h},function(t,e){function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;io&&(s=o-e-this.padding),sn&&(r=n-i-this.padding),r4&&void 0!==arguments[4]&&arguments[4],s=void 0;s=n===!0?{nodes:[],edges:[]}:this.getSelection(),s.pointer={DOM:{x:i.x,y:i.y},canvas:this.canvas.DOMtoCanvas(i)},s.event=e,void 0!==o&&(s.previousSelection=o),this.body.emitter.emit(t,s)}},{key:"selectObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==t&&(t instanceof a.default&&e===!0&&this._selectConnectedEdges(t),t.select(),this._addToSelection(t),!0)}},{key:"deselectObject",value:function(t){t.isSelected()===!0&&(t.selected=!1,this._removeFromSelection(t))}},{key:"_getAllNodesOverlappingWith",value:function(t){for(var e=[],i=this.body.nodes,o=0;o1&&void 0!==arguments[1])||arguments[1],i=this._pointerToPositionObject(t),o=this._getAllNodesOverlappingWith(i);return o.length>0?e===!0?this.body.nodes[o[o.length-1]]:o[o.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(t,e){for(var i=this.body.edges,o=0;o1&&void 0!==arguments[1])||arguments[1],i=this.canvas.DOMtoCanvas(t),o=10,n=null,s=this.body.edges,r=0;r1)return!0;return!1}},{key:"_selectConnectedEdges",value:function(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:{},i=void 0,o=void 0;if(!t||!t.nodes&&!t.edges)throw"Selection must be an object with nodes and/or edges properties";if((e.unselectAll||void 0===e.unselectAll)&&this.unselectAll(),t.nodes)for(i=0;i1&&void 0!==arguments[1])||arguments[1];if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({nodes:t},{highlightEdges:e})}},{key:"selectEdges",value:function(t){if(!t||void 0===t.length)throw"Selection must be an array with ids";this.setSelection({edges:t})}},{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=c},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){n=!0,s=t}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){for(var i=0;i0&&(this.options.hierarchical.levelSeparation*=-1):this.options.hierarchical.levelSeparation<0&&(this.options.hierarchical.levelSeparation*=-1),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(e);if(i===!0)return this.body.emitter.emit("refresh"),l.deepExtend(e,this.optionsBackup)}return e}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(t){if(this.options.hierarchical.enabled===!0){void 0===t.physics||t.physics===!0?(t.physics={enabled:void 0===this.optionsBackup.physics.enabled||this.optionsBackup.physics.enabled,solver:"hierarchicalRepulsion"},this.optionsBackup.physics.enabled=void 0===this.optionsBackup.physics.enabled||this.optionsBackup.physics.enabled,this.optionsBackup.physics.solver=this.optionsBackup.physics.solver||"barnesHut"):"object"===r(t.physics)?(this.optionsBackup.physics.enabled=void 0===t.physics.enabled||t.physics.enabled,this.optionsBackup.physics.solver=t.physics.solver||"barnesHut",t.physics.solver="hierarchicalRepulsion"):t.physics!==!1&&(this.optionsBackup.physics.solver="barnesHut",t.physics={solver:"hierarchicalRepulsion"});var e="horizontal";"RL"!==this.options.hierarchical.direction&&"LR"!==this.options.hierarchical.direction||(e="vertical"),void 0===t.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges={smooth:!1}):void 0===t.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},t.edges.smooth=!1):"boolean"==typeof t.edges.smooth?(this.optionsBackup.edges={smooth:t.edges.smooth},t.edges.smooth={enabled:t.edges.smooth,type:e}):(void 0!==t.edges.smooth.type&&"dynamic"!==t.edges.smooth.type&&(e=t.edges.smooth.type),this.optionsBackup.edges={smooth:void 0===t.edges.smooth.enabled||t.edges.smooth.enabled,type:void 0===t.edges.smooth.type?"dynamic":t.edges.smooth.type,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0!==t.edges.smooth.forceDirection&&t.edges.smooth.forceDirection},t.edges.smooth={enabled:void 0===t.edges.smooth.enabled||t.edges.smooth.enabled,type:e,roundness:void 0===t.edges.smooth.roundness?.5:t.edges.smooth.roundness,forceDirection:void 0!==t.edges.smooth.forceDirection&&t.edges.smooth.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",e)}return t}},{key:"seededRandom",value:function(){var t=1e4*Math.sin(this.randomSeed++);return t-Math.floor(t)}},{key:"positionInitially",value:function(t){if(this.options.hierarchical.enabled!==!0){this.randomSeed=this.initialRandomSeed;for(var e=0;es){for(var r=this.body.nodeIndices.length;this.body.nodeIndices.length>s;){n+=1;var a=this.body.nodeIndices.length;n%3===0?this.body.modules.clustering.clusterBridges():this.body.modules.clustering.clusterOutliers();var h=this.body.nodeIndices.length;if(a==h&&n%3!==0||n>o)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*r)})}this.body.modules.kamadaKawai.solve(this.body.nodeIndices,this.body.edgeIndices,!0),this._shiftToCenter();for(var d=70,l=0;l0){var t=void 0,e=void 0,i=!1,o=!0,n=!1;this.hierarchicalLevels={},this.lastNodeOnLevel={},this.hierarchicalChildrenReference={},this.hierarchicalParentReference={},this.hierarchicalTrees={},this.treeIndex=-1,this.distributionOrdering={},this.distributionIndex={},this.distributionOrderingPresence={};for(e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&(t=this.body.nodes[e],void 0===t.options.x&&void 0===t.options.y&&(o=!1),void 0!==t.options.level?(i=!0,this.hierarchicalLevels[e]=t.options.level):n=!0);if(n===!0&&i===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");n===!0&&("hubsize"===this.options.hierarchical.sortMethod?this._determineLevelsByHubsize():"directed"===this.options.hierarchical.sortMethod?this._determineLevelsDirected():"custom"===this.options.hierarchical.sortMethod&&this._determineLevelsCustomCallback());for(var s in this.body.nodes)this.body.nodes.hasOwnProperty(s)&&void 0===this.hierarchicalLevels[s]&&(this.hierarchicalLevels[s]=0);var r=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(r),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var t=this,e=!1,i={},o=function(){for(var e=a(),i=0;i0)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:1e9,o=1e9,n=1e9,r=1e9,a=-1e9;for(var h in e)if(e.hasOwnProperty(h)){var d=t.body.nodes[h],l=t.hierarchicalLevels[d.id],c=t._getPositionForHierarchy(d),u=t._getSpaceAroundNode(d,e),p=s(u,2),f=p[0],m=p[1];o=Math.min(f,o),n=Math.min(m,n),l<=i&&(r=Math.min(c,r),a=Math.max(c,a))}return[r,a,o,n]},l=function e(i){var o=t.hierarchicalLevels[i];if(t.hierarchicalChildrenReference[i]){var n=t.hierarchicalChildrenReference[i];if(n.length>0)for(var s=0;s1)for(var a=0;a2&&void 0!==arguments[2]&&arguments[2],r=t._getPositionForHierarchy(i),a=t._getPositionForHierarchy(o),l=Math.abs(a-r);if(l>t.options.hierarchical.nodeSpacing){var u={};u[i.id]=!0;var p={};p[o.id]=!0,h(i,u),h(o,p);var f=c(i,o),m=d(u,f),v=s(m,4),g=(v[0],v[1]),y=(v[2],v[3],d(p,f)),b=s(y,4),_=b[0],w=(b[1],b[2]),x=(b[3],Math.abs(g-_));if(x>t.options.hierarchical.nodeSpacing){var k=g-_+t.options.hierarchical.nodeSpacing;k<-w+t.options.hierarchical.nodeSpacing&&(k=-w+t.options.hierarchical.nodeSpacing),k<0&&(t._shiftBlock(o.id,k),e=!0,n===!0&&t._centerParent(o))}}},m=function(o,n){for(var r=n.id,a=n.edges,l=t.hierarchicalLevels[n.id],c=t.options.hierarchical.levelSeparation*t.options.hierarchical.levelSeparation,u={},p=[],f=0;f0?m=Math.min(f,p-t.options.hierarchical.nodeSpacing):f<0&&(m=-Math.min(-f,u-t.options.hierarchical.nodeSpacing)),0!=m&&(t._shiftBlock(n.id,m),e=!0)},w=function(i){var o=t._getPositionForHierarchy(n),r=t._getSpaceAroundNode(n),a=s(r,2),h=a[0],d=a[1],l=i-o,c=o;l>0?c=Math.min(o+(d-t.options.hierarchical.nodeSpacing),i):l<0&&(c=Math.max(o-(h-t.options.hierarchical.nodeSpacing),i)),c!==o&&(t._setPositionForHierarchy(n,c,void 0,!0),e=!0)},x=b(o,p);_(x),x=b(o,a),w(x)},v=function(i){var o=Object.keys(t.distributionOrdering);o=o.reverse();for(var n=0;n0)for(var d=0;d0&&Math.abs(g)0&&(r=this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing),this._setPositionForHierarchy(s,r,e),this._validataPositionAndContinue(s,e,r),o++}}}}},{key:"_placeBranchNodes",value:function(t,e){if(void 0!==this.hierarchicalChildrenReference[t]){for(var i=[],o=0;oe&&void 0===this.positionedNodes[s.id]))return;var a=void 0;a=0===n?this._getPositionForHierarchy(this.body.nodes[t]):this._getPositionForHierarchy(i[n-1])+this.options.hierarchical.nodeSpacing,this._setPositionForHierarchy(s,a,r),this._validataPositionAndContinue(s,r,a)}for(var h=1e9,d=-1e9,l=0;l0&&(e=this._getHubSize(),0!==e);)for(var o in this.body.nodes)if(this.body.nodes.hasOwnProperty(o)){var n=this.body.nodes[o];n.edges.length===e&&this._crawlNetwork(i,o)}}},{key:"_determineLevelsCustomCallback",value:function(){var t=this,e=1e5,i=function(t,e,i){},o=function(o,n,s){var r=t.hierarchicalLevels[o.id];void 0===r&&(t.hierarchicalLevels[o.id]=e);var a=i(d.default.cloneOptions(o,"node"),d.default.cloneOptions(n,"node"),d.default.cloneOptions(s,"edge"));t.hierarchicalLevels[n.id]=t.hierarchicalLevels[o.id]+a};this._crawlNetwork(o),this._setMinLevelToZero()}},{key:"_determineLevelsDirected",value:function(){var t=this,e=1e4,i=function(i,o,n){var s=t.hierarchicalLevels[i.id];void 0===s&&(t.hierarchicalLevels[i.id]=e),n.toId==o.id?t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]+1:t.hierarchicalLevels[o.id]=t.hierarchicalLevels[i.id]-1};this._crawlNetwork(i),this._setMinLevelToZero()}},{key:"_setMinLevelToZero",value:function(){var t=1e9;for(var e in this.body.nodes)this.body.nodes.hasOwnProperty(e)&&void 0!==this.hierarchicalLevels[e]&&(t=Math.min(this.hierarchicalLevels[e],t));for(var i in this.body.nodes)this.body.nodes.hasOwnProperty(i)&&void 0!==this.hierarchicalLevels[i]&&(this.hierarchicalLevels[i]-=t)}},{key:"_generateMap",value:function(){var t=this,e=function(e,i){if(t.hierarchicalLevels[i.id]>t.hierarchicalLevels[e.id]){var o=e.id,n=i.id;void 0===t.hierarchicalChildrenReference[o]&&(t.hierarchicalChildrenReference[o]=[]),t.hierarchicalChildrenReference[o].push(n),void 0===t.hierarchicalParentReference[n]&&(t.hierarchicalParentReference[n]=[]),t.hierarchicalParentReference[n].push(o)}};this._crawlNetwork(e)}},{key:"_crawlNetwork",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments[1],o={},n=0,s=function i(n,s){if(void 0===o[n.id]){void 0===t.hierarchicalTrees[n.id]&&(t.hierarchicalTrees[n.id]=s,t.treeIndex=Math.max(s,t.treeIndex)),o[n.id]=!0;for(var r=void 0,a=0;a3&&void 0!==arguments[3]&&arguments[3];o!==!0&&(void 0===this.distributionOrdering[i]&&(this.distributionOrdering[i]=[],this.distributionOrderingPresence[i]={}),void 0===this.distributionOrderingPresence[i][t.id]&&(this.distributionOrdering[i].push(t),this.distributionIndex[t.id]=this.distributionOrdering[i].length-1),this.distributionOrderingPresence[i][t.id]=!0),"UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?t.x=e:t.y=e}},{key:"_getPositionForHierarchy",value:function(t){return"UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?t.x:t.y}},{key:"_sortNodeArray",value:function(t){t.length>1&&("UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction?t.sort(function(t,e){return t.x-e.x}):t.sort(function(t,e){return t.y-e.y}))}}]),t}();e.default=c},function(t,e,i){function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i0&&this.options.deleteNode!==!1?(n===!0&&this._createSeperator(4),this._createDeleteButton(o)):0===t&&this.options.deleteEdge!==!1&&(n===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this)),this._temporaryBindEvent("select",this.showManipulatorToolbar.bind(this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.addDescription||this.options.locales.en.addDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindEvent("click",this._performAddNode.bind(this))}},{key:"editNode",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var e=this.selectionHandler._getSelectedNode();if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(e.isCluster!==!0){var i=s.deepExtend({},e.options,!1);if(i.x=e.x,i.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(i,function(e){null!==e&&void 0!==e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.edgeDescription||this.options.locales.en.edgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this._temporaryBindUI("onTouch",this._handleConnect.bind(this)),this._temporaryBindUI("onDragEnd",this._finishConnect.bind(this)),this._temporaryBindUI("onDrag",this._dragControlNode.bind(this)),this._temporaryBindUI("onRelease",this._finishConnect.bind(this)),this._temporaryBindUI("onDragStart",function(){}),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var t=this;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",this.guiEnabled===!0){var e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindHammerToDiv(this.closeDiv,this.toggleEditMode.bind(this))}this.edgeBeingEditedId=this.selectionHandler.getSelectedEdges()[0],void 0!==this.edgeBeingEditedId?!function(){var e=t.body.edges[t.edgeBeingEditedId],i=t._getNewTargetNode(e.from.x,e.from.y),o=t._getNewTargetNode(e.to.x,e.to.y);t.temporaryIds.nodes.push(i.id),t.temporaryIds.nodes.push(o.id),t.body.nodes[i.id]=i,t.body.nodeIndices.push(i.id),t.body.nodes[o.id]=o,t.body.nodeIndices.push(o.id),t._temporaryBindUI("onTouch",t._controlNodeTouch.bind(t)),t._temporaryBindUI("onTap",function(){}),t._temporaryBindUI("onHold",function(){}),t._temporaryBindUI("onDragStart",t._controlNodeDragStart.bind(t)),t._temporaryBindUI("onDrag",t._controlNodeDrag.bind(t)),t._temporaryBindUI("onDragEnd",t._controlNodeDragEnd.bind(t)),t._temporaryBindUI("onMouseMove",function(){}),t._temporaryBindEvent("beforeDrawing",function(t){var n=e.edgeType.findBorderPositions(t);i.selected===!1&&(i.x=n.from.x,i.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),t.body.emitter.emit("_redraw")}():this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var e=this.selectionHandler.getSelectedNodes(),i=this.selectionHandler.getSelectedEdges(),o=void 0;if(e.length>0){for(var n=0;n0&&"function"==typeof this.options.deleteEdge&&(o=this.options.deleteEdge);if("function"==typeof o){var s={nodes:e,edges:i};if(2!==o.length)throw new Error("The function for delete does not support two arguments (data, callback)");o(s,function(e){null!==e&&void 0!==e&&"delete"===t.inMode?(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()):(t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().remove(i),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("div"),this.closeDiv.className="vis-close",this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(t,e){var i=s.deepExtend({},this.options.controlNodeStyle);i.id="targetNode"+s.randomUUID(),i.hidden=!1,i.physics=!1,i.x=t,i.y=e;var o=this.body.functions.createNode(i);return o.shape.boundingBox={left:t,right:t,top:e,bottom:e},o}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},s.recursiveDOMDelete(this.editModeDiv);var t=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-button vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindHammerToDiv(e,this.toggleEditMode.bind(this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(s.recursiveDOMDelete(this.editModeDiv),s.recursiveDOMDelete(this.manipulationDiv),this._cleanManipulatorHammers()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanManipulatorHammers",value:function(){if(0!=this.manipulationHammers.length){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+t]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+t].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+t])}},{key:"_createAddNodeButton",value:function(t){var e=this._createButton("addNode","vis-button vis-add",t.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addNodeMode.bind(this))}},{key:"_createAddEdgeButton",value:function(t){var e=this._createButton("addEdge","vis-button vis-connect",t.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.addEdgeMode.bind(this))}},{key:"_createEditNodeButton",value:function(t){var e=this._createButton("editNode","vis-button vis-edit",t.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editNode.bind(this))}},{key:"_createEditEdgeButton",value:function(t){var e=this._createButton("editEdge","vis-button vis-edit",t.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.editEdgeMode.bind(this))}},{key:"_createDeleteButton",value:function(t){if(this.options.rtl)var e="vis-button vis-delete-rtl";else var e="vis-button vis-delete";var i=this._createButton("delete",e,t.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindHammerToDiv(i,this.deleteSelected.bind(this))}},{key:"_createBackButton",value:function(t){var e=this._createButton("back","vis-button vis-back",t.back||this.options.locales.en.back);this.manipulationDiv.appendChild(e),this._bindHammerToDiv(e,this.showManipulatorToolbar.bind(this))}},{key:"_createButton",value:function(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[t+"Div"]=document.createElement("div"),this.manipulationDOM[t+"Div"].className=e,this.manipulationDOM[t+"Label"]=document.createElement("div"),this.manipulationDOM[t+"Label"].className=o,this.manipulationDOM[t+"Label"].innerHTML=i,this.manipulationDOM[t+"Div"].appendChild(this.manipulationDOM[t+"Label"]),this.manipulationDOM[t+"Div"]}},{key:"_createDescription",value:function(t){this.manipulationDiv.appendChild(this._createButton("description","vis-button vis-none",t))}},{key:"_temporaryBindEvent",value:function(t,e){this.temporaryEventFunctions.push({event:t,boundFunction:e}),this.body.emitter.on(t,e)}},{key:"_temporaryBindUI",value:function(t,e){if(void 0===this.body.eventListeners[t])throw new Error("This UI function does not exist. Typo? You tried: "+t+" possible are: "+JSON.stringify(Object.keys(this.body.eventListeners)));this.temporaryUIFunctions[t]=this.body.eventListeners[t],this.body.eventListeners[t]=e}},{key:"_unbindTemporaryUIs",value:function(){for(var t in this.temporaryUIFunctions)this.temporaryUIFunctions.hasOwnProperty(t)&&(this.body.eventListeners[t]=this.temporaryUIFunctions[t],delete this.temporaryUIFunctions[t]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var t=0;t=0;r--)if(n[r]!==this.selectedControlNode.id){s=this.body.nodes[n[r]];break}if(void 0!==s&&void 0!==this.selectedControlNode)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(s.id,o.to.id):this._performEditEdge(o.from.id,s.id)}else o.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(t){if((new Date).valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(t.center),this.lastTouch.translation=s.extend({},this.body.view.translation);var e=this.lastTouch,i=this.selectionHandler.getNodeAt(e);if(void 0!==i)if(i.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var o=this._getNewTargetNode(i.x,i.y);this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id);var n=this.body.functions.createEdge({id:"connectionEdge"+s.randomUUID(),from:i.id,to:o.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[n.id]=n,this.body.edgeIndices.push(n.id),this.temporaryIds.nodes.push(o.id),this.temporaryIds.edges.push(n.id)}this.touchTime=(new Date).valueOf()}}},{key:"_dragControlNode",value:function(t){var e=this.body.functions.getPointer(t.center);if(void 0!==this.temporaryIds.nodes[0]){var i=this.body.nodes[this.temporaryIds.nodes[0]];i.x=this.canvas._XconvertDOMtoCanvas(e.x),i.y=this.canvas._YconvertDOMtoCanvas(e.y),this.body.emitter.emit("_redraw")}else{var o=e.x-this.lastTouch.x,n=e.y-this.lastTouch.y;this.body.view.translation={x:this.lastTouch.translation.x+o,y:this.lastTouch.translation.y+n}}}},{key:"_finishConnect",value:function(t){var e=this.body.functions.getPointer(t.center),i=this.selectionHandler._pointerToPositionObject(e),o=void 0;void 0!==this.temporaryIds.edges[0]&&(o=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var n=this.selectionHandler._getAllNodesOverlappingWith(i),s=void 0,r=n.length-1;r>=0;r--)if(this.temporaryIds.nodes.indexOf(n[r])===-1){s=this.body.nodes[n[r]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==s&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[o]&&void 0!==this.body.nodes[s.id]&&this._performAddEdge(o,s.id)),this.body.emitter.emit("_redraw")}},{key:"_performAddNode",value:function(t){var e=this,i={id:s.randomUUID(),x:t.pointer.canvas.x,y:t.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(i,function(t){null!==t&&void 0!==t&&"addNode"===e.inMode&&(e.body.data.nodes.getDataSet().add(t),e.showManipulatorToolbar())})}else this.body.data.nodes.getDataSet().add(i),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(t,e){var i=this,o={from:t,to:e};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(o,function(t){null!==t&&void 0!==t&&"addEdge"===i.inMode&&(i.body.data.edges.getDataSet().add(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(t,e){var i=this,o={id:this.edgeBeingEditedId,from:t,to:e};if("function"==typeof this.options.editEdge){if(2!==this.options.editEdge.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editEdge(o,function(t){null===t||void 0===t||"editEdge"!==i.inMode?(i.body.edges[o.id].updateEdgeType(),i.body.emitter.emit("_redraw")):(i.body.data.edges.getDataSet().update(t),i.selectionHandler.unselectAll(),i.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),t}();e.default=h},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var i="string",o="boolean",n="number",s="array",r="object",a="dom",h="any",d={configure:{enabled:{boolean:o},filter:{boolean:o,string:i,array:s,function:"function"},container:{dom:a},showButton:{boolean:o},__type__:{object:r,boolean:o,string:i,array:s,function:"function"}},edges:{arrows:{to:{enabled:{boolean:o},scaleFactor:{number:n},type:{string:["arrow","circle"]},__type__:{object:r,boolean:o}},middle:{enabled:{boolean:o},scaleFactor:{number:n},type:{string:["arrow","circle"]},__type__:{object:r,boolean:o}},from:{enabled:{boolean:o},scaleFactor:{number:n},type:{string:["arrow","circle"]},__type__:{object:r,boolean:o}},__type__:{string:["from","to","middle"],object:r}},arrowStrikethrough:{boolean:o},color:{color:{string:i},highlight:{string:i},hover:{string:i},inherit:{string:["from","to","both"],boolean:o},opacity:{number:n},__type__:{object:r,string:i}},dashes:{boolean:o,array:s},font:{color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},align:{string:["horizontal","top","middle","bottom"]},__type__:{object:r,string:i}},hidden:{boolean:o},hoverWidth:{function:"function",number:n},label:{string:i,undefined:"undefined"},labelHighlightBold:{boolean:o},length:{number:n,undefined:"undefined"},physics:{boolean:o},scaling:{min:{number:n},max:{number:n},label:{enabled:{boolean:o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,boolean:o}},customScalingFunction:{function:"function"},__type__:{object:r}},selectionWidth:{function:"function",number:n},selfReferenceSize:{number:n},shadow:{enabled:{boolean:o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,boolean:o}},smooth:{enabled:{boolean:o},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:n},forceDirection:{string:["horizontal","vertical","none"],boolean:o},__type__:{object:r,boolean:o}},title:{string:i,undefined:"undefined"},width:{number:n},value:{number:n,undefined:"undefined"},__type__:{object:r}},groups:{useDefaultGroups:{boolean:o},__any__:"get from nodes, will be overwritten below", +__type__:{object:r}},interaction:{dragNodes:{boolean:o},dragView:{boolean:o},hideEdgesOnDrag:{boolean:o},hideNodesOnDrag:{boolean:o},hover:{boolean:o},keyboard:{enabled:{boolean:o},speed:{x:{number:n},y:{number:n},zoom:{number:n},__type__:{object:r}},bindToWindow:{boolean:o},__type__:{object:r,boolean:o}},multiselect:{boolean:o},navigationButtons:{boolean:o},selectable:{boolean:o},selectConnectedEdges:{boolean:o},hoverConnectedEdges:{boolean:o},tooltipDelay:{number:n},zoomView:{boolean:o},__type__:{object:r}},layout:{randomSeed:{undefined:"undefined",number:n},improvedLayout:{boolean:o},hierarchical:{enabled:{boolean:o},levelSeparation:{number:n},nodeSpacing:{number:n},treeSpacing:{number:n},blockShifting:{boolean:o},edgeMinimization:{boolean:o},parentCentralization:{boolean:o},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},__type__:{object:r,boolean:o}},__type__:{object:r}},manipulation:{enabled:{boolean:o},initiallyActive:{boolean:o},addNode:{boolean:o,function:"function"},addEdge:{boolean:o,function:"function"},editNode:{function:"function"},editEdge:{boolean:o,function:"function"},deleteNode:{boolean:o,function:"function"},deleteEdge:{boolean:o,function:"function"},controlNodeStyle:"get from nodes, will be overwritten below",__type__:{object:r,boolean:o}},nodes:{borderWidth:{number:n},borderWidthSelected:{number:n,undefined:"undefined"},brokenImage:{string:i,undefined:"undefined"},color:{border:{string:i},background:{string:i},highlight:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},hover:{border:{string:i},background:{string:i},__type__:{object:r,string:i}},__type__:{object:r,string:i}},fixed:{x:{boolean:o},y:{boolean:o},__type__:{object:r,boolean:o}},font:{align:{string:i},color:{string:i},size:{number:n},face:{string:i},background:{string:i},strokeWidth:{number:n},strokeColor:{string:i},__type__:{object:r,string:i}},group:{string:i,number:n,undefined:"undefined"},hidden:{boolean:o},icon:{face:{string:i},code:{string:i},size:{number:n},color:{string:i},__type__:{object:r}},id:{string:i,number:n},image:{string:i,undefined:"undefined"},label:{string:i,undefined:"undefined"},labelHighlightBold:{boolean:o},level:{number:n,undefined:"undefined"},mass:{number:n},physics:{boolean:o},scaling:{min:{number:n},max:{number:n},label:{enabled:{boolean:o},min:{number:n},max:{number:n},maxVisible:{number:n},drawThreshold:{number:n},__type__:{object:r,boolean:o}},customScalingFunction:{function:"function"},__type__:{object:r}},shadow:{enabled:{boolean:o},color:{string:i},size:{number:n},x:{number:n},y:{number:n},__type__:{object:r,boolean:o}},shape:{string:["ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon"]},shapeProperties:{borderDashes:{boolean:o,array:s},borderRadius:{number:n},interpolation:{boolean:o},useImageSize:{boolean:o},useBorderWithImage:{boolean:o},__type__:{object:r}},size:{number:n},title:{string:i,undefined:"undefined"},value:{number:n,undefined:"undefined"},x:{number:n},y:{number:n},__type__:{object:r}},physics:{enabled:{boolean:o},barnesHut:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},forceAtlas2Based:{gravitationalConstant:{number:n},centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},damping:{number:n},avoidOverlap:{number:n},__type__:{object:r}},repulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},hierarchicalRepulsion:{centralGravity:{number:n},springLength:{number:n},springConstant:{number:n},nodeDistance:{number:n},damping:{number:n},__type__:{object:r}},maxVelocity:{number:n},minVelocity:{number:n},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:o},iterations:{number:n},updateInterval:{number:n},onlyDynamicEdges:{boolean:o},fit:{boolean:o},__type__:{object:r,boolean:o}},timestep:{number:n},adaptiveTimestep:{boolean:o},__type__:{object:r,boolean:o}},autoResize:{boolean:o},clickToUse:{boolean:o},locale:{string:i},locales:{__any__:{any:h},__type__:{object:r}},height:{string:i},width:{string:i},__type__:{object:r}};d.groups.__any__=d.nodes,d.manipulation.controlNodeStyle=d.nodes;var l={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.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,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01]}};e.allOptions=d,e.configureOptions=l},function(t,e,i){function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){var i=[],o=!0,n=!1,s=void 0;try{for(var r,a=t[Symbol.iterator]();!(o=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);o=!0);}catch(t){n=!0,s=t}finally{try{!o&&a.return&&a.return()}finally{if(n)throw s}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]&&arguments[2],o=this.distanceSolver.getDistances(this.body,t,e);this._createL_matrix(o),this._createK_matrix(o);for(var n=.01,r=1,a=0,h=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),d=5,l=1e9,c=0,u=0,p=0,f=0,m=0;l>n&&ar&&m=.1;)p=n[l++%s],p>d&&(p=d),u=Math.sqrt(p*p/(1+h*h)),u=r<0?-u:u,t+=u,e+=h*u,c===!0?this.lineTo(t,e):this.moveTo(t,e),d-=p,c=!c})},function(t,e){function i(t){return P=t,p()}function o(){I=0,N=P.charAt(0)}function n(){I++,N=P.charAt(I)}function s(){return P.charAt(I+1)}function r(t){return z.test(t)}function a(t,e){if(t||(t={}),e)for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function h(t,e,i){for(var o=e.split("."),n=t;o.length;){var s=o.shift();o.length?(n[s]||(n[s]={}),n=n[s]):n[s]=i}}function d(t,e){for(var i,o,n=null,s=[t],r=t;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,o=r.nodes.length;i=0;i--){var h=s[i];h.nodes||(h.nodes=[]),h.nodes.indexOf(n)===-1&&h.nodes.push(n)}e.attr&&(n.attr=a(n.attr,e.attr))}function l(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var i=a({},t.edge);e.attr=a(i,e.attr)}}function c(t,e,i,o,n){var s={from:e,to:i,type:o};return t.edge&&(s.attr=a({},t.edge)),s.attr=a(s.attr||{},n),s}function u(){for(L=E.NULL,R="";" "===N||"\t"===N||"\n"===N||"\r"===N;)n();do{var t=!1;if("#"===N){for(var e=I-1;" "===P.charAt(e)||"\t"===P.charAt(e);)e--;if("\n"===P.charAt(e)||""===P.charAt(e)){for(;""!=N&&"\n"!=N;)n();t=!0}}if("/"===N&&"/"===s()){for(;""!=N&&"\n"!=N;)n();t=!0}if("/"===N&&"*"===s()){for(;""!=N;){if("*"===N&&"/"===s()){n(),n();break}n()}t=!0}for(;" "===N||"\t"===N||"\n"===N||"\r"===N;)n()}while(t);if(""===N)return void(L=E.DELIMITER);var i=N+s();if(M[i])return L=E.DELIMITER,R=i,n(),void n();if(M[N])return L=E.DELIMITER,R=N,void n();if(r(N)||"-"===N){for(R+=N,n();r(N);)R+=N,n();return"false"===R?R=!1:"true"===R?R=!0:isNaN(Number(R))||(R=Number(R)),void(L=E.IDENTIFIER)}if('"'===N){for(n();""!=N&&('"'!=N||'"'===N&&'"'===s());)R+=N,'"'===N&&n(),n();if('"'!=N)throw w('End of string " expected');return n(),void(L=E.IDENTIFIER)}for(L=E.UNKNOWN;""!=N;)R+=N,n();throw new SyntaxError('Syntax error in part "'+x(R,30)+'"')}function p(){var t={};if(o(),u(),"strict"===R&&(t.strict=!0,u()),"graph"!==R&&"digraph"!==R||(t.type=R,u()),L===E.IDENTIFIER&&(t.id=R,u()),"{"!=R)throw w("Angle bracket { expected");if(u(),f(t),"}"!=R)throw w("Angle bracket } expected");if(u(),""!==R)throw w("End of file expected");return u(),delete t.node,delete t.edge,delete t.graph,t}function f(t){for(;""!==R&&"}"!=R;)m(t),";"===R&&u()}function m(t){var e=v(t);if(e)return void b(t,e);var i=g(t);if(!i){if(L!=E.IDENTIFIER)throw w("Identifier expected");var o=R;if(u(),"="===R){if(u(),L!=E.IDENTIFIER)throw w("Identifier expected");t[o]=R,u()}else y(t,o)}}function v(t){var e=null;if("subgraph"===R&&(e={},e.type="subgraph",u(),L===E.IDENTIFIER&&(e.id=R,u())),"{"===R){if(u(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,f(e),"}"!=R)throw w("Angle bracket } expected");u(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function g(t){return"node"===R?(u(),t.node=_(),"node"):"edge"===R?(u(),t.edge=_(),"edge"):"graph"===R?(u(),t.graph=_(),"graph"):null}function y(t,e){var i={id:e},o=_();o&&(i.attr=o),d(t,i),b(t,e)}function b(t,e){for(;"->"===R||"--"===R;){var i,o=R;u();var n=v(t);if(n)i=n;else{if(L!=E.IDENTIFIER)throw w("Identifier or subgraph expected");i=R,d(t,{id:i}),u()}var s=_(),r=c(t,e,i,o,s);l(t,r),e=i}}function _(){for(var t=null;"["===R;){for(u(),t={};""!==R&&"]"!=R;){if(L!=E.IDENTIFIER)throw w("Attribute name expected");var e=R;if(u(),"="!=R)throw w("Equal sign = expected");if(u(),L!=E.IDENTIFIER)throw w("Attribute value expected");var i=R;h(t,e,i),u(),","==R&&u()}if("]"!=R)throw w("Bracket ] expected");u()}return t}function w(t){return new SyntaxError(t+', got "'+x(R,30)+'" (char '+I+")")}function x(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function k(t,e,i){Array.isArray(t)?t.forEach(function(t){Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}):Array.isArray(e)?e.forEach(function(e){i(t,e)}):i(t,e)}function O(t,e,i){for(var o=e.split("."),n=o.pop(),s=t,r=0;r":!0,"--":!0},P="",I=0,N="",R="",L=E.NULL,z=/[a-zA-Z_0-9.:#]/;e.parseDOT=i,e.DOTToGraph=S},function(t,e){function i(t,e){var i=[],o=[],n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==e&&(void 0!==e.fixed&&(n.nodes.fixed=e.fixed),void 0!==e.parseColor&&(n.nodes.parseColor=e.parseColor),void 0!==e.inheritColor&&(n.edges.inheritColor=e.inheritColor));for(var s=t.edges,r=t.nodes,a=0;aDownload
  • Showcase
  • Contribute
  • +
  • Feature requests
  • License