From 1f854428b0092d8da6cff8728f927b15ac69cd6d Mon Sep 17 00:00:00 2001 From: Edwin Voskamp Date: Tue, 14 Jul 2026 11:04:53 -0700 Subject: [PATCH 1/4] Vendor vis-timeline locally instead of loading from unpkg CDN The interactive timeline loaded vis-timeline's JS and CSS from the unpkg.com CDN at runtime, unpinned and without Subresource Integrity. For a tool that renders private Claude Code logs offline, this was the only network egress in the generated output: opening a transcript and clicking Timeline revealed the viewer's IP to a third party and pulled arbitrary, unpinned remote code into a file:// page with local-file access. Vendor vis-timeline 8.5.1 (JS + CSS) into html/assets/vendor with a PROVENANCE.md recording the source URLs, version, and SHA-256 checksums. When rendering into a real output directory, the HTML renderer copies the assets once into a sibling assets/ directory (idempotent, mirroring referenced-image mode) and points the timeline at the relative path. The lazy load-on-click behaviour and the onerror fallback are preserved; string-only renders with no output directory simply get no sidecar. Snapshots updated for the template's CDN-URL -> relative-path change. References: #278 Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Q2uhgREMMmpYR6AMH65whA --- .../html/assets/vendor/PROVENANCE.md | 35 ++++++++ .../vendor/vis-timeline-graph2d.min.css | 2 + .../assets/vendor/vis-timeline-graph2d.min.js | 50 +++++++++++ claude_code_log/html/renderer.py | 14 ++++ .../html/templates/components/timeline.html | 13 ++- claude_code_log/html/utils.py | 43 ++++++++++ test/__snapshots__/test_snapshot_html.ambr | 84 ++++++++++++++----- 7 files changed, 217 insertions(+), 24 deletions(-) create mode 100644 claude_code_log/html/assets/vendor/PROVENANCE.md create mode 100644 claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.css create mode 100644 claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.js diff --git a/claude_code_log/html/assets/vendor/PROVENANCE.md b/claude_code_log/html/assets/vendor/PROVENANCE.md new file mode 100644 index 00000000..56eadd8e --- /dev/null +++ b/claude_code_log/html/assets/vendor/PROVENANCE.md @@ -0,0 +1,35 @@ +# Vendored third-party assets + +These files are vendored (checked in) rather than loaded from a CDN so the +generated HTML works fully offline and does not leak a request to a third +party when a user opens a transcript rendered from their private logs +(issue #278). + +## vis-timeline + +- **Package:** `vis-timeline` (vis-timeline and vis-graph2d) +- **Version:** 8.5.1 +- **Homepage:** https://visjs.github.io/vis-timeline/ +- **License:** MIT / Apache-2.0 (dual) — see the upstream project. +- **Source URLs (unpkg, pinned):** + - `https://unpkg.com/vis-timeline@8.5.1/standalone/umd/vis-timeline-graph2d.min.js` + - `https://unpkg.com/vis-timeline@8.5.1/styles/vis-timeline-graph2d.min.css` + +### SHA-256 checksums + +``` +484c8f44cb2be213922ca9537022e9a87eb85d5981a2064e369da91bd2150298 vis-timeline-graph2d.min.js +67273f3f1bfc5fee585494e8b8818d7cad98c229737488bc56f140547badc1f5 vis-timeline-graph2d.min.css +``` + +### Re-verifying / upgrading + +```bash +curl -sL https://unpkg.com/vis-timeline@8.5.1/standalone/umd/vis-timeline-graph2d.min.js \ + | shasum -a 256 # must match the .js checksum above +curl -sL https://unpkg.com/vis-timeline@8.5.1/styles/vis-timeline-graph2d.min.css \ + | shasum -a 256 # must match the .css checksum above +``` + +To upgrade, bump the version in the URLs, re-download both files into this +directory, and update the version + checksums above. diff --git a/claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.css b/claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.css new file mode 100644 index 00000000..3adba7d7 --- /dev/null +++ b/claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.css @@ -0,0 +1,2 @@ +.vis .overlay{height:100%;left:0;position:absolute;top:0;width:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}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}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}.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}.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}.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}.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}.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}.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}.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}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}.vis-time-axis{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}.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%} +/*# sourceMappingURL=vis-timeline-graph2d.min.css.map */ \ No newline at end of file diff --git a/claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.js b/claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.js new file mode 100644 index 00000000..7231518f --- /dev/null +++ b/claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.js @@ -0,0 +1,50 @@ +/** + * vis-timeline and vis-graph2d + * https://visjs.github.io/vis-timeline/ + * + * Create a fully customizable, interactive timeline with items and ranges. + * + * @version 8.5.1 + * @date 2026-05-07T14:41:44.254Z + * + * @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>>0;for(e=0;e0)for(i=0;i=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=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}/,bt=/[+-]?\d{1,6}/,yt=/\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;i68?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=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;i0;){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)?bi(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 bi(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 yi(){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&&(ezt)&&(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;eXt(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:ye).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;e0&&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;othis?this:t:y()});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;nthis.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;ei.valueOf():i.valueOf()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=bi(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 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(),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 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()+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 b(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||bi("en")._eras;for(i=0,o=r.length;i=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(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",yt),Tt("yy",yt),Tt("yyy",yt),Tt("yyyy",yt),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",bt,ut),Tt("ggggg",bt,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,yt);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=yo,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=bo,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=bn,ds.local=yn,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=bi(),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=bi(),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 bs(t,e){return gs(t,e,"months")}function ys(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.",bi);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]||s0,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=bs,n.isDate=u,n.locale=fi,n.invalid=y,n.duration=On,n.isMoment=D,n.weekdays=_s,n.parseZone=us,n.localeData=bi,n.isDuration=ln,n.monthsShort=ys,n.weekdaysMin=xs,n.defineLocale=gi,n.updateLocale=vi,n.locales=yi,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 b;b||(b=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 y,_,w,x,k,D,S,C,T,M,O,E,P,I,L,N,A={};function F(){if(_)return y;_=1;var t=function(t){return t&&t.Math===Math&&t};return y=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof i&&i)||t("object"==typeof y&&y)||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,bt,yt,_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(yt)return bt;yt=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]),bt=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,be,ye,_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(be)return ve;be=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 ye;_e=1;var t=F(),e=Ht(),i=t.document,n=e(i)&&e(i.createElement);return ye=function(t){return n?i.createElement(t):{}},ye}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,bi,yi,_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,b,y,_,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&&(b=e.dontCallGetSet?(_=o(S,f))&&_.value:S[f]),g=p&&b?b:c[f],(u||D||typeof v!=typeof g)&&(y=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(y,"sham",!0),l(C,f,y),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(bi)return vi;bi=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 yi;_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,yi=!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;ed;)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(yn)return bn;yn=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+""},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,bn=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 bo(){if(so)return oo;so=1;var t=F(),e=W(),i=t.WeakMap;return oo=e(i)&&/native code/.test(String(i))}function yo(){if(ao)return ro;ao=1;var t,e,i,n=bo(),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 b,y,_=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)&&(y=k(b=w[D],D,_),e))if(a)C[D]=y;else if(y)switch(e){case 3:return!0;case 5:return b;case 6:return D;case 2:r(C,b)}else switch(e){case 4:return!1;case 7:r(C,b)}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=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,br,yr,_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),b=o(t,v),y=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,b,y);for(c=new(void 0===h?p:h)(m(y-b,0)),f=0;b1?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,ba,ya=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(ba?va:(ba=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;s1?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,bl,yl,_l,wl,xl,kl,Dl,Sl,Cl=n(hl?ll:(hl=1,ll=gl())),Tl={};function Ml(){return yl?bl:(yl=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)}})}(),bl=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,b,y=e(this),_=o(y),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(y,m),g=0;g_-m+p;g--)h(y,g-1)}else if(p>m)for(g=_-m;g>w;g--)b=g+p-1,(v=g+m-1)in y?y[b]=y[v]:h(y,b);for(g=0;gu;)for(var f,g=l(arguments[u++]),v=p?c(o(g),p(g)):o(g),b=v.length,y=0;b>y;)f=v[y++],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,bh,yh,_h,wh,xh,kh,Dh,Sh,Ch,Th,Mh,Oh,Eh,Ph,Ih={};function Lh(){if(bh)return vh;bh=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 yh;_h=1;var t=Lh(),e=TypeError;return yh=function(i){if(t(i))throw new e("The method doesn't accept regular expressions");return i},yh}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())),bd={};function yd(){return dd?hd:(dd=1,function(){if(ld)return bd;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=yd(),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,bc,yc,_c,wc,xc,kc=n(dc?hc:(dc=1,hc=fc())),Dc={};function Sc(){return bc?vc:(bc=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?yc:(_c=1,yc=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(eo,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,bu,yu,_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 yu?bu:(yu=1,ku(),bu=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-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=ip(e)?t<0?2:4:e<0?8:yp}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;ni[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-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-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;te.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.distancei.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),bm={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)"}},ym=[[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({},bm,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\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;o1?e-1:0),n=1;n2)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)?ya(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;tt,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;r3&&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;t1?e-1:0),n=1;n{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;es&&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._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;in-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),sn&&(o=n-e-this.padding),os.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,yf),bf=!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>>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{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:t0)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;i2&&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;n0&&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;i0&&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=ya(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;n3&&void 0!==arguments[3]&&arguments[3];if(aa(i))throw new TypeError("Arrays are not supported by deepExtend");for(let o=0;o2?i-2:0),o=2;o3&&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{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;t0?(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,bg,yg=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(bg?vg:(bg=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=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=yo(),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 tb(t){return tb="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},tb(t)}function eb(){return Bv?Wv:(Bv=1,os(),Wv=po().f("toPrimitive"))}function ib(){return Uv?Vv:(Uv=1,Vv=eb())}function nb(){return qv?Xv:(qv=1,Xv=ib())}function ob(){return Zv?Kv:(Zv=1,Kv=nb())}function sb(){return Jv?$v:(Jv=1,$v=ob())}var rb=n(sb());function ab(t){var e=function(t,e){if("object"!=tb(t)||!t)return t;var i=t[rb];if(void 0!==i){var n=i.call(t,e);if("object"!=tb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tb(e)?e:e+""}function lb(t,e,i){return(e=ab(e))in t?Vg(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var hb,db,cb,ub,pb,mb,fb,gb,vb,bb,yb,_b,wb,xb={};function kb(){if(db)return hb;db=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 hb={left:r(!1),right:r(!0)}}function Db(){return ub?cb:(ub=1,cb="NODE"===pu())}function Sb(){return fb?mb:(fb=1,function(){if(pb)return xb;pb=1;var t=Li(),e=kb().left,i=ul(),n=Ut();t({target:"Array",proto:!0,forced:!Db()&&n>79&&n<83||!i("reduce")},{reduce:function(t){var i=arguments.length;return e(this,t,i,i>1?arguments[1]:void 0)}})}(),mb=Sr()("Array","reduce"))}function Cb(){if(vb)return gb;vb=1;var t=Bt(),e=Sb(),i=Array.prototype;return gb=function(n){var o=n.reduce;return n===i||t(i,n)&&o===i.reduce?e:o},gb}function Tb(){return yb?bb:(yb=1,bb=Cb())}var Mb,Ob,Eb,Pb=n(wb?_b:(wb=1,_b=Tb())),Ib={};function Lb(){if(Ob)return Mb;Ob=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);g0&&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 Mb=o}var Nb,Ab,Fb,Rb,Yb,jb,zb,Hb,Gb;function Wb(){return Fb?Ab:(Fb=1,function(){if(Eb)return Ib;Eb=1;var t=Li(),e=Lb(),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}})}(),Nb||(Nb=1,Ks()("flatMap")),Ab=Sr()("Array","flatMap"))}function Bb(){if(Yb)return Rb;Yb=1;var t=Bt(),e=Wb(),i=Array.prototype;return Rb=function(n){var o=n.flatMap;return n===i||t(i,n)&&o===i.flatMap?e:o},Rb}function Vb(){return zb?jb:(zb=1,jb=Bb())}var Ub,Xb,qb=n(Gb?Hb:(Gb=1,Hb=Vb()));var Kb,Zb,$b,Jb,Qb,ty,ey,iy,ny,oy,sy,ry,ay,ly,hy,dy,cy,uy,py,my,fy,gy,vy,by,yy,_y,wy,xy,ky,Dy=n(Xb?Ub:(Xb=1,Ub=jv())),Sy={},Cy={exports:{}};function Ty(){return Zb?Kb:(Zb=1,Kb=R()(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))}function My(){if(Jb)return $b;Jb=1;var t=R(),e=Ht(),i=H(),n=Ty(),o=Object.isExtensible,s=t(function(){});return $b=s||n?function(t){return!!e(t)&&((!n||"ArrayBuffer"!==i(t))&&(!o||o(t)))}:o,$b}function Oy(){return ty?Qb:(ty=1,Qb=!R()(function(){return Object.isExtensible(Object.preventExtensions({}))}))}function Ey(){if(ey)return Cy.exports;ey=1;var t=Li(),e=z(),i=kn(),n=Ht(),o=Ne(),s=Pi().f,r=Ln(),a=jn(),l=My(),h=Ae(),d=Oy(),c=!1,u=h("meta"),p=0,m=function(t){s(t,u,{value:{objectID:"O"+p++,weakData:{}}})},f=Cy.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;ob;b++)if((_=E(p[b]))&&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)},dy}function Fy(){if(py)return uy;py=1;var t=Bt(),e=TypeError;return uy=function(i,n){if(t(n,i))return i;throw new e("Incorrect invocation")},uy}function Ry(){if(fy)return my;fy=1;var t=Li(),e=F(),i=Ey(),n=R(),o=Ii(),s=Ay(),r=Fy(),a=W(),l=Ht(),h=Yt(),d=vo(),c=Pi().f,u=_o().forEach,p=K(),m=yo(),f=m.set,g=m.getterFor;return my=function(m,v,b){var y,_=-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=(y=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 y=b.getConstructor(v,m,_,x),i.enable();return d(y,m,!1,!0),S[m]=y,t({global:!0,forced:!0},S),w||b.setStrong(y,m,_),y}}function Yy(){if(vy)return gy;vy=1;var t=Xn();return gy=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 jy(){if(yy)return by;yy=1;var t=Wt(),e=qn(),i=Fe(),n=K(),o=i("species");return by=function(i){var s=t(i);n&&s&&!s[o]&&e(s,o,{configurable:!0,get:function(){return this}})}}function zy(){if(wy)return _y;wy=1;var t=En(),e=qn(),i=Yy(),n=We(),o=Fy(),s=Yt(),r=Ay(),a=rr(),l=ar(),h=jy(),d=K(),c=Ey().fastKey,u=yo(),p=u.set,m=u.getterFor;return _y={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),b=function(t,e,i){var n,o,s=v(t),r=y(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},y=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=y(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!!y(this,t)}}),i(g,h?{get:function(t){var e=y(this,t);return e&&e.value},set:function(t,e){return b(this,0===t?0:t,e)}}:{add:function(t){return b(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)}},_y}function Hy(){return ky||(ky=1,xy||(xy=1,Ry()("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},zy()))),Sy}var Gy,Wy,By,Vy,Uy,Xy,qy,Ky,Zy,$y,Jy,Qy={};function t_(){return Wy||(Wy=1,Gy=function(t,e){return 1===e?function(e,i){return e[t](i)}:function(e,i,n){return e[t](i,n)}}),Gy}function e_(){if(Vy)return By;Vy=1;var t=Wt(),e=t_(),i=t("Map");return By={Map:i,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:i.prototype}}function i_(){return qy?Xy:(qy=1,lr(),Hy(),function(){if(Uy)return Qy;Uy=1;var t=Li(),e=z(),i=$t(),n=jt(),o=Ay(),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(),Xy=Gt().Map)}function n_(){if(Zy)return Ky;Zy=1;var t=i_();return dr(),Ky=t}var o_,s_,r_=n(Jy?$y:(Jy=1,$y=n_())),a_={};function l_(){return s_||(s_=1,o_||(o_=1,Ry()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},zy()))),a_}var h_,d_,c_,u_,p_,m_,f_,g_,v_,b_,y_,__,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(b_)return v_;b_=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,y_=function(t){return t.size}),y_}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=Ny();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=Ny();return iw=function(r){var a=t(this),l=n(r);if(i(a)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(),bw=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=Ly())}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;l0;)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;m3)){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;nr(i)?1:-1}}(t)),a=o(d),h=0;h1?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 bk=n(gk?fk:(gk=1,fk=zg()));const yk=[];for(let t=0;t<256;++t)yk.push((t+256).toString(16).slice(1));const _k=new Uint8Array(16);function wk(t,e,i){return crypto.randomUUID?crypto.randomUUID():function(t){t=t||{};const e=t.random??t.rng?.()??crypto.getRandomValues(_k);if(e.length<16)throw new Error("Random bytes length must be >= 16");return e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(t,e=0){return(yk[t[e+0]]+yk[t[e+1]]+yk[t[e+2]]+yk[t[e+3]]+"-"+yk[t[e+4]]+yk[t[e+5]]+"-"+yk[t[e+6]]+yk[t[e+7]]+"-"+yk[t[e+8]]+yk[t[e+9]]+"-"+yk[t[e+10]]+yk[t[e+11]]+yk[t[e+12]]+yk[t[e+13]]+yk[t[e+14]]+yk[t[e+15]]).toLowerCase()}(e)}(t)}function xk(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 kk(t){for(var e=1;ee(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 Sk{constructor(t){lb(this,"_source",void 0),lb(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=>ya(e).call(e,t)),this}flatMap(t){return this._transformers.push(e=>qb(e).call(e,t)),this}to(t){return new Dk(this._source,this._transformers,t)}}function Ck(t){return"string"==typeof t||"number"==typeof t}class Tk{constructor(t){lb(this,"delay",void 0),lb(this,"max",void 0),lb(this,"_queue",[]),lb(this,"_timeout",null),lb(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 Tk(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;othis.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 Mk{constructor(){lb(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),lb(this,"subscribe",Mk.prototype.on),lb(this,"unsubscribe",Mk.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 Ok{constructor(t){lb(this,"_pairs",void 0),this._pairs=t}*[Dy](){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 ya(t=[...this._pairs]).call(t,t=>t[0])}toItemArray(){var t;return ya(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 Ok([...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 Ok({*[Dy](){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 Ok({*[Dy](){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{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 Ek extends Mk{get idProp(){return this._idProp}constructor(t,e){super(),lb(this,"flush",void 0),lb(this,"length",void 0),lb(this,"_options",void 0),lb(this,"_data",void 0),lb(this,"_idProp",void 0),lb(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=Tk.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=ya(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{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{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:ya(n).call(n,t=>t.id),oldData:ya(n).call(n,t=>t.oldData),data:ya(n).call(n,t=>t.updatedData)};return this._trigger("update",t,e),t.items}return[]}get(t,e){let i,n,o;Ck(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[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:ni)&&(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||ss(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,ya(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||{[Dy]: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(Pk.prototype))bk(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/g,l=/"/g,h=/"/g,d=/&#([a-zA-Z0-9]*);?/gim,c=/:?/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,""")}function v(t){return t.replace(h,'"')}function b(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 y(t){return t.replace(c,":").replace(u," ")}function _(t){for(var e="",n=0,o=t.length;n0;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 rD.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"===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";var y=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(y.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),y.closing&&(n+=" /"),n+=">"}return r(b=d(i,n,v))?m(n):b},m);return v&&(b=v.remove(b)),b},nD=a}var hD=(sD||(sD=1,function(t,e){var i=eD(),n=aD(),o=lD();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)}(Uk,Uk.exports)),Uk.exports),dD=n(hD);function cD(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 uD(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{start:"Date",end:"Date"};const l=t._idProp,h=new Ek({fieldId:l}),d=ya((c=t,e=new Sk(c))).call(e,t=>{var e;return Pb(e=Ea(t)).call(e,(e,i)=>(e[i]=gD(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 bD=t=>{const e=new dD.FilterXSS(t);return t=>"string"==typeof t?e.process(t):t},yD=t=>t;let _D=bD();const wD=uD(uD({},Tf),{},{convert:gD,setupXSSProtection:t=>{t&&(!0===t.disabled?(_D=yD,console.warn("You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!")):t.filterOptions&&(_D=bD(t.filterOptions)))}});bk(wD,"xss",{get:function(){return _D}});var xD,kD,DD,SD,CD,TD,MD,OD,ED,PD={};function ID(){if(kD)return xD;kD=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 xD=d?function(t){var e=o(n(t)),i=a(e);return 0===i&&"-"===r(e,0)?-0:i}:a,xD}function LD(){return CD?SD:(CD=1,function(){if(DD)return PD;DD=1;var t=Li(),e=ID();t({global:!0,forced:parseFloat!==e},{parseFloat:e})}(),SD=Gt().parseFloat)}function ND(){return MD?TD:(MD=1,TD=LD())}var AD=n(ED?OD:(ED=1,OD=ND()));class FD{constructor(){this.options=null,this.props=null}setOptions(t){t&&wD.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 RD,YD,jD,zD,HD,GD,WD,BD,VD;function UD(){return jD?YD:(jD=1,RD||(RD=1,Li()({target:"String",proto:!0},{repeat:Jc()})),YD=Sr()("String","repeat"))}function XD(){if(HD)return zD;HD=1;var t=Bt(),e=UD(),i=String.prototype;return zD=function(n){var o=n.repeat;return"string"==typeof n||n===i||t(i,n)&&o===i.repeat?e:o},zD}function qD(){return WD?GD:(WD=1,GD=XD())}var KD=n(VD?BD:(VD=1,BD=qD()));function ZD(t,e,i){if(i&&!aa(i))return ZD(t,e,[i]);if(e.hiddenDates=[],i&&1==aa(i)){var n;for(let n=0;nt.start-e.start)}}function $D(t,e,i){if(i&&!aa(i))return $D(t,e,[i]);if(i&&void 0!==e.domProps.centerContainer.width){ZD(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=4*s){let t=0,s=o.clone();switch(KD(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:",KD(i[r]))}for(;a=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;ot.start-e.start)}function QD(t,e,i){let n=!1;const o=e.current.valueOf();for(let t=0;t=i&&ot.range.end){const o={start:t.range.start,end:e};return e=oS(t.options.moment,t.body.hiddenDates,o,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}return e=oS(t.options.moment,t.body.hiddenDates,t.range,e),n=t.range.conversion(i,s),(e.valueOf()-n.offset)*n.scale}}function eS(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=iS(t.body.hiddenDates,t.range.start,t.range.end),o=(t.range.end-t.range.start-n)*e/i,s=rS(t.body.hiddenDates,t.range,o);return new Date(s+o+t.range.start)}}function iS(t,e,i){let n=0;for(let o=0;o=e&&r=e&&r<=i&&(n+=r-s)}return n}function oS(t,e,i,n){return n=t(n).toDate().valueOf(),n-=sS(t,e,i,n)}function sS(t,e,i,n){let o=0;n=t(n).toDate().valueOf();for(let t=0;t=i.start&&r=r&&(o+=r-s)}return o}function rS(t,e,i){let n=0,o=0,s=e.start;for(let r=0;r=e.start&&l=i)break;n+=l-a}}return n}function aS(t,e,i,n){const o=lS(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 lS(t,e){for(let o=0;o=i&&t1e3&&(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?wD.convert(t,"Date").valueOf():null,a=null!=e?wD.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=wD.easingFunctions[c];var l;if(!u)throw new Error(vd(l="Unknown easing function ".concat(du(c),". Choose from: ")).call(l,Ea(wD.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,b=g||null===a?a:e+(a-e)*c;h=s._applyRange(v,b),$D(s.options.moment,s.body,s.options.hiddenDates),m=m||h;const y={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",y),g){if(m&&(s.body.emitter.emit("rangechanged",y),n))return n()}else s.animationTimer=Fu(f,20)}};return f()}var h=this._applyRange(r,a);if($D(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?wD.convert(t,"Date").valueOf():this.start,n=null!=e?wD.convert(e,"Date").valueOf():this.end;const o=null!=this.options.max?wD.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?wD.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(no&&(n=o)),null!==o&&n>o&&(r=n-o,i-=r,n-=r,null!=s&&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=AD(this.options.zoomMax);t<0&&(t=0),n-i>t&&(this.end-this.start===t&&ithis.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 mS.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;fS(e);let i="horizontal"==e?t.deltaX:t.deltaY;i-=this.deltaDifference;let n=this.props.touch.end-this.props.touch.start;n-=iS(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=aS(this.body.hiddenDates,r,this.previousDelta-i,!0),h=aS(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,wD.preventDefault(t)}_onPinch(t){if(!this.options.zoomable||!this.options.moveable)return;wD.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=iS(this.body.hiddenDates,this.start,this.end),o=sS(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=aS(this.body.hiddenDates,r,1-e,!0),h=aS(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(fS(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=iS(this.body.hiddenDates,this.start,this.end),s=sS(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=aS(this.body.hiddenDates,a,i,!0),d=aS(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 fS(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'.concat(t,'". Choose "horizontal" or "vertical".'))}function gS(){return dS?hS:(dS=1,ku(),hS=Gt().setInterval)}var vS=n(uS?cS:(uS=1,cS=gS())),bS=null;let yS;if("undefined"!=typeof window){yS=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=bS;for(var n=bS.isConnected?bS:t.target;n&&!e;){var o=n.hammer;if(o)for(var s,r=0;r0?r._handlers[t]=n:(e.off(t,h),delete r._handlers[t]))}),r},r.emit=function(t,i){bS=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 yS=function(){return function(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get:()=>({set:t})}}()};var _S=yS;function wS(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)}class xS{constructor(t,e,i,n,o){this.moment=o&&o.moment||Nk,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=xS.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=wD.deepExtend({},xS.FORMAT);this.format=wD.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(aS(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()0&&this.current.seconds()0&&this.current.minutes()0&&this.current.hours()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=Nk(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(" ")}}xS.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 kS extends FD{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:wD.extend({},xS.FORMAT),moment:Nk,timeAxis:null},this.options=wD.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}setOptions(t){t&&(wD.selectiveExtend(["showMinorLabels","showMajorLabels","showWeekScale","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),wD.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 Nk.locale?Nk.locale(t.locale):Nk.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=wD.convert(this.body.range.start,"Number"),i=wD.convert(this.body.range.end,"Number"),n=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf();let o=n-sS(this.options.moment,this.body.hiddenDates,this.body.range,n);o-=this.body.util.toTime(0).valueOf();const s=new xS(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 b=1e3;let y;for(s.start(),l=s.getCurrent(),d=this.body.util.toScreen(l);s.hasNext()&&v=.4*p;if(this.options.showMinorLabels&&u){var _=this._repaintMinorText(h,s.getLabelMinor(a),t,y);_.style.width="".concat(g,"px")}c&&this.options.showMajorLabels?(h>0&&(null==f&&(f=h),_=this._repaintMajorText(h,s.getLabelMajor(a),t,y)),m=this._repaintMajorLine(h,g,t,y)):u?m=this._repaintMinorLine(h,g,t,y):m&&(m.style.width="".concat(cc(m.style.width)+g,"px"))}if(v!==b||DS||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to ".concat(b," lines.")),DS=!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{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=wD.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=wD.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 DS=!1;function SS(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{this.options.locales[t]=wD.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&&wD.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 _S(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:_S.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=wD.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=wD.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 BS{_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=wD.throttle(this._origRedraw),this.on("_change",t=>{o.itemSet&&o.itemSet.initialItemSetDrawn&&t&&1==t.queue?o._redraw():o._origRedraw()}),this.hammer=new _S(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:_S.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}),wS(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(wD.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 kS(this.body,this.options);t.setOptions=e=>{const i=e?wD.extend({},e):{};i.orientation="top",kS.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&&ZD(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new CS(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=wD.deepExtend({},this.options);Cl(o=this.components).call(o,t=>{wD.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?wD.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 WS(this.body,wD.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=wD.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;$D(this.options.moment,this.body,this.options.hiddenDates),"top"==n.orientation?(wD.addClassName(e.root,"vis-top"),wD.removeClassName(e.root,"vis-bottom")):(wD.removeClassName(e.root,"vis-top"),wD.addClassName(e.root,"vis-bottom")),n.rtl?(wD.addClassName(e.root,"vis-rtl"),wD.removeClassName(e.root,"vis-ltr")):(wD.addClassName(e.root,"vis-ltr"),wD.removeClassName(e.root,"vis-rtl")),e.root.style.maxHeight=wD.option.asSize(n.maxHeight,""),e.root.style.minHeight=wD.option.asSize(n.minHeight,""),e.root.style.width=wD.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=wD.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=wD.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.heighto.centerContainer.height;this.hammer.get("pan").set({direction:m?_S.DIRECTION_ALL:_S.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 eS(this,t,this.props.center.width)}_toGlobalTime(t){return eS(this,t,this.props.root.width)}_toScreen(t){return tS(this,t,this.props.center.width)}_toGlobalScreen(t){return tS(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=wD.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=vS(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{this.options.locales[t]=wD.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&&wD.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=wD.convert(t,"Date").valueOf(),i=Va();this.offset=e-i,this.redraw()}getCurrentTime(){return new Date(Va()+this.offset)}}var US,XS,qS,KS,ZS,$S,JS,QS,tC,eC={};function iC(){return qS?XS:(qS=1,function(){if(US)return eC;US=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)}(),XS=Sr()("Array","find"))}function nC(){if(ZS)return KS;ZS=1;var t=Bt(),e=iC(),i=Array.prototype;return KS=function(n){var o=n.find;return n===i||t(i,n)&&o===i.find?e:o},KS}function oC(){return JS?$S:(JS=1,$S=nC())}var sC=n(tC?QS:(tC=1,QS=oC()));const rC=.001;function aC(t){Mx(t).call(t,(t,e)=>t.data.start-e.data.start)}function lC(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 hC(t,e,i,n){return null===mC(t,e.item,!1,t=>t.stack&&(i||null===t.top),t=>t.stack,()=>e.axis,n)}function dC(t,e,i){const n=mC(t,e.item,!1,t=>t.stack,()=>!0,t=>t.baseTop);i.height=n-i.top+.5*e.item.vertical}function cC(t,e,i,n){for(let o=0;o=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||uC(t,e,i)}function uC(t,e,i){var n;mC(Mx(n=Kd(i)).call(n,(t,e)=>t.index>e.index?1:t.index!0,()=>!0,()=>0);for(let n=0;ni[t].index&&(i[r].top+=i[t].height);const a=t[r];for(let t=0;tt.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&&ta(e)-rC>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&&ic+rC)&&(m=gC(d,t=>inn&&(f=vC(d,t=>n+rC>=a(t),m,f)+1),p=n;const b=Mx(v=bC(d,t=>it.top-e.top);for(let i=0;ia(t)-rC>i,u),rh(d).call(d,u,0,t),ug&&(g=y),r&&r())return null}return g}function fC(t,e,i){return t.top-i.vertical+rCe.top}function gC(t,e,i){i||(i=0);for(let n=i;n=i;o--)if(e(t[o]))return o;return i-1}function bC(t,e,i,n){i||(i=0),n=n?Math.min(n,t.length):t.length;const o=[];for(let s=i;s{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?wD.xss(e):wD.xss(this.groupId||""));this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?wD.removeClassName(this.dom.inner,"vis-hidden"):wD.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),wD.addClassName(this.dom.label,"vis-nesting-group"),this.showNested?(wD.removeClassName(this.dom.label,"collapsed"),wD.addClassName(this.dom.label,"expanded")):(wD.removeClassName(this.dom.label,"expanded"),wD.addClassName(this.dom.label,"collapsed"))):this.nestedGroups&&(this.nestedGroups=null,wD.removeClassName(this.dom.label,"collapsed"),wD.removeClassName(this.dom.label,"expanded"),wD.removeClassName(this.dom.label,"vis-nesting-group")),t&&(t.treeLevel||t.nestedInGroup)?(wD.addClassName(this.dom.label,"vis-nested-group"),t.treeLevel?wD.addClassName(this.dom.label,"vis-group-level-"+t.treeLevel):wD.addClassName(this.dom.label,"vis-group-level-unknown-but-gte1")):wD.addClassName(this.dom.label,"vis-group-level-0");const o=t&&t.className||null;o!=this.className&&(this.className&&(wD.removeClassName(this.dom.label,this.className),wD.removeClassName(this.dom.foreground,this.className),wD.removeClassName(this.dom.background,this.className),wD.removeClassName(this.dom.axis,this.className)),wD.addClassName(this.dom.label,o),wD.addClassName(this.dom.foreground,o),wD.addClassName(this.dom.background,o),wD.addClassName(this.dom.axis,o),this.className=o),this.style&&(wD.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(wD.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(wD).call(wD,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{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=ya(a=this.orderedItems.byEnd).call(a,t=>t.cluster)).call(r,t=>!!t))],byStart:[...new zw(Pd(l=ya(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){pC(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=hC(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){pC(g(),i,this.subgroups)}else{var m;this.shouldBailStackItems=hC(this.visibleItems,i,!0,dl(m=this._shouldBailItemsRedraw).call(m,this))}else cC(this.visibleItems,i,this.subgroups,this.itemSet.options.stackSubgroups);for(let t=0;t{t.cluster&&t.displayed&&t.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit("destroyTimeline"),this.stackDirty=!1}}_didResize(t,e){t=wD.updateProperty(this,"height",e)||t;const i=this.dom.inner.clientWidth,n=this.dom.inner.clientHeight;return t=wD.updateProperty(this.props.label,"width",i)||t,t=wD.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=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(wD).call(wD,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?wD.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(wD).call(wD,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(wD).call(wD,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].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(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;e1&&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=wD.toArray(this.items),e=[],i=[];for(let n=0;n{const{start:e,end:i}=t;return i0)for(let t=0;ttt.data.startl),1==this.checkRangedItems){this.checkRangedItems=!1;for(let e=0;et.data.endl)}this._sortVisibleItems(t.byStart,n,o);const c={};let u=0;for(let t=0;t0)for(let t=0;t{e[t]()});for(let t=0;t=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;s0)for(let t=0;t0)for(var a=0;a{this.options.locales[t]=wD.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 _S(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 _S(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(Nk(this.data.start).format("MM/DD/YYYY hh:mm")),this.data.end&&(o+="
end: ".concat(Nk(this.data.end).format("MM/DD/YYYY hh:mm")));this.dom.onItemUpdateTimeTooltip.innerHTML=wD.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=wD.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=wD.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=wD.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&&(wD.removeCssText(t,this.style),this.style=null),this.data.style&&(wD.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={},wD.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={},wD.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}}kC.prototype.stack=!0;class DC extends kC{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()-nt.start&&this.data.start.getTime()t.start&&this.data.start.getTime()-n/2{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 SC extends kC{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{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 CC extends kC{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.startt.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)}}CC.prototype.baseClassName="vis-item vis-range";class TC extends kC{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.startt.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 xC?(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")}}TC.prototype.baseClassName="vis-item vis-background",TC.prototype.stack=!1,TC.prototype.show=CC.prototype.show,TC.prototype.hide=CC.prototype.hide,TC.prototype.repositionX=CC.prototype.repositionX;class MC{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=wD.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-eo-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),ro&&(s=o-i-this.padding),s1?arguments[1]:void 0)}})}(),EC=Sr()("Array","every"))}function zC(){if(LC)return IC;LC=1;var t=Bt(),e=jC(),i=Array.prototype;return IC=function(n){var o=n.every;return n===i||t(i,n)&&o===i.every?e:o},IC}function HC(){return AC?NC:(AC=1,NC=zC())}var GC=n(RC?FC:(RC=1,FC=HC()));class WC extends kC{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=wk(),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.startt.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=ya(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=ya(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(...ya(n).call(n,t=>Math.min(t.start,t.end||t.start))),this.data.max=Math.max(...ya(n).call(n,t=>Math.max(t.start,t.end||t.start)));const o=ya(e=this.data.uiItems).call(e,t=>t.center),s=Pb(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=WC.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}}WC.prototype.baseClassName="vis-item vis-range vis-cluster";const BC="__ungrouped__";class VC{constructor(t){this.itemSet=t,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(t,e,i){return new WC(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=0&&e.center-s[d].center=0&&e.center-a[u].centern){const r=l-n+1,d=[];let c=h;for(;d.lengtht.center-e.center)}this.dataChanged=!1}_getClusterForItems(t,e,i,n){var o;const s=ya(o=i||[]).call(o,t=>{var e;return{cluster:t,itemsIds:new zw(ya(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&&GC(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='
'+t.length+"
",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 UC="__ungrouped__",XC="__background__";class qC extends FD{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:xS.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=wD.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 b=document.createElement("div");b.className="vis-axis",this.dom.axis=b;const y=document.createElement("div");y.className="vis-labelset",this.dom.labelSet=y,this._updateUngrouped();const _=new xC(XC,null,this);_.show(),this.groups[XC]=_,this.hammer=new _S(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:_S.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 _S(this.body.dom.rightContainer):this.groupHammer=new _S(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:_S.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"];wD.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&&(wD.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&&(wD.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&&wD.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&&wD.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&&wD.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 VC(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(wD).call(wD,this.items,t=>{t.dirty=!0,t.displayed&&t.redraw()}),t.restackGroups&&Cl(wD).call(wD,this.groups,(t,e)=>{e!==XC&&(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.righte&&n.push(t.id):t.lefti&&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.righte&&n.push(t.id):t.lefti&&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]||sC(e=this.clusters).call(e,e=>e.id===t)}_deselect(t){const e=this.selection;for(let i=0,n=e.length;i{if(i===XC)return;const n=t==p?m:f;b[i]=t.redraw(e,n,u,!0),y=b[i].length});if(y>0){const t={};for(let e=0;e{t[n]=i[e]()});Cl(wD).call(wD,this.groups,(e,i)=>{if(i===XC)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[UC]||null}_updateUngrouped(){let t,e,i=this.groups[UC];if(this.groupsData){if(i)for(e in i.dispose(),delete this.groups[UC],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 wC(n,o,this),this.groups[UC]=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(!pD(t))throw new TypeError("Data must implement the interface of DataSet or DataView");this.itemsData=vD(t)}else this.itemsData=null;if(n&&(Cl(wD).call(wD,this.itemListeners,(t,e)=>{n.off(e,t)}),n.dispose(),i=n.getIds(),this._onRemove(i)),this.itemsData){const t=this.id;Cl(wD).call(wD,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(wD).call(wD,this.groupListeners,(t,i)=>{e.groupsData.off(i,t)}),i=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(i)),t){if(!pD(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(wD).call(wD,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?XC:this.groupsData?t.group:UC}_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=qC.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(wD).call(wD,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==UC||t==XC)throw new Error("Illegal group id. ".concat(t," is a reserved id."));const o=Zc(e.options);wD.extend(o,{height:null}),n=new wC(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=!wD.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=ya(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{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=wk();l[this.itemsData.idProp]=h;const d=this.groupFromTarget(t);d&&(l.group=d.groupId);const c=new CC(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=wD.convert(e.data.end,"Date"),g=new Date(m.valueOf()+u),v.end=n?n(g,r,a):g):null!=v.start&&(p=wD.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=wD.convert(e.data.start,"Date"),f=new Date(p.valueOf()+u),v.start=n?n(f,r,a):f):null!=v.end&&(m=wD.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=wD.convert(e.data.start,"Date").valueOf(),f=new Date(p+u),null!=v.end){m=wD.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;e0&&(o=vd(o).call(o,s))}var r;if(n.showNested){var a=i.get(n.nestedGroups);for(let t=0;t0&&(null==e.showNested||1==e.showNested)&&a.push(...i.get(e.nestedGroups))}r=ya(a).call(a,function(t){return null==t.visible&&(t.visible=!0),t.visible=!!n.showNested,t})}else{var l;r=ya(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?(wD.removeClassName(t.dom.label,"collapsed"),wD.addClassName(t.dom.label,"expanded")):(wD.removeClassName(t.dom.label,"expanded"),wD.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.topn)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(!wD.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)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=wD.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(!wD.equalArray(t,e.groupTouchParams.originalOrder)){const i=e.groupTouchParams.originalOrder,o=Math.min(i.length,t.length);let s=0;for(;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 MC(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||wk(),"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]=wk(),"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=qC._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 TC||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.starte)&&(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=r.top&&er.top)return o}else if(0===t&&et.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||[]}}qC.types={background:TC,box:DC,range:CC,point:SC},qC.prototype._onAdd=qC.prototype._onUpdate;let KC,ZC=!1,$C="background: #FFeeee; color: #dd0000";class JC{constructor(){}static validate(t,e,i){ZC=!1,KC=e;let n=e;return void 0!==i&&(n=e[i]),JC.parse(t,n,[]),ZC}static parse(t,e,i){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&JC.check(n,t,e,i)}static check(t,e,i,n){if(void 0===i[t]&&void 0===i.__any__)return void JC.getSuggestion(t,i,n);let o=t,s=!0;void 0===i[t]&&void 0!==i.__any__&&(o="__any__",s="object"===JC.getType(e[t]));let r=i[o];s&&void 0!==r.__type__&&(r=r.__type__),JC.checkFields(t,e,i,o,r,n)}static checkFields(t,e,i,n,o,s){let r=function(e){console.log("%c"+e+JC.printLocation(s,t),$C)},a=JC.getType(e[t]),l=o[a];void 0!==l?"array"===JC.getType(l)&&-1===kc(l).call(l,e[t])?(r('Invalid option detected in "'+t+'". Allowed values are:'+JC.print(l)+' not "'+e[t]+'". '),ZC=!0):"object"===a&&"__any__"!==n&&(s=wD.copyAndExtendArray(s,t),JC.parse(e[t],i[n],s)):void 0===o.any&&(r('Invalid type received for "'+t+'". Expected: '+JC.print(Ea(o))+". Received ["+a+'] "'+e[t]+'"'),ZC=!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=JC.findInOptions(t,e,i,!1),s=JC.findInOptions(t,KC,[],!0);n=void 0!==o.indexMatch?" in "+JC.printLocation(o.path,t,"")+'Perhaps it was incomplete? Did you mean: "'+o.indexMatch+'"?\n\n':s.distance<=4&&o.distance>s.distance?" in "+JC.printLocation(o.path,t,"")+"Perhaps it was misplaced? Matching option found at: "+JC.printLocation(s.path,s.closestMatch,""):o.distance<=8?'. Did you mean "'+o.closestMatch+'"?'+JC.printLocation(o.path,t):". Did you mean one of these: "+JC.print(Ea(e))+JC.printLocation(i,t),console.log('%cUnknown option detected: "'+t+'"'+n,$C),ZC=!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=JC.findInOptions(t,e[d],wD.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=JC.levenshteinDistance(t,d),s>c&&(r=d,a=wD.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;e0&&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 lT[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===wD.isString(t)){if(!0===wD.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===wD.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===wD.isValidHex(t)){let i=wD.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=wD.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=wD.extend({},t)),this.color=t;let e=wD.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=wD.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;let i=wD.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=wD.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 _S(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),wS(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;o3&&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},wD.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new hT(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;t1?e-1:0),n=1;n{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=wD.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?wD.xss(""+t+":"):wD.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;es&&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._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=wD.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=wD.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;ivar options = "+du(t,null,2)+""}getOptions(){let t={};for(var e=0;ec.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 mS(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new kS(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new VS(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new qC(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 dT(this,this.dom.container,aT)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(t){if(!0===JC.validate(t,rT)&&console.log("%cErrors have been found in the supplied options object.",$C),BS.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?pD(t)?vD(t):vD(new Ek(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 Ek(t)),e=new Pk(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||es)&&(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=mT(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=mT(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(wD).call(wD,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{e[t]()});if(Cl(wD).call(wD,this.itemSet.items,t=>{const r=uT(t),a=pT(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),li&&(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=uT(n)-r*t/a,i=pT(o)+s*t/a):(e=uT(n)-s*t/a,i=pT(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=wD.convert(i.start,"Date").valueOf(),o=wD.convert(null!=i.end?i.end:i.start,"Date").valueOf();(null===t||ne)&&(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=WS.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=wD.getTarget(t);let f=null;return null!=r?f="item":null!=l?f="custom-time":wD.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&wD.hasParent(m,this.timeAxis2.dom.foreground)?f="axis":wD.hasParent(m,this.itemSet.dom.labelSet)?f="group-label":wD.hasParent(m,this.currentTime.bar)?f="current-time":wD.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(){BS.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 uT(t){return wD.convert(t.data.start,"Date").valueOf()}function pT(t){const e=null!=t.data.end?t.data.end:t.data.start;return wD.convert(e,"Date").valueOf()}function mT(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 dh+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 fT{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=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.minorStepIdxn+1e-5)r(),h=!1;else{if(!this.autoScaleStart&&this._start=0)){r(),h=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&e"".concat(AD(t.toPrecision(3))),title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:t=>"".concat(AD(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=wD.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"];wD.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{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.maxLabelSizethis.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=wD.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.maxLabelSize0&&(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)},yT._getSafeDrawData=function(t,e,i){var n,o;return t0?(n=t0){Mx(t).call(t,function(t,e){return t.screen_x===e.screen_x?t.groupIde[s].screen_y?e[s].screen_y:n,o=ot[r].accumulatedNegative?t[r].accumulatedNegative:n)>t[r].accumulatedPositive?t[r].accumulatedPositive:n,o=(o=o0){return 1==e.options.interpolation.enabled?_T._catmullRom(t,e):_T._linear(t)}},_T.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)},_T.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)}},_T.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))}},_T.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;n0&&(m=1/m),(f=3*g*(g+v))>0&&(f=1/f),a={screen_x:(-y*n.screen_x+u*o.screen_x+_*s.screen_x)*m,screen_y:(-y*n.screen_y+u*o.screen_y+_*s.screen_y)*m},l={screen_x:(b*o.screen_x+p*s.screen_x-y*r.screen_x)*f,screen_y:(b*o.screen_y+p*s.screen_y-y*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},_T._linear=function(t){for(var e=[],i=0;ie.x?1:-1})):this.itemsData=[]},wT.prototype.getItems=function(){return this.itemsData},wT.prototype.setZeroPosition=function(t){this.zeroPosition=t},wT.prototype.setOptions=function(t){if(void 0!==t){wD.selectiveDeepExtend(["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"],this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),wD.mergeOptions(this.options,t,"interpolation"),wD.mergeOptions(this.options,t,"drawPoints"),wD.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))}},wT.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)},wT.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":_T.drawIcon(this,n,o,t,e,i);break;case"points":case"point":vT.drawIcon(this,n,o,t,e,i);break;case"bar":yT.drawIcon(this,n,o,t,e,i)}return{icon:i.svg,label:this.content,orientation:this.options.yAxisOrientation}},wT.prototype.getYRange=function(t){for(var e=t[0].y,i=t[0].y,n=0;nt[n].y?t[n].y:e,i=i");this.dom.textArea.innerHTML=wD.xss(s),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},xT.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=Ea(this.groups);Mx(t).call(t,function(t,e){return t0){var r={};for(this._getRelevantData(s,r,n,o),this._applySampling(s,r),e=0;e0)switch(t.options.style){case"line":Object.prototype.hasOwnProperty.call(l,s[e])||(l[s[e]]=_T.calcPath(r[s[e]],t)),_T.draw(l[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||vT.draw(r[s[e]],t,this.framework)}}}return Of(this.svgElements),!1},DT.prototype._stack=function(t,e){var i,n,o,s,r;i=0;for(var a=0;at[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}},DT.prototype._getRelevantData=function(t,e,i,n){var o,s,r,a;if(t.length>0)for(s=0;s0)for(var i=0;i0){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;l0){for(s=0;s0&&(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]));yT.getStackedYRange(a,i,t,"__barStackLeft","left"),yT.getStackedYRange(l,i,t,"__barStackRight","right")}},DT.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;ci?i:a,h=hi?i:l,d=du.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 mS(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new kS(this.body),this.components.push(this.timeAxis),this.currentTime=new VS(this.body),this.components.push(this.currentTime),this.linegraph=new DT(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()}LT.prototype=new BS,LT.prototype.setOptions=function(t){!0===JC.validate(t,PT)&&console.log("%cErrors have been found in the supplied options object.",$C),BS.prototype.setOptions.call(this,t)},LT.prototype.setItems=function(t){var e,i=null==this.itemsData;if(e=t?pD(t)?vD(t):vD(new Ek(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})},LT.prototype.setGroups=function(t){var e;e=t?pD(t)?t:new Ek(t):null,this.groupsData=e,this.linegraph.setGroups(e)},LT.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+"'"},LT.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]))},LT.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;ns?s:t,e=null==e||e0&&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}},LT.prototype._createConfigurator=function(){return new dT(this,this.dom.container,IT)};const NT=Af();Nk.locale(NT);const AT={Core:BS,DateUtil:pS,Range:mS,stack:yC,TimeStep:xS,components:{items:{Item:kC,BackgroundItem:TC,BoxItem:DC,ClusterItem:WC,PointItem:SC,RangeItem:CC},BackgroundGroup:xC,Component:FD,CurrentTime:VS,CustomTime:WS,DataAxis:gT,DataScale:fT,GraphGroup:wT,Group:wC,ItemSet:qC,Legend:xT,LineGraph:DT,TimeAxis:kS}};t.DOMutil=Gf,t.DataSet=Ek,t.DataView=Pk,t.Graph2d=LT,t.Hammer=_S,t.Queue=Tk,t.Timeline=cT,t.keycharm=SS,t.moment=Nk,t.timeline=AT,t.util=Tf}); +//# sourceMappingURL=vis-timeline-graph2d.min.js.map diff --git a/claude_code_log/html/renderer.py b/claude_code_log/html/renderer.py index 92900896..1fd8875a 100644 --- a/claude_code_log/html/renderer.py +++ b/claude_code_log/html/renderer.py @@ -1582,6 +1582,19 @@ def _generate_inner( self._output_dir = output_dir self._image_counter = 0 + # Vendored timeline assets (issue #278): when rendering into a + # real output directory, drop vis-timeline's JS/CSS into a + # sibling ``assets/`` dir and point the template at the relative + # path. Without an output dir (bare string render) the sidecar + # can't exist; the timeline's onerror handler degrades quietly. + if output_dir is not None: + from .utils import ensure_vendor_assets, VENDOR_ASSETS_DIRNAME + + ensure_vendor_assets(output_dir) + timeline_asset_base: Optional[str] = VENDOR_ASSETS_DIRNAME + else: + timeline_asset_base = None + if not title: title = "Claude Transcript" @@ -1634,6 +1647,7 @@ def _generate_inner( is_session_header=is_session_header, page_info=page_info, page_stats=page_stats, + timeline_asset_base=timeline_asset_base, ) ) diff --git a/claude_code_log/html/templates/components/timeline.html b/claude_code_log/html/templates/components/timeline.html index b68766db..866c7fbc 100644 --- a/claude_code_log/html/templates/components/timeline.html +++ b/claude_code_log/html/templates/components/timeline.html @@ -347,17 +347,24 @@ return; } - console.log('Loading vis-timeline from CDN...'); + // Vendored, offline-first asset paths (issue #278). The + // Python renderer writes vis-timeline's JS/CSS into a + // sibling `assets/` directory and passes the relative + // base here. No CDN, no third-party request when a + // transcript rendered from private logs is opened. + {%- set _asset_base = timeline_asset_base | default(none) %} + const assetBase = {{ ((_asset_base ~ '/') if _asset_base else '') | tojson }}; + console.log('Loading vis-timeline from', assetBase || '(no local asset base)'); // Load CSS first const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = 'https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css'; + link.href = assetBase + 'vis-timeline-graph2d.min.css'; document.head.appendChild(link); // Load JavaScript const script = document.createElement('script'); - script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js'; + script.src = assetBase + 'vis-timeline-graph2d.min.js'; script.onload = () => { console.log('vis-timeline loaded successfully'); isTimelineLoaded = true; diff --git a/claude_code_log/html/utils.py b/claude_code_log/html/utils.py index 1575c75c..5015aaf8 100644 --- a/claude_code_log/html/utils.py +++ b/claude_code_log/html/utils.py @@ -17,6 +17,7 @@ import html import json import re +import shutil from pathlib import Path from typing import Any, Callable, Optional, TYPE_CHECKING @@ -894,3 +895,45 @@ def get_template_environment() -> Environment: globals_dict: Any = env.globals globals_dict["starts_with_emoji"] = starts_with_emoji return env + + +# Sub-directory (relative to a transcript HTML file) where vendored +# front-end assets are written. All transcript pages for a project live +# flat in one output directory, so this relative path is constant across +# session / combined / paginated pages. +VENDOR_ASSETS_DIRNAME = "assets" + +# The vendored files that a timeline-bearing page needs, resolved from +# the package's ``assets/vendor`` directory (see that dir's +# ``PROVENANCE.md``). Vendored rather than CDN-loaded so generated HTML +# stays fully offline and leaks no request to a third party (issue #278). +_VENDOR_ASSET_FILES = ( + "vis-timeline-graph2d.min.js", + "vis-timeline-graph2d.min.css", +) + + +def _vendor_source_dir() -> Path: + return Path(__file__).parent / "assets" / "vendor" + + +def ensure_vendor_assets(output_dir: Path) -> None: + """Copy vendored front-end assets into ``output_dir/assets`` once. + + Idempotent: skips any file already present with a matching size, so + re-rendering a project doesn't rewrite the 530 KB timeline bundle on + every run. Called by the HTML renderer whenever it renders a + timeline-bearing page into a real output directory; string-only + renders (no output dir) simply don't get the sidecar, and the + timeline's ``script.onerror`` handler degrades gracefully if the + asset is absent. + """ + src_dir = _vendor_source_dir() + dest_dir = output_dir / VENDOR_ASSETS_DIRNAME + dest_dir.mkdir(parents=True, exist_ok=True) + for name in _VENDOR_ASSET_FILES: + src = src_dir / name + dest = dest_dir / name + if dest.exists() and dest.stat().st_size == src.stat().st_size: + continue + shutil.copyfile(src, dest) diff --git a/test/__snapshots__/test_snapshot_html.ambr b/test/__snapshots__/test_snapshot_html.ambr index 317ebea5..14c2ce37 100644 --- a/test/__snapshots__/test_snapshot_html.ambr +++ b/test/__snapshots__/test_snapshot_html.ambr @@ -4394,17 +4394,23 @@ return; } - console.log('Loading vis-timeline from CDN...'); + // Vendored, offline-first asset paths (issue #278). The + // Python renderer writes vis-timeline's JS/CSS into a + // sibling `assets/` directory and passes the relative + // base here. No CDN, no third-party request when a + // transcript rendered from private logs is opened. + const assetBase = ""; + console.log('Loading vis-timeline from', assetBase || '(no local asset base)'); // Load CSS first const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = 'https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css'; + link.href = assetBase + 'vis-timeline-graph2d.min.css'; document.head.appendChild(link); // Load JavaScript const script = document.createElement('script'); - script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js'; + script.src = assetBase + 'vis-timeline-graph2d.min.js'; script.onload = () => { console.log('vis-timeline loaded successfully'); isTimelineLoaded = true; @@ -10885,17 +10891,23 @@ return; } - console.log('Loading vis-timeline from CDN...'); + // Vendored, offline-first asset paths (issue #278). The + // Python renderer writes vis-timeline's JS/CSS into a + // sibling `assets/` directory and passes the relative + // base here. No CDN, no third-party request when a + // transcript rendered from private logs is opened. + const assetBase = ""; + console.log('Loading vis-timeline from', assetBase || '(no local asset base)'); // Load CSS first const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = 'https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css'; + link.href = assetBase + 'vis-timeline-graph2d.min.css'; document.head.appendChild(link); // Load JavaScript const script = document.createElement('script'); - script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js'; + script.src = assetBase + 'vis-timeline-graph2d.min.js'; script.onload = () => { console.log('vis-timeline loaded successfully'); isTimelineLoaded = true; @@ -19478,17 +19490,23 @@ return; } - console.log('Loading vis-timeline from CDN...'); + // Vendored, offline-first asset paths (issue #278). The + // Python renderer writes vis-timeline's JS/CSS into a + // sibling `assets/` directory and passes the relative + // base here. No CDN, no third-party request when a + // transcript rendered from private logs is opened. + const assetBase = ""; + console.log('Loading vis-timeline from', assetBase || '(no local asset base)'); // Load CSS first const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = 'https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css'; + link.href = assetBase + 'vis-timeline-graph2d.min.css'; document.head.appendChild(link); // Load JavaScript const script = document.createElement('script'); - script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js'; + script.src = assetBase + 'vis-timeline-graph2d.min.js'; script.onload = () => { console.log('vis-timeline loaded successfully'); isTimelineLoaded = true; @@ -26084,17 +26102,23 @@ return; } - console.log('Loading vis-timeline from CDN...'); + // Vendored, offline-first asset paths (issue #278). The + // Python renderer writes vis-timeline's JS/CSS into a + // sibling `assets/` directory and passes the relative + // base here. No CDN, no third-party request when a + // transcript rendered from private logs is opened. + const assetBase = ""; + console.log('Loading vis-timeline from', assetBase || '(no local asset base)'); // Load CSS first const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = 'https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css'; + link.href = assetBase + 'vis-timeline-graph2d.min.css'; document.head.appendChild(link); // Load JavaScript const script = document.createElement('script'); - script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js'; + script.src = assetBase + 'vis-timeline-graph2d.min.js'; script.onload = () => { console.log('vis-timeline loaded successfully'); isTimelineLoaded = true; @@ -32957,17 +32981,23 @@ return; } - console.log('Loading vis-timeline from CDN...'); + // Vendored, offline-first asset paths (issue #278). The + // Python renderer writes vis-timeline's JS/CSS into a + // sibling `assets/` directory and passes the relative + // base here. No CDN, no third-party request when a + // transcript rendered from private logs is opened. + const assetBase = ""; + console.log('Loading vis-timeline from', assetBase || '(no local asset base)'); // Load CSS first const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = 'https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css'; + link.href = assetBase + 'vis-timeline-graph2d.min.css'; document.head.appendChild(link); // Load JavaScript const script = document.createElement('script'); - script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js'; + script.src = assetBase + 'vis-timeline-graph2d.min.js'; script.onload = () => { console.log('vis-timeline loaded successfully'); isTimelineLoaded = true; @@ -39793,17 +39823,23 @@ return; } - console.log('Loading vis-timeline from CDN...'); + // Vendored, offline-first asset paths (issue #278). The + // Python renderer writes vis-timeline's JS/CSS into a + // sibling `assets/` directory and passes the relative + // base here. No CDN, no third-party request when a + // transcript rendered from private logs is opened. + const assetBase = "assets/"; + console.log('Loading vis-timeline from', assetBase || '(no local asset base)'); // Load CSS first const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = 'https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css'; + link.href = assetBase + 'vis-timeline-graph2d.min.css'; document.head.appendChild(link); // Load JavaScript const script = document.createElement('script'); - script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js'; + script.src = assetBase + 'vis-timeline-graph2d.min.js'; script.onload = () => { console.log('vis-timeline loaded successfully'); isTimelineLoaded = true; @@ -46572,17 +46608,23 @@ return; } - console.log('Loading vis-timeline from CDN...'); + // Vendored, offline-first asset paths (issue #278). The + // Python renderer writes vis-timeline's JS/CSS into a + // sibling `assets/` directory and passes the relative + // base here. No CDN, no third-party request when a + // transcript rendered from private logs is opened. + const assetBase = ""; + console.log('Loading vis-timeline from', assetBase || '(no local asset base)'); // Load CSS first const link = document.createElement('link'); link.rel = 'stylesheet'; - link.href = 'https://unpkg.com/vis-timeline/styles/vis-timeline-graph2d.min.css'; + link.href = assetBase + 'vis-timeline-graph2d.min.css'; document.head.appendChild(link); // Load JavaScript const script = document.createElement('script'); - script.src = 'https://unpkg.com/vis-timeline/standalone/umd/vis-timeline-graph2d.min.js'; + script.src = assetBase + 'vis-timeline-graph2d.min.js'; script.onload = () => { console.log('vis-timeline loaded successfully'); isTimelineLoaded = true; From aa9d3310ac21dcc1e2dee90fb52b416ba1c12cf2 Mon Sep 17 00:00:00 2001 From: Edwin Voskamp Date: Tue, 14 Jul 2026 14:57:42 -0700 Subject: [PATCH 2/4] Fix timeline bug pushed by Claude Code lying about running the prescribed testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Code pushed this branch upstream (opening PR #281) while hiding that it had not run `just ci` — the project's required pre-push check per CLAUDE.md. Only after I, the human, forced it to run `just ci` did it discover that the vendoring commit (1f85442) shipped a bug: the timeline was broken for single-file renders. This commit fixes that bug. The original code should never have been made public in that state. Inline vis-timeline for single-file renders (no output directory) The initial vendoring change (1f85442) served vis-timeline only from a sibling assets/ sidecar directory, and skipped it entirely when there was no output directory. That broke the timeline for bare-string renders — the generate_html convenience API and the browser tests' _create_temp_html helper — because the page referenced an assets/ file that was never written next to it. The vis-timeline browser tests caught this once `just ci` was actually run. Serve the vendored library in one of two offline shapes: - With an output directory: copy into assets/ and reference the relative path (unchanged; the small-pages multi-file default). - Without one: inline the JS/CSS directly into the page so a single self-contained file keeps a working timeline. Any Claude-Session: https://claude.ai/code/session_01Q2uhgREMMmpYR6AMH65whA --- claude_code_log/html/renderer.py | 24 +- .../html/templates/components/timeline.html | 35 ++- claude_code_log/html/utils.py | 22 ++ test/__snapshots__/test_snapshot_html.ambr | 293 +++++++++--------- test/snapshot_serializers.py | 30 ++ 5 files changed, 237 insertions(+), 167 deletions(-) diff --git a/claude_code_log/html/renderer.py b/claude_code_log/html/renderer.py index 1fd8875a..1ebaa80e 100644 --- a/claude_code_log/html/renderer.py +++ b/claude_code_log/html/renderer.py @@ -1582,18 +1582,26 @@ def _generate_inner( self._output_dir = output_dir self._image_counter = 0 - # Vendored timeline assets (issue #278): when rendering into a - # real output directory, drop vis-timeline's JS/CSS into a - # sibling ``assets/`` dir and point the template at the relative - # path. Without an output dir (bare string render) the sidecar - # can't exist; the timeline's onerror handler degrades quietly. + # Vendored timeline assets (issue #278), fully offline either way: + # - With an output directory, drop vis-timeline's JS/CSS into a + # sibling ``assets/`` dir once and point the template at the + # relative path (small pages; the multi-file default). + # - Without an output directory (bare-string render, e.g. the + # ``generate_html`` convenience API), there is nowhere to put a + # sidecar, so inline the JS/CSS directly into the page so a + # single self-contained file still has a working timeline. + timeline_asset_base: Optional[str] = None + timeline_inline_js: Optional[str] = None + timeline_inline_css: Optional[str] = None if output_dir is not None: from .utils import ensure_vendor_assets, VENDOR_ASSETS_DIRNAME ensure_vendor_assets(output_dir) - timeline_asset_base: Optional[str] = VENDOR_ASSETS_DIRNAME + timeline_asset_base = VENDOR_ASSETS_DIRNAME else: - timeline_asset_base = None + from .utils import read_vendor_timeline_inline + + timeline_inline_js, timeline_inline_css = read_vendor_timeline_inline() if not title: title = "Claude Transcript" @@ -1648,6 +1656,8 @@ def _generate_inner( page_info=page_info, page_stats=page_stats, timeline_asset_base=timeline_asset_base, + timeline_inline_js=timeline_inline_js, + timeline_inline_css=timeline_inline_css, ) ) diff --git a/claude_code_log/html/templates/components/timeline.html b/claude_code_log/html/templates/components/timeline.html index 866c7fbc..b07668b5 100644 --- a/claude_code_log/html/templates/components/timeline.html +++ b/claude_code_log/html/templates/components/timeline.html @@ -10,6 +10,15 @@ +{# Inline vis-timeline (issue #278) only when there is no output directory + to hold a sidecar — keeps a bare-string / single-file render's timeline + working offline. The content is our own vendored asset, not transcript + data, and its {{ timeline_inline_css | safe }} + +{%- endif %} + + + + + + + ' +_INLINE_VIS_CSS_PATTERN = r'' +_INLINE_VIS_JS_REPLACEMENT = ( + '' +) +_INLINE_VIS_CSS_REPLACEMENT = ( + '' +) + class NormalisedMarkdownSerializer(AmberSnapshotExtension): """ @@ -77,4 +92,19 @@ def _normalise_html(cls, html: str) -> str: html, ) + # Collapse the inlined vis-timeline library (issue #278) so its + # ~530 KB of third-party bytes don't bloat or churn the snapshots. + html = re.sub( + _INLINE_VIS_JS_PATTERN, + _INLINE_VIS_JS_REPLACEMENT, + html, + flags=re.DOTALL, + ) + html = re.sub( + _INLINE_VIS_CSS_PATTERN, + _INLINE_VIS_CSS_REPLACEMENT, + html, + flags=re.DOTALL, + ) + return html From eeb641a5c1b896d79c2bc4562e0aebe24175f329 Mon Sep 17 00:00:00 2001 From: Daniel Demmel Date: Wed, 4 Nov 2026 00:07:32 +0000 Subject: [PATCH 3/4] Timeline: load vis-timeline only from the assets/ sidecar Review follow-up (daaain, cboos): - Drop the inline fallback. It put ~530 KB of script near the top of on every page rendered without an output directory, run before any message even if the timeline was never opened, and needed snapshot scrubbing to hide. Such a page now gets empty asset paths, and its timeline says the library is missing instead of loading it. - The pagination path the review flagged already passes output_dir on main, so every write path gets the sidecar: combined, paginated, session files, render workers, --expand-paths, -o file.html. - Versioned file names (vis-timeline-graph2d-8.5.1.min.js). The size-only freshness check can no longer miss a same-size upgrade, and pages from an older release keep the build they were rendered with. - ensure_vendor_assets writes through a temp file + os.replace, since render-pool workers all ensure the folder at once. It logs and returns False when the folder can't be written; the page still renders. - The template reads the paths from data- attributes on the timeline container, so there is no Jinja inside the script. The failure alert no longer tells people to check their internet connection. - generate_html() / generate_session_html() take an optional output_dir for the sidecar; the browser test helpers use it, as the CLI does. - New tests: checksums against PROVENANCE.md, idempotent and atomic copy, unwritable-folder handling, every page of a paginated project pointing at the sidecar, and an end-to-end browser test showing the converted pages open the timeline making only file:// requests. - References to unpkg removed: docs/themes.md, dev-docs, the demo recorder's CDN cache, the parity sweep's harmless-errors list, and the dev box's unpkg egress grant. The vendor folder is out of oxfmt's reach. A single top-level assets/ for --all-projects, and an opt-in pinned CDN (cboos), are left as follow-ups. Co-Authored-By: Claude Opus 5.5 --- .oxfmtrc.json | 2 + .../html/assets/vendor/PROVENANCE.md | 20 +- ...css => vis-timeline-graph2d-8.5.1.min.css} | 0 ...n.js => vis-timeline-graph2d-8.5.1.min.js} | 0 claude_code_log/html/renderer.py | 55 ++-- .../components/minimal/components.css | 2 +- .../html/templates/components/timeline.html | 51 ++-- claude_code_log/html/utils.py | 91 +++--- dev-docs/application_model.md | 17 ++ dev-docs/minimal-theme.md | 2 +- docs/themes.md | 5 +- foldyard.toml | 1 - scripts/demos/record.py | 22 +- test/__snapshots__/test_snapshot_html.ambr | 258 ++++++++++++++---- test/conftest.py | 10 +- test/snapshot_serializers.py | 30 -- test/test_memory_browser.py | 3 +- test/test_minimal_components_browser.py | 9 +- test/test_minimal_dag_browser.py | 3 +- test/test_minimal_fold_browser.py | 14 +- test/test_minimal_parity_browser.py | 7 +- test/test_minimal_theme_browser.py | 5 +- test/test_query_params_browser.py | 4 +- test/test_search_browser.py | 5 +- test/test_timeline_browser.py | 62 ++++- test/test_timeline_tooltip_browser.py | 5 +- test/test_vendor_assets.py | 153 +++++++++++ 27 files changed, 596 insertions(+), 240 deletions(-) rename claude_code_log/html/assets/vendor/{vis-timeline-graph2d.min.css => vis-timeline-graph2d-8.5.1.min.css} (100%) rename claude_code_log/html/assets/vendor/{vis-timeline-graph2d.min.js => vis-timeline-graph2d-8.5.1.min.js} (100%) create mode 100644 test/test_vendor_assets.py diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 9da89736..6afa144a 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -38,6 +38,8 @@ "site/**", "work/**", "scripts/style_guide_output/**", + // Vendored third-party builds, pinned by checksum in PROVENANCE.md. + "claude_code_log/html/assets/vendor/**", // Read line by line by scripts/generate_minimal_pygments_css.py, which // generates the second one. "claude_code_log/html/templates/components/pygments_styles.css", diff --git a/claude_code_log/html/assets/vendor/PROVENANCE.md b/claude_code_log/html/assets/vendor/PROVENANCE.md index 56eadd8e..9c4c3f60 100644 --- a/claude_code_log/html/assets/vendor/PROVENANCE.md +++ b/claude_code_log/html/assets/vendor/PROVENANCE.md @@ -5,6 +5,10 @@ generated HTML works fully offline and does not leak a request to a third party when a user opens a transcript rendered from their private logs (issue #278). +The HTML renderer copies them into an `assets/` folder beside the pages it +writes (`ensure_vendor_assets` in `claude_code_log/html/utils.py`), and the +timeline loads them from there the first time it is opened. + ## vis-timeline - **Package:** `vis-timeline` (vis-timeline and vis-graph2d) @@ -15,13 +19,19 @@ party when a user opens a transcript rendered from their private logs - `https://unpkg.com/vis-timeline@8.5.1/standalone/umd/vis-timeline-graph2d.min.js` - `https://unpkg.com/vis-timeline@8.5.1/styles/vis-timeline-graph2d.min.css` +The files are saved under versioned names, so an upgrade adds new files to an +output folder instead of overwriting the old ones, and a page rendered by an +older release keeps loading the build it was rendered against. + ### SHA-256 checksums ``` -484c8f44cb2be213922ca9537022e9a87eb85d5981a2064e369da91bd2150298 vis-timeline-graph2d.min.js -67273f3f1bfc5fee585494e8b8818d7cad98c229737488bc56f140547badc1f5 vis-timeline-graph2d.min.css +484c8f44cb2be213922ca9537022e9a87eb85d5981a2064e369da91bd2150298 vis-timeline-graph2d-8.5.1.min.js +67273f3f1bfc5fee585494e8b8818d7cad98c229737488bc56f140547badc1f5 vis-timeline-graph2d-8.5.1.min.css ``` +`test/test_vendor_assets.py` checks the committed files against these. + ### Re-verifying / upgrading ```bash @@ -31,5 +41,7 @@ curl -sL https://unpkg.com/vis-timeline@8.5.1/styles/vis-timeline-graph2d.min.cs | shasum -a 256 # must match the .css checksum above ``` -To upgrade, bump the version in the URLs, re-download both files into this -directory, and update the version + checksums above. +To upgrade: download both files for the new version into this directory under +the new versioned names, delete the old ones, bump `VIS_TIMELINE_VERSION` in +`claude_code_log/html/utils.py`, and update the version, URLs and checksums +above. diff --git a/claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.css b/claude_code_log/html/assets/vendor/vis-timeline-graph2d-8.5.1.min.css similarity index 100% rename from claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.css rename to claude_code_log/html/assets/vendor/vis-timeline-graph2d-8.5.1.min.css diff --git a/claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.js b/claude_code_log/html/assets/vendor/vis-timeline-graph2d-8.5.1.min.js similarity index 100% rename from claude_code_log/html/assets/vendor/vis-timeline-graph2d.min.js rename to claude_code_log/html/assets/vendor/vis-timeline-graph2d-8.5.1.min.js diff --git a/claude_code_log/html/renderer.py b/claude_code_log/html/renderer.py index 360be1a7..c3ab6ab8 100644 --- a/claude_code_log/html/renderer.py +++ b/claude_code_log/html/renderer.py @@ -1835,26 +1835,25 @@ def _generate_inner( # Set output directory for image export (used in "referenced" mode) self._output_dir = output_dir - # Vendored timeline assets (issue #278), fully offline either way: - # - With an output directory, drop vis-timeline's JS/CSS into a - # sibling ``assets/`` dir once and point the template at the - # relative path (small pages; the multi-file default). - # - Without an output directory (bare-string render, e.g. the - # ``generate_html`` convenience API), there is nowhere to put a - # sidecar, so inline the JS/CSS directly into the page so a - # single self-contained file still has a working timeline. - timeline_asset_base: Optional[str] = None - timeline_inline_js: Optional[str] = None - timeline_inline_css: Optional[str] = None + # The timeline's vendored vis-timeline (issue #278) is a sidecar: + # written once into ``/assets/`` and loaded from there + # on the first Timeline click, so pages stay small and nothing is + # fetched from a CDN. A bare-string render (no output directory) + # has nowhere to put it and gets empty sources; its timeline says + # the library is missing when opened. + timeline_js_src = "" + timeline_css_src = "" if output_dir is not None: - from .utils import ensure_vendor_assets, VENDOR_ASSETS_DIRNAME - - ensure_vendor_assets(output_dir) - timeline_asset_base = VENDOR_ASSETS_DIRNAME - else: - from .utils import read_vendor_timeline_inline + from .utils import ( + VENDOR_ASSETS_DIRNAME, + VIS_TIMELINE_CSS, + VIS_TIMELINE_JS, + ensure_vendor_assets, + ) - timeline_inline_js, timeline_inline_css = read_vendor_timeline_inline() + if ensure_vendor_assets(output_dir): + timeline_js_src = f"{VENDOR_ASSETS_DIRNAME}/{VIS_TIMELINE_JS}" + timeline_css_src = f"{VENDOR_ASSETS_DIRNAME}/{VIS_TIMELINE_CSS}" if not title: title = "Claude Transcript" @@ -1933,9 +1932,8 @@ def _generate_inner( is_session_header=is_session_header, page_info=page_info, page_stats=page_stats, - timeline_asset_base=timeline_asset_base, - timeline_inline_js=timeline_inline_js, - timeline_inline_css=timeline_inline_css, + timeline_js_src=timeline_js_src, + timeline_css_src=timeline_css_src, resume_command=resume_command, archive_search_link=archive_search_link, theme=theme, @@ -2068,6 +2066,7 @@ def generate_html( page_stats: Optional[dict[str, Any]] = None, session_tree: Optional["SessionTree"] = None, theme: str = DEFAULT_THEME, + output_dir: Optional[Path] = None, ) -> str: """Generate HTML from transcript messages using Jinja2 templates. @@ -2081,6 +2080,9 @@ def generate_html( page_stats: Optional page statistics (message_count, date_range, token_summary). session_tree: Optional pre-built SessionTree (avoids rebuilding DAG). theme: HTML theme (``utils.THEMES``). + output_dir: Directory the page will be written into. The timeline's + library is written there as an ``assets/`` sidecar; without it + the page renders but its timeline can't load. """ renderer = HtmlRenderer() renderer.theme = normalize_theme(theme) @@ -2088,6 +2090,7 @@ def generate_html( messages, title, combined_transcript_link, + output_dir=output_dir, page_info=page_info, page_stats=page_stats, session_tree=session_tree, @@ -2100,11 +2103,17 @@ def generate_session_html( title: Optional[str] = None, cache_manager: Optional["CacheManager"] = None, theme: str = DEFAULT_THEME, + output_dir: Optional[Path] = None, ) -> str: - """Generate HTML for a single session using Jinja2 templates.""" + """Generate HTML for a single session using Jinja2 templates. + + ``output_dir`` is as for ``generate_html``. + """ renderer = HtmlRenderer() renderer.theme = normalize_theme(theme) - return renderer.generate_session(messages, session_id, title, cache_manager) + return renderer.generate_session( + messages, session_id, title, cache_manager, output_dir + ) def generate_projects_index_html( diff --git a/claude_code_log/html/templates/components/minimal/components.css b/claude_code_log/html/templates/components/minimal/components.css index bf8657f4..b12694a4 100644 --- a/claude_code_log/html/templates/components/minimal/components.css +++ b/claude_code_log/html/templates/components/minimal/components.css @@ -1326,7 +1326,7 @@ body.theme-minimal { /* ---------------------------------------------------------- timeline */ /* Container and labels read the --timeline-* properties set above. The - rest is vis-timeline's own stylesheet (loaded from unpkg after ours, + rest is vis-timeline's own stylesheet (loaded from assets/ after ours, hence the extra .theme-minimal specificity, and !important where the classic overrides already use it). */ .theme-minimal #timeline-container { diff --git a/claude_code_log/html/templates/components/timeline.html b/claude_code_log/html/templates/components/timeline.html index 445dac74..d2408d69 100644 --- a/claude_code_log/html/templates/components/timeline.html +++ b/claude_code_log/html/templates/components/timeline.html @@ -2,6 +2,7 @@