diff --git a/project.clj b/project.clj index ea50701..3e74e8e 100644 --- a/project.clj +++ b/project.clj @@ -16,7 +16,7 @@ commons-codec]] [ring/ring-json "0.4.0"] [hiccup "1.0.5"] - [joshavg/formulare "0.4.0"] + [joshavg/formulare "0.5.0-SNAPSHOT"] ;; neo4j [gorillalabs/neo4j-clj "2.0.1" diff --git a/resources/app/stylesheets/app.less b/resources/app/stylesheets/app.less index 1e57390..57d8f16 100644 --- a/resources/app/stylesheets/app.less +++ b/resources/app/stylesheets/app.less @@ -1,5 +1,6 @@ -@ci-blue: Highlight; +@ci-highlight: Highlight; @error-color: #e00; +@warn-color: #eebc00; @accent-color: #efefef; @body-background-color: #fcfcfc; @background-color: #eee; @@ -40,7 +41,7 @@ h1 { h2 { font-size: 1.3rem; - border-bottom: 1px solid @ci-blue; + border-bottom: 1px solid @ci-highlight; } em { @@ -57,7 +58,7 @@ img, svg { } .__icon { - color: @ci-blue; + color: @ci-highlight; font-weight: bold; } @@ -83,7 +84,7 @@ img, svg { background-position: right; background-origin: content-box; background-repeat: no-repeat; - border-bottom: 1px solid @ci-blue; + border-bottom: 1px solid @ci-highlight; .app-title { grid-column: 1; @@ -114,7 +115,7 @@ img, svg { h2::before { content: "▤ "; - color: @ci-blue; + color: @ci-highlight; } h2 { @@ -194,37 +195,45 @@ form { } } - .flash--error { - .flash; - border-color: @error-color; - - .flash__heading--error { - margin: 0; - background-color: @error-color; - color: white; - margin-top: -.7rem; - margin-left: -.7rem; - margin-right: -.7rem; - } + .delete-btn.__on-countdown { + font-weight: bold; } +} - .flash { - grid-column: 1 e("/") 3; - .thin-border; - border-left-width: @accent-border-width; - padding: .7rem; +.flash { + grid-column: 1 e("/") 3; + .thin-border; + border-left-width: @accent-border-width; + padding: .7rem; - .flash__field { - font-style: italic; - } + .flash__field { + font-style: italic; + } - .flash__pred { - font-family: monospace; - } + .flash__pred { + font-family: monospace; + } +} + +.flash--error { + .flash; + border-color: @error-color; + + .flash__heading--error { + background-color: @error-color; + color: white; + margin: -.7rem -.7rem 0; } +} - .delete-btn.__on-countdown { - font-weight: bold; +.flash--warn { + .flash; + border-color: @warn-color; + + .flash__heading--error { + background-color: @warn-color; + color: white; + margin: -.7rem -.7rem 0; } } @@ -325,7 +334,12 @@ table { .single-tag { border: 1px solid @ci-color; - border-left: .5rem solid @ci-blue; + border-left: .5rem solid @ci-highlight; border-radius: .5rem; padding: .1rem .4rem; } + +.vis-canvas { + border: 1px solid @ci-highlight; + height: 45rem; +} diff --git a/resources/public/css/img/network/acceptDeleteIcon.png b/resources/public/css/img/network/acceptDeleteIcon.png new file mode 100644 index 0000000..02a0628 Binary files /dev/null and b/resources/public/css/img/network/acceptDeleteIcon.png differ diff --git a/resources/public/css/img/network/addNodeIcon.png b/resources/public/css/img/network/addNodeIcon.png new file mode 100644 index 0000000..6fa3061 Binary files /dev/null and b/resources/public/css/img/network/addNodeIcon.png differ diff --git a/resources/public/css/img/network/backIcon.png b/resources/public/css/img/network/backIcon.png new file mode 100644 index 0000000..e2f9912 Binary files /dev/null and b/resources/public/css/img/network/backIcon.png differ diff --git a/resources/public/css/img/network/connectIcon.png b/resources/public/css/img/network/connectIcon.png new file mode 100644 index 0000000..4164da1 Binary files /dev/null and b/resources/public/css/img/network/connectIcon.png differ diff --git a/resources/public/css/img/network/cross.png b/resources/public/css/img/network/cross.png new file mode 100644 index 0000000..9cbd189 Binary files /dev/null and b/resources/public/css/img/network/cross.png differ diff --git a/resources/public/css/img/network/cross2.png b/resources/public/css/img/network/cross2.png new file mode 100644 index 0000000..9fc4b95 Binary files /dev/null and b/resources/public/css/img/network/cross2.png differ diff --git a/resources/public/css/img/network/deleteIcon.png b/resources/public/css/img/network/deleteIcon.png new file mode 100644 index 0000000..5402564 Binary files /dev/null and b/resources/public/css/img/network/deleteIcon.png differ diff --git a/resources/public/css/img/network/downArrow.png b/resources/public/css/img/network/downArrow.png new file mode 100644 index 0000000..e77d5e6 Binary files /dev/null and b/resources/public/css/img/network/downArrow.png differ diff --git a/resources/public/css/img/network/editIcon.png b/resources/public/css/img/network/editIcon.png new file mode 100644 index 0000000..494d0f0 Binary files /dev/null and b/resources/public/css/img/network/editIcon.png differ diff --git a/resources/public/css/img/network/leftArrow.png b/resources/public/css/img/network/leftArrow.png new file mode 100644 index 0000000..3823536 Binary files /dev/null and b/resources/public/css/img/network/leftArrow.png differ diff --git a/resources/public/css/img/network/minus.png b/resources/public/css/img/network/minus.png new file mode 100644 index 0000000..3069807 Binary files /dev/null and b/resources/public/css/img/network/minus.png differ diff --git a/resources/public/css/img/network/plus.png b/resources/public/css/img/network/plus.png new file mode 100644 index 0000000..f7ab2a3 Binary files /dev/null and b/resources/public/css/img/network/plus.png differ diff --git a/resources/public/css/img/network/rightArrow.png b/resources/public/css/img/network/rightArrow.png new file mode 100644 index 0000000..c3a209d Binary files /dev/null and b/resources/public/css/img/network/rightArrow.png differ diff --git a/resources/public/css/img/network/upArrow.png b/resources/public/css/img/network/upArrow.png new file mode 100644 index 0000000..8aedced Binary files /dev/null and b/resources/public/css/img/network/upArrow.png differ diff --git a/resources/public/css/img/network/zoomExtends.png b/resources/public/css/img/network/zoomExtends.png new file mode 100644 index 0000000..74595c6 Binary files /dev/null and b/resources/public/css/img/network/zoomExtends.png differ diff --git a/resources/public/css/vis-network.min.css b/resources/public/css/vis-network.min.css new file mode 100644 index 0000000..d1d9c36 --- /dev/null +++ b/resources/public/css/vis-network.min.css @@ -0,0 +1 @@ +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,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-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}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}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{box-sizing:content-box;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");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-close:hover{opacity:.6}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:0 0;background-repeat:no-repeat;height:24px;margin-left:10px;cursor:pointer;padding:0 8px 0 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)}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 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{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")}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")}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-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: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,0.30)}div.vis-network div.vis-navigation div.vis-button:active{box-shadow:0 0 1px 3px rgba(56,207,21,0.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}.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:bold}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 white;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:0;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:1px solid white;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:transparent;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:0;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,0.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,0.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-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,0.2);pointer-events:none;z-index:5} diff --git a/resources/public/js/vis-network.min.js b/resources/public/js/vis-network.min.js new file mode 100644 index 0000000..cab6b44 --- /dev/null +++ b/resources/public/js/vis-network.min.js @@ -0,0 +1,26 @@ +/** + * vis - network + * http://visjs.org/ + * + * A dynamic, browser-based visualization library. + * + * @version 5.0.0 + * @date 2019-07-16T20:12:25Z + * + * @copyright (c) 2011-2017 Almende B.V, http://almende.com + * @copyright (c) 2018-2019 visjs contributors, https://github.com/visjs + * + * @license + * vis.js is dual licensed under both + * + * 1. The Apache 2.0 License + * http://www.apache.org/licenses/LICENSE-2.0 + * + * and + * + * 2. The MIT License + * http://opensource.org/licenses/MIT + * + * vis.js may be distributed under either license. + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).vis={})}(this,function(e){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function en(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function t(e,t){return e(t={exports:{}},t.exports),t.exports}function l(e){return(l="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})(e)}function n(t,e){var i=Object.keys(t);return Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(t)),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i}function i(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t>>0,n=0;nMe(e)?(s=e+1,d-Me(e)):(s=e,d),{year:s,dayOfYear:r}}function Ge(e,t,i){var n,o,s=Ve(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return r<1?(o=e.year()-1,n=r+qe(o,t,i)):r>qe(e.year(),t,i)?(n=r-qe(e.year(),t,i),o=e.year()+1):(o=e.year(),n=r),{week:n,year:o}}function qe(e,t,i){var n=Ve(e,t,i),o=Ve(e+1,t,i);return(Me(e)-n+o)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Q),le("ww",Q,Z),le("W",Q),le("WW",Q,Z),ve(["w","ww","W","WW"],function(e,t,i,n){t[n.substr(0,1)]=k(e)});function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,i,n){var o=i._locale.weekdaysParse(e,n,i._strict);null!=o?t.d=o:p(i).invalidWeekday=e}),ve(["d","e","E"],function(e,t,i,n){t[n]=k(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,i){var n,o,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([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"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null}var Je=he;var et=he;var tt=he;function it(){function e(e,t){return t.length-e.length}var t,i,n,o,s,r=[],a=[],h=[],d=[];for(t=0;t<7;t++)i=f([2e3,1]).day(t),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(n),a.push(o),h.push(s),d.push(n),d.push(o),d.push(s);for(r.sort(e),a.sort(e),h.sort(e),d.sort(e),t=0;t<7;t++)a[t]=ce(a[t]),h[t]=ce(h[t]),d[t]=ce(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 nt(){return this.hours()%12||12}function ot(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function st(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,nt),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)}),W("hmmss",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),ot("a",!0),ot("A",!1),F("hour","h"),R("hour",13),le("a",st),le("A",st),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,Z),le("hh",Q,Z),le("kk",Q,Z),le("hmm",J),le("hmmss",ee),le("Hmm",J),le("Hmmss",ee),pe(["H","HH"],_e),pe(["k","kk"],function(e,t,i){var n=k(e);t[_e]=24===n?0:n}),pe(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),pe(["h","hh"],function(e,t,i){t[_e]=k(e),p(i).bigHour=!0}),pe("hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n)),p(i).bigHour=!0}),pe("hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o)),p(i).bigHour=!0}),pe("Hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n))}),pe("Hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o))});var rt,at=Ce("Hours",!0),ht={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d 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"},months:Ye,monthsShort:Re,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:Ke,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},dt={},lt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function ct(e){var t=null;if(!dt[e]&&Ji&&Ji.exports)try{t=rt._abbr;var i=tn;i("./locale/"+e),ft(t)}catch(e){}return dt[e]}function ft(e,t){var i;return e&&((i=s(t)?vt(e):pt(e,t))?rt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function pt(e,t){if(null===t)return delete dt[e],null;var i,n=ht;if(t.abbr=e,null!=dt[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."),n=dt[e]._config;else if(null!=t.parentLocale)if(null!=dt[t.parentLocale])n=dt[t.parentLocale]._config;else{if(null==(i=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;n=i._config}return dt[e]=new C(T(n,t)),lt[e]&<[e].forEach(function(e){pt(e.name,e.config)}),ft(e),dt[e]}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!r(e)){if(t=ct(e))return t;e=[e]}return function(e){var t,i,n,o,s=0;for(;s=t&&x(o,i,!0)>=t-1)break;t--}s++}return rt}(e)}function gt(e){var t,i=e._a;return i&&-2===p(e).overflow&&(t=i[ye]<0||11Ne(i[me],i[ye])?be:i[_e]<0||24qe(i,s,r)?p(e)._overflowWeeks=!0:null!=h?p(e)._overflowWeekday=!0:(a=Ue(i,n,o,s,r),e._a[me]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=mt(e._a[me],n[me]),(e._dayOfYear>Me(s)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),i=We(s,0,e._dayOfYear),e._a[ye]=i.getUTCMonth(),e._a[be]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=n[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[we]&&0===e._a[ke]&&0===e._a[xe]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?We:function(e,t,i,n,o,s,r){var a;e<100&&0<=e?(a=new Date(e+400,t,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,i,n,o,s,r);return a}).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var bt=/^\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)?)?$/,_t=/^\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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["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}/]],xt=[["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/]],St=/^\/?Date\((\-?\d+)/i;function Dt(e){var t,i,n,o,s,r,a=e._i,h=bt.exec(a)||_t.exec(a);if(h){for(p(e).iso=!0,t=0,i=kt.length;ti.valueOf():i.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yi.isLocal=function(){return!!this.isValid()&&!this._isUTC},yi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yi.isUtc=Gt,yi.isUTC=Gt,yi.zoneAbbr=function(){return this._isUTC?"UTC":""},yi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yi.dates=e("dates accessor is deprecated. Use date instead.",ci),yi.months=e("months accessor is deprecated. Use month instead",Ae),yi.years=e("years accessor is deprecated. Use year instead",Te),yi.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),yi.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Pt(e))._a){var t=e._isUTC?f(e._a):Nt(e._a);this._isDSTShifted=this.isValid()&&0>>((3&t)<<3)&255;return i}}(),d=[],u=0;u<256;u++)d[u]=(u+256).toString(16).substr(1);var c=h();c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7];var f=/^\/?Date\((-?\d+)/i,p=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,v=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;function g(e){return e instanceof Number||"number"==typeof e}function m(e){return e instanceof String||"string"==typeof e}function y(e){return"object"===l(e)&&null!==e}function b(e){return s.isMoment(e)}function _(e,t,i,n){var o=!1;!0===n&&(o=null===t[i]&&void 0!==e[i]),o?delete e[i]:e[i]=t[i]}var w=Object.assign;function k(e,t){var i=2>>((3&t)<<3)&255;return i}}(),J=[],ee=0;ee<256;ee++)J[ee]=(ee+256).toString(16).substr(1);var te=Q();te[0],te[1],te[2],te[3],te[4],te[5],te[6],te[7];function ie(e,t,i){var n=0>>0,n=0;nMe(e)?(s=e+1,d-Me(e)):(s=e,d),{year:s,dayOfYear:r}}function Ge(e,t,i){var n,o,s=Ve(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return r<1?(o=e.year()-1,n=r+qe(o,t,i)):r>qe(e.year(),t,i)?(n=r-qe(e.year(),t,i),o=e.year()+1):(o=e.year(),n=r),{week:n,year:o}}function qe(e,t,i){var n=Ve(e,t,i),o=Ve(e+1,t,i);return(Me(e)-n+o)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Q),le("ww",Q,Z),le("W",Q),le("WW",Q,Z),ve(["w","ww","W","WW"],function(e,t,i,n){t[n.substr(0,1)]=k(e)});function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,i,n){var o=i._locale.weekdaysParse(e,n,i._strict);null!=o?t.d=o:p(i).invalidWeekday=e}),ve(["d","e","E"],function(e,t,i,n){t[n]=k(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,i){var n,o,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([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"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null}var Je=he;var et=he;var tt=he;function it(){function e(e,t){return t.length-e.length}var t,i,n,o,s,r=[],a=[],h=[],d=[];for(t=0;t<7;t++)i=f([2e3,1]).day(t),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(n),a.push(o),h.push(s),d.push(n),d.push(o),d.push(s);for(r.sort(e),a.sort(e),h.sort(e),d.sort(e),t=0;t<7;t++)a[t]=ce(a[t]),h[t]=ce(h[t]),d[t]=ce(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 nt(){return this.hours()%12||12}function ot(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function st(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,nt),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)}),W("hmmss",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),ot("a",!0),ot("A",!1),F("hour","h"),R("hour",13),le("a",st),le("A",st),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,Z),le("hh",Q,Z),le("kk",Q,Z),le("hmm",J),le("hmmss",ee),le("Hmm",J),le("Hmmss",ee),pe(["H","HH"],_e),pe(["k","kk"],function(e,t,i){var n=k(e);t[_e]=24===n?0:n}),pe(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),pe(["h","hh"],function(e,t,i){t[_e]=k(e),p(i).bigHour=!0}),pe("hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n)),p(i).bigHour=!0}),pe("hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o)),p(i).bigHour=!0}),pe("Hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n))}),pe("Hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o))});var rt,at=Ce("Hours",!0),ht={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d 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"},months:Ye,monthsShort:Re,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:Ke,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},dt={},lt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function ct(e){var t=null;if(!dt[e]&&Ji&&Ji.exports)try{t=rt._abbr;var i=nn;i("./locale/"+e),ft(t)}catch(e){}return dt[e]}function ft(e,t){var i;return e&&((i=s(t)?vt(e):pt(e,t))?rt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function pt(e,t){if(null===t)return delete dt[e],null;var i,n=ht;if(t.abbr=e,null!=dt[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."),n=dt[e]._config;else if(null!=t.parentLocale)if(null!=dt[t.parentLocale])n=dt[t.parentLocale]._config;else{if(null==(i=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;n=i._config}return dt[e]=new C(T(n,t)),lt[e]&<[e].forEach(function(e){pt(e.name,e.config)}),ft(e),dt[e]}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!r(e)){if(t=ct(e))return t;e=[e]}return function(e){var t,i,n,o,s=0;for(;s=t&&x(o,i,!0)>=t-1)break;t--}s++}return rt}(e)}function gt(e){var t,i=e._a;return i&&-2===p(e).overflow&&(t=i[ye]<0||11Ne(i[me],i[ye])?be:i[_e]<0||24qe(i,s,r)?p(e)._overflowWeeks=!0:null!=h?p(e)._overflowWeekday=!0:(a=Ue(i,n,o,s,r),e._a[me]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=mt(e._a[me],n[me]),(e._dayOfYear>Me(s)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),i=We(s,0,e._dayOfYear),e._a[ye]=i.getUTCMonth(),e._a[be]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=n[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[we]&&0===e._a[ke]&&0===e._a[xe]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?We:function(e,t,i,n,o,s,r){var a;e<100&&0<=e?(a=new Date(e+400,t,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,i,n,o,s,r);return a}).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var bt=/^\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)?)?$/,_t=/^\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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["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}/]],xt=[["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/]],St=/^\/?Date\((\-?\d+)/i;function Dt(e){var t,i,n,o,s,r,a=e._i,h=bt.exec(a)||_t.exec(a);if(h){for(p(e).iso=!0,t=0,i=kt.length;ti.valueOf():i.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yi.isLocal=function(){return!!this.isValid()&&!this._isUTC},yi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yi.isUtc=Gt,yi.isUTC=Gt,yi.zoneAbbr=function(){return this._isUTC?"UTC":""},yi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yi.dates=e("dates accessor is deprecated. Use date instead.",ci),yi.months=e("months accessor is deprecated. Use month instead",Ae),yi.years=e("years accessor is deprecated. Use year instead",Te),yi.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),yi.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Pt(e))._a){var t=e._isUTC?f(e._a):Nt(e._a);this._isDSTShifted=this.isValid()&&0>>((3&t)<<3)&255;return i}}(),de=[],le=0;le<256;le++)de[le]=(le+256).toString(16).substr(1);var ue=he(),ce=(ue[0],ue[1],ue[2],ue[3],ue[4],ue[5],ue[6],ue[7],/^\/?Date\((-?\d+)/i);function fe(e){return e instanceof Number||"number"==typeof e}function pe(e){return e instanceof String||"string"==typeof e}function ve(e){return se.isMoment(e)}function ge(e,t){var i;if(void 0!==e){if(null===e)return null;if(!t)return e;if("string"!=typeof t&&!(t instanceof String))throw new Error("Type must be a string");switch(t){case"boolean":case"Boolean":return Boolean(e);case"number":case"Number":return pe(e)&&!isNaN(Date.parse(e))?se(e).valueOf():Number(e.valueOf());case"string":case"String":return String(e);case"Date":if(fe(e))return new Date(e);if(e instanceof Date)return new Date(e.valueOf());if(ve(e))return new Date(e.valueOf());if(pe(e))return(i=ce.exec(e))?new Date(Number(i[1])):se(new Date(e)).toDate();throw new Error("Cannot convert object of type "+me(e)+" to type Date");case"Moment":if(fe(e))return se(e);if(e instanceof Date)return se(e.valueOf());if(ve(e))return se(e);if(pe(e))return i=ce.exec(e),se(i?Number(i[1]):e);throw new Error("Cannot convert object of type "+me(e)+" to type Date");case"ISODate":if(fe(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(ve(e))return e.toDate().toISOString();if(pe(e))return(i=ce.exec(e))?new Date(Number(i[1])).toISOString():se(e).format();throw new Error("Cannot convert object of type "+me(e)+" to type ISODate");case"ASPDate":if(fe(e))return"/Date("+e+")/";if(e instanceof Date)return"/Date("+e.valueOf()+")/";if(pe(e))return"/Date("+((i=ce.exec(e))?new Date(Number(i[1])).valueOf():new Date(e).valueOf())+")/";throw new Error("Cannot convert object of type "+me(e)+" to type ASPDate");default:throw new Error("Unknown type ".concat(t))}}}function me(e){var t=ne(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}function ye(e){return"string"==typeof e||"number"==typeof e}var be=function(){function r(e){j(this,r),this._queue=[],this._timeout=null,this._extended=null,this.delay=null,this.max=1/0,this.setOptions(e)}return V(r,[{key:"setOptions",value:function(e){e&&void 0!==e.delay&&(this.delay=e.delay),e&&void 0!==e.max&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,i=0;ithis.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),0":!0,"--":!0},Re="",ze=0,Be="",Ae="",Le=Ie.NULL;function He(){ze++,Be=Re.charAt(ze)}function je(){return Re.charAt(ze+1)}var We=/[a-zA-Z_0-9.:#]/;function Ve(e){return We.test(e)}function Ue(e,t){if(e=e||{},t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e}function Ge(e,t,i){for(var n=t.split("."),o=e;n.length;){var s=n.shift();n.length?(o[s]||(o[s]={}),o=o[s]):o[s]=i}}function qe(e,t){for(var i,n,o=null,s=[e],r=e;r.parent;)s.push(r.parent),r=r.parent;if(r.nodes)for(i=0,n=r.nodes.length;i"===Ae||"--"===Ae;){var i,n=Ae;$e();var o=Je(e);if(o)i=o;else{if(Le!=Ie.IDENTIFIER)throw it("Identifier or subgraph expected");qe(e,{id:i=Ae}),$e()}Ze(e,Xe(e,t,i,n,tt())),t=i}}function tt(){for(var e=null,t={dashed:!0,solid:!1,dotted:[1,5]};"["===Ae;){for($e(),e={};""!==Ae&&"]"!=Ae;){if(Le!=Ie.IDENTIFIER)throw it("Attribute name expected");var i=Ae;if($e(),"="!=Ae)throw it("Equal sign = expected");if($e(),Le!=Ie.IDENTIFIER)throw it("Attribute value expected");var n=Ae;"style"===i&&(n=t[n]);if("arrowhead"===i)i="arrows",n={to:{enabled:!0,type:{dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"}[n]}};Ge(e,i,n),$e(),","==Ae&&$e()}if("]"!=Ae)throw it("Bracket ] expected");$e()}return e}function it(e){return new SyntaxError(e+', got "'+nt(Ae,30)+'" (char '+ze+")")}function nt(e,t){return e.length<=t?e:e.substr(0,27)+"..."}function ot(e,t,i){for(var n=t.split("."),o=n.pop(),s=e,r=0;r"===e.type&&(t.arrows="to"),t};t.edges.forEach(function(o){var e,t;e=o.from instanceof Object?o.from.nodes:{id:o.from},t=o.to instanceof Object?o.to.nodes:{id:o.to},o.from instanceof Object&&o.from.edges&&o.from.edges.forEach(function(e){var t=r(e);s.edges.push(t)}),function(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)}(e,t,function(e,t){var i=Xe(s,e.id,t.id,o.type,o.attr),n=r(i);s.edges.push(n)}),o.to instanceof Object&&o.to.edges&&o.to.edges.forEach(function(e){var t=r(e);s.edges.push(t)})})}return t.attr&&(s.options=t.attr),s}};var at={parseGephi:function(e,t){var i=[],n=[],o={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};void 0!==t&&(void 0!==t.fixed&&(o.nodes.fixed=t.fixed),void 0!==t.parseColor&&(o.nodes.parseColor=t.parseColor),void 0!==t.inheritColor&&(o.edges.inheritColor=t.inheritColor));for(var s=e.edges,r=e.nodes,a=0;a\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=s.console&&(s.console.warn||s.console.log);return i&&i.call(s.console,o,t),n.apply(this,arguments)}}r="function"!=typeof Object.assign?function(e){if(e===u||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;it[i]}):n.sort()),n}function T(e,t){for(var i,n,o=t[0].toUpperCase()+t.slice(1),s=0;sc(d.y)?d.x:d.y,t.scale=r?function(e,t){return ie(t[0],t[1],X)/ie(e[0],e[1],X)}(r.pointers,n):1,t.rotation=r?function(e,t){return ne(t[1],t[0],X)+ne(e[1],e[0],X)}(r.pointers,n):0,t.maxPointers=i.prevInput?t.pointers.length>i.prevInput.maxPointers?t.pointers.length:i.prevInput.maxPointers:t.pointers.length,function(e,t){var i,n,o,s,r=e.lastInterval||t,a=t.timeStamp-r.timeStamp;if(t.eventType!=A&&(Rc(l.y)?l.x:l.y,s=te(h,d),e.lastInterval=t}else i=r.velocity,n=r.velocityX,o=r.velocityY,s=r.direction;t.velocity=i,t.velocityX=n,t.velocityY=o,t.direction=s}(i,t);var l=e.element;x(t.srcEvent.target,l)&&(l=t.srcEvent.target);t.target=l}(e,i),e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function Q(e){for(var t=[],i=0;i=c(t)?e<0?H:j:t<0?W:V}function ie(e,t,i){var n=t[(i=i||Z)[0]]-e[i[0]],o=t[i[1]]-e[i[1]];return Math.sqrt(n*n+o*o)}function ne(e,t,i){var n=t[(i=i||Z)[0]]-e[i[0]],o=t[i[1]]-e[i[1]];return 180*Math.atan2(o,n)/Math.PI}$.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(P(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&k(this.element,this.evEl,this.domHandler),this.evTarget&&k(this.target,this.evTarget,this.domHandler),this.evWin&&k(P(this.element),this.evWin,this.domHandler)}};var oe={mousedown:z,mousemove:2,mouseup:B},se="mousedown",re="mousemove mouseup";function ae(){this.evEl=se,this.evWin=re,this.pressed=!1,$.apply(this,arguments)}m(ae,$,{handler:function(e){var t=oe[e.type];t&z&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=B),this.pressed&&(t&B&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var he={pointerdown:z,pointermove:2,pointerup:B,pointercancel:A,pointerout:A},de={2:Y,3:"pen",4:"mouse",5:"kinect"},le="pointerdown",ue="pointermove pointerup pointercancel";function ce(){this.evEl=le,this.evWin=ue,$.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}s.MSPointerEvent&&!s.PointerEvent&&(le="MSPointerDown",ue="MSPointerMove MSPointerUp MSPointerCancel"),m(ce,$,{handler:function(e){var t=this.store,i=!1,n=e.type.toLowerCase().replace("ms",""),o=he[n],s=de[e.pointerType]||e.pointerType,r=s==Y,a=M(t,e.pointerId,"pointerId");o&z&&(0===e.button||r)?a<0&&(t.push(e),a=t.length-1):o&(B|A)&&(i=!0),a<0||(t[a]=e,this.callback(this.manager,o,{pointers:t,changedPointers:[e],pointerType:s,srcEvent:e}),i&&t.splice(a,1))}});var fe={touchstart:z,touchmove:2,touchend:B,touchcancel:A};function pe(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,$.apply(this,arguments)}m(pe,$,{handler:function(e){var t=fe[e.type];if(t===z&&(this.started=!0),this.started){var i=function(e,t){var i=O(e.touches),n=O(e.changedTouches);t&(B|A)&&(i=E(i.concat(n),"identifier",!0));return[i,n]}.call(this,e,t);t&(B|A)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:Y,srcEvent:e})}}});var ve={touchstart:z,touchmove:2,touchend:B,touchcancel:A},ge="touchstart touchmove touchend touchcancel";function me(){this.evTarget=ge,this.targetIds={},$.apply(this,arguments)}m(me,$,{handler:function(e){var t=ve[e.type],i=function(e,t){var i=O(e.touches),n=this.targetIds;if(t&(2|z)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var o,s,r=O(e.changedTouches),a=[],h=this.target;if(s=i.filter(function(e){return x(e.target,h)}),t===z)for(o=0;ot.threshold&&o&t.direction},attrTest:function(e){return Ie.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Fe(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),m(Re,Ie,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Se]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},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)}}),m(ze,Ce,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distancet.time;if(this._input=e,!n||!i||e.eventType&(B|A)&&!o)this.reset();else if(e.eventType&z)this.reset(),this._timer=d(function(){this.state=8,this.tryEmit()},t.time,this);else if(e.eventType&B)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&e.eventType&B?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=f(),this.manager.emit(this.options.event,this._input)))}}),m(Be,Ie,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Se]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),m(Ae,Ie,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:U|G,pointers:1},getTouchAction:function(){return Ye.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return i&(U|G)?t=e.overallVelocity:i&U?t=e.overallVelocityX:i&G&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&e.eventType&B},emit:function(e){var t=Fe(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),m(Le,Ce,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[xe]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance=this.NUM_ITERATIONS&&(r=this.NUM_ITERATIONS-1);var a=this.coordinates[r];e.drawImage(this.canvas,a[0],a[1],a[2],a[3],i,n,o,s)}else e.drawImage(this.image,i,n,o,s)}}]),e}(),Mt=function(){function t(e){gt(this,t),this.images={},this.imageBroken={},this.callback=e}return yt(t,[{key:"_tryloadBrokenUrl",value:function(e,t,i){void 0!==e&&void 0!==i&&(void 0!==t?(i.image.onerror=function(){console.error("Could not load brokenImage:",t)},i.image.src=t):console.warn("No broken url image defined"))}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var i=this,n=this.images[e];if(n)return n;var o=new Dt;return(this.images[e]=o).image.onload=function(){i._fixImageCoordinates(o.image),o.init(),i._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),i._tryloadBrokenUrl(e,t,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){0===e.width&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),t}(),Ot=function(){function e(){gt(this,e),this.clear(),this.defaultIndex=0,this.groupsArray=[],this.groupIndex=0,this.defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},z.extend(this.options,this.defaultOptions)}return yt(e,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(void 0!==e)for(var i in e)if(e.hasOwnProperty(i)&&-1===t.indexOf(i)){var n=e[i];this.add(i,n)}}},{key:"clear",value:function(){this.groups={},this.groupsArray=[]}},{key:"get",value:function(e,t){var i=!(1t.x&&e.topt.y}},{key:"isValidLabel",value:function(e){return"string"==typeof e&&""!==e}}]),e}(),Tt=function(){function t(e){gt(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return yt(t,[{key:"_add",value:function(e,t,i){var n=2e&&(e=n.width),t+=n.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/\_/,"`":/`/,afterBold:/[^\*]/,afterItal:/[^_]/,afterMono:/[^`]/},Pt=function(){function t(e){gt(this,t),this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return yt(t,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),0")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||!!/&/.test(i)&&(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0)||t.add(i),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t,i=this,n=new Pt(e),o=!0;n.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",i=0;i=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,n,o,t,i,r),this._drawBackground(e),this._drawText(e,t,this.size.yLine,r,a))}}},{key:"_drawBackground",value:function(e){if(void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,i,n,o){var s=3this.size.labelHeight&&("top"===this.fontOptions.valign&&(i-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(i+=(this.size.height-this.size.labelHeight)/2));for(var h=0;hthis.imageObj.height?i=this.imageObj.width/this.imageObj.height:n=this.imageObj.height/this.imageObj.width),e=2*this.options.size*i,t=2*this.options.size*n}else e=this.imageObj.width,t=this.imageObj.height;this.width=e,this.height=t,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(e,t,i,n){this.initContextForDraw(e,n),e.circle(t,i,n.size),this.performFill(e,n)}},{key:"_drawImageAtPosition",value:function(e,t){if(0!=this.imageObj.width){e.globalAlpha=1,this.enableShadow(e,t);var i=1;!0===this.options.shapeProperties.interpolation&&(i=this.imageObj.width/this.width/this.body.view.scale),this.imageObj.drawImageAtPosition(e,i,this.left,this.top,this.width,this.height),this.disableShadow(e,t)}}},{key:"_drawImageLabel",value:function(e,t,i,n,o){var s,r=0;if(void 0!==this.height){r=.5*this.height;var a=this.labelModule.getTextSize(e,n,o);1<=a.lineCount&&(r+=a.height/2)}s=i+r,this.options.label&&(this.labelOffset=r),this.labelModule.draw(e,t,s,n,o,"hanging")}}]),o}(),Bt=function(){function o(e,t,i){var n;return gt(this,o),(n=kt(this,_t(o).call(this,e,t,i)))._setMargins(i),n}return bt(o,zt),yt(o,[{key:"resize",value:function(e,t,i){var n=1s.distance?" in "+f.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+f.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+f.printLocation(o.path,e):". Did you mean one of these: "+f.print(Object.keys(t))+f.printLocation(i,e),console.log('%cUnknown option detected: "'+e+'"'+n,ei),Jt=!0}},{key:"findInOptions",value:function(e,t,i,n){var o=3c.distance&&(r=c.closestMatch,a=c.path,s=c.distance,d=c.indexMatch)}else-1!==l.toLowerCase().indexOf(h)&&(d=l),(u=f.levenshteinDistance(e,l))e.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"updateGroupOptions",value:function(e,t,i){if(void 0!==i){var n=e.group;if(void 0!==t&&void 0!==t.group&&n!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");if("number"==typeof n||"string"==typeof n&&""!=n){var o=i.get(n),s=["font"];void 0!==t&&void 0!==t.color&&null!=t.color&&s.push("color"),z.selectiveNotDeepExtend(s,e,o),e.color=z.parseColor(e.color)}}}},{key:"parseOptions",value:function(e,t,i,n,o){var s=2n.shape.height?(t=n.x+.5*n.shape.width,n.y-o):(t=n.x+o,n.y-.5*n.shape.height),[t,i,o]}},{key:"_pointOnCircle",value:function(e,t,i,n){var o=2*n*Math.PI;return{x:e+i*Math.cos(o),y:t-i*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,i){for(var n,o,s,r=i.x,a=i.y,h=i.low,d=i.high,l=i.direction,u=0,c=this.options.selfReferenceSize,f=.5*(h+d);h<=d&&u<10&&(f=.5*(h+d),n=this._pointOnCircle(r,a,c,f),o=Math.atan2(e.y-n.y,e.x-n.x),s=e.distanceToBorder(t,o)-Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2)),!(Math.abs(s)<.05));)0Math.abs(s)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(t=this.from.y,n=this.to.y,e=this.from.x-r*o,this.to.x+r*o):(t=this.from.y-r*s,n=this.to.y+r*s,e=this.from.x,this.to.x),[{x:e,y:t},{x:i,y:n}]}},{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,n,o,s,r){var a=xt(6this.to.x&&(e=-e),this.from.y>=this.to.y&&(t=-t),i=this.from.x+e,n=this.from.y+t,"discrete"===s&&(r<=a?i=rthis.to.x&&(y=-y),this.from.y>=this.to.y&&(b=-b),i=this.from.x+y,n=this.from.y+b,r<=a?i=this.from.x<=this.to.x?this.to.xi?this.to.x:i:n=this.from.y>=this.to.y?this.to.y>n?this.to.y:n:this.to.yi.shape.height?(r=i.x+.5*i.shape.width,i.y-h):(r=i.x+h,i.y-.5*i.shape.height),o=this._pointOnCircle(r,a,h,.125),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var i=this._getRotation();Et.pointInRect(this.labelModule.getSize(),e,i)&&t.push({edgeId:this.id,labelId:0})}var n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=this.from.x,i=this.from.y,n=this.to.x,o=this.to.y,s=e.left,r=e.top;return this.edgeType.getDistanceToEdge(t,i,n,o,s,r)<10}return!1}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),i=this.edgeType.getPoint(.5,t);void 0!==e&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,i.x,i.y);var n={x:i.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible())return n;if("horizontal"===this.options.font.align)return n;var o=this.from.y-this.to.y,s=this.from.x-this.to.x,r=Math.atan2(o,s);return(r<-1&&s<0||0this.thetaInversed?this._calculateForces(o,i,n,t,e):4===e.childrenCount?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,i,n,t,e))}},{key:"_calculateForces",value:function(e,t,i,n,o){0===e&&(t=e=.1),this.overlapAvoidanceFactor<1&&n.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*n.shape.radius,e-n.shape.radius));var s=this.options.gravitationalConstant*o.mass*n.options.mass/Math.pow(e,3),r=t*s,a=i*s;this.physicsBody.forces[n.id].x+=r,this.physicsBody.forces[n.id].y+=a}},{key:"_formBarnesHutTree",value:function(e,t){for(var i,n=t.length,o=e[t[0]].x,s=e[t[0]].y,r=e[t[0]].x,a=e[t[0]].y,h=1;ht.x?o.maxY>t.y?"NW":"SW":o.maxY>t.y?"NE":"SE",this._placeInRegion(e,t,n)}},{key:"_placeInRegion",value:function(e,t,i){var n=e.children[i];switch(n.childrenCount){case 0:n.children.data=t,n.childrenCount=1,this._updateBranchMass(n,t);break;case 1:n.children.data.x===t.x&&n.children.data.y===t.y?(t.x+=this.seededRandom(),t.y+=this.seededRandom()):(this._splitBranch(n),this._placeInTree(n,t));break;case 4:this._placeInTree(n,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,n,o,s,r=.5*e.size;switch(t){case"NW":i=e.range.minX,n=e.range.minX+r,o=e.range.minY,s=e.range.minY+r;break;case"NE":i=e.range.minX+r,n=e.range.maxX,o=e.range.minY,s=e.range.minY+r;break;case"SW":i=e.range.minX,n=e.range.minX+r,o=e.range.minY+r,s=e.range.maxY;break;case"SE":i=e.range.minX+r,n=e.range.maxX,o=e.range.minY+r,s=e.range.maxY}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:i,maxX:n,minY:o,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()}}]),n}(),Oi=function(){function n(e,t,i){gt(this,n),this.body=e,this.physicsBody=t,this.setOptions(i)}return yt(n,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,i,n,o,s,r,a,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,l=this.physicsBody.forces,u=this.options.nodeDistance,c=-2/3/u,f=0;fn&&(e=0(i=e[n[h]]).shape.boundingBox.left&&(r=i.shape.boundingBox.left),ai.shape.boundingBox.top&&(o=i.shape.boundingBox.top),s(i=e[n[h]]).x&&(r=i.x),ai.y&&(o=i.y),s=e&&i.push(o.id)}for(var s=0;so?t.x:o,s=t.yr?t.y:r;return{x:.5*(n+o),y:.5*(s+r)}}},{key:"openCluster",value:function(e,t,i){var n=!(2n&&(n=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),i+=1}e/=i;var r=(t/=i)-Math.pow(e,2),a=Math.sqrt(r),h=Math.floor(e+2*a);return n.5*this.body.nodeIndices.length)return void this.fit(o,!1);i=Yi.getRange(this.body.nodes,o.nodes),n=12.662/(this.body.nodeIndices.length+7.4147)+.0964822,n*=Math.min(this.canvas.frame.canvas.clientWidth/600,this.canvas.frame.canvas.clientHeight/600)}else{this.body.emitter.emit("_resizeNodes"),i=Yi.getRange(this.body.nodes,o.nodes);var h=1.1*Math.abs(i.maxX-i.minX),d=1.1*Math.abs(i.maxY-i.minY),l=this.canvas.frame.canvas.clientWidth/h,u=this.canvas.frame.canvas.clientHeight/d;n=l<=u?l:u}1o-this.padding&&(a=!0),s=a?this.x-i:this.x,r=h?this.y-t:this.y}else(r=this.y-t)+t+this.padding>n&&(r=n-t-this.padding),ro&&(s=o-i-this.padding),s>=1;return e+t}(o);do{if((s=u(e,i,n,t))>>1;o(s,e[h])<0?a=h:r=1+h}var d=n-r;switch(d){case 3:e[r+3]=e[r+2];case 2:e[r+2]=e[r+1];case 1:e[r+1]=e[r];break;default:for(;0>>1);0>>1);s(e,t[i+l])<0?h=l:r=l+1}return h}var f=function(){function i(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this.array=null,this.compare=null,this.minGallop=7,this.length=0,this.tmpStorageLength=256,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=e,this.compare=t,this.length=e.length,this.length<512&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return i.prototype.pushRun=function(e,t){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=t,this.stackSize+=1},i.prototype.mergeRuns=function(){for(;1this.runLength[e+1])break;this.mergeAt(e)}},i.prototype.forceMergeRuns=function(){for(;1i.hierarchical.levels[e.id]&&i.hierarchical.addRelation(e.id,t.id)}),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(e,t){function r(e,t){if(void 0===d[e.id]){var i;a.hierarchical.setTreeIndex(e,t),d[e.id]=!0;for(var n=a._getActiveEdges(e),o=0;o"+e+":":e+":",o}},{key:"_makeDropdown",value:function(e,t,i){var n=document.createElement("select");n.className="vis-configuration vis-config-select";var o=0;void 0!==t&&-1!==e.indexOf(t)&&(o=e.indexOf(t));for(var s=0;svar options = "+JSON.stringify(e,null,2)+""}},{key:"getOptions",value:function(){for(var e={},t=0;t>>0,n=0;nMe(e)?(s=e+1,d-Me(e)):(s=e,d),{year:s,dayOfYear:r}}function Ge(e,t,i){var n,o,s=Ve(e.year(),t,i),r=Math.floor((e.dayOfYear()-s-1)/7)+1;return r<1?(o=e.year()-1,n=r+qe(o,t,i)):r>qe(e.year(),t,i)?(n=r-qe(e.year(),t,i),o=e.year()+1):(o=e.year(),n=r),{week:n,year:o}}function qe(e,t,i){var n=Ve(e,t,i),o=Ve(e+1,t,i);return(Me(e)-n+o)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),R("week",5),R("isoWeek",5),le("w",Q),le("ww",Q,Z),le("W",Q),le("WW",Q,Z),ve(["w","ww","W","WW"],function(e,t,i,n){t[n.substr(0,1)]=k(e)});function Ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),R("day",11),R("weekday",11),R("isoWeekday",11),le("d",Q),le("e",Q),le("E",Q),le("dd",function(e,t){return t.weekdaysMinRegex(e)}),le("ddd",function(e,t){return t.weekdaysShortRegex(e)}),le("dddd",function(e,t){return t.weekdaysRegex(e)}),ve(["dd","ddd","dddd"],function(e,t,i,n){var o=i._locale.weekdaysParse(e,n,i._strict);null!=o?t.d=o:p(i).invalidWeekday=e}),ve(["d","e","E"],function(e,t,i,n){t[n]=k(e)});var Xe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var $e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,i){var n,o,s,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=f([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"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"dddd"===t?-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:"ddd"===t?-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:null:-1!==(o=Ee.call(this._minWeekdaysParse,r))?o:-1!==(o=Ee.call(this._weekdaysParse,r))?o:-1!==(o=Ee.call(this._shortWeekdaysParse,r))?o:null}var Je=he;var et=he;var tt=he;function it(){function e(e,t){return t.length-e.length}var t,i,n,o,s,r=[],a=[],h=[],d=[];for(t=0;t<7;t++)i=f([2e3,1]).day(t),n=this.weekdaysMin(i,""),o=this.weekdaysShort(i,""),s=this.weekdays(i,""),r.push(n),a.push(o),h.push(s),d.push(n),d.push(o),d.push(s);for(r.sort(e),a.sort(e),h.sort(e),d.sort(e),t=0;t<7;t++)a[t]=ce(a[t]),h[t]=ce(h[t]),d[t]=ce(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 nt(){return this.hours()%12||12}function ot(e,t){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function st(e,t){return t._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,nt),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)}),W("hmmss",0,0,function(){return""+nt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)}),ot("a",!0),ot("A",!1),F("hour","h"),R("hour",13),le("a",st),le("A",st),le("H",Q),le("h",Q),le("k",Q),le("HH",Q,Z),le("hh",Q,Z),le("kk",Q,Z),le("hmm",J),le("hmmss",ee),le("Hmm",J),le("Hmmss",ee),pe(["H","HH"],_e),pe(["k","kk"],function(e,t,i){var n=k(e);t[_e]=24===n?0:n}),pe(["a","A"],function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e}),pe(["h","hh"],function(e,t,i){t[_e]=k(e),p(i).bigHour=!0}),pe("hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n)),p(i).bigHour=!0}),pe("hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o)),p(i).bigHour=!0}),pe("Hmm",function(e,t,i){var n=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n))}),pe("Hmmss",function(e,t,i){var n=e.length-4,o=e.length-2;t[_e]=k(e.substr(0,n)),t[we]=k(e.substr(n,2)),t[ke]=k(e.substr(o))});var rt,at=Ce("Hours",!0),ht={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d 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"},months:Ye,monthsShort:Re,week:{dow:0,doy:6},weekdays:Xe,weekdaysMin:Ke,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},dt={},lt={};function ut(e){return e?e.toLowerCase().replace("_","-"):e}function ct(e){var t=null;if(!dt[e]&&Ji&&Ji.exports)try{t=rt._abbr;var i=en;i("./locale/"+e),ft(t)}catch(e){}return dt[e]}function ft(e,t){var i;return e&&((i=s(t)?vt(e):pt(e,t))?rt=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function pt(e,t){if(null===t)return delete dt[e],null;var i,n=ht;if(t.abbr=e,null!=dt[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."),n=dt[e]._config;else if(null!=t.parentLocale)if(null!=dt[t.parentLocale])n=dt[t.parentLocale]._config;else{if(null==(i=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;n=i._config}return dt[e]=new C(T(n,t)),lt[e]&<[e].forEach(function(e){pt(e.name,e.config)}),ft(e),dt[e]}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return rt;if(!r(e)){if(t=ct(e))return t;e=[e]}return function(e){var t,i,n,o,s=0;for(;s=t&&x(o,i,!0)>=t-1)break;t--}s++}return rt}(e)}function gt(e){var t,i=e._a;return i&&-2===p(e).overflow&&(t=i[ye]<0||11Ne(i[me],i[ye])?be:i[_e]<0||24qe(i,s,r)?p(e)._overflowWeeks=!0:null!=h?p(e)._overflowWeekday=!0:(a=Ue(i,n,o,s,r),e._a[me]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=mt(e._a[me],n[me]),(e._dayOfYear>Me(s)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),i=We(s,0,e._dayOfYear),e._a[ye]=i.getUTCMonth(),e._a[be]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=r[t]=n[t];for(;t<7;t++)e._a[t]=r[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[_e]&&0===e._a[we]&&0===e._a[ke]&&0===e._a[xe]&&(e._nextDay=!0,e._a[_e]=0),e._d=(e._useUTC?We:function(e,t,i,n,o,s,r){var a;e<100&&0<=e?(a=new Date(e+400,t,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,i,n,o,s,r);return a}).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[_e]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(p(e).weekdayMismatch=!0)}}var bt=/^\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)?)?$/,_t=/^\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)?)?$/,wt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["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}/]],xt=[["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/]],St=/^\/?Date\((\-?\d+)/i;function Dt(e){var t,i,n,o,s,r,a=e._i,h=bt.exec(a)||_t.exec(a);if(h){for(p(e).iso=!0,t=0,i=kt.length;ti.valueOf():i.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yi.isLocal=function(){return!!this.isValid()&&!this._isUTC},yi.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yi.isUtc=Gt,yi.isUTC=Gt,yi.zoneAbbr=function(){return this._isUTC?"UTC":""},yi.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yi.dates=e("dates accessor is deprecated. Use date instead.",ci),yi.months=e("months accessor is deprecated. Use month instead",Ae),yi.years=e("years accessor is deprecated. Use year instead",Te),yi.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),yi.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Pt(e))._a){var t=e._isUTC?f(e._a):Nt(e._a);this._isDSTShifted=this.isValid()&&0 `${inst.name}\n${schema.name}` + + const addNode = (toAdd) => { + try { + nodes.add({ + id: toAdd.uuid, + label: instanceLabel(toAdd, toAdd.schema) + }) + } catch(e) { + console.debug(e) + } + } + const addOutEdges = (fromId, toAdd) => { + toAdd.forEach((inst) => { + try { + edges.add({ + from: fromId, + to: inst.uuid, + label: inst['link-name'], + arrows: { + to: {enabled: true} + } + }) + } catch (e) { + console.debug(e) + } + }) + } + const addLinkedNodes = (toAdd) => { + toAdd.forEach((inst) => { + try { + console.debug(inst.name) + nodes.add({ + id: inst.uuid, + label: instanceLabel(inst, inst.schema) + }) + } catch (e) { + console.debug(e) + } + }) + } + + const addInstance = (instance) => { + addNode(instance) + addLinkedNodes(instance['links-out']) + addOutEdges(instance.uuid, instance['links-out']) + } + + fetch(canvas.getAttribute('data-instance-url')) + .then((resp) => resp.json()) + .then((json) => { + addInstance(json) + }) + + const searchForm = document.querySelector('.search') + const searchUrl = searchForm.getAttribute('action') + searchForm.addEventListener('submit', (event) => { + event.preventDefault() + const term = searchForm.querySelector('[name=term]').value + fetch(searchUrl + encodeURIComponent(term)) + .then((resp) => resp.json()) + .then((json) => { + console.debug(json) + json.forEach((inst) => { + addInstance(inst) + }) + }) + }) +}) diff --git a/src/wanijo/visualisation/domain.clj b/src/wanijo/visualisation/domain.clj index 0aad22b..f6793a4 100644 --- a/src/wanijo/visualisation/domain.clj +++ b/src/wanijo/visualisation/domain.clj @@ -1,5 +1,6 @@ (ns wanijo.visualisation.domain - (:require [wanijo.framework.neo4j :as neo4j])) + (:require [wanijo.framework.neo4j :as neo4j] + [wanijo.instance.domain :as domain-instance])) (neo4j/defquery all-instance-connections "MATCH @@ -8,6 +9,28 @@ (source)<-[:link_from]-(link:link)-[:link_to]->(target:instance), (target)-[:of]->(target_schema:schema) RETURN source, schema, link, target, target_schema") - (defn all-instance-connections! [] (neo4j/exec-query! all-instance-connections {})) + +(neo4j/defquery search + "MATCH (i:instance) + WHERE i.name =~ {term} + RETURN i + LIMIT 10") +(defn enrich-links [instance] + (update instance + :links-out + (fn [links-in] + (map #(assoc + (domain-instance/full-instance-by-uuid! + (-> % :target :uuid)) + :link-name + (-> % :label :name)) + links-in)))) +(defn search! [term] + (->> (neo4j/exec-query! search {:term (str ".*" term ".*")}) + (map #(domain-instance/full-instance-by-uuid! (-> % :i :uuid))) + (map enrich-links))) + +(defn instance! [uuid] + (enrich-links (domain-instance/full-instance-by-uuid! uuid))) diff --git a/src/wanijo/visualisation/routes.clj b/src/wanijo/visualisation/routes.clj index df4b09d..b7576ee 100644 --- a/src/wanijo/visualisation/routes.clj +++ b/src/wanijo/visualisation/routes.clj @@ -13,22 +13,38 @@ (defn all-instances [req] (view/layout! - :request req - :content - [[:h1 "All Instances"] - (viz/all-instances (vis-domain/all-instance-connections!))])) + :request req + :content + [[:h1 "All Instances"] + (viz/all-instances (vis-domain/all-instance-connections!))])) (defn all-schemas [req] {:content-type "text/json" :body (domain-schema/accessible-schemas! (-> req :session :uuid))}) +(defn instance [uuid] + {:content-type "text/json" + :body (vis-domain/instance! uuid)}) + +(defn search [term] + {:content-type "text/json" + :body (map #(merge % + {:urls {:instance (path :vis-get-instance %)}}) + (vis-domain/search! term))}) + (defroutes routes (GET (register! :vis-explore "/vis/explore/:instance-uuid") - [:as req] - (vis-view/index req)) + [instance-uuid :as req] + (vis-view/index instance-uuid req)) (GET (register! :vis-all-instances "/vis/all-instances") [:as req] (all-instances req)) (GET (register! :vis-all-schemas "/api/vis/schemas") [:as req] - (all-schemas req))) + (all-schemas req)) + (GET (register! :vis-get-instance "/api/vis/instance/:uuid") + [uuid] + (instance uuid)) + (GET (register! :vis-search-instance "/api/vis/search/:term") + [term] + (search term))) diff --git a/src/wanijo/visualisation/view.clj b/src/wanijo/visualisation/view.clj index e6a0347..041c010 100644 --- a/src/wanijo/visualisation/view.clj +++ b/src/wanijo/visualisation/view.clj @@ -1,10 +1,22 @@ (ns wanijo.visualisation.view - (:require [hiccup.page :refer [include-js]] + (:require [hiccup.page :refer [include-js include-css]] + [hiccup.form :as hform] + [wanijo.framework.routing :refer [path]] [wanijo.framework.view :as view])) -(defn index [req] +(defn index [instance-uuid req] (view/layout! :request req + :head (list (include-css "/css/vis-network.min.css") + (include-js "/js/vis-network.min.js" + "/js/vis.js")) :content - [[:h1 "Visualisation"] - [:div#visualisation]])) + [[:h1 "Explore"] + [:form.search {:action (path :vis-search-instance {:term ""})} + (hform/label "term" "Search Instance") + (hform/text-field {:autofocus true} "term") + [:input {:style "display: none" :type "submit"}]] + [:div.vis-canvas {:data-instance-url (path :vis-get-instance + {:uuid instance-uuid})}] + [:p.flash--warn + "Changes to the visualisation will not (yet) mirror to the actual database"]]))