/**
 * vis-timeline and vis-graph2d
 * https://visjs.github.io/vis-timeline/
 *
 * Create a fully customizable, interactive timeline with items and ranges.
 *
 * @version 8.5.0
 * @date    2025-12-12T13:44:42.806Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-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(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).vis=t.vis||{})}(this,function(t){function e(t,e){void 0===e&&(e={});var i=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}e(".vis .overlay{height:100%;left:0;position:absolute;top:0;width:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}");e(".vis [class*=span]{min-height:0;width:auto}");e('div.vis-configuration{display:block;float:left;font-size:12px;position:relative}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{background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;display:block;left:10px;margin-top:20px;padding-left:5px;width:495px}div.vis-configuration.vis-config-button{background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;cursor:pointer;display:block;height:25px;left:10px;line-height:25px;margin-bottom:30px;margin-top:20px;padding-left:5px;vertical-align:middle;width:495px}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;height:25px;line-height:25px;vertical-align:middle;width:495px}div.vis-configuration.vis-config-item.vis-config-s2{background-color:#f7f8fa;border-radius:3px;left:10px;padding-left:5px}div.vis-configuration.vis-config-item.vis-config-s3{background-color:#e4e9f0;border-radius:3px;left:20px;padding-left:5px}div.vis-configuration.vis-config-item.vis-config-s4{background-color:#cfd8e6;border-radius:3px;left:30px;padding-left:5px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{height:25px;line-height:25px;width:120px}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{border:1px solid #444;border-radius:2px;cursor:pointer;height:19px;margin:0;padding:0;top:1px;width:30px}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{margin:0;padding:1px;pointer-events:none;position:relative;top:-5px;width:60px}input.vis-configuration.vis-config-range{-webkit-appearance:none;background-color:transparent;border:0 solid #fff;height:20px;width:300px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{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,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(180deg,#dedede 0,#c8c8c8 99%);border:1px solid #999;border-radius:3px;box-shadow:0 0 3px 0 #aaa;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#dedede",endColorstr="#c8c8c8",GradientType=0);height:5px;width:300px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;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,#385380);background:-o-linear-gradient(top,#3876c2 0,#385380 100%);background:-ms-linear-gradient(top,#3876c2 0,#385380 100%);background:linear-gradient(180deg,#3876c2 0,#385380);border:1px solid #14334b;border-radius:50%;box-shadow:0 0 1px 0 #111927;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#3876c2",endColorstr="#385380",GradientType=0);height:17px;margin-top:-7px;width:17px}input.vis-configuration.vis-config-range:focus{outline:none}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,#c8c8c8 99%);background:-o-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#9d9d9d 0,#c8c8c8 99%);background:linear-gradient(180deg,#9d9d9d 0,#c8c8c8 99%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#9d9d9d",endColorstr="#c8c8c8",GradientType=0)}input.vis-configuration.vis-config-range::-moz-range-track{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,#c8c8c8 99%);background:-o-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:-ms-linear-gradient(top,#dedede 0,#c8c8c8 99%);background:linear-gradient(180deg,#dedede 0,#c8c8c8 99%);border:1px solid #999;border-radius:3px;box-shadow:0 0 3px 0 #aaa;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#dedede",endColorstr="#c8c8c8",GradientType=0);height:10px;width:300px}input.vis-configuration.vis-config-range::-moz-range-thumb{background:#385380;border:none;border-radius:50%;height:16px;width:16px}input.vis-configuration.vis-config-range:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{background:transparent;border-color:transparent;border-width:6px 0;color:transparent;height:5px;width:300px}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{background:#385380;border:none;border-radius:50%;height:16px;width:16px}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{background:rgba(57,76,89,.85);border:2px solid #f2faff;border-radius:4px;color:#fff;font-size:14px;height:30px;line-height:30px;position:absolute;text-align:center;-webkit-transition:opacity .3s ease-in-out;-moz-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out;width:150px}.vis-configuration-popup:after,.vis-configuration-popup:before{border:solid transparent;content:" ";height:0;left:100%;pointer-events:none;position:absolute;top:50%;width:0}.vis-configuration-popup:after{border-color:rgba(136,183,213,0) rgba(136,183,213,0) rgba(136,183,213,0) rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0) rgba(194,225,245,0) rgba(194,225,245,0) #f2faff;border-width:12px;margin-top:-12px}');e("div.vis-tooltip{background-color:#f5f4ed;border:1px solid #808074;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;box-shadow:3px 3px 10px rgba(0,0,0,.2);color:#000;font-family:verdana;font-size:14px;padding:5px;pointer-events:none;position:absolute;visibility:hidden;white-space:nowrap;z-index:5}");e("");e('.vis-current-time{background-color:#ff7f6e;pointer-events:none;width:2px;z-index:1}.vis-rolling-mode-btn{background:#3876c2;border-radius:50%;color:#fff;cursor:pointer;font-size:28px;font-weight:700;height:40px;opacity:.8;position:absolute;right:20px;text-align:center;top:7px;width:40px}.vis-rolling-mode-btn:before{content:"\\26F6"}.vis-rolling-mode-btn:hover{opacity:1}');e(".vis-custom-time{background-color:#6e94ff;cursor:move;width:2px;z-index:1}.vis-custom-time>.vis-custom-time-marker{background-color:inherit;color:#fff;cursor:auto;font-size:12px;padding:3px 5px;top:0;white-space:nowrap;z-index:inherit}");e(".vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{border-bottom:1px solid;height:0;position:absolute;width:100%}.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{color:#4d4d4d;position:absolute;white-space:nowrap;width:100%}.vis-data-axis .vis-y-axis.vis-major.vis-measure{border:0;margin:0;padding:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{color:#bebebe;position:absolute;white-space:nowrap;width:100%}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{border:0;margin:0;padding:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{bottom:20px;color:#4d4d4d;position:absolute;text-align:center;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-title.vis-measure{margin:0;padding:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg);-webkit-transform-origin:left top;-moz-transform-origin:left top;-ms-transform-origin:left top;-o-transform-origin:left top;transform-origin:left bottom}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:right bottom;-moz-transform-origin:right bottom;-ms-transform-origin:right bottom;-o-transform-origin:right bottom;transform-origin:right bottom}.vis-legend{background-color:rgba(247,252,255,.65);border:1px solid #b3b3b3;box-shadow:2px 2px 10px hsla(0,0%,60%,.55);padding:5px}.vis-legend-text{display:inline-block;white-space:nowrap}");e('.vis-item{background-color:#d5ddf6;border-color:#97b0f8;border-width:1px;color:#1a1a1a;display:inline-block;position:absolute;z-index:1}.vis-item.vis-selected{background-color:#fff785;border-color:#ffc200;z-index:2}.vis-editable.vis-selected{cursor:move}.vis-item.vis-point.vis-selected{background-color:#fff785}.vis-item.vis-box{border-radius:2px;border-style:solid;text-align:center}.vis-item.vis-point{background:none}.vis-item.vis-dot{border-radius:4px;border-style:solid;border-width:4px;padding:0;position:absolute}.vis-item.vis-range{border-radius:2px;border-style:solid;box-sizing:border-box}.vis-item.vis-background{background-color:rgba(213,221,246,.4);border:none;box-sizing:border-box;margin:0;padding:0}.vis-item .vis-item-overflow{height:100%;margin:0;overflow:hidden;padding:0;position:relative;width:100%}.vis-item-visible-frame{white-space:nowrap}.vis-item.vis-range .vis-item-content{display:inline-block;position:relative}.vis-item.vis-background .vis-item-content{display:inline-block;position:absolute}.vis-item.vis-line{border-left-style:solid;border-left-width:1px;padding:0;position:absolute;width:0}.vis-item .vis-item-content{box-sizing:border-box;padding:5px;white-space:nowrap}.vis-item .vis-onUpdateTime-tooltip{background:#4f81bd;border-radius:1px;color:#fff;padding:5px;position:absolute;text-align:center;transition:.4s;-o-transition:.4s;-moz-transition:.4s;-webkit-transition:.4s;white-space:nowrap;width:200px}.vis-item .vis-delete,.vis-item .vis-delete-rtl{box-sizing:border-box;cursor:pointer;height:24px;padding:0 5px;position:absolute;top:0;-webkit-transition:background .2s linear;-moz-transition:background .2s linear;-ms-transition:background .2s linear;-o-transition:background .2s linear;transition:background .2s linear;width:24px}.vis-item .vis-delete{right:-24px}.vis-item .vis-delete-rtl{left:-24px}.vis-item .vis-delete-rtl:after,.vis-item .vis-delete:after{color:red;content:"\\00D7";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{cursor:move;height:100%;left:0;position:absolute;top:0;width:100%}.vis-item.vis-range .vis-drag-left{cursor:w-resize;left:-4px}.vis-item.vis-range .vis-drag-left,.vis-item.vis-range .vis-drag-right{height:100%;max-width:20%;min-width:2px;position:absolute;top:0;width:24px}.vis-item.vis-range .vis-drag-right{cursor:e-resize;right:-4px}.vis-range.vis-item.vis-readonly .vis-drag-left,.vis-range.vis-item.vis-readonly .vis-drag-right{cursor:auto}.vis-item.vis-cluster{border-radius:2px;border-style:solid;text-align:center;vertical-align:center}.vis-item.vis-cluster-line{border-left-style:solid;border-left-width:1px;padding:0;position:absolute;width:0}.vis-item.vis-cluster-dot{border-radius:4px;border-style:solid;border-width:4px;padding:0;position:absolute}');e('.vis-itemset{box-sizing:border-box;margin:0;padding:0;position:relative}.vis-itemset .vis-background,.vis-itemset .vis-foreground{height:100%;overflow:visible;position:absolute;width:100%}.vis-axis{height:0;left:0;position:absolute;width:100%;z-index:1}.vis-foreground .vis-group{border-bottom:1px solid #bfbfbf;box-sizing:border-box;position:relative}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-nesting-group{cursor:pointer}.vis-label.vis-nested-group.vis-group-level-unknown-but-gte1{background:#f5f5f5}.vis-label.vis-nested-group.vis-group-level-0{background-color:#fff}.vis-ltr .vis-label.vis-nested-group.vis-group-level-0 .vis-inner{padding-left:0}.vis-rtl .vis-label.vis-nested-group.vis-group-level-0 .vis-inner{padding-right:0}.vis-label.vis-nested-group.vis-group-level-1{background-color:rgba(0,0,0,.05)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-1 .vis-inner{padding-left:15px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-1 .vis-inner{padding-right:15px}.vis-label.vis-nested-group.vis-group-level-2{background-color:rgba(0,0,0,.1)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-2 .vis-inner{padding-left:30px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-2 .vis-inner{padding-right:30px}.vis-label.vis-nested-group.vis-group-level-3{background-color:rgba(0,0,0,.15)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-3 .vis-inner{padding-left:45px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-3 .vis-inner{padding-right:45px}.vis-label.vis-nested-group.vis-group-level-4{background-color:rgba(0,0,0,.2)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-4 .vis-inner{padding-left:60px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-4 .vis-inner{padding-right:60px}.vis-label.vis-nested-group.vis-group-level-5{background-color:rgba(0,0,0,.25)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-5 .vis-inner{padding-left:75px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-5 .vis-inner{padding-right:75px}.vis-label.vis-nested-group.vis-group-level-6{background-color:rgba(0,0,0,.3)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-6 .vis-inner{padding-left:90px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-6 .vis-inner{padding-right:90px}.vis-label.vis-nested-group.vis-group-level-7{background-color:rgba(0,0,0,.35)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-7 .vis-inner{padding-left:105px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-7 .vis-inner{padding-right:105px}.vis-label.vis-nested-group.vis-group-level-8{background-color:rgba(0,0,0,.4)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-8 .vis-inner{padding-left:120px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-8 .vis-inner{padding-right:120px}.vis-label.vis-nested-group.vis-group-level-9{background-color:rgba(0,0,0,.45)}.vis-ltr .vis-label.vis-nested-group.vis-group-level-9 .vis-inner{padding-left:135px}.vis-rtl .vis-label.vis-nested-group.vis-group-level-9 .vis-inner{padding-right:135px}.vis-label.vis-nested-group{background-color:rgba(0,0,0,.5)}.vis-ltr .vis-label.vis-nested-group .vis-inner{padding-left:150px}.vis-rtl .vis-label.vis-nested-group .vis-inner{padding-right:150px}.vis-group-level-unknown-but-gte1{border:1px solid red}.vis-label.vis-nesting-group:before{display:inline-block;width:15px}.vis-label.vis-nesting-group.expanded:before{content:"\\25BC"}.vis-label.vis-nesting-group.collapsed:before{content:"\\25B6"}.vis-rtl .vis-label.vis-nesting-group.collapsed:before{content:"\\25C0"}.vis-ltr .vis-label:not(.vis-nesting-group):not(.vis-group-level-0){padding-left:15px}.vis-rtl .vis-label:not(.vis-nesting-group):not(.vis-group-level-0){padding-right:15px}.vis-overlay{height:100%;left:0;position:absolute;top:0;width:100%;z-index:10}');e(".vis-labelset{overflow:hidden}.vis-labelset,.vis-labelset .vis-label{box-sizing:border-box;position:relative}.vis-labelset .vis-label{border-bottom:1px solid #bfbfbf;color:#4d4d4d;left:0;top:0;width:100%}.vis-labelset .vis-label.draggable{cursor:pointer}.vis-group-is-dragging{background:rgba(0,0,0,.1)}.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}");e(".vis-panel{box-sizing:border-box;margin:0;padding:0;position:absolute}.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-bottom-style:solid;border-top-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-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-background{overflow:hidden}.vis-panel>.vis-content{position:relative}.vis-panel .vis-shadow{box-shadow:0 0 10px rgba(0,0,0,.8);height:1px;position:absolute;width:100%}.vis-panel .vis-shadow.vis-top{left:0;top:-1px}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}");e(".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}");e(".vis-time-axis{overflow:hidden;position:relative}.vis-time-axis.vis-foreground{left:0;top:0;width:100%}.vis-time-axis.vis-background{height:100%;left:0;position:absolute;top:0;width:100%}.vis-time-axis .vis-text{box-sizing:border-box;color:#4d4d4d;overflow:hidden;padding:3px;position:absolute;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{margin-left:0;margin-right:0;padding-left:0;padding-right:0;position:absolute;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{border-left:1px solid;position:absolute}.vis-time-axis .vis-grid.vis-vertical-rtl{border-right:1px solid;position:absolute}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}");e(".vis-timeline{border:1px solid #bfbfbf;box-sizing:border-box;margin:0;overflow:hidden;padding:0;position:relative}.vis-loading-screen{height:100%;left:0;position:absolute;top:0;width:100%}");var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function o(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var s,r={exports:{}};function a(){return s||(s=1,function(t){t.exports=function(){var e,i;function n(){return e.apply(null,arguments)}function s(t){e=t}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(l(t,e))return!1;return!0}function d(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function p(t,e){var i,n=[],o=t.length;for(i=0;i<o;++i)n.push(e(t[i],i));return n}function m(t,e){for(var i in e)l(e,i)&&(t[i]=e[i]);return l(e,"toString")&&(t.toString=e.toString),l(e,"valueOf")&&(t.valueOf=e.valueOf),t}function f(t,e,i,n){return qi(t,e,i,n,!0).utc()}function g(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function v(t){return null==t._pf&&(t._pf=g()),t._pf}function y(t){var e=null,n=!1,o=t._d&&!isNaN(t._d.getTime());return o&&(e=v(t),n=i.call(e.parsedDateParts,function(t){return null!=t}),o=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n),t._strict&&(o=o&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)),null!=Object.isFrozen&&Object.isFrozen(t)?o:(t._isValid=o,t._isValid)}function b(t){var e=f(NaN);return null!=t?m(v(e),t):v(e).userInvalidated=!0,e}i=Array.prototype.some?Array.prototype.some:function(t){var e,i=Object(this),n=i.length>>>0;for(e=0;e<n;e++)if(e in i&&t.call(this,i[e],e,i))return!0;return!1};var _=n.momentProperties=[],w=!1;function x(t,e){var i,n,o,s=_.length;if(d(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),d(e._i)||(t._i=e._i),d(e._f)||(t._f=e._f),d(e._l)||(t._l=e._l),d(e._strict)||(t._strict=e._strict),d(e._tzm)||(t._tzm=e._tzm),d(e._isUTC)||(t._isUTC=e._isUTC),d(e._offset)||(t._offset=e._offset),d(e._pf)||(t._pf=v(e)),d(e._locale)||(t._locale=e._locale),s>0)for(i=0;i<s;i++)d(o=e[n=_[i]])||(t[n]=o);return t}function k(t){x(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,n.updateOffset(this),w=!1)}function D(t){return t instanceof k||null!=t&&null!=t._isAMomentObject}function S(t){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var i=!0;return m(function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,t),i){var o,s,r,a=[],h=arguments.length;for(s=0;s<h;s++){if(o="","object"==typeof arguments[s]){for(r in o+="\n["+s+"] ",arguments[0])l(arguments[0],r)&&(o+=r+": "+arguments[0][r]+", ");o=o.slice(0,-2)}else o=arguments[s];a.push(o)}S(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),i=!1}return e.apply(this,arguments)},e)}var T,M={};function O(t,e){null!=n.deprecationHandler&&n.deprecationHandler(t,e),M[t]||(S(e),M[t]=!0)}function E(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function P(t){var e,i;for(i in t)l(t,i)&&(E(e=t[i])?this[i]=e:this["_"+i]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function I(t,e){var i,n=m({},t);for(i in e)l(e,i)&&(a(t[i])&&a(e[i])?(n[i]={},m(n[i],t[i]),m(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);for(i in t)l(t,i)&&!l(e,i)&&a(t[i])&&(n[i]=m({},n[i]));return n}function L(t){null!=t&&this.set(t)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,T=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)l(t,e)&&i.push(e);return i};var N={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function A(t,e,i){var n=this._calendar[t]||this._calendar.sameElse;return E(n)?n.call(e,i):n}function F(t,e,i){var n=""+Math.abs(t),o=e-n.length;return(t>=0?i?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+n}var R=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Y=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},z={};function H(t,e,i,n){var o=n;"string"==typeof n&&(o=function(){return this[n]()}),t&&(z[t]=o),e&&(z[e[0]]=function(){return F(o.apply(this,arguments),e[1],e[2])}),i&&(z[i]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function G(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function W(t){var e,i,n=t.match(R);for(e=0,i=n.length;e<i;e++)z[n[e]]?n[e]=z[n[e]]:n[e]=G(n[e]);return function(e){var o,s="";for(o=0;o<i;o++)s+=E(n[o])?n[o].call(e,t):n[o];return s}}function B(t,e){return t.isValid()?(e=V(e,t.localeData()),j[e]=j[e]||W(e),j[e](t)):t.localeData().invalidDate()}function V(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(Y.lastIndex=0;i>=0&&Y.test(t);)t=t.replace(Y,n),Y.lastIndex=0,i-=1;return t}var U={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 X(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.match(R).map(function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t}).join(""),this._longDateFormat[t])}var q="Invalid date";function K(){return this._invalidDate}var Z="%d",$=/\d{1,2}/;function J(t){return this._ordinal.replace("%d",t)}var Q={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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function tt(t,e,i,n){var o=this._relativeTime[i];return E(o)?o(t,e,i,n):o.replace(/%d/i,t)}function et(t,e){var i=this._relativeTime[t>0?"future":"past"];return E(i)?i(e):i.replace(/%s/i,e)}var it={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function nt(t){return"string"==typeof t?it[t]||it[t.toLowerCase()]:void 0}function ot(t){var e,i,n={};for(i in t)l(t,i)&&(e=nt(i))&&(n[e]=t[i]);return n}var st={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function rt(t){var e,i=[];for(e in t)l(t,e)&&i.push({unit:e,priority:st[e]});return i.sort(function(t,e){return t.priority-e.priority}),i}var at,lt=/\d/,ht=/\d\d/,dt=/\d{3}/,ct=/\d{4}/,ut=/[+-]?\d{6}/,pt=/\d\d?/,mt=/\d\d\d\d?/,ft=/\d\d\d\d\d\d?/,gt=/\d{1,3}/,vt=/\d{1,4}/,yt=/[+-]?\d{1,6}/,bt=/\d+/,_t=/[+-]?\d+/,wt=/Z|[+-]\d\d:?\d\d/gi,xt=/Z|[+-]\d\d(?::?\d\d)?/gi,kt=/[+-]?\d+(\.\d{1,3})?/,Dt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,St=/^[1-9]\d?/,Ct=/^([1-9]\d|\d)/;function Tt(t,e,i){at[t]=E(e)?e:function(t,n){return t&&i?i:e}}function Mt(t,e){return l(at,t)?at[t](e._strict,e._locale):new RegExp(Ot(t))}function Ot(t){return Et(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,o){return e||i||n||o}))}function Et(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Pt(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function It(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=Pt(e)),i}at={};var Lt={};function Nt(t,e){var i,n,o=e;for("string"==typeof t&&(t=[t]),c(e)&&(o=function(t,i){i[e]=It(t)}),n=t.length,i=0;i<n;i++)Lt[t[i]]=o}function At(t,e){Nt(t,function(t,i,n,o){n._w=n._w||{},e(t,n._w,n,o)})}function Ft(t,e,i){null!=e&&l(Lt,t)&&Lt[t](e,i._a,i,t)}function Rt(t){return t%4==0&&t%100!=0||t%400==0}var Yt=0,jt=1,zt=2,Ht=3,Gt=4,Wt=5,Bt=6,Vt=7,Ut=8;function Xt(t){return Rt(t)?366:365}H("Y",0,0,function(){var t=this.year();return t<=9999?F(t,4):"+"+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"),Tt("Y",_t),Tt("YY",pt,ht),Tt("YYYY",vt,ct),Tt("YYYYY",yt,ut),Tt("YYYYYY",yt,ut),Nt(["YYYYY","YYYYYY"],Yt),Nt("YYYY",function(t,e){e[Yt]=2===t.length?n.parseTwoDigitYear(t):It(t)}),Nt("YY",function(t,e){e[Yt]=n.parseTwoDigitYear(t)}),Nt("Y",function(t,e){e[Yt]=parseInt(t,10)}),n.parseTwoDigitYear=function(t){return It(t)+(It(t)>68?1900:2e3)};var qt,Kt=$t("FullYear",!0);function Zt(){return Rt(this.year())}function $t(t,e){return function(i){return null!=i?(Qt(this,t,i),n.updateOffset(this,e),this):Jt(this,t)}}function Jt(t,e){if(!t.isValid())return NaN;var i=t._d,n=t._isUTC;switch(e){case"Milliseconds":return n?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return n?i.getUTCSeconds():i.getSeconds();case"Minutes":return n?i.getUTCMinutes():i.getMinutes();case"Hours":return n?i.getUTCHours():i.getHours();case"Date":return n?i.getUTCDate():i.getDate();case"Day":return n?i.getUTCDay():i.getDay();case"Month":return n?i.getUTCMonth():i.getMonth();case"FullYear":return n?i.getUTCFullYear():i.getFullYear();default:return NaN}}function Qt(t,e,i){var n,o,s,r,a;if(t.isValid()&&!isNaN(i)){switch(n=t._d,o=t._isUTC,e){case"Milliseconds":return void(o?n.setUTCMilliseconds(i):n.setMilliseconds(i));case"Seconds":return void(o?n.setUTCSeconds(i):n.setSeconds(i));case"Minutes":return void(o?n.setUTCMinutes(i):n.setMinutes(i));case"Hours":return void(o?n.setUTCHours(i):n.setHours(i));case"Date":return void(o?n.setUTCDate(i):n.setDate(i));case"FullYear":break;default:return}s=i,r=t.month(),a=29!==(a=t.date())||1!==r||Rt(s)?a:28,o?n.setUTCFullYear(s,r,a):n.setFullYear(s,r,a)}}function te(t){return E(this[t=nt(t)])?this[t]():this}function ee(t,e){if("object"==typeof t){var i,n=rt(t=ot(t)),o=n.length;for(i=0;i<o;i++)this[n[i].unit](t[n[i].unit])}else if(E(this[t=nt(t)]))return this[t](e);return this}function ie(t,e){return(t%e+e)%e}function ne(t,e){if(isNaN(t)||isNaN(e))return NaN;var i=ie(e,12);return t+=(e-i)/12,1===i?Rt(t)?29:28:31-i%7%2}qt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},H("M",["MM",2],"Mo",function(){return this.month()+1}),H("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),H("MMMM",0,0,function(t){return this.localeData().months(this,t)}),Tt("M",pt,St),Tt("MM",pt,ht),Tt("MMM",function(t,e){return e.monthsShortRegex(t)}),Tt("MMMM",function(t,e){return e.monthsRegex(t)}),Nt(["M","MM"],function(t,e){e[jt]=It(t)-1}),Nt(["MMM","MMMM"],function(t,e,i,n){var o=i._locale.monthsParse(t,n,i._strict);null!=o?e[jt]=o:v(i).invalidMonth=t});var oe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),se="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),re=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ae=Dt,le=Dt;function he(t,e){return t?r(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||re).test(e)?"format":"standalone"][t.month()]:r(this._months)?this._months:this._months.standalone}function de(t,e){return t?r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[re.test(e)?"format":"standalone"][t.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ce(t,e,i){var n,o,s,r=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=f([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(o=qt.call(this._shortMonthsParse,r))?o:null:-1!==(o=qt.call(this._longMonthsParse,r))?o:null:"MMM"===e?-1!==(o=qt.call(this._shortMonthsParse,r))||-1!==(o=qt.call(this._longMonthsParse,r))?o:null:-1!==(o=qt.call(this._longMonthsParse,r))||-1!==(o=qt.call(this._shortMonthsParse,r))?o:null}function ue(t,e,i){var n,o,s;if(this._monthsParseExact)return ce.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(o=f([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(s="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),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 pe(t,e){if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=It(e);else if(!c(e=t.localeData().monthsParse(e)))return t;var i=e,n=t.date();return n=n<29?n:Math.min(n,ne(t.year(),i)),t._isUTC?t._d.setUTCMonth(i,n):t._d.setMonth(i,n),t}function me(t){return null!=t?(pe(this,t),n.updateOffset(this,!0),this):Jt(this,"Month")}function fe(){return ne(this.year(),this.month())}function ge(t){return this._monthsParseExact?(l(this,"_monthsRegex")||ye.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=ae),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function ve(t){return this._monthsParseExact?(l(this,"_monthsRegex")||ye.call(this),t?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=le),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function ye(){function t(t,e){return e.length-t.length}var e,i,n,o,s=[],r=[],a=[];for(e=0;e<12;e++)i=f([2e3,e]),n=Et(this.monthsShort(i,"")),o=Et(this.months(i,"")),s.push(n),r.push(o),a.push(o),a.push(n);s.sort(t),r.sort(t),a.sort(t),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function be(t,e,i,n,o,s,r){var a;return t<100&&t>=0?(a=new Date(t+400,e,i,n,o,s,r),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,i,n,o,s,r),a}function _e(t){var e,i;return t<100&&t>=0?((i=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function we(t,e,i){var n=7+e-i;return-(7+_e(t,0,n).getUTCDay()-e)%7+n-1}function xe(t,e,i,n,o){var s,r,a=1+7*(e-1)+(7+i-n)%7+we(t,n,o);return a<=0?r=Xt(s=t-1)+a:a>Xt(t)?(s=t+1,r=a-Xt(t)):(s=t,r=a),{year:s,dayOfYear:r}}function ke(t,e,i){var n,o,s=we(t.year(),e,i),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?n=r+De(o=t.year()-1,e,i):r>De(t.year(),e,i)?(n=r-De(t.year(),e,i),o=t.year()+1):(o=t.year(),n=r),{week:n,year:o}}function De(t,e,i){var n=we(t,e,i),o=we(t+1,e,i);return(Xt(t)-n+o)/7}function Se(t){return ke(t,this._week.dow,this._week.doy).week}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),Tt("w",pt,St),Tt("ww",pt,ht),Tt("W",pt,St),Tt("WW",pt,ht),At(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=It(t)});var Ce={dow:0,doy:6};function Te(){return this._week.dow}function Me(){return this._week.doy}function Oe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Ee(t){var e=ke(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Pe(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function Ie(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Le(t,e){return t.slice(e,7).concat(t.slice(0,e))}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"),Tt("d",pt),Tt("e",pt),Tt("E",pt),Tt("dd",function(t,e){return e.weekdaysMinRegex(t)}),Tt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),Tt("dddd",function(t,e){return e.weekdaysRegex(t)}),At(["dd","ddd","dddd"],function(t,e,i,n){var o=i._locale.weekdaysParse(t,n,i._strict);null!=o?e.d=o:v(i).invalidWeekday=t}),At(["d","e","E"],function(t,e,i,n){e[n]=It(t)});var Ne="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ae="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Fe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Re=Dt,Ye=Dt,je=Dt;function ze(t,e){var i=r(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Le(i,this._week.dow):t?i[t.day()]:i}function He(t){return!0===t?Le(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Ge(t){return!0===t?Le(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function We(t,e,i){var n,o,s,r=t.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"===e?-1!==(o=qt.call(this._weekdaysParse,r))?o:null:"ddd"===e?-1!==(o=qt.call(this._shortWeekdaysParse,r))?o:null:-1!==(o=qt.call(this._minWeekdaysParse,r))?o:null:"dddd"===e?-1!==(o=qt.call(this._weekdaysParse,r))||-1!==(o=qt.call(this._shortWeekdaysParse,r))||-1!==(o=qt.call(this._minWeekdaysParse,r))?o:null:"ddd"===e?-1!==(o=qt.call(this._shortWeekdaysParse,r))||-1!==(o=qt.call(this._weekdaysParse,r))||-1!==(o=qt.call(this._minWeekdaysParse,r))?o:null:-1!==(o=qt.call(this._minWeekdaysParse,r))||-1!==(o=qt.call(this._weekdaysParse,r))||-1!==(o=qt.call(this._shortWeekdaysParse,r))?o:null}function Be(t,e,i){var n,o,s;if(this._weekdaysParseExact)return We.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(o=f([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),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 Ve(t){if(!this.isValid())return null!=t?this:NaN;var e=Jt(this,"Day");return null!=t?(t=Pe(t,this.localeData()),this.add(t-e,"d")):e}function Ue(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 Xe(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Ie(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function qe(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$e.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Re),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ke(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$e.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ye),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ze(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||$e.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=je),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $e(){function t(t,e){return e.length-t.length}var e,i,n,o,s,r=[],a=[],l=[],h=[];for(e=0;e<7;e++)i=f([2e3,1]).day(e),n=Et(this.weekdaysMin(i,"")),o=Et(this.weekdaysShort(i,"")),s=Et(this.weekdays(i,"")),r.push(n),a.push(o),l.push(s),h.push(n),h.push(o),h.push(s);r.sort(t),a.sort(t),l.sort(t),h.sort(t),this._weekdaysRegex=new RegExp("^("+h.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("^("+r.join("|")+")","i")}function Je(){return this.hours()%12||12}function Qe(){return this.hours()||24}function ti(t,e){H(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function ei(t,e){return e._meridiemParse}function ii(t){return"p"===(t+"").toLowerCase().charAt(0)}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Je),H("k",["kk",2],0,Qe),H("hmm",0,0,function(){return""+Je.apply(this)+F(this.minutes(),2)}),H("hmmss",0,0,function(){return""+Je.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),ti("a",!0),ti("A",!1),Tt("a",ei),Tt("A",ei),Tt("H",pt,Ct),Tt("h",pt,St),Tt("k",pt,St),Tt("HH",pt,ht),Tt("hh",pt,ht),Tt("kk",pt,ht),Tt("hmm",mt),Tt("hmmss",ft),Tt("Hmm",mt),Tt("Hmmss",ft),Nt(["H","HH"],Ht),Nt(["k","kk"],function(t,e,i){var n=It(t);e[Ht]=24===n?0:n}),Nt(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),Nt(["h","hh"],function(t,e,i){e[Ht]=It(t),v(i).bigHour=!0}),Nt("hmm",function(t,e,i){var n=t.length-2;e[Ht]=It(t.substr(0,n)),e[Gt]=It(t.substr(n)),v(i).bigHour=!0}),Nt("hmmss",function(t,e,i){var n=t.length-4,o=t.length-2;e[Ht]=It(t.substr(0,n)),e[Gt]=It(t.substr(n,2)),e[Wt]=It(t.substr(o)),v(i).bigHour=!0}),Nt("Hmm",function(t,e,i){var n=t.length-2;e[Ht]=It(t.substr(0,n)),e[Gt]=It(t.substr(n))}),Nt("Hmmss",function(t,e,i){var n=t.length-4,o=t.length-2;e[Ht]=It(t.substr(0,n)),e[Gt]=It(t.substr(n,2)),e[Wt]=It(t.substr(o))});var ni=/[ap]\.?m?\.?/i,oi=$t("Hours",!0);function si(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}var ri,ai={calendar:N,longDateFormat:U,invalidDate:q,ordinal:Z,dayOfMonthOrdinalParse:$,relativeTime:Q,months:oe,monthsShort:se,week:Ce,weekdays:Ne,weekdaysMin:Fe,weekdaysShort:Ae,meridiemParse:ni},li={},hi={};function di(t,e){var i,n=Math.min(t.length,e.length);for(i=0;i<n;i+=1)if(t[i]!==e[i])return i;return n}function ci(t){return t?t.toLowerCase().replace("_","-"):t}function ui(t){for(var e,i,n,o,s=0;s<t.length;){for(e=(o=ci(t[s]).split("-")).length,i=(i=ci(t[s+1]))?i.split("-"):null;e>0;){if(n=mi(o.slice(0,e).join("-")))return n;if(i&&i.length>=e&&di(o,i)>=e-1)break;e--}s++}return ri}function pi(t){return!(!t||!t.match("^[^/\\\\]*$"))}function mi(e){var i=null;if(void 0===li[e]&&t&&t.exports&&pi(e))try{i=ri._abbr,o("./locale/"+e),fi(i)}catch(t){li[e]=null}return li[e]}function fi(t,e){var i;return t&&((i=d(e)?yi(t):gi(t,e))?ri=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),ri._abbr}function gi(t,e){if(null!==e){var i,n=ai;if(e.abbr=t,null!=li[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."),n=li[t]._config;else if(null!=e.parentLocale)if(null!=li[e.parentLocale])n=li[e.parentLocale]._config;else{if(null==(i=mi(e.parentLocale)))return hi[e.parentLocale]||(hi[e.parentLocale]=[]),hi[e.parentLocale].push({name:t,config:e}),null;n=i._config}return li[t]=new L(I(n,e)),hi[t]&&hi[t].forEach(function(t){gi(t.name,t.config)}),fi(t),li[t]}return delete li[t],null}function vi(t,e){if(null!=e){var i,n,o=ai;null!=li[t]&&null!=li[t].parentLocale?li[t].set(I(li[t]._config,e)):(null!=(n=mi(t))&&(o=n._config),e=I(o,e),null==n&&(e.abbr=t),(i=new L(e)).parentLocale=li[t],li[t]=i),fi(t)}else null!=li[t]&&(null!=li[t].parentLocale?(li[t]=li[t].parentLocale,t===fi()&&fi(t)):null!=li[t]&&delete li[t]);return li[t]}function yi(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return ri;if(!r(t)){if(e=mi(t))return e;t=[t]}return ui(t)}function bi(){return T(li)}function _i(t){var e,i=t._a;return i&&-2===v(t).overflow&&(e=i[jt]<0||i[jt]>11?jt:i[zt]<1||i[zt]>ne(i[Yt],i[jt])?zt:i[Ht]<0||i[Ht]>24||24===i[Ht]&&(0!==i[Gt]||0!==i[Wt]||0!==i[Bt])?Ht:i[Gt]<0||i[Gt]>59?Gt:i[Wt]<0||i[Wt]>59?Wt:i[Bt]<0||i[Bt]>999?Bt:-1,v(t)._overflowDayOfYear&&(e<Yt||e>zt)&&(e=zt),v(t)._overflowWeeks&&-1===e&&(e=Vt),v(t)._overflowWeekday&&-1===e&&(e=Ut),v(t).overflow=e),t}var wi=/^\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)?)?$/,xi=/^\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)?)?$/,ki=/Z|[+-]\d\d(?::?\d\d)?/,Di=[["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}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Si=[["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/]],Ci=/^\/?Date\((-?\d+)/i,Ti=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Mi={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Oi(t){var e,i,n,o,s,r,a=t._i,l=wi.exec(a)||xi.exec(a),h=Di.length,d=Si.length;if(l){for(v(t).iso=!0,e=0,i=h;e<i;e++)if(Di[e][1].exec(l[1])){o=Di[e][0],n=!1!==Di[e][2];break}if(null==o)return void(t._isValid=!1);if(l[3]){for(e=0,i=d;e<i;e++)if(Si[e][1].exec(l[3])){s=(l[2]||" ")+Si[e][0];break}if(null==s)return void(t._isValid=!1)}if(!n&&null!=s)return void(t._isValid=!1);if(l[4]){if(!ki.exec(l[4]))return void(t._isValid=!1);r="Z"}t._f=o+(s||"")+(r||""),Hi(t)}else t._isValid=!1}function Ei(t,e,i,n,o,s){var r=[Pi(t),se.indexOf(e),parseInt(i,10),parseInt(n,10),parseInt(o,10)];return s&&r.push(parseInt(s,10)),r}function Pi(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function Ii(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Li(t,e,i){return!t||Ae.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(v(i).weekdayMismatch=!0,i._isValid=!1,!1)}function Ni(t,e,i){if(t)return Mi[t];if(e)return 0;var n=parseInt(i,10),o=n%100;return(n-o)/100*60+o}function Ai(t){var e,i=Ti.exec(Ii(t._i));if(i){if(e=Ei(i[4],i[3],i[2],i[5],i[6],i[7]),!Li(i[1],e,t))return;t._a=e,t._tzm=Ni(i[8],i[9],i[10]),t._d=_e.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),v(t).rfc2822=!0}else t._isValid=!1}function Fi(t){var e=Ci.exec(t._i);null===e?(Oi(t),!1===t._isValid&&(delete t._isValid,Ai(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:n.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Ri(t,e,i){return null!=t?t:null!=e?e:i}function Yi(t){var e=new Date(n.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ji(t){var e,i,n,o,s,r=[];if(!t._d){for(n=Yi(t),t._w&&null==t._a[zt]&&null==t._a[jt]&&zi(t),null!=t._dayOfYear&&(s=Ri(t._a[Yt],n[Yt]),(t._dayOfYear>Xt(s)||0===t._dayOfYear)&&(v(t)._overflowDayOfYear=!0),i=_e(s,0,t._dayOfYear),t._a[jt]=i.getUTCMonth(),t._a[zt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=n[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ht]&&0===t._a[Gt]&&0===t._a[Wt]&&0===t._a[Bt]&&(t._nextDay=!0,t._a[Ht]=0),t._d=(t._useUTC?_e:be).apply(null,r),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ht]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(v(t).weekdayMismatch=!0)}}function zi(t){var e,i,n,o,s,r,a,l,h;null!=(e=t._w).GG||null!=e.W||null!=e.E?(s=1,r=4,i=Ri(e.GG,t._a[Yt],ke(Ki(),1,4).year),n=Ri(e.W,1),((o=Ri(e.E,1))<1||o>7)&&(l=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,h=ke(Ki(),s,r),i=Ri(e.gg,t._a[Yt],h.year),n=Ri(e.w,h.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+s,(e.e<0||e.e>6)&&(l=!0)):o=s),n<1||n>De(i,s,r)?v(t)._overflowWeeks=!0:null!=l?v(t)._overflowWeekday=!0:(a=xe(i,n,o,s,r),t._a[Yt]=a.year,t._dayOfYear=a.dayOfYear)}function Hi(t){if(t._f!==n.ISO_8601)if(t._f!==n.RFC_2822){t._a=[],v(t).empty=!0;var e,i,o,s,r,a,l,h=""+t._i,d=h.length,c=0;for(l=(o=V(t._f,t._locale).match(R)||[]).length,e=0;e<l;e++)s=o[e],(i=(h.match(Mt(s,t))||[])[0])&&((r=h.substr(0,h.indexOf(i))).length>0&&v(t).unusedInput.push(r),h=h.slice(h.indexOf(i)+i.length),c+=i.length),z[s]?(i?v(t).empty=!1:v(t).unusedTokens.push(s),Ft(s,i,t)):t._strict&&!i&&v(t).unusedTokens.push(s);v(t).charsLeftOver=d-c,h.length>0&&v(t).unusedInput.push(h),t._a[Ht]<=12&&!0===v(t).bigHour&&t._a[Ht]>0&&(v(t).bigHour=void 0),v(t).parsedDateParts=t._a.slice(0),v(t).meridiem=t._meridiem,t._a[Ht]=Gi(t._locale,t._a[Ht],t._meridiem),null!==(a=v(t).era)&&(t._a[Yt]=t._locale.erasConvertYear(a,t._a[Yt])),ji(t),_i(t)}else Ai(t);else Oi(t)}function Gi(t,e,i){var n;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}function Wi(t){var e,i,n,o,s,r,a=!1,l=t._f.length;if(0===l)return v(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;o<l;o++)s=0,r=!1,e=x({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[o],Hi(e),y(e)&&(r=!0),s+=v(e).charsLeftOver,s+=10*v(e).unusedTokens.length,v(e).score=s,a?s<n&&(n=s,i=e):(null==n||s<n||r)&&(n=s,i=e,r&&(a=!0));m(t,i||e)}function Bi(t){if(!t._d){var e=ot(t._i),i=void 0===e.day?e.date:e.day;t._a=p([e.year,e.month,i,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ji(t)}}function Vi(t){var e=new k(_i(Ui(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Ui(t){var e=t._i,i=t._f;return t._locale=t._locale||yi(t._l),null===e||void 0===i&&""===e?b({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),D(e)?new k(_i(e)):(u(e)?t._d=e:r(i)?Wi(t):i?Hi(t):Xi(t),y(t)||(t._d=null),t))}function Xi(t){var e=t._i;d(e)?t._d=new Date(n.now()):u(e)?t._d=new Date(e.valueOf()):"string"==typeof e?Fi(t):r(e)?(t._a=p(e.slice(0),function(t){return parseInt(t,10)}),ji(t)):a(e)?Bi(t):c(e)?t._d=new Date(e):n.createFromInputFallback(t)}function qi(t,e,i,n,o){var s={};return!0!==e&&!1!==e||(n=e,e=void 0),!0!==i&&!1!==i||(n=i,i=void 0),(a(t)&&h(t)||r(t)&&0===t.length)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=i,s._i=t,s._f=e,s._strict=n,Vi(s)}function Ki(t,e,i,n){return qi(t,e,i,n,!1)}n.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){};var Zi=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ki.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:b()}),$i=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ki.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:b()});function Ji(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return Ki();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}function Qi(){return Ji("isBefore",[].slice.call(arguments,0))}function tn(){return Ji("isAfter",[].slice.call(arguments,0))}var en=function(){return Date.now?Date.now():+new Date},nn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function on(t){var e,i,n=!1,o=nn.length;for(e in t)if(l(t,e)&&(-1===qt.call(nn,e)||null!=t[e]&&isNaN(t[e])))return!1;for(i=0;i<o;++i)if(t[nn[i]]){if(n)return!1;parseFloat(t[nn[i]])!==It(t[nn[i]])&&(n=!0)}return!0}function sn(){return this._isValid}function rn(){return On(NaN)}function an(t){var e=ot(t),i=e.year||0,n=e.quarter||0,o=e.month||0,s=e.week||e.isoWeek||0,r=e.day||0,a=e.hour||0,l=e.minute||0,h=e.second||0,d=e.millisecond||0;this._isValid=on(e),this._milliseconds=+d+1e3*h+6e4*l+1e3*a*60*60,this._days=+r+7*s,this._months=+o+3*n+12*i,this._data={},this._locale=yi(),this._bubble()}function ln(t){return t instanceof an}function hn(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function dn(t,e,i){var n,o=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),r=0;for(n=0;n<o;n++)It(t[n])!==It(e[n])&&r++;return r+s}function cn(t,e){H(t,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+F(~~(t/60),2)+e+F(~~t%60,2)})}cn("Z",":"),cn("ZZ",""),Tt("Z",xt),Tt("ZZ",xt),Nt(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=pn(xt,t)});var un=/([\+\-]|\d\d)/gi;function pn(t,e){var i,n,o=(e||"").match(t);return null===o?null:0===(n=60*(i=((o[o.length-1]||[])+"").match(un)||["-",0,0])[1]+It(i[2]))?0:"+"===i[0]?n:-n}function mn(t,e){var i,o;return e._isUTC?(i=e.clone(),o=(D(t)||u(t)?t.valueOf():Ki(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+o),n.updateOffset(i,!1),i):Ki(t).local()}function fn(t){return-Math.round(t._d.getTimezoneOffset())}function gn(t,e,i){var o,s=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=pn(xt,t)))return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&e&&(o=fn(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),s!==t&&(!e||this._changeInProgress?Nn(this,On(t-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:fn(this)}function vn(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function yn(t){return this.utcOffset(0,t)}function bn(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(fn(this),"m")),this}function _n(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=pn(wt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function wn(t){return!!this.isValid()&&(t=t?Ki(t).utcOffset():0,(this.utcOffset()-t)%60==0)}function xn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function kn(){if(!d(this._isDSTShifted))return this._isDSTShifted;var t,e={};return x(e,this),(e=Ui(e))._a?(t=e._isUTC?f(e._a):Ki(e._a),this._isDSTShifted=this.isValid()&&dn(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Dn(){return!!this.isValid()&&!this._isUTC}function Sn(){return!!this.isValid()&&this._isUTC}function Cn(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Tn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Mn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function On(t,e){var i,n,o,s=t,r=null;return ln(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:c(t)||!isNaN(+t)?(s={},e?s[e]=+t:s.milliseconds=+t):(r=Tn.exec(t))?(i="-"===r[1]?-1:1,s={y:0,d:It(r[zt])*i,h:It(r[Ht])*i,m:It(r[Gt])*i,s:It(r[Wt])*i,ms:It(hn(1e3*r[Bt]))*i}):(r=Mn.exec(t))?(i="-"===r[1]?-1:1,s={y:En(r[2],i),M:En(r[3],i),w:En(r[4],i),d:En(r[5],i),h:En(r[6],i),m:En(r[7],i),s:En(r[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(o=In(Ki(s.from),Ki(s.to)),(s={}).ms=o.milliseconds,s.M=o.months),n=new an(s),ln(t)&&l(t,"_locale")&&(n._locale=t._locale),ln(t)&&l(t,"_isValid")&&(n._isValid=t._isValid),n}function En(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function Pn(t,e){var i={};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 In(t,e){var i;return t.isValid()&&e.isValid()?(e=mn(e,t),t.isBefore(e)?i=Pn(t,e):((i=Pn(e,t)).milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function Ln(t,e){return function(i,n){var o;return null===n||isNaN(+n)||(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."),o=i,i=n,n=o),Nn(this,On(i,n),t),this}}function Nn(t,e,i,o){var s=e._milliseconds,r=hn(e._days),a=hn(e._months);t.isValid()&&(o=null==o||o,a&&pe(t,Jt(t,"Month")+a*i),r&&Qt(t,"Date",Jt(t,"Date")+r*i),s&&t._d.setTime(t._d.valueOf()+s*i),o&&n.updateOffset(t,r||a))}On.fn=an.prototype,On.invalid=rn;var An=Ln(1,"add"),Fn=Ln(-1,"subtract");function Rn(t){return"string"==typeof t||t instanceof String}function Yn(t){return D(t)||u(t)||Rn(t)||c(t)||zn(t)||jn(t)||null==t}function jn(t){var e,i,n=a(t)&&!h(t),o=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r=s.length;for(e=0;e<r;e+=1)i=s[e],o=o||l(t,i);return n&&o}function zn(t){var e=r(t),i=!1;return e&&(i=0===t.filter(function(e){return!c(e)&&Rn(t)}).length),e&&i}function Hn(t){var e,i,n=a(t)&&!h(t),o=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<s.length;e+=1)i=s[e],o=o||l(t,i);return n&&o}function Gn(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 Wn(t,e){1===arguments.length&&(arguments[0]?Yn(arguments[0])?(t=arguments[0],e=void 0):Hn(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var i=t||Ki(),o=mn(i,this).startOf("day"),s=n.calendarFormat(this,o)||"sameElse",r=e&&(E(e[s])?e[s].call(this,i):e[s]);return this.format(r||this.localeData().calendar(s,this,Ki(i)))}function Bn(){return new k(this)}function Vn(t,e){var i=D(t)?t:Ki(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=nt(e)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())}function Un(t,e){var i=D(t)?t:Ki(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=nt(e)||"millisecond")?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())}function Xn(t,e,i,n){var o=D(t)?t:Ki(t),s=D(e)?e:Ki(e);return!!(this.isValid()&&o.isValid()&&s.isValid())&&("("===(n=n||"()")[0]?this.isAfter(o,i):!this.isBefore(o,i))&&(")"===n[1]?this.isBefore(s,i):!this.isAfter(s,i))}function qn(t,e){var i,n=D(t)?t:Ki(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=nt(e)||"millisecond")?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))}function Kn(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Zn(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function $n(t,e,i){var n,o,s;if(!this.isValid())return NaN;if(!(n=mn(t,this)).isValid())return NaN;switch(o=6e4*(n.utcOffset()-this.utcOffset()),e=nt(e)){case"year":s=Jn(this,n)/12;break;case"month":s=Jn(this,n);break;case"quarter":s=Jn(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-o)/864e5;break;case"week":s=(this-n-o)/6048e5;break;default:s=this-n}return i?s:Pt(s)}function Jn(t,e){if(t.date()<e.date())return-Jn(e,t);var i=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(i,"months");return-(i+(e-n<0?(e-n)/(n-t.clone().add(i-1,"months")):(e-n)/(t.clone().add(i+1,"months")-n)))||0}function Qn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function to(t){if(!this.isValid())return null;var e=!0!==t,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?B(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):E(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(i,"Z")):B(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,i,n,o="moment",s="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),t="["+o+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",n=s+'[")]',this.format(t+e+i+n)}function io(t){t||(t=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var e=B(this,t);return this.localeData().postformat(e)}function no(t,e){return this.isValid()&&(D(t)&&t.isValid()||Ki(t).isValid())?On({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function oo(t){return this.from(Ki(),t)}function so(t,e){return this.isValid()&&(D(t)&&t.isValid()||Ki(t).isValid())?On({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ro(t){return this.to(Ki(),t)}function ao(t){var e;return void 0===t?this._locale._abbr:(null!=(e=yi(t))&&(this._locale=e),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var lo=C("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)});function ho(){return this._locale}var co=1e3,uo=60*co,po=60*uo,mo=3506328*po;function fo(t,e){return(t%e+e)%e}function go(t,e,i){return t<100&&t>=0?new Date(t+400,e,i)-mo:new Date(t,e,i).valueOf()}function vo(t,e,i){return t<100&&t>=0?Date.UTC(t+400,e,i)-mo:Date.UTC(t,e,i)}function yo(t){var e,i;if(void 0===(t=nt(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?vo:go,t){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=fo(e+(this._isUTC?0:this.utcOffset()*uo),po);break;case"minute":e=this._d.valueOf(),e-=fo(e,uo);break;case"second":e=this._d.valueOf(),e-=fo(e,co)}return this._d.setTime(e),n.updateOffset(this,!0),this}function bo(t){var e,i;if(void 0===(t=nt(t))||"millisecond"===t||!this.isValid())return this;switch(i=this._isUTC?vo:go,t){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=po-fo(e+(this._isUTC?0:this.utcOffset()*uo),po)-1;break;case"minute":e=this._d.valueOf(),e+=uo-fo(e,uo)-1;break;case"second":e=this._d.valueOf(),e+=co-fo(e,co)-1}return this._d.setTime(e),n.updateOffset(this,!0),this}function _o(){return this._d.valueOf()-6e4*(this._offset||0)}function wo(){return Math.floor(this.valueOf()/1e3)}function xo(){return new Date(this.valueOf())}function ko(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Do(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function So(){return this.isValid()?this.toISOString():null}function Co(){return y(this)}function To(){return m({},v(this))}function Mo(){return v(this).overflow}function Oo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Eo(t,e){var i,o,s,r=this._eras||yi("en")._eras;for(i=0,o=r.length;i<o;++i)switch("string"==typeof r[i].since&&(s=n(r[i].since).startOf("day"),r[i].since=s.valueOf()),typeof r[i].until){case"undefined":r[i].until=1/0;break;case"string":s=n(r[i].until).startOf("day").valueOf(),r[i].until=s.valueOf()}return r}function Po(t,e,i){var n,o,s,r,a,l=this.eras();for(t=t.toUpperCase(),n=0,o=l.length;n<o;++n)if(s=l[n].name.toUpperCase(),r=l[n].abbr.toUpperCase(),a=l[n].narrow.toUpperCase(),i)switch(e){case"N":case"NN":case"NNN":if(r===t)return l[n];break;case"NNNN":if(s===t)return l[n];break;case"NNNNN":if(a===t)return l[n]}else if([s,r,a].indexOf(t)>=0)return l[n]}function Io(t,e){var i=t.since<=t.until?1:-1;return void 0===e?n(t.since).year():n(t.since).year()+(e-t.offset)*i}function Lo(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].name;if(n[t].until<=i&&i<=n[t].since)return n[t].name}return""}function No(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].narrow;if(n[t].until<=i&&i<=n[t].since)return n[t].narrow}return""}function Ao(){var t,e,i,n=this.localeData().eras();for(t=0,e=n.length;t<e;++t){if(i=this.clone().startOf("day").valueOf(),n[t].since<=i&&i<=n[t].until)return n[t].abbr;if(n[t].until<=i&&i<=n[t].since)return n[t].abbr}return""}function Fo(){var t,e,i,o,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t)if(i=s[t].since<=s[t].until?1:-1,o=this.clone().startOf("day").valueOf(),s[t].since<=o&&o<=s[t].until||s[t].until<=o&&o<=s[t].since)return(this.year()-n(s[t].since).year())*i+s[t].offset;return this.year()}function Ro(t){return l(this,"_erasNameRegex")||Bo.call(this),t?this._erasNameRegex:this._erasRegex}function Yo(t){return l(this,"_erasAbbrRegex")||Bo.call(this),t?this._erasAbbrRegex:this._erasRegex}function jo(t){return l(this,"_erasNarrowRegex")||Bo.call(this),t?this._erasNarrowRegex:this._erasRegex}function zo(t,e){return e.erasAbbrRegex(t)}function Ho(t,e){return e.erasNameRegex(t)}function Go(t,e){return e.erasNarrowRegex(t)}function Wo(t,e){return e._eraYearOrdinalRegex||bt}function Bo(){var t,e,i,n,o,s=[],r=[],a=[],l=[],h=this.eras();for(t=0,e=h.length;t<e;++t)i=Et(h[t].name),n=Et(h[t].abbr),o=Et(h[t].narrow),r.push(i),s.push(n),a.push(o),l.push(i),l.push(n),l.push(o);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function Vo(t,e){H(0,[t,t.length],0,e)}function Uo(t){return Jo.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Xo(t){return Jo.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function qo(){return De(this.year(),1,4)}function Ko(){return De(this.isoWeekYear(),1,4)}function Zo(){var t=this.localeData()._week;return De(this.year(),t.dow,t.doy)}function $o(){var t=this.localeData()._week;return De(this.weekYear(),t.dow,t.doy)}function Jo(t,e,i,n,o){var s;return null==t?ke(this,n,o).year:(e>(s=De(t,n,o))&&(e=s),Qo.call(this,t,e,i,n,o))}function Qo(t,e,i,n,o){var s=xe(t,e,i,n,o),r=_e(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function ts(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),Tt("N",zo),Tt("NN",zo),Tt("NNN",zo),Tt("NNNN",Ho),Tt("NNNNN",Go),Nt(["N","NN","NNN","NNNN","NNNNN"],function(t,e,i,n){var o=i._locale.erasParse(t,n,i._strict);o?v(i).era=o:v(i).invalidEra=t}),Tt("y",bt),Tt("yy",bt),Tt("yyy",bt),Tt("yyyy",bt),Tt("yo",Wo),Nt(["y","yy","yyy","yyyy"],Yt),Nt(["yo"],function(t,e,i,n){var o;i._locale._eraYearOrdinalRegex&&(o=t.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?e[Yt]=i._locale.eraYearOrdinalParse(t,o):e[Yt]=parseInt(t,10)}),H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Vo("gggg","weekYear"),Vo("ggggg","weekYear"),Vo("GGGG","isoWeekYear"),Vo("GGGGG","isoWeekYear"),Tt("G",_t),Tt("g",_t),Tt("GG",pt,ht),Tt("gg",pt,ht),Tt("GGGG",vt,ct),Tt("gggg",vt,ct),Tt("GGGGG",yt,ut),Tt("ggggg",yt,ut),At(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=It(t)}),At(["gg","GG"],function(t,e,i,o){e[o]=n.parseTwoDigitYear(t)}),H("Q",0,"Qo","quarter"),Tt("Q",lt),Nt("Q",function(t,e){e[jt]=3*(It(t)-1)}),H("D",["DD",2],"Do","date"),Tt("D",pt,St),Tt("DD",pt,ht),Tt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Nt(["D","DD"],zt),Nt("Do",function(t,e){e[zt]=It(t.match(pt)[0])});var es=$t("Date",!0);function is(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}H("DDD",["DDDD",3],"DDDo","dayOfYear"),Tt("DDD",gt),Tt("DDDD",dt),Nt(["DDD","DDDD"],function(t,e,i){i._dayOfYear=It(t)}),H("m",["mm",2],0,"minute"),Tt("m",pt,Ct),Tt("mm",pt,ht),Nt(["m","mm"],Gt);var ns=$t("Minutes",!1);H("s",["ss",2],0,"second"),Tt("s",pt,Ct),Tt("ss",pt,ht),Nt(["s","ss"],Wt);var os,ss,rs=$t("Seconds",!1);for(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()}),Tt("S",gt,lt),Tt("SS",gt,ht),Tt("SSS",gt,dt),os="SSSS";os.length<=9;os+="S")Tt(os,bt);function as(t,e){e[Bt]=It(1e3*("0."+t))}for(os="S";os.length<=9;os+="S")Nt(os,as);function ls(){return this._isUTC?"UTC":""}function hs(){return this._isUTC?"Coordinated Universal Time":""}ss=$t("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var ds=k.prototype;function cs(t){return Ki(1e3*t)}function us(){return Ki.apply(null,arguments).parseZone()}function ps(t){return t}ds.add=An,ds.calendar=Wn,ds.clone=Bn,ds.diff=$n,ds.endOf=bo,ds.format=io,ds.from=no,ds.fromNow=oo,ds.to=so,ds.toNow=ro,ds.get=te,ds.invalidAt=Mo,ds.isAfter=Vn,ds.isBefore=Un,ds.isBetween=Xn,ds.isSame=qn,ds.isSameOrAfter=Kn,ds.isSameOrBefore=Zn,ds.isValid=Co,ds.lang=lo,ds.locale=ao,ds.localeData=ho,ds.max=$i,ds.min=Zi,ds.parsingFlags=To,ds.set=ee,ds.startOf=yo,ds.subtract=Fn,ds.toArray=ko,ds.toObject=Do,ds.toDate=xo,ds.toISOString=to,ds.inspect=eo,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ds[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ds.toJSON=So,ds.toString=Qn,ds.unix=wo,ds.valueOf=_o,ds.creationData=Oo,ds.eraName=Lo,ds.eraNarrow=No,ds.eraAbbr=Ao,ds.eraYear=Fo,ds.year=Kt,ds.isLeapYear=Zt,ds.weekYear=Uo,ds.isoWeekYear=Xo,ds.quarter=ds.quarters=ts,ds.month=me,ds.daysInMonth=fe,ds.week=ds.weeks=Oe,ds.isoWeek=ds.isoWeeks=Ee,ds.weeksInYear=Zo,ds.weeksInWeekYear=$o,ds.isoWeeksInYear=qo,ds.isoWeeksInISOWeekYear=Ko,ds.date=es,ds.day=ds.days=Ve,ds.weekday=Ue,ds.isoWeekday=Xe,ds.dayOfYear=is,ds.hour=ds.hours=oi,ds.minute=ds.minutes=ns,ds.second=ds.seconds=rs,ds.millisecond=ds.milliseconds=ss,ds.utcOffset=gn,ds.utc=yn,ds.local=bn,ds.parseZone=_n,ds.hasAlignedHourOffset=wn,ds.isDST=xn,ds.isLocal=Dn,ds.isUtcOffset=Sn,ds.isUtc=Cn,ds.isUTC=Cn,ds.zoneAbbr=ls,ds.zoneName=hs,ds.dates=C("dates accessor is deprecated. Use date instead.",es),ds.months=C("months accessor is deprecated. Use month instead",me),ds.years=C("years accessor is deprecated. Use year instead",Kt),ds.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vn),ds.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",kn);var ms=L.prototype;function fs(t,e,i,n){var o=yi(),s=f().set(n,e);return o[i](s,t)}function gs(t,e,i){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return fs(t,e,i,"month");var n,o=[];for(n=0;n<12;n++)o[n]=fs(t,n,i,"month");return o}function vs(t,e,i,n){"boolean"==typeof t?(c(e)&&(i=e,e=void 0),e=e||""):(i=e=t,t=!1,c(e)&&(i=e,e=void 0),e=e||"");var o,s=yi(),r=t?s._week.dow:0,a=[];if(null!=i)return fs(e,(i+r)%7,n,"day");for(o=0;o<7;o++)a[o]=fs(e,(o+r)%7,n,"day");return a}function ys(t,e){return gs(t,e,"months")}function bs(t,e){return gs(t,e,"monthsShort")}function _s(t,e,i){return vs(t,e,i,"weekdays")}function ws(t,e,i){return vs(t,e,i,"weekdaysShort")}function xs(t,e,i){return vs(t,e,i,"weekdaysMin")}ms.calendar=A,ms.longDateFormat=X,ms.invalidDate=K,ms.ordinal=J,ms.preparse=ps,ms.postformat=ps,ms.relativeTime=tt,ms.pastFuture=et,ms.set=P,ms.eras=Eo,ms.erasParse=Po,ms.erasConvertYear=Io,ms.erasAbbrRegex=Yo,ms.erasNameRegex=Ro,ms.erasNarrowRegex=jo,ms.months=he,ms.monthsShort=de,ms.monthsParse=ue,ms.monthsRegex=ve,ms.monthsShortRegex=ge,ms.week=Se,ms.firstDayOfYear=Me,ms.firstDayOfWeek=Te,ms.weekdays=ze,ms.weekdaysMin=Ge,ms.weekdaysShort=He,ms.weekdaysParse=Be,ms.weekdaysRegex=qe,ms.weekdaysShortRegex=Ke,ms.weekdaysMinRegex=Ze,ms.isPM=ii,ms.meridiem=si,fi("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===It(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),n.lang=C("moment.lang is deprecated. Use moment.locale instead.",fi),n.langData=C("moment.langData is deprecated. Use moment.localeData instead.",yi);var ks=Math.abs;function Ds(){var t=this._data;return this._milliseconds=ks(this._milliseconds),this._days=ks(this._days),this._months=ks(this._months),t.milliseconds=ks(t.milliseconds),t.seconds=ks(t.seconds),t.minutes=ks(t.minutes),t.hours=ks(t.hours),t.months=ks(t.months),t.years=ks(t.years),this}function Ss(t,e,i,n){var o=On(e,i);return t._milliseconds+=n*o._milliseconds,t._days+=n*o._days,t._months+=n*o._months,t._bubble()}function Cs(t,e){return Ss(this,t,e,1)}function Ts(t,e){return Ss(this,t,e,-1)}function Ms(t){return t<0?Math.floor(t):Math.ceil(t)}function Os(){var t,e,i,n,o,s=this._milliseconds,r=this._days,a=this._months,l=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*Ms(Ps(a)+r),r=0,a=0),l.milliseconds=s%1e3,t=Pt(s/1e3),l.seconds=t%60,e=Pt(t/60),l.minutes=e%60,i=Pt(e/60),l.hours=i%24,r+=Pt(i/24),a+=o=Pt(Es(r)),r-=Ms(Ps(o)),n=Pt(a/12),a%=12,l.days=r,l.months=a,l.years=n,this}function Es(t){return 4800*t/146097}function Ps(t){return 146097*t/4800}function Is(t){if(!this.isValid())return NaN;var e,i,n=this._milliseconds;if("month"===(t=nt(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,i=this._months+Es(e),t){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Ps(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 Ls(t){return function(){return this.as(t)}}var Ns=Ls("ms"),As=Ls("s"),Fs=Ls("m"),Rs=Ls("h"),Ys=Ls("d"),js=Ls("w"),zs=Ls("M"),Hs=Ls("Q"),Gs=Ls("y"),Ws=Ns;function Bs(){return On(this)}function Vs(t){return t=nt(t),this.isValid()?this[t+"s"]():NaN}function Us(t){return function(){return this.isValid()?this._data[t]:NaN}}var Xs=Us("milliseconds"),qs=Us("seconds"),Ks=Us("minutes"),Zs=Us("hours"),$s=Us("days"),Js=Us("months"),Qs=Us("years");function tr(){return Pt(this.days()/7)}var er=Math.round,ir={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nr(t,e,i,n,o){return o.relativeTime(e||1,!!i,t,n)}function or(t,e,i,n){var o=On(t).abs(),s=er(o.as("s")),r=er(o.as("m")),a=er(o.as("h")),l=er(o.as("d")),h=er(o.as("M")),d=er(o.as("w")),c=er(o.as("y")),u=s<=i.ss&&["s",s]||s<i.s&&["ss",s]||r<=1&&["m"]||r<i.m&&["mm",r]||a<=1&&["h"]||a<i.h&&["hh",a]||l<=1&&["d"]||l<i.d&&["dd",l];return null!=i.w&&(u=u||d<=1&&["w"]||d<i.w&&["ww",d]),(u=u||h<=1&&["M"]||h<i.M&&["MM",h]||c<=1&&["y"]||["yy",c])[2]=e,u[3]=+t>0,u[4]=n,nr.apply(null,u)}function sr(t){return void 0===t?er:"function"==typeof t&&(er=t,!0)}function rr(t,e){return void 0!==ir[t]&&(void 0===e?ir[t]:(ir[t]=e,"s"===t&&(ir.ss=e-1),!0))}function ar(t,e){if(!this.isValid())return this.localeData().invalidDate();var i,n,o=!1,s=ir;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(o=t),"object"==typeof e&&(s=Object.assign({},ir,e),null!=e.s&&null==e.ss&&(s.ss=e.s-1)),n=or(this,!o,s,i=this.localeData()),o&&(n=i.pastFuture(+this,n)),i.postformat(n)}var lr=Math.abs;function hr(t){return(t>0)-(t<0)||+t}function dr(){if(!this.isValid())return this.localeData().invalidDate();var t,e,i,n,o,s,r,a,l=lr(this._milliseconds)/1e3,h=lr(this._days),d=lr(this._months),c=this.asSeconds();return c?(t=Pt(l/60),e=Pt(t/60),l%=60,t%=60,i=Pt(d/12),d%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=c<0?"-":"",s=hr(this._months)!==hr(c)?"-":"",r=hr(this._days)!==hr(c)?"-":"",a=hr(this._milliseconds)!==hr(c)?"-":"",o+"P"+(i?s+i+"Y":"")+(d?s+d+"M":"")+(h?r+h+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+n+"S":"")):"P0D"}var cr=an.prototype;return cr.isValid=sn,cr.abs=Ds,cr.add=Cs,cr.subtract=Ts,cr.as=Is,cr.asMilliseconds=Ns,cr.asSeconds=As,cr.asMinutes=Fs,cr.asHours=Rs,cr.asDays=Ys,cr.asWeeks=js,cr.asMonths=zs,cr.asQuarters=Hs,cr.asYears=Gs,cr.valueOf=Ws,cr._bubble=Os,cr.clone=Bs,cr.get=Vs,cr.milliseconds=Xs,cr.seconds=qs,cr.minutes=Ks,cr.hours=Zs,cr.days=$s,cr.weeks=tr,cr.months=Js,cr.years=Qs,cr.humanize=ar,cr.toISOString=dr,cr.toString=dr,cr.toJSON=dr,cr.locale=ao,cr.localeData=ho,cr.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",dr),cr.lang=lo,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Tt("x",_t),Tt("X",kt),Nt("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t))}),Nt("x",function(t,e,i){i._d=new Date(It(t))}),
//! moment.js
n.version="2.30.1",s(Ki),n.fn=ds,n.min=Qi,n.max=tn,n.now=en,n.utc=f,n.unix=cs,n.months=ys,n.isDate=u,n.locale=fi,n.invalid=b,n.duration=On,n.isMoment=D,n.weekdays=_s,n.parseZone=us,n.localeData=yi,n.isDuration=ln,n.monthsShort=bs,n.weekdaysMin=xs,n.defineLocale=gi,n.updateLocale=vi,n.locales=bi,n.weekdaysShort=ws,n.normalizeUnits=nt,n.relativeTimeRounding=sr,n.relativeTimeThreshold=rr,n.calendarFormat=Gn,n.prototype=ds,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()}(r)),r.exports}var l,h;l||(l=1,h=function(t){
//! moment.js locale configuration
function e(t,e,i,n){var o={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[t+" Tage",t+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[t+" Monate",t+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[t+" Jahre",t+" Jahren"]};return e?o[i][0]:o[i][1]}return t.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:e,mm:"%d Minuten",h:e,hh:"%d Stunden",d:e,dd:e,w:e,ww:"%d Wochen",M:e,MM:e,y:e,yy:e},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})},h(a()));var d;d||(d=1,function(t,e){e(a())}(0,function(t){
//! moment.js locale configuration
var e="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],o=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;return t.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(t,n){return t?/-MMM-/.test(n)?i[t.month()]:e[t.month()]:e},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}));var c;c||(c=1,function(t,e){e(a())}(0,function(t){
//! moment.js locale configuration
var e=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],n=t.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:e,monthsShortRegex:e,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(t,e){switch(e){case"D":return t+(1===t?"er":"");default:case"M":case"Q":case"DDD":case"d":return t+(1===t?"er":"e");case"w":case"W":return t+(1===t?"re":"e")}},week:{dow:1,doy:4}});return n}));var u;u||(u=1,function(t,e){e(a())}(0,function(t){return t.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}));var p;p||(p=1,function(t,e){e(a())}(0,function(t){
//! moment.js locale configuration
var e=t.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(t,e){return"元"===e[1]?1:parseInt(e[1]||t,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(t){return"午後"===t},meridiem:function(t,e,i){return t<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(t){return t.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(t){return this.week()!==t.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(t,e){switch(e){case"y":return 1===t?"元年":t+"年";case"d":case"D":case"DDD":return t+"日";default:return t}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return e}));var m;m||(m=1,function(t,e){e(a())}(0,function(t){
//! moment.js locale configuration
var e="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],o=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,s=t.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(t,n){return t?/-MMM-/.test(n)?i[t.month()]:e[t.month()]:e},monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(t){return t+(1===t||8===t||t>=20?"ste":"de")},week:{dow:1,doy:4}});return s}));var f;f||(f=1,function(t,e){e(a())}(0,function(t){
//! moment.js locale configuration
var e="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),n=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function o(t){return t%10<5&&t%10>1&&~~(t/10)%10!=1}function s(t,e,i){var n=t+" ";switch(i){case"ss":return n+(o(t)?"sekundy":"sekund");case"m":return e?"minuta":"minutę";case"mm":return n+(o(t)?"minuty":"minut");case"h":return e?"godzina":"godzinę";case"hh":return n+(o(t)?"godziny":"godzin");case"ww":return n+(o(t)?"tygodnie":"tygodni");case"MM":return n+(o(t)?"miesiące":"miesięcy");case"yy":return n+(o(t)?"lata":"lat")}}return t.defineLocale("pl",{months:function(t,n){return t?/D MMMM/.test(n)?i[t.month()]:e[t.month()]:e},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:s,m:s,mm:s,h:s,hh:s,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:s,M:"miesiąc",MM:s,y:"rok",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}));var g;g||(g=1,function(t,e){e(a())}(0,function(t){function e(t,e,i){var n,o;return"m"===i?e?"минута":"минуту":t+" "+(n=+t,o={ss:e?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:e?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[i].split("_"),n%10==1&&n%100!=11?o[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?o[1]:o[2])}var i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],n=t.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:e,m:e,mm:e,h:"час",hh:e,d:"день",dd:e,w:"неделя",ww:e,M:"месяц",MM:e,y:"год",yy:e},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(t){return/^(дня|вечера)$/.test(t)},meridiem:function(t,e,i){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-я";default:return t}},week:{dow:1,doy:4}});return n}));var v;v||(v=1,function(t,e){e(a())}(0,function(t){
//! moment.js locale configuration
var e={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},i=t.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(t,e,i){return t<12?i?"öö":"ÖÖ":i?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(t){return"ös"===t||"ÖS"===t},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(t,i){switch(i){case"d":case"D":case"Do":case"DD":return t;default:if(0===t)return t+"'ıncı";var n=t%10;return t+(e[n]||e[t%100-n]||e[t>=100?100:null])}},week:{dow:1,doy:7}});return i}));var y;y||(y=1,function(t,e){e(a())}(0,function(t){function e(t,e,i){var n,o;return"m"===i?e?"хвилина":"хвилину":"h"===i?e?"година":"годину":t+" "+(n=+t,o={ss:e?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:e?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:e?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[i].split("_"),n%10==1&&n%100!=11?o[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?o[1]:o[2])}function i(t){return function(){return t+"о"+(11===this.hours()?"б":"")+"] LT"}}var n=t.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(t,e){var i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===t?i.nominative.slice(1,7).concat(i.nominative.slice(0,1)):t?i[/(\[[ВвУу]\]) ?dddd/.test(e)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(e)?"genitive":"nominative"][t.day()]:i.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:e,m:e,mm:e,h:"годину",hh:e,d:"день",dd:e,M:"місяць",MM:e,y:"рік",yy:e},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(t){return/^(дня|вечора)$/.test(t)},meridiem:function(t,e,i){return t<4?"ночі":t<12?"ранку":t<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":case"w":case"W":return t+"-й";case"D":return t+"-го";default:return t}},week:{dow:1,doy:7}});return n}));var b,_,w,x,k,D,S,C,T,M,O,E,P,I,L,N,A={};function F(){if(_)return b;_=1;var t=function(t){return t&&t.Math===Math&&t};return b=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof i&&i)||t("object"==typeof b&&b)||function(){return this}()||Function("return this")()}function R(){return x?w:(x=1,w=function(t){try{return!!t()}catch(t){return!0}})}function Y(){return D?k:(D=1,k=!R()(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))}function j(){if(C)return S;C=1;var t=Y(),e=Function.prototype,i=e.apply,n=e.call;return S="object"==typeof Reflect&&Reflect.apply||(t?n.bind(i):function(){return n.apply(i,arguments)}),S}function z(){if(M)return T;M=1;var t=Y(),e=Function.prototype,i=e.call,n=t&&e.bind.bind(i,i);return T=t?n:function(t){return function(){return i.apply(t,arguments)}},T}function H(){if(E)return O;E=1;var t=z(),e=t({}.toString),i=t("".slice);return O=function(t){return i(e(t),8,-1)},O}function G(){if(I)return P;I=1;var t=H(),e=z();return P=function(i){if("Function"===t(i))return e(i)}}function W(){if(N)return L;N=1;var t="object"==typeof document&&document.all;return L=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}var B,V,U,X,q={};function K(){return V?B:(V=1,B=!R()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Z(){if(X)return U;X=1;var t=Y(),e=Function.prototype.call;return U=t?e.bind(e):function(){return e.apply(e,arguments)},U}var $,J,Q,tt,et,it,nt,ot,st,rt,at,lt,ht,dt,ct,ut,pt,mt,ft,gt,vt,yt,bt,_t,wt,xt,kt,Dt,St,Ct,Tt,Mt,Ot,Et,Pt,It,Lt,Nt={};function At(){if($)return Nt;$=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,i=e&&!t.call({1:2},1);return Nt.f=i?function(t){var i=e(this,t);return!!i&&i.enumerable}:t,Nt}function Ft(){return Q?J:(Q=1,J=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function Rt(){if(et)return tt;et=1;var t=z(),e=R(),i=H(),n=Object,o=t("".split);return tt=e(function(){return!n("z").propertyIsEnumerable(0)})?function(t){return"String"===i(t)?o(t,""):n(t)}:n,tt}function Yt(){return nt||(nt=1,it=function(t){return null==t}),it}function jt(){if(st)return ot;st=1;var t=Yt(),e=TypeError;return ot=function(i){if(t(i))throw new e("Can't call method on "+i);return i},ot}function zt(){if(at)return rt;at=1;var t=Rt(),e=jt();return rt=function(i){return t(e(i))},rt}function Ht(){if(ht)return lt;ht=1;var t=W();return lt=function(e){return"object"==typeof e?null!==e:t(e)},lt}function Gt(){return ct?dt:(ct=1,dt={})}function Wt(){if(pt)return ut;pt=1;var t=Gt(),e=F(),i=W(),n=function(t){return i(t)?t:void 0};return ut=function(i,o){return arguments.length<2?n(t[i])||n(e[i]):t[i]&&t[i][o]||e[i]&&e[i][o]},ut}function Bt(){return ft?mt:(ft=1,mt=z()({}.isPrototypeOf))}function Vt(){if(vt)return gt;vt=1;var t=F().navigator,e=t&&t.userAgent;return gt=e?String(e):""}function Ut(){if(bt)return yt;bt=1;var t,e,i=F(),n=Vt(),o=i.process,s=i.Deno,r=o&&o.versions||s&&s.version,a=r&&r.v8;return a&&(e=(t=a.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&n&&(!(t=n.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=n.match(/Chrome\/(\d+)/))&&(e=+t[1]),yt=e}function Xt(){if(wt)return _t;wt=1;var t=Ut(),e=R(),i=F().String;return _t=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41}),_t}function qt(){return kt?xt:(kt=1,xt=Xt()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Kt(){if(St)return Dt;St=1;var t=Wt(),e=W(),i=Bt(),n=Object;return Dt=qt()?function(t){return"symbol"==typeof t}:function(o){var s=t("Symbol");return e(s)&&i(s.prototype,n(o))},Dt}function Zt(){if(Tt)return Ct;Tt=1;var t=String;return Ct=function(e){try{return t(e)}catch(t){return"Object"}}}function $t(){if(Ot)return Mt;Ot=1;var t=W(),e=Zt(),i=TypeError;return Mt=function(n){if(t(n))return n;throw new i(e(n)+" is not a function")}}function Jt(){if(Pt)return Et;Pt=1;var t=$t(),e=Yt();return Et=function(i,n){var o=i[n];return e(o)?void 0:t(o)}}function Qt(){if(Lt)return It;Lt=1;var t=Z(),e=W(),i=Ht(),n=TypeError;return It=function(o,s){var r,a;if("string"===s&&e(r=o.toString)&&!i(a=t(r,o)))return a;if(e(r=o.valueOf)&&!i(a=t(r,o)))return a;if("string"!==s&&e(r=o.toString)&&!i(a=t(r,o)))return a;throw new n("Can't convert object to primitive value")}}var te,ee,ie,ne,oe,se,re,ae,le,he,de,ce,ue,pe,me,fe,ge,ve,ye,be,_e,we,xe,ke,De,Se,Ce,Te,Me={exports:{}};function Oe(){return ee?te:(ee=1,te=!0)}function Ee(){if(ne)return ie;ne=1;var t=F(),e=Object.defineProperty;return ie=function(i,n){try{e(t,i,{value:n,configurable:!0,writable:!0})}catch(e){t[i]=n}return n}}function Pe(){if(oe)return Me.exports;oe=1;var t=Oe(),e=F(),i=Ee(),n="__core-js_shared__",o=Me.exports=e[n]||i(n,{});return(o.versions||(o.versions=[])).push({version:"3.44.0",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Me.exports}function Ie(){if(re)return se;re=1;var t=Pe();return se=function(e,i){return t[e]||(t[e]=i||{})}}function Le(){if(le)return ae;le=1;var t=jt(),e=Object;return ae=function(i){return e(t(i))}}function Ne(){if(de)return he;de=1;var t=z(),e=Le(),i=t({}.hasOwnProperty);return he=Object.hasOwn||function(t,n){return i(e(t),n)},he}function Ae(){if(ue)return ce;ue=1;var t=z(),e=0,i=Math.random(),n=t(1.1.toString);return ce=function(t){return"Symbol("+(void 0===t?"":t)+")_"+n(++e+i,36)}}function Fe(){if(me)return pe;me=1;var t=F(),e=Ie(),i=Ne(),n=Ae(),o=Xt(),s=qt(),r=t.Symbol,a=e("wks"),l=s?r.for||r:r&&r.withoutSetter||n;return pe=function(t){return i(a,t)||(a[t]=o&&i(r,t)?r[t]:l("Symbol."+t)),a[t]}}function Re(){if(ge)return fe;ge=1;var t=Z(),e=Ht(),i=Kt(),n=Jt(),o=Qt(),s=TypeError,r=Fe()("toPrimitive");return fe=function(a,l){if(!e(a)||i(a))return a;var h,d=n(a,r);if(d){if(void 0===l&&(l="default"),h=t(d,a,l),!e(h)||i(h))return h;throw new s("Can't convert object to primitive value")}return void 0===l&&(l="number"),o(a,l)}}function Ye(){if(ye)return ve;ye=1;var t=Re(),e=Kt();return ve=function(i){var n=t(i,"string");return e(n)?n:n+""}}function je(){if(_e)return be;_e=1;var t=F(),e=Ht(),i=t.document,n=e(i)&&e(i.createElement);return be=function(t){return n?i.createElement(t):{}},be}function ze(){if(xe)return we;xe=1;var t=K(),e=R(),i=je();return we=!t&&!e(function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})}function He(){if(ke)return q;ke=1;var t=K(),e=Z(),i=At(),n=Ft(),o=zt(),s=Ye(),r=Ne(),a=ze(),l=Object.getOwnPropertyDescriptor;return q.f=t?l:function(t,h){if(t=o(t),h=s(h),a)try{return l(t,h)}catch(t){}if(r(t,h))return n(!e(i.f,t,h),t[h])},q}function Ge(){if(Se)return De;Se=1;var t=R(),e=W(),i=/#|\.prototype\./,n=function(i,n){var l=s[o(i)];return l===a||l!==r&&(e(n)?t(n):!!n)},o=n.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=n.data={},r=n.NATIVE="N",a=n.POLYFILL="P";return De=n}function We(){if(Te)return Ce;Te=1;var t=G(),e=$t(),i=Y(),n=t(t.bind);return Ce=function(t,o){return e(t),void 0===o?t:i?n(t,o):function(){return t.apply(o,arguments)}},Ce}var Be,Ve,Ue,Xe,qe,Ke,Ze,$e,Je,Qe,ti,ei,ii,ni,oi,si,ri,ai,li,hi,di,ci,ui,pi,mi,fi,gi,vi,yi,bi,_i,wi,xi,ki,Di,Si,Ci,Ti,Mi={};function Oi(){return Ve?Be:(Ve=1,Be=K()&&R()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Ei(){if(Xe)return Ue;Xe=1;var t=Ht(),e=String,i=TypeError;return Ue=function(n){if(t(n))return n;throw new i(e(n)+" is not an object")}}function Pi(){if(qe)return Mi;qe=1;var t=K(),e=ze(),i=Oi(),n=Ei(),o=Ye(),s=TypeError,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l="enumerable",h="configurable",d="writable";return Mi.f=t?i?function(t,e,i){if(n(t),e=o(e),n(i),"function"==typeof t&&"prototype"===e&&"value"in i&&d in i&&!i[d]){var s=a(t,e);s&&s[d]&&(t[e]=i.value,i={configurable:h in i?i[h]:s[h],enumerable:l in i?i[l]:s[l],writable:!1})}return r(t,e,i)}:r:function(t,i,a){if(n(t),i=o(i),n(a),e)try{return r(t,i,a)}catch(t){}if("get"in a||"set"in a)throw new s("Accessors not supported");return"value"in a&&(t[i]=a.value),t},Mi}function Ii(){if(Ze)return Ke;Ze=1;var t=K(),e=Pi(),i=Ft();return Ke=t?function(t,n,o){return e.f(t,n,i(1,o))}:function(t,e,i){return t[e]=i,t},Ke}function Li(){if(Je)return $e;Je=1;var t=F(),e=j(),i=G(),n=W(),o=He().f,s=Ge(),r=Gt(),a=We(),l=Ii(),h=Ne(),d=function(t){var i=function(n,o,s){if(this instanceof i){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,o)}return new t(n,o,s)}return e(t,this,arguments)};return i.prototype=t.prototype,i};return $e=function(e,c){var u,p,m,f,g,v,y,b,_,w=e.target,x=e.global,k=e.stat,D=e.proto,S=x?t:k?t[w]:t[w]&&t[w].prototype,C=x?r:r[w]||l(r,w,{})[w],T=C.prototype;for(f in c)p=!(u=s(x?f:w+(k?".":"#")+f,e.forced))&&S&&h(S,f),v=C[f],p&&(y=e.dontCallGetSet?(_=o(S,f))&&_.value:S[f]),g=p&&y?y:c[f],(u||D||typeof v!=typeof g)&&(b=e.bind&&p?a(g,t):e.wrap&&p?d(g):D&&n(g)?i(g):g,(e.sham||g&&g.sham||v&&v.sham)&&l(b,"sham",!0),l(C,f,b),D&&(h(r,m=w+"Prototype")||l(r,m,{}),l(r[m],f,g),e.real&&T&&(u||!T[f])&&l(T,f,g)))}}function Ni(){if(ti)return Qe;ti=1;var t=H();return Qe=Array.isArray||function(e){return"Array"===t(e)}}function Ai(){if(ii)return ei;ii=1;var t=Math.ceil,e=Math.floor;return ei=Math.trunc||function(i){var n=+i;return(n>0?e:t)(n)}}function Fi(){if(oi)return ni;oi=1;var t=Ai();return ni=function(e){var i=+e;return i!=i||0===i?0:t(i)},ni}function Ri(){if(ri)return si;ri=1;var t=Fi(),e=Math.min;return si=function(i){var n=t(i);return n>0?e(n,9007199254740991):0}}function Yi(){if(li)return ai;li=1;var t=Ri();return ai=function(e){return t(e.length)}}function ji(){if(di)return hi;di=1;var t=TypeError;return hi=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e},hi}function zi(){if(ui)return ci;ui=1;var t=K(),e=Pi(),i=Ft();return ci=function(n,o,s){t?e.f(n,o,i(0,s)):n[o]=s},ci}function Hi(){if(mi)return pi;mi=1;var t={};return t[Fe()("toStringTag")]="z",pi="[object z]"===String(t)}function Gi(){if(gi)return fi;gi=1;var t=Hi(),e=W(),i=H(),n=Fe()("toStringTag"),o=Object,s="Arguments"===i(function(){return arguments}());return fi=t?i:function(t){var r,a,l;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(a=function(t,e){try{return t[e]}catch(t){}}(r=o(t),n))?a:s?i(r):"Object"===(l=i(r))&&e(r.callee)?"Arguments":l},fi}function Wi(){if(yi)return vi;yi=1;var t=z(),e=W(),i=Pe(),n=t(Function.toString);return e(i.inspectSource)||(i.inspectSource=function(t){return n(t)}),vi=i.inspectSource}function Bi(){if(_i)return bi;_i=1;var t=z(),e=R(),i=W(),n=Gi(),o=Wt(),s=Wi(),r=function(){},a=o("Reflect","construct"),l=/^\s*(?:class|function)\b/,h=t(l.exec),d=!l.test(r),c=function(t){if(!i(t))return!1;try{return a(r,[],t),!0}catch(t){return!1}},u=function(t){if(!i(t))return!1;switch(n(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!h(l,s(t))}catch(t){return!0}};return u.sham=!0,bi=!a||e(function(){var t;return c(c.call)||!c(Object)||!c(function(){t=!0})||t})?u:c}function Vi(){if(xi)return wi;xi=1;var t=Ni(),e=Bi(),i=Ht(),n=Fe()("species"),o=Array;return wi=function(s){var r;return t(s)&&(r=s.constructor,(e(r)&&(r===o||t(r.prototype))||i(r)&&null===(r=r[n]))&&(r=void 0)),void 0===r?o:r}}function Ui(){if(Di)return ki;Di=1;var t=Vi();return ki=function(e,i){return new(t(e))(0===i?0:i)}}function Xi(){if(Ci)return Si;Ci=1;var t=R(),e=Fe(),i=Ut(),n=e("species");return Si=function(e){return i>=51||!t(function(){var t=[];return(t.constructor={})[n]=function(){return{foo:1}},1!==t[e](Boolean).foo})},Si}function qi(){if(Ti)return A;Ti=1;var t=Li(),e=R(),i=Ni(),n=Ht(),o=Le(),s=Yi(),r=ji(),a=zi(),l=Ui(),h=Xi(),d=Fe(),c=Ut(),u=d("isConcatSpreadable"),p=c>=51||!e(function(){var t=[];return t[u]=!1,t.concat()[0]!==t}),m=function(t){if(!n(t))return!1;var e=t[u];return void 0!==e?!!e:i(t)};return t({target:"Array",proto:!0,arity:1,forced:!p||!h("concat")},{concat:function(t){var e,i,n,h,d,c=o(this),u=l(c,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(m(d=-1===e?c:arguments[e]))for(h=s(d),r(p+h),i=0;i<h;i++,p++)i in d&&a(u,p,d[i]);else r(p+1),a(u,p++,d);return u.length=p,u}}),A}var Ki,Zi,$i={},Ji={};function Qi(){if(Zi)return Ki;Zi=1;var t=Gi(),e=String;return Ki=function(i){if("Symbol"===t(i))throw new TypeError("Cannot convert a Symbol value to a string");return e(i)}}var tn,en,nn,on,sn,rn,an,ln,hn,dn,cn,un,pn,mn,fn,gn,vn,yn,bn,_n={};function wn(){if(en)return tn;en=1;var t=Fi(),e=Math.max,i=Math.min;return tn=function(n,o){var s=t(n);return s<0?e(s+o,0):i(s,o)}}function xn(){if(on)return nn;on=1;var t=zt(),e=wn(),i=Yi(),n=function(n){return function(o,s,r){var a=t(o),l=i(a);if(0===l)return!n&&-1;var h,d=e(r,l);if(n&&s!=s){for(;l>d;)if((h=a[d++])!=h)return!0}else for(;l>d;d++)if((n||d in a)&&a[d]===s)return n||d||0;return!n&&-1}};return nn={includes:n(!0),indexOf:n(!1)}}function kn(){return rn?sn:(rn=1,sn={})}function Dn(){if(ln)return an;ln=1;var t=z(),e=Ne(),i=zt(),n=xn().indexOf,o=kn(),s=t([].push);return an=function(t,r){var a,l=i(t),h=0,d=[];for(a in l)!e(o,a)&&e(l,a)&&s(d,a);for(;r.length>h;)e(l,a=r[h++])&&(~n(d,a)||s(d,a));return d},an}function Sn(){return dn?hn:(dn=1,hn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Cn(){if(un)return cn;un=1;var t=Dn(),e=Sn();return cn=Object.keys||function(i){return t(i,e)}}function Tn(){if(pn)return _n;pn=1;var t=K(),e=Oi(),i=Pi(),n=Ei(),o=zt(),s=Cn();return _n.f=t&&!e?Object.defineProperties:function(t,e){n(t);for(var r,a=o(e),l=s(e),h=l.length,d=0;h>d;)i.f(t,r=l[d++],a[r]);return t},_n}function Mn(){return fn?mn:(fn=1,mn=Wt()("document","documentElement"))}function On(){if(vn)return gn;vn=1;var t=Ie(),e=Ae(),i=t("keys");return gn=function(t){return i[t]||(i[t]=e(t))}}function En(){if(bn)return yn;bn=1;var t,e=Ei(),i=Tn(),n=Sn(),o=kn(),s=Mn(),r=je(),a="prototype",l="script",h=On()("IE_PROTO"),d=function(){},c=function(t){return"<"+l+">"+t+"</"+l+">"},u=function(t){t.write(c("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,i,o;p="undefined"!=typeof document?document.domain&&t?u(t):(i=r("iframe"),o="java"+l+":",i.style.display="none",s.appendChild(i),i.src=String(o),(e=i.contentWindow.document).open(),e.write(c("document.F=Object")),e.close(),e.F):u(t);for(var h=n.length;h--;)delete p[a][n[h]];return p()};return o[h]=!0,yn=Object.create||function(t,n){var o;return null!==t?(d[a]=e(t),o=new d,d[a]=null,o[h]=t):o=p(),void 0===n?o:i.f(o,n)}}var Pn,In={};function Ln(){if(Pn)return In;Pn=1;var t=Dn(),e=Sn().concat("length","prototype");return In.f=Object.getOwnPropertyNames||function(i){return t(i,e)},In}var Nn,An,Fn,Rn={};function Yn(){return An?Nn:(An=1,Nn=z()([].slice))}function jn(){if(Fn)return Rn;Fn=1;var t=H(),e=zt(),i=Ln().f,n=Yn(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Rn.f=function(s){return o&&"Window"===t(s)?function(t){try{return i(t)}catch(t){return n(o)}}(s):i(e(s))},Rn}var zn,Hn,Gn,Wn,Bn,Vn={};function Un(){return zn||(zn=1,Vn.f=Object.getOwnPropertySymbols),Vn}function Xn(){if(Gn)return Hn;Gn=1;var t=Ii();return Hn=function(e,i,n,o){return o&&o.enumerable?e[i]=n:t(e,i,n),e}}function qn(){if(Bn)return Wn;Bn=1;var t=Pi();return Wn=function(e,i,n){return t.f(e,i,n)}}var Kn,Zn,$n,Jn,Qn,to,eo,io,no,oo,so,ro,ao,lo,ho,co,uo={};function po(){if(Kn)return uo;Kn=1;var t=Fe();return uo.f=t,uo}function mo(){if($n)return Zn;$n=1;var t=Gt(),e=Ne(),i=po(),n=Pi().f;return Zn=function(o){var s=t.Symbol||(t.Symbol={});e(s,o)||n(s,o,{value:i.f(o)})}}function fo(){if(Qn)return Jn;Qn=1;var t=Z(),e=Wt(),i=Fe(),n=Xn();return Jn=function(){var o=e("Symbol"),s=o&&o.prototype,r=s&&s.valueOf,a=i("toPrimitive");s&&!s[a]&&n(s,a,function(e){return t(r,this)},{arity:1})}}function go(){if(eo)return to;eo=1;var t=Hi(),e=Gi();return to=t?{}.toString:function(){return"[object "+e(this)+"]"}}function vo(){if(no)return io;no=1;var t=Hi(),e=Pi().f,i=Ii(),n=Ne(),o=go(),s=Fe()("toStringTag");return io=function(r,a,l,h){var d=l?r:r&&r.prototype;d&&(n(d,s)||e(d,s,{configurable:!0,value:a}),h&&!t&&i(d,"toString",o))},io}function yo(){if(so)return oo;so=1;var t=F(),e=W(),i=t.WeakMap;return oo=e(i)&&/native code/.test(String(i))}function bo(){if(ao)return ro;ao=1;var t,e,i,n=yo(),o=F(),s=Ht(),r=Ii(),a=Ne(),l=Pe(),h=On(),d=kn(),c="Object already initialized",u=o.TypeError,p=o.WeakMap;if(n||l.state){var m=l.state||(l.state=new p);m.get=m.get,m.has=m.has,m.set=m.set,t=function(t,e){if(m.has(t))throw new u(c);return e.facade=t,m.set(t,e),e},e=function(t){return m.get(t)||{}},i=function(t){return m.has(t)}}else{var f=h("state");d[f]=!0,t=function(t,e){if(a(t,f))throw new u(c);return e.facade=t,r(t,f,e),e},e=function(t){return a(t,f)?t[f]:{}},i=function(t){return a(t,f)}}return ro={set:t,get:e,has:i,enforce:function(n){return i(n)?e(n):t(n,{})},getterFor:function(t){return function(i){var n;if(!s(i)||(n=e(i)).type!==t)throw new u("Incompatible receiver, "+t+" required");return n}}},ro}function _o(){if(ho)return lo;ho=1;var t=We(),e=z(),i=Rt(),n=Le(),o=Yi(),s=Ui(),r=e([].push),a=function(e){var a=1===e,l=2===e,h=3===e,d=4===e,c=6===e,u=7===e,p=5===e||c;return function(m,f,g,v){for(var y,b,_=n(m),w=i(_),x=o(w),k=t(f,g),D=0,S=v||s,C=a?S(m,x):l||u?S(m,0):void 0;x>D;D++)if((p||D in w)&&(b=k(y=w[D],D,_),e))if(a)C[D]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return D;case 2:r(C,y)}else switch(e){case 4:return!1;case 7:r(C,y)}return c?-1:h||d?d:C}};return lo={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}var wo,xo,ko,Do={};function So(){return xo?wo:(xo=1,wo=Xt()&&!!Symbol.for&&!!Symbol.keyFor)}var Co,To={};var Mo,Oo,Eo,Po={};function Io(){if(Oo)return Mo;Oo=1;var t=z(),e=Ni(),i=W(),n=H(),o=Qi(),s=t([].push);return Mo=function(t){if(i(t))return t;if(e(t)){for(var r=t.length,a=[],l=0;l<r;l++){var h=t[l];"string"==typeof h?s(a,h):"number"!=typeof h&&"Number"!==n(h)&&"String"!==n(h)||s(a,o(h))}var d=a.length,c=!0;return function(t,i){if(c)return c=!1,i;if(e(this))return i;for(var n=0;n<d;n++)if(a[n]===t)return i}}},Mo}function Lo(){if(Eo)return Po;Eo=1;var t=Li(),e=Wt(),i=j(),n=Z(),o=z(),s=R(),r=W(),a=Kt(),l=Yn(),h=Io(),d=Xt(),c=String,u=e("JSON","stringify"),p=o(/./.exec),m=o("".charAt),f=o("".charCodeAt),g=o("".replace),v=o(1.1.toString),y=/[\uD800-\uDFFF]/g,b=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,w=!d||s(function(){var t=e("Symbol")("stringify detection");return"[null]"!==u([t])||"{}"!==u({a:t})||"{}"!==u(Object(t))}),x=s(function(){return'"\\udf06\\ud834"'!==u("\udf06\ud834")||'"\\udead"'!==u("\udead")}),k=function(t,e){var o=l(arguments),s=h(e);if(r(s)||void 0!==t&&!a(t))return o[1]=function(t,e){if(r(s)&&(e=n(s,this,c(t),e)),!a(e))return e},i(u,null,o)},D=function(t,e,i){var n=m(i,e-1),o=m(i,e+1);return p(b,t)&&!p(_,o)||p(_,t)&&!p(b,n)?"\\u"+v(f(t,0),16):t};return u&&t({target:"JSON",stat:!0,arity:3,forced:w||x},{stringify:function(t,e,n){var o=l(arguments),s=i(w?k:u,null,o);return x&&"string"==typeof s?g(s,y,D):s}}),Po}var No,Ao,Fo={};function Ro(){return Ao||(Ao=1,function(){if(co)return Ji;co=1;var t=Li(),e=F(),i=Z(),n=z(),o=Oe(),s=K(),r=Xt(),a=R(),l=Ne(),h=Bt(),d=Ei(),c=zt(),u=Ye(),p=Qi(),m=Ft(),f=En(),g=Cn(),v=Ln(),y=jn(),b=Un(),_=He(),w=Pi(),x=Tn(),k=At(),D=Xn(),S=qn(),C=Ie(),T=On(),M=kn(),O=Ae(),E=Fe(),P=po(),I=mo(),L=fo(),N=vo(),A=bo(),Y=_o().forEach,j=T("hidden"),H="Symbol",G="prototype",W=A.set,B=A.getterFor(H),V=Object[G],U=e.Symbol,X=U&&U[G],q=e.RangeError,$=e.TypeError,J=e.QObject,Q=_.f,tt=w.f,et=y.f,it=k.f,nt=n([].push),ot=C("symbols"),st=C("op-symbols"),rt=C("wks"),at=!J||!J[G]||!J[G].findChild,lt=function(t,e,i){var n=Q(V,e);n&&delete V[e],tt(t,e,i),n&&t!==V&&tt(V,e,n)},ht=s&&a(function(){return 7!==f(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a})?lt:tt,dt=function(t,e){var i=ot[t]=f(X);return W(i,{type:H,tag:t,description:e}),s||(i.description=e),i},ct=function(t,e,i){t===V&&ct(st,e,i),d(t);var n=u(e);return d(i),l(ot,n)?(i.enumerable?(l(t,j)&&t[j][n]&&(t[j][n]=!1),i=f(i,{enumerable:m(0,!1)})):(l(t,j)||tt(t,j,m(1,f(null))),t[j][n]=!0),ht(t,n,i)):tt(t,n,i)},ut=function(t,e){d(t);var n=c(e),o=g(n).concat(gt(n));return Y(o,function(e){s&&!i(pt,n,e)||ct(t,e,n[e])}),t},pt=function(t){var e=u(t),n=i(it,this,e);return!(this===V&&l(ot,e)&&!l(st,e))&&(!(n||!l(this,e)||!l(ot,e)||l(this,j)&&this[j][e])||n)},mt=function(t,e){var i=c(t),n=u(e);if(i!==V||!l(ot,n)||l(st,n)){var o=Q(i,n);return!o||!l(ot,n)||l(i,j)&&i[j][n]||(o.enumerable=!0),o}},ft=function(t){var e=et(c(t)),i=[];return Y(e,function(t){l(ot,t)||l(M,t)||nt(i,t)}),i},gt=function(t){var e=t===V,i=et(e?st:c(t)),n=[];return Y(i,function(t){!l(ot,t)||e&&!l(V,t)||nt(n,ot[t])}),n};r||(U=function(){if(h(X,this))throw new $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,n=O(t),o=function(t){var s=void 0===this?e:this;s===V&&i(o,st,t),l(s,j)&&l(s[j],n)&&(s[j][n]=!1);var r=m(1,t);try{ht(s,n,r)}catch(t){if(!(t instanceof q))throw t;lt(s,n,r)}};return s&&at&&ht(V,n,{configurable:!0,set:o}),dt(n,t)},D(X=U[G],"toString",function(){return B(this).tag}),D(U,"withoutSetter",function(t){return dt(O(t),t)}),k.f=pt,w.f=ct,x.f=ut,_.f=mt,v.f=y.f=ft,b.f=gt,P.f=function(t){return dt(E(t),t)},s&&(S(X,"description",{configurable:!0,get:function(){return B(this).description}}),o||D(V,"propertyIsEnumerable",pt,{unsafe:!0}))),t({global:!0,constructor:!0,wrap:!0,forced:!r,sham:!r},{Symbol:U}),Y(g(rt),function(t){I(t)}),t({target:H,stat:!0,forced:!r},{useSetter:function(){at=!0},useSimple:function(){at=!1}}),t({target:"Object",stat:!0,forced:!r,sham:!s},{create:function(t,e){return void 0===e?f(t):ut(f(t),e)},defineProperty:ct,defineProperties:ut,getOwnPropertyDescriptor:mt}),t({target:"Object",stat:!0,forced:!r},{getOwnPropertyNames:ft}),L(),N(U,H),M[j]=!0}(),function(){if(ko)return Do;ko=1;var t=Li(),e=Wt(),i=Ne(),n=Qi(),o=Ie(),s=So(),r=o("string-to-symbol-registry"),a=o("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!s},{for:function(t){var o=n(t);if(i(r,o))return r[o];var s=e("Symbol")(o);return r[o]=s,a[s]=o,s}})}(),function(){if(Co)return To;Co=1;var t=Li(),e=Ne(),i=Kt(),n=Zt(),o=Ie(),s=So(),r=o("symbol-to-string-registry");t({target:"Symbol",stat:!0,forced:!s},{keyFor:function(t){if(!i(t))throw new TypeError(n(t)+" is not a symbol");if(e(r,t))return r[t]}})}(),Lo(),function(){if(No)return Fo;No=1;var t=Li(),e=Xt(),i=R(),n=Un(),o=Le();t({target:"Object",stat:!0,forced:!e||i(function(){n.f(1)})},{getOwnPropertySymbols:function(t){var e=n.f;return e?e(o(t)):[]}})}()),$i}var Yo,jo={};function zo(){return Yo||(Yo=1,mo()("asyncDispose")),jo}var Ho;var Go,Wo={};function Bo(){return Go||(Go=1,mo()("dispose")),Wo}var Vo;var Uo;var Xo,qo={};function Ko(){return Xo||(Xo=1,mo()("iterator")),qo}var Zo;var $o;var Jo;var Qo;var ts;var es;var is,ns={};function os(){if(is)return ns;is=1;var t=mo(),e=fo();return t("toPrimitive"),e(),ns}var ss,rs={};var as;var ls,hs,ds,cs={};function us(){return ds?hs:(ds=1,qi(),Ro(),zo(),Ho||(Ho=1,mo()("asyncIterator")),Bo(),Vo||(Vo=1,mo()("hasInstance")),Uo||(Uo=1,mo()("isConcatSpreadable")),Ko(),Zo||(Zo=1,mo()("match")),$o||($o=1,mo()("matchAll")),Jo||(Jo=1,mo()("replace")),Qo||(Qo=1,mo()("search")),ts||(ts=1,mo()("species")),es||(es=1,mo()("split")),os(),function(){if(ss)return rs;ss=1;var t=Wt(),e=mo(),i=vo();e("toStringTag"),i(t("Symbol"),"Symbol")}(),as||(as=1,mo()("unscopables")),function(){if(ls)return cs;ls=1;var t=F();vo()(t.JSON,"JSON",!0)}(),hs=Gt().Symbol)}var ps,ms,fs,gs,vs,ys,bs,_s,ws,xs,ks,Ds,Ss,Cs,Ts,Ms,Os,Es,Ps,Is,Ls,Ns,As,Fs,Rs,Ys,js,zs,Hs,Gs,Ws,Bs,Vs,Us,Xs,qs={};function Ks(){return ms?ps:(ms=1,ps=function(){})}function Zs(){return gs?fs:(gs=1,fs={})}function $s(){if(ys)return vs;ys=1;var t=K(),e=Ne(),i=Function.prototype,n=t&&Object.getOwnPropertyDescriptor,o=e(i,"name"),s=o&&"something"===function(){}.name,r=o&&(!t||t&&n(i,"name").configurable);return vs={EXISTS:o,PROPER:s,CONFIGURABLE:r}}function Js(){return _s?bs:(_s=1,bs=!R()(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))}function Qs(){if(xs)return ws;xs=1;var t=Ne(),e=W(),i=Le(),n=On(),o=Js(),s=n("IE_PROTO"),r=Object,a=r.prototype;return ws=o?r.getPrototypeOf:function(n){var o=i(n);if(t(o,s))return o[s];var l=o.constructor;return e(l)&&o instanceof l?l.prototype:o instanceof r?a:null},ws}function tr(){if(Ds)return ks;Ds=1;var t,e,i,n=R(),o=W(),s=Ht(),r=En(),a=Qs(),l=Xn(),h=Fe(),d=Oe(),c=h("iterator"),u=!1;return[].keys&&("next"in(i=[].keys())?(e=a(a(i)))!==Object.prototype&&(t=e):u=!0),!s(t)||n(function(){var e={};return t[c].call(e)!==e})?t={}:d&&(t=r(t)),o(t[c])||l(t,c,function(){return this}),ks={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:u}}function er(){if(Cs)return Ss;Cs=1;var t=tr().IteratorPrototype,e=En(),i=Ft(),n=vo(),o=Zs(),s=function(){return this};return Ss=function(r,a,l,h){var d=a+" Iterator";return r.prototype=e(t,{next:i(+!h,l)}),n(r,d,!1,!0),o[d]=s,r}}function ir(){if(Ms)return Ts;Ms=1;var t=z(),e=$t();return Ts=function(i,n,o){try{return t(e(Object.getOwnPropertyDescriptor(i,n)[o]))}catch(t){}},Ts}function nr(){if(Es)return Os;Es=1;var t=Ht();return Os=function(e){return t(e)||null===e}}function or(){if(Is)return Ps;Is=1;var t=nr(),e=String,i=TypeError;return Ps=function(n){if(t(n))return n;throw new i("Can't set "+e(n)+" as a prototype")}}function sr(){if(Ns)return Ls;Ns=1;var t=ir(),e=Ht(),i=jt(),n=or();return Ls=Object.setPrototypeOf||("__proto__"in{}?function(){var o,s=!1,r={};try{(o=t(Object.prototype,"__proto__","set"))(r,[]),s=r instanceof Array}catch(t){}return function(t,r){return i(t),n(r),e(t)?(s?o(t,r):t.__proto__=r,t):t}}():void 0)}function rr(){if(Fs)return As;Fs=1;var t=Li(),e=Z(),i=Oe(),n=$s(),o=W(),s=er(),r=Qs(),a=sr(),l=vo(),h=Ii(),d=Xn(),c=Fe(),u=Zs(),p=tr(),m=n.PROPER,f=n.CONFIGURABLE,g=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,y=c("iterator"),b="keys",_="values",w="entries",x=function(){return this};return As=function(n,c,p,k,D,S,C){s(p,c,k);var T,M,O,E=function(t){if(t===D&&A)return A;if(!v&&t&&t in L)return L[t];switch(t){case b:case _:case w:return function(){return new p(this,t)}}return function(){return new p(this)}},P=c+" Iterator",I=!1,L=n.prototype,N=L[y]||L["@@iterator"]||D&&L[D],A=!v&&N||E(D),F="Array"===c&&L.entries||N;if(F&&(T=r(F.call(new n)))!==Object.prototype&&T.next&&(i||r(T)===g||(a?a(T,g):o(T[y])||d(T,y,x)),l(T,P,!0,!0),i&&(u[P]=x)),m&&D===_&&N&&N.name!==_&&(!i&&f?h(L,"name",_):(I=!0,A=function(){return e(N,this)})),D)if(M={values:E(_),keys:S?A:E(b),entries:E(w)},C)for(O in M)(v||I||!(O in L))&&d(L,O,M[O]);else t({target:c,proto:!0,forced:v||I},M);return i&&!C||L[y]===A||d(L,y,A,{name:D}),u[c]=A,M}}function ar(){return Ys?Rs:(Ys=1,Rs=function(t,e){return{value:t,done:e}})}function lr(){if(zs)return js;zs=1;var t=zt(),e=Ks(),i=Zs(),n=bo(),o=Pi().f,s=rr(),r=ar(),a=Oe(),l=K(),h="Array Iterator",d=n.set,c=n.getterFor(h);js=s(Array,"Array",function(e,i){d(this,{type:h,target:t(e),index:0,kind:i})},function(){var t=c(this),e=t.target,i=t.index++;if(!e||i>=e.length)return t.target=null,r(void 0,!0);switch(t.kind){case"keys":return r(i,!1);case"values":return r(e[i],!1)}return r([i,e[i]],!1)},"values");var u=i.Arguments=i.Array;if(e("keys"),e("values"),e("entries"),!a&&l&&"values"!==u.name)try{o(u,"name",{value:"values"})}catch(t){}return js}function hr(){return Gs?Hs:(Gs=1,Hs={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function dr(){if(Ws)return qs;Ws=1,lr();var t=hr(),e=F(),i=vo(),n=Zs();for(var o in t)i(e[o],o),n[o]=n.Array;return qs}function cr(){if(Vs)return Bs;Vs=1;var t=us();return dr(),Bs=t}var ur,pr,mr,fr,gr,vr,yr,br,_r,wr,xr,kr=n(Xs?Us:(Xs=1,Us=cr())),Dr={};function Sr(){if(mr)return pr;mr=1;var t=F(),e=Gt();return pr=function(i,n){var o=e[i+"Prototype"],s=o&&o[n];if(s)return s;var r=t[i],a=r&&r.prototype;return a&&a[n]}}function Cr(){return gr?fr:(gr=1,function(){if(ur)return Dr;ur=1;var t=Li(),e=Ni(),i=Bi(),n=Ht(),o=wn(),s=Yi(),r=zt(),a=zi(),l=Fe(),h=Xi(),d=Yn(),c=h("slice"),u=l("species"),p=Array,m=Math.max;t({target:"Array",proto:!0,forced:!c},{slice:function(t,l){var h,c,f,g=r(this),v=s(g),y=o(t,v),b=o(void 0===l?v:l,v);if(e(g)&&(h=g.constructor,(i(h)&&(h===p||e(h.prototype))||n(h)&&null===(h=h[u]))&&(h=void 0),h===p||void 0===h))return d(g,y,b);for(c=new(void 0===h?p:h)(m(b-y,0)),f=0;y<b;y++,f++)y in g&&a(c,f,g[y]);return c.length=f,c}})}(),fr=Sr()("Array","slice"))}function Tr(){if(yr)return vr;yr=1;var t=Bt(),e=Cr(),i=Array.prototype;return vr=function(n){var o=n.slice;return n===i||t(i,n)&&o===i.slice?e:o},vr}function Mr(){return _r?br:(_r=1,br=Tr())}var Or,Er,Pr,Ir,Lr,Nr,Ar,Fr,Rr,Yr=n(xr?wr:(xr=1,wr=Mr()));function jr(){if(Er)return Or;Er=1;var t=Wt(),e=z(),i=Ln(),n=Un(),o=Ei(),s=e([].concat);return Or=t("Reflect","ownKeys")||function(t){var e=i.f(o(t)),r=n.f;return r?s(e,r(t)):e},Or}function zr(){return Lr?Ir:(Lr=1,Pr||(Pr=1,Li()({target:"Reflect",stat:!0},{ownKeys:jr()})),Ir=Gt().Reflect.ownKeys)}function Hr(){return Ar?Nr:(Ar=1,Nr=zr())}var Gr,Wr,Br,Vr,Ur,Xr,qr,Kr=n(Rr?Fr:(Rr=1,Fr=Hr()));function Zr(){return Br?Wr:(Br=1,Gr||(Gr=1,Li()({target:"Array",stat:!0},{isArray:Ni()})),Wr=Gt().Array.isArray)}function $r(){return Ur?Vr:(Ur=1,Vr=Zr())}var Jr,Qr,ta,ea,ia,na,oa,sa,ra,aa=n(qr?Xr:(qr=1,Xr=$r())),la={};function ha(){return ta?Qr:(ta=1,function(){if(Jr)return la;Jr=1;var t=Li(),e=_o().map;t({target:"Array",proto:!0,forced:!Xi()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),Qr=Sr()("Array","map"))}function da(){if(ia)return ea;ia=1;var t=Bt(),e=ha(),i=Array.prototype;return ea=function(n){var o=n.map;return n===i||t(i,n)&&o===i.map?e:o},ea}function ca(){return oa?na:(oa=1,na=da())}var ua,pa,ma,fa,ga,va,ya,ba=n(ra?sa:(ra=1,sa=ca())),_a={};function wa(){return ma?pa:(ma=1,function(){if(ua)return _a;ua=1;var t=Li(),e=Le(),i=Cn();t({target:"Object",stat:!0,forced:R()(function(){i(1)})},{keys:function(t){return i(e(t))}})}(),pa=Gt().Object.keys)}function xa(){return ga?fa:(ga=1,fa=wa())}var ka,Da,Sa,Ca,Ta,Ma,Oa,Ea=n(ya?va:(ya=1,va=xa())),Pa={};function Ia(){return Sa?Da:(Sa=1,function(){if(ka)return Pa;ka=1;var t=Li(),e=Date,i=z()(e.prototype.getTime);t({target:"Date",stat:!0},{now:function(){return i(new e)}})}(),Da=Gt().Date.now)}function La(){return Ta?Ca:(Ta=1,Ca=Ia())}var Na,Aa,Fa,Ra,Ya,ja,za,Ha,Ga,Wa,Ba,Va=n(Oa?Ma:(Oa=1,Ma=La())),Ua={};function Xa(){if(Aa)return Na;Aa=1;var t=z(),e=$t(),i=Ht(),n=Ne(),o=Yn(),s=Y(),r=Function,a=t([].concat),l=t([].join),h={};return Na=s?r.bind:function(t){var s=e(this),d=s.prototype,c=o(arguments,1),u=function(){var e=a(c,o(arguments));return this instanceof u?function(t,e,i){if(!n(h,e)){for(var o=[],s=0;s<e;s++)o[s]="a["+s+"]";h[e]=r("C,a","return new C("+l(o,",")+")")}return h[e](t,i)}(s,e.length,e):s.apply(t,e)};return i(d)&&(u.prototype=d),u},Na}function qa(){return Ya?Ra:(Ya=1,function(){if(Fa)return Ua;Fa=1;var t=Li(),e=Xa();t({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e})}(),Ra=Sr()("Function","bind"))}function Ka(){if(za)return ja;za=1;var t=Bt(),e=qa(),i=Function.prototype;return ja=function(n){var o=n.bind;return n===i||t(i,n)&&o===i.bind?e:o},ja}function Za(){return Ga?Ha:(Ga=1,Ha=Ka())}var $a,Ja,Qa,tl,el,il,nl,ol,sl,rl,al,ll,hl,dl=n(Ba?Wa:(Ba=1,Wa=Za())),cl={};function ul(){if(Ja)return $a;Ja=1;var t=R();return $a=function(e,i){var n=[][e];return!!n&&t(function(){n.call(null,i||function(){return 1},1)})}}function pl(){if(tl)return Qa;tl=1;var t=_o().forEach,e=ul()("forEach");return Qa=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},Qa}function ml(){return nl?il:(nl=1,function(){if(el)return cl;el=1;var t=Li(),e=pl();t({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e})}(),il=Sr()("Array","forEach"))}function fl(){return sl?ol:(sl=1,ol=ml())}function gl(){if(al)return rl;al=1;var t=Gi(),e=Ne(),i=Bt(),n=fl(),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return rl=function(r){var a=r.forEach;return r===o||i(o,r)&&a===o.forEach||e(s,t(r))?n:a},rl}var vl,yl,bl,_l,wl,xl,kl,Dl,Sl,Cl=n(hl?ll:(hl=1,ll=gl())),Tl={};function Ml(){return bl?yl:(bl=1,function(){if(vl)return Tl;vl=1;var t=Li(),e=z(),i=Ni(),n=e([].reverse),o=[1,2];t({target:"Array",proto:!0,forced:String(o)===String(o.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),n(this)}})}(),yl=Sr()("Array","reverse"))}function Ol(){if(wl)return _l;wl=1;var t=Bt(),e=Ml(),i=Array.prototype;return _l=function(n){var o=n.reverse;return n===i||t(i,n)&&o===i.reverse?e:o},_l}function El(){return kl?xl:(kl=1,xl=Ol())}var Pl,Il,Ll,Nl,Al,Fl,Rl,Yl,jl,zl,Hl,Gl,Wl,Bl=n(Sl?Dl:(Sl=1,Dl=El())),Vl={};function Ul(){if(Il)return Pl;Il=1;var t=K(),e=Ni(),i=TypeError,n=Object.getOwnPropertyDescriptor,o=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return Pl=o?function(t,o){if(e(t)&&!n(t,"length").writable)throw new i("Cannot set read only .length");return t.length=o}:function(t,e){return t.length=e}}function Xl(){if(Nl)return Ll;Nl=1;var t=Zt(),e=TypeError;return Ll=function(i,n){if(!delete i[n])throw new e("Cannot delete property "+t(n)+" of "+t(i))}}function ql(){return Rl?Fl:(Rl=1,function(){if(Al)return Vl;Al=1;var t=Li(),e=Le(),i=wn(),n=Fi(),o=Yi(),s=Ul(),r=ji(),a=Ui(),l=zi(),h=Xl(),d=Xi()("splice"),c=Math.max,u=Math.min;t({target:"Array",proto:!0,forced:!d},{splice:function(t,d){var p,m,f,g,v,y,b=e(this),_=o(b),w=i(t,_),x=arguments.length;for(0===x?p=m=0:1===x?(p=0,m=_-w):(p=x-2,m=u(c(n(d),0),_-w)),r(_+p-m),f=a(b,m),g=0;g<m;g++)(v=w+g)in b&&l(f,g,b[v]);if(f.length=m,p<m){for(g=w;g<_-m;g++)y=g+p,(v=g+m)in b?b[y]=b[v]:h(b,y);for(g=_;g>_-m+p;g--)h(b,g-1)}else if(p>m)for(g=_-m;g>w;g--)y=g+p-1,(v=g+m-1)in b?b[y]=b[v]:h(b,y);for(g=0;g<p;g++)b[g+w]=arguments[g+2];return s(b,_-m+p),f}})}(),Fl=Sr()("Array","splice"))}function Kl(){if(jl)return Yl;jl=1;var t=Bt(),e=ql(),i=Array.prototype;return Yl=function(n){var o=n.splice;return n===i||t(i,n)&&o===i.splice?e:o},Yl}function Zl(){return Hl?zl:(Hl=1,zl=Kl())}var $l,Jl,Ql,th,eh,ih,nh,oh,sh,rh=n(Wl?Gl:(Wl=1,Gl=Zl())),ah={};function lh(){if(Jl)return $l;Jl=1;var t=K(),e=z(),i=Z(),n=R(),o=Cn(),s=Un(),r=At(),a=Le(),l=Rt(),h=Object.assign,d=Object.defineProperty,c=e([].concat);return $l=!h||n(function(){if(t&&1!==h({b:1},h(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},i={},n=Symbol("assign detection"),s="abcdefghijklmnopqrst";return e[n]=7,s.split("").forEach(function(t){i[t]=t}),7!==h({},e)[n]||o(h({},i)).join("")!==s})?function(e,n){for(var h=a(e),d=arguments.length,u=1,p=s.f,m=r.f;d>u;)for(var f,g=l(arguments[u++]),v=p?c(o(g),p(g)):o(g),y=v.length,b=0;y>b;)f=v[b++],t&&!i(m,g,f)||(h[f]=g[f]);return h}:h,$l}function hh(){return eh?th:(eh=1,function(){if(Ql)return ah;Ql=1;var t=Li(),e=lh();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}(),th=Gt().Object.assign)}function dh(){return nh?ih:(nh=1,ih=hh())}var ch,uh,ph,mh=n(sh?oh:(sh=1,oh=dh())),fh={};function gh(){return ph?uh:(ph=1,function(){if(ch)return fh;ch=1;var t=Li(),e=xn().includes,i=R(),n=Ks();t({target:"Array",proto:!0,forced:i(function(){return!Array(1).includes()})},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")}(),uh=Sr()("Array","includes"))}var vh,yh,bh,_h,wh,xh,kh,Dh,Sh,Ch,Th,Mh,Oh,Eh,Ph,Ih={};function Lh(){if(yh)return vh;yh=1;var t=Ht(),e=H(),i=Fe()("match");return vh=function(n){var o;return t(n)&&(void 0!==(o=n[i])?!!o:"RegExp"===e(n))},vh}function Nh(){if(_h)return bh;_h=1;var t=Lh(),e=TypeError;return bh=function(i){if(t(i))throw new e("The method doesn't accept regular expressions");return i},bh}function Ah(){if(xh)return wh;xh=1;var t=Fe()("match");return wh=function(e){var i=/./;try{"/./"[e](i)}catch(n){try{return i[t]=!1,"/./"[e](i)}catch(t){}}return!1}}function Fh(){return Sh?Dh:(Sh=1,function(){if(kh)return Ih;kh=1;var t=Li(),e=z(),i=Nh(),n=jt(),o=Qi(),s=Ah(),r=e("".indexOf);t({target:"String",proto:!0,forced:!s("includes")},{includes:function(t){return!!~r(o(n(this)),o(i(t)),arguments.length>1?arguments[1]:void 0)}})}(),Dh=Sr()("String","includes"))}function Rh(){if(Th)return Ch;Th=1;var t=Bt(),e=gh(),i=Fh(),n=Array.prototype,o=String.prototype;return Ch=function(s){var r=s.includes;return s===n||t(n,s)&&r===n.includes?e:"string"==typeof s||s===o||t(o,s)&&r===o.includes?i:r},Ch}function Yh(){return Oh?Mh:(Oh=1,Mh=Rh())}var jh,zh,Hh,Gh,Wh,Bh,Vh,Uh=n(Ph?Eh:(Ph=1,Eh=Yh())),Xh={};function qh(){return Hh?zh:(Hh=1,function(){if(jh)return Xh;jh=1;var t=Li(),e=R(),i=Le(),n=Qs(),o=Js();t({target:"Object",stat:!0,forced:e(function(){n(1)}),sham:!o},{getPrototypeOf:function(t){return n(i(t))}})}(),zh=Gt().Object.getPrototypeOf)}function Kh(){return Wh?Gh:(Wh=1,Gh=qh())}var Zh,$h,Jh,Qh,td,ed,id,nd,od=n(Vh?Bh:(Vh=1,Bh=Kh()));function sd(){return $h?Zh:($h=1,qi(),Zh=Sr()("Array","concat"))}function rd(){if(Qh)return Jh;Qh=1;var t=Bt(),e=sd(),i=Array.prototype;return Jh=function(n){var o=n.concat;return n===i||t(i,n)&&o===i.concat?e:o},Jh}function ad(){return ed?td:(ed=1,td=rd())}var ld,hd,dd,cd,ud,pd,md,fd,gd,vd=n(nd?id:(nd=1,id=ad())),yd={};function bd(){return dd?hd:(dd=1,function(){if(ld)return yd;ld=1;var t=Li(),e=_o().filter;t({target:"Array",proto:!0,forced:!Xi()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),hd=Sr()("Array","filter"))}function _d(){if(ud)return cd;ud=1;var t=Bt(),e=bd(),i=Array.prototype;return cd=function(n){var o=n.filter;return n===i||t(i,n)&&o===i.filter?e:o},cd}function wd(){return md?pd:(md=1,pd=_d())}var xd,kd,Dd,Sd,Cd,Td,Md,Od,Ed,Pd=n(gd?fd:(gd=1,fd=wd())),Id={};function Ld(){if(kd)return xd;kd=1;var t=K(),e=R(),i=z(),n=Qs(),o=Cn(),s=zt(),r=i(At().f),a=i([].push),l=t&&e(function(){var t=Object.create(null);return t[2]=2,!r(t,2)}),h=function(e){return function(i){for(var h,d=s(i),c=o(d),u=l&&null===n(d),p=c.length,m=0,f=[];p>m;)h=c[m++],t&&!(u?h in d:r(d,h))||a(f,e?[h,d[h]]:d[h]);return f}};return xd={entries:h(!0),values:h(!1)}}function Nd(){return Cd?Sd:(Cd=1,function(){if(Dd)return Id;Dd=1;var t=Li(),e=Ld().values;t({target:"Object",stat:!0},{values:function(t){return e(t)}})}(),Sd=Gt().Object.values)}function Ad(){return Md?Td:(Md=1,Td=Nd())}var Fd,Rd,Yd,jd,zd,Hd,Gd,Wd,Bd,Vd,Ud,Xd,qd,Kd=n(Ed?Od:(Ed=1,Od=Ad())),Zd={};function $d(){return Rd?Fd:(Rd=1,Fd="\t\n\v\f\r                　\u2028\u2029\ufeff")}function Jd(){if(jd)return Yd;jd=1;var t=z(),e=jt(),i=Qi(),n=$d(),o=t("".replace),s=RegExp("^["+n+"]+"),r=RegExp("(^|[^"+n+"])["+n+"]+$"),a=function(t){return function(n){var a=i(e(n));return 1&t&&(a=o(a,s,"")),2&t&&(a=o(a,r,"$1")),a}};return Yd={start:a(1),end:a(2),trim:a(3)}}function Qd(){if(Hd)return zd;Hd=1;var t=F(),e=R(),i=z(),n=Qi(),o=Jd().trim,s=$d(),r=t.parseInt,a=t.Symbol,l=a&&a.iterator,h=/^[+-]?0x/i,d=i(h.exec),c=8!==r(s+"08")||22!==r(s+"0x16")||l&&!e(function(){r(Object(l))});return zd=c?function(t,e){var i=o(n(t));return r(i,e>>>0||(d(h,i)?16:10))}:r,zd}function tc(){return Bd?Wd:(Bd=1,function(){if(Gd)return Zd;Gd=1;var t=Li(),e=Qd();t({global:!0,forced:parseInt!==e},{parseInt:e})}(),Wd=Gt().parseInt)}function ec(){return Ud?Vd:(Ud=1,Vd=tc())}var ic,nc,oc,sc,rc,ac,lc,hc,dc,cc=n(qd?Xd:(qd=1,Xd=ec())),uc={};function pc(){return oc?nc:(oc=1,function(){if(ic)return uc;ic=1;var t=Li(),e=G(),i=xn().indexOf,n=ul(),o=e([].indexOf),s=!!o&&1/o([1],1,-0)<0;t({target:"Array",proto:!0,forced:s||!n("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return s?o(this,t,e)||0:i(this,t,e)}})}(),nc=Sr()("Array","indexOf"))}function mc(){if(rc)return sc;rc=1;var t=Bt(),e=pc(),i=Array.prototype;return sc=function(n){var o=n.indexOf;return n===i||t(i,n)&&o===i.indexOf?e:o},sc}function fc(){return lc?ac:(lc=1,ac=mc())}var gc,vc,yc,bc,_c,wc,xc,kc=n(dc?hc:(dc=1,hc=fc())),Dc={};function Sc(){return yc?vc:(yc=1,function(){if(gc)return Dc;gc=1;var t=Li(),e=Ld().entries;t({target:"Object",stat:!0},{entries:function(t){return e(t)}})}(),vc=Gt().Object.entries)}function Cc(){return _c?bc:(_c=1,bc=Sc())}var Tc,Mc,Oc,Ec,Pc,Ic,Lc,Nc=n(xc?wc:(xc=1,wc=Cc()));function Ac(){if(Oc)return Mc;Oc=1,Tc||(Tc=1,Li()({target:"Object",stat:!0,sham:!K()},{create:En()}));var t=Gt().Object;return Mc=function(e,i){return t.create(e,i)}}function Fc(){return Pc?Ec:(Pc=1,Ec=Ac())}var Rc,Yc,jc,zc,Hc,Gc,Wc,Bc,Vc,Uc,Xc,qc,Kc,Zc=n(Lc?Ic:(Lc=1,Ic=Fc())),$c={};function Jc(){if(Yc)return Rc;Yc=1;var t=Fi(),e=Qi(),i=jt(),n=RangeError;return Rc=function(o){var s=e(i(this)),r="",a=t(o);if(a<0||a===1/0)throw new n("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(s+=s))1&a&&(r+=s);return r}}function Qc(){if(zc)return jc;zc=1;var t=z(),e=Ri(),i=Qi(),n=Jc(),o=jt(),s=t(n),r=t("".slice),a=Math.ceil,l=function(t){return function(n,l,h){var d,c,u=i(o(n)),p=e(l),m=u.length,f=void 0===h?" ":i(h);return p<=m||""===f?u:((c=s(f,a((d=p-m)/f.length))).length>d&&(c=r(c,0,d)),t?u+c:c+u)}};return jc={start:l(!1),end:l(!0)}}function tu(){if(Gc)return Hc;Gc=1;var t=z(),e=R(),i=Qc().start,n=RangeError,o=isFinite,s=Math.abs,r=Date.prototype,a=r.toISOString,l=t(r.getTime),h=t(r.getUTCDate),d=t(r.getUTCFullYear),c=t(r.getUTCHours),u=t(r.getUTCMilliseconds),p=t(r.getUTCMinutes),m=t(r.getUTCMonth),f=t(r.getUTCSeconds);return Hc=e(function(){return"0385-07-25T07:06:39.999Z"!==a.call(new Date(-50000000000001))})||!e(function(){a.call(new Date(NaN))})?function(){if(!o(l(this)))throw new n("Invalid time value");var t=this,e=d(t),r=u(t),a=e<0?"-":e>9999?"+":"";return a+i(s(e),a?6:4,0)+"-"+i(m(t)+1,2,0)+"-"+i(h(t),2,0)+"T"+i(c(t),2,0)+":"+i(p(t),2,0)+":"+i(f(t),2,0)+"."+i(r,3,0)+"Z"}:a,Hc}function eu(){if(Vc)return Bc;Vc=1,function(){if(Wc)return $c;Wc=1;var t=Li(),e=Z(),i=Le(),n=Re(),o=tu(),s=H();t({target:"Date",proto:!0,forced:R()(function(){return null!==new Date(NaN).toJSON()||1!==e(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(t){var r=i(this),a=n(r,"number");return"number"!=typeof a||isFinite(a)?"toISOString"in r||"Date"!==s(r)?r.toISOString():e(o,r):null}})}(),Lo();var t=Gt(),e=j();return t.JSON||(t.JSON={stringify:JSON.stringify}),Bc=function(i,n,o){return e(t.JSON.stringify,null,arguments)},Bc}function iu(){return Xc?Uc:(Xc=1,Uc=eu())}var nu,ou,su,ru,au,lu,hu,du=n(Kc?qc:(Kc=1,qc=iu())),cu={},uu={};function pu(){if(ou)return nu;ou=1;var t=F(),e=Vt(),i=H(),n=function(t){return e.slice(0,t.length)===t};return nu=n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function mu(){if(ru)return su;ru=1;var t=TypeError;return su=function(e,i){if(e<i)throw new t("Not enough arguments");return e}}function fu(){if(lu)return au;lu=1;var t,e=F(),i=j(),n=W(),o=pu(),s=Vt(),r=Yn(),a=mu(),l=e.Function,h=/MSIE .\./.test(s)||"BUN"===o&&((t=e.Bun.version.split(".")).length<3||"0"===t[0]&&(t[1]<3||"3"===t[1]&&"0"===t[2]));return au=function(t,e){var o=e?2:1;return h?function(s,h){var d=a(arguments.length,1)>o,c=n(s)?s:l(s),u=d?r(arguments,o):[],p=d?function(){i(c,this,u)}:c;return e?t(p,h):t(p)}:t},au}var gu,vu,yu,bu,_u,wu,xu={};function ku(){return vu||(vu=1,function(){if(hu)return uu;hu=1;var t=Li(),e=F(),i=fu()(e.setInterval,!0);t({global:!0,bind:!0,forced:e.setInterval!==i},{setInterval:i})}(),function(){if(gu)return xu;gu=1;var t=Li(),e=F(),i=fu()(e.setTimeout,!0);t({global:!0,bind:!0,forced:e.setTimeout!==i},{setTimeout:i})}()),cu}function Du(){return bu?yu:(bu=1,ku(),yu=Gt().setTimeout)}var Su,Cu,Tu,Mu,Ou,Eu,Pu,Iu,Lu,Nu,Au,Fu=n(wu?_u:(wu=1,_u=Du())),Ru={};function Yu(){if(Cu)return Su;Cu=1;var t=Le(),e=wn(),i=Yi();return Su=function(n){for(var o=t(this),s=i(o),r=arguments.length,a=e(r>1?arguments[1]:void 0,s),l=r>2?arguments[2]:void 0,h=void 0===l?s:e(l,s);h>a;)o[a++]=n;return o},Su}function ju(){return Ou?Mu:(Ou=1,function(){if(Tu)return Ru;Tu=1;var t=Li(),e=Yu(),i=Ks();t({target:"Array",proto:!0},{fill:e}),i("fill")}(),Mu=Sr()("Array","fill"))}function zu(){if(Pu)return Eu;Pu=1;var t=Bt(),e=ju(),i=Array.prototype;return Eu=function(n){var o=n.fill;return n===i||t(i,n)&&o===i.fill?e:o},Eu}function Hu(){return Lu?Iu:(Lu=1,Iu=zu())}var Gu,Wu=n(Au?Nu:(Au=1,Nu=Hu())),Bu={exports:{}};var Vu,Uu=(Gu||(Gu=1,function(t){function e(t){if(t)return function(t){for(var i in e.prototype)t[i]=e.prototype[i];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((i=n[o])===e||i.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),i=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(i){n=0;for(var o=(i=i.slice(0)).length;n<o;++n)i[n].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}}(Bu)),Bu.exports),Xu=n(Uu);
/*! Hammer.JS - v2.0.17-rc - 2019-12-16
   * http://naver.github.io/egjs
   *
   * Forked By Naver egjs
   * Copyright (c) hammerjs
   * Licensed under the MIT license */
function qu(){return qu=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},qu.apply(this,arguments)}function Ku(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Zu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}Vu="function"!=typeof Object.assign?function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var o in n)n.hasOwnProperty(o)&&(e[o]=n[o])}return e}:Object.assign;var $u,Ju=Vu,Qu=["","webkit","Moz","MS","ms","o"],tp="undefined"==typeof document?{style:{}}:document.createElement("div"),ep=Math.round,ip=Math.abs,np=Date.now;function op(t,e){for(var i,n,o=e[0].toUpperCase()+e.slice(1),s=0;s<Qu.length;){if((n=(i=Qu[s])?i+o:e)in t)return n;s++}}$u="undefined"==typeof window?{}:window;var sp=op(tp.style,"touchAction"),rp=void 0!==sp;var ap="compute",lp="auto",hp="manipulation",dp="none",cp="pan-x",up="pan-y",pp=function(){if(!rp)return!1;var t={},e=$u.CSS&&$u.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){return t[i]=!e||$u.CSS.supports("touch-action",i)}),t}(),mp="ontouchstart"in $u,fp=void 0!==op($u,"PointerEvent"),gp=mp&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),vp="touch",yp="mouse",bp=16,_p=24,wp=["x","y"],xp=["clientX","clientY"];function kp(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(void 0!==t.length)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function Dp(t,e){return"function"==typeof t?t.apply(e&&e[0]||void 0,e):t}function Sp(t,e){return t.indexOf(e)>-1}var Cp=function(){function t(t,e){this.manager=t,this.set(e)}var e=t.prototype;return e.set=function(t){t===ap&&(t=this.compute()),rp&&this.manager.element.style&&pp[t]&&(this.manager.element.style[sp]=t),this.actions=t.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var t=[];return kp(this.manager.recognizers,function(e){Dp(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(Sp(t,dp))return dp;var e=Sp(t,cp),i=Sp(t,up);return e&&i?dp:e||i?e?cp:up:Sp(t,hp)?hp:lp}(t.join(" "))},e.preventDefaults=function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,o=Sp(n,dp)&&!pp[dp],s=Sp(n,up)&&!pp[up],r=Sp(n,cp)&&!pp[cp];if(o){var a=1===t.pointers.length,l=t.distance<2,h=t.deltaTime<250;if(a&&l&&h)return}if(!r||!s)return o||s&&6&i||r&&i&_p?this.preventSrc(e):void 0}},e.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},t}();function Tp(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function Mp(t){var e=t.length;if(1===e)return{x:ep(t[0].clientX),y:ep(t[0].clientY)};for(var i=0,n=0,o=0;o<e;)i+=t[o].clientX,n+=t[o].clientY,o++;return{x:ep(i/e),y:ep(n/e)}}function Op(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:ep(t.pointers[i].clientX),clientY:ep(t.pointers[i].clientY)},i++;return{timeStamp:np(),pointers:e,center:Mp(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Ep(t,e,i){i||(i=wp);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return Math.sqrt(n*n+o*o)}function Pp(t,e,i){i||(i=wp);var n=e[i[0]]-t[i[0]],o=e[i[1]]-t[i[1]];return 180*Math.atan2(o,n)/Math.PI}function Ip(t,e){return t===e?1:ip(t)>=ip(e)?t<0?2:4:e<0?8:bp}function Lp(t,e,i){return{x:e/t||0,y:i/t||0}}function Np(t,e){var i=t.session,n=e.pointers,o=n.length;i.firstInput||(i.firstInput=Op(e)),o>1&&!i.firstMultiple?i.firstMultiple=Op(e):1===o&&(i.firstMultiple=!1);var s=i.firstInput,r=i.firstMultiple,a=r?r.center:s.center,l=e.center=Mp(n);e.timeStamp=np(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=Pp(a,l),e.distance=Ep(a,l),function(t,e){var i=e.center,n=t.offsetDelta||{},o=t.prevDelta||{},s=t.prevInput||{};1!==e.eventType&&4!==s.eventType||(o=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=o.x+(i.x-n.x),e.deltaY=o.y+(i.y-n.y)}(i,e),e.offsetDirection=Ip(e.deltaX,e.deltaY);var h,d,c=Lp(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=ip(c.x)>ip(c.y)?c.x:c.y,e.scale=r?(h=r.pointers,Ep((d=n)[0],d[1],xp)/Ep(h[0],h[1],xp)):1,e.rotation=r?function(t,e){return Pp(e[1],e[0],xp)+Pp(t[1],t[0],xp)}(r.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,o,s,r=t.lastInterval||e,a=e.timeStamp-r.timeStamp;if(8!==e.eventType&&(a>25||void 0===r.velocity)){var l=e.deltaX-r.deltaX,h=e.deltaY-r.deltaY,d=Lp(a,l,h);n=d.x,o=d.y,i=ip(d.x)>ip(d.y)?d.x:d.y,s=Ip(l,h),t.lastInterval=e}else i=r.velocity,n=r.velocityX,o=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=n,e.velocityY=o,e.direction=s}(i,e);var u,p=t.element,m=e.srcEvent;Tp(u=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=u),e.target=p}function Ap(t,e,i){var n=i.pointers.length,o=i.changedPointers.length,s=1&e&&n-o===0,r=12&e&&n-o===0;i.isFirst=!!s,i.isFinal=!!r,s&&(t.session={}),i.eventType=e,Np(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function Fp(t){return t.trim().split(/\s+/g)}function Rp(t,e,i){kp(Fp(e),function(e){t.addEventListener(e,i,!1)})}function Yp(t,e,i){kp(Fp(e),function(e){t.removeEventListener(e,i,!1)})}function jp(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var zp=function(){function t(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){Dp(t.options.enable,[t])&&i.handler(e)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Rp(this.element,this.evEl,this.domHandler),this.evTarget&&Rp(this.target,this.evTarget,this.domHandler),this.evWin&&Rp(jp(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Yp(this.element,this.evEl,this.domHandler),this.evTarget&&Yp(this.target,this.evTarget,this.domHandler),this.evWin&&Yp(jp(this.element),this.evWin,this.domHandler)},t}();function Hp(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}var Gp={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Wp={2:vp,3:"pen",4:yp,5:"kinect"},Bp="pointerdown",Vp="pointermove pointerup pointercancel";$u.MSPointerEvent&&!$u.PointerEvent&&(Bp="MSPointerDown",Vp="MSPointerMove MSPointerUp MSPointerCancel");var Up=function(t){function e(){var i,n=e.prototype;return n.evEl=Bp,n.evWin=Vp,(i=t.apply(this,arguments)||this).store=i.manager.session.pointerEvents=[],i}return Ku(e,t),e.prototype.handler=function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),o=Gp[n],s=Wp[t.pointerType]||t.pointerType,r=s===vp,a=Hp(e,t.pointerId,"pointerId");1&o&&(0===t.button||r)?a<0&&(e.push(t),a=e.length-1):12&o&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))},e}(zp);function Xp(t){return Array.prototype.slice.call(t,0)}function qp(t,e,i){for(var n=[],o=[],s=0;s<t.length;){var r=e?t[s][e]:t[s];Hp(o,r)<0&&n.push(t[s]),o[s]=r,s++}return i&&(n=e?n.sort(function(t,i){return t[e]>i[e]}):n.sort()),n}var Kp={touchstart:1,touchmove:2,touchend:4,touchcancel:8},Zp=function(t){function e(){var i;return e.prototype.evTarget="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).targetIds={},i}return Ku(e,t),e.prototype.handler=function(t){var e=Kp[t.type],i=$p.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:vp,srcEvent:t})},e}(zp);function $p(t,e){var i,n,o=Xp(t.touches),s=this.targetIds;if(3&e&&1===o.length)return s[o[0].identifier]=!0,[o,o];var r=Xp(t.changedTouches),a=[],l=this.target;if(n=o.filter(function(t){return Tp(t.target,l)}),1===e)for(i=0;i<n.length;)s[n[i].identifier]=!0,i++;for(i=0;i<r.length;)s[r[i].identifier]&&a.push(r[i]),12&e&&delete s[r[i].identifier],i++;return a.length?[qp(n.concat(a),"identifier",!0),a]:void 0}var Jp={mousedown:1,mousemove:2,mouseup:4},Qp=function(t){function e(){var i,n=e.prototype;return n.evEl="mousedown",n.evWin="mousemove mouseup",(i=t.apply(this,arguments)||this).pressed=!1,i}return Ku(e,t),e.prototype.handler=function(t){var e=Jp[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:yp,srcEvent:t}))},e}(zp);function tm(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(i);setTimeout(function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)},2500)}}function em(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,tm.call(this,e)):12&t&&tm.call(this,e)}function im(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],s=Math.abs(e-o.x),r=Math.abs(i-o.y);if(s<=25&&r<=25)return!0}return!1}var nm=function(){return function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).handler=function(t,e,i){var o=i.pointerType===vp,s=i.pointerType===yp;if(!(s&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(o)em.call(Zu(Zu(n)),e,i);else if(s&&im.call(Zu(Zu(n)),i))return;n.callback(t,e,i)}},n.touch=new Zp(n.manager,n.handler),n.mouse=new Qp(n.manager,n.handler),n.primaryTouch=null,n.lastTouches=[],n}return Ku(e,t),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(zp)}();function om(t,e,i){return!!Array.isArray(t)&&(kp(t,i[e],i),!0)}var sm=32,rm=1;function am(t,e){var i=e.manager;return i?i.get(t):t}function lm(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}var hm=function(){function t(t){void 0===t&&(t={}),this.options=qu({enable:!0},t),this.id=rm++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(t){return Ju(this.options,t),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(t){if(om(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=am(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},e.dropRecognizeWith=function(t){return om(t,"dropRecognizeWith",this)||(t=am(t,this),delete this.simultaneous[t.id]),this},e.requireFailure=function(t){if(om(t,"requireFailure",this))return this;var e=this.requireFail;return-1===Hp(e,t=am(t,this))&&(e.push(t),t.requireFailure(this)),this},e.dropRequireFailure=function(t){if(om(t,"dropRequireFailure",this))return this;t=am(t,this);var e=Hp(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},e.emit=function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<8&&n(e.options.event+lm(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=8&&n(e.options.event+lm(i))},e.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=sm},e.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},e.recognize=function(t){var e=Ju({},t);if(!Dp(this.options.enable,[this,e]))return this.reset(),void(this.state=sm);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},e.process=function(t){},e.getTouchAction=function(){},e.reset=function(){},t}(),dm=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,qu({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e))||this).pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}Ku(e,t);var i=e.prototype;return i.getTouchAction=function(){return[hp]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,s=t.deltaTime<i.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(o&&s&&n){if(4!==t.eventType)return this.failTimeout();var r=!this.pTime||t.timeStamp-this.pTime<i.interval,a=!this.pCenter||Ep(this.pCenter,t.center)<i.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&r?this.count+=1:this.count=1,this._input=t,0===this.count%i.taps)return this.hasRequireFailures()?(this._timer=setTimeout(function(){e.state=8,e.tryEmit()},i.interval),2):8}return sm},i.failTimeout=function(){var t=this;return this._timer=setTimeout(function(){t.state=sm},this.options.interval),sm},i.reset=function(){clearTimeout(this._timer)},i.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(hm),cm=function(t){function e(e){return void 0===e&&(e={}),t.call(this,qu({pointers:1},e))||this}Ku(e,t);var i=e.prototype;return i.attrTest=function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},i.process=function(t){var e=this.state,i=t.eventType,n=6&e,o=this.attrTest(t);return n&&(8&i||!o)?16|e:n||o?4&i?8|e:2&e?4|e:2:sm},e}(hm);function um(t){return t===bp?"down":8===t?"up":2===t?"left":4===t?"right":""}var pm=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,qu({event:"pan",threshold:10,pointers:1,direction:30},e))||this).pX=null,i.pY=null,i}Ku(e,t);var i=e.prototype;return i.getTouchAction=function(){var t=this.options.direction,e=[];return 6&t&&e.push(up),t&_p&&e.push(cp),e},i.directionTest=function(t){var e=this.options,i=!0,n=t.distance,o=t.direction,s=t.deltaX,r=t.deltaY;return o&e.direction||(6&e.direction?(o=0===s?1:s<0?2:4,i=s!==this.pX,n=Math.abs(t.deltaX)):(o=0===r?1:r<0?8:bp,i=r!==this.pY,n=Math.abs(t.deltaY))),t.direction=o,i&&n>e.threshold&&o&e.direction},i.attrTest=function(t){return cm.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},i.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var i=um(e.direction);i&&(e.additionalEvent=this.options.event+i),t.prototype.emit.call(this,e)},e}(cm),mm=function(t){function e(e){return void 0===e&&(e={}),t.call(this,qu({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e))||this}Ku(e,t);var i=e.prototype;return i.getTouchAction=function(){return pm.prototype.getTouchAction.call(this)},i.attrTest=function(e){var i,n=this.options.direction;return 30&n?i=e.overallVelocity:6&n?i=e.overallVelocityX:n&_p&&(i=e.overallVelocityY),t.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&ip(i)>this.options.velocity&&4&e.eventType},i.emit=function(t){var e=um(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)},e}(cm),fm=function(t){function e(e){return void 0===e&&(e={}),t.call(this,qu({event:"pinch",threshold:0,pointers:2},e))||this}Ku(e,t);var i=e.prototype;return i.getTouchAction=function(){return[dp]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},i.emit=function(e){if(1!==e.scale){var i=e.scale<1?"in":"out";e.additionalEvent=this.options.event+i}t.prototype.emit.call(this,e)},e}(cm),gm=function(t){function e(e){return void 0===e&&(e={}),t.call(this,qu({event:"rotate",threshold:0,pointers:2},e))||this}Ku(e,t);var i=e.prototype;return i.getTouchAction=function(){return[dp]},i.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(cm),vm=function(t){function e(e){var i;return void 0===e&&(e={}),(i=t.call(this,qu({event:"press",pointers:1,time:251,threshold:9},e))||this)._timer=null,i._input=null,i}Ku(e,t);var i=e.prototype;return i.getTouchAction=function(){return[lp]},i.process=function(t){var e=this,i=this.options,n=t.pointers.length===i.pointers,o=t.distance<i.threshold,s=t.deltaTime>i.time;if(this._input=t,!o||!n||12&t.eventType&&!s)this.reset();else if(1&t.eventType)this.reset(),this._timer=setTimeout(function(){e.state=8,e.tryEmit()},i.time);else if(4&t.eventType)return 8;return sm},i.reset=function(){clearTimeout(this._timer)},i.emit=function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=np(),this.manager.emit(this.options.event,this._input)))},e}(hm),ym={domEvents:!1,touchAction:ap,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},bm=[[gm,{enable:!1}],[fm,{enable:!1},["rotate"]],[mm,{direction:6}],[pm,{direction:6},["swipe"]],[dm],[dm,{event:"doubletap",taps:2},["tap"]],[vm]];function _m(t,e){var i,n=t.element;n.style&&(kp(t.options.cssProps,function(o,s){i=op(n.style,s),e?(t.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={}))}var wm=function(){function t(t,e){var i,n=this;this.options=Ju({},ym,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(fp?Up:gp?Zp:mp?nm:Qp))(i,Ap),this.touchAction=new Cp(this,this.options.touchAction),_m(this,!0),kp(this.options.recognizers,function(t){var e=n.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}var e=t.prototype;return e.set=function(t){return Ju(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},e.stop=function(t){this.session.stopped=t?2:1},e.recognize=function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,o=e.curRecognizer;(!o||o&&8&o.state)&&(e.curRecognizer=null,o=null);for(var s=0;s<n.length;)i=n[s],2===e.stopped||o&&i!==o&&!i.canRecognizeWith(o)?i.reset():i.recognize(t),!o&&14&i.state&&(e.curRecognizer=i,o=i),s++}},e.get=function(t){if(t instanceof hm)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event===t)return e[i];return null},e.add=function(t){if(om(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},e.remove=function(t){if(om(t,"remove",this))return this;var e=this.get(t);if(t){var i=this.recognizers,n=Hp(i,e);-1!==n&&(i.splice(n,1),this.touchAction.update())}return this},e.on=function(t,e){if(void 0===t||void 0===e)return this;var i=this.handlers;return kp(Fp(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this},e.off=function(t,e){if(void 0===t)return this;var i=this.handlers;return kp(Fp(t),function(t){e?i[t]&&i[t].splice(Hp(i[t],e),1):delete i[t]}),this},e.emit=function(t,e){this.options.domEvents&&function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.gesture=e,e.target.dispatchEvent(i)}(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var n=0;n<i.length;)i[n](e),n++}},e.destroy=function(){this.element&&_m(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),xm={touchstart:1,touchmove:2,touchend:4,touchcancel:8},km=function(t){function e(){var i,n=e.prototype;return n.evTarget="touchstart",n.evWin="touchstart touchmove touchend touchcancel",(i=t.apply(this,arguments)||this).started=!1,i}return Ku(e,t),e.prototype.handler=function(t){var e=xm[t.type];if(1===e&&(this.started=!0),this.started){var i=Dm.call(this,t,e);12&e&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:vp,srcEvent:t})}},e}(zp);function Dm(t,e){var i=Xp(t.touches),n=Xp(t.changedTouches);return 12&e&&(i=qp(i.concat(n),"identifier",!0)),[i,n]}function Sm(t,e,i){var n="DEPRECATED METHOD: "+e+"\n"+i+" AT \n";return function(){var e=new Error("get-stack-trace"),i=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,n,i),t.apply(this,arguments)}}var Cm=Sm(function(t,e,i){for(var n=Object.keys(e),o=0;o<n.length;)(!i||i&&void 0===t[n[o]])&&(t[n[o]]=e[n[o]]),o++;return t},"extend","Use `assign`."),Tm=Sm(function(t,e){return Cm(t,e,!0)},"merge","Use `assign`.");function Mm(t,e,i){var n,o=e.prototype;(n=t.prototype=Object.create(o)).constructor=t,n._super=o,i&&Ju(n,i)}function Om(t,e){return function(){return t.apply(e,arguments)}}var Em=function(){var t=function(t,e){return void 0===e&&(e={}),new wm(t,qu({recognizers:bm.concat()},e))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=30,t.DIRECTION_DOWN=bp,t.DIRECTION_LEFT=2,t.DIRECTION_RIGHT=4,t.DIRECTION_UP=8,t.DIRECTION_HORIZONTAL=6,t.DIRECTION_VERTICAL=_p,t.DIRECTION_NONE=1,t.DIRECTION_DOWN=bp,t.INPUT_START=1,t.INPUT_MOVE=2,t.INPUT_END=4,t.INPUT_CANCEL=8,t.STATE_POSSIBLE=1,t.STATE_BEGAN=2,t.STATE_CHANGED=4,t.STATE_ENDED=8,t.STATE_RECOGNIZED=8,t.STATE_CANCELLED=16,t.STATE_FAILED=sm,t.Manager=wm,t.Input=zp,t.TouchAction=Cp,t.TouchInput=Zp,t.MouseInput=Qp,t.PointerEventInput=Up,t.TouchMouseInput=nm,t.SingleTouchInput=km,t.Recognizer=hm,t.AttrRecognizer=cm,t.Tap=dm,t.Pan=pm,t.Swipe=mm,t.Pinch=fm,t.Rotate=gm,t.Press=vm,t.on=Rp,t.off=Yp,t.each=kp,t.merge=Tm,t.extend=Cm,t.bindFn=Om,t.assign=Ju,t.inherit=Mm,t.bindFn=Om,t.prefixed=op,t.toArray=Xp,t.inArray=Hp,t.uniqueArray=qp,t.splitStr=Fp,t.boolOrFn=Dp,t.hasParent=Tp,t.addEventListeners=Rp,t.removeEventListeners=Yp,t.defaults=Ju({},ym,{preset:bm}),t}();Em.defaults;const Pm=kr("DELETE");function Im(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Lm({},t,...i)}function Lm(){const t=Nm(...arguments);return Fm(t),t}function Nm(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<2)return e[0];if(e.length>2)return Nm(Lm(e[0],e[1]),...Yr(e).call(e,2));const n=e[0],o=e[1];if(n instanceof Date&&o instanceof Date)return n.setTime(o.getTime()),n;for(const t of Kr(o))Object.prototype.propertyIsEnumerable.call(o,t)&&(o[t]===Pm?delete n[t]:null===n[t]||null===o[t]||"object"!=typeof n[t]||"object"!=typeof o[t]||aa(n[t])||aa(o[t])?n[t]=Am(o[t]):n[t]=Nm(n[t],o[t]));return n}function Am(t){return aa(t)?ba(t).call(t,t=>Am(t)):"object"==typeof t&&null!==t?t instanceof Date?new Date(t.getTime()):Nm({},t):t}function Fm(t){for(const e of Ea(t))t[e]===Pm?delete t[e]:"object"==typeof t[e]&&null!==t[e]&&Fm(t[e])}const Rm="undefined"!=typeof window?window.Hammer||Em:function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};function Ym(t){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const i=Rm(this._dom.overlay);i.on("tap",dl(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{i.destroy()});const n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Cl(n).call(n,t=>{i.on(t,t=>{t.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=e=>{(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=t=>{("key"in t?"Escape"===t.key:27===t.keyCode)&&this.deactivate()}}Xu(Ym.prototype),Ym.current=null,Ym.prototype.destroy=function(){this.deactivate();for(const i of Bl(t=rh(e=this._cleanupQueue).call(e,0)).call(t)){var t,e;i()}},Ym.prototype.activate=function(){Ym.current&&Ym.current.deactivate(),Ym.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},Ym.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},Ym.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};const jm=/^\/?Date\((-?\d+)/i,zm=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Hm=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Gm=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,Wm=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Bm(t){return t instanceof Number||"number"==typeof t}function Vm(t){return t instanceof String||"string"==typeof t}function Um(t){return"object"==typeof t&&null!==t}function Xm(t,e,i,n){let o=!1;!0===n&&(o=null===e[i]&&void 0!==t[i]),o?delete t[i]:t[i]=e[i]}const qm=mh;function Km(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)||!0===i)if("object"==typeof e[s]&&null!==e[s]&&od(e[s])===Object.prototype)void 0===t[s]?t[s]=Km({},e[s],i):"object"==typeof t[s]&&null!==t[s]&&od(t[s])===Object.prototype?Km(t[s],e[s],i):Xm(t,e,s,n);else if(aa(e[s])){var o;t[s]=Yr(o=e[s]).call(o)}else Xm(t,e,s,n);return t}function Zm(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":aa(t)?"Array":t instanceof Date?"Date":"Object":"number"===e?"Number":"boolean"===e?"Boolean":"string"===e?"String":void 0===e?"undefined":e}function $m(t,e){return[...t,e]}function Jm(t){return Yr(t).call(t)}const Qm=Kd;const tf={asBoolean:(t,e)=>("function"==typeof t&&(t=t()),null!=t?0!=t:e||null),asNumber:(t,e)=>("function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null),asString:(t,e)=>("function"==typeof t&&(t=t()),null!=t?String(t):e||null),asSize:(t,e)=>("function"==typeof t&&(t=t()),Vm(t)?t:Bm(t)?t+"px":e||null),asElement:(t,e)=>("function"==typeof t&&(t=t()),t||e||null)};function ef(t){let e;switch(t.length){case 3:case 4:return e=Hm.exec(t),e?{r:cc(e[1]+e[1],16),g:cc(e[2]+e[2],16),b:cc(e[3]+e[3],16)}:null;case 6:case 7:return e=zm.exec(t),e?{r:cc(e[1],16),g:cc(e[2],16),b:cc(e[3],16)}:null;default:return null}}function nf(t,e,i){var n;return"#"+Yr(n=((1<<24)+(t<<16)+(e<<8)+i).toString(16)).call(n,1)}function of(t,e,i){t/=255,e/=255,i/=255;const n=Math.min(t,Math.min(e,i)),o=Math.max(t,Math.max(e,i));if(n===o)return{h:0,s:0,v:n};return{h:60*((t===n?3:i===n?1:5)-(t===n?e-i:i===n?t-e:i-t)/(o-n))/360,s:(o-n)/o,v:o}}function sf(t){const e=document.createElement("div"),i={};e.style.cssText=t;for(let t=0;t<e.style.length;++t)i[e.style[t]]=e.style.getPropertyValue(e.style[t]);return i}function rf(t,e,i){let n,o,s;const r=Math.floor(6*t),a=6*t-r,l=i*(1-e),h=i*(1-a*e),d=i*(1-(1-a)*e);switch(r%6){case 0:n=i,o=d,s=l;break;case 1:n=h,o=i,s=l;break;case 2:n=l,o=i,s=d;break;case 3:n=l,o=h,s=i;break;case 4:n=d,o=l,s=i;break;case 5:n=i,o=l,s=h}return{r:Math.floor(255*n),g:Math.floor(255*o),b:Math.floor(255*s)}}function af(t,e,i){const n=rf(t,e,i);return nf(n.r,n.g,n.b)}function lf(t){const e=ef(t);if(!e)throw new TypeError("'".concat(t,"' is not a valid color."));return of(e.r,e.g,e.b)}function hf(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function df(t){return Gm.test(t)}function cf(t){return Wm.test(t)}function uf(t){if(null===t||"object"!=typeof t)return null;if(t instanceof Element)return t;const e=Zc(t);for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&"object"==typeof t[i]&&(e[i]=uf(t[i]));return e}const pf={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:(4-2*t)*t-1,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1+--t*t*t*t*t,easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t};const mf={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"};let ff=class{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;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=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return mf[t]}setColor(t){let e,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"===t)return;const n=this._isColorString(t);if(void 0!==n&&(t=n),!0===Vm(t)){if(!0===df(t)){const i=t.substr(4).substr(0,t.length-5).split(",");e={r:i[0],g:i[1],b:i[2],a:1}}else if(!0===cf(t)){const i=t.substr(5).substr(0,t.length-6).split(",");e={r:i[0],g:i[1],b:i[2],a:i[3]}}else if(!0===hf(t)){const i=ef(t);e={r:i.r,g:i.g,b:i.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){const i=void 0!==t.a?t.a:"1.0";e={r:t.r,g:t.g,b:t.b,a:i}}if(void 0===e)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: "+du(t));this._setColor(e,i)}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=mh({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Fu(()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=mh({},t)),this.color=t;const e=of(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),s=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){const e=of(this.color.r,this.color.g,this.color.b);e.v=t/100;const i=rf(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color;const e=of(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);const n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),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),Wu(i).call(i),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+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var t,e,i,n;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){const 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{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="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(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);const o=this;this.opacityRange.onchange=function(){o._setOpacity(this.value)},this.opacityRange.oninput=function(){o._setOpacity(this.value)},this.brightnessRange.onchange=function(){o._setBrightness(this.value)},this.brightnessRange.oninput=function(){o._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=dl(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=dl(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=dl(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=dl(n=this._loadLast).call(n,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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new Rm(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",t=>{t.isFirst&&this._moveSelector(t)}),this.hammer.on("tap",t=>{this._moveSelector(t)}),this.hammer.on("panstart",t=>{this._moveSelector(t)}),this.hammer.on("panmove",t=>{this._moveSelector(t)}),this.hammer.on("panend",t=>{this._moveSelector(t)})}_generateHueCircle(){if(!1===this.generated){const 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);const e=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;let n,o,s,r;t.clearRect(0,0,e,i),this.centerCoordinates={x:.5*e,y:.5*i},this.r=.49*e;const a=2*Math.PI/360,l=1/360,h=1/this.r;let d;for(s=0;s<360;s++)for(r=0;r<this.r;r++)n=this.centerCoordinates.x+r*Math.sin(a*s),o=this.centerCoordinates.y+r*Math.cos(a*s),d=rf(s*l,r*h,1),t.fillStyle="rgb("+d.r+","+d.g+","+d.b+")",t.fillRect(n-.5,o-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,e,i)}this.generated=!0}_moveSelector(t){const e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=n-o,l=Math.atan2(r,a),h=.98*Math.min(Math.sqrt(r*r+a*a),s),d=Math.cos(l)*h+o,c=Math.sin(l)*h+s;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";let u=l/(2*Math.PI);u=u<0?u+1:u;const p=h/this.r,m=of(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;const f=rf(m.h,m.s,m.v);f.a=this.color.a,this.color=f,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+")"}};function gf(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(e.length<1)throw new TypeError("Invalid arguments.");if(1===e.length)return document.createTextNode(e[0]);{const t=document.createElement(e[0]);return t.appendChild(gf(...Yr(e).call(e,1))),t}}let vf,yf=!1;const bf="background: #FFeeee; color: #dd0000";const _f=Ym,wf=ff,xf=class{constructor(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>!1;this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},mh(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new ff(n),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(aa(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==Pd(t)&&(this.options.filter=Pd(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===Pd(this.options)&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const t=Pd(this.options);let e=0,i=!1;for(const n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):!0!==t&&-1===kc(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}_clean(){for(let t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(t){let e=this.moduleOptions;for(let i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}_makeItem(t){if(!0===this.allowCreation){const o=document.createElement("div");o.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Cl(i).call(i,t=>{o.appendChild(t)}),this.domElements.push(o),this.domElements.length}return 0}_makeHeader(t){const e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerText=t,this._makeItem([],e)}_makeLabel(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=document.createElement("div");if(n.className="vis-configuration vis-config-label vis-config-s"+e.length,!0===i){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(gf("i","b",t))}else n.innerText=t+":";return n}_makeDropdown(t,e,i){const n=document.createElement("select");n.className="vis-configuration vis-config-select";let o=0;void 0!==e&&-1!==kc(t).call(t,e)&&(o=kc(t).call(t,e));for(let e=0;e<t.length;e++){const i=document.createElement("option");i.value=t[e],e===o&&(i.selected="selected"),i.innerText=t[e],n.appendChild(i)}const s=this;n.onchange=function(){s._update(this.value,i)};const r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeRange(t,e,i){const n=t[0],o=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=s}catch(t){}a.step=r;let l="",h=0;if(void 0!==e){const t=1.2;e<0&&e*t<o?(a.min=Math.ceil(e*t),h=a.min,l="range increased"):e/t<o&&(a.min=Math.ceil(e/t),h=a.min,l="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),h=a.max,l="range increased"),a.value=e}else a.value=n;const d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=a.value;const c=this;a.onchange=function(){d.value=this.value,c._update(Number(this.value),i)},a.oninput=function(){d.value=this.value};const u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,d);""!==l&&this.popupHistory[p]!==h&&(this.popupHistory[p]=h,this._setupPopup(l,p))}_makeButton(){if(!0===this.options.showButton){const t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){const i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerText=t,i.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Fu(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Fu(()=>{this._removePopup()},1800)}}_makeCheckbox(t,e,i){const n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));const o=this;n.onchange=function(){o._update(this.checked,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeTextInput(t,e,i){const n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});const o=this;n.onchange=function(){o._update(this.value,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeColorField(t,e,i){const n=t[1],o=document.createElement("div");"none"!==(e=void 0===e?n:e)?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?n:e,o.onclick=()=>{this._showColorPicker(e,o,i)};const s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(t=>{const n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,this._update(n,i)}),this.colorPicker.setCloseCallback(()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}})}_handleObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1;const o=Pd(this.options);let s=!1;for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){n=!0;const a=t[r],l=$m(e,r);if("function"==typeof o&&(n=o(r,e),!1===n&&!aa(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i)),!1!==n){s=!0;const t=this._getValue(l);if(aa(a))this._handleArray(a,t,l);else if("string"==typeof a)this._makeTextInput(a,t,l);else if("boolean"==typeof a)this._makeCheckbox(a,t,l);else if(a instanceof Object){if(!this.hideOption(e,r,this.moduleOptions))if(void 0!==a.enabled){const t=$m(l,"enabled"),e=this._getValue(t);if(!0===e){const t=this._makeLabel(r,l,!0);this._makeItem(l,t),s=this._handleObject(a,l)||s}else this._makeCheckbox(a,e,l)}else{const t=this._makeLabel(r,l,!0);this._makeItem(l,t),s=this._handleObject(a,l)||s}}else console.error("dont know how to handle",a,r,l)}}return s}_handleArray(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)}))}_update(t,e){const 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)}_constructOptions(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===n[e[i]]&&(n[e[i]]={}),i!==e.length-1?n=n[e[i]]:n[e[i]]=t);return i}_printOptions(){const t=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(gf("pre","const options = "+du(t,null,2)))}getOptions(){const t={};for(let e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}},kf=Rm,Df=class{constructor(t,e){this.container=t,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(t,e){this.x=cc(t),this.y=cc(e)}setText(t){if(t instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(t)}else this.frame.innerText=t}show(t){if(void 0===t&&(t=!0),!0===t){const t=this.frame.clientHeight,e=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,n=this.frame.parentNode.clientWidth;let o=0,s=0;if("flip"==this.overflowMethod){let i=!1,r=!0;this.y-t<this.padding&&(r=!1),this.x+e>n-this.padding&&(i=!0),o=i?this.x-e:this.x,s=r?this.y-t:this.y}else s=this.y-t,s+t+this.padding>i&&(s=i-t-this.padding),s<this.padding&&(s=this.padding),o=this.x,o+e+this.padding>n&&(o=n-e-this.padding),o<this.padding&&(o=this.padding);this.frame.style.left=o+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}},Sf=bf,Cf=class t{static validate(e,i,n){yf=!1,vf=i;let o=i;return void 0!==n&&(o=i[n]),t.parse(e,o,[]),yf}static parse(e,i,n){for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.check(o,e,i,n)}static check(e,i,n,o){if(void 0===n[e]&&void 0===n.__any__)return void t.getSuggestion(e,n,o);let s=e,r=!0;void 0===n[e]&&void 0!==n.__any__&&(s="__any__",r="object"===t.getType(i[e]));let a=n[s];r&&void 0!==a.__type__&&(a=a.__type__),t.checkFields(e,i,n,s,a,o)}static checkFields(e,i,n,o,s,r){const a=function(i){console.error("%c"+i+t.printLocation(r,e),bf)},l=t.getType(i[e]),h=s[l];void 0!==h?"array"===t.getType(h)&&-1===kc(h).call(h,i[e])?(a('Invalid option detected in "'+e+'". Allowed values are:'+t.print(h)+' not "'+i[e]+'". '),yf=!0):"object"===l&&"__any__"!==o&&(r=$m(r,e),t.parse(i[e],n[o],r)):void 0===s.any&&(a('Invalid type received for "'+e+'". Expected: '+t.print(Ea(s))+". Received ["+l+'] "'+i[e]+'"'),yf=!0)}static getType(t){const e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":aa(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}static getSuggestion(e,i,n){const o=t.findInOptions(e,i,n,!1),s=t.findInOptions(e,vf,[],!0);let r;r=void 0!==o.indexMatch?" in "+t.printLocation(o.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+t.printLocation(o.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+t.printLocation(o.path,e):". Did you mean one of these: "+t.print(Ea(i))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+r,bf),yf=!0}static findInOptions(e,i,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",a=[];const l=e.toLowerCase();let h;for(const c in i){let u;if(void 0!==i[c].__type__&&!0===o){const o=t.findInOptions(e,i[c],$m(n,c));s>o.distance&&(r=o.closestMatch,a=o.path,s=o.distance,h=o.indexMatch)}else{var d;-1!==kc(d=c.toLowerCase()).call(d,l)&&(h=c),u=t.levenshteinDistance(e,c),s>u&&(r=c,a=Jm(n),s=u)}}return{closestMatch:r,path:a,distance:s,indexMatch:h}}static printLocation(t,e){let i="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)i+="  ";i+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)i+="  ";i+=e+"\n";for(let e=0;e<t.length+1;e++){for(let n=0;n<t.length-e;n++)i+="  ";i+="}\n"}return i+"\n\n"}static print(t){return du(t).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;const i=[];let n,o;for(n=0;n<=e.length;n++)i[n]=[n];for(o=0;o<=t.length;o++)i[0][o]=o;for(n=1;n<=e.length;n++)for(o=1;o<=t.length;o++)e.charAt(n-1)==t.charAt(o-1)?i[n][o]=i[n-1][o-1]:i[n][o]=Math.min(i[n-1][o-1]+1,Math.min(i[n][o-1]+1,i[n-1][o]+1));return i[e.length][t.length]}};var Tf=Object.freeze({__proto__:null,Activator:_f,Alea:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(t){let[e,i,n]=function(){const t=function(){let t=4022871197;return function(e){const i=e.toString();for(let e=0;e<i.length;e++){t+=i.charCodeAt(e);let n=.02519603282416938*t;t=n>>>0,n-=t,n*=t,t=n>>>0,n-=t,t+=4294967296*n}return 2.3283064365386963e-10*(t>>>0)}}();let e=t(" "),i=t(" "),n=t(" ");for(let o=0;o<arguments.length;o++)e-=t(o<0||arguments.length<=o?void 0:arguments[o]),e<0&&(e+=1),i-=t(o<0||arguments.length<=o?void 0:arguments[o]),i<0&&(i+=1),n-=t(o<0||arguments.length<=o?void 0:arguments[o]),n<0&&(n+=1);return[e,i,n]}(t),o=1;const s=()=>{const t=2091639*e+2.3283064365386963e-10*o;return e=i,i=n,n=t-(o=0|t)};return s.uint32=()=>4294967296*s(),s.fract53=()=>s()+11102230246251565e-32*(2097152*s()|0),s.algorithm="Alea",s.seed=t,s.version="0.9",s}(e.length?e:[Va()])},ColorPicker:wf,Configurator:xf,DELETE:Pm,HSVToHex:af,HSVToRGB:rf,Hammer:kf,Popup:Df,RGBToHSV:of,RGBToHex:nf,VALIDATOR_PRINT_STYLE:Sf,Validator:Cf,addClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=vd(i).call(i,Pd(n).call(n,function(t){return!Uh(i).call(i,t)})),t.className=i.join(" ")},addCssText:function(t,e){const i=sf(e);for(const[e,n]of Nc(i))t.style.setProperty(e,n)},binarySearchCustom:function(t,e,i,n){let o=0,s=0,r=t.length-1;for(;s<=r&&o<1e4;){const a=Math.floor((s+r)/2),l=t[a],h=e(void 0===n?l[i]:l[i][n]);if(0==h)return a;-1==h?s=a+1:r=a-1,o++}return-1},binarySearchValue:function(t,e,i,n,o){let s,r,a,l,h=0,d=0,c=t.length-1;for(o=null!=o?o:function(t,e){return t==e?0:t<e?-1:1};d<=c&&h<1e4;){if(l=Math.floor(.5*(c+d)),s=t[Math.max(0,l-1)][i],r=t[l][i],a=t[Math.min(t.length-1,l+1)][i],0==o(r,e))return l;if(o(s,e)<0&&o(r,e)>0)return"before"==n?Math.max(0,l-1):l;if(o(r,e)<0&&o(a,e)>0)return"before"==n?l:Math.min(t.length-1,l+1);o(r,e)<0?d=l+1:c=l-1,h++}return-1},bridgeObject:uf,copyAndExtendArray:$m,copyArray:Jm,deepExtend:Km,deepObjectAssign:Lm,easingFunctions:pf,equalArray:function(t,e){if(t.length!==e.length)return!1;for(let i=0,n=t.length;i<n;i++)if(t[i]!=e[i])return!1;return!0},extend:qm,fillIfDefined:function t(e,i){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(const o in e)if(void 0!==i[o])if(null===i[o]||"object"!=typeof i[o])Xm(e,i,o,n);else{const s=e[o],r=i[o];Um(s)&&Um(r)&&t(s,r,n)}},forEach:function(t,e){if(aa(t)){const i=t.length;for(let n=0;n<i;n++)e(t[n],n,t)}else for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&e(t[i],i,t)},getAbsoluteLeft:function(t){return t.getBoundingClientRect().left},getAbsoluteRight:function(t){return t.getBoundingClientRect().right},getAbsoluteTop:function(t){return t.getBoundingClientRect().top},getScrollBarWidth:function(){const t=document.createElement("p");t.style.width="100%",t.style.height="200px";const 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);const i=t.offsetWidth;e.style.overflow="scroll";let n=t.offsetWidth;return i==n&&(n=e.clientWidth),document.body.removeChild(e),i-n},getTarget:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,e=null;return t&&(t.target?e=t.target:t.srcElement&&(e=t.srcElement)),e instanceof Element&&(null==e.nodeType||3!=e.nodeType||(e=e.parentNode,e instanceof Element))?e:null},getType:Zm,hasParent:function(t,e){let i=t;for(;i;){if(i===e)return!0;if(!i.parentNode)return!1;i=i.parentNode}return!1},hexToHSV:lf,hexToRGB:ef,insertSort:function(t,e){for(let i=0;i<t.length;i++){const n=t[i];let o;for(o=i;o>0&&e(n,t[o-1])<0;o--)t[o]=t[o-1];t[o]=n}return t},isDate:function(t){if(t instanceof Date)return!0;if(Vm(t)){if(jm.exec(t))return!0;if(!isNaN(Date.parse(t)))return!0}return!1},isNumber:Bm,isObject:Um,isString:Vm,isValidHex:hf,isValidRGB:df,isValidRGBA:cf,mergeOptions:function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=function(t){return null!=t},s=function(t){return null!==t&&"object"==typeof t};if(!s(t))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!o(i))throw new Error("Parameter option must have a value");if(!s(n))throw new Error("Parameter globalOptions must be an object");const r=e[i],a=s(n)&&!function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(n)?n[i]:void 0,l=a?a.enabled:void 0;if(void 0===r)return;if("boolean"==typeof r)return s(t[i])||(t[i]={}),void(t[i].enabled=r);if(null===r&&!s(t[i])){if(!o(a))return;t[i]=Zc(a)}if(!s(r))return;let h=!0;void 0!==r.enabled?h=r.enabled:void 0!==l&&(h=a.enabled),function(t,e,i){s(t[i])||(t[i]={});const n=e[i],o=t[i];for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=n[t])}(t,e,i),t[i].enabled=h},option:tf,overrideOpacity:function(t,e){if(Uh(t).call(t,"rgba"))return t;if(Uh(t).call(t,"rgb")){const i=t.substr(kc(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+e+")"}{const i=ef(t);return null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+e+")"}},parseColor:function(t,e){if(Vm(t)){let e=t;if(df(e)){var i;const t=ba(i=e.substr(4).substr(0,e.length-5).split(",")).call(i,function(t){return cc(t)});e=nf(t[0],t[1],t[2])}if(!0===hf(e)){const t=lf(e),i={h:t.h,s:.8*t.s,v:Math.min(1,1.02*t.v)},n={h:t.h,s:Math.min(1,1.25*t.s),v:.8*t.v},o=af(n.h,n.s,n.v),s=af(i.h,i.s,i.v);return{background:e,border:o,highlight:{background:s,border:o},hover:{background:s,border:o}}}return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}if(e){return{background:t.background||e.background,border:t.border||e.border,highlight:Vm(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||e.highlight.background,border:t.highlight&&t.highlight.border||e.highlight.border},hover:Vm(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||e.hover.border,background:t.hover&&t.hover.background||e.hover.background}}}return{background:t.background||void 0,border:t.border||void 0,highlight:Vm(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:Vm(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}}},preventDefault:function(t){t||(t=window.event),t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},pureDeepObjectAssign:Im,recursiveDOMDelete:function t(e){if(e)for(;!0===e.hasChildNodes();){const i=e.firstChild;i&&(t(i),e.removeChild(i))}},removeClassName:function(t,e){let i=t.className.split(" ");const n=e.split(" ");i=Pd(i).call(i,function(t){return!Uh(n).call(n,t)}),t.className=i.join(" ")},removeCssText:function(t,e){const i=sf(e);for(const e of Ea(i))t.style.removeProperty(e)},selectiveBridgeObject:function(t,e){if(null!==e&&"object"==typeof e){const i=Zc(e);for(let n=0;n<t.length;n++)Object.prototype.hasOwnProperty.call(e,t[n])&&"object"==typeof e[t[n]]&&(i[t[n]]=uf(e[t[n]]));return i}return null},selectiveDeepExtend:function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(aa(i))throw new TypeError("Arrays are not supported by deepExtend");for(let o=0;o<t.length;o++){const s=t[o];if(Object.prototype.hasOwnProperty.call(i,s))if(i[s]&&i[s].constructor===Object)void 0===e[s]&&(e[s]={}),e[s].constructor===Object?Km(e[s],i[s],!1,n):Xm(e,i,s,n);else{if(aa(i[s]))throw new TypeError("Arrays are not supported by deepExtend");Xm(e,i,s,n)}}return e},selectiveExtend:function(t,e){if(!aa(t))throw new Error("Array with property names expected as first argument");for(var i=arguments.length,n=new Array(i>2?i-2:0),o=2;o<i;o++)n[o-2]=arguments[o];for(const i of n)for(let n=0;n<t.length;n++){const o=t[n];i&&Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},selectiveNotDeepExtend:function(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(aa(i))throw new TypeError("Arrays are not supported by deepExtend");for(const o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&!Uh(t).call(t,o))if(i[o]&&i[o].constructor===Object)void 0===e[o]&&(e[o]={}),e[o].constructor===Object?Km(e[o],i[o]):Xm(e,i,o,n);else if(aa(i[o])){e[o]=[];for(let t=0;t<i[o].length;t++)e[o].push(i[o][t])}else Xm(e,i,o,n);return e},throttle:function(t){let e=!1;return()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,t()}))}},toArray:Qm,topMost:function(t,e){let i;aa(e)||(e=[e]);for(const n of t)if(n){i=n[e[0]];for(let t=1;t<e.length;t++)i&&(i=i[e[t]]);if(void 0!==i)break}return i},updateProperty:function(t,e,i){return t[e]!==i&&(t[e]=i,!0)}});function Mf(t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].redundant=t[e].used,t[e].used=[])}function Of(t){for(var e in t){if(!Object.prototype.hasOwnProperty.call(t,e))continue;const n=t[e];for(var i=0;i<n.redundant.length;i++)n.redundant[i].parentNode.removeChild(n.redundant[i]);n.redundant=[]}}function Ef(t){Mf(t),Of(t),Mf(t)}function Pf(t,e,i){var n;return Object.prototype.hasOwnProperty.call(e,t)?e[t].redundant.length>0?(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}function If(t,e,i,n){var o;return Object.prototype.hasOwnProperty.call(e,t)?e[t].redundant.length>0?(o=e[t].redundant[0],e[t].redundant.shift()):(o=document.createElement(t),void 0!==n?i.insertBefore(o,n):i.appendChild(o)):(o=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==n?i.insertBefore(o,n):i.appendChild(o)),e[t].used.push(o),o}function Lf(t,e,i,n,o,s){var r;if("circle"==i.style?((r=Pf("circle",n,o)).setAttributeNS(null,"cx",t),r.setAttributeNS(null,"cy",e),r.setAttributeNS(null,"r",.5*i.size)):((r=Pf("rect",n,o)).setAttributeNS(null,"x",t-.5*i.size),r.setAttributeNS(null,"y",e-.5*i.size),r.setAttributeNS(null,"width",i.size),r.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&r.setAttributeNS(null,"style",i.styles),r.setAttributeNS(null,"class",i.className+" vis-point"),s){var a=Pf("text",n,o);s.xOffset&&(t+=s.xOffset),s.yOffset&&(e+=s.yOffset),s.content&&(a.textContent=s.content),s.className&&a.setAttributeNS(null,"class",s.className+" vis-label"),a.setAttributeNS(null,"x",t),a.setAttributeNS(null,"y",e)}return r}function Nf(t,e,i,n,o,s,r,a){if(0!=n){n<0&&(e-=n*=-1);var l=Pf("rect",s,r);l.setAttributeNS(null,"x",t-.5*i),l.setAttributeNS(null,"y",e),l.setAttributeNS(null,"width",i),l.setAttributeNS(null,"height",n),l.setAttributeNS(null,"class",o),a&&l.setAttributeNS(null,"style",a)}}function Af(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||"en":"en"}catch(t){return"en"}}var Ff,Rf,Yf,jf,zf,Hf,Gf=Object.freeze({__proto__:null,cleanupElements:Of,drawBar:Nf,drawPoint:Lf,getDOMElement:If,getNavigatorLanguage:Af,getSVGElement:Pf,prepareElements:Mf,resetElements:Ef});function Wf(){return Rf?Ff:(Rf=1,Ro(),Ff=Gt().Object.getOwnPropertySymbols)}function Bf(){return jf?Yf:(jf=1,Yf=Wf())}var Vf,Uf,Xf,qf,Kf,Zf,$f=n(Hf?zf:(Hf=1,zf=Bf())),Jf={exports:{}},Qf={};function tg(){if(Uf)return Jf.exports;Uf=1,function(){if(Vf)return Qf;Vf=1;var t=Li(),e=R(),i=zt(),n=He().f,o=K();t({target:"Object",stat:!0,forced:!o||e(function(){n(1)}),sham:!o},{getOwnPropertyDescriptor:function(t,e){return n(i(t),e)}})}();var t=Gt().Object,e=Jf.exports=function(e,i){return t.getOwnPropertyDescriptor(e,i)};return t.getOwnPropertyDescriptor.sham&&(e.sham=!0),Jf.exports}function eg(){return qf?Xf:(qf=1,Xf=tg())}var ig,ng,og,sg,rg,ag,lg,hg=n(Zf?Kf:(Zf=1,Kf=eg())),dg={};function cg(){return og?ng:(og=1,function(){if(ig)return dg;ig=1;var t=Li(),e=K(),i=jr(),n=zt(),o=He(),s=zi();t({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(t){for(var e,r,a=n(t),l=o.f,h=i(a),d={},c=0;h.length>c;)void 0!==(r=l(a,e=h[c++]))&&s(d,e,r);return d}})}(),ng=Gt().Object.getOwnPropertyDescriptors)}function ug(){return rg?sg:(rg=1,sg=cg())}var pg,mg,fg,gg,vg,yg,bg=n(lg?ag:(lg=1,ag=ug())),_g={exports:{}},wg={};function xg(){if(pg)return wg;pg=1;var t=Li(),e=K(),i=Tn().f;return t({target:"Object",stat:!0,forced:Object.defineProperties!==i,sham:!e},{defineProperties:i}),wg}function kg(){if(mg)return _g.exports;mg=1,xg();var t=Gt().Object,e=_g.exports=function(e,i){return t.defineProperties(e,i)};return t.defineProperties.sham&&(e.sham=!0),_g.exports}function Dg(){return gg?fg:(gg=1,fg=kg())}var Sg,Cg,Tg,Mg,Og,Eg,Pg,Ig,Lg,Ng,Ag=n(yg?vg:(yg=1,vg=Dg())),Fg={exports:{}},Rg={};function Yg(){if(Sg)return Rg;Sg=1;var t=Li(),e=K(),i=Pi().f;return t({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!e},{defineProperty:i}),Rg}function jg(){if(Cg)return Fg.exports;Cg=1,Yg();var t=Gt().Object,e=Fg.exports=function(e,i,n){return t.defineProperty(e,i,n)};return t.defineProperty.sham&&(e.sham=!0),Fg.exports}function zg(){return Mg?Tg:(Mg=1,Tg=jg())}function Hg(){return Eg?Og:(Eg=1,Og=zg())}function Gg(){return Ig?Pg:(Ig=1,Pg=Hg())}function Wg(){return Ng?Lg:(Ng=1,Lg=Gg())}var Bg,Vg=n(Wg()),Ug={};var Xg;var qg;var Kg,Zg,$g;function Jg(){if($g)return Zg;$g=1;var t=cr();return function(){if(Bg)return Ug;Bg=1;var t=Fe(),e=Pi().f,i=t("metadata"),n=Function.prototype;void 0===n[i]&&e(n,i,{value:null})}(),Xg||(Xg=1,zo()),qg||(qg=1,Bo()),Kg||(Kg=1,mo()("metadata")),Zg=t}var Qg,tv,ev;function iv(){if(tv)return Qg;tv=1;var t=Wt(),e=z(),i=t("Symbol"),n=i.keyFor,o=e(i.prototype.valueOf);return Qg=i.isRegisteredSymbol||function(t){try{return void 0!==n(o(t))}catch(t){return!1}}}var nv,ov,sv;function rv(){if(ov)return nv;ov=1;for(var t=Ie(),e=Wt(),i=z(),n=Kt(),o=Fe(),s=e("Symbol"),r=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),l=i(s.prototype.valueOf),h=t("wks"),d=0,c=a(s),u=c.length;d<u;d++)try{var p=c[d];n(s[p])&&o(p)}catch(t){}return nv=function(t){if(r&&r(t))return!0;try{for(var e=l(t),i=0,n=a(h),o=n.length;i<o;i++)if(h[n[i]]==e)return!0}catch(t){}return!1},nv}var av;var lv;var hv;var dv;var cv;var uv;var pv;var mv,fv,gv,vv,yv;function bv(){if(gv)return fv;gv=1;var t=Jg();return ev||(ev=1,Li()({target:"Symbol",stat:!0},{isRegisteredSymbol:iv()})),sv||(sv=1,Li()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:rv()})),av||(av=1,mo()("customMatcher")),lv||(lv=1,mo()("observable")),hv||(hv=1,Li()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:iv()})),dv||(dv=1,Li()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:rv()})),cv||(cv=1,mo()("matcher")),uv||(uv=1,mo()("metadataKey")),pv||(pv=1,mo()("patternMatch")),mv||(mv=1,mo()("replaceAll")),fv=t}function _v(){return yv?vv:(yv=1,vv=bv())}var wv,xv,kv,Dv,Sv,Cv,Tv,Mv,Ov,Ev,Pv,Iv,Lv,Nv=n(_v()),Av={};function Fv(){if(xv)return wv;xv=1;var t=z(),e=Fi(),i=Qi(),n=jt(),o=t("".charAt),s=t("".charCodeAt),r=t("".slice),a=function(t){return function(a,l){var h,d,c=i(n(a)),u=e(l),p=c.length;return u<0||u>=p?t?"":void 0:(h=s(c,u))<55296||h>56319||u+1===p||(d=s(c,u+1))<56320||d>57343?t?o(c,u):h:t?r(c,u,u+2):d-56320+(h-55296<<10)+65536}};return wv={codeAt:a(!1),charAt:a(!0)}}function Rv(){if(kv)return Av;kv=1;var t=Fv().charAt,e=Qi(),i=bo(),n=rr(),o=ar(),s="String Iterator",r=i.set,a=i.getterFor(s);return n(String,"String",function(t){r(this,{type:s,string:e(t),index:0})},function(){var e,i=a(this),n=i.string,s=i.index;return s>=n.length?o(void 0,!0):(e=t(n,s),i.index+=e.length,o(e,!1))}),Av}function Yv(){return Sv?Dv:(Sv=1,lr(),Rv(),Ko(),Dv=po().f("iterator"))}function jv(){if(Tv)return Cv;Tv=1;var t=Yv();return dr(),Cv=t}function zv(){return Ov?Mv:(Ov=1,Mv=jv())}function Hv(){return Pv?Ev:(Pv=1,Ev=zv())}function Gv(){return Lv?Iv:(Lv=1,Iv=Hv())}var Wv,Bv,Vv,Uv,Xv,qv,Kv,Zv,$v,Jv,Qv=n(Gv());function ty(t){return ty="function"==typeof Nv&&"symbol"==typeof Qv?function(t){return typeof t}:function(t){return t&&"function"==typeof Nv&&t.constructor===Nv&&t!==Nv.prototype?"symbol":typeof t},ty(t)}function ey(){return Bv?Wv:(Bv=1,os(),Wv=po().f("toPrimitive"))}function iy(){return Uv?Vv:(Uv=1,Vv=ey())}function ny(){return qv?Xv:(qv=1,Xv=iy())}function oy(){return Zv?Kv:(Zv=1,Kv=ny())}function sy(){return Jv?$v:(Jv=1,$v=oy())}var ry=n(sy());function ay(t){var e=function(t,e){if("object"!=ty(t)||!t)return t;var i=t[ry];if(void 0!==i){var n=i.call(t,e);if("object"!=ty(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ty(e)?e:e+""}function ly(t,e,i){return(e=ay(e))in t?Vg(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var hy,dy,cy,uy,py,my,fy,gy,vy,yy,by,_y,wy,xy={};function ky(){if(dy)return hy;dy=1;var t=$t(),e=Le(),i=Rt(),n=Yi(),o=TypeError,s="Reduce of empty array with no initial value",r=function(r){return function(a,l,h,d){var c=e(a),u=i(c),p=n(c);if(t(l),0===p&&h<2)throw new o(s);var m=r?p-1:0,f=r?-1:1;if(h<2)for(;;){if(m in u){d=u[m],m+=f;break}if(m+=f,r?m<0:p<=m)throw new o(s)}for(;r?m>=0:p>m;m+=f)m in u&&(d=l(d,u[m],m,c));return d}};return hy={left:r(!1),right:r(!0)}}function Dy(){return uy?cy:(uy=1,cy="NODE"===pu())}function Sy(){return fy?my:(fy=1,function(){if(py)return xy;py=1;var t=Li(),e=ky().left,i=ul(),n=Ut();t({target:"Array",proto:!0,forced:!Dy()&&n>79&&n<83||!i("reduce")},{reduce:function(t){var i=arguments.length;return e(this,t,i,i>1?arguments[1]:void 0)}})}(),my=Sr()("Array","reduce"))}function Cy(){if(vy)return gy;vy=1;var t=Bt(),e=Sy(),i=Array.prototype;return gy=function(n){var o=n.reduce;return n===i||t(i,n)&&o===i.reduce?e:o},gy}function Ty(){return by?yy:(by=1,yy=Cy())}var My,Oy,Ey,Py=n(wy?_y:(wy=1,_y=Ty())),Iy={};function Ly(){if(Oy)return My;Oy=1;var t=Ni(),e=Yi(),i=ji(),n=We(),o=function(s,r,a,l,h,d,c,u){for(var p,m,f=h,g=0,v=!!c&&n(c,u);g<l;)g in a&&(p=v?v(a[g],g,r):a[g],d>0&&t(p)?(m=e(p),f=o(s,r,p,m,f,d-1)-1):(i(f+1),s[f]=p),f++),g++;return f};return My=o}var Ny,Ay,Fy,Ry,Yy,jy,zy,Hy,Gy;function Wy(){return Fy?Ay:(Fy=1,function(){if(Ey)return Iy;Ey=1;var t=Li(),e=Ly(),i=$t(),n=Le(),o=Yi(),s=Ui();t({target:"Array",proto:!0},{flatMap:function(t){var r,a=n(this),l=o(a);return i(t),(r=s(a,0)).length=e(r,a,a,l,0,1,t,arguments.length>1?arguments[1]:void 0),r}})}(),Ny||(Ny=1,Ks()("flatMap")),Ay=Sr()("Array","flatMap"))}function By(){if(Yy)return Ry;Yy=1;var t=Bt(),e=Wy(),i=Array.prototype;return Ry=function(n){var o=n.flatMap;return n===i||t(i,n)&&o===i.flatMap?e:o},Ry}function Vy(){return zy?jy:(zy=1,jy=By())}var Uy,Xy,qy=n(Gy?Hy:(Gy=1,Hy=Vy()));var Ky,Zy,$y,Jy,Qy,tb,eb,ib,nb,ob,sb,rb,ab,lb,hb,db,cb,ub,pb,mb,fb,gb,vb,yb,bb,_b,wb,xb,kb,Db=n(Xy?Uy:(Xy=1,Uy=jv())),Sb={},Cb={exports:{}};function Tb(){return Zy?Ky:(Zy=1,Ky=R()(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}function Mb(){if(Jy)return $y;Jy=1;var t=R(),e=Ht(),i=H(),n=Tb(),o=Object.isExtensible,s=t(function(){});return $y=s||n?function(t){return!!e(t)&&((!n||"ArrayBuffer"!==i(t))&&(!o||o(t)))}:o,$y}function Ob(){return tb?Qy:(tb=1,Qy=!R()(function(){return Object.isExtensible(Object.preventExtensions({}))}))}function Eb(){if(eb)return Cb.exports;eb=1;var t=Li(),e=z(),i=kn(),n=Ht(),o=Ne(),s=Pi().f,r=Ln(),a=jn(),l=Mb(),h=Ae(),d=Ob(),c=!1,u=h("meta"),p=0,m=function(t){s(t,u,{value:{objectID:"O"+p++,weakData:{}}})},f=Cb.exports={enable:function(){f.enable=function(){},c=!0;var i=r.f,n=e([].splice),o={};o[u]=1,i(o).length&&(r.f=function(t){for(var e=i(t),o=0,s=e.length;o<s;o++)if(e[o]===u){n(e,o,1);break}return e},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},fastKey:function(t,e){if(!n(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,u)){if(!l(t))return"F";if(!e)return"E";m(t)}return t[u].objectID},getWeakData:function(t,e){if(!o(t,u)){if(!l(t))return!0;if(!e)return!1;m(t)}return t[u].weakData},onFreeze:function(t){return d&&c&&l(t)&&!o(t,u)&&m(t),t}};return i[u]=!0,Cb.exports}function Pb(){if(nb)return ib;nb=1;var t=Fe(),e=Zs(),i=t("iterator"),n=Array.prototype;return ib=function(t){return void 0!==t&&(e.Array===t||n[i]===t)},ib}function Ib(){if(sb)return ob;sb=1;var t=Gi(),e=Jt(),i=Yt(),n=Zs(),o=Fe()("iterator");return ob=function(s){if(!i(s))return e(s,o)||e(s,"@@iterator")||n[t(s)]},ob}function Lb(){if(ab)return rb;ab=1;var t=Z(),e=$t(),i=Ei(),n=Zt(),o=Ib(),s=TypeError;return rb=function(r,a){var l=arguments.length<2?o(r):a;if(e(l))return i(t(l,r));throw new s(n(r)+" is not iterable")},rb}function Nb(){if(hb)return lb;hb=1;var t=Z(),e=Ei(),i=Jt();return lb=function(n,o,s){var r,a;e(n);try{if(!(r=i(n,"return"))){if("throw"===o)throw s;return s}r=t(r,n)}catch(t){a=!0,r=t}if("throw"===o)throw s;if(a)throw r;return e(r),s},lb}function Ab(){if(cb)return db;cb=1;var t=We(),e=Z(),i=Ei(),n=Zt(),o=Pb(),s=Yi(),r=Bt(),a=Lb(),l=Ib(),h=Nb(),d=TypeError,c=function(t,e){this.stopped=t,this.result=e},u=c.prototype;return db=function(p,m,f){var g,v,y,b,_,w,x,k=f&&f.that,D=!(!f||!f.AS_ENTRIES),S=!(!f||!f.IS_RECORD),C=!(!f||!f.IS_ITERATOR),T=!(!f||!f.INTERRUPTED),M=t(m,k),O=function(t){return g&&h(g,"normal"),new c(!0,t)},E=function(t){return D?(i(t),T?M(t[0],t[1],O):M(t[0],t[1])):T?M(t,O):M(t)};if(S)g=p.iterator;else if(C)g=p;else{if(!(v=l(p)))throw new d(n(p)+" is not iterable");if(o(v)){for(y=0,b=s(p);b>y;y++)if((_=E(p[y]))&&r(u,_))return _;return new c(!1)}g=a(p,v)}for(w=S?p.next:g.next;!(x=e(w,g)).done;){try{_=E(x.value)}catch(t){h(g,"throw",t)}if("object"==typeof _&&_&&r(u,_))return _}return new c(!1)},db}function Fb(){if(pb)return ub;pb=1;var t=Bt(),e=TypeError;return ub=function(i,n){if(t(n,i))return i;throw new e("Incorrect invocation")},ub}function Rb(){if(fb)return mb;fb=1;var t=Li(),e=F(),i=Eb(),n=R(),o=Ii(),s=Ab(),r=Fb(),a=W(),l=Ht(),h=Yt(),d=vo(),c=Pi().f,u=_o().forEach,p=K(),m=bo(),f=m.set,g=m.getterFor;return mb=function(m,v,y){var b,_=-1!==m.indexOf("Map"),w=-1!==m.indexOf("Weak"),x=_?"set":"add",k=e[m],D=k&&k.prototype,S={};if(p&&a(k)&&(w||D.forEach&&!n(function(){(new k).entries().next()}))){var C=(b=v(function(t,e){f(r(t,C),{type:m,collection:new k}),h(e)||s(e,t[x],{that:t,AS_ENTRIES:_})})).prototype,T=g(m);u(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(t){var e="add"===t||"set"===t;!(t in D)||w&&"clear"===t||o(C,t,function(i,n){var o=T(this).collection;if(!e&&w&&!l(i))return"get"===t&&void 0;var s=o[t](0===i?0:i,n);return e?this:s})}),w||c(C,"size",{configurable:!0,get:function(){return T(this).collection.size}})}else b=y.getConstructor(v,m,_,x),i.enable();return d(b,m,!1,!0),S[m]=b,t({global:!0,forced:!0},S),w||y.setStrong(b,m,_),b}}function Yb(){if(vb)return gb;vb=1;var t=Xn();return gb=function(e,i,n){for(var o in i)n&&n.unsafe&&e[o]?e[o]=i[o]:t(e,o,i[o],n);return e}}function jb(){if(bb)return yb;bb=1;var t=Wt(),e=qn(),i=Fe(),n=K(),o=i("species");return yb=function(i){var s=t(i);n&&s&&!s[o]&&e(s,o,{configurable:!0,get:function(){return this}})}}function zb(){if(wb)return _b;wb=1;var t=En(),e=qn(),i=Yb(),n=We(),o=Fb(),s=Yt(),r=Ab(),a=rr(),l=ar(),h=jb(),d=K(),c=Eb().fastKey,u=bo(),p=u.set,m=u.getterFor;return _b={getConstructor:function(a,l,h,u){var f=a(function(e,i){o(e,g),p(e,{type:l,index:t(null),first:null,last:null,size:0}),d||(e.size=0),s(i)||r(i,e[u],{that:e,AS_ENTRIES:h})}),g=f.prototype,v=m(l),y=function(t,e,i){var n,o,s=v(t),r=b(t,e);return r?r.value=i:(s.last=r={index:o=c(e,!0),key:e,value:i,previous:n=s.last,next:null,removed:!1},s.first||(s.first=r),n&&(n.next=r),d?s.size++:t.size++,"F"!==o&&(s.index[o]=r)),t},b=function(t,e){var i,n=v(t),o=c(e);if("F"!==o)return n.index[o];for(i=n.first;i;i=i.next)if(i.key===e)return i};return i(g,{clear:function(){for(var e=v(this),i=e.first;i;)i.removed=!0,i.previous&&(i.previous=i.previous.next=null),i=i.next;e.first=e.last=null,e.index=t(null),d?e.size=0:this.size=0},delete:function(t){var e=this,i=v(e),n=b(e,t);if(n){var o=n.next,s=n.previous;delete i.index[n.index],n.removed=!0,s&&(s.next=o),o&&(o.previous=s),i.first===n&&(i.first=o),i.last===n&&(i.last=s),d?i.size--:e.size--}return!!n},forEach:function(t){for(var e,i=v(this),o=n(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:i.first;)for(o(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),i(g,h?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),d&&e(g,"size",{configurable:!0,get:function(){return v(this).size}}),f},setStrong:function(t,e,i){var n=e+" Iterator",o=m(e),s=m(n);a(t,e,function(t,e){p(this,{type:n,target:t,state:o(t),kind:e,last:null})},function(){for(var t=s(this),e=t.kind,i=t.last;i&&i.removed;)i=i.previous;return t.target&&(t.last=i=i?i.next:t.state.first)?l("keys"===e?i.key:"values"===e?i.value:[i.key,i.value],!1):(t.target=null,l(void 0,!0))},i?"entries":"values",!i,!0),h(e)}},_b}function Hb(){return kb||(kb=1,xb||(xb=1,Rb()("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},zb()))),Sb}var Gb,Wb,Bb,Vb,Ub,Xb,qb,Kb,Zb,$b,Jb,Qb={};function t_(){return Wb||(Wb=1,Gb=function(t,e){return 1===e?function(e,i){return e[t](i)}:function(e,i,n){return e[t](i,n)}}),Gb}function e_(){if(Vb)return Bb;Vb=1;var t=Wt(),e=t_(),i=t("Map");return Bb={Map:i,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:i.prototype}}function i_(){return qb?Xb:(qb=1,lr(),Hb(),function(){if(Ub)return Qb;Ub=1;var t=Li(),e=z(),i=$t(),n=jt(),o=Ab(),s=e_(),r=Oe(),a=R(),l=s.Map,h=s.has,d=s.get,c=s.set,u=e([].push),p=r||a(function(){return 1!==l.groupBy("ab",function(t){return t}).get("a").length});t({target:"Map",stat:!0,forced:r||p},{groupBy:function(t,e){n(t),i(e);var s=new l,r=0;return o(t,function(t){var i=e(t,r++);h(s,i)?u(d(s,i),t):c(s,i,[t])}),s}})}(),Rv(),Xb=Gt().Map)}function n_(){if(Zb)return Kb;Zb=1;var t=i_();return dr(),Kb=t}var o_,s_,r_=n(Jb?$b:(Jb=1,$b=n_())),a_={};function l_(){return s_||(s_=1,o_||(o_=1,Rb()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},zb()))),a_}var h_,d_,c_,u_,p_,m_,f_,g_,v_,y_,b_,__,w_,x_,k_,D_,S_,C_,T_,M_,O_,E_={};function P_(){if(d_)return h_;d_=1;var t=Zt(),e=TypeError;return h_=function(i){if("object"==typeof i&&"size"in i&&"has"in i&&"add"in i&&"delete"in i&&"keys"in i)return i;throw new e(t(i)+" is not a set")},h_}function I_(){if(u_)return c_;u_=1;var t=Wt(),e=t_(),i=t("Set"),n=i.prototype;return c_={Set:i,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:n}}function L_(){if(m_)return p_;m_=1;var t=Z();return p_=function(e,i,n){for(var o,s,r=n?e:e.iterator,a=e.next;!(o=t(a,r)).done;)if(void 0!==(s=i(o.value)))return s},p_}function N_(){if(g_)return f_;g_=1;var t=L_();return f_=function(e,i,n){return n?t(e.keys(),i,!0):e.forEach(i)},f_}function A_(){if(y_)return v_;y_=1;var t=I_(),e=N_(),i=t.Set,n=t.add;return v_=function(t){var o=new i;return e(t,function(t){n(o,t)}),o},v_}function F_(){return __||(__=1,b_=function(t){return t.size}),b_}function R_(){return x_?w_:(x_=1,w_=function(t){return{iterator:t,next:t.next,done:!1}})}function Y_(){if(D_)return k_;D_=1;var t=$t(),e=Ei(),i=Z(),n=Fi(),o=R_(),s="Invalid size",r=RangeError,a=TypeError,l=Math.max,h=function(e,i){this.set=e,this.size=l(i,0),this.has=t(e.has),this.keys=t(e.keys)};return h.prototype={getIterator:function(){return o(e(i(this.keys,this.set)))},includes:function(t){return i(this.has,this.set,t)}},k_=function(t){e(t);var i=+t.size;if(i!=i)throw new a(s);var o=n(i);if(o<0)throw new r(s);return new h(t,o)}}function j_(){if(C_)return S_;C_=1;var t=P_(),e=I_(),i=A_(),n=F_(),o=Y_(),s=N_(),r=L_(),a=e.has,l=e.remove;return S_=function(e){var h=t(this),d=o(e),c=i(h);return n(h)<=d.size?s(h,function(t){d.includes(t)&&l(c,t)}):r(d.getIterator(),function(t){a(c,t)&&l(c,t)}),c}}function z_(){return M_?T_:(M_=1,T_=function(){return!1})}var H_,G_,W_,B_={};function V_(){if(G_)return H_;G_=1;var t=P_(),e=I_(),i=F_(),n=Y_(),o=N_(),s=L_(),r=e.Set,a=e.add,l=e.has;return H_=function(e){var h=t(this),d=n(e),c=new r;return i(h)>d.size?s(d.getIterator(),function(t){l(h,t)&&a(c,t)}):o(h,function(t){d.includes(t)&&a(c,t)}),c}}var U_,X_,q_,K_={};function Z_(){if(X_)return U_;X_=1;var t=P_(),e=I_().has,i=F_(),n=Y_(),o=N_(),s=L_(),r=Nb();return U_=function(a){var l=t(this),h=n(a);if(i(l)<=h.size)return!1!==o(l,function(t){if(h.includes(t))return!1},!0);var d=h.getIterator();return!1!==s(d,function(t){if(e(l,t))return r(d,"normal",!1)})},U_}var $_,J_,Q_,tw={};function ew(){if(J_)return $_;J_=1;var t=P_(),e=F_(),i=N_(),n=Y_();return $_=function(o){var s=t(this),r=n(o);return!(e(s)>r.size)&&!1!==i(s,function(t){if(!r.includes(t))return!1},!0)}}var iw,nw,ow,sw={};function rw(){if(nw)return iw;nw=1;var t=P_(),e=I_().has,i=F_(),n=Y_(),o=L_(),s=Nb();return iw=function(r){var a=t(this),l=n(r);if(i(a)<l.size)return!1;var h=l.getIterator();return!1!==o(h,function(t){if(!e(a,t))return s(h,"normal",!1)})},iw}var aw,lw,hw,dw,cw,uw={};function pw(){if(lw)return aw;lw=1;var t=P_(),e=I_(),i=A_(),n=Y_(),o=L_(),s=e.add,r=e.has,a=e.remove;return aw=function(e){var l=t(this),h=n(e).getIterator(),d=i(l);return o(h,function(t){r(l,t)?a(d,t):s(d,t)}),d}}function mw(){return dw?hw:(dw=1,hw=function(t){try{var e=new Set,i={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},n=e[t](i);return 1===n.size&&4===n.values().next().value}catch(t){return!1}})}var fw,gw,vw,yw,bw,_w,ww,xw,kw,Dw={};function Sw(){if(gw)return fw;gw=1;var t=P_(),e=I_().add,i=A_(),n=Y_(),o=L_();return fw=function(s){var r=t(this),a=n(s).getIterator(),l=i(r);return o(a,function(t){e(l,t)}),l},fw}function Cw(){return bw?yw:(bw=1,lr(),l_(),function(){if(O_)return E_;O_=1;var t=Li(),e=j_(),i=R();t({target:"Set",proto:!0,real:!0,forced:!z_()("difference",function(t){return 0===t.size})||i(function(){var t={size:1,has:function(){return!0},keys:function(){var t=0;return{next:function(){var i=t++>1;return e.has(1)&&e.clear(),{done:i,value:2}}}}},e=new Set([1,2,3,4]);return 3!==e.difference(t).size})},{difference:e})}(),function(){if(W_)return B_;W_=1;var t=Li(),e=R(),i=V_();t({target:"Set",proto:!0,real:!0,forced:!z_()("intersection",function(t){return 2===t.size&&t.has(1)&&t.has(2)})||e(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))})},{intersection:i})}(),function(){if(q_)return K_;q_=1;var t=Li(),e=Z_();t({target:"Set",proto:!0,real:!0,forced:!z_()("isDisjointFrom",function(t){return!t})},{isDisjointFrom:e})}(),function(){if(Q_)return tw;Q_=1;var t=Li(),e=ew();t({target:"Set",proto:!0,real:!0,forced:!z_()("isSubsetOf",function(t){return t})},{isSubsetOf:e})}(),function(){if(ow)return sw;ow=1;var t=Li(),e=rw();t({target:"Set",proto:!0,real:!0,forced:!z_()("isSupersetOf",function(t){return!t})},{isSupersetOf:e})}(),function(){if(cw)return uw;cw=1;var t=Li(),e=pw(),i=mw();t({target:"Set",proto:!0,real:!0,forced:!z_()("symmetricDifference")||!i("symmetricDifference")},{symmetricDifference:e})}(),function(){if(vw)return Dw;vw=1;var t=Li(),e=Sw(),i=mw();t({target:"Set",proto:!0,real:!0,forced:!z_()("union")||!i("union")},{union:e})}(),Rv(),yw=Gt().Set)}function Tw(){if(ww)return _w;ww=1;var t=Cw();return dr(),_w=t}var Mw,Ow,Ew,Pw,Iw,Lw,Nw,Aw,Fw,Rw,Yw,jw,zw=n(kw?xw:(kw=1,xw=Tw()));function Hw(){return Ow?Mw:(Ow=1,lr(),Rv(),Mw=Lb())}function Gw(){if(Pw)return Ew;Pw=1;var t=Hw();return dr(),Ew=t}function Ww(){return Lw?Iw:(Lw=1,Iw=Gw())}function Bw(){return Aw?Nw:(Aw=1,Nw=Ww())}function Vw(){return Rw?Fw:(Rw=1,Fw=Bw())}var Uw,Xw,qw,Kw,Zw,$w,Jw,Qw,tx,ex,ix,nx,ox,sx,rx,ax,lx,hx=n(jw?Yw:(jw=1,Yw=Vw())),dx={};function cx(){if(Xw)return Uw;Xw=1;var t=Yn(),e=Math.floor,i=function(n,o){var s=n.length;if(s<8)for(var r,a,l=1;l<s;){for(a=l,r=n[l];a&&o(n[a-1],r)>0;)n[a]=n[--a];a!==l++&&(n[a]=r)}else for(var h=e(s/2),d=i(t(n,0,h),o),c=i(t(n,h),o),u=d.length,p=c.length,m=0,f=0;m<u||f<p;)n[m+f]=m<u&&f<p?o(d[m],c[f])<=0?d[m++]:c[f++]:m<u?d[m++]:c[f++];return n};return Uw=i}function ux(){if(Kw)return qw;Kw=1;var t=Vt().match(/firefox\/(\d+)/i);return qw=!!t&&+t[1]}function px(){return $w?Zw:($w=1,Zw=/MSIE|Trident/.test(Vt()))}function mx(){if(Qw)return Jw;Qw=1;var t=Vt().match(/AppleWebKit\/(\d+)\./);return Jw=!!t&&+t[1]}function fx(){if(tx)return dx;tx=1;var t=Li(),e=z(),i=$t(),n=Le(),o=Yi(),s=Xl(),r=Qi(),a=R(),l=cx(),h=ul(),d=ux(),c=px(),u=Ut(),p=mx(),m=[],f=e(m.sort),g=e(m.push),v=a(function(){m.sort(void 0)}),y=a(function(){m.sort(null)}),b=h("sort"),_=!a(function(){if(u)return u<70;if(!(d&&d>3)){if(c)return!0;if(p)return p<603;var t,e,i,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)m.push({k:e+n,v:i})}for(m.sort(function(t,e){return e.v-t.v}),n=0;n<m.length;n++)e=m[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}});return t({target:"Array",proto:!0,forced:v||!y||!b||!_},{sort:function(t){void 0!==t&&i(t);var e=n(this);if(_)return void 0===t?f(e):f(e,t);var a,h,d=[],c=o(e);for(h=0;h<c;h++)h in e&&g(d,e[h]);for(l(d,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:r(e)>r(i)?1:-1}}(t)),a=o(d),h=0;h<a;)e[h]=d[h++];for(;h<c;)s(e,h++);return e}}),dx}function gx(){return ix?ex:(ix=1,fx(),ex=Sr()("Array","sort"))}function vx(){if(ox)return nx;ox=1;var t=Bt(),e=gx(),i=Array.prototype;return nx=function(n){var o=n.sort;return n===i||t(i,n)&&o===i.sort?e:o},nx}function yx(){return rx?sx:(rx=1,sx=vx())}var bx,_x,wx,xx,kx,Dx,Sx,Cx,Tx,Mx=n(lx?ax:(lx=1,ax=yx())),Ox={};function Ex(){return wx?_x:(wx=1,function(){if(bx)return Ox;bx=1;var t=Li(),e=_o().some;t({target:"Array",proto:!0,forced:!ul()("some")},{some:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),_x=Sr()("Array","some"))}function Px(){if(kx)return xx;kx=1;var t=Bt(),e=Ex(),i=Array.prototype;return xx=function(n){var o=n.some;return n===i||t(i,n)&&o===i.some?e:o},xx}function Ix(){return Sx?Dx:(Sx=1,Dx=Px())}var Lx,Nx,Ax,Fx,Rx,Yx,jx,zx,Hx=n(Tx?Cx:(Tx=1,Cx=Ix()));function Gx(){return Nx?Lx:(Nx=1,lr(),Lx=Sr()("Array","keys"))}function Wx(){return Fx?Ax:(Fx=1,Ax=Gx())}function Bx(){if(Yx)return Rx;Yx=1,dr();var t=Gi(),e=Ne(),i=Bt(),n=Wx(),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Rx=function(r){var a=r.keys;return r===o||i(o,r)&&a===o.keys||e(s,t(r))?n:a},Rx}var Vx,Ux,Xx,qx,Kx,Zx,$x,Jx,Qx=n(zx?jx:(zx=1,jx=Bx()));function tk(){return Ux?Vx:(Ux=1,lr(),Vx=Sr()("Array","values"))}function ek(){return qx?Xx:(qx=1,Xx=tk())}function ik(){if(Zx)return Kx;Zx=1,dr();var t=Gi(),e=Ne(),i=Bt(),n=ek(),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Kx=function(r){var a=r.values;return r===o||i(o,r)&&a===o.values||e(s,t(r))?n:a},Kx}var nk,ok,sk,rk,ak,lk,hk,dk,ck=n(Jx?$x:(Jx=1,$x=ik()));function uk(){return ok?nk:(ok=1,lr(),nk=Sr()("Array","entries"))}function pk(){return rk?sk:(rk=1,sk=uk())}function mk(){if(lk)return ak;lk=1,dr();var t=Gi(),e=Ne(),i=Bt(),n=pk(),o=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return ak=function(r){var a=r.entries;return r===o||i(o,r)&&a===o.entries||e(s,t(r))?n:a},ak}var fk,gk,vk=n(dk?hk:(dk=1,hk=mk()));var yk=n(gk?fk:(gk=1,fk=zg()));const bk=[];for(let t=0;t<256;++t)bk.push((t+256).toString(16).slice(1));let _k;const wk=new Uint8Array(16);var xk={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function kk(t,e,i){const n=(t=t||{}).random??t.rng?.()??function(){if(!_k){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");_k=crypto.getRandomValues.bind(crypto)}return _k(wk)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(t,e=0){return(bk[t[e+0]]+bk[t[e+1]]+bk[t[e+2]]+bk[t[e+3]]+"-"+bk[t[e+4]]+bk[t[e+5]]+"-"+bk[t[e+6]]+bk[t[e+7]]+"-"+bk[t[e+8]]+bk[t[e+9]]+"-"+bk[t[e+10]]+bk[t[e+11]]+bk[t[e+12]]+bk[t[e+13]]+bk[t[e+14]]+bk[t[e+15]]).toLowerCase()}(n)}function Dk(t,e,i){return xk.randomUUID&&!t?xk.randomUUID():kk(t)}function Sk(t,e){var i=Ea(t);if($f){var n=$f(t);e&&(n=Pd(n).call(n,function(e){return hg(t,e).enumerable})),i.push.apply(i,n)}return i}function Ck(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?Cl(i=Sk(Object(o),!0)).call(i,function(e){ly(t,e,o[e])}):bg?Ag(t,bg(o)):Cl(n=Sk(Object(o))).call(n,function(e){yk(t,e,hg(o,e))})}return t}class Tk{constructor(t,e,i){var n,o,s;ly(this,"_source",void 0),ly(this,"_transformers",void 0),ly(this,"_target",void 0),ly(this,"_listeners",{add:dl(n=this._add).call(n,this),remove:dl(o=this._remove).call(o,this),update:dl(s=this._update).call(s,this)}),this._source=t,this._transformers=e,this._target=i}all(){return this._target.update(this._transformItems(this._source.get())),this}start(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}stop(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}_transformItems(t){var e;return Py(e=this._transformers).call(e,(t,e)=>e(t),t)}_add(t,e){null!=e&&this._target.add(this._transformItems(this._source.get(e.items)))}_update(t,e){null!=e&&this._target.update(this._transformItems(this._source.get(e.items)))}_remove(t,e){null!=e&&this._target.remove(this._transformItems(e.oldData))}}class Mk{constructor(t){ly(this,"_source",void 0),ly(this,"_transformers",[]),this._source=t}filter(t){return this._transformers.push(e=>Pd(e).call(e,t)),this}map(t){return this._transformers.push(e=>ba(e).call(e,t)),this}flatMap(t){return this._transformers.push(e=>qy(e).call(e,t)),this}to(t){return new Tk(this._source,this._transformers,t)}}function Ok(t){return"string"==typeof t||"number"==typeof t}class Ek{constructor(t){ly(this,"delay",void 0),ly(this,"max",void 0),ly(this,"_queue",[]),ly(this,"_timeout",null),ly(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(t)}setOptions(t){t&&void 0!==t.delay&&(this.delay=t.delay),t&&void 0!==t.max&&(this.max=t.max),this._flushIfNeeded()}static extend(t,e){const i=new Ek(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=()=>{i.flush()};const n=[{name:"flush",original:void 0}];if(e&&e.replace)for(let o=0;o<e.replace.length;o++){const s=e.replace[o];n.push({name:s,original:t[s]}),i.replace(t,s)}return i._extended={object:t,methods:n},i}destroy(){if(this.flush(),this._extended){const t=this._extended.object,e=this._extended.methods;for(let i=0;i<e.length;i++){const n=e[i];n.original?t[n.name]=n.original:delete t[n.name]}this._extended=null}}replace(t,e){const i=this,n=t[e];if(!n)throw new Error("Method "+e+" undefined");t[e]=function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];i.queue({args:e,fn:n,context:this})}}queue(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&"number"==typeof this.delay&&(this._timeout=Fu(()=>{this.flush()},this.delay))}flush(){var t,e;Cl(t=rh(e=this._queue).call(e,0)).call(t,t=>{t.fn.apply(t.context||t.fn,t.args||[])})}}class Pk{constructor(){ly(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),ly(this,"subscribe",Pk.prototype.on),ly(this,"unsubscribe",Pk.prototype.off)}_trigger(t,e,i){var n;if("*"===t)throw new Error("Cannot trigger event *");Cl(n=[...this._subscribers[t],...this._subscribers["*"]]).call(n,n=>{n(t,e,null!=i?i:null)})}on(t,e){"function"==typeof e&&this._subscribers[t].push(e)}off(t,e){var i;this._subscribers[t]=Pd(i=this._subscribers[t]).call(i,t=>t!==e)}}class Ik{constructor(t){ly(this,"_pairs",void 0),this._pairs=t}*[Db](){for(const[t,e]of this._pairs)yield[t,e]}*entries(){for(const[t,e]of this._pairs)yield[t,e]}*keys(){for(const[t]of this._pairs)yield t}*values(){for(const[,t]of this._pairs)yield t}toIdArray(){var t;return ba(t=[...this._pairs]).call(t,t=>t[0])}toItemArray(){var t;return ba(t=[...this._pairs]).call(t,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const t=Zc(null);for(const[e,i]of this._pairs)t[e]=i;return t}toMap(){return new r_(this._pairs)}toIdSet(){return new zw(this.toIdArray())}toItemSet(){return new zw(this.toItemArray())}cache(){return new Ik([...this._pairs])}distinct(t){const e=new zw;for(const[i,n]of this._pairs)e.add(t(n,i));return e}filter(t){const e=this._pairs;return new Ik({*[Db](){for(const[i,n]of e)t(n,i)&&(yield[i,n])}})}forEach(t){for(const[e,i]of this._pairs)t(i,e)}map(t){const e=this._pairs;return new Ik({*[Db](){for(const[i,n]of e)yield[i,t(n,i)]}})}max(t){const e=hx(this._pairs);let i=e.next();if(i.done)return null;let n=i.value[1],o=t(i.value[1],i.value[0]);for(;!(i=e.next()).done;){const[e,s]=i.value,r=t(s,e);r>o&&(o=r,n=s)}return n}min(t){const e=hx(this._pairs);let i=e.next();if(i.done)return null;let n=i.value[1],o=t(i.value[1],i.value[0]);for(;!(i=e.next()).done;){const[e,s]=i.value,r=t(s,e);r<o&&(o=r,n=s)}return n}reduce(t,e){for(const[i,n]of this._pairs)e=t(e,n,i);return e}sort(t){return new Ik({[Db]:()=>{var e;return hx(Mx(e=[...this._pairs]).call(e,(e,i)=>{let[n,o]=e,[s,r]=i;return t(o,r,n,s)}))}})}}class Lk extends Pk{get idProp(){return this._idProp}constructor(t,e){super(),ly(this,"flush",void 0),ly(this,"length",void 0),ly(this,"_options",void 0),ly(this,"_data",void 0),ly(this,"_idProp",void 0),ly(this,"_queue",null),t&&!aa(t)&&(e=t,t=[]),this._options=e||{},this._data=new r_,this.length=0,this._idProp=this._options.fieldId||"id",t&&t.length&&this.add(t),this.setOptions(e)}setOptions(t){t&&void 0!==t.queue&&(!1===t.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=Ek.extend(this,{replace:["add","update","remove"]})),t.queue&&"object"==typeof t.queue&&this._queue.setOptions(t.queue)))}add(t,e){const i=[];let n;if(aa(t)){const e=ba(t).call(t,t=>t[this._idProp]);if(Hx(e).call(e,t=>this._data.has(t)))throw new Error("A duplicate id was found in the parameter array.");for(let e=0,o=t.length;e<o;e++)n=this._addItem(t[e]),i.push(n)}else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");n=this._addItem(t),i.push(n)}return i.length&&this._trigger("add",{items:i},e),i}update(t,e){const i=[],n=[],o=[],s=[],r=this._idProp,a=t=>{const e=t[r];if(null!=e&&this._data.has(e)){const i=t,r=mh({},this._data.get(e)),a=this._updateItem(i);n.push(a),s.push(i),o.push(r)}else{const e=this._addItem(t);i.push(e)}};if(aa(t))for(let e=0,i=t.length;e<i;e++)t[e]&&"object"==typeof t[e]?a(t[e]):console.warn("Ignoring input item, which is not an object at index "+e);else{if(!t||"object"!=typeof t)throw new Error("Unknown dataType");a(t)}if(i.length&&this._trigger("add",{items:i},e),n.length){const t={items:n,oldData:o,data:s};this._trigger("update",t,e)}return vd(i).call(i,n)}updateOnly(t,e){var i;aa(t)||(t=[t]);const n=ba(i=ba(t).call(t,t=>{const e=this._data.get(t[this._idProp]);if(null==e)throw new Error("Updating non-existent items is not allowed.");return{oldData:e,update:t}})).call(i,t=>{let{oldData:e,update:i}=t;const n=e[this._idProp],o=Im(e,i);return this._data.set(n,o),{id:n,oldData:e,updatedData:o}});if(n.length){const t={items:ba(n).call(n,t=>t.id),oldData:ba(n).call(n,t=>t.oldData),data:ba(n).call(n,t=>t.updatedData)};return this._trigger("update",t,e),t.items}return[]}get(t,e){let i,n,o;Ok(t)?(i=t,o=e):aa(t)?(n=t,o=e):o=t;const s=o&&"Object"===o.returnType?"Object":"Array",r=o&&Pd(o),a=[];let l,h,d;if(null!=i)l=this._data.get(i),l&&r&&!r(l)&&(l=void 0);else if(null!=n)for(let t=0,e=n.length;t<e;t++)l=this._data.get(n[t]),null==l||r&&!r(l)||a.push(l);else{var c;h=[...Qx(c=this._data).call(c)];for(let t=0,e=h.length;t<e;t++)d=h[t],l=this._data.get(d),null==l||r&&!r(l)||a.push(l)}if(o&&o.order&&null==i&&this._sort(a,o.order),o&&o.fields){const t=o.fields;if(null!=i&&null!=l)l=this._filterFields(l,t);else for(let e=0,i=a.length;e<i;e++)a[e]=this._filterFields(a[e],t)}if("Object"==s){const t={};for(let e=0,i=a.length;e<i;e++){const i=a[e];t[i[this._idProp]]=i}return t}return null!=i?null!=l?l:null:a}getIds(t){const e=this._data,i=t&&Pd(t),n=t&&t.order,o=[...Qx(e).call(e)],s=[];if(i)if(n){const t=[];for(let e=0,n=o.length;e<n;e++){const n=o[e],s=this._data.get(n);null!=s&&i(s)&&t.push(s)}this._sort(t,n);for(let e=0,i=t.length;e<i;e++)s.push(t[e][this._idProp])}else for(let t=0,e=o.length;t<e;t++){const e=o[t],n=this._data.get(e);null!=n&&i(n)&&s.push(n[this._idProp])}else if(n){const t=[];for(let i=0,n=o.length;i<n;i++){const n=o[i];t.push(e.get(n))}this._sort(t,n);for(let e=0,i=t.length;e<i;e++)s.push(t[e][this._idProp])}else for(let t=0,i=o.length;t<i;t++){const i=o[t],n=e.get(i);null!=n&&s.push(n[this._idProp])}return s}getDataSet(){return this}forEach(t,e){const i=e&&Pd(e),n=this._data,o=[...Qx(n).call(n)];if(e&&e.order){const i=this.get(e);for(let e=0,n=i.length;e<n;e++){const n=i[e];t(n,n[this._idProp])}}else for(let e=0,n=o.length;e<n;e++){const n=o[e],s=this._data.get(n);null==s||i&&!i(s)||t(s,n)}}map(t,e){const i=e&&Pd(e),n=[],o=this._data,s=[...Qx(o).call(o)];for(let e=0,o=s.length;e<o;e++){const o=s[e],r=this._data.get(o);null==r||i&&!i(r)||n.push(t(r,o))}return e&&e.order&&this._sort(n,e.order),n}_filterFields(t,e){var i;return t?Py(i=aa(e)?e:Ea(e)).call(i,(e,i)=>(e[i]=t[i],e),{}):t}_sort(t,e){if("string"==typeof e){const i=e;Mx(t).call(t,(t,e)=>{const n=t[i],o=e[i];return n>o?1:n<o?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");Mx(t).call(t,e)}}remove(t,e){const i=[],n=[],o=aa(t)?t:[t];for(let t=0,e=o.length;t<e;t++){const e=this._remove(o[t]);if(e){const t=e[this._idProp];null!=t&&(i.push(t),n.push(e))}}return i.length&&this._trigger("remove",{items:i,oldData:n},e),i}_remove(t){let e;if(Ok(t)?e=t:t&&"object"==typeof t&&(e=t[this._idProp]),null!=e&&this._data.has(e)){const t=this._data.get(e)||null;return this._data.delete(e),--this.length,t}return null}clear(t){var e;const i=[...Qx(e=this._data).call(e)],n=[];for(let t=0,e=i.length;t<e;t++)n.push(this._data.get(i[t]));return this._data.clear(),this.length=0,this._trigger("remove",{items:i,oldData:n},t),i}max(t){let e=null,i=null;for(const o of ck(n=this._data).call(n)){var n;const s=o[t];"number"==typeof s&&(null==i||s>i)&&(e=o,i=s)}return e||null}min(t){let e=null,i=null;for(const o of ck(n=this._data).call(n)){var n;const s=o[t];"number"==typeof s&&(null==i||s<i)&&(e=o,i=s)}return e||null}distinct(t){const e=this._data,i=[...Qx(e).call(e)],n=[];let o=0;for(let s=0,r=i.length;s<r;s++){const r=i[s],a=e.get(r)[t];let l=!1;for(let t=0;t<o;t++)if(n[t]==a){l=!0;break}l||void 0===a||(n[o]=a,o++)}return n}_addItem(t){const e=function(t,e){return null==t[e]&&(t[e]=Dk()),t}(t,this._idProp),i=e[this._idProp];if(this._data.has(i))throw new Error("Cannot add item: item with id "+i+" already exists");return this._data.set(i,e),++this.length,i}_updateItem(t){const e=t[this._idProp];if(null==e)throw new Error("Cannot update item: item has no id (item: "+du(t)+")");const i=this._data.get(e);if(!i)throw new Error("Cannot update item: no item with id "+e+" found");return this._data.set(e,Ck(Ck({},i),t)),e}stream(t){if(t){const e=this._data;return new Ik({*[Db](){for(const i of t){const t=e.get(i);null!=t&&(yield[i,t])}}})}var e;return new Ik({[Db]:dl(e=vk(this._data)).call(e,this._data)})}}class Nk extends Pk{get idProp(){return this.getDataSet().idProp}constructor(t,e){var i;super(),ly(this,"length",0),ly(this,"_listener",void 0),ly(this,"_data",void 0),ly(this,"_ids",new zw),ly(this,"_options",void 0),this._options=e||{},this._listener=dl(i=this._onEvent).call(i,this),this.setData(t)}setData(t){if(this._data){this._data.off&&this._data.off("*",this._listener);const t=this._data.getIds({filter:Pd(this._options)}),e=this._data.get(t);this._ids.clear(),this.length=0,this._trigger("remove",{items:t,oldData:e})}if(null!=t){this._data=t;const e=this._data.getIds({filter:Pd(this._options)});for(let t=0,i=e.length;t<i;t++){const i=e[t];this._ids.add(i)}this.length=e.length,this._trigger("add",{items:e})}else this._data=new Lk;this._data.on&&this._data.on("*",this._listener)}refresh(){const t=this._data.getIds({filter:Pd(this._options)}),e=[...this._ids],i={},n=[],o=[],s=[];for(let e=0,o=t.length;e<o;e++){const o=t[e];i[o]=!0,this._ids.has(o)||(n.push(o),this._ids.add(o))}for(let t=0,n=e.length;t<n;t++){const n=e[t],r=this._data.get(n);null==r?console.error("If you see this, report it please."):i[n]||(o.push(n),s.push(r),this._ids.delete(n))}this.length+=n.length-o.length,n.length&&this._trigger("add",{items:n}),o.length&&this._trigger("remove",{items:o,oldData:s})}get(t,e){if(null==this._data)return null;let i,n=null;Ok(t)||aa(t)?(n=t,i=e):i=t;const o=mh({},this._options,i),s=Pd(this._options),r=i&&Pd(i);return s&&r&&(o.filter=t=>s(t)&&r(t)),null==n?this._data.get(o):this._data.get(n,o)}getIds(t){if(this._data.length){const e=Pd(this._options),i=null!=t?Pd(t):null;let n;return n=i?e?t=>e(t)&&i(t):i:e,this._data.getIds({filter:n,order:t&&t.order})}return[]}forEach(t,e){if(this._data){var i;const n=Pd(this._options),o=e&&Pd(e);let s;s=o?n?function(t){return n(t)&&o(t)}:o:n,Cl(i=this._data).call(i,t,{filter:s,order:e&&e.order})}}map(t,e){if(this._data){var i;const n=Pd(this._options),o=e&&Pd(e);let s;return s=o?n?t=>n(t)&&o(t):o:n,ba(i=this._data).call(i,t,{filter:s,order:e&&e.order})}return[]}getDataSet(){return this._data.getDataSet()}stream(t){var e;return this._data.stream(t||{[Db]:dl(e=Qx(this._ids)).call(e,this._ids)})}dispose(){var t;null!==(t=this._data)&&void 0!==t&&t.off&&this._data.off("*",this._listener);const e="This data view has already been disposed of.",i={get:()=>{throw new Error(e)},set:()=>{throw new Error(e)},configurable:!1};for(const t of Kr(Nk.prototype))yk(this,t,i)}_onEvent(t,e,i){if(!e||!e.items||!this._data)return;const n=e.items,o=[],s=[],r=[],a=[],l=[],h=[];switch(t){case"add":for(let t=0,e=n.length;t<e;t++){const e=n[t];this.get(e)&&(this._ids.add(e),o.push(e))}break;case"update":for(let t=0,i=n.length;t<i;t++){const i=n[t];this.get(i)?this._ids.has(i)?(s.push(i),l.push(e.data[t]),a.push(e.oldData[t])):(this._ids.add(i),o.push(i)):this._ids.has(i)&&(this._ids.delete(i),r.push(i),h.push(e.oldData[t]))}break;case"remove":for(let t=0,i=n.length;t<i;t++){const i=n[t];this._ids.has(i)&&(this._ids.delete(i),r.push(i),h.push(e.oldData[t]))}}this.length+=o.length-r.length,o.length&&this._trigger("add",{items:o},i),s.length&&this._trigger("update",{items:s,oldData:a,data:l},i),r.length&&this._trigger("remove",{items:r,oldData:h},i)}}function Ak(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof Cl(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof ba(e)&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.stream&&function(t,e){return"object"==typeof e&&null!==e&&t===e.idProp&&"function"==typeof e.add&&"function"==typeof e.clear&&"function"==typeof e.distinct&&"function"==typeof Cl(e)&&"function"==typeof e.get&&"function"==typeof e.getDataSet&&"function"==typeof e.getIds&&"number"==typeof e.length&&"function"==typeof ba(e)&&"function"==typeof e.max&&"function"==typeof e.min&&"function"==typeof e.off&&"function"==typeof e.on&&"function"==typeof e.remove&&"function"==typeof e.setOptions&&"function"==typeof e.stream&&"function"==typeof e.update&&"function"==typeof e.updateOnly}(t,e.getDataSet())}var Fk=n(a());const Rk="undefined"!=typeof window&&window.moment||Fk;var Yk,jk,zk,Hk,Gk,Wk,Bk,Vk,Uk,Xk,qk,Kk={exports:{}},Zk={},$k={exports:{}},Jk={};function Qk(){if(Yk)return Jk;function t(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}Yk=1;var e=/javascript\s*\:/gim;return Jk.whiteList=t(),Jk.getDefaultWhiteList=t,Jk.onAttr=function(t,e,i){},Jk.onIgnoreAttr=function(t,e,i){},Jk.safeAttrValue=function(t,i){return e.test(i)?"":i},Jk}function tD(){return zk?jk:(zk=1,jk={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}})}function eD(){if(Bk)return Wk;Bk=1;var t=Qk(),e=function(){if(Gk)return Hk;Gk=1;var t=tD();return Hk=function(e,i){";"!==(e=t.trimRight(e))[e.length-1]&&(e+=";");var n=e.length,o=!1,s=0,r=0,a="";function l(){if(!o){var n=t.trim(e.slice(s,r)),l=n.indexOf(":");if(-1!==l){var h=t.trim(n.slice(0,l)),d=t.trim(n.slice(l+1));if(h){var c=i(s,a.length,h,d,n);c&&(a+=c+"; ")}}}s=r+1}for(;r<n;r++){var h=e[r];if("/"===h&&"*"===e[r+1]){var d=e.indexOf("*/",r+2);if(-1===d)break;s=(r=d+1)+1,o=!1}else"("===h?o=!0:")"===h?o=!1:";"===h?o||l():"\n"===h&&l()}return t.trim(a)},Hk}();function i(t){return null==t}function n(e){(e=function(t){var e={};for(var i in t)e[i]=t[i];return e}(e||{})).whiteList=e.whiteList||t.whiteList,e.onAttr=e.onAttr||t.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||t.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||t.safeAttrValue,this.options=e}return tD(),n.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var n=this.options,o=n.whiteList,s=n.onAttr,r=n.onIgnoreAttr,a=n.safeAttrValue;return e(t,function(t,e,n,l,h){var d=o[n],c=!1;if(!0===d?c=d:"function"==typeof d?c=d(l):d instanceof RegExp&&(c=d.test(l)),!0!==c&&(c=!1),l=a(n,l)){var u,p={position:e,sourcePosition:t,source:h,isWhite:c};return c?i(u=s(n,l,p))?n+":"+l:u:i(u=r(n,l,p))?void 0:u}})},Wk=n}function iD(){return Vk||(Vk=1,function(t,e){var i=Qk(),n=eD();for(var o in e=t.exports=function(t,e){return new n(e).process(t)},e.FilterCSS=n,i)e[o]=i[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)}($k,$k.exports)),$k.exports}function nD(){return Xk?Uk:(Xk=1,Uk={indexOf:function(t,e){var i,n;if(Array.prototype.indexOf)return t.indexOf(e);for(i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},forEach:function(t,e,i){var n,o;if(Array.prototype.forEach)return t.forEach(e,i);for(n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}})}function oD(){if(qk)return Zk;qk=1;var t=iD().FilterCSS,e=iD().getDefaultWhiteList,i=nD();function n(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var o=new t;function s(t){return t.replace(r,"&lt;").replace(a,"&gt;")}var r=/</g,a=/>/g,l=/"/g,h=/&quot;/g,d=/&#([a-zA-Z0-9]*);?/gim,c=/&colon;?/gim,u=/&newline;?/gim,p=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,m=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,f=/u\s*r\s*l\s*\(.*/gi;function g(t){return t.replace(l,"&quot;")}function v(t){return t.replace(h,'"')}function y(t){return t.replace(d,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})}function b(t){return t.replace(c,":").replace(u," ")}function _(t){for(var e="",n=0,o=t.length;n<o;n++)e+=t.charCodeAt(n)<32?" ":t.charAt(n);return i.trim(e)}function w(t){return t=_(t=b(t=y(t=v(t))))}function x(t){return t=s(t=g(t))}return Zk.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},Zk.getDefaultWhiteList=n,Zk.onTag=function(t,e,i){},Zk.onIgnoreTag=function(t,e,i){},Zk.onTagAttr=function(t,e,i){},Zk.onIgnoreTagAttr=function(t,e,i){},Zk.safeAttrValue=function(t,e,n,s){if(n=w(n),"href"===e||"src"===e){if("#"===(n=i.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===e){if(p.lastIndex=0,p.test(n))return""}else if("style"===e){if(m.lastIndex=0,m.test(n))return"";if(f.lastIndex=0,f.test(n)&&(p.lastIndex=0,p.test(n)))return"";!1!==s&&(n=(s=s||o).process(n))}return n=x(n)},Zk.escapeHtml=s,Zk.escapeQuote=g,Zk.unescapeQuote=v,Zk.escapeHtmlEntities=y,Zk.escapeDangerHtml5Entities=b,Zk.clearNonPrintableCharacter=_,Zk.friendlyAttrValue=w,Zk.escapeAttrValue=x,Zk.onIgnoreTagStripAll=function(){return""},Zk.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var n=!Array.isArray(t),o=[],s=!1;return{onIgnoreTag:function(r,a,l){if(function(e){return!!n||-1!==i.indexOf(t,e)}(r)){if(l.isClosing){var h="[/removed]",d=l.position+10;return o.push([!1!==s?s:l.position,d]),s=!1,h}return s||(s=l.position),"[removed]"}return e(r,a,l)},remove:function(t){var e="",n=0;return i.forEach(o,function(i){e+=t.slice(n,i[0]),n=i[1]}),e+=t.slice(n)}}},Zk.stripCommentTag=function(t){for(var e="",i=0;i<t.length;){var n=t.indexOf("\x3c!--",i);if(-1===n){e+=t.slice(i);break}e+=t.slice(i,n);var o=t.indexOf("--\x3e",n);if(-1===o)break;i=o+3}return e},Zk.stripBlankChar=function(t){var e=t.split("");return(e=e.filter(function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))})).join("")},Zk.attributeWrapSign='"',Zk.cssFilter=o,Zk.getDefaultCSSWhiteList=e,Zk}var sD,rD,aD,lD,hD={};function dD(){if(sD)return hD;sD=1;var t=nD();function e(e){var i,n=t.spaceIndex(e);return i=-1===n?e.slice(1,-1):e.slice(1,n+1),"/"===(i=t.trim(i).toLowerCase()).slice(0,1)&&(i=i.slice(1)),"/"===i.slice(-1)&&(i=i.slice(0,-1)),i}function i(t){return"</"===t.slice(0,2)}var n=/[^a-zA-Z0-9\\_:.-]/gim;function o(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"="===i?e:-1}}function s(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"'"===i||'"'===i?e:-1}}function r(t,e){for(;e>0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}}function a(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}return hD.parseTag=function(t,n,o){var s="",r=0,a=!1,l=!1,h=0,d=t.length,c="",u="";t:for(h=0;h<d;h++){var p=t.charAt(h);if(!1===a){if("<"===p){a=h;continue}}else if(!1===l){if("<"===p){s+=o(t.slice(r,h)),a=h,r=h;continue}if(">"===p||h===d-1){s+=o(t.slice(r,a)),c=e(u=t.slice(a,h+1)),s+=n(a,s.length,c,u,i(u)),r=h+1,a=!1;continue}if('"'===p||"'"===p)for(var m=1,f=t.charAt(h-m);""===f.trim()||"="===f;){if("="===f){l=p;continue t}f=t.charAt(h-++m)}}else if(p===l){l=!1;continue}}return r<d&&(s+=o(t.substr(r))),s},hD.parseAttr=function(e,i){var l=0,h=0,d=[],c=!1,u=e.length;function p(e,o){if(!((e=(e=t.trim(e)).replace(n,"").toLowerCase()).length<1)){var s=i(e,o||"");s&&d.push(s)}}for(var m=0;m<u;m++){var f,g=e.charAt(m);if(!1!==c||"="!==g)if(!1===c||m!==h)if(/\s|\n|\t/.test(g)){if(e=e.replace(/\s|\n|\t/g," "),!1===c){if(-1===(f=o(e,m))){p(t.trim(e.slice(l,m))),c=!1,l=m+1;continue}m=f-1;continue}if(-1===(f=r(e,m-1))){p(c,a(t.trim(e.slice(l,m)))),c=!1,l=m+1;continue}}else;else{if(-1===(f=e.indexOf(g,m+1)))break;p(c,t.trim(e.slice(h+1,f))),c=!1,l=(m=f)+1}else c=e.slice(l,m),l=m+1,h='"'===e.charAt(l)||"'"===e.charAt(l)?l:s(e,m+1)}return l<e.length&&(!1===c?p(e.slice(l)):p(c,a(t.trim(e.slice(l))))),t.trim(d.join(" "))},hD}function cD(){if(aD)return rD;aD=1;var t=iD().FilterCSS,e=oD(),i=dD(),n=i.parseTag,o=i.parseAttr,s=nD();function r(t){return null==t}function a(i){(i=function(t){var e={};for(var i in t)e[i]=t[i];return e}(i||{})).stripIgnoreTag&&(i.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),i.onIgnoreTag=e.onIgnoreTagStripAll),i.whiteList||i.allowList?i.whiteList=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i.toLowerCase()]=t[i].map(function(t){return t.toLowerCase()}):e[i.toLowerCase()]=t[i];return e}(i.whiteList||i.allowList):i.whiteList=e.whiteList,this.attributeWrapSign=!0===i.singleQuotedAttributeValue?"'":e.attributeWrapSign,i.onTag=i.onTag||e.onTag,i.onTagAttr=i.onTagAttr||e.onTagAttr,i.onIgnoreTag=i.onIgnoreTag||e.onIgnoreTag,i.onIgnoreTagAttr=i.onIgnoreTagAttr||e.onIgnoreTagAttr,i.safeAttrValue=i.safeAttrValue||e.safeAttrValue,i.escapeHtml=i.escapeHtml||e.escapeHtml,this.options=i,!1===i.css?this.cssFilter=!1:(i.css=i.css||{},this.cssFilter=new t(i.css))}return a.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var i=this,a=i.options,l=a.whiteList,h=a.onTag,d=a.onIgnoreTag,c=a.onTagAttr,u=a.onIgnoreTagAttr,p=a.safeAttrValue,m=a.escapeHtml,f=i.attributeWrapSign,g=i.cssFilter;a.stripBlankChar&&(t=e.stripBlankChar(t)),a.allowCommentTag||(t=e.stripCommentTag(t));var v=!1;a.stripIgnoreTagBody&&(v=e.StripTagBody(a.stripIgnoreTagBody,d),d=v.onIgnoreTag);var y=n(t,function(t,e,i,n,a){var v={sourcePosition:t,position:e,isClosing:a,isWhite:Object.prototype.hasOwnProperty.call(l,i)},y=h(i,n,v);if(!r(y))return y;if(v.isWhite){if(v.isClosing)return"</"+i+">";var b=function(t){var e=s.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=s.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=s.trim(t.slice(0,-1))),{html:t,closing:i}}(n),_=l[i],w=o(b.html,function(t,e){var n=-1!==s.indexOf(_,t),o=c(i,t,e,n);return r(o)?n?(e=p(i,t,e,g))?t+"="+f+e+f:t:r(o=u(i,t,e,n))?void 0:o:o});return n="<"+i,w&&(n+=" "+w),b.closing&&(n+=" /"),n+=">"}return r(y=d(i,n,v))?m(n):y},m);return v&&(y=v.remove(y)),y},rD=a}var uD=(lD||(lD=1,function(t,e){var i=oD(),n=dD(),o=cD();function s(t,e){return new o(e).process(t)}(e=t.exports=s).filterXSS=s,e.FilterXSS=o,function(){for(var t in i)e[t]=i[t];for(var o in n)e[o]=n[o]}(),"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(Kk,Kk.exports)),Kk.exports),pD=n(uD);function mD(t,e){var i=Ea(t);if($f){var n=$f(t);e&&(n=Pd(n).call(n,function(e){return hg(t,e).enumerable})),i.push.apply(i,n)}return i}function fD(t){for(var e=1;e<arguments.length;e++){var i,n,o=null!=arguments[e]?arguments[e]:{};e%2?Cl(i=mD(Object(o),!0)).call(i,function(e){ly(t,e,o[e])}):bg?Ag(t,bg(o)):Cl(n=mD(Object(o))).call(n,function(e){yk(t,e,hg(o,e))})}return t}function gD(t){var e;if(!t)return!1;let i=null!==(e=t.idProp)&&void 0!==e?e:t._idProp;return!!i&&Ak(i,t)}const vD=/^\/?Date\((-?\d+)/i,yD=/^\d+$/;function bD(t,e){let i;if(void 0!==t){if(null===t)return null;if(!e)return t;if("string"!=typeof e&&!(e instanceof String))throw new Error("Type must be a string");switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Vm(t)&&!isNaN(Date.parse(t))?Fk(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":try{return bD(t,"Moment").toDate()}catch(i){throw i instanceof TypeError?new TypeError("Cannot convert object of type "+Zm(t)+" to type "+e):i}case"Moment":if(Bm(t))return Fk(t);if(t instanceof Date)return Fk(t.valueOf());if(Fk.isMoment(t))return Fk(t);if(Vm(t))return i=vD.exec(t),i?Fk(Number(i[1])):(i=yD.exec(t),Fk(i?Number(t):t));throw new TypeError("Cannot convert object of type "+Zm(t)+" to type "+e);case"ISODate":if(Bm(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(Fk.isMoment(t))return t.toDate().toISOString();if(Vm(t))return i=vD.exec(t),i?new Date(Number(i[1])).toISOString():Fk(t).format();throw new Error("Cannot convert object of type "+Zm(t)+" to type ISODate");case"ASPDate":if(Bm(t))return"/Date("+t+")/";if(t instanceof Date||Fk.isMoment(t))return"/Date("+t.valueOf()+")/";if(Vm(t)){let e;return i=vD.exec(t),e=i?new Date(Number(i[1])).valueOf():new Date(t).valueOf(),"/Date("+e+")/"}throw new Error("Cannot convert object of type "+Zm(t)+" to type ASPDate");default:throw new Error("Unknown type ".concat(e))}}}function _D(t){var e,i,n,o,s,r;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"};const l=t._idProp,h=new Lk({fieldId:l}),d=ba((c=t,e=new Mk(c))).call(e,t=>{var e;return Py(e=Ea(t)).call(e,(e,i)=>(e[i]=bD(t[i],a[i]),e),{})}).to(h);var c;return d.all().start(),{add:function(){return t.getDataSet().add(...arguments)},remove:function(){return t.getDataSet().remove(...arguments)},update:function(){return t.getDataSet().update(...arguments)},updateOnly:function(){return t.getDataSet().updateOnly(...arguments)},clear:function(){return t.getDataSet().clear(...arguments)},forEach:dl(i=Cl(h)).call(i,h),get:dl(n=h.get).call(n,h),getIds:dl(o=h.getIds).call(o,h),off:dl(s=h.off).call(s,h),on:dl(r=h.on).call(r,h),get length(){return h.length},idProp:l,type:a,rawDS:t,coercedDS:h,dispose:()=>d.stop()}}const wD=t=>{const e=new pD.FilterXSS(t);return t=>"string"==typeof t?e.process(t):t},xD=t=>t;let kD=wD();const DD=fD(fD({},Tf),{},{convert:bD,setupXSSProtection:t=>{t&&(!0===t.disabled?(kD=xD,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(kD=wD(t.filterOptions)))}});yk(DD,"xss",{get:function(){return kD}});var SD,CD,TD,MD,OD,ED,PD,ID,LD,ND={};function AD(){if(CD)return SD;CD=1;var t=F(),e=R(),i=z(),n=Qi(),o=Jd().trim,s=$d(),r=i("".charAt),a=t.parseFloat,l=t.Symbol,h=l&&l.iterator,d=1/a(s+"-0")!=-1/0||h&&!e(function(){a(Object(h))});return SD=d?function(t){var e=o(n(t)),i=a(e);return 0===i&&"-"===r(e,0)?-0:i}:a,SD}function FD(){return OD?MD:(OD=1,function(){if(TD)return ND;TD=1;var t=Li(),e=AD();t({global:!0,forced:parseFloat!==e},{parseFloat:e})}(),MD=Gt().parseFloat)}function RD(){return PD?ED:(PD=1,ED=FD())}var YD=n(LD?ID:(LD=1,ID=RD()));class jD{constructor(){this.options=null,this.props=null}setOptions(t){t&&DD.extend(this.options,t)}redraw(){return!1}destroy(){}_isResized(){const 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}}var zD,HD,GD,WD,BD,VD,UD,XD,qD;function KD(){return GD?HD:(GD=1,zD||(zD=1,Li()({target:"String",proto:!0},{repeat:Jc()})),HD=Sr()("String","repeat"))}function ZD(){if(BD)return WD;BD=1;var t=Bt(),e=KD(),i=String.prototype;return WD=function(n){var o=n.repeat;return"string"==typeof n||n===i||t(i,n)&&o===i.repeat?e:o},WD}function $D(){return UD?VD:(UD=1,VD=ZD())}var JD=n(qD?XD:(qD=1,XD=$D()));function QD(t,e,i){if(i&&!aa(i))return QD(t,e,[i]);if(e.hiddenDates=[],i&&1==aa(i)){var n;for(let n=0;n<i.length;n++)if(void 0===JD(i[n])){const o={};o.start=t(i[n].start).toDate().valueOf(),o.end=t(i[n].end).toDate().valueOf(),e.hiddenDates.push(o)}Mx(n=e.hiddenDates).call(n,(t,e)=>t.start-e.start)}}function tS(t,e,i){if(i&&!aa(i))return tS(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){QD(t,e,i);const n=t(e.range.start),o=t(e.range.end),s=(e.range.end-e.range.start)/e.domProps.centerContainer.width;for(let r=0;r<i.length;r++)if(void 0!==JD(i[r])){let a=t(i[r].start),l=t(i[r].end);if("Invalid Date"==a._d)throw new Error("Supplied start date is not valid: ".concat(i[r].start));if("Invalid Date"==l._d)throw new Error("Supplied end date is not valid: ".concat(i[r].end));if(l-a>=4*s){let t=0,s=o.clone();switch(JD(i[r])){case"daily":a.day()!=l.day()&&(t=1),a=a.dayOfYear(n.dayOfYear()).year(n.year()).subtract(7,"days"),l=l.dayOfYear(n.dayOfYear()).year(n.year()).subtract(7-t,"days"),s.add(1,"weeks");break;case"weekly":{const t=l.diff(a,"days"),e=a.day();a=a.date(n.date()).month(n.month()).year(n.year()),l=a.clone(),a=a.day(e).subtract(1,"weeks"),l=l.day(e).add(t,"days").subtract(1,"weeks"),s.add(1,"weeks");break}case"monthly":a.month()!=l.month()&&(t=1),a=a.month(n.month()).year(n.year()).subtract(1,"months"),l=l.month(n.month()).year(n.year()).subtract(1,"months").add(t,"months"),s.add(1,"months");break;case"yearly":a.year()!=l.year()&&(t=1),a=a.year(n.year()).subtract(1,"years"),l=l.year(n.year()).subtract(1,"years").add(t,"years"),s.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",JD(i[r]))}for(;a<s;)switch(e.hiddenDates.push({start:a.valueOf(),end:l.valueOf()}),JD(i[r])){case"daily":a=a.add(1,"days"),l=l.add(1,"days");break;case"weekly":a=a.add(1,"weeks"),l=l.add(1,"weeks");break;case"monthly":a=a.add(1,"months"),l=l.add(1,"months");break;case"yearly":a=a.add(1,"y"),l=l.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",JD(i[r]))}e.hiddenDates.push({start:a.valueOf(),end:l.valueOf()})}}eS(e);const r=cS(e.range.start,e.hiddenDates),a=cS(e.range.end,e.hiddenDates);let l=e.range.start,h=e.range.end;1==r.hidden&&(l=1==e.range.startToFront?r.startDate-1:r.endDate+1),1==a.hidden&&(h=1==e.range.endToFront?a.startDate-1:a.endDate+1),1!=r.hidden&&1!=a.hidden||e.range._applyRange(l,h)}}function eS(t){var e;const i=t.hiddenDates,n=[];for(var o=0;o<i.length;o++)for(let t=0;t<i.length;t++)o!=t&&1!=i[t].remove&&1!=i[o].remove&&(i[t].start>=i[o].start&&i[t].end<=i[o].end?i[t].remove=!0:i[t].start>=i[o].start&&i[t].start<=i[o].end?(i[o].end=i[t].end,i[t].remove=!0):i[t].end>=i[o].start&&i[t].end<=i[o].end&&(i[o].start=i[t].start,i[t].remove=!0));for(o=0;o<i.length;o++)!0!==i[o].remove&&n.push(i[o]);t.hiddenDates=n,Mx(e=t.hiddenDates).call(e,(t,e)=>t.start-e.start)}function iS(t,e,i){let n=!1;const o=e.current.valueOf();for(let t=0;t<e.hiddenDates.length;t++){const i=e.hiddenDates[t].start;var s=e.hiddenDates[t].end;if(o>=i&&o<s){n=!0;break}}if(1==n&&o<e._end.valueOf()&&o!=i){const n=t(i),o=t(s);n.year()!=o.year()?e.switchedYear=!0:n.month()!=o.month()?e.switchedMonth=!0:n.dayOfYear()!=o.dayOfYear()&&(e.switchedDay=!0),e.current=o}}function nS(t,e,i){let n;if(0==t.body.hiddenDates.length)return n=t.range.conversion(i),(e.valueOf()-n.offset)*n.scale;{const o=cS(e,t.body.hiddenDates);1==o.hidden&&(e=o.startDate);const s=sS(t.body.hiddenDates,t.range.start,t.range.end);if(e<t.range.start){n=t.range.conversion(i,s);const o=rS(t.body.hiddenDates,e,n.offset);return e=t.options.moment(e).toDate().valueOf(),e+=o,-(n.offset-e.valueOf())*n.scale}if(e>t.range.end){const o={start:t.range.start,end:e};return e=aS(t.options.moment,t.body.hiddenDates,o,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}return e=aS(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}}function oS(t,e,i){if(0==t.body.hiddenDates.length){const n=t.range.conversion(i);return new Date(e/n.scale+n.offset)}{const n=sS(t.body.hiddenDates,t.range.start,t.range.end),o=(t.range.end-t.range.start-n)*e/i,s=hS(t.body.hiddenDates,t.range,o);return new Date(s+o+t.range.start)}}function sS(t,e,i){let n=0;for(let o=0;o<t.length;o++){const s=t[o].start,r=t[o].end;s>=e&&r<i&&(n+=r-s)}return n}function rS(t,e,i){let n=0;for(let o=0;o<t.length;o++){const s=t[o].start,r=t[o].end;s>=e&&r<=i&&(n+=r-s)}return n}function aS(t,e,i,n){return n=t(n).toDate().valueOf(),n-=lS(t,e,i,n)}function lS(t,e,i,n){let o=0;n=t(n).toDate().valueOf();for(let t=0;t<e.length;t++){const s=e[t].start,r=e[t].end;s>=i.start&&r<i.end&&n>=r&&(o+=r-s)}return o}function hS(t,e,i){let n=0,o=0,s=e.start;for(let r=0;r<t.length;r++){const a=t[r].start,l=t[r].end;if(a>=e.start&&l<e.end){if(o+=a-s,s=l,o>=i)break;n+=l-a}}return n}function dS(t,e,i,n){const o=cS(e,t);return 1==o.hidden?i<0?1==n?o.startDate-(o.endDate-e)-1:o.startDate-1:1==n?o.endDate+(e-o.startDate)+1:o.endDate+1:e}function cS(t,e){for(let o=0;o<e.length;o++){var i=e[o].start,n=e[o].end;if(t>=i&&t<n)return{hidden:!0,startDate:i,endDate:n}}return{hidden:!1,startDate:i,endDate:n}}var uS,pS,mS,fS,gS=Object.freeze({__proto__:null,convertHiddenOptions:QD,correctTimeForHidden:aS,getAccumulatedHiddenDuration:hS,getHiddenDurationBefore:lS,getHiddenDurationBeforeStart:rS,getHiddenDurationBetween:sS,getIsHidden:cS,printDates:function(t){for(let e=0;e<t.length;e++)console.log(e,new Date(t[e].start),new Date(t[e].end),t[e].start,t[e].end,t[e].remove)},removeDuplicates:eS,snapAwayFromHidden:dS,stepOverHiddenDates:iS,toScreen:nS,toTime:oS,updateHiddenDates:tS});class vS extends jD{constructor(t,e){var i,n,o,s,r,a,l;super();const h=Rk().hours(0).minutes(0).seconds(0).milliseconds(0),d=h.clone().add(-3,"days").valueOf(),c=h.clone().add(3,"days").valueOf();this.millisecondsPerPixelCache=void 0,void 0===e?(this.start=d,this.end=c):(this.start=e.start||d,this.end=e.end||c),this.rolling=!1,this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:Rk,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=DD.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",dl(i=this._onDragStart).call(i,this)),this.body.emitter.on("panmove",dl(n=this._onDrag).call(n,this)),this.body.emitter.on("panend",dl(o=this._onDragEnd).call(o,this)),this.body.emitter.on("mousewheel",dl(s=this._onMouseWheel).call(s,this)),this.body.emitter.on("touch",dl(r=this._onTouch).call(r,this)),this.body.emitter.on("pinch",dl(a=this._onPinch).call(a,this)),this.body.dom.rollingModeBtn.addEventListener("click",dl(l=this.startRolling).call(l,this)),this.setOptions(e)}setOptions(t){if(t){const e=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","zoomFriction","rtl","showCurrentTime","rollingMode","horizontalScroll","horizontalScrollKey","horizontalScrollInvert","verticalScroll"];DD.selectiveExtend(e,this.options,t),t.rollingMode&&t.rollingMode.follow&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}}startRolling(){const t=this;!function e(){t.stopRolling(),t.rolling=!0;let i=t.end-t.start;const n=DD.convert(new Date,"Date").valueOf(),o=t.options.rollingMode&&t.options.rollingMode.offset||.5,s=n-i*o,r=n+i*(1-o);t.setRange(s,r,{animation:!1}),i=1/t.conversion(t.body.domProps.center.width).scale/10,i<30&&(i=30),i>1e3&&(i=1e3),t.body.dom.rollingModeBtn.style.visibility="hidden",t.currentTimeTimer=Fu(e,i)}()}stopRolling(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")}setRange(t,e,i,n,o){i||(i={}),!0!==i.byUser&&(i.byUser=!1);const s=this,r=null!=t?DD.convert(t,"Date").valueOf():null,a=null!=e?DD.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,i.animation){const t=this.start,e=this.end,d="object"==typeof i.animation&&"duration"in i.animation?i.animation.duration:500,c="object"==typeof i.animation&&"easingFunction"in i.animation?i.animation.easingFunction:"easeInOutQuad",u=DD.easingFunctions[c];var l;if(!u)throw new Error(vd(l="Unknown easing function ".concat(du(c),". Choose from: ")).call(l,Ea(DD.easingFunctions).join(", ")));const p=Va();let m=!1;const f=()=>{if(!s.props.touch.dragging){const l=Va()-p,c=u(l/d),g=l>d,v=g||null===r?r:t+(r-t)*c,y=g||null===a?a:e+(a-e)*c;h=s._applyRange(v,y),tS(s.options.moment,s.body,s.options.hiddenDates),m=m||h;const b={start:new Date(s.start),end:new Date(s.end),byUser:i.byUser,event:i.event};if(o&&o(c,h,g),h&&s.body.emitter.emit("rangechange",b),g){if(m&&(s.body.emitter.emit("rangechanged",b),n))return n()}else s.animationTimer=Fu(f,20)}};return f()}var h=this._applyRange(r,a);if(tS(this.options.moment,this.body,this.options.hiddenDates),h){const t={start:new Date(this.start),end:new Date(this.end),byUser:i.byUser,event:i.event};if(this.body.emitter.emit("rangechange",t),clearTimeout(s.timeoutID),s.timeoutID=Fu(()=>{s.body.emitter.emit("rangechanged",t)},200),n)return n()}}getMillisecondsPerPixel(){return void 0===this.millisecondsPerPixelCache&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)}_applyRange(t,e){let i=null!=t?DD.convert(t,"Date").valueOf():this.start,n=null!=e?DD.convert(e,"Date").valueOf():this.end;const o=null!=this.options.max?DD.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?DD.convert(this.options.min,"Date").valueOf():null;let r;if(isNaN(i)||null===i)throw new Error('Invalid start "'.concat(t,'"'));if(isNaN(n)||null===n)throw new Error('Invalid end "'.concat(e,'"'));if(n<i&&(n=i),null!==s&&i<s&&(r=s-i,i+=r,n+=r,null!=o&&n>o&&(n=o)),null!==o&&n>o&&(r=n-o,i-=r,n-=r,null!=s&&i<s&&(i=s)),null!==this.options.zoomMin){let t=YD(this.options.zoomMin);if(t<0&&(t=0),n-i<t){const e=.5;this.end-this.start===t&&i>=this.start-e&&n<=this.end?(i=this.start,n=this.end):(r=t-(n-i),i-=r/2,n+=r/2)}}if(null!==this.options.zoomMax){let t=YD(this.options.zoomMax);t<0&&(t=0),n-i>t&&(this.end-this.start===t&&i<this.start&&n>this.end?(i=this.start,n=this.end):(r=n-i-t,i+=r/2,n-=r/2))}const a=this.start!=i||this.end!=n;return i>=this.start&&i<=this.end||n>=this.start&&n<=this.end||this.start>=i&&this.start<=n||this.end>=i&&this.end<=n||this.body.emitter.emit("checkRangedItems"),this.start=i,this.end=n,a}getRange(){return{start:this.start,end:this.end}}conversion(t,e){return vS.conversion(this.start,this.end,t,e)}static conversion(t,e,i,n){return void 0===n&&(n=0),0!=i&&e-t!=0?{offset:t,scale:i/(e-t-n)}:{offset:0,scale:1}}_onDragStart(t){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(t)&&this.props.touch.allowDragging&&(this.stopRolling(),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"))}_onDrag(t){if(!t)return;if(!this.props.touch.dragging)return;if(!this.options.moveable)return;if(!this.props.touch.allowDragging)return;const e=this.options.direction;yS(e);let i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;let n=this.props.touch.end-this.props.touch.start;n-=sS(this.body.hiddenDates,this.start,this.end);const o="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;let s;s=this.options.rtl?i/o*n:-i/o*n;const r=this.props.touch.start+s,a=this.props.touch.end+s,l=dS(this.body.hiddenDates,r,this.previousDelta-i,!0),h=dS(this.body.hiddenDates,a,this.previousDelta-i,!0);if(l!=r||h!=a)return this.deltaDifference+=i,this.props.touch.start=l,this.props.touch.end=h,void this._onDrag(t);this.previousDelta=i,this._applyRange(r,a);const d=new Date(this.start),c=new Date(this.end);this.body.emitter.emit("rangechange",{start:d,end:c,byUser:!0,event:t}),this.body.emitter.emit("panmove")}_onDragEnd(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,event:t}))}_onMouseWheel(t){let e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail?e=-t.detail/3:t.deltaY&&(e=-t.deltaY/3),!(this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){const i=this.options.zoomFriction||5;let n,o;if(n=e<0?1-e/i:1/(1+e/i),this.rolling){const t=this.options.rollingMode&&this.options.rollingMode.offset||.5;o=this.start+(this.end-this.start)*t}else{const e=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);o=this._pointerToDate(e)}this.zoom(n,o,e,t),t.preventDefault()}}_onTouch(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,DD.preventDefault(t)}_onPinch(t){if(!this.options.zoomable||!this.options.moveable)return;DD.preventDefault(t),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();const e=1/(t.scale+this.scaleOffset),i=this.props.touch.centerDate,n=sS(this.body.hiddenDates,this.start,this.end),o=lS(this.options.moment,this.body.hiddenDates,this,i),s=n-o;let r=i-o+(this.props.touch.start-(i-o))*e,a=i+s+(this.props.touch.end-(i+s))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;const l=dS(this.body.hiddenDates,r,1-e,!0),h=dS(this.body.hiddenDates,a,e-1,!0);l==r&&h==a||(this.props.touch.start=l,this.props.touch.end=h,this.scaleOffset=1-t.scale,r=l,a=h);const d={animation:!1,byUser:!0,event:t};this.setRange(r,a,d),this.startToFront=!1,this.endToFront=!0}_isInsideRange(t){const e=t.center?t.center.x:t.clientX,i=this.body.dom.centerContainer.getBoundingClientRect(),n=this.options.rtl?e-i.left:i.right-e,o=this.body.util.toTime(n);return o>=this.start&&o<=this.end}_pointerToDate(t){let e;const i=this.options.direction;if(yS(i),"horizontal"==i)return this.body.util.toTime(t.x).valueOf();{const i=this.body.domProps.center.height;return e=this.conversion(i),t.y/e.scale+e.offset}}getPointer(t,e){const i=e.getBoundingClientRect();return this.options.rtl?{x:i.right-t.x,y:t.y-i.top}:{x:t.x-i.left,y:t.y-i.top}}zoom(t,e,i,n){null==e&&(e=(this.start+this.end)/2);const o=sS(this.body.hiddenDates,this.start,this.end),s=lS(this.options.moment,this.body.hiddenDates,this,e),r=o-s;let a=e-s+(this.start-(e-s))*t,l=e+r+(this.end-(e+r))*t;this.startToFront=!(i>0),this.endToFront=!(-i>0);const h=dS(this.body.hiddenDates,a,i,!0),d=dS(this.body.hiddenDates,l,-i,!0);h==a&&d==l||(a=h,l=d);const c={animation:!1,byUser:!0,event:n};this.setRange(a,l,c),this.startToFront=!1,this.endToFront=!0}move(t){const e=this.end-this.start,i=this.start+e*t,n=this.end+e*t;this.start=i,this.end=n}moveTo(t){const e=(this.start+this.end)/2-t,i=this.start-e,n=this.end-e;this.setRange(i,n,{animation:!1,byUser:!0,event:null})}destroy(){this.stopRolling()}}function yS(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}function bS(){return pS?uS:(pS=1,ku(),uS=Gt().setInterval)}var _S=n(fS?mS:(fS=1,mS=bS())),wS=null;let xS;if("undefined"!=typeof window){xS=function t(e,i){var n=i||{preventDefault:!1};if(e.Manager){var o=e,s=function(e,i){var s=Object.create(n);return i&&o.assign(s,i),t(new o(e,s),s)};return o.assign(s,o),s.Manager=function(e,i){var s=Object.create(n);return i&&o.assign(s,i),t(new o.Manager(e,s),s)},s}var r=Object.create(e),a=e.element;function l(t){return t.match(/[^ ]+/g)}function h(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 e=!1;t.stopPropagation=function(){e=!0};var i=t.srcEvent.stopPropagation.bind(t.srcEvent);"function"==typeof i&&(t.srcEvent.stopPropagation=function(){i(),t.stopPropagation()}),t.firstTarget=wS;for(var n=wS.isConnected?wS:t.target;n&&!e;){var o=n.hammer;if(o)for(var s,r=0;r<o.length;r++)if(s=o[r]._handlers[t.type])for(var a=0;a<s.length&&!e;a++)s[a](t);n=n.parentNode}}return a.hammer||(a.hammer=[]),a.hammer.push(r),e.on("hammer.input",function(t){!0!==n.preventDefault&&n.preventDefault!==t.pointerType||t.preventDefault(),t.isFirst&&(wS=t.target)}),r._handlers={},r.on=function(t,i){return l(t).forEach(function(t){var n=r._handlers[t];n||(r._handlers[t]=n=[],e.on(t,h)),n.push(i)}),r},r.off=function(t,i){return l(t).forEach(function(t){var n=r._handlers[t];n&&((n=i?n.filter(function(t){return t!==i}):[]).length>0?r._handlers[t]=n:(e.off(t,h),delete r._handlers[t]))}),r},r.emit=function(t,i){wS=i.target,e.emit(t,i)},r.destroy=function(){var t=e.element.hammer,i=t.indexOf(r);-1!==i&&t.splice(i,1),t.length||delete e.element.hammer,r._handlers={},e.destroy()},r}(window.Hammer||Em,{preventDefault:"mouse"})}else xS=function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};var kS=xS;function DS(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}class SS{constructor(t,e,i,n,o){this.moment=o&&o.moment||Rk,this.options=o||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale="day",this.step=1,this.setRange(t,e,i),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,aa(n)?this.hiddenDates=n:this.hiddenDates=null!=n?[n]:[],this.format=SS.FORMAT}setMoment(t){this.moment=t,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}setFormat(t){const e=DD.deepExtend({},SS.FORMAT);this.format=DD.deepExtend(e,t)}setRange(t,e,i){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=null!=t?this.moment(t.valueOf()):Va(),this._end=null!=e?this.moment(e.valueOf()):Va(),this.autoScale&&this.setMinimumStep(i)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){switch("week"==this.scale&&this.current.weekday(0),this.scale){case"year":this.current=this.current.year(this.step*Math.floor(this.current.year()/this.step)).month(0);case"month":this.current=this.current.date(1);case"week":case"day":case"weekday":this.current=this.current.hours(0);case"hour":this.current=this.current.minutes(0);case"minute":this.current=this.current.seconds(0);case"second":this.current=this.current.milliseconds(0)}if(1!=this.step){let t=this.current.clone();switch(this.scale){case"millisecond":this.current=this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current=this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current=this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current=this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current=this.current.subtract((this.current.date()-1)%this.step,"day");break;case"week":this.current=this.current.subtract(this.current.week()%this.step,"week");break;case"month":this.current=this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current=this.current.subtract(this.current.year()%this.step,"year")}t.isSame(this.current)||(this.current=this.moment(dS(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){const t=this.current.valueOf();switch(this.scale){case"millisecond":this.current=this.current.add(this.step,"millisecond");break;case"second":this.current=this.current.add(this.step,"second");break;case"minute":this.current=this.current.add(this.step,"minute");break;case"hour":this.current=this.current.add(this.step,"hour"),this.current.month()<6?this.current=this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!==0&&(this.current=this.current.add(this.step-this.current.hours()%this.step,"hour"));break;case"weekday":case"day":this.current=this.current.add(this.step,"day");break;case"week":if(0!==this.current.weekday())this.current=this.current.weekday(0).add(this.step,"week");else if(!1===this.options.showMajorLabels)this.current=this.current.add(this.step,"week");else{const t=this.current.clone();t.add(1,"week"),t.isSame(this.current,"month")?this.current=this.current.add(this.step,"week"):this.current=this.current.add(this.step,"week").date(1)}break;case"month":this.current=this.current.add(this.step,"month");break;case"year":this.current=this.current.add(this.step,"year")}if(1!=this.step)switch(this.scale){case"millisecond":this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&(this.current=this.current.milliseconds(0));break;case"second":this.current.seconds()>0&&this.current.seconds()<this.step&&(this.current=this.current.seconds(0));break;case"minute":this.current.minutes()>0&&this.current.minutes()<this.step&&(this.current=this.current.minutes(0));break;case"hour":this.current.hours()>0&&this.current.hours()<this.step&&(this.current=this.current.hours(0));break;case"weekday":case"day":this.current.date()<this.step+1&&(this.current=this.current.date(1));break;case"week":this.current.week()<this.step&&(this.current=this.current.week(1));break;case"month":this.current.month()<this.step&&(this.current=this.current.month(0))}this.current.valueOf()==t&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,iS(this.moment,this,t)}getCurrent(){return this.current.clone()}setScale(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)}setAutoScale(t){this.autoScale=t}setMinimumStep(t){if(null==t)return;const e=31104e6,i=2592e6,n=864e5,o=36e5,s=6e4,r=1e3;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),7776e6>t&&(this.scale="month",this.step=3),i>t&&(this.scale="month",this.step=1),6048e5>t&&this.options.showWeekScale&&(this.scale="week",this.step=1),1728e5>t&&(this.scale="day",this.step=2),n>t&&(this.scale="day",this.step=1),432e5>t&&(this.scale="weekday",this.step=1),144e5>t&&(this.scale="hour",this.step=4),o>t&&(this.scale="hour",this.step=1),9e5>t&&(this.scale="minute",this.step=15),6e5>t&&(this.scale="minute",this.step=10),3e5>t&&(this.scale="minute",this.step=5),s>t&&(this.scale="minute",this.step=1),15e3>t&&(this.scale="second",this.step=15),1e4>t&&(this.scale="second",this.step=10),5e3>t&&(this.scale="second",this.step=5),r>t&&(this.scale="second",this.step=1),200>t&&(this.scale="millisecond",this.step=200),100>t&&(this.scale="millisecond",this.step=100),50>t&&(this.scale="millisecond",this.step=50),10>t&&(this.scale="millisecond",this.step=10),5>t&&(this.scale="millisecond",this.step=5),1>t&&(this.scale="millisecond",this.step=1)}static snap(t,e,i){let n=Rk(t);if("year"==e){const t=n.year()+Math.round(n.month()/12);n=n.year(Math.round(t/i)*i).month(0).date(0).hours(0).minutes(0).seconds(0).milliseconds(0)}else if("month"==e)n=n.date()>15?n.date(1).add(1,"month"):n.date(1),n=n.hours(0).minutes(0).seconds(0).milliseconds(0);else if("week"==e)n=n.weekday()>2?n.weekday(0).add(1,"week"):n.weekday(0),n=n.hours(0).minutes(0).seconds(0).milliseconds(0);else if("day"==e){switch(i){case 5:case 2:n=n.hours(24*Math.round(n.hours()/24));break;default:n=n.hours(12*Math.round(n.hours()/12))}n=n.minutes(0).seconds(0).milliseconds(0)}else if("weekday"==e){switch(i){case 5:case 2:n=n.hours(12*Math.round(n.hours()/12));break;default:n=n.hours(6*Math.round(n.hours()/6))}n=n.minutes(0).seconds(0).milliseconds(0)}else if("hour"==e){if(4===i)n=n.minutes(60*Math.round(n.minutes()/60));else n=n.minutes(30*Math.round(n.minutes()/30));n=n.seconds(0).milliseconds(0)}else if("minute"==e){switch(i){case 15:case 10:n=n.minutes(5*Math.round(n.minutes()/5)).seconds(0);break;case 5:n=n.seconds(60*Math.round(n.seconds()/60));break;default:n=n.seconds(30*Math.round(n.seconds()/30))}n=n.milliseconds(0)}else if("second"==e)switch(i){case 15:case 10:n=n.seconds(5*Math.round(n.seconds()/5)).milliseconds(0);break;case 5:n=n.milliseconds(1e3*Math.round(n.milliseconds()/1e3));break;default:n=n.milliseconds(500*Math.round(n.milliseconds()/500))}else if("millisecond"==e){const t=i>5?i/2:1;n=n.milliseconds(Math.round(n.milliseconds()/t)*t)}return n}isMajor(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"week":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"week":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}const 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 this.options.showWeekScale?1==t.isoWeekday():1==t.date();case"week":return 1==t.date();case"month":return 0==t.month();default:return!1}}getLabelMinor(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.minorLabels)return this.format.minorLabels(t,this.scale,this.step);const e=this.format.minorLabels[this.scale];return"week"===this.scale&&1===t.date()&&0!==t.weekday()?"":e&&e.length>0?this.moment(t).format(e):""}getLabelMajor(t){if(null==t&&(t=this.current),t instanceof Date&&(t=this.moment(t)),"function"==typeof this.format.majorLabels)return this.format.majorLabels(t,this.scale,this.step);const e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""}getClassName(){var t;const e=this.moment,i=this.moment(this.current),n=i.locale?i.locale("en"):i.lang("en"),o=this.step,s=[];function r(t){return t/o%2==0?" vis-even":" vis-odd"}function a(t){return t.isSame(Va(),"day")?" vis-today":t.isSame(e().add(1,"day"),"day")?" vis-tomorrow":t.isSame(e().add(-1,"day"),"day")?" vis-yesterday":""}function l(t){return t.isSame(Va(),"week")?" vis-current-week":""}function h(t){return t.isSame(Va(),"month")?" vis-current-month":""}switch(this.scale){case"millisecond":s.push(a(n)),s.push(r(n.milliseconds()));break;case"second":s.push(a(n)),s.push(r(n.seconds()));break;case"minute":s.push(a(n)),s.push(r(n.minutes()));break;case"hour":s.push(vd(t="vis-h".concat(n.hours())).call(t,4==this.step?"-h"+(n.hours()+4):"")),s.push(a(n)),s.push(r(n.hours()));break;case"weekday":s.push("vis-".concat(n.format("dddd").toLowerCase())),s.push(a(n)),s.push(l(n)),s.push(r(n.date()));break;case"day":s.push("vis-day".concat(n.date())),s.push("vis-".concat(n.format("MMMM").toLowerCase())),s.push(a(n)),s.push(h(n)),s.push(this.step<=2?a(n):""),s.push(this.step<=2?"vis-".concat(n.format("dddd").toLowerCase()):""),s.push(r(n.date()-1));break;case"week":s.push("vis-week".concat(n.format("w"))),s.push(l(n)),s.push(r(n.week()));break;case"month":s.push("vis-".concat(n.format("MMMM").toLowerCase())),s.push(h(n)),s.push(r(n.month()));break;case"year":s.push("vis-year".concat(n.year())),s.push(function(t){return t.isSame(Va(),"year")?" vis-current-year":""}(n)),s.push(r(n.year()))}return Pd(s).call(s,String).join(" ")}}SS.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",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",week:"MMMM YYYY",month:"YYYY",year:""}};class CS extends jD{constructor(t,e){super(),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,showWeekScale:!1,maxMinorChars:7,format:DD.extend({},SS.FORMAT),moment:Rk,timeAxis:null},this.options=DD.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}setOptions(t){t&&(DD.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),DD.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"==typeof t.orientation&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof Rk.locale?Rk.locale(t.locale):Rk.lang(t.locale)))}_create(){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"}destroy(){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}redraw(){const t=this.props,e=this.dom.foreground,i=this.dom.background,n="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,o=e.parentNode!==n;this._calculateCharSize();const 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;const a=e.nextSibling,l=i.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),i.parentNode&&i.parentNode.removeChild(i),e.style.height="".concat(this.props.height,"px"),this._repaintLabels(),a?n.insertBefore(e,a):n.appendChild(e),l?this.body.dom.backgroundVertical.insertBefore(i,l):this.body.dom.backgroundVertical.appendChild(i),this._isResized()||o}_repaintLabels(){const t=this.options.orientation.axis,e=DD.convert(this.body.range.start,"Number"),i=DD.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf();let o=n-lS(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();const s=new SS(new Date(e),new Date(i),o,this.body.hiddenDates,this.options);s.setMoment(this.options.moment),this.options.format&&s.setFormat(this.options.format),this.options.timeAxis&&s.setScale(this.options.timeAxis),this.step=s;const r=this.dom;let a,l,h,d,c,u;r.redundant.lines=r.lines,r.redundant.majorTexts=r.majorTexts,r.redundant.minorTexts=r.minorTexts,r.lines=[],r.majorTexts=[],r.minorTexts=[];let p,m,f,g=0,v=0;const y=1e3;let b;for(s.start(),l=s.getCurrent(),d=this.body.util.toScreen(l);s.hasNext()&&v<y;){if(v++,c=s.isMajor(),b=s.getClassName(),a=l,h=d,s.next(),l=s.getCurrent(),d=this.body.util.toScreen(l),p=g,g=d-h,"week"===s.scale)u=!0;else u=g>=.4*p;if(this.options.showMinorLabels&&u){var _=this._repaintMinorText(h,s.getLabelMinor(a),t,b);_.style.width="".concat(g,"px")}c&&this.options.showMajorLabels?(h>0&&(null==f&&(f=h),_=this._repaintMajorText(h,s.getLabelMajor(a),t,b)),m=this._repaintMajorLine(h,g,t,b)):u?m=this._repaintMinorLine(h,g,t,b):m&&(m.style.width="".concat(cc(m.style.width)+g,"px"))}if(v!==y||TS||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(y," lines.")),TS=!0),this.options.showMajorLabels){const e=this.body.util.toTime(0),i=s.getLabelMajor(e),n=i.length*(this.props.majorCharWidth||10)+10;(null==f||n<f)&&this._repaintMajorText(0,i,t,b)}Cl(DD).call(DD,this.dom.redundant,t=>{for(;t.length;){const e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})}_repaintMinorText(t,e,i,n){let o=this.dom.redundant.minorTexts.shift();if(!o){const t=document.createTextNode("");o=document.createElement("div"),o.appendChild(t),this.dom.foreground.appendChild(o)}this.dom.minorTexts.push(o),o.innerHTML=DD.xss(e);let s="top"==i?this.props.majorLabelHeight:0;return this._setXY(o,t,s),o.className="vis-text vis-minor ".concat(n),o}_repaintMajorText(t,e,i,n){let o=this.dom.redundant.majorTexts.shift();if(!o){const t=document.createElement("div");o=document.createElement("div"),o.appendChild(t),this.dom.foreground.appendChild(o)}o.childNodes[0].innerHTML=DD.xss(e),o.className="vis-text vis-major ".concat(n);let s="top"==i?0:this.props.minorLabelHeight;return this._setXY(o,t,s),this.dom.majorTexts.push(o),o}_setXY(t,e,i){var n;const o=this.options.rtl?-1*e:e;t.style.transform=vd(n="translate(".concat(o,"px, ")).call(n,i,"px)")}_repaintMinorLine(t,e,i,n){var o;let s=this.dom.redundant.lines.shift();s||(s=document.createElement("div"),this.dom.background.appendChild(s)),this.dom.lines.push(s);const r=this.props;s.style.width="".concat(e,"px"),s.style.height="".concat(r.minorLineHeight,"px");let a="top"==i?r.majorLabelHeight:this.body.domProps.top.height,l=t-r.minorLineWidth/2;return this._setXY(s,l,a),s.className=vd(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-minor ")).call(o,n),s}_repaintMajorLine(t,e,i,n){var o;let s=this.dom.redundant.lines.shift();s||(s=document.createElement("div"),this.dom.background.appendChild(s)),this.dom.lines.push(s);const r=this.props;s.style.width="".concat(e,"px"),s.style.height="".concat(r.majorLineHeight,"px");let a="top"==i?0:this.body.domProps.top.height,l=t-r.majorLineWidth/2;return this._setXY(s,l,a),s.className=vd(o="vis-grid ".concat(this.options.rtl?"vis-vertical-rtl":"vis-vertical"," vis-major ")).call(o,n),s}_calculateCharSize(){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 TS=!1;function MS(t){var e,i=t&&t.preventDefault||!1,n=t&&t.container||window,o={},s={keydown:{},keyup:{}},r={};for(e=97;e<=122;e++)r[String.fromCharCode(e)]={code:e-97+65,shift:!1};for(e=65;e<=90;e++)r[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)r[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)r["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;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){h(t,"keydown")},l=function(t){h(t,"keyup")},h=function(t,e){if(void 0!==s[e][t.keyCode]){for(var n=s[e][t.keyCode],o=0;o<n.length;o++)(void 0===n[o].shift||1==n[o].shift&&1==t.shiftKey||0==n[o].shift&&0==t.shiftKey)&&n[o].fn(t);1==i&&t.preventDefault()}};return o.bind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===r[t])throw new Error("unsupported key: "+t);void 0===s[i][r[t].code]&&(s[i][r[t].code]=[]),s[i][r[t].code].push({fn:e,shift:r[t].shift})},o.bindAll=function(t,e){for(var i in void 0===e&&(e="keydown"),r)r.hasOwnProperty(i)&&o.bind(i,t,e)},o.getKey=function(t){for(var e in r)if(r.hasOwnProperty(e)){if(1==t.shiftKey&&1==r[e].shift&&t.keyCode==r[e].code)return e;if(0==t.shiftKey&&0==r[e].shift&&t.keyCode==r[e].code)return e;if(t.keyCode==r[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},o.unbind=function(t,e,i){if(void 0===i&&(i="keydown"),void 0===r[t])throw new Error("unsupported key: "+t);if(void 0!==e){var n=[],o=s[i][r[t].code];if(void 0!==o)for(var a=0;a<o.length;a++)o[a].fn==e&&o[a].shift==r[t].shift||n.push(s[i][r[t].code][a]);s[i][r[t].code]=n}else s[i][r[t].code]=[]},o.reset=function(){s={keydown:{},keyup:{}}},o.destroy=function(){s={keydown:{},keyup:{}},n.removeEventListener("keydown",a,!0),n.removeEventListener("keyup",l,!0)},n.addEventListener("keydown",a,!0),n.addEventListener("keyup",l,!0),o}function OS(t){var e,i;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=kS(this.dom.overlay),this.hammer.on("tap",dl(e=this._onTapOverlay).call(e,this));var n=this,o=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Cl(o).call(o,function(t){n.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(e){(function(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1})(e.target,t)||n.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=MS(),this.escListener=dl(i=this.deactivate).call(i,this)}Xu(OS.prototype),OS.current=null,OS.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},OS.prototype.activate=function(){var t;OS.current&&OS.current.deactivate(),OS.current=this,this.active=!0,this.dom.overlay.style.display="none",DD.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),dl(t=this.keycharm).call(t,"esc",this.escListener)},OS.prototype.deactivate=function(){OS.current===this&&(OS.current=null),this.active=!1,this.dom.overlay.style.display="",DD.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},OS.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()};const ES={current:"current",time:"time",deleteSelected:"Delete selected"},PS={current:"attuale",time:"tempo",deleteSelected:"Cancella la selezione"},IS={current:"huidige",time:"tijd",deleteSelected:"Selectie verwijderen"},LS={current:"Aktuelle",time:"Zeit",deleteSelected:"Lösche Auswahl"},NS={current:"actuel",time:"heure",deleteSelected:"Effacer la selection"},AS={current:"actual",time:"hora",deleteSelected:"Eliminar selección"},FS={current:"поточний",time:"час",deleteSelected:"Видалити обране"},RS={current:"текущее",time:"время",deleteSelected:"Удалить выбранное"},YS={current:"aktualny",time:"czas",deleteSelected:"Usuń wybrane"},jS={current:"atual",time:"data",deleteSelected:"Apagar selecionado"},zS={current:"güncel",time:"zaman",deleteSelected:"Seçileni sil"},HS={current:"現在",time:"時刻",deleteSelected:"選択されたものを削除"},GS={current:"nuvarande",time:"tid",deleteSelected:"Radera valda"},WS={current:"nåværende",time:"tid",deleteSelected:"Slett valgte"},BS={current:"einamas",time:"laikas",deleteSelected:"Pašalinti pasirinktą"},VS={en:ES,en_EN:ES,en_US:ES,it:PS,it_IT:PS,it_CH:PS,nl:IS,nl_NL:IS,nl_BE:IS,de:LS,de_DE:LS,de_CH:LS,fr:NS,fr_FR:NS,fr_CA:NS,fr_BE:NS,fr_CH:NS,es:AS,es_ES:AS,uk:FS,uk_UA:FS,ru:RS,ru_RU:RS,pl:YS,pl_PL:YS,pt:jS,pt_BR:jS,pt_PT:jS,tr:zS,tr_TR:zS,ja:HS,ja_JP:HS,lt:BS,lt_LT:BS,sv:GS,sv_SE:GS,nb:WS,nn:WS,nb_NO:WS,nn_NO:WS};class US extends jD{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={moment:Rk,locales:VS,locale:"en",id:void 0,title:void 0},this.options=DD.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=DD.extend({},VS,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];Cl(i=Ea(this.options.locales)).call(i,t=>{this.options.locales[t]=DD.extend({},n,this.options.locales[t])}),e&&null!=e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(t){t&&DD.selectiveExtend(["moment","locale","locales","id","title","rtl","snap"],this.options,t)}_create(){var t,e,i;const n=document.createElement("div");n["custom-time"]=this,n.className="vis-custom-time ".concat(this.options.id||""),n.style.position="absolute",n.style.top="0px",n.style.height="100%",this.bar=n;const o=document.createElement("div");function s(t){this.body.range._onMouseWheel(t)}o.style.position="relative",o.style.top="0px",this.options.rtl?o.style.right="-10px":o.style.left="-10px",o.style.height="100%",o.style.width="20px",o.addEventListener?(o.addEventListener("mousewheel",dl(s).call(s,this),!1),o.addEventListener("DOMMouseScroll",dl(s).call(s,this),!1)):o.attachEvent("onmousewheel",dl(s).call(s,this)),n.appendChild(o),this.hammer=new kS(o),this.hammer.on("panstart",dl(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",dl(e=this._onDrag).call(e,this)),this.hammer.on("panend",dl(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:kS.DIRECTION_ALL}),this.hammer.get("press").set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){const t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));const e=this.body.util.toScreen(this.customTime);let i=this.options.locales[this.options.locale];i||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),i=this.options.locales.en);let n=this.options.title;var o;void 0===n?(n=vd(o="".concat(i.time,": ")).call(o,this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss")),n=n.charAt(0).toUpperCase()+n.substring(1)):"function"==typeof n&&(n=n.call(this,this.customTime));return this.options.rtl?this.bar.style.right="".concat(e,"px"):this.bar.style.left="".concat(e,"px"),this.bar.title=n,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(t){this.customTime=DD.convert(t,"Date"),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(t,e){var i;(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement("div"),this.marker.className="vis-custom-time-marker",this.marker.innerHTML=DD.xss(t),this.marker.style.position="absolute",e)&&(this.marker.setAttribute("contenteditable","true"),this.marker.addEventListener("pointerdown",()=>{this.marker.focus()}),this.marker.addEventListener("input",dl(i=this._onMarkerChange).call(i,this)),this.marker.title=t,this.marker.addEventListener("blur",t=>{this.title!=t.target.innerHTML&&(this._onMarkerChanged(t),this.title=t.target.innerHTML)}));this.bar.appendChild(this.marker)}setCustomTitle(t){this.options.title=t}_onDragStart(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()}_onDrag(t){if(!this.eventParams.dragging)return;let e=this.options.rtl?-1*t.deltaX:t.deltaX;const i=this.body.util.toScreen(this.eventParams.customTime)+e,n=this.body.util.toTime(i),o=this.body.util.getScale(),s=this.body.util.getStep(),r=this.options.snap,a=r?r(n,o,s):n;this.setCustomTime(a),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation()}_onDragEnd(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:t}),t.stopPropagation())}_onMarkerChange(t){this.body.emitter.emit("markerchange",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}_onMarkerChanged(t){this.body.emitter.emit("markerchanged",{id:this.options.id,title:t.target.innerHTML,event:t}),t.stopPropagation()}static customTimeFromTarget(t){let e=t.target;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"custom-time"))return e["custom-time"];e=e.parentNode}return null}}class XS{_create(t){var e,i,n;this.dom={},this.dom.container=t,this.dom.container.style.position="relative",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.rollingModeBtn=document.createElement("div"),this.dom.loadingScreen=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.rollingModeBtn.className="vis-rolling-mode-btn",this.dom.loadingScreen.className="vis-loading-screen",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.root.appendChild(this.dom.rollingModeBtn),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.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on("rangechange",()=>{!0===this.initialDrawDone&&this._redraw()}),this.on("rangechanged",()=>{this.initialRangeChangeDone||(this.initialRangeChangeDone=!0)}),this.on("touch",dl(e=this._onTouch).call(e,this)),this.on("panmove",dl(i=this._onDrag).call(i,this));const o=this;this._origRedraw=dl(n=this._redraw).call(n,this),this._redraw=DD.throttle(this._origRedraw),this.on("_change",t=>{o.itemSet&&o.itemSet.initialItemSetDrawn&&t&&1==t.queue?o._redraw():o._origRedraw()}),this.hammer=new kS(this.dom.root);const s=this.hammer.get("pinch").set({enable:!0});s&&function(t){t.getTouchAction=function(){return["pan-y"]}}(s),this.hammer.get("pan").set({threshold:5,direction:kS.DIRECTION_ALL}),this.timelineListeners={};const r=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];var a,l;function h(t){if(!this.isActive())return;if(this.emit("mousewheel",t),this.options.preferZoom){if(!this.options.zoomKey||t[this.options.zoomKey])return}else if(this.options.zoomKey&&t[this.options.zoomKey])return;if(!this.options.verticalScroll&&!this.options.horizontalScroll)return;let e=0,i=0;"detail"in t&&(i=-1*t.detail),"wheelDelta"in t&&(i=t.wheelDelta),"wheelDeltaY"in t&&(i=t.wheelDeltaY),"wheelDeltaX"in t&&(e=-1*t.wheelDeltaX),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=-1*i,i=0),"deltaY"in t&&(i=-1*t.deltaY),"deltaX"in t&&(e=t.deltaX);t.deltaMode&&(1===t.deltaMode?(e*=40,i*=40):(e*=40,i*=800));const n=this.options.verticalScroll,o=Math.abs(i)>=Math.abs(e),s=this.options.horizontalScroll&&this.options.horizontalScrollKey&&t[this.options.horizontalScrollKey];if(n&&o&&!s){const e=this.props.scrollTop,n=e+i;return void(this._setScrollTop(n)!==e&&(this._redraw(),this.emit("scroll",t),t.preventDefault()))}if(this.options.horizontalScroll){this.range.stopRolling();let n=(o?i:e)/120*(this.range.end-this.range.start)/20;this.options.horizontalScrollInvert&&o&&(n=-n);const s=this.range.start+n,r=this.range.end+n,a={animation:!1,byUser:!0,event:t};return this.range.setRange(s,r,a),void t.preventDefault()}}Cl(r).call(r,t=>{const e=e=>{o.isActive()&&o.emit(t,e)};o.hammer.on(t,e),o.timelineListeners[t]=e}),DS(this.hammer,t=>{o.emit("touch",t)}),a=this.hammer,(l=t=>{o.emit("release",t)}).inputHandler=function(t){t.isFinal&&l(t)},a.on("hammer.input",l.inputHandler);const d="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":this.dom.centerContainer.addEventListener?"DOMMouseScroll":"onmousewheel";function c(t){if(o.options.verticalScroll&&(t.preventDefault(),o.isActive())){const e=-t.target.scrollTop;o._setScrollTop(e),o._redraw(),o.emit("scrollSide",t)}}this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(d,dl(h).call(h,this),!1),this.dom.top.addEventListener(d,dl(h).call(h,this),!1),this.dom.bottom.addEventListener(d,dl(h).call(h,this),!1),this.dom.left.parentNode.addEventListener("scroll",dl(c).call(c,this)),this.dom.right.parentNode.addEventListener("scroll",dl(c).call(c,this));let u=!1;function p(t){var e;if(t.preventDefault&&(o.emit("dragover",o.getEventProperties(t)),t.preventDefault()),kc(e=t.target.className).call(e,"timeline")>-1&&!u)return t.dataTransfer.dropEffect="move",u=!0,!1}function m(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e||!e.content)return}catch(t){return!1}return u=!1,t.center={x:t.clientX,y:t.clientY},"item"!==e.target?o.itemSet._onAddItem(t):o.itemSet._onDropObjectOnItem(t),o.emit("drop",o.getEventProperties(t)),!1}if(this.dom.center.addEventListener("dragover",dl(p).call(p,this),!1),this.dom.center.addEventListener("drop",dl(m).call(m,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root),t.appendChild(this.dom.loadingScreen)}setOptions(t){var e;if(t){const e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","preferZoom","rtl","zoomKey","horizontalScroll","horizontalScrollKey","horizontalScrollInvert","verticalScroll","longSelectPressTime","snap"];if(DD.selectiveExtend(e,this.options,t),this.dom.rollingModeBtn.style.visibility="hidden",this.options.rtl&&(this.dom.container.style.direction="rtl",this.dom.backgroundVertical.className="vis-panel vis-background vis-vertical-rtl"),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className="vis-panel vis-right vis-vertical-scroll":this.dom.leftContainer.className="vis-panel vis-left vis-vertical-scroll"),"object"!=typeof this.options.orientation&&(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"==typeof 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){const t=this.timeAxis2=new CS(this.body,this.options);t.setOptions=e=>{const i=e?DD.extend({},e):{};i.orientation="top",CS.prototype.setOptions.call(t,i)},this.components.push(t)}}else if(this.timeAxis2){var i;const t=kc(i=this.components).call(i,this.timeAxis2);var n;if(-1!==t)rh(n=this.components).call(n,t,1);this.timeAxis2.destroy(),this.timeAxis2=null}"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&QD(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new OS(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(Cl(e=this.components).call(e,e=>e.setOptions(t)),"configure"in t){var o;this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);const e=DD.deepExtend({},this.options);Cl(o=this.components).call(o,t=>{DD.deepExtend(e,t.options)}),this.configurator.setModuleOptions({global:e})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){var t;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(const t in this.timelineListeners)Object.prototype.hasOwnProperty.call(this.timelineListeners,t)&&delete this.timelineListeners[t];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,Cl(t=this.components).call(t,t=>t.destroy()),this.body=null}setCustomTime(t,e){var i;const n=Pd(i=this.customTimes).call(i,t=>e===t.options.id);if(0===n.length)throw new Error("No custom time bar found with id ".concat(du(e)));n.length>0&&n[0].setCustomTime(t)}getCustomTime(t){var e;const i=Pd(e=this.customTimes).call(e,e=>e.options.id===t);if(0===i.length)throw new Error("No custom time bar found with id ".concat(du(t)));return i[0].getCustomTime()}setCustomTimeMarker(t,e,i){var n;const o=Pd(n=this.customTimes).call(n,t=>t.options.id===e);if(0===o.length)throw new Error("No custom time bar found with id ".concat(du(e)));o.length>0&&o[0].setCustomMarker(t,i)}setCustomTimeTitle(t,e){var i;const n=Pd(i=this.customTimes).call(i,t=>t.options.id===e);if(0===n.length)throw new Error("No custom time bar found with id ".concat(du(e)));if(n.length>0)return n[0].setCustomTitle(t)}getEventProperties(t){return{event:t}}addCustomTime(t,e){var i;const n=void 0!==t?DD.convert(t,"Date"):new Date,o=Hx(i=this.customTimes).call(i,t=>t.options.id===e);if(o)throw new Error("A custom time with id ".concat(du(e)," already exists"));const s=new US(this.body,DD.extend({},this.options,{time:n,id:e,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(s),this.components.push(s),this._redraw(),e}removeCustomTime(t){var e;const i=Pd(e=this.customTimes).call(e,e=>e.options.id===t);if(0===i.length)throw new Error("No custom time bar found with id ".concat(du(t)));Cl(i).call(i,t=>{var e,i,n,o;rh(e=this.customTimes).call(e,kc(i=this.customTimes).call(i,t),1),rh(n=this.components).call(n,kc(o=this.components).call(o,t),1),t.destroy()})}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(t){return this.time=t,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(t,e){const i=this.getDataRange();if(null===i.min&&null===i.max)return;const n=i.max-i.min,o=new Date(i.min.valueOf()-.01*n),s=new Date(i.max.valueOf()+.01*n),r=!t||void 0===t.animation||t.animation;this.range.setRange(o,s,{animation:r},e)}getDataRange(){throw new Error("Cannot invoke abstract method getDataRange")}setWindow(t,e,i,n){let o,s;"function"==typeof arguments[2]&&(n=arguments[2],i={}),1==arguments.length?(s=arguments[0],o=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:o})):2==arguments.length&&"function"==typeof arguments[1]?(s=arguments[0],n=arguments[1],o=void 0===s.animation||s.animation,this.range.setRange(s.start,s.end,{animation:o},n)):(o=!i||void 0===i.animation||i.animation,this.range.setRange(t,e,{animation:o},n))}moveTo(t,e,i){"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.range.end-this.range.start,o=DD.convert(t,"Date").valueOf(),s=o-n/2,r=o+n/2,a=!e||void 0===e.animation||e.animation;this.range.setRange(s,r,{animation:a},i)}getWindow(){const t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}}zoomIn(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.getWindow(),o=n.start.valueOf(),s=n.end.valueOf(),r=s-o,a=(r-r/(1+t))/2,l=o+a,h=s-a;this.setWindow(l,h,e,i)}zoomOut(t,e,i){if(!t||t<0||t>1)return;"function"==typeof arguments[1]&&(i=arguments[1],e={});const n=this.getWindow(),o=n.start.valueOf(),s=n.end.valueOf(),r=s-o,a=o-r*t/2,l=s+r*t/2;this.setWindow(a,l,e,i)}redraw(){this._redraw()}_redraw(){var t;this.redrawCount++;const e=this.dom;if(!e||!e.container||0==e.root.offsetWidth)return;let i=!1;const n=this.options,o=this.props;tS(this.options.moment,this.body,this.options.hiddenDates),"top"==n.orientation?(DD.addClassName(e.root,"vis-top"),DD.removeClassName(e.root,"vis-bottom")):(DD.removeClassName(e.root,"vis-top"),DD.addClassName(e.root,"vis-bottom")),n.rtl?(DD.addClassName(e.root,"vis-rtl"),DD.removeClassName(e.root,"vis-ltr")):(DD.addClassName(e.root,"vis-ltr"),DD.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=DD.option.asSize(n.maxHeight,""),e.root.style.minHeight=DD.option.asSize(n.minHeight,""),e.root.style.width=DD.option.asSize(n.width,"");const s=e.root.offsetWidth;o.border.left=1,o.border.right=1,o.border.top=1,o.border.bottom=1,o.center.height=e.center.offsetHeight,o.left.height=e.left.offsetHeight,o.right.height=e.right.offsetHeight,o.top.height=e.top.clientHeight||-o.border.top,o.bottom.height=Math.round(e.bottom.getBoundingClientRect().height)||e.bottom.clientHeight||-o.border.bottom;const r=Math.max(o.left.height,o.center.height,o.right.height),a=o.top.height+r+o.bottom.height+o.border.top+o.border.bottom;e.root.style.height=DD.option.asSize(n.height,"".concat(a,"px")),o.root.height=e.root.offsetHeight,o.background.height=o.root.height;const l=o.root.height-o.top.height-o.bottom.height;o.centerContainer.height=l,o.leftContainer.height=l,o.rightContainer.height=o.leftContainer.height,o.root.width=s,o.background.width=o.root.width,this.initialDrawDone||(o.scrollbarWidth=DD.getScrollBarWidth());const h=e.leftContainer.clientWidth,d=e.rightContainer.clientWidth;n.verticalScroll?n.rtl?(o.left.width=h||-o.border.left,o.right.width=d+o.scrollbarWidth||-o.border.right):(o.left.width=h+o.scrollbarWidth||-o.border.left,o.right.width=d||-o.border.right):(o.left.width=h||-o.border.left,o.right.width=d||-o.border.right),this._setDOM();let c=this._updateScrollTop();"top"!=n.orientation.item&&(c+=Math.max(o.centerContainer.height-o.center.height-o.border.top-o.border.bottom,0)),e.center.style.transform="translateY(".concat(c,"px)");const u=0==o.scrollTop?"hidden":"",p=o.scrollTop==o.scrollTopMin?"hidden":"";e.shadowTop.style.visibility=u,e.shadowBottom.style.visibility=p,e.shadowTopLeft.style.visibility=u,e.shadowBottomLeft.style.visibility=p,e.shadowTopRight.style.visibility=u,e.shadowBottomRight.style.visibility=p,n.verticalScroll&&(e.rightContainer.className="vis-panel vis-right vis-vertical-scroll",e.leftContainer.className="vis-panel vis-left vis-vertical-scroll",e.shadowTopRight.style.visibility="hidden",e.shadowBottomRight.style.visibility="hidden",e.shadowTopLeft.style.visibility="hidden",e.shadowBottomLeft.style.visibility="hidden",e.left.style.top="0px",e.right.style.top="0px"),(!n.verticalScroll||o.center.height<o.centerContainer.height)&&(e.left.style.top="".concat(c,"px"),e.right.style.top="".concat(c,"px"),e.rightContainer.className=e.rightContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),e.leftContainer.className=e.leftContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),o.left.width=h||-o.border.left,o.right.width=d||-o.border.right,this._setDOM());const m=o.center.height>o.centerContainer.height;this.hammer.get("pan").set({direction:m?kS.DIRECTION_ALL:kS.DIRECTION_HORIZONTAL}),this.hammer.get("press").set({time:this.options.longSelectPressTime}),Cl(t=this.components).call(t,t=>{i=t.redraw()||i});if(i){if(this.redrawCount<5)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.body.emitter.emit("changed")}_setDOM(){const t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;const i=t.root.width-t.left.width-t.right.width;t.center.width=i,t.centerContainer.width=i,t.top.width=i,t.bottom.width=i,e.background.style.height="".concat(t.background.height,"px"),e.backgroundVertical.style.height="".concat(t.background.height,"px"),e.backgroundHorizontal.style.height="".concat(t.centerContainer.height,"px"),e.centerContainer.style.height="".concat(t.centerContainer.height,"px"),e.leftContainer.style.height="".concat(t.leftContainer.height,"px"),e.rightContainer.style.height="".concat(t.rightContainer.height,"px"),e.background.style.width="".concat(t.background.width,"px"),e.backgroundVertical.style.width="".concat(t.centerContainer.width,"px"),e.backgroundHorizontal.style.width="".concat(t.background.width,"px"),e.centerContainer.style.width="".concat(t.center.width,"px"),e.top.style.width="".concat(t.top.width,"px"),e.bottom.style.width="".concat(t.bottom.width,"px"),e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left="".concat(t.left.width+t.border.left,"px"),e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top="".concat(t.top.height,"px"),e.centerContainer.style.left="".concat(t.left.width,"px"),e.centerContainer.style.top="".concat(t.top.height,"px"),e.leftContainer.style.left="0",e.leftContainer.style.top="".concat(t.top.height,"px"),e.rightContainer.style.left="".concat(t.left.width+t.center.width,"px"),e.rightContainer.style.top="".concat(t.top.height,"px"),e.top.style.left="".concat(t.left.width,"px"),e.top.style.top="0",e.bottom.style.left="".concat(t.left.width,"px"),e.bottom.style.top="".concat(t.top.height+t.centerContainer.height,"px"),e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"}setCurrentTime(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)}getCurrentTime(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()}_toTime(t){return oS(this,t,this.props.center.width)}_toGlobalTime(t){return oS(this,t,this.props.root.width)}_toScreen(t){return nS(this,t,this.props.center.width)}_toGlobalScreen(t){return nS(this,t,this.props.root.width)}_initAutoResize(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){const t=this;this._stopAutoResize(),this._onResize=()=>{if(1==t.options.autoResize){if(t.dom.root){const e=t.dom.root.offsetHeight,i=t.dom.root.offsetWidth;i==t.props.lastWidth&&e==t.props.lastHeight||(t.props.lastWidth=i,t.props.lastHeight=e,t.props.scrollbarWidth=DD.getScrollBarWidth(),t.body.emitter.emit("_change"))}}else t._stopAutoResize()},window.addEventListener("resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=_S(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(window.removeEventListener("resize",this._onResize),this._onResize=null)}_onTouch(){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(){this.touch.allowDragging=!1}_onDrag(t){if(!t)return;if(!this.touch.allowDragging)return;const e=t.deltaY,i=this._getScrollTop(),n=this._setScrollTop(this.touch.initialScrollTop+e);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),n!=i&&this.emit("verticalDrag")}_setScrollTop(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){const t=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-this.props.center.height,0);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<t&&(this.props.scrollTop=t),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop}_getScrollTop(){return this.props.scrollTop}_createConfigurator(){throw new Error("Cannot invoke abstract method _createConfigurator")}}Xu(XS.prototype);class qS extends jD{constructor(t,e){var i;super(),this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:Rk,locales:VS,locale:"en"},this.options=DD.extend({},this.defaultOptions),this.setOptions(e),this.options.locales=DD.extend({},VS,this.options.locales);const n=this.defaultOptions.locales[this.defaultOptions.locale];Cl(i=Ea(this.options.locales)).call(i,t=>{this.options.locales[t]=DD.extend({},n,this.options.locales[t])}),this.offset=0,this._create()}_create(){const t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(t){t&&DD.selectiveExtend(["rtl","showCurrentTime","alignCurrentTime","moment","locale","locales"],this.options,t)}redraw(){if(this.options.showCurrentTime){var t,e;const i=this.body.dom.backgroundVertical;this.bar.parentNode!=i&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),i.appendChild(this.bar),this.start());let n=this.options.moment(Va()+this.offset);this.options.alignCurrentTime&&(n=n.startOf(this.options.alignCurrentTime));const o=this.body.util.toScreen(n);let s=this.options.locales[this.options.locale];s||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),s=this.options.locales.en);let r=vd(t=vd(e="".concat(s.current," ")).call(e,s.time,": ")).call(t,n.format("dddd, MMMM Do YYYY, H:mm:ss"));r=r.charAt(0).toUpperCase()+r.substring(1),this.options.rtl?this.bar.style.transform="translateX(".concat(-1*o,"px)"):this.bar.style.transform="translateX(".concat(o,"px)"),this.bar.title=r}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){const t=this;!function e(){t.stop();let i=1/t.body.range.conversion(t.body.domProps.center.width).scale/10;i<30&&(i=30),i>1e3&&(i=1e3),t.redraw(),t.body.emitter.emit("currentTimeTick"),t.currentTimeTimer=Fu(e,i)}()}stop(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(t){const e=DD.convert(t,"Date").valueOf(),i=Va();this.offset=e-i,this.redraw()}getCurrentTime(){return new Date(Va()+this.offset)}}var KS,ZS,$S,JS,QS,tC,eC,iC,nC,oC={};function sC(){return $S?ZS:($S=1,function(){if(KS)return oC;KS=1;var t=Li(),e=_o().find,i=Ks(),n="find",o=!0;n in[]&&Array(1)[n](function(){o=!1}),t({target:"Array",proto:!0,forced:o},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),i(n)}(),ZS=Sr()("Array","find"))}function rC(){if(QS)return JS;QS=1;var t=Bt(),e=sC(),i=Array.prototype;return JS=function(n){var o=n.find;return n===i||t(i,n)&&o===i.find?e:o},JS}function aC(){return eC?tC:(eC=1,tC=rC())}var lC=n(nC?iC:(nC=1,iC=aC()));const hC=.001;function dC(t){Mx(t).call(t,(t,e)=>t.data.start-e.data.start)}function cC(t){Mx(t).call(t,(t,e)=>("end"in t.data?t.data.end:t.data.start)-("end"in e.data?e.data.end:e.data.start))}function uC(t,e,i,n){return null===vC(t,e.item,!1,t=>t.stack&&(i||null===t.top),t=>t.stack,()=>e.axis,n)}function pC(t,e,i){const n=vC(t,e.item,!1,t=>t.stack,()=>!0,t=>t.baseTop);i.height=n-i.top+.5*e.item.vertical}function mC(t,e,i,n){for(let o=0;o<t.length;o++){if(null==t[o].data.subgroup){t[o].top=e.item.vertical;continue}if(void 0===t[o].data.subgroup||!n)continue;let s=0;for(const e in i)!Object.prototype.hasOwnProperty.call(i,e)||!0!==i[e].visible||i[e].index>=i[t[o].data.subgroup].index||(s+=i[e].height,i[t[o].data.subgroup].top=s);t[o].top=s+.5*e.item.vertical}n||fC(t,e,i)}function fC(t,e,i){var n;vC(Mx(n=Kd(i)).call(n,(t,e)=>t.index>e.index?1:t.index<e.index?-1:0),{vertical:0},!0,()=>!0,()=>!0,()=>0);for(let n=0;n<t.length;n++)void 0!==t[n].data.subgroup&&(t[n].top=i[t[n].data.subgroup].top+.5*e.item.vertical)}function gC(t,e,i){let n=!1;const o=[];for(let t in i)Object.prototype.hasOwnProperty.call(i[t],"index")?o[i[t].index]=t:o.push(t);for(let s=0;s<o.length;s++){let r=o[s];if(!Object.prototype.hasOwnProperty.call(i,r))continue;n=n||i[r].stack,i[r].top=0;for(const t in i)i[t].visible&&i[r].index>i[t].index&&(i[r].top+=i[t].height);const a=t[r];for(let t=0;t<a.length;t++)void 0!==a[t].data.subgroup&&(a[t].top=i[a[t].data.subgroup].top+.5*e.item.vertical,i[r].stack&&(a[t].baseTop=a[t].top));n&&i[r].stack&&pC(t[r],e,i[r])}}function vC(t,e,i,n,o,s,r){let a=t=>t.start,l=t=>t.end;if(!i){const i=!(!t[0]||!t[0].options.rtl);a=i?t=>t.right:t=>t.left,l=t=>a(t)+t.width+e.horizontal}const h=[],d=[];let c=null,u=0;for(const e of t)if(n(e))h.push(e);else if(o(e)){const t=a(e);null!==c&&t<c-hC&&(u=0),c=t,u=bC(d,e=>a(e)-hC>t,u),rh(d).call(d,u,0,e),u++}c=null;let p=null;u=0;let m=0,f=0,g=0;for(;h.length>0;){var v;const t=h.shift();t.top=s(t);const i=a(t),n=l(t);null!==c&&i<c-hC&&(m=0,f=0,u=0,p=null),(null===c||i>c+hC)&&(m=bC(d,t=>i<l(t)-hC,m)),c=i,(null===p||p<n-hC)&&(f=bC(d,t=>n<a(t)-hC,Math.max(m,f))),null!==p&&p-hC>n&&(f=_C(d,t=>n+hC>=a(t),m,f)+1),p=n;const y=Mx(v=wC(d,t=>i<l(t)-hC,m,f)).call(v,(t,e)=>t.top-e.top);for(let i=0;i<y.length;i++){const n=y[i];yC(t,n,e)&&(t.top=n.top+n.height+e.vertical)}o(t)&&(u=bC(d,t=>a(t)-hC>i,u),rh(d).call(d,u,0,t),u<m&&m++,u<=f&&f++,u++);const b=t.top+t.height;if(b>g&&(g=b),r&&r())return null}return g}function yC(t,e,i){return t.top-i.vertical+hC<e.top+e.height&&t.top+t.height+i.vertical-hC>e.top}function bC(t,e,i){i||(i=0);for(let n=i;n<t.length;n++)if(e(t[n]))return n;return t.length}function _C(t,e,i,n){i||(i=0),n||(n=t.length);for(let o=n-1;o>=i;o--)if(e(t[o]))return o;return i-1}function wC(t,e,i,n){i||(i=0),n=n?Math.min(n,t.length):t.length;const o=[];for(let s=i;s<n;s++)e(t[s])&&o.push(t[s]);return o}var xC=Object.freeze({__proto__:null,nostack:mC,orderByEnd:cC,orderByStart:dC,stack:uC,stackSubgroups:fC,stackSubgroupsWithInnerStack:gC,substack:pC});const kC="__background__";class DC{constructor(t,e,i){if(this.groupId=t,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=i,this.isVisible=null,this.height=0,this.stackDirty=!0,this._disposeCallbacks=[],e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),e&&e.subgroupStack)if("boolean"==typeof e.subgroupStack)this.doInnerStack=e.subgroupStack,this.subgroupStackAll=e.subgroupStack;else for(const t in e.subgroupStack)Object.prototype.hasOwnProperty.call(e.subgroupStack,t)&&(this.subgroupStack[t]=e.subgroupStack[t],this.doInnerStack=this.doInnerStack||e.subgroupStack[t]);e&&e.heightMode?this.heightMode=e.heightMode:this.heightMode=i.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;const n=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on("checkRangedItems",n),this._disposeCallbacks.push(()=>{this.itemSet.body.emitter.off("checkRangedItems",n)}),this._create(),this.setData(e)}_create(){const t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;const e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;const i=document.createElement("div");i.className="vis-group",i["vis-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.style.position="absolute",this.dom.marker.innerHTML="",this.dom.background.appendChild(this.dom.marker)}setData(t){if(this.itemSet.groupTouchParams.isDragging)return;let e,i;if(t&&t.subgroupVisibility)for(const e in t.subgroupVisibility)Object.prototype.hasOwnProperty.call(t.subgroupVisibility,e)&&(this.subgroupVisibility[e]=t.subgroupVisibility[e]);var n;this.itemSet.options&&this.itemSet.options.groupTemplate?(i=dl(n=this.itemSet.options.groupTemplate).call(n,this),e=i(t,this.dom.inner)):e=t&&t.content;if(e instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object&&e.isReactComponent||(e instanceof Object?i(t,this.dom.inner):this.dom.inner.innerHTML=null!=e?DD.xss(e):DD.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?DD.removeClassName(this.dom.inner,"vis-hidden"):DD.addClassName(this.dom.inner,"vis-hidden"),t&&t.nestedGroups?(this.nestedGroups&&this.nestedGroups==t.nestedGroups||(this.nestedGroups=t.nestedGroups),void 0===t.showNested&&void 0!==this.showNested||(0==t.showNested?this.showNested=!1:this.showNested=!0),DD.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(DD.removeClassName(this.dom.label,"collapsed"),DD.addClassName(this.dom.label,"expanded")):(DD.removeClassName(this.dom.label,"expanded"),DD.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,DD.removeClassName(this.dom.label,"collapsed"),DD.removeClassName(this.dom.label,"expanded"),DD.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(DD.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?DD.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):DD.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):DD.addClassName(this.dom.label,"vis-group-level-0");const o=t&&t.className||null;o!=this.className&&(this.className&&(DD.removeClassName(this.dom.label,this.className),DD.removeClassName(this.dom.foreground,this.className),DD.removeClassName(this.dom.background,this.className),DD.removeClassName(this.dom.axis,this.className)),DD.addClassName(this.dom.label,o),DD.addClassName(this.dom.foreground,o),DD.addClassName(this.dom.background,o),DD.addClassName(this.dom.axis,o),this.className=o),this.style&&(DD.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(DD.addCssText(this.dom.label,t.style),this.style=t.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){const t=this.dom.marker.clientHeight;if(t!=this.lastMarkerHeight){this.lastMarkerHeight=t;const e={};let i=0;Cl(DD).call(DD,this.items,(t,n)=>{if(t.dirty=!0,t.displayed){const o=!0;e[n]=t.redraw(o),i=e[n].length}});if(i>0)for(let t=0;t<i;t++)Cl(DD).call(DD,e,e=>{e[t]()});return!0}return!1}_calculateGroupSizeAndPosition(){const{offsetTop:t,offsetLeft:e,offsetWidth:i}=this.dom.foreground;this.top=t,this.right=e,this.width=i}_shouldBailItemsRedraw(){const t=this,e=this.itemSet.options.onTimeout,i={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:e&&e.timeoutMs,userBailFunction:e&&e.callback,shouldBailStackItems:this.shouldBailStackItems};let n=null;if(!this.itemSet.initialDrawDone){if(i.shouldBailStackItems)return!0;Math.abs(Va()-new Date(i.relativeBailingTime))>i.bailTimeMs&&(i.userBailFunction&&null==this.itemSet.userContinueNotBail?i.userBailFunction(e=>{t.itemSet.userContinueNotBail=e,n=!e}):n=0==t.itemSet.userContinueNotBail)}return n}_redrawItems(t,e,i,n){if(t||this.stackDirty||this.isVisible&&!e){var o,s,r,a,l,h;const t={byEnd:Pd(o=this.orderedItems.byEnd).call(o,t=>!t.isCluster),byStart:Pd(s=this.orderedItems.byStart).call(s,t=>!t.isCluster)},e={byEnd:[...new zw(Pd(r=ba(a=this.orderedItems.byEnd).call(a,t=>t.cluster)).call(r,t=>!!t))],byStart:[...new zw(Pd(l=ba(h=this.orderedItems.byStart).call(h,t=>t.cluster)).call(l,t=>!!t))]},f=()=>{var i,o;return[...this._updateItemsInRange(t,Pd(i=this.visibleItems).call(i,t=>!t.isCluster),n),...this._updateClustersInRange(e,Pd(o=this.visibleItems).call(o,t=>t.isCluster),n)]},g=t=>{let e={};for(const n in this.subgroups){var i;if(!Object.prototype.hasOwnProperty.call(this.subgroups,n))continue;const o=Pd(i=this.visibleItems).call(i,t=>t.data.subgroup===n);e[n]=t?Mx(o).call(o,(e,i)=>t(e.data,i.data)):o}return e};if("function"==typeof this.itemSet.options.order){const t=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups){gC(g(this.itemSet.options.order),i,this.subgroups),this.visibleItems=f(),this._updateSubGroupHeights(i)}else{var d,c,u,p;this.visibleItems=f(),this._updateSubGroupHeights(i);const e=Mx(d=Pd(c=Yr(u=this.visibleItems).call(u)).call(c,t=>t.isCluster||!t.isCluster&&!t.cluster)).call(d,(e,i)=>t.itemSet.options.order(e.data,i.data));this.shouldBailStackItems=uC(e,i,!0,dl(p=this._shouldBailItemsRedraw).call(p,this))}}else if(this.visibleItems=f(),this._updateSubGroupHeights(i),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups){gC(g(),i,this.subgroups)}else{var m;this.shouldBailStackItems=uC(this.visibleItems,i,!0,dl(m=this._shouldBailItemsRedraw).call(m,this))}else mC(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups);for(let t=0;t<this.visibleItems.length;t++)this.visibleItems[t].repositionX(),void 0!==this.subgroupVisibility[this.visibleItems[t].data.subgroup]&&(this.subgroupVisibility[this.visibleItems[t].data.subgroup]||this.visibleItems[t].hide());this.itemSet.options.cluster&&Cl(DD).call(DD,this.items,t=>{t.cluster&&t.displayed&&t.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}_didResize(t,e){t=DD.updateProperty(this,"height",e)||t;const i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=DD.updateProperty(this.props.label,"width",i)||t,t=DD.updateProperty(this.props.label,"height",n)||t}_applyGroupHeight(t){this.dom.background.style.height="".concat(t,"px"),this.dom.foreground.style.height="".concat(t,"px"),this.dom.label.style.height="".concat(t,"px")}_updateItemsVerticalPosition(t){for(let e=0,i=this.visibleItems.length;e<i;e++){const i=this.visibleItems[e];i.repositionY(t),this.isVisible||this.groupId==kC||i.displayed&&i.hide()}}redraw(t,e,i,n){var o,s,r,a,l;let h=!1;const d=this.isVisible;let c;const u=[()=>{i=this._didMarkerHeightChange.call(this)||i},dl(o=this._updateSubGroupHeights).call(o,this,e),dl(s=this._calculateGroupSizeAndPosition).call(s,this),()=>{var i;this.isVisible=dl(i=this._isGroupVisible).call(i,this)(t,e)},()=>{var n;dl(n=this._redrawItems).call(n,this)(i,d,e,t)},dl(r=this._updateSubgroupsSizes).call(r,this),()=>{var t;c=this.height=dl(t=this._calculateHeight).call(t,this)(e)},dl(a=this._calculateGroupSizeAndPosition).call(a,this),()=>{var t;h=dl(t=this._didResize).call(t,this)(h,c)},()=>{var t;dl(t=this._applyGroupHeight).call(t,this)(c)},()=>{var t;dl(t=this._updateItemsVerticalPosition).call(t,this)(e)},dl(l=()=>(!this.isVisible&&this.height&&(h=!1),h)).call(l,this)];if(n)return u;{let t;return Cl(u).call(u,e=>{t=e()}),t}}_updateSubGroupHeights(t){if(Ea(this.subgroups).length>0){const e=this;this._resetSubgroups(),Cl(DD).call(DD,this.visibleItems,i=>{void 0!==i.data.subgroup&&(e.subgroups[i.data.subgroup].height=Math.max(e.subgroups[i.data.subgroup].height,i.height+t.item.vertical),e.subgroups[i.data.subgroup].visible=void 0===this.subgroupVisibility[i.data.subgroup]||Boolean(this.subgroupVisibility[i.data.subgroup]))})}}_isGroupVisible(t,e){return this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop}_calculateHeight(t){let e,i;if(i="fixed"===this.heightMode?DD.toArray(this.items):this.visibleItems,!this.isVisible&&this.height)e=Math.max(this.height,this.props.label.height);else if(i.length>0){let n=i[0].top,o=i[0].top+i[0].height;if(Cl(DD).call(DD,i,t=>{n=Math.min(n,t.top),o=Math.max(o,t.top+t.height)}),n>t.axis){const e=n-t.axis;o-=e,Cl(DD).call(DD,i,t=>{t.top-=e})}e=Math.ceil(o+t.item.vertical/2),"fitItems"!==this.heightMode&&(e=Math.max(e,this.props.label.height))}else e=this.props.label.height;return e}show(){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)}hide(){const t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);const e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);const i=this.dom.background;i.parentNode&&i.parentNode.removeChild(i);const n=this.dom.axis;n.parentNode&&n.parentNode.removeChild(n)}add(t){var e;if(this.items[t.id]=t,t.setParent(this),this.stackDirty=!0,void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),!Uh(e=this.visibleItems).call(e,t)){const e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}}_addToSubgroup(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;null!=e&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end||t.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[e]||!1},this.subgroupIndex++),new Date(t.data.start)<new Date(this.subgroups[e].start)&&(this.subgroups[e].start=t.data.start);const i=t.data.end||t.data.start;new Date(i)>new Date(this.subgroups[e].end)&&(this.subgroups[e].end=i),this.subgroups[e].items.push(t)}_updateSubgroupsSizes(){const t=this;if(t.subgroups)for(const i in t.subgroups){var e;if(!Object.prototype.hasOwnProperty.call(t.subgroups,i))continue;const n=t.subgroups[i].items[0].data.end||t.subgroups[i].items[0].data.start;let o=t.subgroups[i].items[0].data.start,s=n-1;Cl(e=t.subgroups[i].items).call(e,t=>{new Date(t.data.start)<new Date(o)&&(o=t.data.start);const e=t.data.end||t.data.start;new Date(e)>new Date(s)&&(s=e)}),t.subgroups[i].start=o,t.subgroups[i].end=new Date(s-1)}}orderSubgroups(){if(void 0!==this.subgroupOrderer){const t=[];if("string"==typeof this.subgroupOrderer){for(const e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});Mx(t).call(t,(t,e)=>t.sortField-e.sortField)}else if("function"==typeof this.subgroupOrderer){for(const e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&t.push(this.subgroups[e].items[0].data);Mx(t).call(t,this.subgroupOrderer)}if(t.length>0)for(let e=0;e<t.length;e++)this.subgroups[t[e].subgroup].index=e}}_resetSubgroups(){for(const t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&(this.subgroups[t].visible=!1,this.subgroups[t].height=0)}remove(t){var e,i;delete this.items[t.id],t.setParent(null),this.stackDirty=!0;const n=kc(e=this.visibleItems).call(e,t);-1!=n&&rh(i=this.visibleItems).call(i,n,1),void 0!==t.data.subgroup&&(this._removeFromSubgroup(t),this.orderSubgroups())}_removeFromSubgroup(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.data.subgroup;if(null!=e){const o=this.subgroups[e];if(o){var i;const s=kc(i=o.items).call(i,t);var n;if(s>=0)rh(n=o.items).call(n,s,1),o.items.length?this._updateSubgroupsSizes():delete this.subgroups[e]}}}removeFromDataSet(t){this.itemSet.removeItem(t.id)}order(){const t=DD.toArray(this.items),e=[],i=[];for(let n=0;n<t.length;n++)void 0!==t[n].data.end&&i.push(t[n]),e.push(t[n]);this.orderedItems={byStart:e,byEnd:i},dC(this.orderedItems.byStart),cC(this.orderedItems.byEnd)}_updateItemsInRange(t,e,i){const n=[],o={};if(!this.isVisible&&void 0!==this.height&&this.groupId!=kC){for(let t=0;t<e.length;t++){var s=e[t];s.displayed&&s.hide()}return n}const r=(i.end-i.start)/4,a=i.start-r,l=i.end+r,h=t=>{const{start:e,end:i}=t;return i<a?-1:e<=l?0:1};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],n,o,i);const d=DD.binarySearchCustom(t.byStart,t=>t<a?-1:t<=l?0:1,"data","start");if(this._traceVisible(d,t.byStart,n,o,t=>t.data.start<a||t.data.start>l),1==this.checkRangedItems){this.checkRangedItems=!1;for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],n,o,i)}else{const e=DD.binarySearchCustom(t.byEnd,h,"data");this._traceVisible(e,t.byEnd,n,o,t=>t.data.end<a||t.data.start>l)}this._sortVisibleItems(t.byStart,n,o);const c={};let u=0;for(let t=0;t<n.length;t++){const e=n[t];if(!e.displayed){const i=!0;c[t]=e.redraw(i),u=c[t].length}}if(u>0)for(let t=0;t<u;t++)Cl(DD).call(DD,c,e=>{e[t]()});for(let t=0;t<n.length;t++)n[t].repositionX();return n}_traceVisible(t,e,i,n,o){if(-1!=t){for(let s=t;s>=0;s--){let t=e[s];if(o(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===n[t.id]&&(n[t.id]=!0,i.unshift(t))}for(let s=t+1;s<e.length;s++){let t=e[s];if(o(t))break;t.isCluster&&!t.hasItems()||t.cluster||void 0===n[t.id]&&(n[t.id]=!0,i.push(t))}}}_sortVisibleItems(t,e,i){e.length=0;for(let n=0;n<t.length;n++){let o=t[n];i[o.id]&&e.push(o)}}_checkIfVisible(t,e,i){t.isVisible(i)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()}_checkIfVisibleWithReference(t,e,i,n){t.isVisible(n)?void 0===i[t.id]&&(i[t.id]=!0,e.push(t)):t.displayed&&t.hide()}_updateClustersInRange(t,e,i){const n=[],o={};if(e.length>0)for(let t=0;t<e.length;t++)this._checkIfVisibleWithReference(e[t],n,o,i);for(let e=0;e<t.byStart.length;e++)this._checkIfVisibleWithReference(t.byStart[e],n,o,i);for(let e=0;e<t.byEnd.length;e++)this._checkIfVisibleWithReference(t.byEnd[e],n,o,i);const s={};let r=0;for(let t=0;t<n.length;t++){const e=n[t];if(!e.displayed){const i=!0;s[t]=e.redraw(i),r=s[t].length}}if(r>0)for(var a=0;a<r;a++)Cl(DD).call(DD,s,function(t){t[a]()});for(let t=0;t<n.length;t++)n[t].repositionX();return n}changeSubgroup(t,e,i){this._removeFromSubgroup(t,e),this._addToSubgroup(t,i),this.orderSubgroups()}dispose(){let t;for(this.hide();t=this._disposeCallbacks.pop();)t()}}class SC extends DC{constructor(t,e,i){super(t,e,i),this.width=0,this.height=0,this.top=0,this.left=0}redraw(t,e){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(let t=0,i=this.visibleItems.length;t<i;t++){this.visibleItems[t].repositionY(e)}return!1}show(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}}class CC{constructor(t,e,i){var n;this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.defaultOptions={locales:VS,locale:"en"},this.options=DD.extend({},this.defaultOptions,i),this.options.locales=DD.extend({},VS,this.options.locales);const o=this.defaultOptions.locales[this.defaultOptions.locale];Cl(n=Ea(this.options.locales)).call(n,t=>{this.options.locales[t]=DD.extend({},o,this.options.locales[t])}),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=i&&i.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(t),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(t){null!=t.group&&this.data.group!=t.group&&null!=this.parent&&this.parent.itemSet._moveToGroup(this,t.group),this.setSelectability(t),this.parent&&(this.parent.stackDirty=!0);null!=t.subgroup&&this.data.subgroup!=t.subgroup&&null!=this.parent&&this.parent.changeSubgroup(this,this.data.subgroup,t.subgroup),this.data=t,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()}setSelectability(t){t&&(this.selectable=void 0===t.selectable||Boolean(t.selectable))}setParent(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t}isVisible(){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var t,e;const i=this,n=document.createElement("div");n.className="vis-drag-center",n.dragCenterItem=this,this.hammerDragCenter=new kS(n),this.hammerDragCenter.on("tap",t=>{i.parent.itemSet.body.emitter.emit("click",{event:t,item:i.id})}),this.hammerDragCenter.on("doubletap",t=>{t.stopPropagation(),i.parent.itemSet._onUpdateItem(i),i.parent.itemSet.body.emitter.emit("doubleClick",{event:t,item:i.id})}),this.hammerDragCenter.on("panstart",t=>{t.stopPropagation(),i.parent.itemSet._onDragStart(t)}),this.hammerDragCenter.on("panmove",dl(t=i.parent.itemSet._onDrag).call(t,i.parent.itemSet)),this.hammerDragCenter.on("panend",dl(e=i.parent.itemSet._onDragEnd).call(e,i.parent.itemSet)),this.hammerDragCenter.get("press").set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(n,this.dom.dragLeft):this.dom.box.appendChild(n):this.dom.point&&this.dom.point.appendChild(n),this.dom.dragCenter=n}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&(this.hammerDragCenter.destroy(),this.hammerDragCenter=null))}_repaintDeleteButton(t){const e=(this.options.editable.overrideItems||null==this.editable)&&this.options.editable.remove||!this.options.editable.overrideItems&&null!=this.editable&&this.editable.remove;if(this.selected&&e&&!this.dom.deleteButton){const e=this,i=document.createElement("div");this.options.rtl?i.className="vis-delete-rtl":i.className="vis-delete";let n=this.options.locales[this.options.locale];n||(this.warned||(console.warn("WARNING: options.locales['".concat(this.options.locale,"'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization")),this.warned=!0),n=this.options.locales.en),i.title=n.deleteSelected,this.hammerDeleteButton=new kS(i).on("tap",t=>{t.stopPropagation(),e.parent.removeFromDataSet(e)}),t.appendChild(i),this.dom.deleteButton=i}else this.selected&&e||!this.dom.deleteButton||(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&(this.hammerDeleteButton.destroy(),this.hammerDeleteButton=null))}_repaintOnItemUpdateTimeTooltip(t){if(!this.options.tooltipOnItemUpdateTime)return;const e=(this.options.editable.updateTime||!0===this.data.editable)&&!1!==this.data.editable;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){const e=document.createElement("div");e.className="vis-onUpdateTime-tooltip",t.appendChild(e),this.dom.onItemUpdateTimeTooltip=e}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.dom.onItemUpdateTimeTooltip.style.transform="translateX(-50%)",this.dom.onItemUpdateTimeTooltip.style.left="50%";const t=50,e=this.parent.itemSet.body.domProps.scrollTop;let n;n="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;let o,s;var i;if(n+this.parent.top-t<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top="".concat(this.height+2,"px")):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom="".concat(this.height+2,"px")),this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template)s=dl(i=this.options.tooltipOnItemUpdateTime.template).call(i,this),o=s(this.data);else o="start: ".concat(Rk(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(o+="<br> end: ".concat(Rk(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=DD.xss(o)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(t){let e,i,n,o,s;const r=this._getItemData(),a=(this.dom.box||this.dom.point).getElementsByClassName("vis-item-visible-frame")[0];var l,h;this.options.visibleFrameTemplate?(s=dl(l=this.options.visibleFrameTemplate).call(l,this),o=DD.xss(s(r,a))):o="";if(a)if(o instanceof Object&&!(o instanceof Element))s(r,a);else if(i=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(o),i){if(o instanceof Element)a.innerHTML="",a.appendChild(o);else if(null!=o)a.innerHTML=DD.xss(o);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.itemVisibleFrameContent=o}this.options.template?(n=dl(h=this.options.template).call(h,this),e=n(r,t,this.data)):e=this.data.content;if(e instanceof Object&&!(e instanceof Element))n(r,t);else if(i=this._contentToString(this.content)!==this._contentToString(e),i){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(null!=e)t.innerHTML=DD.xss(e);else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '.concat(this.id));this.content=e}}_updateDataAttributes(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let e=[];if(aa(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=Ea(this.data)}for(const i of e){const e=this.data[i];null!=e?t.setAttribute("data-".concat(i),e):t.removeAttribute("data-".concat(i))}}}_updateStyle(t){this.style&&(DD.removeCssText(t,this.style),this.style=null),this.data.style&&(DD.addCssText(t,this.data.style),this.style=this.data.style)}_contentToString(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t}_updateEditStatus(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"==typeof this.options.editable&&(this.editable={},DD.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable))),this.options&&this.options.editable&&!0===this.options.editable.overrideItems||this.data&&("boolean"==typeof this.data.editable?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:"object"==typeof this.data.editable&&(this.editable={},DD.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){var t;return dl(t=this.options.tooltip.template).call(t,this)(this._getItemData(),this.data)}return this.data.title}}CC.prototype.stack=!0;class TC extends CC{constructor(t,e,i){if(super(t,e,i),this.props={dot:{width:0,height:0},line:{width:0,height:0}},t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t))}isVisible(t){if(this.cluster)return!1;let e;const i=this.data.align||this.options.align,n=this.width*t.getMillisecondsPerPixel();return e="right"==i?this.data.start.getTime()>t.start&&this.data.start.getTime()-n<t.end:"left"==i?this.data.start.getTime()+n>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+n/2>t.start&&this.data.start.getTime()-n/2<t.end,e}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-line",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-dot",this.dom.box["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){const e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className="vis-item vis-box".concat(e),this.dom.line.className="vis-item vis-line".concat(e),this.dom.dot.className="vis-item vis-dot".concat(e)}}_getDomComponentsSizes(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.props.dot.height=t.dot.height,this.props.dot.width=t.dot.width,this.props.line.width=t.line.width,this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}redraw(t){var e,i,n,o;let s;const r=[dl(e=this._createDomElement).call(e,this),dl(i=this._appendDomElement).call(i,this),dl(n=this._updateDirtyDomComponents).call(n,this),()=>{this.dirty&&(s=this._getDomComponentsSizes())},()=>{var t;this.dirty&&dl(t=this._updateDomComponentsSizes).call(t,this)(s)},dl(o=this._repaintDomAdditionals).call(o,this)];if(t)return r;{let t;return Cl(r).call(r,e=>{t=e()}),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom;t.box.remove?t.box.remove():t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.remove?t.line.remove():t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.remove?t.dot.remove():t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}}repositionXY(){const t=this.options.rtl,e=function(t,e,i){var n;if(void 0===e&&void 0===i)return;const o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?-1*e:e;t.style.transform=void 0!==i?void 0!==e?vd(n="translate(".concat(o,"px, ")).call(n,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(o,"px)")};e(this.dom.box,this.boxX,this.boxY,t),e(this.dom.dot,this.dotX,this.dotY,t),e(this.dom.line,this.lineX,this.lineY,t)}repositionX(){const t=this.conversion.toScreen(this.data.start),e=void 0===this.data.align?this.options.align:this.data.align,i=this.props.line.width,n=this.props.dot.width;"right"==e?(this.boxX=t-this.width,this.lineX=t-i,this.dotX=t-i/2-n/2):"left"==e?(this.boxX=t,this.lineX=t,this.dotX=t+i/2-n/2):(this.boxX=t-this.width/2,this.lineX=this.options.rtl?t-i:t-i/2,this.dotX=t-n/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){const t=this.options.orientation.item,e=this.dom.line.style;if("top"==t){const t=this.parent.top+this.top+1;this.boxY=this.top||0,e.height="".concat(t,"px"),e.bottom="",e.top="0"}else{const t=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),e.height="".concat(t,"px"),e.top="",e.bottom="0"}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}}class MC extends CC{constructor(t,e,i){if(super(t,e,i),this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},t&&null==t.start)throw new Error('Property "start" missing in item '.concat(t))}isVisible(t){if(this.cluster)return!1;const e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start<t.end}_createDomElement(){this.dom||(this.dom={},this.dom.point=document.createElement("div"),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement("div"),this.dom.point.appendChild(this.dom.dot),this.dom.point["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.point.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.point)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);const t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.point.className="vis-item vis-point".concat(e),this.dom.dot.className="vis-item vis-dot".concat(e)}}_getDomComponentsSizes(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}_updateDomComponentsSizes(t){this.props.dot.width=t.dot.width,this.props.dot.height=t.dot.height,this.props.content.height=t.content.height,this.options.rtl?this.dom.content.style.marginRight="".concat(this.props.dot.width/2,"px"):this.dom.content.style.marginLeft="".concat(this.props.dot.width/2,"px"),this.width=t.point.width,this.height=t.point.height,this.dom.dot.style.top="".concat((this.height-this.props.dot.height)/2,"px");const e=this.props.dot.width,i=this.options.rtl?e/2:e/2*-1;this.dom.dot.style.transform="translateX(".concat(i,"px"),this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}redraw(t){var e,i,n,o;let s;const r=[dl(e=this._createDomElement).call(e,this),dl(i=this._appendDomElement).call(i,this),dl(n=this._updateDirtyDomComponents).call(n,this),()=>{this.dirty&&(s=this._getDomComponentsSizes())},()=>{var t;this.dirty&&dl(t=this._updateDomComponentsSizes).call(t,this)(s)},dl(o=this._repaintDomAdditionals).call(o,this)];if(t)return r;{let t;return Cl(r).call(r,e=>{t=e()}),t}}repositionXY(){const t=this.options.rtl;!function(t,e,i){var n;if(void 0===e&&void 0===i)return;const o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?-1*e:e;t.style.transform=void 0!==i?void 0!==e?vd(n="translate(".concat(o,"px, ")).call(n,i,"px)"):"translateY(".concat(i,"px)"):"translateX(".concat(o,"px)")}(this.dom.point,this.pointX,this.pointY,t)}show(t){if(!this.displayed)return this.redraw(t)}hide(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)}repositionX(){const t=this.conversion.toScreen(this.data.start);this.pointX=t,this.options.rtl?this.right=t-this.props.dot.width:this.left=t-this.props.dot.width,this.repositionXY()}repositionY(){const t=this.options.orientation.item;this.pointY="top"==t?this.top:this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}}class OC extends CC{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error('Property "start" missing in item '.concat(t.id));if(null==t.end)throw new Error('Property "end" missing in item '.concat(t.id))}}isVisible(t){return!this.cluster&&(this.data.start<t.end&&this.data.end>t.start)}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement("div"),this.dom.visibleFrame.className="vis-item-visible-frame",this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dom.box["vis-item"]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.editable.updateTime||this.editable.updateGroup,e=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(t?" vis-editable":" vis-readonly");this.dom.box.className=this.baseClassName+e,this.dom.content.style.maxWidth="none"}}_getDomComponentsSizes(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.frame).overflow,this.whiteSpace="nowrap"!==window.getComputedStyle(this.dom.content).whiteSpace,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=t.box.height,this.dom.content.style.maxWidth="",this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(t){var e,i,n,o;let s;const r=[dl(e=this._createDomElement).call(e,this),dl(i=this._appendDomElement).call(i,this),dl(n=this._updateDirtyDomComponents).call(n,this),()=>{var t;this.dirty&&(s=dl(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&dl(t=this._updateDomComponentsSizes).call(t,this)(s)},dl(o=this._repaintDomAdditionals).call(o,this)];if(t)return r;{let t;return Cl(r).call(r,e=>{t=e()}),t}}show(t){if(!this.displayed)return this.redraw(t)}hide(){if(this.displayed){const t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}}repositionX(t){const e=this.parent.width;let i=this.conversion.toScreen(this.data.start),n=this.conversion.toScreen(this.data.end);const o=void 0===this.data.align?this.options.align:this.data.align;let s,r;!1===this.data.limitSize||void 0!==t&&!0!==t||(i<-e&&(i=-e),n>2*e&&(n=2*e));const a=Math.max(Math.round(1e3*(n-i))/1e3,1);switch(this.overflow?(this.options.rtl?this.right=i:this.left=i,this.width=a+this.props.content.width,r=this.props.content.width):(this.options.rtl?this.right=i:this.left=i,this.width=a,r=Math.min(n-i,this.props.content.width)),this.options.rtl?this.dom.box.style.transform="translateX(".concat(-1*this.right,"px)"):this.dom.box.style.transform="translateX(".concat(this.left,"px)"),this.dom.box.style.width="".concat(a,"px"),this.whiteSpace&&(this.height=this.dom.box.offsetHeight),o){case"left":this.dom.content.style.transform="translateX(0)";break;case"right":if(this.options.rtl){const t=-1*Math.max(a-r,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max(a-r,0),"px)");break;case"center":if(this.options.rtl){const t=-1*Math.max((a-r)/2,0);this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(Math.max((a-r)/2,0),"px)");break;default:if(s=this.overflow?n>0?Math.max(-i,0):-r:i<0?-i:0,this.options.rtl){const t=-1*s;this.dom.content.style.transform="translateX(".concat(t,"px)")}else this.dom.content.style.transform="translateX(".concat(s,"px)")}}repositionY(){const t=this.options.orientation.item,e=this.dom.box;e.style.top="".concat("top"==t?this.top:this.parent.height-this.top-this.height,"px")}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){const 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.options.itemsAlwaysDraggable.range||!this.dom.dragLeft||(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){const 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.options.itemsAlwaysDraggable.range||!this.dom.dragRight||(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}}OC.prototype.baseClassName="vis-item vis-range";class EC extends CC{constructor(t,e,i){if(super(t,e,i),this.props={content:{width:0}},this.overflow=!1,t){if(null==t.start)throw new Error('Property "start" missing in item '.concat(t.id));if(null==t.end)throw new Error('Property "end" missing in item '.concat(t.id))}}isVisible(t){return this.data.start<t.end&&this.data.end>t.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement("div"),this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-item-overflow",this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement("div"),this.dom.content.className="vis-item-content",this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.background;if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);const t=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");this.dom.box.className=this.baseClassName+t}}_getDomComponentsSizes(){return this.overflow="hidden"!==window.getComputedStyle(this.dom.content).overflow,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(t){this.props.content.width=t.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(t){var e,i,n,o;let s;const r=[dl(e=this._createDomElement).call(e,this),dl(i=this._appendDomElement).call(i,this),dl(n=this._updateDirtyDomComponents).call(n,this),()=>{var t;this.dirty&&(s=dl(t=this._getDomComponentsSizes).call(t,this)())},()=>{var t;this.dirty&&dl(t=this._updateDomComponentsSizes).call(t,this)(s)},dl(o=this._repaintDomAdditionals).call(o,this)];if(t)return r;{let t;return Cl(r).call(r,e=>{t=e()}),t}}repositionY(){let t;const e=this.options.orientation.item;if(void 0!==this.data.subgroup){const t=this.data.subgroup;this.dom.box.style.height="".concat(this.parent.subgroups[t].height,"px"),this.dom.box.style.top="".concat("top"==e?this.parent.top+this.parent.subgroups[t].top:this.parent.top+this.parent.height-this.parent.subgroups[t].top-this.parent.subgroups[t].height,"px"),this.dom.box.style.bottom=""}else this.parent instanceof SC?(t=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom="bottom"==e?"0":"",this.dom.box.style.top="top"==e?"0":""):(t=this.parent.height,this.dom.box.style.top="".concat(this.parent.top,"px"),this.dom.box.style.bottom="");this.dom.box.style.height="".concat(t,"px")}}EC.prototype.baseClassName="vis-item vis-background",EC.prototype.stack=!1,EC.prototype.show=OC.prototype.show,EC.prototype.hide=OC.prototype.hide,EC.prototype.repositionX=OC.prototype.repositionX;class PC{constructor(t,e){this.container=t,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(t,e){this.x=cc(t),this.y=cc(e)}setText(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=DD.xss(t)}show(t){if(void 0===t&&(t=!0),!0===t){var e=this.frame.clientHeight,i=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,r=0;if("flip"==this.overflowMethod||"none"==this.overflowMethod){let t=!1,n=!0;"flip"==this.overflowMethod&&(this.y-e<this.padding&&(n=!1),this.x+i>o-this.padding&&(t=!0)),s=t?this.x-i:this.x,r=n?this.y-e:this.y}else(r=this.y-e)+e+this.padding>n&&(r=n-e-this.padding),r<this.padding&&(r=this.padding),(s=this.x)+i+this.padding>o&&(s=o-i-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=r+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}}var IC,LC,NC,AC,FC,RC,YC,jC,zC,HC={};function GC(){return NC?LC:(NC=1,function(){if(IC)return HC;IC=1;var t=Li(),e=_o().every;t({target:"Array",proto:!0,forced:!ul()("every")},{every:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}(),LC=Sr()("Array","every"))}function WC(){if(FC)return AC;FC=1;var t=Bt(),e=GC(),i=Array.prototype;return AC=function(n){var o=n.every;return n===i||t(i,n)&&o===i.every?e:o},AC}function BC(){return YC?RC:(YC=1,RC=WC())}var VC=n(zC?jC:(zC=1,jC=BC()));class UC extends CC{constructor(t,e,i){if(super(t,e,mh({},{fitOnDoubleClick:!0},i,{editable:!1})),this.props={content:{width:0,height:0}},!t||null==t.uiItems)throw new Error('Property "uiItems" missing in item '+t.id);this.id=Dk(),this.group=t.group,this._setupRange(),this.emitter=this.data.eventEmitter,this.range=this.data.range,this.attached=!1,this.isCluster=!0,this.data.isCluster=!0}hasItems(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}setUiItems(t){this.detach(),this.data.uiItems=t,this._setupRange(),this.attach()}isVisible(t){const e=this.data.end?this.data.end-this.data.start:0,i=this.width*t.getMillisecondsPerPixel(),n=Math.max(this.data.start.getTime()+e,this.data.start.getTime()+i);return this.data.start<t.end&&n>t.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(t){var e,i,n,o,s,r,a,l,h=[dl(e=this._createDomElement).call(e,this),dl(i=this._appendDomElement).call(i,this),dl(n=this._updateDirtyDomComponents).call(n,this),dl(o=function(){this.dirty&&(a=this._getDomComponentsSizes())}).call(o,this),dl(s=function(){var t;this.dirty&&dl(t=this._updateDomComponentsSizes).call(t,this)(a)}).call(s,this),dl(r=this._repaintDomAdditionals).call(r,this)];return t?h:(Cl(h).call(h,function(t){l=t()}),l)}show(){this.displayed||this.redraw()}hide(){if(this.displayed){var t=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box),this.options.showStipes&&(t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot)),this.displayed=!1}}repositionX(){let t=this.conversion.toScreen(this.data.start),e=this.data.end?this.conversion.toScreen(this.data.end):0;if(e)this.repositionXWithRanges(t,e);else{let e=void 0===this.data.align?this.options.align:this.data.align;this.repositionXWithoutRanges(t,e)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?"block":"none",this.dom.dot.style.display=this._isStipeVisible()?"block":"none",this._isStipeVisible()&&this.repositionStype(t,e))}repositionStype(t,e){this.dom.line.style.display="block",this.dom.dot.style.display="block";const i=this.dom.line.offsetWidth,n=this.dom.dot.offsetWidth;if(e){const o=i+t+(e-t)/2,s=o-n/2,r=this.options.rtl?-1*o:o,a=this.options.rtl?-1*s:s;this.dom.line.style.transform="translateX(".concat(r,"px)"),this.dom.dot.style.transform="translateX(".concat(a,"px)")}else{const e=this.options.rtl?-1*t:t,i=this.options.rtl?-1*(t-n/2):t-n/2;this.dom.line.style.transform="translateX(".concat(e,"px)"),this.dom.dot.style.transform="translateX(".concat(i,"px)")}}repositionXWithoutRanges(t,e){"right"==e?this.options.rtl?(this.right=t-this.width,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width,this.dom.box.style.left=this.left+"px"):"left"==e?this.options.rtl?(this.right=t,this.dom.box.style.right=this.right+"px"):(this.left=t,this.dom.box.style.left=this.left+"px"):this.options.rtl?(this.right=t-this.width/2,this.dom.box.style.right=this.right+"px"):(this.left=t-this.width/2,this.dom.box.style.left=this.left+"px")}repositionXWithRanges(t,e){let i=Math.round(Math.max(e-t+.5,1));this.options.rtl?this.right=t:this.left=t,this.width=Math.max(i,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=i+"px"}repositionY(){var t=this.options.orientation.item,e=this.dom.box;if(e.style.top="top"==t?(this.top||0)+"px":(this.parent.height-this.top-this.height||0)+"px",this.options.showStipes){if("top"==t)this.dom.line.style.top="0",this.dom.line.style.height=this.parent.top+this.top+1+"px",this.dom.line.style.bottom="";else{var i=this.parent.itemSet.props.height,n=i-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=i-n+"px",this.dom.line.style.bottom="0"}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+"px"}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){var t;for(let t of this.data.uiItems)t.cluster=this;this.data.items=ba(t=this.data.uiItems).call(t,t=>t.data),this.attached=!0,this.dirty=!0}detach(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.hasItems()){for(let t of this.data.uiItems)delete t.cluster;this.attached=!1,t&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){var t,e,i;const n=ba(t=this.data.uiItems).call(t,t=>({start:t.data.start.valueOf(),end:t.data.end?t.data.end.valueOf():t.data.start.valueOf()}));this.data.min=Math.min(...ba(n).call(n,t=>Math.min(t.start,t.end||t.start))),this.data.max=Math.max(...ba(n).call(n,t=>Math.max(t.start,t.end||t.start)));const o=ba(e=this.data.uiItems).call(e,t=>t.center),s=Py(o).call(o,(t,e)=>t+e,0)/this.data.uiItems.length;Hx(i=this.data.uiItems).call(i,t=>t.data.end)?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(s),this.data.end=null)}_getUiItems(){var t;return this.data.uiItems&&this.data.uiItems.length?Pd(t=this.data.uiItems).call(t,t=>t.cluster===this):[]}_createDomElement(){if(!this.dom){var t;if(this.dom={},this.dom.box=document.createElement("DIV"),this.dom.content=document.createElement("DIV"),this.dom.content.className="vis-item-content",this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement("DIV"),this.dom.line.className="vis-cluster-line",this.dom.line.style.display="none",this.dom.dot=document.createElement("DIV"),this.dom.dot.className="vis-cluster-dot",this.dom.dot.style.display="none"),this.options.fitOnDoubleClick)this.dom.box.ondblclick=dl(t=UC.prototype._onDoubleClick).call(t,this);this.dom.box["vis-item"]=this,this.dirty=!0}}_appendDomElement(){if(!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!this.dom.box.parentNode){const t=this.parent.dom.foreground;if(!t)throw new Error("Cannot redraw item: parent has no foreground container element");t.appendChild(this.dom.box)}const t=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!t)throw new Error("Cannot redraw item: parent has no background container element");t.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var e=this.parent.dom.axis;if(!t)throw new Error("Cannot redraw item: parent has no axis container element");e.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);const t=this.baseClassName+" "+(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+" vis-readonly";this.dom.box.className="vis-item "+t,this.options.showStipes&&(this.dom.line.className="vis-item vis-cluster-line "+(this.selected?" vis-selected":""),this.dom.dot.className="vis-item vis-cluster-dot "+(this.selected?" vis-selected":"")),this.data.end&&(this.dom.content.style.maxWidth="none")}}_getDomComponentsSizes(){const t={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(t.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},t.line={width:this.dom.line.offsetWidth}),t}_updateDomComponentsSizes(t){this.options.rtl?this.dom.box.style.right="0px":this.dom.box.style.left="0px",this.data.end?this.minWidth=t.box.width:this.width=t.box.width,this.height=t.box.height,this.options.rtl?this.dom.box.style.right=t.previous.right:this.dom.box.style.left=t.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){const t=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-t,fitEnd:this.data.max+t}}_fit(){if(this.emitter){const{fitStart:t,fitEnd:e}=this._getFitRange(),i={start:new Date(t),end:new Date(e),animation:!0};this.emitter.emit("fit",i)}}_getItemData(){return this.data}}UC.prototype.baseClassName="vis-item vis-range vis-cluster";const XC="__ungrouped__";class qC{constructor(t){this.itemSet=t,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(t,e,i){return new UC(t,e,i)}setItems(t,e){this.items=t||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,e&&e.applyOnChangedLevel&&(this.applyOnChangedLevel=e.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(t,e,i){let{maxItems:n,clusterCriteria:o}="boolean"==typeof i?{}:i;o||(o=()=>!0),n=n||1;let s=-1,r=0;if(e>0){if(e>=1)return[];s=Math.abs(Math.round(Math.log(100/e)/Math.log(2))),r=Math.abs(Math.pow(2,s))}if(this.dataChanged){const t=s!=this.cacheLevel;(!this.applyOnChangedLevel||t)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=s;let a=this.cache[s];if(!a){a=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;const s=this.groups[e],l=s.length;let h=0;for(;h<l;){let e=s[h],l=1,d=h-1;for(;d>=0&&e.center-s[d].center<r/2;)!s[d].cluster&&o(e.data,s[d].data)&&l++,d--;let c=h+1;for(;c<s.length&&s[c].center-e.center<r/2;)o(e.data,s[c].data)&&l++,c++;let u=a.length-1;for(;u>=0&&e.center-a[u].center<r;)e.group==a[u].group&&o(e.data,a[u].data)&&l++,u--;if(l>n){const r=l-n+1,d=[];let c=h;for(;d.length<r&&c<s.length;)o(s[h].data,s[c].data)&&d.push(s[c]),c++;const u=this.itemSet.getGroupId(e.data),p=this.itemSet.groups[u]||this.itemSet.groups[XC];let m=this._getClusterForItems(d,p,t,i);a.push(m),h+=r}else delete e.cluster,h+=1}}this.cache[s]=a}return a}_filterData(){const t={};this.groups=t;for(const e of Kd(this.items)){const i=e.parent?e.parent.groupId:"";let n=t[i];n||(n=[],t[i]=n),n.push(e),e.data.start&&(e.data.end?e.center=(e.data.start.valueOf()+e.data.end.valueOf())/2:e.center=e.data.start.valueOf())}for(let i in t){var e;Object.prototype.hasOwnProperty.call(t,i)&&Mx(e=t[i]).call(e,(t,e)=>t.center-e.center)}this.dataChanged=!1}_getClusterForItems(t,e,i,n){var o;const s=ba(o=i||[]).call(o,t=>{var e;return{cluster:t,itemsIds:new zw(ba(e=t.data.uiItems).call(e,t=>t.id))}});let r;if(s.length)for(let e of s)if(e.itemsIds.size===t.length&&VC(t).call(t,t=>e.itemsIds.has(t.id))){r=e.cluster;break}if(r)return r.setUiItems(t),r.group!==e&&(r.group&&r.group.remove(r),e&&(e.add(r),r.group=e)),r;let a=n.titleTemplate||"";const l={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},h=a.replace(/{count}/,t.length),d='<div title="'+h+'">'+t.length+"</div>",c=mh({},n,this.itemSet.options),u={content:d,title:h,group:e,uiItems:t,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return r=this.createClusterItem(u,l,c),e&&(e.add(r),r.group=e),r.attach(),r}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}}const KC="__ungrouped__",ZC="__background__";class $C extends jD{constructor(t,e){super(),this.body=t,this.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap(t,e){const i=e.order;e.order=t.order,t.order=i},groupOrder:"order",selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:SS.snap,onDropObjectOnItem(t,e,i){i(e)},onAdd(t,e){e(t)},onUpdate(t,e){e(t)},onMove(t,e){e(t)},onRemove(t,e){e(t)},onMoving(t,e){e(t)},onAddGroup(t,e){e(t)},onMoveGroup(t,e){e(t)},onRemoveGroup(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:500},tooltipOnItemUpdateTime:!1},this.options=DD.extend({},this.defaultOptions),this.options.rtl=e.rtl,this.options.onTimeout=e.onTimeout,this.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},this.dom={},this.props={},this.hammer=null;const i=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(t,e){i._onAdd(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},update(t,e){i._onUpdate(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()},remove(t,e){i._onRemove(e.items),i.options.cluster&&i.clusterGenerator.setItems(i.items,{applyOnChangedLevel:!1}),i.redraw()}},this.groupListeners={add(t,e,n){if(i._onAddGroups(e.items),i.groupsData&&i.groupsData.length>0){var o;const t=i.groupsData.getDataSet();Cl(o=t.get()).call(o,e=>{if(e.nestedGroups){var i;0!=e.showNested&&(e.showNested=!0);let o=[];Cl(i=e.nestedGroups).call(i,i=>{const n=t.get(i);n&&(n.nestedInGroup=e.id,0==e.showNested&&(n.visible=!1),o=vd(o).call(o,n))}),t.update(o,n)}})}},update(t,e){i._onUpdateGroups(e.items)},remove(t,e){i._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(e),this.clusters=[]}_create(){var t,e,i,n,o,s,r,a,l,h,d,c,u,p,m;const f=document.createElement("div");f.className="vis-itemset",f["vis-itemset"]=this,this.dom.frame=f;const g=document.createElement("div");g.className="vis-background",f.appendChild(g),this.dom.background=g;const v=document.createElement("div");v.className="vis-foreground",f.appendChild(v),this.dom.foreground=v;const y=document.createElement("div");y.className="vis-axis",this.dom.axis=y;const b=document.createElement("div");b.className="vis-labelset",this.dom.labelSet=b,this._updateUngrouped();const _=new SC(ZC,null,this);_.show(),this.groups[ZC]=_,this.hammer=new kS(this.body.dom.centerContainer),this.hammer.on("hammer.input",t=>{t.isFirst&&this._onTouch(t)}),this.hammer.on("panstart",dl(t=this._onDragStart).call(t,this)),this.hammer.on("panmove",dl(e=this._onDrag).call(e,this)),this.hammer.on("panend",dl(i=this._onDragEnd).call(i,this)),this.hammer.get("pan").set({threshold:5,direction:kS.ALL}),this.hammer.get("press").set({time:1e4}),this.hammer.on("tap",dl(n=this._onSelectItem).call(n,this)),this.hammer.on("press",dl(o=this._onMultiSelectItem).call(o,this)),this.hammer.get("press").set({time:1e4}),this.hammer.on("doubletap",dl(s=this._onAddItem).call(s,this)),this.options.rtl?this.groupHammer=new kS(this.body.dom.rightContainer):this.groupHammer=new kS(this.body.dom.leftContainer),this.groupHammer.on("tap",dl(r=this._onGroupClick).call(r,this)),this.groupHammer.on("panstart",dl(a=this._onGroupDragStart).call(a,this)),this.groupHammer.on("panmove",dl(l=this._onGroupDrag).call(l,this)),this.groupHammer.on("panend",dl(h=this._onGroupDragEnd).call(h,this)),this.groupHammer.get("pan").set({threshold:5,direction:kS.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",dl(d=this._onMouseOver).call(d,this)),this.body.dom.centerContainer.addEventListener("mouseout",dl(c=this._onMouseOut).call(c,this)),this.body.dom.centerContainer.addEventListener("mousemove",dl(u=this._onMouseMove).call(u,this)),this.body.dom.centerContainer.addEventListener("contextmenu",dl(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener("mousewheel",dl(m=this._onMouseWheel).call(m,this)),this.show()}setOptions(t){if(t){var e,i;const n=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","sequentialSelection","multiselectPerGroup","longSelectPressTime","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","showTooltips","tooltip","tooltipOnItemUpdateTime","groupHeightMode","onTimeout"];DD.selectiveExtend(n,this.options,t),"itemsAlwaysDraggable"in t&&("boolean"==typeof t.itemsAlwaysDraggable?(this.options.itemsAlwaysDraggable.item=t.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):"object"==typeof t.itemsAlwaysDraggable&&(DD.selectiveExtend(["item","range"],this.options.itemsAlwaysDraggable,t.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),"sequentialSelection"in t&&"boolean"==typeof t.sequentialSelection&&(this.options.sequentialSelection=t.sequentialSelection),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.item="top"===t.orientation?"top":"bottom":"object"==typeof t.orientation&&"item"in t.orientation&&(this.options.orientation.item=t.orientation.item)),"margin"in t&&("number"==typeof t.margin?(this.options.margin.axis=t.margin,this.options.margin.item.horizontal=t.margin,this.options.margin.item.vertical=t.margin):"object"==typeof t.margin&&(DD.selectiveExtend(["axis"],this.options.margin,t.margin),"item"in t.margin&&("number"==typeof t.margin.item?(this.options.margin.item.horizontal=t.margin.item,this.options.margin.item.vertical=t.margin.item):"object"==typeof t.margin.item&&DD.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),Cl(e=["locale","locales"]).call(e,e=>{e in t&&(this.options[e]=t[e])}),"editable"in t&&("boolean"==typeof t.editable?(this.options.editable.updateTime=t.editable,this.options.editable.updateGroup=t.editable,this.options.editable.add=t.editable,this.options.editable.remove=t.editable,this.options.editable.overrideItems=!1):"object"==typeof t.editable&&DD.selectiveExtend(["updateTime","updateGroup","add","remove","overrideItems"],this.options.editable,t.editable)),"groupEditable"in t&&("boolean"==typeof t.groupEditable?(this.options.groupEditable.order=t.groupEditable,this.options.groupEditable.add=t.groupEditable,this.options.groupEditable.remove=t.groupEditable):"object"==typeof t.groupEditable&&DD.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));const o=e=>{const i=t[e];if(i){var n;if("function"!=typeof i)throw new Error(vd(n="option ".concat(e," must be a function ")).call(n,e,"(item, callback)"));this.options[e]=i}};Cl(i=["onDropObjectOnItem","onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"]).call(i,o),t.cluster?(mh(this.options,{cluster:t.cluster}),this.clusterGenerator||(this.clusterGenerator=new qC(this)),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}markDirty(t){this.groupIds=[],t&&(t.refreshItems&&Cl(DD).call(DD,this.items,t=>{t.dirty=!0,t.displayed&&t.redraw()}),t.restackGroups&&Cl(DD).call(DD,this.groups,(t,e)=>{e!==ZC&&(t.stackDirty=!0)}))}destroy(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}hide(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}show(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}setPopupTimer(t){if(this.clearPopupTimer(),t){const e=this.options.tooltip.delay||"number"==typeof this.options.tooltip.delay?this.options.tooltip.delay:500;this.popupTimer=Fu(function(){t.show()},e)}}clearPopupTimer(){null!=this.popupTimer&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(t){var e;null==t&&(t=[]),aa(t)||(t=[t]);const i=Pd(e=this.selection).call(e,e=>-1===kc(t).call(t,e));for(let t of i){const e=this.getItemById(t);e&&e.unselect()}this.selection=[...t];for(let e of t){const t=this.getItemById(e);t&&t.select()}}getSelection(){var t;return vd(t=this.selection).call(t,[])}getVisibleItems(){const t=this.body.range.getRange();let e,i;this.options.rtl?(e=this.body.util.toScreen(t.start),i=this.body.util.toScreen(t.end)):(i=this.body.util.toScreen(t.start),e=this.body.util.toScreen(t.end));const n=[];for(const t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;const o=this.groups[t],s=o.isVisible?o.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&n.push(t.id):t.left<e&&t.left+t.width>i&&n.push(t.id)}return n}getItemsAtCurrentTime(t){let e,i;this.options.rtl?(e=this.body.util.toScreen(t),i=this.body.util.toScreen(t)):(i=this.body.util.toScreen(t),e=this.body.util.toScreen(t));const n=[];for(const t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;const o=this.groups[t],s=o.isVisible?o.visibleItems:[];for(const t of s)this.options.rtl?t.right<i&&t.right+t.width>e&&n.push(t.id):t.left<e&&t.left+t.width>i&&n.push(t.id)}return n}getVisibleGroups(){const t=[];for(const e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;this.groups[e].isVisible&&t.push(e)}return t}getItemById(t){var e;return this.items[t]||lC(e=this.clusters).call(e,e=>e.id===t)}_deselect(t){const e=this.selection;for(let i=0,n=e.length;i<n;i++)if(e[i]==t){rh(e).call(e,i,1);break}}redraw(){const t=this.options.margin,e=this.body.range,i=DD.option.asSize,n=this.options,o=n.orientation.item;let s=!1;const r=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,r.className="vis-itemset",this.options.cluster&&this._clusterItems(),s=this._orderGroups()||s;const a=e.end-e.start,l=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,h=e.start!=this.lastRangeStart,d=n.stack!=this.lastStack,c=n.stackSubgroups!=this.lastStackSubgroups,u=l||h||d||c;this.lastVisibleInterval=a,this.lastRangeStart=e.start,this.lastStack=n.stack,this.lastStackSubgroups=n.stackSubgroups,this.props.lastWidth=this.props.width;const p=this._firstGroup(),m={item:t.item,axis:t.axis},f={item:t.item,axis:t.item.vertical/2};let g=0;const v=t.axis+t.item.vertical;this.groups[ZC].redraw(e,f,u);const y={};let b=0;Cl(DD).call(DD,this.groups,(t,i)=>{if(i===ZC)return;const n=t==p?m:f;y[i]=t.redraw(e,n,u,!0),b=y[i].length});if(b>0){const t={};for(let e=0;e<b;e++)Cl(DD).call(DD,y,(i,n)=>{t[n]=i[e]()});Cl(DD).call(DD,this.groups,(e,i)=>{if(i===ZC)return;const n=t[i];s=n||s,g+=e.height}),g=Math.max(g,v)}return g=Math.max(g,v),r.style.height=i(g),this.props.width=r.offsetWidth,this.props.height=g,this.dom.axis.style.top=i("top"==o?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",this.hammer.get("press").set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,s=this._isResized()||s,s}_firstGroup(){const t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t];return this.groups[e]||this.groups[KC]||null}_updateUngrouped(){let t,e,i=this.groups[KC];if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups[KC],this.items){if(!Object.prototype.hasOwnProperty.call(this.items,e))continue;t=this.items[e],t.parent&&t.parent.remove(t);const i=this.getGroupId(t.data),n=this.groups[i];n&&n.add(t)||t.hide()}}else if(!i){const n=null,o=null;for(e in i=new DC(n,o,this),this.groups[KC]=i,this.items)Object.prototype.hasOwnProperty.call(this.items,e)&&(t=this.items[e],i.add(t));i.show()}}getLabelSet(){return this.dom.labelSet}setItems(t){this.itemsSettingTime=new Date;const e=this;let i;const n=this.itemsData;if(t){if(!gD(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=_D(t)}else this.itemsData=null;if(n&&(Cl(DD).call(DD,this.itemListeners,(t,e)=>{n.off(e,t)}),n.dispose(),i=n.getIds(),this._onRemove(i)),this.itemsData){const t=this.id;Cl(DD).call(DD,this.itemListeners,(i,n)=>{e.itemsData.on(n,i,t)}),i=this.itemsData.getIds(),this._onAdd(i),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})}getItems(){return null!=this.itemsData?this.itemsData.rawDS:null}setGroups(t){const e=this;let i;if(this.groupsData&&(Cl(DD).call(DD,this.groupListeners,(t,i)=>{e.groupsData.off(i,t)}),i=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(i)),t){if(!gD(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var n;const t=this.groupsData.getDataSet();Cl(n=t.get()).call(n,e=>{var i;e.nestedGroups&&Cl(i=e.nestedGroups).call(i,i=>{const n=t.get(i);n.nestedInGroup=e.id,0==e.showNested&&(n.visible=!1),t.update(n)})});const o=this.id;Cl(DD).call(DD,this.groupListeners,(t,i)=>{e.groupsData.on(i,t,o)}),i=this.groupsData.getIds(),this._onAddGroups(i)}this._updateUngrouped(),this._order(),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems(),this.markDirty({refreshItems:!0,restackGroups:!0})),this.body.emitter.emit("_change",{queue:!0})}getGroups(){return this.groupsData}removeItem(t){const e=this.itemsData.get(t);e&&this.options.onRemove(e,e=>{e&&this.itemsData.remove(t)})}_getType(t){return t.type||this.options.type||(t.end?"range":"box")}getGroupId(t){return"background"==this._getType(t)&&null==t.group?ZC:this.groupsData?t.group:KC}_onUpdate(t){const e=this;Cl(t).call(t,t=>{const i=e.itemsData.get(t);let n=e.items[t];const o=i?e._getType(i):null,s=$C.types[o];let r;if(n&&(s&&n instanceof s?e._updateItem(n,i):(r=n.selected,e._removeItem(n),n=null)),!n&&i){if(!s)throw new TypeError('Unknown item type "'.concat(o,'"'));n=new s(i,e.conversion,e.options),n.id=t,e._addItem(n),r&&(this.selection.push(t),n.select())}}),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit("_change",{queue:!0})}_onRemove(t){let e=0;const i=this;Cl(t).call(t,t=>{const n=i.items[t];n&&(e++,i._removeItem(n))}),e&&(this._order(),this.body.emitter.emit("_change",{queue:!0}))}_order(){Cl(DD).call(DD,this.groups,t=>{t.order()})}_onUpdateGroups(t){this._onAddGroups(t)}_onAddGroups(t){const e=this;Cl(t).call(t,t=>{const i=e.groupsData.get(t);let n=e.groups[t];if(n)n.setData(i);else{if(t==KC||t==ZC)throw new Error("Illegal group id. ".concat(t," is a reserved id."));const o=Zc(e.options);DD.extend(o,{height:null}),n=new DC(t,i,e),e.groups[t]=n;for(const i in e.items){if(!Object.prototype.hasOwnProperty.call(e.items,i))continue;const o=e.items[i];o.data.group==t&&n.add(o)}n.order(),n.show()}}),this.body.emitter.emit("_change",{queue:!0})}_onRemoveGroups(t){Cl(t).call(t,t=>{const e=this.groups[t];e&&(e.dispose(),delete this.groups[t])}),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit("_change",{queue:!0})}_orderGroups(){if(this.groupsData){let t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);const e=!DD.equalArray(t,this.groupIds);if(e){const e=this.groups;Cl(t).call(t,t=>{e[t].hide()}),Cl(t).call(t,t=>{e[t].show()}),this.groupIds=t}return e}return!1}_orderNestedGroups(t){return function t(e,i){let n=[];return Cl(i).call(i,i=>{n.push(i);if(e.groupsData.get(i).nestedGroups){var o;const s=ba(o=e.groupsData.get({filter:t=>t.nestedInGroup==i,order:e.options.groupOrder})).call(o,t=>t.id);n=vd(n).call(n,t(e,s))}}),n}(this,Pd(t).call(t,t=>!this.groupsData.get(t).nestedInGroup))}_addItem(t){this.items[t.id]=t;const e=this.getGroupId(t.data),i=this.groups[e];i?i&&i.data&&i.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,i&&i.add(t)}_updateItem(t,e){t.setData(e);const i=this.getGroupId(t.data),n=this.groups[i];n?n&&n.data&&n.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1}_removeItem(t){var e,i;t.hide(),delete this.items[t.id];const n=kc(e=this.selection).call(e,t.id);-1!=n&&rh(i=this.selection).call(i,n,1),t.parent&&t.parent.remove(t),null!=this.popup&&this.popup.hide()}_constructByEndArray(t){const e=[];for(let i=0;i<t.length;i++)t[i]instanceof OC&&e.push(t[i]);return e}_onTouch(t){this.touchParams.item=this.itemFromTarget(t),this.touchParams.dragLeftItem=t.target.dragLeftItem||!1,this.touchParams.dragRightItem=t.target.dragRightItem||!1,this.touchParams.itemProps=null}_getGroupIndex(t){for(let e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e}_onDragStart(t){if(this.touchParams.itemIsDragging)return;const e=this.touchParams.item||null,i=this;let n;if(e&&(e.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;if(null!=e.editable&&!e.editable.updateTime&&!e.editable.updateGroup&&!this.options.editable.overrideItems)return;const o=this.touchParams.dragLeftItem,s=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=e,o)n={item:o,initialX:t.center.x,dragLeft:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[n];else if(s)n={item:s,initialX:t.center.x,dragRight:!0,data:this._cloneItemData(e.data)},this.touchParams.itemProps=[n];else if(this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey))this._onDragStartAddItem(t);else{this.groupIds.length<1&&this.redraw();const n=this._getGroupIndex(e.data.group),o=this.options.itemsAlwaysDraggable.item&&!e.selected?[e.id]:this.getSelection();this.touchParams.itemProps=ba(o).call(o,e=>{const o=i.items[e],s=i._getGroupIndex(o.data.group);return{item:o,initialX:t.center.x,groupOffset:n-s,data:this._cloneItemData(o.data)}})}t.stopPropagation()}else this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey)&&this._onDragStartAddItem(t)}_onDragStartAddItem(t){const e=this.options.snap||null,i=this.dom.frame.getBoundingClientRect(),n=this.options.rtl?i.right-t.center.x+10:t.center.x-i.left-10,o=this.body.util.toTime(n),s=this.body.util.getScale(),r=this.body.util.getStep(),a=e?e(o,s,r):o,l={type:"range",start:a,end:a,content:"new item"},h=Dk();l[this.itemsData.idProp]=h;const d=this.groupFromTarget(t);d&&(l.group=d.groupId);const c=new OC(l,this.conversion,this.options);c.id=h,c.data=this._cloneItemData(l),this._addItem(c),this.touchParams.selectedItem=c;const u={item:c,initialX:t.center.x,data:c.data};this.options.rtl?u.dragLeft=!0:u.dragRight=!0,this.touchParams.itemProps=[u],t.stopPropagation()}_onDrag(t){if(null!=this.popup&&this.options.showTooltips&&!this.popup.hidden){const e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.center.x-i.left+e.offsetLeft,t.center.y-i.top+e.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var e;t.stopPropagation();const i=this,n=this.options.snap||null,o=this.body.dom.root.offsetLeft,s=this.options.rtl?o+this.body.domProps.right.width:o+this.body.domProps.left.width,r=this.body.util.getScale(),a=this.body.util.getStep(),l=this.touchParams.selectedItem,h=(this.options.editable.overrideItems||null==l.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=l.editable&&l.editable.updateGroup;let d=null;if(h&&l&&null!=l.data.group){const e=i.groupFromTarget(t);e&&(d=this._getGroupIndex(e.groupId))}Cl(e=this.touchParams.itemProps).call(e,e=>{const o=i.body.util.toTime(t.center.x-s),c=i.body.util.toTime(e.initialX-s);let u,p,m,f,g;u=this.options.rtl?-(o-c):o-c;let v=this._cloneItemData(e.item.data);if(null!=e.item.editable&&!e.item.editable.updateTime&&!e.item.editable.updateGroup&&!i.options.editable.overrideItems)return;if((this.options.editable.overrideItems||null==l.editable)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&null!=l.editable&&l.editable.updateTime)if(e.dragLeft)this.options.rtl?null!=v.end&&(m=DD.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=n?n(g,r,a):g):null!=v.start&&(p=DD.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=n?n(f,r,a):f);else if(e.dragRight)this.options.rtl?null!=v.start&&(p=DD.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=n?n(f,r,a):f):null!=v.end&&(m=DD.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=n?n(g,r,a):g);else if(null!=v.start)if(p=DD.convert(e.data.start,"Date").valueOf(),f=new Date(p+u),null!=v.end){m=DD.convert(e.data.end,"Date");const t=m.valueOf()-p.valueOf();v.start=n?n(f,r,a):f,v.end=new Date(v.start.valueOf()+t)}else v.start=n?n(f,r,a):f;if(h&&!e.dragLeft&&!e.dragRight&&null!=d&&null!=v.group){let t=d-e.groupOffset;t=Math.max(0,t),t=Math.min(i.groupIds.length-1,t),v.group=i.groupIds[t]}v=this._cloneItemData(v),i.options.onMoving(v,t=>{t&&e.item.setData(this._cloneItemData(t,"Date"))})}),this.body.emitter.emit("_change")}}_moveToGroup(t,e){const i=this.groups[e];if(i&&i.groupId!=t.data.group){const e=t.parent;e.remove(t),e.order(),t.data.group=i.groupId,i.add(t),i.order()}}_onDragEnd(t){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();const e=this,i=this.touchParams.itemProps;this.touchParams.itemProps=null,Cl(i).call(i,t=>{const i=t.item.id;if(null!=e.itemsData.get(i)){const n=this._cloneItemData(t.item.data);e.options.onMove(n,n=>{n?(n[this.itemsData.idProp]=i,this.itemsData.update(n)):(t.item.setData(t.data),e.body.emitter.emit("_change"))})}else e.options.onAdd(t.item.data,i=>{e._removeItem(t.item),i&&e.itemsData.add(i),e.body.emitter.emit("_change")})})}}_onGroupClick(t){const e=this.groupFromTarget(t);Fu(()=>{this.toggleGroupShowNested(e)},1)}toggleGroupShowNested(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(!t||!t.nestedGroups)return;const i=this.groupsData.getDataSet();t.showNested=null!=e?!!e:!t.showNested;let n=i.get(t.groupId);n.showNested=t.showNested;let o=t.nestedGroups,s=o;for(;s.length>0;){let t=s;s=[];for(let e=0;e<t.length;e++){let n=i.get(t[e]);n.nestedGroups&&(s=vd(s).call(s,n.nestedGroups))}s.length>0&&(o=vd(o).call(o,s))}var r;if(n.showNested){var a=i.get(n.nestedGroups);for(let t=0;t<a.length;t++){let e=a[t];e.nestedGroups&&e.nestedGroups.length>0&&(null==e.showNested||1==e.showNested)&&a.push(...i.get(e.nestedGroups))}r=ba(a).call(a,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t})}else{var l;r=ba(l=i.get(o)).call(l,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t})}i.update(vd(r).call(r,n)),n.showNested?(DD.removeClassName(t.dom.label,"collapsed"),DD.addClassName(t.dom.label,"expanded")):(DD.removeClassName(t.dom.label,"expanded"),DD.addClassName(t.dom.label,"collapsed"))}toggleGroupDragClassName(t){t.dom.label.classList.toggle("vis-group-is-dragging"),t.dom.foreground.classList.toggle("vis-group-is-dragging")}_onGroupDragStart(t){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(t),this.groupTouchParams.group&&(t.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}_onGroupDrag(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this.groupsData.getDataSet(),i=this.groupFromTarget(t);if(i&&i.height!=this.groupTouchParams.group.height){const e=i.top<this.groupTouchParams.group.top,n=t.center?t.center.y:t.clientY,o=i.dom.foreground.getBoundingClientRect(),s=this.groupTouchParams.group.height;if(e){if(o.top+s<n)return}else{const t=i.height;if(o.top+t-s>n)return}}if(i&&i!=this.groupTouchParams.group){const t=e.get(i.groupId),n=e.get(this.groupTouchParams.group.groupId);n&&t&&(this.options.groupOrderSwap(n,t,e),e.update(n),e.update(t));const o=e.getIds({order:this.options.groupOrder});if(!DD.equalArray(o,this.groupTouchParams.originalOrder)){const t=this.groupTouchParams.originalOrder,i=this.groupTouchParams.group.groupId,n=Math.min(t.length,o.length);let s=0,r=0,a=0;for(;s<n;){for(;s+r<n&&s+a<n&&o[s+r]==t[s+a];)s++;if(s+r>=n)break;if(o[s+r]==i)r=1;else if(t[s+a]==i)a=1;else{const i=kc(o).call(o,t[s+a]),n=e.get(o[s+r]),l=e.get(t[s+a]);this.options.groupOrderSwap(n,l,e),e.update(n),e.update(l);const h=o[s+r];o[s+r]=t[s+a],o[i]=h,s++}}}}}}_onGroupDragEnd(t){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();const e=this,i=e.groupTouchParams.group.groupId,n=e.groupsData.getDataSet(),o=DD.extend({},n.get(i));e.options.onMoveGroup(o,t=>{if(t)t[n._idProp]=i,n.update(t);else{const t=n.getIds({order:e.options.groupOrder});if(!DD.equalArray(t,e.groupTouchParams.originalOrder)){const i=e.groupTouchParams.originalOrder,o=Math.min(i.length,t.length);let s=0;for(;s<o;){for(;s<o&&t[s]==i[s];)s++;if(s>=o)break;const r=kc(t).call(t,i[s]),a=n.get(t[s]),l=n.get(i[s]);e.options.groupOrderSwap(a,l,n),n.update(a),n.update(l);const h=t[s];t[s]=i[s],t[r]=h,s++}}}}),e.body.emitter.emit("groupDragged",{groupId:i}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(t){if(!this.options.selectable)return;const e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),i=t.srcEvent&&t.srcEvent.shiftKey;if(e||i)return void this._onMultiSelectItem(t);const n=this.getSelection(),o=this.itemFromTarget(t),s=o&&o.selectable?[o.id]:[];this.setSelection(s);const r=this.getSelection();(r.length>0||n.length>0)&&this.body.emitter.emit("select",{items:r,event:t})}_onMouseOver(t){const e=this.itemFromTarget(t);if(!e)return;if(e===this.itemFromRelatedTarget(t))return;const i=e.getTitle();if(this.options.showTooltips&&i){null==this.popup&&(this.popup=new PC(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);const e=this.body.dom.centerContainer,n=e.getBoundingClientRect();this.popup.setPosition(t.clientX-n.left+e.offsetLeft,t.clientY-n.top+e.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}_onMouseOut(t){const e=this.itemFromTarget(t);if(!e)return;e!==this.itemFromRelatedTarget(t)&&(this.clearPopupTimer(),null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))}_onMouseMove(t){if(this.itemFromTarget(t)&&(null!=this.popupTimer&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){const e=this.body.dom.centerContainer,i=e.getBoundingClientRect();this.popup.setPosition(t.clientX-i.left+e.offsetLeft,t.clientY-i.top+e.offsetTop),this.popup.show()}}_onMouseWheel(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)}_onUpdateItem(t){if(!this.options.selectable)return;if(!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;const e=this;if(t){const i=e.itemsData.get(t.id);this.options.onUpdate(i,t=>{t&&e.itemsData.update(t)})}}_onDropObjectOnItem(t){const e=this.itemFromTarget(t),i=JSON.parse(t.dataTransfer.getData("text"));this.options.onDropObjectOnItem(i,e)}_onAddItem(t){if(!this.options.selectable)return;if(!this.options.editable.add)return;const e=this,i=this.options.snap||null,n=this.dom.frame.getBoundingClientRect(),o=this.options.rtl?n.right-t.center.x:t.center.x-n.left,s=this.body.util.toTime(o),r=this.body.util.getScale(),a=this.body.util.getStep();let l,h;"drop"==t.type?(h=JSON.parse(t.dataTransfer.getData("text")),h.content=h.content?h.content:"new item",h.start=h.start?h.start:i?i(s,r,a):s,h.type=h.type||"box",h[this.itemsData.idProp]=h.id||Dk(),"range"!=h.type||h.end||(l=this.body.util.toTime(o+this.props.width/5),h.end=i?i(l,r,a):l)):(h={start:i?i(s,r,a):s,content:"new item"},h[this.itemsData.idProp]=Dk(),"range"===this.options.type&&(l=this.body.util.toTime(o+this.props.width/5),h.end=i?i(l,r,a):l));const d=this.groupFromTarget(t);d&&(h.group=d.groupId),h=this._cloneItemData(h),this.options.onAdd(h,i=>{i&&(e.itemsData.add(i),"drop"==t.type&&e.setSelection([i.id]))})}_onMultiSelectItem(t){if(!this.options.selectable)return;const e=this.itemFromTarget(t);if(e){let i=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||!1||this.options.sequentialSelection)&&this.options.multiselect){const t=this.itemsData.get(e.id).group;let n;this.options.multiselectPerGroup&&i.length>0&&(n=this.itemsData.get(i[0]).group),this.options.multiselectPerGroup&&null!=n&&n!=t||i.push(e.id);const o=$C._getItemRange(this.itemsData.get(i));if(!this.options.multiselectPerGroup||n==t){i=[];for(const t in this.items){if(!Object.prototype.hasOwnProperty.call(this.items,t))continue;const e=this.items[t],s=e.data.start,r=void 0!==e.data.end?e.data.end:s;!(s>=o.min&&r<=o.max)||this.options.multiselectPerGroup&&n!=this.itemsData.get(e.id).group||e instanceof EC||i.push(e.id)}}}else{const t=kc(i).call(i,e.id);-1==t?i.push(e.id):rh(i).call(i,t,1)}const n=Pd(i).call(i,t=>this.getItemById(t).selectable);this.setSelection(n),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}static _getItemRange(t){let e=null,i=null;return Cl(t).call(t,t=>{(null==i||t.start<i)&&(i=t.start),null!=t.end?(null==e||t.end>e)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:i,max:e}}itemFromElement(t){let e=t;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"vis-item"))return e["vis-item"];e=e.parentNode}return null}itemFromTarget(t){return this.itemFromElement(t.target)}itemFromRelatedTarget(t){return this.itemFromElement(t.relatedTarget)}groupFromTarget(t){const e=t.center?t.center.y:t.clientY;let i=this.groupIds;i.length<=0&&this.groupsData&&(i=this.groupsData.getIds({order:this.options.groupOrder}));for(let t=0;t<i.length;t++){const n=i[t],o=this.groups[n],s=o.dom.foreground,r=s.getBoundingClientRect();if(e>=r.top&&e<r.top+s.offsetHeight)return o;if("top"===this.options.orientation.item){if(t===this.groupIds.length-1&&e>r.top)return o}else if(0===t&&e<r.top+s.offset)return o}return null}static itemSetFromTarget(t){let e=t.target;for(;e;){if(Object.prototype.hasOwnProperty.call(e,"vis-itemset"))return e["vis-itemset"];e=e.parentNode}return null}_cloneItemData(t,e){const i=DD.extend({},t);return e||(e=this.itemsData.type),null!=i.start&&(i.start=DD.convert(i.start,e&&e.start||"Date")),null!=i.end&&(i.end=DD.convert(i.end,e&&e.end||"Date")),i}_clusterItems(){if(!this.options.cluster)return;const{scale:t}=this.body.range.conversion(this.body.domProps.center.width),e=this.clusterGenerator.getClusters(this.clusters,t,this.options.cluster);if(this.clusters!=e){if(this._detachAllClusters(),e){for(let t of e)t.attach();this.clusters=e}this._updateClusters(e)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let t of this.clusters)t.detach()}_updateClusters(t){if(this.clusters&&this.clusters.length){var e;const o=new zw(ba(t).call(t,t=>t.id)),s=Pd(e=this.clusters).call(e,t=>!o.has(t.id));let r=!1;for(let t of s){var i;const e=kc(i=this.selection).call(i,t.id);var n;if(-1!==e)t.unselect(),rh(n=this.selection).call(n,e,1),r=!0}if(r){const t=this.getSelection();this.body.emitter.emit("select",{items:t,event:event})}}this.clusters=t||[]}}$C.types={background:EC,box:TC,range:OC,point:MC},$C.prototype._onAdd=$C.prototype._onUpdate;let JC,QC=!1,tT="background: #FFeeee; color: #dd0000";class eT{constructor(){}static validate(t,e,i){QC=!1,JC=e;let n=e;return void 0!==i&&(n=e[i]),eT.parse(t,n,[]),QC}static parse(t,e,i){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&eT.check(n,t,e,i)}static check(t,e,i,n){if(void 0===i[t]&&void 0===i.__any__)return void eT.getSuggestion(t,i,n);let o=t,s=!0;void 0===i[t]&&void 0!==i.__any__&&(o="__any__",s="object"===eT.getType(e[t]));let r=i[o];s&&void 0!==r.__type__&&(r=r.__type__),eT.checkFields(t,e,i,o,r,n)}static checkFields(t,e,i,n,o,s){let r=function(e){console.log("%c"+e+eT.printLocation(s,t),tT)},a=eT.getType(e[t]),l=o[a];void 0!==l?"array"===eT.getType(l)&&-1===kc(l).call(l,e[t])?(r('Invalid option detected in "'+t+'". Allowed values are:'+eT.print(l)+' not "'+e[t]+'". '),QC=!0):"object"===a&&"__any__"!==n&&(s=DD.copyAndExtendArray(s,t),eT.parse(e[t],i[n],s)):void 0===o.any&&(r('Invalid type received for "'+t+'". Expected: '+eT.print(Ea(o))+". Received ["+a+'] "'+e[t]+'"'),QC=!0)}static getType(t){var e=typeof t;return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":aa(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":!0===t._isAMomentObject?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}static getSuggestion(t,e,i){let n,o=eT.findInOptions(t,e,i,!1),s=eT.findInOptions(t,JC,[],!0);n=void 0!==o.indexMatch?" in "+eT.printLocation(o.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+eT.printLocation(o.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+eT.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+eT.printLocation(o.path,t):". Did you mean one of these: "+eT.print(Ea(e))+eT.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+n,tT),QC=!0}static findInOptions(t,e,i){let n,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=1e9,r="",a=[],l=t.toLowerCase();for(let d in e){if(!Object.prototype.hasOwnProperty.call(e,d))continue;let c;if(void 0!==e[d].__type__&&!0===o){let o=eT.findInOptions(t,e[d],DD.copyAndExtendArray(i,d));s>o.distance&&(r=o.closestMatch,a=o.path,s=o.distance,n=o.indexMatch)}else{var h;-1!==kc(h=d.toLowerCase()).call(h,l)&&(n=d),c=eT.levenshteinDistance(t,d),s>c&&(r=d,a=DD.copyArray(i),s=c)}}return{closestMatch:r,path:a,distance:s,indexMatch:n}}static printLocation(t,e){let i="\n\n"+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n";for(let e=0;e<t.length;e++){for(let t=0;t<e+1;t++)i+="  ";i+=t[e]+": {\n"}for(let e=0;e<t.length+1;e++)i+="  ";i+=e+"\n";for(let e=0;e<t.length+1;e++){for(let n=0;n<t.length-e;n++)i+="  ";i+="}\n"}return i+"\n\n"}static print(t){return du(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}static levenshteinDistance(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var i,n,o=[];for(i=0;i<=e.length;i++)o[i]=[i];for(n=0;n<=t.length;n++)o[0][n]=n;for(i=1;i<=e.length;i++)for(n=1;n<=t.length;n++)e.charAt(i-1)==t.charAt(n-1)?o[i][n]=o[i-1][n-1]:o[i][n]=Math.min(o[i-1][n-1]+1,Math.min(o[i][n-1]+1,o[i-1][n]+1));return o[e.length][t.length]}}let iT="string",nT="boolean",oT="number",sT="array",rT="date",aT="object",lT="moment",hT={configure:{enabled:{boolean:nT},filter:{boolean:nT,function:"function"},container:{dom:"dom"},__type__:{object:aT,boolean:nT,function:"function"}},align:{string:iT},alignCurrentTime:{string:iT,undefined:"undefined"},rtl:{boolean:nT,undefined:"undefined"},rollingMode:{follow:{boolean:nT},offset:{number:oT,undefined:"undefined"},__type__:{object:aT}},onTimeout:{timeoutMs:{number:oT},callback:{function:"function"},__type__:{object:aT}},verticalScroll:{boolean:nT,undefined:"undefined"},horizontalScroll:{boolean:nT,undefined:"undefined"},horizontalScrollKey:{string:iT,undefined:"undefined"},horizontalScrollInvert:{boolean:nT,undefined:"undefined"},autoResize:{boolean:nT},throttleRedraw:{number:oT},clickToUse:{boolean:nT},dataAttributes:{string:iT,array:sT},editable:{add:{boolean:nT,undefined:"undefined"},remove:{boolean:nT,undefined:"undefined"},updateGroup:{boolean:nT,undefined:"undefined"},updateTime:{boolean:nT,undefined:"undefined"},overrideItems:{boolean:nT,undefined:"undefined"},__type__:{boolean:nT,object:aT}},end:{number:oT,date:rT,string:iT,moment:lT},format:{minorLabels:{millisecond:{string:iT,undefined:"undefined"},second:{string:iT,undefined:"undefined"},minute:{string:iT,undefined:"undefined"},hour:{string:iT,undefined:"undefined"},weekday:{string:iT,undefined:"undefined"},day:{string:iT,undefined:"undefined"},week:{string:iT,undefined:"undefined"},month:{string:iT,undefined:"undefined"},year:{string:iT,undefined:"undefined"},__type__:{object:aT,function:"function"}},majorLabels:{millisecond:{string:iT,undefined:"undefined"},second:{string:iT,undefined:"undefined"},minute:{string:iT,undefined:"undefined"},hour:{string:iT,undefined:"undefined"},weekday:{string:iT,undefined:"undefined"},day:{string:iT,undefined:"undefined"},week:{string:iT,undefined:"undefined"},month:{string:iT,undefined:"undefined"},year:{string:iT,undefined:"undefined"},__type__:{object:aT,function:"function"}},__type__:{object:aT}},moment:{function:"function"},groupHeightMode:{string:iT},groupOrder:{string:iT,function:"function"},groupEditable:{add:{boolean:nT,undefined:"undefined"},remove:{boolean:nT,undefined:"undefined"},order:{boolean:nT,undefined:"undefined"},__type__:{boolean:nT,object:aT}},groupOrderSwap:{function:"function"},height:{string:iT,number:oT},hiddenDates:{start:{date:rT,number:oT,string:iT,moment:lT},end:{date:rT,number:oT,string:iT,moment:lT},repeat:{string:iT},__type__:{object:aT,array:sT}},itemsAlwaysDraggable:{item:{boolean:nT,undefined:"undefined"},range:{boolean:nT,undefined:"undefined"},__type__:{boolean:nT,object:aT}},limitSize:{boolean:nT},locale:{string:iT},locales:{__any__:{any:"any"},__type__:{object:aT}},longSelectPressTime:{number:oT},margin:{axis:{number:oT},item:{horizontal:{number:oT,undefined:"undefined"},vertical:{number:oT,undefined:"undefined"},__type__:{object:aT,number:oT}},__type__:{object:aT,number:oT}},max:{date:rT,number:oT,string:iT,moment:lT},maxHeight:{number:oT,string:iT},maxMinorChars:{number:oT},min:{date:rT,number:oT,string:iT,moment:lT},minHeight:{number:oT,string:iT},moveable:{boolean:nT},multiselect:{boolean:nT},multiselectPerGroup:{boolean:nT},onAdd:{function:"function"},onDropObjectOnItem:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},onInitialDrawComplete:{function:"function"},order:{function:"function"},orientation:{axis:{string:iT,undefined:"undefined"},item:{string:iT,undefined:"undefined"},__type__:{string:iT,object:aT}},selectable:{boolean:nT},sequentialSelection:{boolean:nT},showCurrentTime:{boolean:nT},showMajorLabels:{boolean:nT},showMinorLabels:{boolean:nT},showWeekScale:{boolean:nT},stack:{boolean:nT},stackSubgroups:{boolean:nT},cluster:{maxItems:{number:oT,undefined:"undefined"},titleTemplate:{string:iT,undefined:"undefined"},clusterCriteria:{function:"function",undefined:"undefined"},showStipes:{boolean:nT,undefined:"undefined"},fitOnDoubleClick:{boolean:nT,undefined:"undefined"},__type__:{boolean:nT,object:aT}},snap:{function:"function",null:"null"},start:{date:rT,number:oT,string:iT,moment:lT},template:{function:"function"},loadingScreenTemplate:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:iT,function:"function"},showTooltips:{boolean:nT},tooltip:{followMouse:{boolean:nT},overflowMethod:{string:["cap","flip","none"]},delay:{number:oT},template:{function:"function"},__type__:{object:aT}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:nT,object:aT}},timeAxis:{scale:{string:iT,undefined:"undefined"},step:{number:oT,undefined:"undefined"},__type__:{object:aT}},type:{string:iT},width:{string:iT,number:oT},preferZoom:{boolean:nT},zoomable:{boolean:nT},zoomKey:{string:["ctrlKey","altKey","shiftKey","metaKey",""]},zoomFriction:{number:oT},zoomMax:{number:oT},zoomMin:{number:oT},xss:{disabled:{boolean:nT},filterOptions:{__any__:{any:"any"},__type__:{object:aT}},__type__:{object:aT}},__type__:{object:aT}},dT={global:{align:["center","left","right"],alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],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",week:"w",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",week:"MMMM YYYY",month:"YYYY",year:""}},groupHeightMode:["auto","fixed","fitItems"],groupsDraggable:!1,height:"",locale:"",longSelectPressTime:251,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"]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:"",showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:"flip",delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","shiftKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}};var cT={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"};class uT{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;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=()=>{},this.closeCallback=()=>{},this._create()}insertTo(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}setCloseCallback(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}_isColorString(t){if("string"==typeof t)return cT[t]}setColor(t){let e,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var n=this._isColorString(t);if(void 0!==n&&(t=n),!0===DD.isString(t)){if(!0===DD.isValidRGB(t)){let i=t.substr(4).substr(0,t.length-5).split(",");e={r:i[0],g:i[1],b:i[2],a:1}}else if(!0===DD.isValidRGBA(t)){let i=t.substr(5).substr(0,t.length-6).split(",");e={r:i[0],g:i[1],b:i[2],a:i[3]}}else if(!0===DD.isValidHex(t)){let i=DD.hexToRGB(t);e={r:i.r,g:i.g,b:i.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){let i=void 0!==t.a?t.a:"1.0";e={r:t.r,g:t.g,b:t.b,a:i}}if(void 0===e)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: "+du(t));this._setColor(e,i)}}show(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=DD.extend({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",Fu(()=>{void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(t){!0===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=DD.extend({},t)),this.color=t;let e=DD.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,n=this.r*e.s,o=this.centerCoordinates.x+n*Math.sin(i*e.h),s=this.centerCoordinates.y+n*Math.cos(i*e.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(t)}_setOpacity(t){this.color.a=t/100,this._updatePicker(this.color)}_setBrightness(t){let e=DD.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;let i=DD.HSVToRGB(e.h,e.s,e.v);i.a=this.color.a,this.color=i,this._updatePicker()}_updatePicker(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=DD.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);let n=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;i.clearRect(0,0,n,o),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),Wu(i).call(i),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+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var t,e,i,n;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){let 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{let 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(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 o=this;this.opacityRange.onchange=function(){o._setOpacity(this.value)},this.opacityRange.oninput=function(){o._setOpacity(this.value)},this.brightnessRange.onchange=function(){o._setBrightness(this.value)},this.brightnessRange.oninput=function(){o._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=dl(t=this._hide).call(t,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=dl(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=dl(i=this._save).call(i,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=dl(n=this._loadLast).call(n,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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new kS(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),DS(this.hammer,t=>{this._moveSelector(t)}),this.hammer.on("tap",t=>{this._moveSelector(t)}),this.hammer.on("panstart",t=>{this._moveSelector(t)}),this.hammer.on("panmove",t=>{this._moveSelector(t)}),this.hammer.on("panend",t=>{this._moveSelector(t)})}_generateHueCircle(){if(!1===this.generated){let 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);let e,i,n,o,s=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,s,r),this.centerCoordinates={x:.5*s,y:.5*r},this.r=.49*s;let a,l=2*Math.PI/360,h=1/360,d=1/this.r;for(n=0;n<360;n++)for(o=0;o<this.r;o++)e=this.centerCoordinates.x+o*Math.sin(l*n),i=this.centerCoordinates.y+o*Math.cos(l*n),a=DD.HSVToRGB(n*h,o*d,1),t.fillStyle="rgb("+a.r+","+a.g+","+a.b+")",t.fillRect(e-.5,i-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,s,r)}this.generated=!0}_moveSelector(t){let e=this.colorPickerDiv.getBoundingClientRect(),i=t.center.x-e.left,n=t.center.y-e.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,r=i-s,a=n-o,l=Math.atan2(r,a),h=.98*Math.min(Math.sqrt(r*r+a*a),s),d=Math.cos(l)*h+o,c=Math.sin(l)*h+s;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";let u=l/(2*Math.PI);u=u<0?u+1:u;let p=h/this.r,m=DD.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=u,m.s=p;let f=DD.HSVToRGB(m.h,m.s,m.v);f.a=this.color.a,this.color=f,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+")"}}class pT{constructor(t,e,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;this.parent=t,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},DD.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new uT(n),this.wrapper=void 0}setOptions(t){if(void 0!==t){this.popupHistory={},this._removePopup();let e=!0;if("string"==typeof t)this.options.filter=t;else if(aa(t))this.options.filter=t.join();else if("object"==typeof t){if(null==t)throw new TypeError("options cannot be null");void 0!==t.container&&(this.options.container=t.container),void 0!==Pd(t)&&(this.options.filter=Pd(t)),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)}else"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0);!1===Pd(this.options)&&(e=!1),this.options.enabled=e}this._clean()}setModuleOptions(t){this.moduleOptions=t,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let t=Pd(this.options),e=0,i=!1;for(let n in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,n)&&(this.allowCreation=!1,i=!1,"function"==typeof t?(i=t(n,[]),i=i||this._handleObject(this.configureOptions[n],[n],!0)):!0!==t&&-1===kc(t).call(t,n)||(i=!0),!1!==i&&(this.allowCreation=!0,e>0&&this._makeItem([]),this._makeHeader(n),this._handleObject(this.configureOptions[n],[n])),e++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}_clean(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(t){let e=this.moduleOptions;for(let i=0;i<t.length;i++){if(void 0===e[t[i]]){e=void 0;break}e=e[t[i]]}return e}_makeItem(t){if(!0===this.allowCreation){let o=document.createElement("div");o.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return Cl(i).call(i,t=>{o.appendChild(t)}),this.domElements.push(o),this.domElements.length}return 0}_makeHeader(t){let e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=DD.xss(t),this._makeItem([],e)}_makeLabel(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement("div");return n.className="vis-configuration vis-config-label vis-config-s"+e.length,n.innerHTML=!0===i?DD.xss("<i><b>"+t+":</b></i>"):DD.xss(t+":"),n}_makeDropdown(t,e,i){let n=document.createElement("select");n.className="vis-configuration vis-config-select";let o=0;void 0!==e&&-1!==kc(t).call(t,e)&&(o=kc(t).call(t,e));for(let e=0;e<t.length;e++){let i=document.createElement("option");i.value=t[e],e===o&&(i.selected="selected"),i.innerHTML=t[e],n.appendChild(i)}let s=this;n.onchange=function(){s._update(this.value,i)};let r=this._makeLabel(i[i.length-1],i);this._makeItem(i,r,n)}_makeRange(t,e,i){let n=t[0],o=t[1],s=t[2],r=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=o,a.max=s}catch(t){}a.step=r;let l="",h=0;if(void 0!==e){let t=1.2;e<0&&e*t<o?(a.min=Math.ceil(e*t),h=a.min,l="range increased"):e/t<o&&(a.min=Math.ceil(e/t),h=a.min,l="range increased"),e*t>s&&1!==s&&(a.max=Math.ceil(e*t),h=a.max,l="range increased"),a.value=e}else a.value=n;let d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=Number(a.value);var c=this;a.onchange=function(){d.value=this.value,c._update(Number(this.value),i)},a.oninput=function(){d.value=this.value};let u=this._makeLabel(i[i.length-1],i),p=this._makeItem(i,u,a,d);""!==l&&this.popupHistory[p]!==h&&(this.popupHistory[p]=h,this._setupPopup(l,p))}_makeButton(){if(!0===this.options.showButton){let t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerHTML="generate options",t.onclick=()=>{this._printOptions()},t.onmouseover=()=>{t.className="vis-configuration vis-config-button hover"},t.onmouseout=()=>{t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}_setupPopup(t,e){if(!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit){let i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerHTML=DD.xss(t),i.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}_removePopup(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(void 0!==this.popupDiv.html){let t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Fu(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Fu(()=>{this._removePopup()},1800)}}_makeCheckbox(t,e,i){var n=document.createElement("input");n.type="checkbox",n.className="vis-configuration vis-config-checkbox",n.checked=t,void 0!==e&&(n.checked=e,e!==t&&("object"==typeof t?e!==t.enabled&&this.changedOptions.push({path:i,value:e}):this.changedOptions.push({path:i,value:e})));let o=this;n.onchange=function(){o._update(this.checked,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeTextInput(t,e,i){var n=document.createElement("input");n.type="text",n.className="vis-configuration vis-config-text",n.value=e,e!==t&&this.changedOptions.push({path:i,value:e});let o=this;n.onchange=function(){o._update(this.value,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,n)}_makeColorField(t,e,i){let n=t[1],o=document.createElement("div");"none"!==(e=void 0===e?n:e)?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?n:e,o.onclick=()=>{this._showColorPicker(e,o,i)};let s=this._makeLabel(i[i.length-1],i);this._makeItem(i,s,o)}_showColorPicker(t,e,i){e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(t=>{let n="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=n,this._update(n,i)}),this.colorPicker.setCloseCallback(()=>{e.onclick=()=>{this._showColorPicker(t,e,i)}})}_handleObject(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=Pd(this.options),s=!1;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;n=!0;let a=t[r],l=DD.copyAndExtendArray(e,r);if("function"==typeof o&&(n=o(r,e),!1===n&&!aa(a)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,n=this._handleObject(a,l,!0),this.allowCreation=!1===i)),!1!==n){s=!0;let t=this._getValue(l);if(aa(a))this._handleArray(a,t,l);else if("string"==typeof a)this._makeTextInput(a,t,l);else if("boolean"==typeof a)this._makeCheckbox(a,t,l);else if(a instanceof Object){let t=!0;if(-1!==kc(e).call(e,"physics")&&this.moduleOptions.physics.solver!==r&&(t=!1),!0===t)if(void 0!==a.enabled){let t=DD.copyAndExtendArray(l,"enabled"),e=this._getValue(t);if(!0===e){let t=this._makeLabel(r,l,!0);this._makeItem(l,t),s=this._handleObject(a,l)||s}else this._makeCheckbox(a,e,l)}else{let t=this._makeLabel(r,l,!0);this._makeItem(l,t),s=this._handleObject(a,l)||s}}else console.error("dont know how to handle",a,r,l)}}return s}_handleArray(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)}))}_update(t,e){let 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)}_constructOptions(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i;t="false"!==(t="true"===t||t)&&t;for(let i=0;i<e.length;i++)"global"!==e[i]&&(void 0===n[e[i]]&&(n[e[i]]={}),i!==e.length-1?n=n[e[i]]:n[e[i]]=t);return i}_printOptions(){let t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+du(t,null,2)+"</pre>"}getOptions(){let t={};for(var e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}class mT extends XS{constructor(t,e,i,n){var o,s,r,a,l,h,d;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof mT))throw new SyntaxError("Constructor must be called with the new operator");if(!aa(i)&&!gD(i)&&i instanceof Object){const t=n;n=i,i=t}n&&n.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');const c=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:"bottom",item:"bottom"},moment:Rk},this.options=DD.deepExtend({},this.defaultOptions),n&&DD.setupXSSProtection(n.xss),this._create(t),!n||n&&void 0===n.rtl){let t;this.dom.root.style.visibility="hidden";let e=this.dom.root;for(;!t&&e;)t=window.getComputedStyle(e,null).direction,e=e.parentElement;this.options.rtl=t&&"rtl"==t.toLowerCase()}else this.options.rtl=n.rtl;n&&(n.rollingMode&&(this.options.rollingMode=n.rollingMode),n.onInitialDrawComplete&&(this.options.onInitialDrawComplete=n.onInitialDrawComplete),n.onTimeout&&(this.options.onTimeout=n.onTimeout),n.loadingScreenTemplate&&(this.options.loadingScreenTemplate=n.loadingScreenTemplate));const u=document.createElement("div");if(this.options.loadingScreenTemplate){var p;const t=dl(p=this.options.loadingScreenTemplate).call(p,this),e=t(this.dom.loadingScreen);e instanceof Object&&!(e instanceof Element)?t(u):e instanceof Element?(u.innerHTML="",u.appendChild(e)):null!=e&&(u.innerHTML=DD.xss(e))}function m(t,e){c.hasListeners(t)&&c.emit(t,c.getEventProperties(e))}this.dom.loadingScreen.appendChild(u),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:dl(o=this.on).call(o,this),off:dl(s=this.off).call(s,this),emit:dl(r=this.emit).call(r,this)},hiddenDates:[],util:{getScale:()=>c.timeAxis.step.scale,getStep:()=>c.timeAxis.step.step,toScreen:dl(a=c._toScreen).call(a,c),toGlobalScreen:dl(l=c._toGlobalScreen).call(l,c),toTime:dl(h=c._toTime).call(h,c),toGlobalTime:dl(d=c._toGlobalTime).call(d,c)}},this.range=new vS(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new CS(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new qS(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new $C(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.dom.root.onclick=t=>m("click",t),this.dom.root.ondblclick=t=>m("doubleClick",t),this.dom.root.oncontextmenu=t=>m("contextmenu",t),this.dom.root.onmouseover=t=>m("mouseOver",t),window.PointerEvent?(this.dom.root.onpointerdown=t=>m("mouseDown",t),this.dom.root.onpointermove=t=>m("mouseMove",t),this.dom.root.onpointerup=t=>m("mouseUp",t)):(this.dom.root.onmousemove=t=>m("mouseMove",t),this.dom.root.onmousedown=t=>m("mouseDown",t),this.dom.root.onmouseup=t=>m("mouseUp",t)),this.initialFitDone=!1,this.on("changed",()=>{if(null!=c.itemsData){if(!c.initialFitDone&&!c.options.rollingMode)if(c.initialFitDone=!0,null!=c.options.start||null!=c.options.end){if(null==c.options.start||null==c.options.end)var t=c.getItemRange();const e=null!=c.options.start?c.options.start:t.min,i=null!=c.options.end?c.options.end:t.max;c.setWindow(e,i,{animation:!1})}else c.fit({animation:!1});c.initialDrawDone||!c.initialRangeChangeDone&&(c.options.start||c.options.end)&&!c.options.rollingMode||(c.initialDrawDone=!0,c.itemSet.initialDrawDone=!0,c.dom.root.style.visibility="visible",c.dom.loadingScreen.parentNode.removeChild(c.dom.loadingScreen),c.options.onInitialDrawComplete&&Fu(()=>c.options.onInitialDrawComplete(),0))}}),this.on("destroyTimeline",()=>{c.destroy()}),n&&this.setOptions(n),this.body.emitter.on("fit",t=>{this._onFit(t),this.redraw()}),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}_createConfigurator(){return new pT(this,this.dom.container,dT)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(t){if(!0===eT.validate(t,hT)&&console.log("%cErrors have been found in the supplied options object.",tT),XS.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;const e=this.itemsData;if(e){const t=this.getSelection();this.setItems(null),this.setItems(e.rawDS),this.setSelection(t)}}}setItems(t){let e;this.itemsDone=!1,e=t?gD(t)?_D(t):_D(new Lk(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.itemSet&&this.itemSet.setItems(null!=e?e.rawDS:null)}setGroups(t){let e;const i=t=>!1!==t.visible;t?(aa(t)&&(t=new Lk(t)),e=new Nk(t,{filter:i})):e=null,null!=this.groupsData&&"function"==typeof this.groupsData.setData&&this.groupsData.setData(null),this.groupsData=e,this.itemSet.setGroups(e)}setData(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)}setSelection(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(t,e){if(!this.itemsData||null==t)return;const i=aa(t)?t:[t],n=this.itemsData.get(i);let o=null,s=null;if(Cl(n).call(n,t=>{const e=t.start.valueOf(),i="end"in t?t.end.valueOf():t.start.valueOf();(null===o||e<o)&&(o=e),(null===s||i>s)&&(s=i)}),null!==o&&null!==s){const t=this,n=this.itemSet.items[i[0]];let r=-1*this._getScrollTop(),a=null;const l=(e,i,o)=>{const s=vT(t,n);if(!1===s)return;if(a||(a=s),a.itemTop==s.itemTop&&!a.shouldScroll)return;a.itemTop!=s.itemTop&&s.shouldScroll&&(a=s,r=-1*t._getScrollTop());const l=r,h=a.scrollOffset,d=o?h:l+(h-l)*e;t._setScrollTop(-d),i||t._redraw()},h=()=>{const e=vT(t,n);e.shouldScroll&&e.itemTop!=a.itemTop&&(t._setScrollTop(-e.scrollOffset),t._redraw())},d=()=>{h(),Fu(h,100)},c=!e||void 0===e.zoom||e.zoom,u=(o+s)/2,p=c?1.1*(s-o):Math.max(this.range.end-this.range.start,1.1*(s-o)),m=!e||void 0===e.animation||e.animation;m||(a={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.stopRolling(),this.range.setRange(u-p/2,u+p/2,{animation:m},d,l)}}fit(t,e){const i=!t||void 0===t.animation||t.animation;let n;1===this.itemsData.length&&void 0===this.itemsData.get()[0].end?(n=this.getDataRange(),this.moveTo(n.min.valueOf(),{animation:i},e)):(n=this.getItemRange(),this.range.setRange(n.min,n.max,{animation:i},e))}getItemRange(){const t=this.getDataRange();let e=null!==t.min?t.min.valueOf():null,i=null!==t.max?t.max.valueOf():null,n=null,o=null;if(null!=e&&null!=i){let t=i-e;t<=0&&(t=10);const s=t/this.props.center.width,r={};let a=0;Cl(DD).call(DD,this.itemSet.items,(t,e)=>{if(t.groupShowing){const i=!0;r[e]=t.redraw(i),a=r[e].length}});if(a>0)for(let t=0;t<a;t++)Cl(DD).call(DD,r,e=>{e[t]()});if(Cl(DD).call(DD,this.itemSet.items,t=>{const r=fT(t),a=gT(t);let l,h;this.options.rtl?(l=r-(t.getWidthRight()+10)*s,h=a+(t.getWidthLeft()+10)*s):(l=r-(t.getWidthLeft()+10)*s,h=a+(t.getWidthRight()+10)*s),l<e&&(e=l,n=t),h>i&&(i=h,o=t)}),n&&o){const s=n.getWidthLeft()+10,r=o.getWidthRight()+10,a=this.props.center.width-s-r;a>0&&(this.options.rtl?(e=fT(n)-r*t/a,i=gT(o)+s*t/a):(e=fT(n)-s*t/a,i=gT(o)+r*t/a))}}return{min:null!=e?new Date(e):null,max:null!=i?new Date(i):null}}getDataRange(){let t=null,e=null;var i;this.itemsData&&Cl(i=this.itemsData).call(i,i=>{const n=DD.convert(i.start,"Date").valueOf(),o=DD.convert(null!=i.end?i.end:i.start,"Date").valueOf();(null===t||n<t)&&(t=n),(null===e||o>e)&&(e=o)});return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}}getEventProperties(t){const e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=this.dom.centerContainer.getBoundingClientRect(),o=this.options.rtl?n.right-e:e-n.left,s=i-n.top,r=this.itemSet.itemFromTarget(t),a=this.itemSet.groupFromTarget(t),l=US.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,m=DD.getTarget(t);let f=null;return null!=r?f="item":null!=l?f="custom-time":DD.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&DD.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":DD.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":DD.hasParent(m,this.currentTime.bar)?f="current-time":DD.hasParent(m,this.dom.center)&&(f="background"),{event:t,item:r?r.id:null,isCluster:!!r&&!!r.isCluster,items:r?r.items||[]:null,group:a?a.groupId:null,customTime:l?l.options.id:null,what:f,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:o,y:s,time:u,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(null==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())}_redraw(){XS.prototype._redraw.call(this)}_onFit(t){const{start:e,end:i,animation:n}=t;i?this.range.setRange(e,i,{animation:n}):this.moveTo(e.valueOf(),{animation:n})}}function fT(t){return DD.convert(t.data.start,"Date").valueOf()}function gT(t){const e=null!=t.data.end?t.data.end:t.data.start;return DD.convert(e,"Date").valueOf()}function vT(t,e){if(!e.parent)return!1;const i=t.options.rtl?t.props.rightContainer.height:t.props.leftContainer.height,n=t.props.center.height,o=e.parent;let s=o.top,r=!0;const a=t.timeAxis.options.orientation.axis,l=()=>"bottom"==a?o.height-e.top-e.height:e.top,h=-1*t._getScrollTop(),d=s+l(),c=e.height;return d<h?s+i<=s+l()+c&&(s+=l()-t.itemSet.options.margin.item.vertical):d+c>h+i?s+=l()+c-i+t.itemSet.options.margin.item.vertical:r=!1,s=Math.min(s,n-i),{shouldScroll:r,scrollOffset:s,itemTop:d}}class yT{constructor(t,e,i,n,o,s){let r=arguments.length>6&&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=o,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=n,this.formattingFunction=a,i||n){const t=this,e=e=>{const i=e-e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx]);return e%(t.magnitudefactor*t.minorSteps[t.minorStepIdx])>t.magnitudefactor*t.minorSteps[t.minorStepIdx]*.5?i+t.magnitudefactor*t.minorSteps[t.minorStepIdx]:i};i&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=e(this._start)),n&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=e(this._end)),this.determineScale()}}setCharHeight(t){this.majorCharHeight=t}setHeight(t){this.containerHeight=t}determineScale(){const t=this._end-this._start;this.scale=this.containerHeight/t;const 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);let n=0;i<0&&(n=i);let o=!1;for(let t=n;Math.abs(t)<=Math.abs(i);t++){this.magnitudefactor=Math.pow(10,t);for(let t=0;t<this.minorSteps.length;t++){if(this.magnitudefactor*this.minorSteps[t]>=e){o=!0,this.minorStepIdx=t;break}}if(!0===o)break}}is_major(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){const t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)}formatValue(t){let e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?"".concat(e):"string"==typeof e?e:t.toPrecision(5)}getLines(){const t=[],e=this.getStep(),i=(e-this._start%e)%e;for(let n=this._start+i;this._end-n>1e-5;n+=e)n!=this._start&&t.push({major:this.is_major(n),y:this.convertValue(n),val:this.formatValue(n)});return t}followScale(t){const e=this.minorStepIdx,i=this._start,n=this._end,o=this,s=()=>{o.magnitudefactor*=2},r=()=>{o.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e||s(),s()):(this.minorStepIdx=2,1==e||r(),r()));const a=t.convertValue(0),l=t.getStep()*t.scale;let h=!1,d=0;for(;!h&&d++<5;){this.scale=l/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);const e=this.containerHeight/this.scale;this._start=i,this._end=this._start+e;const o=this._end*this.scale,d=this.magnitudefactor*this.majorSteps[this.minorStepIdx],c=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){const t=a-o;this._end+=t/this.scale,this._start=this._end-e}else this.autoScaleStart?(this._start-=c/this.scale,this._end=this._start+e):(this._start+=d-c/this.scale,this._end=this._start+e);if(!this.autoScaleEnd&&this._end>n+1e-5)r(),h=!1;else{if(!this.autoScaleStart&&this._start<i-1e-5){if(!(this.zeroAlign&&i>=0)){r(),h=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e<n-i?(s(),h=!1):h=!0}}}convertValue(t){return this.containerHeight-(t-this._start)*this.scale}screenToValue(t){return(this.containerHeight-t)/this.scale+this._start}}class bT extends jD{constructor(t,e,i,n){super(),this.id=Dk(),this.body=t,this.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:t=>"".concat(YD(t.toPrecision(3))),title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:t=>"".concat(YD(t.toPrecision(3))),title:{text:void 0,style:void 0}}},this.linegraphOptions=n,this.linegraphSVG=i,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=DD.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(e),this.width=Number("".concat(this.options.width).replace("px","")),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),null==this.scale&&this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};const o=this;this.body.emitter.on("verticalDrag",()=>{o.dom.lineContainer.style.top="".concat(o.body.domProps.scrollTop,"px")})}addGroup(t,e){Object.prototype.hasOwnProperty.call(this.groups,t)||(this.groups[t]=e),this.amountOfGroups+=1}updateGroup(t,e){Object.prototype.hasOwnProperty.call(this.groups,t)||(this.amountOfGroups+=1),this.groups[t]=e}removeGroup(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&(delete this.groups[t],this.amountOfGroups-=1)}setOptions(t){if(t){let e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);const i=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"];DD.selectiveDeepExtend(i,this.options,t),this.minWidth=Number("".concat(this.options.width).replace("px","")),!0===e&&this.dom.frame&&(this.hide(),this.show())}}_create(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.dom.lineContainer.style.visibility="visible",this.dom.lineContainer.style.display="block",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)}_redrawGroupIcons(){let t;Mf(this.svgElements);const e=this.options.iconWidth;let i=11.5;t="left"===this.options.orientation?4:this.width-e-4;const n=Ea(this.groups);Mx(n).call(n,(t,e)=>t<e?-1:1);for(const o of n)!0!==this.groups[o].visible||void 0!==this.linegraphOptions.visibility[o]&&!0!==this.linegraphOptions.visibility[o]||(this.groups[o].getLegend(e,15,this.framework,t,i),i+=19);Of(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){!1===this.iconsRemoved&&(Mf(this.svgElements),Of(this.svgElements),this.iconsRemoved=!0)}show(){this.hidden=!1,this.dom.frame.parentNode||("left"===this.options.orientation?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer),this.dom.lineContainer.style.display="block"}hide(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display="none"}setRange(t,e){this.range.start=t,this.range.end=e}redraw(){let t=!1,e=0;this.dom.lineContainer.style.top="".concat(this.body.domProps.scrollTop,"px");for(const t in this.groups)Object.prototype.hasOwnProperty.call(this.groups,t)&&(!0!==this.groups[t].visible||void 0!==this.linegraphOptions.visibility[t]&&!0!==this.linegraphOptions.visibility[t]||e++);if(0===this.amountOfGroups||0===e)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace("px","")),this.dom.lineContainer.style.height="".concat(this.height,"px"),this.width=!0===this.options.visible?Number("".concat(this.options.width).replace("px","")):0;const e=this.props,i=this.dom.frame;i.className="vis-data-axis",this._calculateCharSize();const n=this.options.orientation,o=this.options.showMinorLabels,s=this.options.showMajorLabels,r=this.body.dom.backgroundHorizontal.offsetWidth;e.minorLabelHeight=o?e.minorCharHeight:0,e.majorLabelHeight=s?e.majorCharHeight:0,e.minorLineWidth=r-this.lineOffset-this.width+2*this.options.minorLinesOffset,e.minorLineHeight=1,e.majorLineWidth=r-this.lineOffset-this.width+2*this.options.majorLinesOffset,e.majorLineHeight=1,"left"===n?(i.style.top="0",i.style.left="0",i.style.bottom="",i.style.width="".concat(this.width,"px"),i.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(i.style.top="",i.style.bottom="0",i.style.left="0",i.style.width="".concat(this.width,"px"),i.style.height="".concat(this.height,"px"),this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),t=this._redrawLabels(),t=this._isResized()||t,!0===this.options.icons?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(n)}return t}_redrawLabels(){let t=!1;Mf(this.DOMelements.lines),Mf(this.DOMelements.labels);const e=this.options.orientation,i=null!=this.options[e].range?this.options[e].range:{};let n=!0;null!=i.max&&(this.range.end=i.max,n=!1);let o=!0;null!=i.min&&(this.range.start=i.min,o=!1),this.scale=new yT(this.range.start,this.range.end,o,n,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[e].format),!1===this.master&&null!=this.masterAxis?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display="none"):this.dom.lineContainer.style.display="block",this.maxLabelSize=0;const s=this.scale.getLines();Cl(s).call(s,t=>{const i=t.y,n=t.major;this.options.showMinorLabels&&!1===n&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-minor",this.props.minorCharHeight),n&&i>=0&&this._redrawLabel(i-2,t.val,e,"vis-y-axis vis-major",this.props.majorCharHeight),!0===this.master&&(n?this._redrawLine(i,e,"vis-grid vis-horizontal vis-major",this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(i,e,"vis-grid vis-horizontal vis-minor",this.options.minorLinesOffset,this.props.minorLineWidth))});let r=0;void 0!==this.options[e].title&&void 0!==this.options[e].title.text&&(r=this.props.titleCharHeight);const a=!0===this.options.icons?Math.max(this.options.iconWidth,r)+this.options.labelOffsetX+15:r+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-a&&!0===this.options.visible?(this.width=this.maxLabelSize+a,this.options.width="".concat(this.width,"px"),Of(this.DOMelements.lines),Of(this.DOMelements.labels),this.redraw(),t=!0):this.maxLabelSize<this.width-a&&!0===this.options.visible&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+a),this.options.width="".concat(this.width,"px"),Of(this.DOMelements.lines),Of(this.DOMelements.labels),this.redraw(),t=!0):(Of(this.DOMelements.lines),Of(this.DOMelements.labels),t=!1),t}convertValue(t){return this.scale.convertValue(t)}screenToValue(t){return this.scale.screenToValue(t)}_redrawLabel(t,e,i,n,o){const s=If("div",this.DOMelements.labels,this.dom.frame);s.className=n,s.innerHTML=DD.xss(e),"left"===i?(s.style.left="-".concat(this.options.labelOffsetX,"px"),s.style.textAlign="right"):(s.style.right="-".concat(this.options.labelOffsetX,"px"),s.style.textAlign="left"),s.style.top="".concat(t-.5*o+this.options.labelOffsetY,"px"),e+="";const r=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*r&&(this.maxLabelSize=e.length*r)}_redrawLine(t,e,i,n,o){if(!0===this.master){const s=If("div",this.DOMelements.lines,this.dom.lineContainer);s.className=i,s.innerHTML="","left"===e?s.style.left="".concat(this.width-n,"px"):s.style.right="".concat(this.width-n,"px"),s.style.width="".concat(o,"px"),s.style.top="".concat(t,"px")}}_redrawTitle(t){if(Mf(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){const e=If("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-".concat(t),e.innerHTML=DD.xss(this.options[t].title.text),void 0!==this.options[t].title.style&&DD.addCssText(e,this.options[t].title.style),"left"===t?e.style.left="".concat(this.props.titleCharHeight,"px"):e.style.right="".concat(this.props.titleCharHeight,"px"),e.style.width="".concat(this.height,"px")}Of(this.DOMelements.title)}_calculateCharSize(){if(!("minorCharHeight"in this.props)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-minor vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.minorCharHeight=e.clientHeight,this.props.minorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("majorCharHeight"in this.props)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-major vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.majorCharHeight=e.clientHeight,this.props.majorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("titleCharHeight"in this.props)){const t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-title vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.titleCharHeight=e.clientHeight,this.props.titleCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}}}function _T(){}function wT(t,e){return{style:(e=void 0===e?{}:e).style||t.options.drawPoints.style,styles:e.styles||t.options.drawPoints.styles,size:e.size||t.options.drawPoints.size,className:e.className||t.className}}function xT(){}function kT(){}function DT(t,e,i,n){this.id=e;this.options=DD.selectiveBridgeObject(["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"],i),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=n,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible||t.visible}function ST(t,e,i,n){this.body=t,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}},this.side=i,this.options=DD.extend({},this.defaultOptions),this.linegraphOptions=n,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(e)}_T.draw=function(t,e,i,n){n=n||0;for(var o=function(t,e){var i=void 0;t.options&&t.options.drawPoints&&t.options.drawPoints.onRender&&"function"==typeof t.options.drawPoints.onRender&&(i=t.options.drawPoints.onRender);e.group.options&&e.group.options.drawPoints&&e.group.options.drawPoints.onRender&&"function"==typeof e.group.options.drawPoints.onRender&&(i=e.group.options.drawPoints.onRender);return i}(i,e),s=0;s<t.length;s++)if(o){var r=o(t[s],e);!0!==r&&"object"!=typeof r||Lf(t[s].screen_x+n,t[s].screen_y,wT(e,r),i.svgElements,i.svg,t[s].label)}else Lf(t[s].screen_x+n,t[s].screen_y,wT(e),i.svgElements,i.svg,t[s].label)},_T.drawIcon=function(t,e,i,n,o,s){var r=.5*o,a=Pf("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline"),Lf(e+.5*n,i,wT(t),s.svgElements,s.svg)},xT.drawIcon=function(t,e,i,n,o,s){var r=.5*o,a=Pf("rect",s.svgElements,s.svg);a.setAttributeNS(null,"x",e),a.setAttributeNS(null,"y",i-r),a.setAttributeNS(null,"width",n),a.setAttributeNS(null,"height",2*r),a.setAttributeNS(null,"class","vis-outline");var l=Math.round(.3*n),h=t.options.barChart.width/l,d=Math.round(.4*o),c=Math.round(.75*o),u=Math.round((n-2*l)/3);if(Nf(e+.5*l+u,i+r-d-1,l,d,t.className+" vis-bar",s.svgElements,s.svg,t.style),Nf(e+1.5*l+u+2,i+r-c-1,l,c,t.className+" vis-bar",s.svgElements,s.svg,t.style),1==t.options.drawPoints.enabled){var p={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/h,className:t.className};Lf(e+.5*l+u,i+r-d-1,p,s.svgElements,s.svg),Lf(e+1.5*l+u+2,i+r-c-1,p,s.svgElements,s.svg)}},xT.draw=function(t,e,i){var n,o,s,r,a,l,h=[],d={},c=0;for(a=0;a<t.length;a++)if("bar"===(r=i.groups[t[a]]).options.style&&!0===r.visible&&(void 0===i.options.groups.visibility[t[a]]||!0===i.options.groups.visibility[t[a]]))for(l=0;l<e[t[a]].length;l++)h.push({screen_x:e[t[a]][l].screen_x,screen_end:e[t[a]][l].screen_end,screen_y:e[t[a]][l].screen_y,x:e[t[a]][l].x,end:e[t[a]][l].end,y:e[t[a]][l].y,groupId:t[a],label:e[t[a]][l].label}),c+=1;if(0!==c)for(Mx(h).call(h,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}),xT._getDataIntersections(d,h),a=0;a<h.length;a++){var u=null!=(r=i.groups[h[a].groupId]).options.barChart.minWidth?r.options.barChart.minWidth:.1*r.options.barChart.width,p=0;if(void 0===d[o=h[a].screen_x])a+1<h.length&&(n=Math.abs(h[a+1].screen_x-o)),s=xT._getSafeDrawData(n,r,u);else{var m=a+(d[o].amount-d[o].resolved);m<h.length&&(n=Math.abs(h[m].screen_x-o)),s=xT._getSafeDrawData(n,r,u),d[o].resolved+=1,!0===r.options.stack&&!0!==r.options.excludeFromStacking?h[a].screen_y<r.zeroPosition?(p=d[o].accumulatedNegative,d[o].accumulatedNegative+=r.zeroPosition-h[a].screen_y):(p=d[o].accumulatedPositive,d[o].accumulatedPositive+=r.zeroPosition-h[a].screen_y):!0===r.options.barChart.sideBySide&&(s.width=s.width/d[o].amount,s.offset+=d[o].resolved*s.width-.5*s.width*(d[o].amount+1))}let t=s.width,e=h[a].screen_x;if(null!=h[a].screen_end?(t=h[a].screen_end-h[a].screen_x,e+=.5*t):e+=s.offset,Nf(e,h[a].screen_y-p,t,r.zeroPosition-h[a].screen_y,r.className+" vis-bar",i.svgElements,i.svg,r.style),!0===r.options.drawPoints.enabled){let t={screen_x:h[a].screen_x,screen_y:h[a].screen_y-p,x:h[a].x,y:h[a].y,groupId:h[a].groupId,label:h[a].label};_T.draw([t],r,i,s.offset)}}},xT._getDataIntersections=function(t,e){for(var i,n=0;n<e.length;n++)n+1<e.length&&(i=Math.abs(e[n+1].screen_x-e[n].screen_x)),n>0&&(i=Math.min(i,Math.abs(e[n-1].screen_x-e[n].screen_x))),0===i&&(void 0===t[e[n].screen_x]&&(t[e[n].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[n].screen_x].amount+=1)},xT._getSafeDrawData=function(t,e,i){var n,o;return t<e.options.barChart.width&&t>0?(n=t<i?i:t,o=0,"left"===e.options.barChart.align?o-=.5*t:"right"===e.options.barChart.align&&(o+=.5*t)):(n=e.options.barChart.width,o=0,"left"===e.options.barChart.align?o-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(o+=.5*e.options.barChart.width)),{width:n,offset:o}},xT.getStackedYRange=function(t,e,i,n,o){if(t.length>0){Mx(t).call(t,function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x});var s={};xT._getDataIntersections(s,t),e[n]=xT._getStackedYRange(s,t),e[n].yAxisOrientation=o,i.push(n)}},xT._getStackedYRange=function(t,e){for(var i,n=e[0].screen_y,o=e[0].screen_y,s=0;s<e.length;s++)void 0===t[i=e[s].screen_x]?(n=n>e[s].screen_y?e[s].screen_y:n,o=o<e[s].screen_y?e[s].screen_y:o):e[s].screen_y<0?t[i].accumulatedNegative+=e[s].screen_y:t[i].accumulatedPositive+=e[s].screen_y;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n=(n=n>t[r].accumulatedNegative?t[r].accumulatedNegative:n)>t[r].accumulatedPositive?t[r].accumulatedPositive:n,o=(o=o<t[r].accumulatedNegative?t[r].accumulatedNegative:o)<t[r].accumulatedPositive?t[r].accumulatedPositive:o);return{min:n,max:o}},kT.calcPath=function(t,e){if(null!=t&&t.length>0){return 1==e.options.interpolation.enabled?kT._catmullRom(t,e):kT._linear(t)}},kT.drawIcon=function(t,e,i,n,o,s){var r,a,l=.5*o,h=Pf("rect",s.svgElements,s.svg);(h.setAttributeNS(null,"x",e),h.setAttributeNS(null,"y",i-l),h.setAttributeNS(null,"width",n),h.setAttributeNS(null,"height",2*l),h.setAttributeNS(null,"class","vis-outline"),(r=Pf("path",s.svgElements,s.svg)).setAttributeNS(null,"class",t.className),void 0!==t.style&&r.setAttributeNS(null,"style",t.style),r.setAttributeNS(null,"d","M"+e+","+i+" L"+(e+n)+","+i),1==t.options.shaded.enabled&&(a=Pf("path",s.svgElements,s.svg),"top"==t.options.shaded.orientation?a.setAttributeNS(null,"d","M"+e+", "+(i-l)+"L"+e+","+i+" L"+(e+n)+","+i+" L"+(e+n)+","+(i-l)):a.setAttributeNS(null,"d","M"+e+","+i+" L"+e+","+(i+l)+" L"+(e+n)+","+(i+l)+"L"+(e+n)+","+i),a.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&a.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled)&&Lf(e+.5*n,i,{style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className},s.svgElements,s.svg)},kT.drawShading=function(t,e,i,n){if(1==e.options.shaded.enabled){var o,s=Number(n.svg.style.height.replace("px","")),r=Pf("path",n.svgElements,n.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var l=0;l="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?s:Math.min(Math.max(0,e.zeroPosition),s),o="group"==e.options.shaded.orientation&&null!=i&&null!=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"+l+" 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",o)}},kT.draw=function(t,e,i){if(null!=t&&null!=t){var n=Pf("path",i.svgElements,i.svg);n.setAttributeNS(null,"class",e.className),void 0!==e.style&&n.setAttributeNS(null,"style",e.style);var o="L";1==e.options.interpolation.enabled&&(o="C"),n.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,o,!1))}},kT.serializePath=function(t,e,i){if(t.length<2)return"";var n,o=e;if(i)for(n=t.length-2;n>0;n--)o+=t[n][0]+","+t[n][1]+" ";else for(n=1;n<t.length;n++)o+=t[n][0]+","+t[n][1]+" ";return o},kT._catmullRomUniform=function(t){var e,i,n,o,s,r,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var l=1/6,h=t.length,d=0;d<h-1;d++)e=0==d?t[0]:t[d-1],i=t[d],n=t[d+1],o=d+2<h?t[d+2]:n,s={screen_x:(-e.screen_x+6*i.screen_x+n.screen_x)*l,screen_y:(-e.screen_y+6*i.screen_y+n.screen_y)*l},r={screen_x:(i.screen_x+6*n.screen_x-o.screen_x)*l,screen_y:(i.screen_y+6*n.screen_y-o.screen_y)*l},a.push([s.screen_x,s.screen_y]),a.push([r.screen_x,r.screen_y]),a.push([n.screen_x,n.screen_y]);return a},kT._catmullRom=function(t,e){var i=e.options.interpolation.alpha;if(0==i||void 0===i)return this._catmullRomUniform(t);var n,o,s,r,a,l,h,d,c,u,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 k=t.length,D=0;D<k-1;D++)n=0==D?t[0]:t[D-1],o=t[D],s=t[D+1],r=D+2<k?t[D+2]:s,h=Math.sqrt(Math.pow(n.screen_x-o.screen_x,2)+Math.pow(n.screen_y-o.screen_y,2)),d=Math.sqrt(Math.pow(o.screen_x-s.screen_x,2)+Math.pow(o.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)),g=Math.pow(c,i),y=Math.pow(c,2*i),v=Math.pow(d,i),b=Math.pow(d,2*i),w=Math.pow(h,i),u=2*(_=Math.pow(h,2*i))+3*w*v+b,p=2*y+3*g*v+b,(m=3*w*(w+v))>0&&(m=1/m),(f=3*g*(g+v))>0&&(f=1/f),a={screen_x:(-b*n.screen_x+u*o.screen_x+_*s.screen_x)*m,screen_y:(-b*n.screen_y+u*o.screen_y+_*s.screen_y)*m},l={screen_x:(y*o.screen_x+p*s.screen_x-b*r.screen_x)*f,screen_y:(y*o.screen_y+p*s.screen_y-b*r.screen_y)*f},0==a.screen_x&&0==a.screen_y&&(a=o),0==l.screen_x&&0==l.screen_y&&(l=s),x.push([a.screen_x,a.screen_y]),x.push([l.screen_x,l.screen_y]),x.push([s.screen_x,s.screen_y]);return x},kT._linear=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i].screen_x,t[i].screen_y]);return e},DT.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==Mx(this.options)&&DD.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},DT.prototype.getItems=function(){return this.itemsData},DT.prototype.setZeroPosition=function(t){this.zeroPosition=t},DT.prototype.setOptions=function(t){if(void 0!==t){DD.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),DD.mergeOptions(this.options,t,"interpolation"),DD.mergeOptions(this.options,t,"drawPoints"),DD.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==typeof 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))}},DT.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)},DT.prototype.getLegend=function(t,e,i,n,o){null!=i&&null!=i||(i={svg:document.createElementNS("http://www.w3.org/2000/svg","svg"),svgElements:{},options:this.options,groups:[this]});switch(null!=n&&null!=n||(n=0),null!=o&&null!=o||(o=.5*e),this.options.style){case"line":kT.drawIcon(this,n,o,t,e,i);break;case"points":case"point":_T.drawIcon(this,n,o,t,e,i);break;case"bar":xT.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},DT.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,n=0;n<t.length;n++)e=e>t[n].y?t[n].y:e,i=i<t[n].y?t[n].y:i;return{min:e,max:i,yAxisOrientation:this.options.yAxisOrientation}},ST.prototype=new jD,ST.prototype.clear=function(){this.groups={},this.amountOfGroups=0},ST.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(Object.prototype.hasOwnProperty.call(this.groups,t)||(this.groups[t]=e),this.amountOfGroups+=1)},ST.prototype.updateGroup=function(t,e){this.groups[t]=e},ST.prototype.removeGroup=function(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&(delete this.groups[t],this.amountOfGroups-=1)},ST.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-legend",this.dom.frame.style.position="absolute",this.dom.frame.style.top="10px",this.dom.frame.style.display="block",this.dom.textArea=document.createElement("div"),this.dom.textArea.className="vis-legend-text",this.dom.textArea.style.position="relative",this.dom.textArea.style.top="0px",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.width=this.options.iconSize+5+"px",this.svg.style.height="100%",this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},ST.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},ST.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},ST.prototype.setOptions=function(t){DD.selectiveDeepExtend(["enabled","orientation","icons","left","right"],this.options,t)},ST.prototype.redraw=function(){var t=0,e=Ea(this.groups);Mx(e).call(e,function(t,e){return t<e?-1:1});for(var i=0;i<e.length;i++){var n=e[i];1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||t++}if(0==this.options[this.side].visible||0==this.amountOfGroups||0==this.options.enabled||0==t)this.hide();else{if(this.show(),"top-left"==this.options[this.side].position||"bottom-left"==this.options[this.side].position?(this.dom.frame.style.left="4px",this.dom.frame.style.textAlign="left",this.dom.textArea.style.textAlign="left",this.dom.textArea.style.left=this.options.iconSize+15+"px",this.dom.textArea.style.right="",this.svg.style.left="0px",this.svg.style.right=""):(this.dom.frame.style.right="4px",this.dom.frame.style.textAlign="right",this.dom.textArea.style.textAlign="right",this.dom.textArea.style.right=this.options.iconSize+15+"px",this.dom.textArea.style.left="",this.svg.style.right="0px",this.svg.style.left=""),"top-left"==this.options[this.side].position||"top-right"==this.options[this.side].position)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.bottom="";else{var o=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+o+Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.top=""}0==this.options.icons?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px",this.dom.textArea.style.right="",this.dom.textArea.style.left="",this.svg.style.width="0px"):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+"px",this.drawLegendIcons());var s="";for(i=0;i<e.length;i++)n=e[i],1!=this.groups[n].visible||void 0!==this.linegraphOptions.visibility[n]&&1!=this.linegraphOptions.visibility[n]||(s+=this.groups[n].content+"<br />");this.dom.textArea.innerHTML=DD.xss(s),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},ST.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Ea(this.groups);Mx(t).call(t,function(t,e){return t<e?-1:1}),Ef(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,i=Number(e.replace("px","")),n=i,o=this.options.iconSize,s=.75*this.options.iconSize,r=i+.5*s+3;this.svg.style.width=o+5+i+"px";for(var a=0;a<t.length;a++){var l=t[a];1!=this.groups[l].visible||void 0!==this.linegraphOptions.visibility[l]&&1!=this.linegraphOptions.visibility[l]||(this.groups[l].getLegend(o,s,this.framework,n,r),r+=s+this.options.iconSpacing)}}};var CT="__ungrouped__";function TT(t,e){this.id=Dk(),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=DD.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){i._onAdd(e.items)},update:function(t,e){i._onUpdate(e.items)},remove:function(t,e){i._onRemove(e.items)}},this.groupListeners={add:function(t,e){i._onAddGroups(e.items)},update:function(t,e){i._onUpdateGroups(e.items)},remove:function(t,e){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.svg.style.left=DD.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}}TT.prototype=new jD,TT.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 bT(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new bT(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new ST(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new ST(this.body,this.options.legend,"right",this.options.groups),this.show()},TT.prototype.setOptions=function(t){if(t){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&&cc((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),DD.selectiveDeepExtend(["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"],this.options,t),DD.mergeOptions(this.options,t,"interpolation"),DD.mergeOptions(this.options,t,"drawPoints"),DD.mergeOptions(this.options,t,"shaded"),DD.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==typeof 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)),this.yAxisLeft&&void 0!==t.dataAxis&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&void 0!==t.legend&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),Object.prototype.hasOwnProperty.call(this.groups,CT)&&this.groups[CT].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},TT.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},TT.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},TT.prototype.setItems=function(t){var e,i=this,n=this.itemsData;if(t){if(!gD(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=_D(t)}else this.itemsData=null;if(n&&(Cl(DD).call(DD,this.itemListeners,function(t,e){n.off(e,t)}),n.dispose(),e=n.getIds(),this._onRemove(e)),this.itemsData){var o=this.id;Cl(DD).call(DD,this.itemListeners,function(t,e){i.itemsData.on(e,t,o)}),e=this.itemsData.getIds(),this._onAdd(e)}},TT.prototype.setGroups=function(t){var e,i=this;if(this.groupsData){Cl(DD).call(DD,this.groupListeners,function(t,e){i.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null;for(var n=0;n<e.length;n++)this._removeGroup(e[n])}if(t){if(!gD(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var o=this.id;Cl(DD).call(DD,this.groupListeners,function(t,e){i.groupsData.on(e,t,o)}),e=this.groupsData.getIds(),this._onAddGroups(e)}},TT.prototype._onUpdate=function(t){this._updateAllGroupData(t)},TT.prototype._onAdd=function(t){this._onUpdate(t)},TT.prototype._onRemove=function(t){this._onUpdate(t)},TT.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},TT.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},TT.prototype._onRemoveGroups=function(t){for(var e=0;e<t.length;e++)this._removeGroup(t[e]);this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})},TT.prototype._removeGroup=function(t){Object.prototype.hasOwnProperty.call(this.groups,t)&&("right"==this.groups[t].options.yAxisOrientation?(this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t),this.legendLeft.redraw()),delete this.groups[t])},TT.prototype._updateGroup=function(t,e){Object.prototype.hasOwnProperty.call(this.groups,e)?(this.groups[e].update(t),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.updateGroup(e,this.groups[e]),this.legendRight.updateGroup(e,this.groups[e]),this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e)):(this.yAxisLeft.updateGroup(e,this.groups[e]),this.legendLeft.updateGroup(e,this.groups[e]),this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e))):(this.groups[e]=new DT(t,e,this.options,this.groupsUsingDefaultStyles),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.addGroup(e,this.groups[e]),this.legendRight.addGroup(e,this.groups[e])):(this.yAxisLeft.addGroup(e,this.groups[e]),this.legendLeft.addGroup(e,this.groups[e]))),this.legendLeft.redraw(),this.legendRight.redraw()},TT.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var i={},n=this.itemsData.get(),o=this.itemsData.idProp,s={};t&&ba(t).call(t,function(t){s[t]=t});for(var r={},a=0;a<n.length;a++){var l=n[a],h=l.group;null==h&&(h=CT),Object.prototype.hasOwnProperty.call(r,h)?r[h]++:r[h]=1}var d={};if(!e&&t)for(h in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,h)){var c=(f=this.groups[h]).getItems();i[h]=Pd(c).call(c,function(t){return d[t[o]]=t[o],t[o]!==s[t[o]]});var u=r[h];r[h]-=i[h].length,i[h].length<u&&(i[h][u-1]={})}for(a=0;a<n.length;a++)if(null==(h=(l=n[a]).group)&&(h=CT),e||!t||l[o]===s[l[o]]||!Object.prototype.hasOwnProperty.call(d,l[o])){Object.prototype.hasOwnProperty.call(i,h)||(i[h]=new Array(r[h]));var p=DD.bridgeObject(l);p.x=DD.convert(l.x,"Date"),p.end=DD.convert(l.end,"Date"),p.orginalY=l.y,p.y=Number(l.y),p[o]=l[o];var m=i[h].length-r[h]--;i[h][m]=p}for(h in this.groups)Object.prototype.hasOwnProperty.call(this.groups,h)&&!Object.prototype.hasOwnProperty.call(i,h)&&(i[h]=new Array(0));for(h in i)if(Object.prototype.hasOwnProperty.call(i,h))if(0==i[h].length)Object.prototype.hasOwnProperty.call(this.groups,h)&&this._removeGroup(h);else{var f=void 0;null!=this.groupsData&&(f=this.groupsData.get(h)),null==f&&(f={id:h,content:this.options.defaultGroup+h}),this._updateGroup(f,h),this.groups[h].setItems(i[h])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},TT.prototype.redraw=function(){var t=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,t=this._isResized()||t;var e,i=this.body.range.end-this.body.range.start,n=i!=this.lastVisibleInterval;(this.lastVisibleInterval=i,1==t)&&(this.svg.style.width=DD.option.asSize(3*this.props.width),this.svg.style.left=DD.option.asSize(-this.props.width),-1==kc(e=this.options.height+"").call(e,"%")&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0));if(1==this.updateSVGheight?(this.options.graphHeight!=this.props.height+"px"&&(this.options.graphHeight=this.props.height+"px",this.svg.style.height=this.props.height+"px"),this.updateSVGheight=!1):this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",1==t||1==n||1==this.abortedGraphUpdate||1==this.forceGraphUpdate)t=this._updateGraph()||t,this.forceGraphUpdate=!1,this.lastStart=this.body.range.start,this.svg.style.left=-this.props.width+"px";else if(0!=this.lastStart){var o=this.body.range.start-this.lastStart,s=this.body.range.end-this.body.range.start;if(0!=this.props.width){var r=o*(this.props.width/s);this.svg.style.left=-this.props.width-r+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},TT.prototype._getSortedGroupIds=function(){var t=[];for(var e in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,e)){var i=this.groups[e];1!=i.visible||void 0!==this.options.groups.visibility[e]&&1!=this.options.groups.visibility[e]||t.push({id:e,zIndex:i.options.zIndex})}DD.insertSort(t,function(t,e){var i=t.zIndex,n=e.zIndex;return void 0===i&&(i=0),void 0===n&&(n=0),i==n?0:i<n?-1:1});for(var n=new Array(t.length),o=0;o<t.length;o++)n[o]=t[o].id;return n},TT.prototype._updateGraph=function(){if(Mf(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,i={},n=this.body.util.toGlobalTime(-this.body.domProps.root.width),o=this.body.util.toGlobalTime(2*this.body.domProps.root.width),s=this._getSortedGroupIds();if(s.length>0){var r={};for(this._getRelevantData(s,r,n,o),this._applySampling(s,r),e=0;e<s.length;e++)this._convertXcoordinates(r[s[e]]);if(this._getYRanges(s,r,i),1==this._updateYAxis(s,i))return Of(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var a=void 0;for(e=0;e<s.length;e++)t=this.groups[s[e]],!0===this.options.stack&&"line"===this.options.style&&(null!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(null!=a&&(this._stack(r[t.id],r[a.id]),1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation&&("top"==t.options.shaded.orientation&&"group"!==a.options.shaded.orientation?(a.options.shaded.orientation="group",a.options.shaded.groupId=t.id):(t.options.shaded.orientation="group",t.options.shaded.groupId=a.id))),a=t)),this._convertYcoordinates(r[s[e]],t);var l={};for(e=0;e<s.length;e++)if("line"===(t=this.groups[s[e]]).options.style&&1==t.options.shaded.enabled){var h=r[s[e]];if(null==h||0==h.length)continue;if(Object.prototype.hasOwnProperty.call(l,s[e])||(l[s[e]]=kT.calcPath(h,t)),"group"===t.options.shaded.orientation){var d=t.options.shaded.groupId;if(-1===kc(s).call(s,d)){console.log(t.id+": Unknown shading group target given:"+d);continue}Object.prototype.hasOwnProperty.call(l,d)||(l[d]=kT.calcPath(r[d],this.groups[d])),kT.drawShading(l[s[e]],t,l[d],this.framework)}else kT.drawShading(l[s[e]],t,void 0,this.framework)}for(xT.draw(s,r,this.framework),e=0;e<s.length;e++)if(t=this.groups[s[e]],r[s[e]].length>0)switch(t.options.style){case"line":Object.prototype.hasOwnProperty.call(l,s[e])||(l[s[e]]=kT.calcPath(r[s[e]],t)),kT.draw(l[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||_T.draw(r[s[e]],t,this.framework)}}}return Of(this.svgElements),!1},TT.prototype._stack=function(t,e){var i,n,o,s,r;i=0;for(var a=0;a<t.length;a++){s=void 0,r=void 0;for(var l=i;l<e.length;l++){if(e[l].x===t[a].x){s=e[l],r=e[l],i=l;break}if(e[l].x>t[a].x){r=e[l],s=0==l?r:e[l-1],i=l;break}}void 0===r&&(s=e[e.length-1],r=e[e.length-1]),n=r.x-s.x,o=r.y-s.y,t[a].y=0==n?t[a].orginalY+r.y:t[a].orginalY+o/n*(t[a].x-s.x)+s.y}},TT.prototype._getRelevantData=function(t,e,i,n){var o,s,r,a;if(t.length>0)for(s=0;s<t.length;s++){var l=(o=this.groups[t[s]]).getItems();if(1==Mx(o.options)){var h=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},d=Math.max(0,DD.binarySearchValue(l,i,"x","before",h)),c=Math.min(l.length,DD.binarySearchValue(l,n,"x","after",h)+1);c<=0&&(c=l.length);var u=new Array(c-d);for(r=d;r<c;r++)a=o.itemsData[r],u[r-d]=a;e[t[s]]=u}else e[t[s]]=o.itemsData}},TT.prototype._applySampling=function(t,e){if(t.length>0)for(var i=0;i<t.length;i++)if(1==this.groups[t[i]].options.sampling){var n=e[t[i]];if(n.length>0){var o,s=n.length,r=s/(this.body.util.toGlobalScreen(n[n.length-1].x)-this.body.util.toGlobalScreen(n[0].x));o=Math.min(Math.ceil(.2*s),Math.max(1,Math.round(r)));for(var a=new Array(s),l=0;l<s;l+=o){a[Math.round(l/o)]=n[l]}e[t[i]]=rh(a).call(a,0,Math.round(s/o))}}},TT.prototype._getYRanges=function(t,e,i){var n,o,s,r,a=[],l=[];if(t.length>0){for(s=0;s<t.length;s++)n=e[t[s]],r=this.groups[t[s]].options,n.length>0&&(o=this.groups[t[s]],!0===r.stack&&"bar"===r.style?"left"===r.yAxisOrientation?a=vd(a).call(a,n):l=vd(l).call(l,n):i[t[s]]=o.getYRange(n,t[s]));xT.getStackedYRange(a,i,t,"__barStackLeft","left"),xT.getStackedYRange(l,i,t,"__barStackRight","right")}},TT.prototype._updateYAxis=function(t,e){var i,n,o=!1,s=!1,r=!1,a=1e9,l=1e9,h=-1e9,d=-1e9;if(t.length>0){for(var c=0;c<t.length;c++){var u=this.groups[t[c]];u&&"right"!=u.options.yAxisOrientation?(s=!0,a=1e9,h=-1e9):u&&u.options.yAxisOrientation&&(r=!0,l=1e9,d=-1e9)}for(c=0;c<t.length;c++)Object.prototype.hasOwnProperty.call(e,t[c])&&!0!==e[t[c]].ignore&&(i=e[t[c]].min,n=e[t[c]].max,"right"!=e[t[c]].yAxisOrientation?(s=!0,a=a>i?i:a,h=h<n?n:h):(r=!0,l=l>i?i:l,d=d<n?n:d));1==s&&this.yAxisLeft.setRange(a,h),1==r&&this.yAxisRight.setRange(l,d)}o=this._toggleAxisVisiblity(s,this.yAxisLeft)||o,o=this._toggleAxisVisiblity(r,this.yAxisRight)||o,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?(this.yAxisLeft.lineOffset=1==r?this.yAxisRight.width:0,o=this.yAxisLeft.redraw()||o,o=this.yAxisRight.redraw()||o):o=this.yAxisRight.redraw()||o;var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"];for(c=0;c<p.length;c++)-1!=kc(t).call(t,p[c])&&rh(t).call(t,kc(t).call(t,p[c]),1);return o},TT.prototype._toggleAxisVisiblity=function(t,e){var i=!1;return 0==t?e.dom.frame.parentNode&&0==e.hidden&&(e.hide(),i=!0):e.dom.frame.parentNode||1!=e.hidden||(e.show(),i=!0),i},TT.prototype._convertXcoordinates=function(t){for(var e=this.body.util.toScreen,i=0;i<t.length;i++)t[i].screen_x=e(t[i].x)+this.props.width,t[i].screen_y=t[i].y,null!=t[i].end?t[i].screen_end=e(t[i].end)+this.props.width:t[i].screen_end=void 0},TT.prototype._convertYcoordinates=function(t,e){var i=this.yAxisLeft,n=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(i=this.yAxisRight);for(var o=0;o<t.length;o++)t[o].screen_y=Math.round(i.convertValue(t[o].y));e.setZeroPosition(Math.min(n,i.convertValue(0)))};let MT="string",OT="boolean",ET="number",PT="date",IT="object",LT="moment",NT={configure:{enabled:{boolean:OT},filter:{boolean:OT,function:"function"},container:{dom:"dom"},__type__:{object:IT,boolean:OT,function:"function"}},alignCurrentTime:{string:MT,undefined:"undefined"},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:MT},sort:{boolean:OT},sampling:{boolean:OT},stack:{boolean:OT},graphHeight:{string:MT,number:ET},shaded:{enabled:{boolean:OT},orientation:{string:["bottom","top","zero","group"]},groupId:{object:IT},__type__:{boolean:OT,object:IT}},style:{string:["line","bar","points"]},barChart:{width:{number:ET},minWidth:{number:ET},sideBySide:{boolean:OT},align:{string:["left","center","right"]},__type__:{object:IT}},interpolation:{enabled:{boolean:OT},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:ET},__type__:{object:IT,boolean:OT}},drawPoints:{enabled:{boolean:OT},onRender:{function:"function"},size:{number:ET},style:{string:["square","circle"]},__type__:{object:IT,boolean:OT,function:"function"}},dataAxis:{showMinorLabels:{boolean:OT},showMajorLabels:{boolean:OT},showWeekScale:{boolean:OT},icons:{boolean:OT},width:{string:MT,number:ET},visible:{boolean:OT},alignZeros:{boolean:OT},left:{range:{min:{number:ET,undefined:"undefined"},max:{number:ET,undefined:"undefined"},__type__:{object:IT}},format:{function:"function"},title:{text:{string:MT,number:ET,undefined:"undefined"},style:{string:MT,undefined:"undefined"},__type__:{object:IT}},__type__:{object:IT}},right:{range:{min:{number:ET,undefined:"undefined"},max:{number:ET,undefined:"undefined"},__type__:{object:IT}},format:{function:"function"},title:{text:{string:MT,number:ET,undefined:"undefined"},style:{string:MT,undefined:"undefined"},__type__:{object:IT}},__type__:{object:IT}},__type__:{object:IT}},legend:{enabled:{boolean:OT},icons:{boolean:OT},left:{visible:{boolean:OT},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:IT}},right:{visible:{boolean:OT},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:IT}},__type__:{object:IT,boolean:OT}},groups:{visibility:{any:"any"},__type__:{object:IT}},autoResize:{boolean:OT},throttleRedraw:{number:ET},clickToUse:{boolean:OT},end:{number:ET,date:PT,string:MT,moment:LT},format:{minorLabels:{millisecond:{string:MT,undefined:"undefined"},second:{string:MT,undefined:"undefined"},minute:{string:MT,undefined:"undefined"},hour:{string:MT,undefined:"undefined"},weekday:{string:MT,undefined:"undefined"},day:{string:MT,undefined:"undefined"},week:{string:MT,undefined:"undefined"},month:{string:MT,undefined:"undefined"},quarter:{string:MT,undefined:"undefined"},year:{string:MT,undefined:"undefined"},__type__:{object:IT}},majorLabels:{millisecond:{string:MT,undefined:"undefined"},second:{string:MT,undefined:"undefined"},minute:{string:MT,undefined:"undefined"},hour:{string:MT,undefined:"undefined"},weekday:{string:MT,undefined:"undefined"},day:{string:MT,undefined:"undefined"},week:{string:MT,undefined:"undefined"},month:{string:MT,undefined:"undefined"},quarter:{string:MT,undefined:"undefined"},year:{string:MT,undefined:"undefined"},__type__:{object:IT}},__type__:{object:IT}},moment:{function:"function"},height:{string:MT,number:ET},hiddenDates:{start:{date:PT,number:ET,string:MT,moment:LT},end:{date:PT,number:ET,string:MT,moment:LT},repeat:{string:MT},__type__:{object:IT,array:"array"}},locale:{string:MT},locales:{__any__:{any:"any"},__type__:{object:IT}},max:{date:PT,number:ET,string:MT,moment:LT},maxHeight:{number:ET,string:MT},maxMinorChars:{number:ET},min:{date:PT,number:ET,string:MT,moment:LT},minHeight:{number:ET,string:MT},moveable:{boolean:OT},multiselect:{boolean:OT},orientation:{string:MT},showCurrentTime:{boolean:OT},showMajorLabels:{boolean:OT},showMinorLabels:{boolean:OT},showWeekScale:{boolean:OT},snap:{function:"function",null:"null"},start:{date:PT,number:ET,string:MT,moment:LT},timeAxis:{scale:{string:MT,undefined:"undefined"},step:{number:ET,undefined:"undefined"},__type__:{object:IT}},width:{string:MT,number:ET},zoomable:{boolean:OT},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:ET},zoomMin:{number:ET},zIndex:{number:ET},__type__:{object:IT}},AT={global:{alignCurrentTime:["none","year","month","quarter","week","isoWeek","day","date","hour","minute","second"],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:["zero","top","bottom","group"]},style:["line","bar","points"],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:["left","center","right"]},interpolation:{enabled:!0,parametrization:["centripetal","chordal","uniform"]},drawPoints:{enabled:!0,size:[6,2,30,1],style:["square","circle"]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:"",style:""}},right:{title:{text:"",style:""}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]},right:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]}},autoResize:!0,clickToUse:!1,end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",week:"w",month:"MMM",quarter:"[Q]Q",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",week:"MMMM YYYY",month:"YYYY",quarter:"YYYY",year:""}},height:"",locale:"",max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!0,orientation:["both","bottom","top"],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:"",width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function FT(t,e,i,n){var o,s,r,a,l,h,d;if(!aa(i)&&!gD(i)&&i instanceof Object){var c=n;n=i,i=c}n&&n.throttleRedraw&&console.warn('Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var u=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:Rk,width:null,height:null,maxHeight:null,minHeight:null},this.options=DD.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:dl(o=this.on).call(o,this),off:dl(s=this.off).call(s,this),emit:dl(r=this.emit).call(r,this)},hiddenDates:[],util:{getScale:()=>u.timeAxis.step.scale,getStep:()=>u.timeAxis.step.step,toScreen:dl(a=u._toScreen).call(a,u),toGlobalScreen:dl(l=u._toGlobalScreen).call(l,u),toTime:dl(h=u._toTime).call(h,u),toGlobalTime:dl(d=u._toGlobalTime).call(d,u)}},this.range=new vS(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new CS(this.body),this.components.push(this.timeAxis),this.currentTime=new qS(this.body),this.components.push(this.currentTime),this.linegraph=new TT(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){u.emit("click",u.getEventProperties(t))}),this.on("doubletap",function(t){u.emit("doubleClick",u.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){u.emit("contextmenu",u.getEventProperties(t))},this.initialFitDone=!1,this.on("changed",function(){if(null!=u.itemsData){if(!u.initialFitDone&&!u.options.rollingMode)if(u.initialFitDone=!0,null!=u.options.start||null!=u.options.end){if(null==u.options.start||null==u.options.end)var t=u.getItemRange();var e=null!=u.options.start?u.options.start:t.min,i=null!=u.options.end?u.options.end:t.max;u.setWindow(e,i,{animation:!1})}else u.fit({animation:!1});u.initialDrawDone||!u.initialRangeChangeDone&&(u.options.start||u.options.end)&&!u.options.rollingMode||(u.initialDrawDone=!0,u.dom.root.style.visibility="visible",u.dom.loadingScreen.parentNode.removeChild(u.dom.loadingScreen),u.options.onInitialDrawComplete&&Fu(()=>u.options.onInitialDrawComplete(),0))}}),n&&this.setOptions(n),i&&this.setGroups(i),e&&this.setItems(e),this._redraw()}FT.prototype=new XS,FT.prototype.setOptions=function(t){!0===eT.validate(t,NT)&&console.log("%cErrors have been found in the supplied options object.",tT),XS.prototype.setOptions.call(this,t)},FT.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?gD(t)?_D(t):_D(new Lk(t)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=e,this.linegraph&&this.linegraph.setItems(null!=e?e.rawDS:null),i)if(null!=this.options.start||null!=this.options.end){var n=null!=this.options.start?this.options.start:null,o=null!=this.options.end?this.options.end:null;this.setWindow(n,o,{animation:!1})}else this.fit({animation:!1})},FT.prototype.setGroups=function(t){var e;e=t?gD(t)?t:new Lk(t):null,this.groupsData=e,this.linegraph.setGroups(e)},FT.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+"'"},FT.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]))},FT.prototype.getDataRange=function(){var t=null,e=null;for(var i in this.linegraph.groups)if(Object.prototype.hasOwnProperty.call(this.linegraph.groups,i)&&!0===this.linegraph.groups[i].visible)for(var n=0;n<this.linegraph.groups[i].itemsData.length;n++){var o=this.linegraph.groups[i].itemsData[n],s=DD.convert(o.x,"Date").valueOf();t=null==t||t>s?s:t,e=null==e||e<s?s:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},FT.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,i=t.center?t.center.y:t.clientY,n=e-DD.getAbsoluteLeft(this.dom.centerContainer),o=i-DD.getAbsoluteTop(this.dom.centerContainer),s=this._toTime(n),r=US.customTimeFromTarget(t),a=DD.getTarget(t),l=null;DD.hasParent(a,this.timeAxis.dom.foreground)||this.timeAxis2&&DD.hasParent(a,this.timeAxis2.dom.foreground)?l="axis":DD.hasParent(a,this.linegraph.yAxisLeft.dom.frame)||DD.hasParent(a,this.linegraph.yAxisRight.dom.frame)?l="data-axis":DD.hasParent(a,this.linegraph.legendLeft.dom.frame)||DD.hasParent(a,this.linegraph.legendRight.dom.frame)?l="legend":null!=r?l="custom-time":DD.hasParent(a,this.currentTime.bar)?l="current-time":DD.hasParent(a,this.dom.center)&&(l="background");var h=[],d=this.linegraph.yAxisLeft,c=this.linegraph.yAxisRight;return!d.hidden&&this.itemsData.length>0&&h.push(d.screenToValue(o)),!c.hidden&&this.itemsData.length>0&&h.push(c.screenToValue(o)),{event:t,customTime:r?r.options.id:null,what:l,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:n,y:o,time:s,value:h}},FT.prototype._createConfigurator=function(){return new pT(this,this.dom.container,AT)};const RT=Af();Rk.locale(RT);const YT={Core:XS,DateUtil:gS,Range:vS,stack:xC,TimeStep:SS,components:{items:{Item:CC,BackgroundItem:EC,BoxItem:TC,ClusterItem:UC,PointItem:MC,RangeItem:OC},BackgroundGroup:SC,Component:jD,CurrentTime:qS,CustomTime:US,DataAxis:bT,DataScale:yT,GraphGroup:DT,Group:DC,ItemSet:$C,Legend:ST,LineGraph:TT,TimeAxis:CS}};t.DOMutil=Gf,t.DataSet=Lk,t.DataView=Nk,t.Graph2d=FT,t.Hammer=kS,t.Queue=Ek,t.Timeline=mT,t.keycharm=MS,t.moment=Rk,t.timeline=YT,t.util=Tf});
//# sourceMappingURL=vis-timeline-graph2d.min.cjs.map
