pry-visualizer 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 08e6ce62c617b923d9476c85cd317a3fd9174e92
4
+ data.tar.gz: a56f7a1b4331d227a2b84fe57b898ffbbb872000
5
+ SHA512:
6
+ metadata.gz: ab7ec7c8073da4c11ebb22cbfd3f88bc067b2688aba877837eacd363477994b88f80cc9bf112c689d303797a35ac2731a7552dc52569afcca172695271f97bb8
7
+ data.tar.gz: 84873cf59106bdeb16131c55a51c44b5380e3c7bd288e127e93ce0c5154af29400fa4c596c3a28352af320afb827b042a01115d22e5d1eb5c3b972387ec83a93
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
13
+
14
+ node_modules/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.3
5
+ before_install: gem install bundler -v 1.14.5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in pry-visualizer.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Scott Pierce
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,53 @@
1
+ # Pry Visualizer
2
+
3
+ Visualize Pry results in your browser as commands are executed in a Pry console.
4
+
5
+ ## Usage
6
+
7
+ Default behavior it to auto detect result type and render as a single value,
8
+ JSON object or tabular grid view.
9
+
10
+
11
+ ## Design
12
+
13
+ ### Pry Hooks
14
+ + `when_started` starts a Puma server with Tubesock.
15
+ + `before_eval` captures initial command input.
16
+ + `after_eval` sets command results and sends data to socket as JSON.
17
+
18
+ ### Websocket Messages
19
+
20
+ + command
21
+ + id (numeric) :: sequential index of command executed in Pry
22
+ + code (string) :: code evaluated
23
+ + start (date time) :: when evaluation started
24
+ + end (date time) :: when code finished
25
+ + result (JSON) :: JSON results of evaluated code
26
+
27
+ ## Installation
28
+
29
+ Add this line to your application's Gemfile:
30
+
31
+ ```ruby
32
+ gem 'pry-visualizer'
33
+ ```
34
+
35
+ And then execute:
36
+
37
+ $ bundle
38
+
39
+ ## Development
40
+
41
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
42
+
43
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
44
+
45
+ ## Contributing
46
+
47
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ddrscott/pry-visualizer.
48
+
49
+
50
+ ## License
51
+
52
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
53
+
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+
5
+ # You can add fixtures and/or initialization code here to make experimenting
6
+ # with your gem easier. You can also use a different console, if you like.
7
+ require 'pry'
8
+ Pry.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1 @@
1
+ PORT=3002
@@ -0,0 +1,19 @@
1
+ # Pry Visualizer UI
2
+
3
+ ## Developing
4
+
5
+ > foreman start
6
+
7
+ In a browser go to http://localhost:3002/
8
+
9
+ ### How this works?
10
+
11
+ Browser -> Webpack Dev Server -> Rails Server
12
+
13
+ ## Building for production
14
+
15
+ > yarn build
16
+ > cd "where your rails app using sql_probe"
17
+ > bundle exec rails server
18
+
19
+ In a browser go to http://localhost:3002/
Binary file
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="shortcut icon" href="/favicon.ico"><title>SQL Probe</title><link href="main.css" rel="stylesheet"></head><body><div id="root"></div><script type="text/javascript" src="main.js"></script></body></html>
@@ -0,0 +1,2 @@
1
+ *{box-sizing:border-box}#root,.App,body,html{height:100%;width:100%}.App{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.App-panelSplit{height:3px;background:#ccc;cursor:ns-resize;position:relative;overflow:hidden}.App-panelDetails{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative;overflow:hidden}.EventTimeline{position:relative}.EventTimeline-eventSet .vis-item-content{bottom:0}.vis .overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-active{box-shadow:0 0 10px #86d5f8}.vis [class*=span]{min-height:0;width:auto}div.vis-configuration{position:relative;display:block;float:left;font-size:12px}div.vis-configuration-wrapper{display:block;width:700px}div.vis-configuration-wrapper:after{clear:both;content:"";display:block}div.vis-configuration.vis-config-option-container{display:block;width:495px;background-color:#fff;border:2px solid #f7f8fa;border-radius:4px;margin-top:20px;left:10px;padding-left:5px}div.vis-configuration.vis-config-button{display:block;width:495px;height:25px;vertical-align:middle;line-height:25px;background-color:#f7f8fa;border:2px solid #ceced0;border-radius:4px;margin-top:20px;left:10px;padding-left:5px;cursor:pointer;margin-bottom:30px}div.vis-configuration.vis-config-button.hover{background-color:#4588e6;border:2px solid #214373;color:#fff}div.vis-configuration.vis-config-item{display:block;float:left;width:495px;height:25px;vertical-align:middle;line-height:25px}div.vis-configuration.vis-config-item.vis-config-s2{left:10px;background-color:#f7f8fa;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s3{left:20px;background-color:#e4e9f0;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-item.vis-config-s4{left:30px;background-color:#cfd8e6;padding-left:5px;border-radius:3px}div.vis-configuration.vis-config-header{font-size:18px;font-weight:700}div.vis-configuration.vis-config-label{width:120px;height:25px;line-height:25px}div.vis-configuration.vis-config-label.vis-config-s3{width:110px}div.vis-configuration.vis-config-label.vis-config-s4{width:100px}div.vis-configuration.vis-config-colorBlock{top:1px;width:30px;height:19px;border:1px solid #444;border-radius:2px;padding:0;margin:0;cursor:pointer}input.vis-configuration.vis-config-checkbox{left:-5px}input.vis-configuration.vis-config-rangeinput{position:relative;top:-5px;width:60px;padding:1px;margin:0;pointer-events:none}input.vis-configuration.vis-config-range{-webkit-appearance:none;border:0 solid #fff;background-color:transparent;width:300px;height:20px}input.vis-configuration.vis-config-range::-webkit-slider-runnable-track{width:300px;height:5px;background:#dedede;background:linear-gradient(180deg,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:0 0 3px 0 #aaa;border-radius:3px}input.vis-configuration.vis-config-range::-webkit-slider-thumb{-webkit-appearance:none;border:1px solid #14334b;height:17px;width:17px;border-radius:50%;background:#3876c2;background:linear-gradient(180deg,#3876c2 0,#385380);box-shadow:0 0 1px 0 #111927;margin-top:-7px}input.vis-configuration.vis-config-range:focus{outline:0}input.vis-configuration.vis-config-range:focus::-webkit-slider-runnable-track{background:#9d9d9d;background:linear-gradient(180deg,#9d9d9d 0,#c8c8c8 99%)}input.vis-configuration.vis-config-range::-moz-range-track{width:300px;height:10px;background:#dedede;background:linear-gradient(180deg,#dedede 0,#c8c8c8 99%);border:1px solid #999;box-shadow:0 0 3px 0 #aaa;border-radius:3px}input.vis-configuration.vis-config-range::-moz-range-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:-moz-focusring{outline:1px solid #fff;outline-offset:-1px}input.vis-configuration.vis-config-range::-ms-track{width:300px;height:5px;background:0 0;border-color:transparent;border-width:6px 0;color:transparent}input.vis-configuration.vis-config-range::-ms-fill-lower{background:#777;border-radius:10px}input.vis-configuration.vis-config-range::-ms-fill-upper{background:#ddd;border-radius:10px}input.vis-configuration.vis-config-range::-ms-thumb{border:none;height:16px;width:16px;border-radius:50%;background:#385380}input.vis-configuration.vis-config-range:focus::-ms-fill-lower{background:#888}input.vis-configuration.vis-config-range:focus::-ms-fill-upper{background:#ccc}.vis-configuration-popup{position:absolute;background:rgba(57,76,89,.85);border:2px solid #f2faff;line-height:30px;height:30px;width:150px;text-align:center;color:#fff;font-size:14px;border-radius:4px;transition:opacity .3s ease-in-out}.vis-configuration-popup:after,.vis-configuration-popup:before{left:100%;top:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.vis-configuration-popup:after{border-color:rgba(136,183,213,0);border-left-color:rgba(57,76,89,.85);border-width:8px;margin-top:-8px}.vis-configuration-popup:before{border-color:rgba(194,225,245,0);border-left-color:#f2faff;border-width:12px;margin-top:-12px}div.vis-tooltip{position:absolute;visibility:hidden;padding:5px;white-space:nowrap;font-family:verdana;font-size:14px;color:#000;background-color:#f5f4ed;border-radius:3px;border:1px solid #808074;box-shadow:3px 3px 10px rgba(0,0,0,.2);pointer-events:none;z-index:5}.vis-current-time{background-color:#ff7f6e;width:2px;z-index:1;pointer-events:none}.vis-rolling-mode-btn{height:40px;width:40px;position:absolute;top:7px;right:20px;border-radius:50%;font-size:28px;cursor:pointer;opacity:.8;color:#fff;font-weight:700;text-align:center;background:#3876c2}.vis-rolling-mode-btn:before{content:"\26F6"}.vis-rolling-mode-btn:hover{opacity:1}.vis-custom-time{background-color:#6e94ff;width:2px;cursor:move;z-index:1}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-horizontal{position:absolute;width:100%;height:0;border-bottom:1px solid}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-minor{border-color:#e5e5e5}.vis-panel.vis-background.vis-horizontal .vis-grid.vis-major{border-color:#bfbfbf}.vis-data-axis .vis-y-axis.vis-major{width:100%;position:absolute;color:#4d4d4d;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-major.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-minor{position:absolute;width:100%;color:#bebebe;white-space:nowrap}.vis-data-axis .vis-y-axis.vis-minor.vis-measure{padding:0;margin:0;border:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title{position:absolute;color:#4d4d4d;white-space:nowrap;bottom:20px;text-align:center}.vis-data-axis .vis-y-axis.vis-title.vis-measure{padding:0;margin:0;visibility:hidden;width:auto}.vis-data-axis .vis-y-axis.vis-title.vis-left{bottom:0;-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left bottom;-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg)}.vis-data-axis .vis-y-axis.vis-title.vis-right{bottom:0;-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.vis-legend{background-color:rgba(247,252,255,.65);padding:5px;border:1px solid #b3b3b3;box-shadow:2px 2px 10px hsla(0,0%,60%,.55)}.vis-legend-text{white-space:nowrap;display:inline-block}.vis-item{position:absolute;color:#1a1a1a;border-color:#97b0f8;border-width:1px;background-color:#d5ddf6;display:inline-block;z-index:1}.vis-item.vis-selected{border-color:#ffc200;background-color:#fff785;z-index:2}.vis-editable.vis-selected{cursor:move}.vis-item.vis-point.vis-selected{background-color:#fff785}.vis-item.vis-box{text-align:center;border-style:solid;border-radius:2px}.vis-item.vis-point{background:0 0}.vis-item.vis-dot{position:absolute;padding:0;border-width:4px;border-style:solid;border-radius:4px}.vis-item.vis-range{border-style:solid;border-radius:2px;box-sizing:border-box}.vis-item.vis-background{border:none;background-color:rgba(213,221,246,.4);box-sizing:border-box;padding:0;margin:0}.vis-item .vis-item-overflow{position:relative;width:100%;height:100%;padding:0;margin:0;overflow:hidden}.vis-item-visible-frame{white-space:nowrap}.vis-item.vis-range .vis-item-content{position:relative;display:inline-block}.vis-item.vis-background .vis-item-content{position:absolute;display:inline-block}.vis-item.vis-line{padding:0;position:absolute;width:0;border-left-width:1px;border-left-style:solid}.vis-item .vis-item-content{white-space:nowrap;box-sizing:border-box;padding:5px}.vis-item .vis-onUpdateTime-tooltip{position:absolute;background:#4f81bd;color:#fff;width:200px;text-align:center;white-space:nowrap;padding:5px;border-radius:1px;transition:.4s;-o-transition:.4s;-moz-transition:.4s;-webkit-transition:.4s}.vis-item .vis-delete,.vis-item .vis-delete-rtl{position:absolute;top:0;width:24px;height:24px;box-sizing:border-box;padding:0 5px;cursor:pointer;transition:background .2s linear}.vis-item .vis-delete{right:-24px}.vis-item .vis-delete-rtl{left:-24px}.vis-item .vis-delete-rtl:after,.vis-item .vis-delete:after{content:"\D7";color:red;font-family:arial,sans-serif;font-size:22px;font-weight:700;transition:color .2s linear}.vis-item .vis-delete-rtl:hover,.vis-item .vis-delete:hover{background:red}.vis-item .vis-delete-rtl:hover:after,.vis-item .vis-delete:hover:after{color:#fff}.vis-item .vis-drag-center{position:absolute;width:100%;height:100%;top:0;left:0;cursor:move}.vis-item.vis-range .vis-drag-left{left:-4px;cursor:w-resize}.vis-item.vis-range .vis-drag-left,.vis-item.vis-range .vis-drag-right{position:absolute;width:24px;max-width:20%;min-width:2px;height:100%;top:0}.vis-item.vis-range .vis-drag-right{right:-4px;cursor:e-resize}.vis-range.vis-item.vis-readonly .vis-drag-left,.vis-range.vis-item.vis-readonly .vis-drag-right{cursor:auto}.vis-itemset{position:relative;padding:0;margin:0;box-sizing:border-box}.vis-itemset .vis-background,.vis-itemset .vis-foreground{position:absolute;width:100%;height:100%;overflow:visible}.vis-axis{position:absolute;width:100%;height:0;left:0;z-index:1}.vis-foreground .vis-group{position:relative;box-sizing:border-box;border-bottom:1px solid #bfbfbf}.vis-foreground .vis-group:last-child{border-bottom:none}.vis-nesting-group{cursor:pointer}.vis-nested-group{background:#f5f5f5}.vis-label.vis-nesting-group.expanded:before{content:"\25BC"}.vis-label.vis-nesting-group.collapsed-rtl:before{content:"\25C0"}.vis-label.vis-nesting-group.collapsed:before{content:"\25B6"}.vis-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.vis-labelset{overflow:hidden}.vis-labelset,.vis-labelset .vis-label{position:relative;box-sizing:border-box}.vis-labelset .vis-label{left:0;top:0;width:100%;color:#4d4d4d;border-bottom:1px solid #bfbfbf}.vis-labelset .vis-label.draggable{cursor:pointer}.vis-labelset .vis-label:last-child{border-bottom:none}.vis-labelset .vis-label .vis-inner{display:inline-block;padding:5px}.vis-labelset .vis-label .vis-inner.vis-hidden{padding:0}.vis-panel{position:absolute;padding:0;margin:0;box-sizing:border-box}.vis-panel.vis-bottom,.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right,.vis-panel.vis-top{border:1px #bfbfbf}.vis-panel.vis-center,.vis-panel.vis-left,.vis-panel.vis-right{border-top-style:solid;border-bottom-style:solid;overflow:hidden}.vis-left.vis-panel.vis-vertical-scroll,.vis-right.vis-panel.vis-vertical-scroll{height:100%;overflow-x:hidden;overflow-y:scroll}.vis-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{position:absolute;width:100%;height:1px;box-shadow:0 0 10px rgba(0,0,0,.8)}.vis-panel .vis-shadow.vis-top{top:-1px;left:0}.vis-panel .vis-shadow.vis-bottom{bottom:-1px;left:0}.vis-graph-group0{fill:#4f81bd;fill-opacity:0;stroke-width:2px;stroke:#4f81bd}.vis-graph-group1{fill:#f79646;fill-opacity:0;stroke-width:2px;stroke:#f79646}.vis-graph-group2{fill:#8c51cf;fill-opacity:0;stroke-width:2px;stroke:#8c51cf}.vis-graph-group3{fill:#75c841;fill-opacity:0;stroke-width:2px;stroke:#75c841}.vis-graph-group4{fill:#ff0100;fill-opacity:0;stroke-width:2px;stroke:#ff0100}.vis-graph-group5{fill:#37d8e6;fill-opacity:0;stroke-width:2px;stroke:#37d8e6}.vis-graph-group6{fill:#042662;fill-opacity:0;stroke-width:2px;stroke:#042662}.vis-graph-group7{fill:#00ff26;fill-opacity:0;stroke-width:2px;stroke:#00ff26}.vis-graph-group8{fill:#f0f;fill-opacity:0;stroke-width:2px;stroke:#f0f}.vis-graph-group9{fill:#8f3938;fill-opacity:0;stroke-width:2px;stroke:#8f3938}.vis-timeline .vis-fill{fill-opacity:.1;stroke:none}.vis-timeline .vis-bar{fill-opacity:.5;stroke-width:1px}.vis-timeline .vis-point{stroke-width:2px;fill-opacity:1}.vis-timeline .vis-legend-background{stroke-width:1px;fill-opacity:.9;fill:#fff;stroke:#c2c2c2}.vis-timeline .vis-outline{stroke-width:1px;fill-opacity:1;fill:#fff;stroke:#e5e5e5}.vis-timeline .vis-icon-fill{fill-opacity:.3;stroke:none}.vis-time-axis{position:relative;overflow:hidden}.vis-time-axis.vis-foreground{top:0;left:0;width:100%}.vis-time-axis.vis-background{position:absolute;top:0;left:0;width:100%;height:100%}.vis-time-axis .vis-text{position:absolute;color:#4d4d4d;padding:3px;overflow:hidden;box-sizing:border-box;white-space:nowrap}.vis-time-axis .vis-text.vis-measure{position:absolute;padding-left:0;padding-right:0;margin-left:0;margin-right:0;visibility:hidden}.vis-time-axis .vis-grid.vis-vertical{position:absolute;border-left:1px solid}.vis-time-axis .vis-grid.vis-vertical-rtl{position:absolute;border-right:1px solid}.vis-time-axis .vis-grid.vis-minor{border-color:#e5e5e5}.vis-time-axis .vis-grid.vis-major{border-color:#bfbfbf}.vis-timeline{position:relative;border:1px solid #bfbfbf;overflow:hidden;padding:0;margin:0;box-sizing:border-box}.Code .CodeMirror{height:100%;width:100%;position:absolute}.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:-20px;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.EventDetails{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.EventDetails-sql,.EventDetails-sql .CodeMirror{height:100%}.EventDetails-panelHeader{font-size:12px;padding:6px 8px;border-bottom:1px solid #ddd;background:#f8f8f8}.EventDetails-stack{overflow:hidden;position:relative;height:100%}.EventDetails-code{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.EventDetails-ruby{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative;overflow:hidden}.StackTrace{overflow:scroll;height:100%;width:100%}.StackTrace input[type=radio]{display:none}.StackTrace input[type=radio]:checked+label{color:#000}.StackTrace input[type=radio]:checked+label:before,.StackTrace label:hover:before{border-style:solid;border-width:4px 4px 0 0;content:"";display:block;height:6px;position:absolute;top:50%;width:6px;left:2px;-webkit-transform:rotate(45deg) translateY(-6px);-ms-transform:rotate(45deg) translateY(-6px);transform:rotate(45deg) translateY(-6px);color:#49f!important}.StackTrace label{display:block;padding:10px 10px 10px 30px;color:#555;position:relative;cursor:pointer}.StackTrace label:hover{background:rgba(213,221,246,.4)}.StackTrace label:hover:before{color:rgba(0,0,0,.15)!important}.StackTrace input[type=radio]:checked+label:before{color:#000}.StackTrace fieldset{margin:0;border:0;padding:0}.StackTrace-call{font-size:12px;border-bottom:1px solid #eee}.StackTrace-call:nth-child(2n){background:#f8f8f8}.PanelSplit{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;width:100%;position:absolute}.PanelSplit-resizer{height:1px;background:#aaa;cursor:ns-resize;position:relative}.PanelSplit-resizer:before{content:"";position:absolute;top:-3px;bottom:-3px;right:-3px;left:-3px;z-index:999;background:hsla(0,0%,100%,.1)}.PanelSplit-resizer--horizontal{height:100%;width:1px;position:relative;cursor:ew-resize}.PanelSplit-a,.PanelSplit-b{overflow:hidden}.PanelSplit-b{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;position:relative}body{margin:0;padding:0;font-family:sans-serif}
2
+ /*# sourceMappingURL=main.f8ad734e.css.map*/
@@ -0,0 +1,26 @@
1
+ !function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="/",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var n=e.slice(1),i=t[e[0]];return function(t,e,r){i.apply(this,[t,e,r].concat(n))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,n){n(188),t.exports=n(88)},function(t,e,n){"use strict";function i(t,e,n,i,o,s,a,l){if(r(e),!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,i,o,s,a,l],d=0;u=new Error(e.replace(/%s/g,function(){return c[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}}var r=function(t){};t.exports=i},function(t,e,n){"use strict";var i=n(7),r=i;t.exports=r},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,i=0;i<e;i++)n+="&args[]="+encodeURIComponent(arguments[i+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var r=new Error(n);throw r.name="Invariant Violation",r.framesToPop=1,r}t.exports=n},function(t,e){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function i(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=i()?Object.assign:function(t,e){for(var i,a,l=n(t),u=1;u<arguments.length;u++){i=Object(arguments[u]);for(var c in i)o.call(i,c)&&(l[c]=i[c]);if(r){a=r(i);for(var d=0;d<a.length;d++)s.call(i,a[d])&&(l[a[d]]=i[a[d]])}}return l}},function(t,e,n){"use strict";function i(t,e){return 1===t.nodeType&&t.getAttribute(f)===String(e)||8===t.nodeType&&t.nodeValue===" react-text: "+e+" "||8===t.nodeType&&t.nodeValue===" react-empty: "+e+" "}function r(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var n=r(t);n._hostNode=e,e[g]=n}function s(t){var e=t._hostNode;e&&(delete e[g],t._hostNode=null)}function a(t,e){if(!(t._flags&m.hasCachedChildNodes)){var n=t._renderedChildren,s=e.firstChild;t:for(var a in n)if(n.hasOwnProperty(a)){var l=n[a],u=r(l)._domID;if(0!==u){for(;null!==s;s=s.nextSibling)if(i(s,u)){o(l,s);continue t}d("32",u)}}t._flags|=m.hasCachedChildNodes}}function l(t){if(t[g])return t[g];for(var e=[];!t[g];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,i;t&&(i=t[g]);t=e.pop())n=i,e.length&&a(i,t);return n}function u(t){var e=l(t);return null!=e&&e._hostNode===t?e:null}function c(t){if(void 0===t._hostNode?d("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:d("34"),t=t._hostParent;for(;e.length;t=e.pop())a(t,t._hostNode);return t._hostNode}var d=n(3),h=n(16),p=n(63),f=(n(1),h.ID_ATTRIBUTE_NAME),m=p,g="__reactInternalInstance$"+Math.random().toString(36).slice(2),v={getClosestInstanceFromNode:l,getInstanceFromNode:u,getNodeFromInstance:c,precacheChildNodes:a,precacheNode:o,uncacheNode:s};t.exports=v},function(t,e){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};t.exports=i},function(t,e){"use strict";function n(t){return function(){return t}}var i=function(){};i.thatReturns=n,i.thatReturnsFalse=n(!1),i.thatReturnsTrue=n(!0),i.thatReturnsNull=n(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},function(t,e,n){"use strict";var i=null;t.exports={debugTool:i}},function(t,e,n){"use strict";function i(){M.ReactReconcileTransaction&&_?void 0:c("123")}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=h.getPooled(),this.reconcileTransaction=M.ReactReconcileTransaction.getPooled(!0)}function o(t,e,n,r,o,s){return i(),_.batchedUpdates(t,e,n,r,o,s)}function s(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==v.length?c("124",e,v.length):void 0,v.sort(s),y++;for(var n=0;n<e;n++){var i=v[n],r=i._pendingCallbacks;i._pendingCallbacks=null;var o;if(f.logTopLevelRenders){var a=i;i._currentElement.type.isReactTopLevelWrapper&&(a=i._renderedComponent),o="React update: "+a.getName(),console.time(o)}if(m.performUpdateIfNecessary(i,t.reconcileTransaction,y),o&&console.timeEnd(o),r)for(var l=0;l<r.length;l++)t.callbackQueue.enqueue(r[l],i.getPublicInstance())}}function l(t){return i(),_.isBatchingUpdates?(v.push(t),void(null==t._updateBatchNumber&&(t._updateBatchNumber=y+1))):void _.batchedUpdates(l,t)}function u(t,e){_.isBatchingUpdates?void 0:c("125"),b.enqueue(t,e),w=!0}var c=n(3),d=n(4),h=n(61),p=n(14),f=n(66),m=n(17),g=n(28),v=(n(1),[]),y=0,b=h.getPooled(),w=!1,_=null,x={initialize:function(){this.dirtyComponentsLength=v.length},close:function(){this.dirtyComponentsLength!==v.length?(v.splice(0,this.dirtyComponentsLength),S()):v.length=0}},k={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},C=[x,k];d(r.prototype,g,{getTransactionWrappers:function(){return C},destructor:function(){this.dirtyComponentsLength=null,h.release(this.callbackQueue),this.callbackQueue=null,M.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(t,e,n){return g.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,t,e,n)}}),p.addPoolingTo(r);var S=function(){for(;v.length||w;){if(v.length){var t=r.getPooled();t.perform(a,null,t),r.release(t)}if(w){w=!1;var e=b;b=h.getPooled(),e.notifyAll(),h.release(e)}}},T={injectReconcileTransaction:function(t){t?void 0:c("126"),M.ReactReconcileTransaction=t},injectBatchingStrategy:function(t){t?void 0:c("127"),"function"!=typeof t.batchedUpdates?c("128"):void 0,"boolean"!=typeof t.isBatchingUpdates?c("129"):void 0,_=t}},M={ReactReconcileTransaction:null,batchedUpdates:o,enqueueUpdate:l,flushBatchedUpdates:S,injection:T,asap:u};t.exports=M},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function i(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o<e.length;++o)r.appendChild(e[o]);return r}function r(t,e,n,r){var o=i(t,e,n,r);return o.setAttribute("role","presentation"),o}function o(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do if(11==e.nodeType&&(e=e.host),e==t)return!0;while(e=e.parentNode)}function s(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function a(e,n){var i=e.className;t(n).test(i)||(e.className+=(i?" ":"")+n)}function l(e,n){for(var i=e.split(" "),r=0;r<i.length;r++)i[r]&&!t(i[r]).test(n)&&(n+=" "+i[r]);return n}function u(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function c(t,e,n){e||(e={});for(var i in t)!t.hasOwnProperty(i)||n===!1&&e.hasOwnProperty(i)||(e[i]=t[i]);return e}function d(t,e,n,i,r){null==e&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));for(var o=i||0,s=r||0;;){var a=t.indexOf("\t",o);if(a<0||a>=e)return s+(e-o);s+=a-o,s+=n-s%n,o=a+1}}function h(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return-1}function p(t,e,n){for(var i=0,r=0;;){var o=t.indexOf("\t",i);o==-1&&(o=t.length);var s=o-i;if(o==t.length||r+s>=e)return i+Math.min(s,e-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=e)return i}}function f(t){for(;Ds.length<=t;)Ds.push(m(Ds)+" ");return Ds[t]}function m(t){return t[t.length-1]}function g(t,e){for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i],i);return n}function v(t,e,n){for(var i=0,r=n(e);i<t.length&&n(t[i])<=r;)i++;t.splice(i,0,e)}function y(){}function b(t,e){var n;return Object.create?n=Object.create(t):(y.prototype=t,n=new y),e&&c(e,n),n}function w(t){return/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||Es.test(t))}function _(t,e){return e?!!(e.source.indexOf("\\w")>-1&&w(t))||e.test(t):w(t)}function x(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function k(t){return t.charCodeAt(0)>=768&&Os.test(t)}function C(t,e,n){for(;(n<0?e>0:e<t.length)&&k(t.charAt(e));)e+=n;return e}function S(t,e,n){for(;;){if(Math.abs(e-n)<=1)return t(e)?e:n;var i=Math.floor((e+n)/2);t(i)?n=i:e=i}}function T(t,e,n){var o=this;this.input=n,o.scrollbarFiller=i("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=i("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=r("div",null,"CodeMirror-code"),o.selectionDiv=i("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=i("div",null,"CodeMirror-cursors"),o.measure=i("div",null,"CodeMirror-measure"),o.lineMeasure=i("div",null,"CodeMirror-measure"),o.lineSpace=r("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var s=r("div",[o.lineSpace],"CodeMirror-lines");o.mover=i("div",[s],null,"position: relative"),o.sizer=i("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=i("div",null,null,"position: absolute; height: "+ks+"px; width: 1px;"),o.gutters=i("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=i("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=i("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),Jo&&ts<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),es||Xo&&cs||(o.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(o.wrapper):t(o.wrapper)),o.viewFrom=o.viewTo=e.first,o.reportedViewFrom=o.reportedViewTo=e.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function M(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e<o){n=r;break}e-=o}return n.lines[e]}function D(t,e,n){var i=[],r=e.line;return t.iter(e.line,n.line+1,function(t){var o=t.text;r==n.line&&(o=o.slice(0,n.ch)),r==e.line&&(o=o.slice(e.ch)),i.push(o),++r}),i}function E(t,e,n){var i=[];return t.iter(e,n,function(t){i.push(t.text)}),i}function O(t,e){var n=e-t.height;if(n)for(var i=t;i;i=i.parent)i.height+=n}function P(t){if(null==t.parent)return null;for(var e=t.parent,n=h(e.lines,t),i=e.parent;i;e=i,i=i.parent)for(var r=0;i.children[r]!=e;++r)n+=i.children[r].chunkSize();return n+e.first}function N(t,e){var n=t.first;t:do{for(var i=0;i<t.children.length;++i){var r=t.children[i],o=r.height;if(e<o){t=r;continue t}e-=o,n+=r.chunkSize()}return n}while(!t.lines);for(var s=0;s<t.lines.length;++s){var a=t.lines[s],l=a.height;if(e<l)break;e-=l}return n+s}function A(t,e){return e>=t.first&&e<t.first+t.size}function I(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function L(t,e,n){return void 0===n&&(n=null),this instanceof L?(this.line=t,this.ch=e,void(this.sticky=n)):new L(t,e,n)}function R(t,e){return t.line-e.line||t.ch-e.ch}function F(t,e){return t.sticky==e.sticky&&0==R(t,e)}function j(t){return L(t.line,t.ch)}function H(t,e){return R(t,e)<0?e:t}function W(t,e){return R(t,e)<0?t:e}function z(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function U(t,e){if(e.line<t.first)return L(t.first,0);var n=t.first+t.size-1;return e.line>n?L(n,M(t,n).text.length):B(e,M(t,e.line).text.length)}function B(t,e){var n=t.ch;return null==n||n>e?L(t.line,e):n<0?L(t.line,0):t}function Y(t,e){for(var n=[],i=0;i<e.length;i++)n[i]=U(t,e[i]);return n}function V(){Ps=!0}function G(){Ns=!0}function q(t,e,n){this.marker=t,this.from=e,this.to=n}function K(t,e){if(t)for(var n=0;n<t.length;++n){var i=t[n];if(i.marker==e)return i}}function X(t,e){for(var n,i=0;i<t.length;++i)t[i]!=e&&(n||(n=[])).push(t[i]);return n}function $(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}function Z(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var o=t[r],s=o.marker,a=null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e);if(a||o.from==e&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(s.inclusiveRight?o.to>=e:o.to>e);(i||(i=[])).push(new q(s,o.from,l?null:o.to))}}return i}function Q(t,e,n){var i;if(t)for(var r=0;r<t.length;++r){var o=t[r],s=o.marker,a=null==o.to||(s.inclusiveRight?o.to>=e:o.to>e);if(a||o.from==e&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=e:o.from<e);(i||(i=[])).push(new q(s,l?null:o.from-e,null==o.to?null:o.to-e))}}return i}function J(t,e){if(e.full)return null;var n=A(t,e.from.line)&&M(t,e.from.line).markedSpans,i=A(t,e.to.line)&&M(t,e.to.line).markedSpans;if(!n&&!i)return null;var r=e.from.ch,o=e.to.ch,s=0==R(e.from,e.to),a=Z(n,r,s),l=Q(i,o,s),u=1==e.text.length,c=m(e.text).length+(u?r:0);if(a)for(var d=0;d<a.length;++d){var h=a[d];if(null==h.to){var p=K(l,h.marker);p?u&&(h.to=null==p.to?null:p.to+c):h.to=r}}if(l)for(var f=0;f<l.length;++f){var g=l[f];if(null!=g.to&&(g.to+=c),null==g.from){var v=K(a,g.marker);v||(g.from=c,u&&(a||(a=[])).push(g))}else g.from+=c,u&&(a||(a=[])).push(g)}a&&(a=tt(a)),l&&l!=a&&(l=tt(l));var y=[a];if(!u){var b,w=e.text.length-2;if(w>0&&a)for(var _=0;_<a.length;++_)null==a[_].to&&(b||(b=[])).push(new q(a[_].marker,null,null));for(var x=0;x<w;++x)y.push(b);y.push(l)}return y}function tt(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&t.splice(e--,1)}return t.length?t:null}function et(t,e,n){var i=null;if(t.iter(e.line,n.line+1,function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;!n.readOnly||i&&h(i,n)!=-1||(i||(i=[])).push(n)}}),!i)return null;for(var r=[{from:e,to:n}],o=0;o<i.length;++o)for(var s=i[o],a=s.find(0),l=0;l<r.length;++l){var u=r[l];if(!(R(u.to,a.from)<0||R(u.from,a.to)>0)){var c=[l,1],d=R(u.from,a.from),p=R(u.to,a.to);(d<0||!s.inclusiveLeft&&!d)&&c.push({from:u.from,to:a.from}),(p>0||!s.inclusiveRight&&!p)&&c.push({from:a.to,to:u.to}),r.splice.apply(r,c),l+=c.length-3}}return r}function nt(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function it(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function rt(t){return t.inclusiveLeft?-1:0}function ot(t){return t.inclusiveRight?1:0}function st(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var i=t.find(),r=e.find(),o=R(i.from,r.from)||rt(t)-rt(e);if(o)return-o;var s=R(i.to,r.to)||ot(t)-ot(e);return s?s:e.id-t.id}function at(t,e){var n,i=Ns&&t.markedSpans;if(i)for(var r=void 0,o=0;o<i.length;++o)r=i[o],r.marker.collapsed&&null==(e?r.from:r.to)&&(!n||st(n,r.marker)<0)&&(n=r.marker);return n}function lt(t){return at(t,!0)}function ut(t){return at(t,!1)}function ct(t,e,n,i,r){var o=M(t,e),s=Ns&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var u=l.marker.find(0),c=R(u.from,n)||rt(l.marker)-rt(r),d=R(u.to,i)||ot(l.marker)-ot(r);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?R(u.to,n)>=0:R(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?R(u.from,i)<=0:R(u.from,i)<0)))return!0}}}function dt(t){for(var e;e=lt(t);)t=e.find(-1,!0).line;return t}function ht(t){for(var e;e=ut(t);)t=e.find(1,!0).line;return t}function pt(t){for(var e,n;e=ut(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function ft(t,e){var n=M(t,e),i=dt(n);return n==i?e:P(i)}function mt(t,e){if(e>t.lastLine())return e;var n,i=M(t,e);if(!gt(t,i))return e;for(;n=ut(i);)i=n.find(1,!0).line;return P(i)+1}function gt(t,e){var n=Ns&&e.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if(i=n[r],i.marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&vt(t,e,i))return!0}}function vt(t,e,n){if(null==n.to){var i=n.marker.find(1,!0);return vt(t,i.line,K(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==e.text.length)return!0;for(var r=void 0,o=0;o<e.markedSpans.length;++o)if(r=e.markedSpans[o],r.marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&vt(t,e,r))return!0}function yt(t){t=dt(t);for(var e=0,n=t.parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==t)break;e+=r.height}for(var o=n.parent;o;n=o,o=n.parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==n)break;e+=a.height}return e}function bt(t){if(0==t.height)return 0;for(var e,n=t.text.length,i=t;e=lt(i);){var r=e.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=t;e=ut(i);){var o=e.find(0,!0);n-=i.text.length-o.from.ch,i=o.to.line,n+=i.text.length-o.to.ch}return n}function wt(t){var e=t.display,n=t.doc;e.maxLine=M(n,n.first),e.maxLineLength=bt(e.maxLine),e.maxLineChanged=!0,n.iter(function(t){var n=bt(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function _t(t,e,n,i){if(!t)return i(e,n,"ltr");for(var r=!1,o=0;o<t.length;++o){var s=t[o];(s.from<n&&s.to>e||e==n&&s.to==e)&&(i(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(e,n,"ltr")}function xt(t,e,n){var i;As=null;for(var r=0;r<t.length;++r){var o=t[r];if(o.from<e&&o.to>e)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:As=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:As=r)}return null!=i?i:As}function kt(t,e){var n=t.order;return null==n&&(n=t.order=Is(t.text,e)),n}function Ct(t,e,n){var i=C(t.text,e+n,n);return i<0||i>t.text.length?null:i}function St(t,e,n){var i=Ct(t,e.ch,n);return null==i?null:new L(e.line,i,n<0?"after":"before")}function Tt(t,e,n,i,r){if(t){var o=kt(n,e.doc.direction);if(o){var s,a=r<0?m(o):o[0],l=r<0==(1==a.level),u=l?"after":"before";if(a.level>0){var c=$e(e,n);s=r<0?n.text.length-1:0;var d=Ze(e,c,s).top;s=S(function(t){return Ze(e,c,t).top==d},r<0==(1==a.level)?a.from:a.to-1,s),"before"==u&&(s=Ct(n,s,1,!0))}else s=r<0?a.to:a.from;return new L(i,s,u)}}return new L(i,r<0?n.text.length:0,r<0?"before":"after")}function Mt(t,e,n,i){var r=kt(e,t.doc.direction);if(!r)return St(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=xt(r,n.ch,n.sticky),s=r[o];if("ltr"==t.doc.direction&&s.level%2==0&&(i>0?s.to>n.ch:s.from<n.ch))return St(e,n,i);var a,l=function(t,n){return Ct(e,t instanceof L?t.ch:t,n)},u=function(n){return t.options.lineWrapping?(a=a||$e(t,e),gn(t,e,a,n)):{begin:0,end:e.text.length}},c=u("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==s.level){var d=1==s.level==i<0,h=l(n,d?1:-1);if(null!=h&&(d?h<=s.to&&h<=c.end:h>=s.from&&h>=c.begin)){var p=d?"before":"after";return new L(n.line,h,p)}}var f=function(t,e,i){for(var o=function(t,e){return e?new L(n.line,l(t,1),"before"):new L(n.line,t,"after")};t>=0&&t<r.length;t+=e){var s=r[t],a=e>0==(1!=s.level),u=a?i.begin:l(i.end,-1);if(s.from<=u&&u<s.to)return o(u,a);if(u=a?s.from:l(s.to,-1),i.begin<=u&&u<i.end)return o(u,a)}},m=f(o+i,i,c);if(m)return m;var g=i>0?c.end:l(c.begin,-1);return null==g||i>0&&g==e.text.length||!(m=f(i>0?0:r.length-1,i,u(g)))?null:m}function Dt(t,e){return t._handlers&&t._handlers[e]||Ls}function Et(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var i=t._handlers,r=i&&i[e];if(r){var o=h(r,n);o>-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function Ot(t,e){var n=Dt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)}function Pt(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),Ot(t,n||e.type,t,e),Ft(e)||e.codemirrorIgnore}function Nt(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),i=0;i<e.length;++i)h(n,e[i])==-1&&n.push(e[i])}function At(t,e){return Dt(t,e).length>0}function It(t){t.prototype.on=function(t,e){Rs(this,t,e)},t.prototype.off=function(t,e){Et(this,t,e)}}function Lt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Rt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ft(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function jt(t){Lt(t),Rt(t)}function Ht(t){return t.target||t.srcElement}function Wt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),ds&&t.ctrlKey&&1==e&&(e=3),e}function zt(t){if(null==_s){var e=i("span","​");n(t,i("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(_s=e.offsetWidth<=1&&e.offsetHeight>2&&!(Jo&&ts<8))}var r=_s?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ut(t){if(null!=xs)return xs;var i=n(t,document.createTextNode("AخA")),r=ms(i,0,1).getBoundingClientRect(),o=ms(i,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(xs=o.right-r.right<3)}function Bt(t){if(null!=zs)return zs;var e=n(t,i("span","x")),r=e.getBoundingClientRect(),o=ms(e,0,1).getBoundingClientRect();return zs=Math.abs(r.left-o.left)>1}function Yt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Us[t]=e}function Vt(t,e){Bs[t]=e}function Gt(t){if("string"==typeof t&&Bs.hasOwnProperty(t))t=Bs[t];else if(t&&"string"==typeof t.name&&Bs.hasOwnProperty(t.name)){var e=Bs[t.name];"string"==typeof e&&(e={name:e}),t=b(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Gt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Gt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function qt(t,e){e=Gt(e);var n=Us[e.name];if(!n)return qt(t,"text/plain");var i=n(t,e);if(Ys.hasOwnProperty(e.name)){var r=Ys[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)i[s]=e.modeProps[s];return i}function Kt(t,e){var n=Ys.hasOwnProperty(t)?Ys[t]:Ys[t]={};c(e,n)}function Xt(t,e){if(e===!0)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function $t(t,e){for(var n;t.innerMode&&(n=t.innerMode(e),n&&n.mode!=t);)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Zt(t,e,n){return!t.startState||t.startState(e,n)}function Qt(t,e,n,i){var r=[t.state.modeGen],o={};se(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},o,i);for(var s=function(n){var i=t.state.overlays[n],s=1,a=0;se(t,e.text,i.mode,!0,function(t,e){for(var n=s;a<t;){var o=r[s];o>t&&r.splice(s,1,t,r[s+1],o),s+=2,a=Math.min(t,o)}if(e)if(i.opaque)r.splice(n,s-n,t,"overlay "+e),s=n+2;else for(;n<s;n+=2){var l=r[n+1];r[n+1]=(l?l+" ":"")+"overlay "+e}},o)},a=0;a<t.state.overlays.length;++a)s(a);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function Jt(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var i=te(t,P(e)),r=Qt(t,e,e.text.length>t.options.maxHighlightLength?Xt(t.doc.mode,i):i);e.stateAfter=i,e.styles=r.styles,r.classes?e.styleClasses=r.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.frontier&&t.doc.frontier++}return e.styles}function te(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return!0;var o=ae(t,e,n),s=o>i.first&&M(i,o-1).stateAfter;return s=s?Xt(i.mode,s):Zt(i.mode),i.iter(o,e,function(n){ee(t,n.text,s);var a=o==e-1||o%5==0||o>=r.viewFrom&&o<r.viewTo;n.stateAfter=a?Xt(i.mode,s):null,++o}),n&&(i.frontier=o),s}function ee(t,e,n,i){var r=t.doc.mode,o=new Vs(e,t.options.tabSize);for(o.start=o.pos=i||0,""==e&&ne(r,n);!o.eol();)ie(r,o,n),o.start=o.pos}function ne(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=$t(t,e);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function ie(t,e,n,i){for(var r=0;r<10;r++){i&&(i[0]=$t(t,n).mode);var o=t.token(e,n);if(e.pos>e.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}function re(t,e,n,i){var r,o=function(t){return{start:d.start,end:d.pos,string:d.current(),type:r||null,state:t?Xt(s.mode,c):c}},s=t.doc,a=s.mode;e=U(s,e);var l,u=M(s,e.line),c=te(t,e.line,n),d=new Vs(u.text,t.options.tabSize);for(i&&(l=[]);(i||d.pos<e.ch)&&!d.eol();)d.start=d.pos,r=ie(a,d,c),i&&l.push(o(!0));return i?l:o()}function oe(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==e[i]?e[i]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(e[i])||(e[i]+=" "+n[2])}return t}function se(t,e,n,i,r,o,s){var a=n.flattenSpans;null==a&&(a=t.options.flattenSpans);var l,u=0,c=null,d=new Vs(e,t.options.tabSize),h=t.options.addModeClass&&[null];for(""==e&&oe(ne(n,i),o);!d.eol();){if(d.pos>t.options.maxHighlightLength?(a=!1,s&&ee(t,e,i,d.pos),d.pos=e.length,l=null):l=oe(ie(n,d,i,h),o),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!a||c!=l){for(;u<d.start;)u=Math.min(d.start,u+5e3),r(u,c);c=l}d.start=d.pos}for(;u<d.pos;){var f=Math.min(d.pos,u+5e3);r(f,c),u=f}}function ae(t,e,n){for(var i,r,o=t.doc,s=n?-1:e-(t.doc.mode.innerMode?1e3:100),a=e;a>s;--a){if(a<=o.first)return o.first;var l=M(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var u=d(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function le(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),nt(t),it(t,n);var r=i?i(t):1;r!=t.height&&O(t,r)}function ue(t){t.parent=null,nt(t)}function ce(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?Xs:Ks;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function de(t,e){var n=r("span",null,null,es?"padding-right: .1px":null),i={pre:r("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:(Jo||es)&&t.getOption("lineWrapping")};e.measure={};for(var o=0;o<=(e.rest?e.rest.length:0);o++){var s=o?e.rest[o-1]:e.line,a=void 0;i.pos=0,i.addToken=pe,Ut(t.display.measure)&&(a=kt(s,t.doc.direction))&&(i.addToken=me(i.addToken,a)),i.map=[];var u=e!=t.display.externalMeasured&&P(s);ve(s,i,Jt(t,s,u)),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=l(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=l(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(zt(t.display.measure))),0==o?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(es){var c=i.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Ot(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=l(i.pre.className,i.textClass||"")),i}function he(t){var e=i("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function pe(t,e,n,r,o,s,a){if(e){var l,u=t.splitSpaces?fe(e,t.trailingSpace):e,c=t.cm.state.specialChars,d=!1;if(c.test(e)){l=document.createDocumentFragment();for(var h=0;;){c.lastIndex=h;var p=c.exec(e),m=p?p.index-h:e.length-h;if(m){var g=document.createTextNode(u.slice(h,h+m));Jo&&ts<9?l.appendChild(i("span",[g])):l.appendChild(g),t.map.push(t.pos,t.pos+m,g),t.col+=m,t.pos+=m}if(!p)break;h+=m+1;var v=void 0;if("\t"==p[0]){var y=t.cm.options.tabSize,b=y-t.col%y;v=l.appendChild(i("span",f(b),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=b}else"\r"==p[0]||"\n"==p[0]?(v=l.appendChild(i("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",p[0]),t.col+=1):(v=t.cm.options.specialCharPlaceholder(p[0]),v.setAttribute("cm-text",p[0]),Jo&&ts<9?l.appendChild(i("span",[v])):l.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,l=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,l),Jo&&ts<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||r||o||d||a){var w=n||"";r&&(w+=r),o&&(w+=o);var _=i("span",[l],w,a);return s&&(_.title=s),t.content.appendChild(_)}t.content.appendChild(l)}}function fe(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,i="",r=0;r<t.length;r++){var o=t.charAt(r);" "!=o||!n||r!=t.length-1&&32!=t.charCodeAt(r+1)||(o=" "),i+=o,n=" "==o}return i}function me(t,e){return function(n,i,r,o,s,a,l){r=r?r+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+i.length;;){for(var d=void 0,h=0;h<e.length&&(d=e[h],!(d.to>u&&d.from<=u));h++);if(d.to>=c)return t(n,i,r,o,s,a,l);t(n,i.slice(0,d.to-u),r,o,null,a,l),o=null,i=i.slice(d.to-u),u=d.to}}}function ge(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function ve(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var s,a,l,u,c,d,h,p=r.length,f=0,m=1,g="",v=0;;){if(v==f){l=u=c=d=a="",h=null,v=1/0;for(var y=[],b=void 0,w=0;w<i.length;++w){var _=i[w],x=_.marker;"bookmark"==x.type&&_.from==f&&x.widgetNode?y.push(x):_.from<=f&&(null==_.to||_.to>f||x.collapsed&&_.to==f&&_.from==f)?(null!=_.to&&_.to!=f&&v>_.to&&(v=_.to,u=""),x.className&&(l+=" "+x.className),x.css&&(a=(a?a+";":"")+x.css),x.startStyle&&_.from==f&&(c+=" "+x.startStyle),x.endStyle&&_.to==v&&(b||(b=[])).push(x.endStyle,_.to),x.title&&!d&&(d=x.title),x.collapsed&&(!h||st(h.marker,x)<0)&&(h=_)):_.from>f&&v>_.from&&(v=_.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==v&&(u+=" "+b[k]);if(!h||h.from==f)for(var C=0;C<y.length;++C)ge(e,0,y[C]);if(h&&(h.from||0)==f){if(ge(e,(null==h.to?p+1:h.to)-f,h.marker,null==h.from),null==h.to)return;h.to==f&&(h=!1)}}if(f>=p)break;for(var S=Math.min(p,v);;){if(g){var T=f+g.length;if(!h){var M=T>S?g.slice(0,S-f):g;e.addToken(e,M,s?s+l:l,c,f+M.length==v?u:"",d,a)}if(T>=S){g=g.slice(S-f),f=S;break}f=T,c=""}g=r.slice(o,o=n[m++]),s=ce(n[m++],e.cm.options)}}else for(var D=1;D<n.length;D+=2)e.addToken(e,r.slice(o,o=n[D]),ce(n[D+1],e.cm.options))}function ye(t,e,n){this.line=e,this.rest=pt(e),this.size=this.rest?P(m(this.rest))-n+1:1,this.node=this.text=null,this.hidden=gt(t,e)}function be(t,e,n){for(var i,r=[],o=e;o<n;o=i){var s=new ye(t.doc,M(t.doc,o),o);i=o+s.size,r.push(s)}return r}function we(t){$s?$s.ops.push(t):t.ownsGroup=$s={ops:[t],delayedCallbacks:[]}}function _e(t){var e=t.delayedCallbacks,n=0;do{for(;n<e.length;n++)e[n].call(null);
2
+ for(var i=0;i<t.ops.length;i++){var r=t.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<e.length)}function xe(t,e){var n=t.ownsGroup;if(n)try{_e(n)}finally{$s=null,e(n)}}function ke(t,e){var n=Dt(t,e);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);$s?i=$s.delayedCallbacks:Zs?i=Zs:(i=Zs=[],setTimeout(Ce,0));for(var o=function(t){i.push(function(){return n[t].apply(null,r)})},s=0;s<n.length;++s)o(s)}}function Ce(){var t=Zs;Zs=null;for(var e=0;e<t.length;++e)t[e]()}function Se(t,e,n,i){for(var r=0;r<e.changes.length;r++){var o=e.changes[r];"text"==o?Ee(t,e):"gutter"==o?Pe(t,e,n,i):"class"==o?Oe(t,e):"widget"==o&&Ne(t,e,i)}e.changes=null}function Te(t){return t.node==t.text&&(t.node=i("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),Jo&&ts<8&&(t.node.style.zIndex=2)),t.node}function Me(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var r=Te(e);e.background=r.insertBefore(i("div",null,n),r.firstChild),t.display.input.setUneditable(e.background)}}function De(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):de(t,e)}function Ee(t,e){var n=e.text.className,i=De(t,e);e.text==e.node&&(e.node=i.pre),e.text.parentNode.replaceChild(i.pre,e.text),e.text=i.pre,i.bgClass!=e.bgClass||i.textClass!=e.textClass?(e.bgClass=i.bgClass,e.textClass=i.textClass,Oe(t,e)):n&&(e.text.className=n)}function Oe(t,e){Me(t,e),e.line.wrapClass?Te(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var n=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=n||""}function Pe(t,e,n,r){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var o=Te(e);e.gutterBackground=i("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),o.insertBefore(e.gutterBackground,e.text)}var s=e.line.gutterMarkers;if(t.options.lineNumbers||s){var a=Te(e),l=e.gutter=i("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(t.display.input.setUneditable(l),a.insertBefore(l,e.text),e.line.gutterClass&&(l.className+=" "+e.line.gutterClass),!t.options.lineNumbers||s&&s["CodeMirror-linenumbers"]||(e.lineNumber=l.appendChild(i("div",I(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),s)for(var u=0;u<t.options.gutters.length;++u){var c=t.options.gutters[u],d=s.hasOwnProperty(c)&&s[c];d&&l.appendChild(i("div",[d],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Ne(t,e,n){e.alignable&&(e.alignable=null);for(var i=e.node.firstChild,r=void 0;i;i=r)r=i.nextSibling,"CodeMirror-linewidget"==i.className&&e.node.removeChild(i);Ie(t,e,n)}function Ae(t,e,n,i){var r=De(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),Oe(t,e),Pe(t,e,n,i),Ie(t,e,i),e.node}function Ie(t,e,n){if(Le(t,e.line,e,n,!0),e.rest)for(var i=0;i<e.rest.length;i++)Le(t,e.rest[i],e,n,!1)}function Le(t,e,n,r,o){if(e.widgets)for(var s=Te(n),a=0,l=e.widgets;a<l.length;++a){var u=l[a],c=i("div",[u.node],"CodeMirror-linewidget");u.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Re(u,c,n,r),t.display.input.setUneditable(c),o&&u.above?s.insertBefore(c,n.gutter||n.text):s.appendChild(c),ke(u,"redraw")}}function Re(t,e,n,i){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var r=i.wrapperWidth;e.style.left=i.fixedPos+"px",t.coverGutter||(r-=i.gutterTotalWidth,e.style.paddingLeft=i.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-i.gutterTotalWidth+"px"))}function Fe(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!o(document.body,t.node)){var r="position: relative;";t.coverGutter&&(r+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(r+="width: "+e.display.wrapper.clientWidth+"px;"),n(e.display.measure,i("div",[t.node],null,r))}return t.height=t.node.parentNode.offsetHeight}function je(t,e){for(var n=Ht(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function He(t){return t.lineSpace.offsetTop}function We(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function ze(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=n(t.measure,i("pre","x")),r=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,o={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(t.cachedPaddingH=o),o}function Ue(t){return ks-t.display.nativeBarWidth}function Be(t){return t.display.scroller.clientWidth-Ue(t)-t.display.barWidth}function Ye(t){return t.display.scroller.clientHeight-Ue(t)-t.display.barHeight}function Ve(t,e,n){var i=t.options.lineWrapping,r=i&&Be(t);if(!e.measure.heights||i&&e.measure.width!=r){var o=e.measure.heights=[];if(i){e.measure.width=r;for(var s=e.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],u=s[a+1];Math.abs(l.bottom-u.bottom)>2&&o.push((l.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Ge(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;i<t.rest.length;i++)if(t.rest[i]==e)return{map:t.measure.maps[i],cache:t.measure.caches[i]};for(var r=0;r<t.rest.length;r++)if(P(t.rest[r])>n)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function qe(t,e){e=dt(e);var i=P(e),r=t.display.externalMeasured=new ye(t.doc,e,i);r.lineN=i;var o=r.built=de(t,r);return r.text=o.pre,n(t.display.lineMeasure,o.pre),r}function Ke(t,e,n,i){return Ze(t,$e(t,e),n,i)}function Xe(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[Sn(t,e)];var n=t.display.externalMeasured;return n&&e>=n.lineN&&e<n.lineN+n.size?n:void 0}function $e(t,e){var n=P(e),i=Xe(t,n);i&&!i.text?i=null:i&&i.changes&&(Se(t,i,n,wn(t)),t.curOp.forceUpdate=!0),i||(i=qe(t,e));var r=Ge(i,e,n);return{line:e,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function Ze(t,e,n,i,r){e.before&&(n=-1);var o,s=n+(i||"");return e.cache.hasOwnProperty(s)?o=e.cache[s]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(Ve(t,e.view,e.rect),e.hasHeights=!0),o=tn(t,e,n,i),o.bogus||(e.cache[s]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}function Qe(t,e,n){for(var i,r,o,s,a,l,u=0;u<t.length;u+=3)if(a=t[u],l=t[u+1],e<a?(r=0,o=1,s="left"):e<l?(r=e-a,o=r+1):(u==t.length-3||e==l&&t[u+3]>e)&&(o=l-a,r=o-1,e>=l&&(s="right")),null!=r){if(i=t[u+2],a==l&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;u&&t[u-2]==t[u-3]&&t[u-1].insertLeft;)i=t[(u-=3)+2],s="left";if("right"==n&&r==l-a)for(;u<t.length-3&&t[u+3]==t[u+4]&&!t[u+5].insertLeft;)i=t[(u+=3)+2],s="right";break}return{node:i,start:r,end:o,collapse:s,coverStart:a,coverEnd:l}}function Je(t,e){var n=Qs;if("left"==e)for(var i=0;i<t.length&&(n=t[i]).left==n.right;i++);else for(var r=t.length-1;r>=0&&(n=t[r]).left==n.right;r--);return n}function tn(t,e,n,i){var r,o=Qe(e.map,n,i),s=o.node,a=o.start,l=o.end,u=o.collapse;if(3==s.nodeType){for(var c=0;c<4;c++){for(;a&&k(e.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l<o.coverEnd&&k(e.line.text.charAt(o.coverStart+l));)++l;if(r=Jo&&ts<9&&0==a&&l==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():Je(ms(s,a,l).getClientRects(),i),r.left||r.right||0==a)break;l=a,a-=1,u="right"}Jo&&ts<11&&(r=en(t.display.measure,r))}else{a>0&&(u=i="right");var d;r=t.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==i?d.length-1:0]:s.getBoundingClientRect()}if(Jo&&ts<9&&!a&&(!r||!r.left&&!r.right)){var h=s.parentNode.getClientRects()[0];r=h?{left:h.left,right:h.left+bn(t.display),top:h.top,bottom:h.bottom}:Qs}for(var p=r.top-e.rect.top,f=r.bottom-e.rect.top,m=(p+f)/2,g=e.view.measure.heights,v=0;v<g.length-1&&!(m<g[v]);v++);var y=v?g[v-1]:0,b=g[v],w={left:("right"==u?r.right:r.left)-e.rect.left,right:("left"==u?r.left:r.right)-e.rect.left,top:y,bottom:b};return r.left||r.right||(w.bogus=!0),t.options.singleCursorHeightPerLine||(w.rtop=p,w.rbottom=f),w}function en(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Bt(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*i,bottom:e.bottom*i}}function nn(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function rn(t){t.display.externalMeasure=null,e(t.display.lineMeasure);for(var n=0;n<t.display.view.length;n++)nn(t.display.view[n])}function on(t){rn(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function sn(){return is&&us?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function an(){return is&&us?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ln(t,e,n,i,r){if(!r&&e.widgets)for(var o=0;o<e.widgets.length;++o)if(e.widgets[o].above){var s=Fe(e.widgets[o]);n.top+=s,n.bottom+=s}if("line"==i)return n;i||(i="local");var a=yt(e);if("local"==i?a+=He(t.display):a-=t.display.viewOffset,"page"==i||"window"==i){var l=t.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==i?0:an());var u=l.left+("window"==i?0:sn());n.left+=u,n.right+=u}return n.top+=a,n.bottom+=a,n}function un(t,e,n){if("div"==n)return e;var i=e.left,r=e.top;if("page"==n)i-=sn(),r-=an();else if("local"==n||!n){var o=t.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var s=t.display.lineSpace.getBoundingClientRect();return{left:i-s.left,top:r-s.top}}function cn(t,e,n,i,r){return i||(i=M(t.doc,e.line)),ln(t,i,Ke(t,i,e.ch,r),n)}function dn(t,e,n,i,r,o){function s(e,s){var a=Ze(t,r,e,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,ln(t,i,a,n)}function a(t,e,n){var i=l[e],r=i.level%2!=0;return s(n?t-1:t,r!=n)}i=i||M(t.doc,e.line),r||(r=$e(t,i));var l=kt(i,t.doc.direction),u=e.ch,c=e.sticky;if(u>=i.text.length?(u=i.text.length,c="before"):u<=0&&(u=0,c="after"),!l)return s("before"==c?u-1:u,"before"==c);var d=xt(l,u,c),h=As,p=a(u,d,"before"==c);return null!=h&&(p.other=a(u,h,"before"!=c)),p}function hn(t,e){var n=0;e=U(t.doc,e),t.options.lineWrapping||(n=bn(t.display)*e.ch);var i=M(t.doc,e.line),r=yt(i)+He(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function pn(t,e,n,i,r){var o=L(t,e,n);return o.xRel=r,i&&(o.outside=!0),o}function fn(t,e,n){var i=t.doc;if(n+=t.display.viewOffset,n<0)return pn(i.first,0,null,!0,-1);var r=N(i,n),o=i.first+i.size-1;if(r>o)return pn(i.first+i.size-1,M(i,o).text.length,null,!0,1);e<0&&(e=0);for(var s=M(i,r);;){var a=vn(t,s,r,e,n),l=ut(s),u=l&&l.find(0,!0);if(!l||!(a.ch>u.from.ch||a.ch==u.from.ch&&a.xRel>0))return a;r=P(s=u.to.line)}}function mn(t,e,n,i){var r=function(i){return ln(t,e,Ze(t,n,i),"line")},o=e.text.length,s=S(function(t){return r(t-1).bottom<=i},o,0);return o=S(function(t){return r(t).top>i},s,o),{begin:s,end:o}}function gn(t,e,n,i){var r=ln(t,e,Ze(t,n,i),"line").top;return mn(t,e,n,r)}function vn(t,e,n,i,r){r-=yt(e);var o,s=0,a=e.text.length,l=$e(t,e),u=kt(e,t.doc.direction);if(u){if(t.options.lineWrapping){var c;c=mn(t,e,l,r),s=c.begin,a=c.end,c}o=new L(n,s);var d,h,p=dn(t,o,"line",e,l).left,f=p<i?1:-1,m=p-i;do{if(d=m,h=o,o=Mt(t,e,o,f),null==o||o.ch<s||a<=("before"==o.sticky?o.ch-1:o.ch)){o=h;break}m=dn(t,o,"line",e,l).left-i}while(f<0!=m<0&&Math.abs(m)<=Math.abs(d));if(Math.abs(m)>Math.abs(d)){if(m<0==d<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=h}}else{var g=S(function(n){var o=ln(t,e,Ze(t,l,n),"line");return o.top>r?(a=Math.min(n,a),!0):!(o.bottom<=r)&&(o.left>i||!(o.right<i)&&i-o.left<o.right-i)},s,a);g=C(e.text,g,1),o=new L(n,g,g==a?"before":"after")}var v=dn(t,o,"line",e,l);return(r<v.top||v.bottom<r)&&(o.outside=!0),o.xRel=i<v.left?-1:i>v.right?1:0,o}function yn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==qs){qs=i("pre");for(var r=0;r<49;++r)qs.appendChild(document.createTextNode("x")),qs.appendChild(i("br"));qs.appendChild(document.createTextNode("x"))}n(t.measure,qs);var o=qs.offsetHeight/50;return o>3&&(t.cachedTextHeight=o),e(t.measure),o||1}function bn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=i("span","xxxxxxxxxx"),r=i("pre",[e]);n(t.measure,r);var o=e.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(t.cachedCharWidth=s),s||10}function wn(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[t.options.gutters[s]]=o.offsetLeft+o.clientLeft+r,i[t.options.gutters[s]]=o.clientWidth;return{fixedPos:_n(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function _n(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function xn(t){var e=yn(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/bn(t.display)-3);return function(r){if(gt(t.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s<r.widgets.length;s++)r.widgets[s].height&&(o+=r.widgets[s].height);return n?o+(Math.ceil(r.text.length/i)||1)*e:o+e}}function kn(t){var e=t.doc,n=xn(t);e.iter(function(t){var e=n(t);e!=t.height&&O(t,e)})}function Cn(t,e,n,i){var r=t.display;if(!n&&"true"==Ht(e).getAttribute("cm-not-content"))return null;var o,s,a=r.lineSpace.getBoundingClientRect();try{o=e.clientX-a.left,s=e.clientY-a.top}catch(t){return null}var l,u=fn(t,o,s);if(i&&1==u.xRel&&(l=M(t.doc,u.line).text).length==u.ch){var c=d(l,l.length,t.options.tabSize)-l.length;u=L(u.line,Math.max(0,Math.round((o-ze(t.display).left)/bn(t.display))-c))}return u}function Sn(t,e){if(e>=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var n=t.display.view,i=0;i<n.length;i++)if(e-=n[i].size,e<0)return i}function Tn(t){t.display.input.showSelection(t.display.input.prepareSelection())}function Mn(t,e){for(var n=t.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),s=0;s<n.sel.ranges.length;s++)if(e!==!1||s!=n.sel.primIndex){var a=n.sel.ranges[s];if(!(a.from().line>=t.display.viewTo||a.to().line<t.display.viewFrom)){var l=a.empty();(l||t.options.showCursorWhenSelecting)&&Dn(t,a.head,r),l||En(t,a,o)}}return i}function Dn(t,e,n){var r=dn(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),o=n.appendChild(i("div"," ","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=Math.max(0,r.bottom-r.top)*t.options.cursorHeight+"px",r.other){var s=n.appendChild(i("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function En(t,e,n){function r(t,e,n,r){e<0&&(e=0),e=Math.round(e),r=Math.round(r),l.appendChild(i("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?d-t:n)+"px;\n height: "+(r-e)+"px"))}function o(e,n,i){function o(n,i){return cn(t,L(e,n),"div",u,i)}var s,l,u=M(a,e),h=u.text.length;return _t(kt(u,a.direction),n||0,null==i?h:i,function(t,e,a){var u,p,f,m=o(t,"left");if(t==e)u=m,p=f=m.left;else{if(u=o(e-1,"right"),"rtl"==a){var g=m;m=u,u=g}p=m.left,f=u.right}null==n&&0==t&&(p=c),u.top-m.top>3&&(r(p,m.top,null,m.bottom),p=c,m.bottom<u.top&&r(p,m.bottom,null,u.top)),null==i&&e==h&&(f=d),(!s||m.top<s.top||m.top==s.top&&m.left<s.left)&&(s=m),(!l||u.bottom>l.bottom||u.bottom==l.bottom&&u.right>l.right)&&(l=u),p<c+1&&(p=c),r(p,u.top,f-p,u.bottom)}),{start:s,end:l}}var s=t.display,a=t.doc,l=document.createDocumentFragment(),u=ze(t.display),c=u.left,d=Math.max(s.sizerWidth,Be(t)-s.sizer.offsetLeft)-u.right,h=e.from(),p=e.to();if(h.line==p.line)o(h.line,h.ch,p.ch);else{var f=M(a,h.line),m=M(a,p.line),g=dt(f)==dt(m),v=o(h.line,h.ch,g?f.text.length+1:null).end,y=o(p.line,g?0:null,p.ch).start;g&&(v.top<y.top-2?(r(v.right,v.top,null,v.bottom),r(c,y.top,y.left,y.bottom)):r(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&r(c,v.bottom,null,y.top)}n.appendChild(l)}function On(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Pn(t){t.state.focused||(t.display.input.focus(),An(t))}function Nn(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,In(t))},100)}function An(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Ot(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),es&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),On(t))}function In(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Ot(t,"blur",t,e),t.state.focused=!1,ys(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Ln(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=_n(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",s=0;s<n.length;s++)if(!n[s].hidden){t.options.fixedGutter&&(n[s].gutter&&(n[s].gutter.style.left=o),n[s].gutterBackground&&(n[s].gutterBackground.style.left=o));var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}t.options.fixedGutter&&(e.gutters.style.left=i+r+"px")}}function Rn(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=I(t.options,e.first+e.size-1),r=t.display;if(n.length!=r.lineNumChars){var o=r.measure.appendChild(i("div",[i("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),s=o.firstChild.offsetWidth,a=o.offsetWidth-s;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(s,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Mi(t),!0}return!1}function Fn(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i<e.view.length;i++){var r=e.view[i],o=void 0;if(!r.hidden){if(Jo&&ts<8){var s=r.node.offsetTop+r.node.offsetHeight;o=s-n,n=s}else{var a=r.node.getBoundingClientRect();o=a.bottom-a.top}var l=r.line.height-o;if(o<2&&(o=yn(e)),(l>.001||l<-.001)&&(O(r.line,o),jn(r.line),r.rest))for(var u=0;u<r.rest.length;u++)jn(r.rest[u])}}}function jn(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e)t.widgets[e].height=t.widgets[e].node.parentNode.offsetHeight}function Hn(t,e,n){var i=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;i=Math.floor(i-He(t));var r=n&&null!=n.bottom?n.bottom:i+t.wrapper.clientHeight,o=N(e,i),s=N(e,r);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=N(e,yt(M(e,a))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=s&&(o=N(e,yt(M(e,l))-t.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Wn(t,e){Math.abs(t.doc.scrollTop-e)<2||(t.doc.scrollTop=e,Xo||Si(t,{top:e}),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e),t.display.scrollbars.setScrollTop(e),Xo&&Si(t),wi(t,100))}function zn(t,e,n){(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)||(e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),t.doc.scrollLeft=e,Ln(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Un(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function Bn(t){var e=Un(t);return e.x*=ta,e.y*=ta,e}function Yn(t,e){var n=Un(e),i=n.x,r=n.y,o=t.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&ds&&es)t:for(var u=e.target,c=o.view;u!=s;u=u.parentNode)for(var d=0;d<c.length;d++)if(c[d].node==u){t.display.currentWheelTarget=u;break t}if(i&&!Xo&&!rs&&null!=ta)return r&&l&&Wn(t,Math.max(0,Math.min(s.scrollTop+r*ta,s.scrollHeight-s.clientHeight))),zn(t,Math.max(0,Math.min(s.scrollLeft+i*ta,s.scrollWidth-s.clientWidth))),(!r||r&&l)&&Lt(e),void(o.wheelStartX=null);if(r&&null!=ta){var h=r*ta,p=t.doc.scrollTop,f=p+o.wrapper.clientHeight;h<0?p=Math.max(0,p+h-50):f=Math.min(t.doc.height,f+h+50),Si(t,{top:p,bottom:f})}Js<20&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=i,o.wheelDY=r,setTimeout(function(){if(null!=o.wheelStartX){var t=s.scrollLeft-o.wheelStartX,e=s.scrollTop-o.wheelStartY,n=e&&o.wheelDY&&e/o.wheelDY||t&&o.wheelDX&&t/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(ta=(ta*Js+n)/(Js+1),++Js)}},200)):(o.wheelDX+=i,o.wheelDY+=r))}}function Vn(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+We(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Ue(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}function Gn(t,e){e||(e=Vn(t));var n=t.display.barWidth,i=t.display.barHeight;qn(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&Fn(t),qn(t,Vn(t)),n=t.display.barWidth,i=t.display.barHeight}function qn(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}function Kn(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&ys(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new ia[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Rs(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?zn(t,e):Wn(t,e)},t),t.display.scrollbars.addClass&&a(t.display.wrapper,t.display.scrollbars.addClass)}function Xn(t,e){if(!Pt(t,"scrollCursorIntoView")){var n=t.display,r=n.sizer.getBoundingClientRect(),o=null;if(e.top+r.top<0?o=!0:e.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!as){var s=i("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-He(t.display))+"px;\n height: "+(e.bottom-e.top+Ue(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(s),s.scrollIntoView(o),t.display.lineSpace.removeChild(s)}}}function $n(t,e,n,i){null==i&&(i=0);for(var r,o=0;o<5;o++){var s=!1,a=dn(t,e),l=n&&n!=e?dn(t,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var u=Qn(t,r),c=t.doc.scrollTop,d=t.doc.scrollLeft;if(null!=u.scrollTop&&(Wn(t,u.scrollTop),Math.abs(t.doc.scrollTop-c)>1&&(s=!0)),null!=u.scrollLeft&&(zn(t,u.scrollLeft),Math.abs(t.doc.scrollLeft-d)>1&&(s=!0)),!s)break}return r}function Zn(t,e){var n=Qn(t,e);null!=n.scrollTop&&Wn(t,n.scrollTop),null!=n.scrollLeft&&zn(t,n.scrollLeft)}function Qn(t,e){var n=t.display,i=yn(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Ye(t),s={};e.bottom-e.top>o&&(e.bottom=e.top+o);var a=t.doc.height+We(n),l=e.top<i,u=e.bottom>a-i;if(e.top<r)s.scrollTop=l?0:e.top;else if(e.bottom>r+o){var c=Math.min(e.top,(u?a:e.bottom)-o);c!=r&&(s.scrollTop=c)}var d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft,h=Be(t)-(t.options.fixedGutter?n.gutters.offsetWidth:0),p=e.right-e.left>h;return p&&(e.right=e.left+h),e.left<10?s.scrollLeft=0:e.left<d?s.scrollLeft=Math.max(0,e.left-(p?0:10)):e.right>h+d-3&&(s.scrollLeft=e.right+(p?0:10)-h),s}function Jn(t,e,n){null==e&&null==n||ei(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=n&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+n)}function ti(t){ei(t);var e=t.getCursor(),n=e,i=e;t.options.lineWrapping||(n=e.ch?L(e.line,e.ch-1):e,i=L(e.line,e.ch+1)),t.curOp.scrollToPos={from:n,to:i,margin:t.options.cursorScrollMargin}}function ei(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=hn(t,e.from),i=hn(t,e.to),r=Qn(t,{left:Math.min(n.left,i.left),top:Math.min(n.top,i.top)-e.margin,right:Math.max(n.right,i.right),bottom:Math.max(n.bottom,i.bottom)+e.margin});t.scrollTo(r.scrollLeft,r.scrollTop)}}function ni(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ra},we(t.curOp)}function ii(t){var e=t.curOp;xe(e,function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;ri(t)})}function ri(t){for(var e=t.ops,n=0;n<e.length;n++)oi(e[n]);for(var i=0;i<e.length;i++)si(e[i]);for(var r=0;r<e.length;r++)ai(e[r]);for(var o=0;o<e.length;o++)li(e[o]);for(var s=0;s<e.length;s++)ui(e[s])}function oi(t){var e=t.cm,n=e.display;xi(e),t.updateMaxLine&&wt(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new oa(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function si(t){t.updatedDisplay=t.mustUpdate&&ki(t.cm,t.update)}function ai(t){var e=t.cm,n=e.display;t.updatedDisplay&&Fn(e),t.barMeasure=Vn(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ke(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Ue(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Be(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function li(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&zn(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==s()&&(!document.hasFocus||document.hasFocus());t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&Gn(e,t.barMeasure),t.updatedDisplay&&Di(e,t.barMeasure),t.selectionChanged&&On(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&Pn(t.cm)}function ui(t){var e=t.cm,n=e.display,i=e.doc;if(t.updatedDisplay&&Ci(e,t.update),null==n.wheelStartX||null==t.scrollTop&&null==t.scrollLeft&&!t.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null==t.scrollTop||n.scroller.scrollTop==t.scrollTop&&!t.forceScroll||(i.scrollTop=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,t.scrollTop)),n.scrollbars.setScrollTop(i.scrollTop),n.scroller.scrollTop=i.scrollTop),null==t.scrollLeft||n.scroller.scrollLeft==t.scrollLeft&&!t.forceScroll||(i.scrollLeft=Math.max(0,Math.min(n.scroller.scrollWidth-n.scroller.clientWidth,t.scrollLeft)),n.scrollbars.setScrollLeft(i.scrollLeft),n.scroller.scrollLeft=i.scrollLeft,Ln(e)),t.scrollToPos){var r=$n(e,U(i,t.scrollToPos.from),U(i,t.scrollToPos.to),t.scrollToPos.margin);Xn(e,r)}var o=t.maybeHiddenMarkers,s=t.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||Ot(o[a],"hide");if(s)for(var l=0;l<s.length;++l)s[l].lines.length&&Ot(s[l],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&Ot(e,"changes",e,t.changeObjs),t.update&&t.update.finish()}function ci(t,e){if(t.curOp)return e();ni(t);try{return e()}finally{ii(t)}}function di(t,e){return function(){if(t.curOp)return e.apply(t,arguments);ni(t);try{return e.apply(t,arguments)}finally{ii(t)}}}function hi(t){return function(){if(this.curOp)return t.apply(this,arguments);ni(this);try{return t.apply(this,arguments)}finally{ii(this)}}}function pi(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);ni(e);try{return t.apply(this,arguments)}finally{ii(e)}}}function fi(t,e,n,i){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),i||(i=0);var r=t.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)Ns&&ft(t.doc,e)<r.viewTo&&gi(t);else if(n<=r.viewFrom)Ns&&mt(t.doc,n+i)>r.viewFrom?gi(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)gi(t);else if(e<=r.viewFrom){var o=vi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):gi(t)}else if(n>=r.viewTo){var s=vi(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):gi(t)}else{var a=vi(t,e,e,-1),l=vi(t,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(be(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):gi(t)}var u=r.externalMeasured;u&&(n<u.lineN?u.lineN+=i:e<u.lineN+u.size&&(r.externalMeasured=null))}function mi(t,e,n){t.curOp.viewChanged=!0;var i=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(i.externalMeasured=null),!(e<i.viewFrom||e>=i.viewTo)){var o=i.view[Sn(t,e)];if(null!=o.node){var s=o.changes||(o.changes=[]);h(s,n)==-1&&s.push(n)}}}function gi(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function vi(t,e,n,i){var r,o=Sn(t,e),s=t.display.view;if(!Ns||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var a=t.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=e){if(i>0){if(o==s.length-1)return null;r=a+s[o].size-e,o++}else r=a-e;e+=r,n+=r}for(;ft(t.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function yi(t,e,n){var i=t.display,r=i.view;0==r.length||e>=i.viewTo||n<=i.viewFrom?(i.view=be(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=be(t,e,i.viewFrom).concat(i.view):i.viewFrom<e&&(i.view=i.view.slice(Sn(t,e))),i.viewFrom=e,i.viewTo<n?i.view=i.view.concat(be(t,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,Sn(t,n)))),
3
+ i.viewTo=n}function bi(t){for(var e=t.display.view,n=0,i=0;i<e.length;i++){var r=e[i];r.hidden||r.node&&!r.changes||++n}return n}function wi(t,e){t.doc.mode.startState&&t.doc.frontier<t.display.viewTo&&t.state.highlight.set(e,u(_i,t))}function _i(t){var e=t.doc;if(e.frontier<e.first&&(e.frontier=e.first),!(e.frontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,i=Xt(e.mode,te(t,e.frontier)),r=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),function(o){if(e.frontier>=t.display.viewFrom){var s=o.styles,a=o.text.length>t.options.maxHighlightLength,l=Qt(t,o,a?Xt(e.mode,i):i,!0);o.styles=l.styles;var u=o.styleClasses,c=l.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!d&&h<s.length;++h)d=s[h]!=o.styles[h];d&&r.push(e.frontier),o.stateAfter=a?i:Xt(e.mode,i)}else o.text.length<=t.options.maxHighlightLength&&ee(t,o.text,i),o.stateAfter=e.frontier%5==0?Xt(e.mode,i):null;if(++e.frontier,+new Date>n)return wi(t,t.options.workDelay),!0}),r.length&&ci(t,function(){for(var e=0;e<r.length;e++)mi(t,r[e],"text")})}}function xi(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=Ue(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=Ue(t)+"px",e.scrollbarsClipped=!0)}function ki(t,n){var i=t.display,r=t.doc;if(n.editorIsHidden)return gi(t),!1;if(!n.force&&n.visible.from>=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==bi(t))return!1;Rn(t)&&(gi(t),n.dims=wn(t));var o=r.first+r.size,a=Math.max(n.visible.from-t.options.viewportMargin,r.first),l=Math.min(o,n.visible.to+t.options.viewportMargin);i.viewFrom<a&&a-i.viewFrom<20&&(a=Math.max(r.first,i.viewFrom)),i.viewTo>l&&i.viewTo-l<20&&(l=Math.min(o,i.viewTo)),Ns&&(a=ft(t.doc,a),l=mt(t.doc,l));var u=a!=i.viewFrom||l!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;yi(t,a,l),i.viewOffset=yt(M(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var c=bi(t);if(!u&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var d=s();return c>4&&(i.lineDiv.style.display="none"),Ti(t,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,d&&s()!=d&&d.offsetHeight&&d.focus(),e(i.cursorDiv),e(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,u&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,wi(t,400)),i.updateLineNumbers=null,!0}function Ci(t,e){for(var n=e.viewport,i=!0;(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Be(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+We(t.display)-Ye(t),n.top)}),e.visible=Hn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&ki(t,e);i=!1){Fn(t);var r=Vn(t);Tn(t),Gn(t,r),Di(t,r)}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Si(t,e){var n=new oa(t,e);if(ki(t,n)){Fn(t),Ci(t,n);var i=Vn(t);Tn(t),Gn(t,i),Di(t,i),n.finish()}}function Ti(t,n,i){function r(e){var n=e.nextSibling;return es&&ds&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var o=t.display,s=t.options.lineNumbers,a=o.lineDiv,l=a.firstChild,u=o.view,c=o.viewFrom,d=0;d<u.length;d++){var p=u[d];if(p.hidden);else if(p.node&&p.node.parentNode==a){for(;l!=p.node;)l=r(l);var f=s&&null!=n&&n<=c&&p.lineNumber;p.changes&&(h(p.changes,"gutter")>-1&&(f=!1),Se(t,p,c,i)),f&&(e(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(I(t.options,c)))),l=p.node.nextSibling}else{var m=Ae(t,p,c,i);a.insertBefore(m,l)}c+=p.size}for(;l;)l=r(l)}function Mi(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Di(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ue(t)+"px"}function Ei(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var o=0;o<r.length;++o){var s=r[o],a=n.appendChild(i("div",null,"CodeMirror-gutter "+s));"CodeMirror-linenumbers"==s&&(t.display.lineGutter=a,a.style.width=(t.display.lineNumWidth||1)+"px")}n.style.display=o?"":"none",Mi(t)}function Oi(t){var e=h(t.gutters,"CodeMirror-linenumbers");e==-1&&t.lineNumbers?t.gutters=t.gutters.concat(["CodeMirror-linenumbers"]):e>-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function Pi(t,e){var n=t[e];t.sort(function(t,e){return R(t.from(),e.from())}),e=h(t,n);for(var i=1;i<t.length;i++){var r=t[i],o=t[i-1];if(R(o.to(),r.from())>=0){var s=W(o.from(),r.from()),a=H(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=e&&--e,t.splice(--i,2,new aa(l?a:s,l?s:a))}}return new sa(t,e)}function Ni(t,e){return new sa([new aa(t,e||t)],0)}function Ai(t){return t.text?L(t.from.line+t.text.length-1,m(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Ii(t,e){if(R(t,e.from)<0)return t;if(R(t,e.to)<=0)return Ai(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=Ai(e).ch-e.to.ch),L(n,i)}function Li(t,e){for(var n=[],i=0;i<t.sel.ranges.length;i++){var r=t.sel.ranges[i];n.push(new aa(Ii(r.anchor,e),Ii(r.head,e)))}return Pi(n,t.sel.primIndex)}function Ri(t,e,n){return t.line==e.line?L(n.line,t.ch-e.ch+n.ch):L(n.line+(t.line-e.line),t.ch)}function Fi(t,e,n){for(var i=[],r=L(t.first,0),o=r,s=0;s<e.length;s++){var a=e[s],l=Ri(a.from,r,o),u=Ri(Ai(a),r,o);if(r=a.to,o=u,"around"==n){var c=t.sel.ranges[s],d=R(c.head,c.anchor)<0;i[s]=new aa(d?u:l,d?l:u)}else i[s]=new aa(l,l)}return new sa(i,t.sel.primIndex)}function ji(t){t.doc.mode=qt(t.options,t.doc.modeOption),Hi(t)}function Hi(t){t.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),t.doc.frontier=t.doc.first,wi(t,100),t.state.modeGen++,t.curOp&&fi(t)}function Wi(t,e){return 0==e.from.ch&&0==e.to.ch&&""==m(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function zi(t,e,n,i){function r(t){return n?n[t]:null}function o(t,n,r){le(t,n,r,i),ke(t,"change",t,e)}function s(t,e){for(var n=[],o=t;o<e;++o)n.push(new Gs(u[o],r(o),i));return n}var a=e.from,l=e.to,u=e.text,c=M(t,a.line),d=M(t,l.line),h=m(u),p=r(u.length-1),f=l.line-a.line;if(e.full)t.insert(0,s(0,u.length)),t.remove(u.length,t.size-u.length);else if(Wi(t,e)){var g=s(0,u.length-1);o(d,d.text,p),f&&t.remove(a.line,f),g.length&&t.insert(a.line,g)}else if(c==d)if(1==u.length)o(c,c.text.slice(0,a.ch)+h+c.text.slice(l.ch),p);else{var v=s(1,u.length-1);v.push(new Gs(h+c.text.slice(l.ch),p,i)),o(c,c.text.slice(0,a.ch)+u[0],r(0)),t.insert(a.line+1,v)}else if(1==u.length)o(c,c.text.slice(0,a.ch)+u[0]+d.text.slice(l.ch),r(0)),t.remove(a.line+1,f);else{o(c,c.text.slice(0,a.ch)+u[0],r(0)),o(d,h+d.text.slice(l.ch),p);var y=s(1,u.length-1);f>1&&t.remove(a.line+1,f-1),t.insert(a.line+1,y)}ke(t,"change",t,e)}function Ui(t,e,n){function i(t,r,o){if(t.linked)for(var s=0;s<t.linked.length;++s){var a=t.linked[s];if(a.doc!=r){var l=o&&a.sharedHist;n&&!l||(e(a.doc,l),i(a.doc,t,l))}}}i(t,null,!0)}function Bi(t,e){if(e.cm)throw new Error("This document is already in use.");t.doc=e,e.cm=t,kn(t),ji(t),Yi(t),t.options.lineWrapping||wt(t),t.options.mode=e.modeOption,fi(t)}function Yi(t){("rtl"==t.doc.direction?a:ys)(t.display.lineDiv,"CodeMirror-rtl")}function Vi(t){ci(t,function(){Yi(t),fi(t)})}function Gi(t){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t||1}function qi(t,e){var n={from:j(e.from),to:Ai(e),text:D(t,e.from,e.to)};return tr(t,n,e.from.line,e.to.line+1),Ui(t,function(t){return tr(t,n,e.from.line,e.to.line+1)},!0),n}function Ki(t){for(;t.length;){var e=m(t);if(!e.ranges)break;t.pop()}}function Xi(t,e){return e?(Ki(t.done),m(t.done)):t.done.length&&!m(t.done).ranges?m(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),m(t.done)):void 0}function $i(t,e,n,i){var r=t.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(o=Xi(r,r.lastOp==i)))s=m(o.changes),0==R(e.from,e.to)&&0==R(e.from,s.to)?s.to=Ai(e):o.changes.push(qi(t,e));else{var l=m(r.done);for(l&&l.ranges||Ji(t.sel,r.done),o={changes:[qi(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,s||Ot(t,"historyAdded")}function Zi(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Qi(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||Zi(t,o,m(r.done),e))?r.done[r.done.length-1]=e:Ji(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&i.clearRedo!==!1&&Ki(r.undone)}function Ji(t,e){var n=m(e);n&&n.ranges&&n.equals(t)||e.push(t)}function tr(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o})}function er(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}function nr(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var i=[],r=0;r<e.text.length;++r)i.push(er(n[r]));return i}function ir(t,e){var n=nr(t,e),i=J(t,e);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],s=i[r];if(o&&s)t:for(var a=0;a<s.length;++a){for(var l=s[a],u=0;u<o.length;++u)if(o[u].marker==l.marker)continue t;o.push(l)}else s&&(n[r]=s)}return n}function rr(t,e,n){for(var i=[],r=0;r<t.length;++r){var o=t[r];if(o.ranges)i.push(n?sa.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];i.push({changes:a});for(var l=0;l<s.length;++l){var u=s[l],c=void 0;if(a.push({from:u.from,to:u.to,text:u.text}),e)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&h(e,Number(c[1]))>-1&&(m(a)[d]=u[d],delete u[d])}}}return i}function or(t,e,n,i){if(t.cm&&t.cm.display.shift||t.extend){var r=e.anchor;if(i){var o=R(n,r)<0;o!=R(i,r)<0?(r=n,n=i):o!=R(n,i)<0&&(n=i)}return new aa(r,n)}return new aa(i||n,n)}function sr(t,e,n,i){hr(t,new sa([or(t,t.sel.primary(),e,n)],0),i)}function ar(t,e,n){for(var i=[],r=0;r<t.sel.ranges.length;r++)i[r]=or(t,t.sel.ranges[r],e[r],null);var o=Pi(i,t.sel.primIndex);hr(t,o,n)}function lr(t,e,n,i){var r=t.sel.ranges.slice(0);r[e]=n,hr(t,Pi(r,t.sel.primIndex),i)}function ur(t,e,n,i){hr(t,Ni(e,n),i)}function cr(t,e,n){var i={ranges:e.ranges,update:function(e){var n=this;this.ranges=[];for(var i=0;i<e.length;i++)n.ranges[i]=new aa(U(t,e[i].anchor),U(t,e[i].head))},origin:n&&n.origin};return Ot(t,"beforeSelectionChange",t,i),t.cm&&Ot(t.cm,"beforeSelectionChange",t.cm,i),i.ranges!=e.ranges?Pi(i.ranges,i.ranges.length-1):e}function dr(t,e,n){var i=t.history.done,r=m(i);r&&r.ranges?(i[i.length-1]=e,pr(t,e,n)):hr(t,e,n)}function hr(t,e,n){pr(t,e,n),Qi(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function pr(t,e,n){(At(t,"beforeSelectionChange")||t.cm&&At(t.cm,"beforeSelectionChange"))&&(e=cr(t,e,n));var i=n&&n.bias||(R(e.primary().head,t.sel.primary().head)<0?-1:1);fr(t,gr(t,e,i,!0)),n&&n.scroll===!1||!t.cm||ti(t.cm)}function fr(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=t.cm.curOp.selectionChanged=!0,Nt(t.cm)),ke(t,"cursorActivity",t))}function mr(t){fr(t,gr(t,t.sel,null,!1),Ss)}function gr(t,e,n,i){for(var r,o=0;o<e.ranges.length;o++){var s=e.ranges[o],a=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[o],l=yr(t,s.anchor,a&&a.anchor,n,i),u=yr(t,s.head,a&&a.head,n,i);(r||l!=s.anchor||u!=s.head)&&(r||(r=e.ranges.slice(0,o)),r[o]=new aa(l,u))}return r?Pi(r,e.primIndex):e}function vr(t,e,n,i,r){var o=M(t,e.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker;if((null==a.from||(l.inclusiveLeft?a.from<=e.ch:a.from<e.ch))&&(null==a.to||(l.inclusiveRight?a.to>=e.ch:a.to>e.ch))){if(r&&(Ot(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var u=l.find(i<0?1:-1),c=void 0;if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(u=br(t,u,-i,u&&u.line==e.line?o:null)),u&&u.line==e.line&&(c=R(u,n))&&(i<0?c<0:c>0))return vr(t,u,e,i,r)}var d=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(d=br(t,d,i,d.line==e.line?o:null)),d?vr(t,d,e,i,r):null}}return e}function yr(t,e,n,i,r){var o=i||1,s=vr(t,e,n,o,r)||!r&&vr(t,e,n,o,!0)||vr(t,e,n,-o,r)||!r&&vr(t,e,n,-o,!0);return s?s:(t.cantEdit=!0,L(t.first,0))}function br(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?U(t,L(e.line-1)):null:n>0&&e.ch==(i||M(t,e.line)).text.length?e.line<t.first+t.size-1?L(e.line+1,0):null:new L(e.line,e.ch+n)}function wr(t){t.setSelection(L(t.firstLine(),0),L(t.lastLine()),Ss)}function _r(t,e,n){var i={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(e,n,r,o){e&&(i.from=U(t,e)),n&&(i.to=U(t,n)),r&&(i.text=r),void 0!==o&&(i.origin=o)}),Ot(t,"beforeChange",t,i),t.cm&&Ot(t.cm,"beforeChange",t.cm,i),i.canceled?null:{from:i.from,to:i.to,text:i.text,origin:i.origin}}function xr(t,e,n){if(t.cm){if(!t.cm.curOp)return di(t.cm,xr)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(At(t,"beforeChange")||t.cm&&At(t.cm,"beforeChange"))||(e=_r(t,e,!0))){var i=Ps&&!n&&et(t,e.from,e.to);if(i)for(var r=i.length-1;r>=0;--r)kr(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text});else kr(t,e)}}function kr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=R(e.from,e.to)){var n=Li(t,e);$i(t,e,n,t.cm?t.cm.curOp.id:NaN),Tr(t,e,n,J(t,e));var i=[];Ui(t,function(t,n){n||h(i,t.history)!=-1||(Pr(t.history,e),i.push(t.history)),Tr(t,e,null,J(t,e))})}}function Cr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var i,r=t.history,o=t.sel,s="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l<s.length&&(i=s[l],n?!i.ranges||i.equals(t.sel):i.ranges);l++);if(l!=s.length){for(r.lastOrigin=r.lastSelOrigin=null;i=s.pop(),i.ranges;){if(Ji(i,a),n&&!i.equals(t.sel))return void hr(t,i,{clearRedo:!1});o=i}var u=[];Ji(o,a),a.push({changes:u,generation:r.generation}),r.generation=i.generation||++r.maxGeneration;for(var c=At(t,"beforeChange")||t.cm&&At(t.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=e,c&&!_r(t,r,!1))return s.length=0,{};u.push(qi(t,r));var o=n?Li(t,r):m(s);Tr(t,r,o,ir(t,r)),!n&&t.cm&&t.cm.scrollIntoView({from:r.from,to:Ai(r)});var a=[];Ui(t,function(t,e){e||h(a,t.history)!=-1||(Pr(t.history,r),a.push(t.history)),Tr(t,r,null,ir(t,r))})},p=i.changes.length-1;p>=0;--p){var f=d(p);if(f)return f.v}}}}function Sr(t,e){if(0!=e&&(t.first+=e,t.sel=new sa(g(t.sel.ranges,function(t){return new aa(L(t.anchor.line+e,t.anchor.ch),L(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){fi(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;i<n.viewTo;i++)mi(t.cm,i,"gutter")}}function Tr(t,e,n,i){if(t.cm&&!t.cm.curOp)return di(t.cm,Tr)(t,e,n,i);if(e.to.line<t.first)return void Sr(t,e.text.length-1-(e.to.line-e.from.line));if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var r=e.text.length-1-(t.first-e.from.line);Sr(t,r),e={from:L(t.first,0),to:L(e.to.line+r,e.to.ch),text:[m(e.text)],origin:e.origin}}var o=t.lastLine();e.to.line>o&&(e={from:e.from,to:L(o,M(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=D(t,e.from,e.to),n||(n=Li(t,e)),t.cm?Mr(t.cm,e,i):zi(t,e,i),pr(t,n,Ss)}}function Mr(t,e,n){var i=t.doc,r=t.display,o=e.from,s=e.to,a=!1,l=o.line;t.options.lineWrapping||(l=P(dt(M(i,o.line))),i.iter(l,s.line+1,function(t){if(t==r.maxLine)return a=!0,!0})),i.sel.contains(e.from,e.to)>-1&&Nt(t),zi(i,e,n,xn(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,function(t){var e=bt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,o.line),wi(t,400);var u=e.text.length-(s.line-o.line)-1;e.full?fi(t):o.line!=s.line||1!=e.text.length||Wi(t.doc,e)?fi(t,o.line,s.line+1,u):mi(t,o.line,"text");var c=At(t,"changes"),d=At(t,"change");if(d||c){var h={from:o,to:s,text:e.text,removed:e.removed,origin:e.origin};d&&ke(t,"change",t,h),c&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(h)}t.display.selForContextMenu=null}function Dr(t,e,n,i,r){if(i||(i=n),R(i,n)<0){var o=i;i=n,n=o}"string"==typeof e&&(e=t.splitLines(e)),xr(t,{from:n,to:i,text:e,origin:r})}function Er(t,e,n,i){n<t.line?t.line+=i:e<t.line&&(t.line=e,t.ch=0)}function Or(t,e,n,i){for(var r=0;r<t.length;++r){var o=t[r],s=!0;if(o.ranges){o.copied||(o=t[r]=o.deepCopy(),o.copied=!0);for(var a=0;a<o.ranges.length;a++)Er(o.ranges[a].anchor,e,n,i),Er(o.ranges[a].head,e,n,i)}else{for(var l=0;l<o.changes.length;++l){var u=o.changes[l];if(n<u.from.line)u.from=L(u.from.line+i,u.from.ch),u.to=L(u.to.line+i,u.to.ch);else if(e<=u.to.line){s=!1;break}}s||(t.splice(0,r+1),r=0)}}}function Pr(t,e){var n=e.from.line,i=e.to.line,r=e.text.length-(i-n)-1;Or(t.done,n,i,r),Or(t.undone,n,i,r)}function Nr(t,e,n,i){var r=e,o=e;return"number"==typeof e?o=M(t,z(t,e)):r=P(e),null==r?null:(i(o,r)&&t.cm&&mi(t.cm,r,n),o)}function Ar(t,e,n){yt(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&Jn(t,null,n)}function Ir(t,e,n,i){var r=new ca(t,n,i),o=t.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),Nr(t,e,"widget",function(e){var n=e.widgets||(e.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length-1,Math.max(0,r.insertAt)),0,r),r.line=e,o&&!gt(t,e)){var i=yt(e)<t.scrollTop;O(e,e.height+Fe(r)),i&&Jn(o,null,r.height),o.curOp.forceUpdate=!0}return!0}),ke(o,"lineWidgetAdded",o,r,"number"==typeof e?e:P(e)),r}function Lr(t,e,n,i,o){if(i&&i.shared)return Rr(t,e,n,i,o);if(t.cm&&!t.cm.curOp)return di(t.cm,Lr)(t,e,n,i,o);var s=new ha(t,o),a=R(e,n);if(i&&c(i,s,!1),a>0||0==a&&s.clearWhenEmpty!==!1)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ct(t,e.line,e,n,s)||e.line!=n.line&&ct(t,n.line,e,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");G()}s.addToHistory&&$i(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,u=e.line,d=t.cm;if(t.iter(u,n.line+1,function(t){d&&s.collapsed&&!d.options.lineWrapping&&dt(t)==d.display.maxLine&&(l=!0),s.collapsed&&u!=e.line&&O(t,0),$(t,new q(s,u==e.line?e.ch:null,u==n.line?n.ch:null)),++u}),s.collapsed&&t.iter(e.line,n.line+1,function(e){gt(t,e)&&O(e,0)}),s.clearOnEnter&&Rs(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(V(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),s.collapsed&&(s.id=++da,s.atomic=!0),d){if(l&&(d.curOp.updateMaxLine=!0),s.collapsed)fi(d,e.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var h=e.line;h<=n.line;h++)mi(d,h,"text");s.atomic&&mr(d.doc),ke(d,"markerAdded",d,s)}return s}function Rr(t,e,n,i,r){i=c(i),i.shared=!1;var o=[Lr(t,e,n,i,r)],s=o[0],a=i.widgetNode;return Ui(t,function(t){a&&(i.widgetNode=a.cloneNode(!0)),o.push(Lr(t,U(t,e),U(t,n),i,r));for(var l=0;l<t.linked.length;++l)if(t.linked[l].isParent)return;s=m(o)}),new pa(o,s)}function Fr(t){return t.findMarks(L(t.first,0),t.clipPos(L(t.lastLine())),function(t){return t.parent})}function jr(t,e){for(var n=0;n<e.length;n++){var i=e[n],r=i.find(),o=t.clipPos(r.from),s=t.clipPos(r.to);if(R(o,s)){var a=Lr(t,o,s,i.primary,i.primary.type);i.markers.push(a),a.parent=i}}}function Hr(t){for(var e=function(e){var n=t[e],i=[n.primary.doc];Ui(n.primary.doc,function(t){return i.push(t)});for(var r=0;r<n.markers.length;r++){var o=n.markers[r];h(i,o.doc)==-1&&(o.parent=null,n.markers.splice(r--,1))}},n=0;n<t.length;n++)e(n)}function Wr(t){var e=this;if(Br(e),!Pt(e,t)&&!je(e.display,t)){Lt(t),Jo&&(ga=+new Date);var n=Cn(e,t,!0),i=t.dataTransfer.files;if(n&&!e.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),s=0,a=function(t,i){if(!e.options.allowDropFileTypes||h(e.options.allowDropFileTypes,t.type)!=-1){var a=new FileReader;a.onload=di(e,function(){var t=a.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t)&&(t=""),o[i]=t,++s==r){n=U(e.doc,n);var l={from:n,to:n,text:e.doc.splitLines(o.join(e.doc.lineSeparator())),origin:"paste"};xr(e.doc,l),dr(e.doc,Ni(n,Ai(l)))}}),a.readAsText(t)}},l=0;l<r;++l)a(i[l],l);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var u=t.dataTransfer.getData("Text");if(u){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),pr(e.doc,Ni(n,n)),c)for(var d=0;d<c.length;++d)Dr(e.doc,"",c[d].anchor,c[d].head,"drag");e.replaceSelection(u,"around","paste"),e.display.input.focus()}}catch(t){}}}}function zr(t,e){if(Jo&&(!t.state.draggingText||+new Date-ga<100))return void jt(e);if(!Pt(t,e)&&!je(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!os)){var n=i("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",rs&&(n.width=n.height=1,t.display.wrapper.appendChild(n),n._top=n.offsetTop),e.dataTransfer.setDragImage(n,0,0),rs&&n.parentNode.removeChild(n)}}function Ur(t,e){var r=Cn(t,e);if(r){var o=document.createDocumentFragment();Dn(t,r,o),t.display.dragCursor||(t.display.dragCursor=i("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),n(t.display.dragCursor,o)}}function Br(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function Yr(t){if(document.body.getElementsByClassName)for(var e=document.body.getElementsByClassName("CodeMirror"),n=0;n<e.length;n++){var i=e[n].CodeMirror;i&&t(i)}}function Vr(){va||(Gr(),va=!0)}function Gr(){var t;Rs(window,"resize",function(){null==t&&(t=setTimeout(function(){t=null,Yr(qr)},100))}),Rs(window,"blur",function(){return Yr(In)})}function qr(t){var e=t.display;e.lastWrapHeight==e.wrapper.clientHeight&&e.lastWrapWidth==e.wrapper.clientWidth||(e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize())}function Kr(t){var e=t.split(/-(?!$)/);t=e[e.length-1];for(var n,i,r,o,s=0;s<e.length-1;s++){var a=e[s];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return n&&(t="Alt-"+t),i&&(t="Ctrl-"+t),o&&(t="Cmd-"+t),r&&(t="Shift-"+t),t}function Xr(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete t[n];continue}for(var r=g(n.split(" "),Kr),o=0;o<r.length;o++){var s=void 0,a=void 0;o==r.length-1?(a=r.join(" "),s=i):(a=r.slice(0,o+1).join(" "),s="...");var l=e[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else e[a]=s}delete t[n]}for(var u in e)t[u]=e[u];return t}function $r(t,e,n,i){e=Jr(e);var r=e.call?e.call(t,i):e[t];if(r===!1)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return $r(t,e.fallthrough,n,i);for(var o=0;o<e.fallthrough.length;o++){var s=$r(t,e.fallthrough[o],n,i);if(s)return s}}}function Zr(t){var e="string"==typeof t?t:ya[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function Qr(t,e){if(rs&&34==t.keyCode&&t.char)return!1;var n=ya[t.keyCode],i=n;return null!=i&&!t.altGraphKey&&(t.altKey&&"Alt"!=n&&(i="Alt-"+i),(gs?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(i="Ctrl-"+i),(gs?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(i="Cmd-"+i),!e&&t.shiftKey&&"Shift"!=n&&(i="Shift-"+i),i)}function Jr(t){return"string"==typeof t?xa[t]:t}function to(t,e){for(var n=t.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=e(n[r]);i.length&&R(o.from,m(i).to)<=0;){var s=i.pop();if(R(s.from,o.from)<0){o.from=s.from;break}}i.push(o)}ci(t,function(){for(var e=i.length-1;e>=0;e--)Dr(t.doc,"",i[e].from,i[e].to,"+delete");ti(t)})}function eo(t,e){var n=M(t.doc,e),i=dt(n);return i!=n&&(e=P(i)),Tt(!0,t,i,e,1)}function no(t,e){var n=M(t.doc,e),i=ht(n);return i!=n&&(e=P(i)),Tt(!0,t,n,e,-1)}function io(t,e){var n=eo(t,e.line),i=M(t.doc,n.line),r=kt(i,t.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=e.line==n.line&&e.ch<=o&&e.ch;return L(n.line,s?0:o,n.sticky)}return n}function ro(t,e,n){if("string"==typeof e&&(e=Sa[e],!e))return!1;t.display.input.ensurePolled();var i=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=Cs}finally{t.display.shift=i,t.state.suppressEdits=!1}return r}function oo(t,e,n){for(var i=0;i<t.state.keyMaps.length;i++){var r=$r(e,t.state.keyMaps[i],n,t);if(r)return r}return t.options.extraKeys&&$r(e,t.options.extraKeys,n,t)||$r(e,t.options.keyMap,n,t)}function so(t,e,n,i){var r=t.state.keySeq;if(r){if(Zr(e))return"handled";Ta.set(50,function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())}),e=r+" "+e}var o=oo(t,e,i);return"multi"==o&&(t.state.keySeq=e),"handled"==o&&ke(t,"keyHandled",t,e,n),"handled"!=o&&"multi"!=o||(Lt(n),On(t)),r&&!o&&/\'$/.test(e)?(Lt(n),!0):!!o}function ao(t,e){var n=Qr(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?so(t,"Shift-"+n,e,function(e){return ro(t,e,!0)})||so(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return ro(t,e)}):so(t,n,e,function(e){return ro(t,e)}))}function lo(t,e,n){return so(t,"'"+n+"'",e,function(e){return ro(t,e,!0)})}function uo(t){var e=this;if(e.curOp.focus=s(),!Pt(e,t)){Jo&&ts<11&&27==t.keyCode&&(t.returnValue=!1);var n=t.keyCode;e.display.shift=16==n||t.shiftKey;var i=ao(e,t);rs&&(Ma=i?n:null,!i&&88==n&&!Ws&&(ds?t.metaKey:t.ctrlKey)&&e.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(e.display.lineDiv.className)||co(e)}}function co(t){function e(t){18!=t.keyCode&&t.altKey||(ys(n,"CodeMirror-crosshair"),Et(document,"keyup",e),Et(document,"mouseover",e))}var n=t.display.lineDiv;a(n,"CodeMirror-crosshair"),Rs(document,"keyup",e),Rs(document,"mouseover",e)}function ho(t){16==t.keyCode&&(this.doc.sel.shift=!1),Pt(this,t)}function po(t){var e=this;if(!(je(e.display,t)||Pt(e,t)||t.ctrlKey&&!t.altKey||ds&&t.metaKey)){var n=t.keyCode,i=t.charCode;if(rs&&n==Ma)return Ma=null,void Lt(t);if(!rs||t.which&&!(t.which<10)||!ao(e,t)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(lo(e,t,r)||e.display.input.onKeyPress(t))}}}function fo(t){var e=this,n=e.display;if(!(Pt(e,t)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=t.shiftKey,je(n,t))return void(es||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100)));if(!bo(e,t)){var i=Cn(e,t);switch(window.focus(),Wt(t)){case 1:e.state.selectingText?e.state.selectingText(t):i?mo(e,t,i):Ht(t)==n.scroller&&Lt(t);break;case 2:es&&(e.state.lastMiddleDown=+new Date),i&&sr(e.doc,i),setTimeout(function(){return n.input.focus()},20),Lt(t);break;case 3:vs?wo(e,t):Nn(e)}}}}function mo(t,e,n){Jo?setTimeout(u(Pn,t),0):t.curOp.focus=s();var i,r=+new Date;Ca&&Ca.time>r-400&&0==R(Ca.pos,n)?i="triple":ka&&ka.time>r-400&&0==R(ka.pos,n)?(i="double",Ca={time:r,pos:n}):(i="single",ka={time:r,pos:n});var o,a=t.doc.sel,l=ds?e.metaKey:e.ctrlKey;t.options.dragDrop&&Fs&&!t.isReadOnly()&&"single"==i&&(o=a.contains(n))>-1&&(R((o=a.ranges[o]).from(),n)<0||n.xRel>0)&&(R(o.to(),n)>0||n.xRel<0)?go(t,e,n,l):vo(t,e,n,i,l)}function go(t,e,n,i){var r=t.display,o=!1,s=di(t,function(e){es&&(r.scroller.draggable=!1),t.state.draggingText=!1,Et(document,"mouseup",s),Et(document,"mousemove",a),Et(r.scroller,"dragstart",l),Et(r.scroller,"drop",s),o||(Lt(e),i||sr(t.doc,n),es||Jo&&9==ts?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},l=function(){return o=!0};es&&(r.scroller.draggable=!0),t.state.draggingText=s,s.copy=ds?e.altKey:e.ctrlKey,r.scroller.dragDrop&&r.scroller.dragDrop(),Rs(document,"mouseup",s),Rs(document,"mousemove",a),Rs(r.scroller,"dragstart",l),Rs(r.scroller,"drop",s),Nn(t),setTimeout(function(){return r.input.focus()},20)}function vo(t,e,n,i,r){function o(e){if(0!=R(b,e))if(b=e,"rect"==i){for(var r=[],o=t.options.tabSize,s=d(M(c,n.line).text,n.ch,o),a=d(M(c,e.line).text,e.ch,o),l=Math.min(s,a),u=Math.max(s,a),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var y=M(c,g).text,w=p(y,l,o);l==u?r.push(new aa(L(g,w),L(g,w))):y.length>w&&r.push(new aa(L(g,w),L(g,p(y,u,o))))}r.length||r.push(new aa(n,n)),hr(c,Pi(m.ranges.slice(0,f).concat(r),f),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var _=h,x=_.anchor,k=e;if("single"!=i){var C;C="double"==i?t.findWordAt(e):new aa(L(e.line,0),U(c,L(e.line+1,0))),R(C.anchor,x)>0?(k=C.head,x=W(_.from(),C.anchor)):(k=C.anchor,x=H(_.to(),C.head))}var S=m.ranges.slice(0);S[f]=new aa(U(c,x),k),hr(c,Pi(S,f),Ts)}}function a(e){var n=++_,r=Cn(t,e,!0,"rect"==i);if(r)if(0!=R(r,b)){t.curOp.focus=s(),o(r);var l=Hn(u,c);(r.line>=l.to||r.line<l.from)&&setTimeout(di(t,function(){_==n&&a(e)}),150)}else{var d=e.clientY<w.top?-20:e.clientY>w.bottom?20:0;d&&setTimeout(di(t,function(){_==n&&(u.scroller.scrollTop+=d,a(e))}),50)}}function l(e){t.state.selectingText=!1,_=1/0,Lt(e),u.input.focus(),Et(document,"mousemove",x),Et(document,"mouseup",k),c.history.lastSelOrigin=null}var u=t.display,c=t.doc;Lt(e);var h,f,m=c.sel,g=m.ranges;if(r&&!e.shiftKey?(f=c.sel.contains(n),h=f>-1?g[f]:new aa(n,n)):(h=c.sel.primary(),f=c.sel.primIndex),hs?e.shiftKey&&e.metaKey:e.altKey)i="rect",r||(h=new aa(n,n)),n=Cn(t,e,!0,!0),f=-1;else if("double"==i){var v=t.findWordAt(n);h=t.display.shift||c.extend?or(c,h,v.anchor,v.head):v}else if("triple"==i){var y=new aa(L(n.line,0),U(c,L(n.line+1,0)));h=t.display.shift||c.extend?or(c,h,y.anchor,y.head):y}else h=or(c,h,n);r?f==-1?(f=g.length,hr(c,Pi(g.concat([h]),f),{scroll:!1,origin:"*mouse"})):g.length>1&&g[f].empty()&&"single"==i&&!e.shiftKey?(hr(c,Pi(g.slice(0,f).concat(g.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),m=c.sel):lr(c,f,h,Ts):(f=0,hr(c,new sa([h],0),Ts),m=c.sel);var b=n,w=u.wrapper.getBoundingClientRect(),_=0,x=di(t,function(t){Wt(t)?a(t):l(t)}),k=di(t,l);t.state.selectingText=k,Rs(document,"mousemove",x),Rs(document,"mouseup",k)}function yo(t,e,n,i){var r,o;try{r=e.clientX,o=e.clientY}catch(t){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&Lt(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!At(t,n))return Ft(e);o-=a.top-s.viewOffset;for(var l=0;l<t.options.gutters.length;++l){var u=s.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=r){var c=N(t.doc,o),d=t.options.gutters[l];return Ot(t,n,t,c,d,e),Ft(e)}}}function bo(t,e){return yo(t,e,"gutterClick",!0)}function wo(t,e){je(t.display,e)||_o(t,e)||Pt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function _o(t,e){return!!At(t,"gutterContextMenu")&&yo(t,e,"gutterContextMenu",!1)}function xo(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),
4
+ on(t)}function ko(t){function e(e,i,r,o){t.defaults[e]=i,r&&(n[e]=o?function(t,e,n){n!=Da&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Da,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,ji(t)},!0),e("indentUnit",2,ji,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){Hi(t),on(t),fi(t)},!0),e("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(o==-1)break;r=o+e.length,n.push(L(i,o))}i++});for(var r=n.length-1;r>=0;r--)Dr(t.doc,e,n[r],L(n[r].line,n[r].ch+e.length))}}),e("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Da&&t.refresh()}),e("specialCharPlaceholder",he,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",cs?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!ps),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){xo(t),Co(t)},!0),e("keyMap","default",function(t,e,n){var i=Jr(e),r=n!=Da&&Jr(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)}),e("extraKeys",null),e("lineWrapping",!1,To,!0),e("gutters",[],function(t){Oi(t.options),Co(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?_n(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return Gn(t)},!0),e("scrollbarStyle","native",function(t){Kn(t),Gn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Oi(t.options),Co(t)},!0),e("firstLineNumber",1,Co,!0),e("lineNumberFormatter",function(t){return t},Co,!0),e("showCursorWhenSelecting",!1,Tn,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("readOnly",!1,function(t,e){"nocursor"==e?(In(t),t.display.input.blur(),t.display.disabled=!0):t.display.disabled=!1,t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,So),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,Tn,!0),e("singleCursorHeightPerLine",!0,Tn,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Hi,!0),e("addModeClass",!1,Hi,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,Hi,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null),e("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0)}function Co(t){Ei(t),fi(t),Ln(t)}function So(t,e,n){var i=n&&n!=Da;if(!e!=!i){var r=t.display.dragFunctions,o=e?Rs:Et;o(t.display.scroller,"dragstart",r.start),o(t.display.scroller,"dragenter",r.enter),o(t.display.scroller,"dragover",r.over),o(t.display.scroller,"dragleave",r.leave),o(t.display.scroller,"drop",r.drop)}}function To(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(ys(t.display.wrapper,"CodeMirror-wrap"),wt(t)),kn(t),fi(t),on(t),setTimeout(function(){return Gn(t)},100)}function Mo(t,e){var n=this;if(!(this instanceof Mo))return new Mo(t,e);this.options=e=e?c(e):{},c(Ea,e,!1),Oi(e);var i=e.value;"string"==typeof i&&(i=new ma(i,e.mode,null,e.lineSeparator,e.direction)),this.doc=i;var r=new Mo.inputStyles[e.inputStyle](this),o=this.display=new T(t,i,r);o.wrapper.CodeMirror=this,Ei(this),xo(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Kn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new ws,keySeq:null,specialChars:null},e.autofocus&&!cs&&o.input.focus(),Jo&&ts<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Do(this),Vr(),ni(this),this.curOp.forceUpdate=!0,Bi(this,i),e.autofocus&&!cs||this.hasFocus()?setTimeout(u(An,this),20):In(this);for(var s in Oa)Oa.hasOwnProperty(s)&&Oa[s](n,e[s],Da);Rn(this),e.finishInit&&e.finishInit(this);for(var a=0;a<Pa.length;++a)Pa[a](n);ii(this),es&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Do(t){function e(){r.activeTouch&&(o=setTimeout(function(){return r.activeTouch=null},1e3),s=r.activeTouch,s.end=+new Date)}function n(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}function i(t,e){if(null==e.left)return!0;var n=e.left-t.left,i=e.top-t.top;return n*n+i*i>400}var r=t.display;Rs(r.scroller,"mousedown",di(t,fo)),Jo&&ts<11?Rs(r.scroller,"dblclick",di(t,function(e){if(!Pt(t,e)){var n=Cn(t,e);if(n&&!bo(t,e)&&!je(t.display,e)){Lt(e);var i=t.findWordAt(n);sr(t.doc,i.anchor,i.head)}}})):Rs(r.scroller,"dblclick",function(e){return Pt(t,e)||Lt(e)}),vs||Rs(r.scroller,"contextmenu",function(e){return wo(t,e)});var o,s={end:0};Rs(r.scroller,"touchstart",function(e){if(!Pt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),Rs(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Rs(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!je(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=t.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new aa(a,a):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(a):new aa(L(a.line,0),U(t.doc,L(a.line+1,0))),t.setSelection(s.anchor,s.head),t.focus(),Lt(n)}e()}),Rs(r.scroller,"touchcancel",e),Rs(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Wn(t,r.scroller.scrollTop),zn(t,r.scroller.scrollLeft,!0),Ot(t,"scroll",t))}),Rs(r.scroller,"mousewheel",function(e){return Yn(t,e)}),Rs(r.scroller,"DOMMouseScroll",function(e){return Yn(t,e)}),Rs(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){Pt(t,e)||jt(e)},over:function(e){Pt(t,e)||(Ur(t,e),jt(e))},start:function(e){return zr(t,e)},drop:di(t,Wr),leave:function(e){Pt(t,e)||Br(t)}};var a=r.input.getField();Rs(a,"keyup",function(e){return ho.call(t,e)}),Rs(a,"keydown",di(t,uo)),Rs(a,"keypress",di(t,po)),Rs(a,"focus",function(e){return An(t,e)}),Rs(a,"blur",function(e){return In(t,e)})}function Eo(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=te(t,e):n="prev");var s=t.options.tabSize,a=M(o,e),l=d(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var u,c=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&(u=o.mode.indent(r,a.text.slice(c.length),a.text),u==Cs||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=e>o.first?d(M(o,e-1).text,null,s):0:"add"==n?u=l+t.options.indentUnit:"subtract"==n?u=l-t.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var h="",p=0;if(t.options.indentWithTabs)for(var m=Math.floor(u/s);m;--m)p+=s,h+="\t";if(p<u&&(h+=f(u-p)),h!=c)return Dr(o,h,L(e,0),L(e,c.length),"+input"),a.stateAfter=null,!0;for(var g=0;g<o.sel.ranges.length;g++){var v=o.sel.ranges[g];if(v.head.line==e&&v.head.ch<c.length){var y=L(e,c.length);lr(o,g,new aa(y,y));break}}}function Oo(t){Na=t}function Po(t,e,n,i,r){var o=t.doc;t.display.shift=!1,i||(i=o.sel);var s=t.state.pasteIncoming||"paste"==r,a=js(e),l=null;if(s&&i.ranges.length>1)if(Na&&Na.text.join("\n")==e){if(i.ranges.length%Na.text.length==0){l=[];for(var u=0;u<Na.text.length;u++)l.push(o.splitLines(Na.text[u]))}}else a.length==i.ranges.length&&(l=g(a,function(t){return[t]}));for(var c,d=i.ranges.length-1;d>=0;d--){var h=i.ranges[d],p=h.from(),f=h.to();h.empty()&&(n&&n>0?p=L(p.line,p.ch-n):t.state.overwrite&&!s?f=L(f.line,Math.min(M(o,f.line).text.length,f.ch+m(a).length)):Na&&Na.lineWise&&Na.text.join("\n")==e&&(p=f=L(p.line,0))),c=t.curOp.updateInput;var v={from:p,to:f,text:l?l[d%l.length]:a,origin:r||(s?"paste":t.state.cutIncoming?"cut":"+input")};xr(t.doc,v),ke(t,"inputRead",t,v)}e&&!s&&Ao(t,e),ti(t),t.curOp.updateInput=c,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function No(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||ci(e,function(){return Po(e,n,0,null,"paste")}),!0}function Ao(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(e.indexOf(o.electricChars.charAt(a))>-1){s=Eo(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Eo(t,r.head.line,"smart"));s&&ke(t,"electricInput",t,r.head.line)}}}function Io(t){for(var e=[],n=[],i=0;i<t.doc.sel.ranges.length;i++){var r=t.doc.sel.ranges[i].head.line,o={anchor:L(r,0),head:L(r+1,0)};n.push(o),e.push(t.getRange(o.anchor,o.head))}return{text:e,ranges:n}}function Lo(t,e){t.setAttribute("autocorrect","off"),t.setAttribute("autocapitalize","off"),t.setAttribute("spellcheck",!!e)}function Ro(){var t=i("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=i("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return es?t.style.width="1000px":t.setAttribute("wrap","off"),ls&&(t.style.border="1px solid black"),Lo(t),e}function Fo(t,e,n,i,r){function o(){var i=e.line+n;return!(i<t.first||i>=t.first+t.size)&&(e=new L(i,e.ch,e.sticky),u=M(t,i))}function s(i){var s;if(s=r?Mt(t.cm,u,e,n):St(u,e,n),null==s){if(i||!o())return!1;e=Tt(r,t.cm,u,e.line,n)}else e=s;return!0}var a=e,l=n,u=M(t,e.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var c=null,d="group"==i,h=t.cm&&t.cm.getHelper(e,"wordChars"),p=!0;!(n<0)||s(!p);p=!1){var f=u.text.charAt(e.ch)||"\n",m=_(f,h)?"w":d&&"\n"==f?"n":!d||/\s/.test(f)?null:"p";if(!d||p||m||(m="s"),c&&c!=m){n<0&&(n=1,s(),e.sticky="after");break}if(m&&(c=m),n>0&&!s(!p))break}var g=yr(t,e,a,l,!0);return F(a,g)&&(g.hitSide=!0),g}function jo(t,e,n,i){var r,o=t.doc,s=e.left;if("page"==i){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*yn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(var u;u=fn(t,s,r),u.outside;){if(n<0?r<=0:r>=o.height){u.hitSide=!0;break}r+=5*n}return u}function Ho(t,e){var n=Xe(t,e.line);if(!n||n.hidden)return null;var i=M(t.doc,e.line),r=Ge(n,i,e.line),o=kt(i,t.doc.direction),s="left";if(o){var a=xt(o,e.ch);s=a%2?"right":"left"}var l=Qe(r.map,e.ch,s);return l.offset="right"==l.collapse?l.end:l.start,l}function Wo(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function zo(t,e){return e&&(t.bad=!0),t}function Uo(t,e,n,i,r){function o(t){return function(e){return e.id==t}}function s(){c&&(u+=d,c=!1)}function a(t){t&&(s(),u+=t)}function l(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void a(n||e.textContent.replace(/\u200b/g,""));var u,h=e.getAttribute("cm-marker");if(h){var p=t.findMarks(L(i,0),L(r+1,0),o(+h));return void(p.length&&(u=p[0].find())&&a(D(t.doc,u.from,u.to).join(d)))}if("false"==e.getAttribute("contenteditable"))return;var f=/^(pre|div|p)$/i.test(e.nodeName);f&&s();for(var m=0;m<e.childNodes.length;m++)l(e.childNodes[m]);f&&(c=!0)}else 3==e.nodeType&&a(e.nodeValue)}for(var u="",c=!1,d=t.doc.lineSeparator();l(e),e!=n;)e=e.nextSibling;return u}function Bo(t,e,n){var i;if(e==t.display.lineDiv){if(i=t.display.lineDiv.childNodes[n],!i)return zo(t.clipPos(L(t.display.viewTo-1)),!0);e=null,n=0}else for(i=e;;i=i.parentNode){if(!i||i==t.display.lineDiv)return null;if(i.parentNode&&i.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var o=t.display.view[r];if(o.node==i)return Yo(o,e,n)}}function Yo(t,e,n){function i(e,n,i){for(var r=-1;r<(d?d.length:0);r++)for(var o=r<0?c.map:d[r],s=0;s<o.length;s+=3){var a=o[s+2];if(a==e||a==n){var l=P(r<0?t.line:t.rest[r]),u=o[s]+i;return(i<0||a!=e)&&(u=o[s+(i?1:0)]),L(l,u)}}}var r=t.text.firstChild,s=!1;if(!e||!o(r,e))return zo(L(P(t.line),0),!0);if(e==r&&(s=!0,e=r.childNodes[n],n=0,!e)){var a=t.rest?m(t.rest):t.line;return zo(L(P(a),a.text.length),s)}var l=3==e.nodeType?e:null,u=e;for(l||1!=e.childNodes.length||3!=e.firstChild.nodeType||(l=e.firstChild,n&&(n=l.nodeValue.length));u.parentNode!=r;)u=u.parentNode;var c=t.measure,d=c.maps,h=i(l,u,n);if(h)return zo(h,s);for(var p=u.nextSibling,f=l?l.nodeValue.length-n:0;p;p=p.nextSibling){if(h=i(p,p.firstChild,0))return zo(L(h.line,h.ch-f),s);f+=p.textContent.length}for(var g=u.previousSibling,v=n;g;g=g.previousSibling){if(h=i(g,g.firstChild,-1))return zo(L(h.line,h.ch+v),s);v+=g.textContent.length}}function Vo(t,e){function n(){t.value=l.getValue()}if(e=e?c(e):{},e.value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var i=s();e.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}var r;if(t.form&&(Rs(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var a=o.submit=function(){n(),o.submit=r,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(e){e.save=n,e.getTextArea=function(){return t},e.toTextArea=function(){e.toTextArea=isNaN,n(),t.parentNode.removeChild(e.getWrapperElement()),t.style.display="",t.form&&(Et(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=r))}},t.style.display="none";var l=Mo(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return l}function Go(t){t.off=Et,t.on=Rs,t.wheelEventPixels=Bn,t.Doc=ma,t.splitLines=js,t.countColumn=d,t.findColumn=p,t.isWordChar=w,t.Pass=Cs,t.signal=Ot,t.Line=Gs,t.changeEnd=Ai,t.scrollbarModel=ia,t.Pos=L,t.cmpPos=R,t.modes=Us,t.mimeModes=Bs,t.resolveMode=Gt,t.getMode=qt,t.modeExtensions=Ys,t.extendMode=Kt,t.copyState=Xt,t.startState=Zt,t.innerMode=$t,t.commands=Sa,t.keyMap=xa,t.keyName=Qr,t.isModifierKey=Zr,t.lookupKey=$r,t.normalizeKeyMap=Xr,t.StringStream=Vs,t.SharedTextMarker=pa,t.TextMarker=ha,t.LineWidget=ca,t.e_preventDefault=Lt,t.e_stopPropagation=Rt,t.e_stop=jt,t.addClass=a,t.contains=o,t.rmClass=ys,t.keyNames=ya}var qo=navigator.userAgent,Ko=navigator.platform,Xo=/gecko\/\d/i.test(qo),$o=/MSIE \d/.test(qo),Zo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qo),Qo=/Edge\/(\d+)/.exec(qo),Jo=$o||Zo||Qo,ts=Jo&&($o?document.documentMode||6:+(Qo||Zo)[1]),es=!Qo&&/WebKit\//.test(qo),ns=es&&/Qt\/\d+\.\d+/.test(qo),is=!Qo&&/Chrome\//.test(qo),rs=/Opera\//.test(qo),os=/Apple Computer/.test(navigator.vendor),ss=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(qo),as=/PhantomJS/.test(qo),ls=!Qo&&/AppleWebKit/.test(qo)&&/Mobile\/\w+/.test(qo),us=/Android/.test(qo),cs=ls||us||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(qo),ds=ls||/Mac/.test(Ko),hs=/\bCrOS\b/.test(qo),ps=/win/i.test(Ko),fs=rs&&qo.match(/Version\/(\d*\.\d*)/);fs&&(fs=Number(fs[1])),fs&&fs>=15&&(rs=!1,es=!0);var ms,gs=ds&&(ns||rs&&(null==fs||fs<12.11)),vs=Xo||Jo&&ts>=9,ys=function(e,n){var i=e.className,r=t(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(o?r[1]+o:"")}};ms=document.createRange?function(t,e,n,i){var r=document.createRange();return r.setEnd(i||t,n),r.setStart(t,e),r}:function(t,e,n){var i=document.body.createTextRange();try{i.moveToElementText(t.parentNode)}catch(t){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",e),i};var bs=function(t){t.select()};ls?bs=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:Jo&&(bs=function(t){try{t.select()}catch(t){}});var ws=function(){this.id=null};ws.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var _s,xs,ks=30,Cs={toString:function(){return"CodeMirror.Pass"}},Ss={scroll:!1},Ts={origin:"*mouse"},Ms={origin:"+move"},Ds=[""],Es=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Os=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Ps=!1,Ns=!1,As=null,Is=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1785?i.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var u="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var c=n.length,d=[],h=0;h<c;++h)d.push(t(n.charCodeAt(h)));for(var p=0,f=u;p<c;++p){var g=d[p];"m"==g?d[p]=f:f=g}for(var v=0,y=u;v<c;++v){var b=d[v];"1"==b&&"r"==y?d[v]="n":s.test(b)&&(y=b,"r"==b&&(d[v]="R"))}for(var w=1,_=d[0];w<c-1;++w){var x=d[w];"+"==x&&"1"==_&&"1"==d[w+1]?d[w]="1":","!=x||_!=d[w+1]||"1"!=_&&"n"!=_||(d[w]=_),_=x}for(var k=0;k<c;++k){var C=d[k];if(","==C)d[k]="N";else if("%"==C){var S=void 0;for(S=k+1;S<c&&"%"==d[S];++S);for(var T=k&&"!"==d[k-1]||S<c&&"1"==d[S]?"1":"N",M=k;M<S;++M)d[M]=T;k=S-1}}for(var D=0,E=u;D<c;++D){var O=d[D];"L"==E&&"1"==O?d[D]="L":s.test(O)&&(E=O)}for(var P=0;P<c;++P)if(o.test(d[P])){var N=void 0;for(N=P+1;N<c&&o.test(d[N]);++N);for(var A="L"==(P?d[P-1]:u),I="L"==(N<c?d[N]:u),L=A==I?A?"L":"R":u,R=P;R<N;++R)d[R]=L;P=N-1}for(var F,j=[],H=0;H<c;)if(a.test(d[H])){var W=H;for(++H;H<c&&a.test(d[H]);++H);j.push(new e(0,W,H))}else{var z=H,U=j.length;for(++H;H<c&&"L"!=d[H];++H);for(var B=z;B<H;)if(l.test(d[B])){z<B&&j.splice(U,0,new e(1,z,B));var Y=B;for(++B;B<H&&l.test(d[B]);++B);j.splice(U,0,new e(2,Y,B)),z=B}else++B;z<H&&j.splice(U,0,new e(1,z,H))}return 1==j[0].level&&(F=n.match(/^\s+/))&&(j[0].from=F[0].length,j.unshift(new e(0,0,F[0].length))),1==m(j).level&&(F=n.match(/\s+$/))&&(m(j).to-=F[0].length,j.push(new e(0,c-F[0].length,c))),"rtl"==i?j.reverse():j}}(),Ls=[],Rs=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var i=t._handlers||(t._handlers={});i[e]=(i[e]||Ls).concat(n)}},Fs=function(){if(Jo&&ts<9)return!1;var t=i("div");return"draggable"in t||"dragDrop"in t}(),js=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){var r=t.indexOf("\n",e);r==-1&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=o.indexOf("\r");s!=-1?(n.push(o.slice(0,s)),e+=s+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},Hs=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Ws=function(){var t=i("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),zs=null,Us={},Bs={},Ys={},Vs=function(t,e){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Vs.prototype.eol=function(){return this.pos>=this.string.length},Vs.prototype.sol=function(){return this.pos==this.lineStart},Vs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vs.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Vs.prototype.eat=function(t){var e,n=this.string.charAt(this.pos);if(e="string"==typeof t?n==t:n&&(t.test?t.test(n):t(n)))return++this.pos,n},Vs.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},Vs.prototype.eatSpace=function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},Vs.prototype.skipToEnd=function(){this.pos=this.string.length},Vs.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Vs.prototype.backUp=function(t){this.pos-=t},Vs.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=d(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},Vs.prototype.indentation=function(){return d(this.string,null,this.tabSize)-(this.lineStart?d(this.string,this.lineStart,this.tabSize):0)},Vs.prototype.match=function(t,e,n){if("string"!=typeof t){var i=this.string.slice(this.pos).match(t);return i&&i.index>0?null:(i&&e!==!1&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t},o=this.string.substr(this.pos,t.length);if(r(o)==r(t))return e!==!1&&(this.pos+=t.length),!0},Vs.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vs.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}};var Gs=function(t,e,n){this.text=t,it(this,e),this.height=n?n(this):1};Gs.prototype.lineNo=function(){return P(this)},It(Gs);var qs,Ks={},Xs={},$s=null,Zs=null,Qs={left:0,right:0,top:0,bottom:0},Js=0,ta=null;Jo?ta=-.53:Xo?ta=15:is?ta=-.7:os&&(ta=-1/3);var ea=function(t,e,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");t(r),t(o),Rs(r,"scroll",function(){r.clientHeight&&e(r.scrollTop,"vertical")}),Rs(o,"scroll",function(){o.clientWidth&&e(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Jo&&ts<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ea.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},ea.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ea.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ea.prototype.zeroWidthHack=function(){var t=ds&&!ss?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ws,this.disableVert=new ws},ea.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1);o!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},ea.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var na=function(){};na.prototype.update=function(){return{bottom:0,right:0}},na.prototype.setScrollLeft=function(){},na.prototype.setScrollTop=function(){},na.prototype.clear=function(){};var ia={native:ea,null:na},ra=0,oa=function(t,e,n){var i=t.display;this.viewport=e,this.visible=Hn(i,t.doc,e),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Be(t),this.force=n,this.dims=wn(t),this.events=[]};oa.prototype.signal=function(t,e){At(t,e)&&this.events.push(arguments)},oa.prototype.finish=function(){for(var t=this,e=0;e<this.events.length;e++)Ot.apply(null,t.events[e])};var sa=function(t,e){this.ranges=t,this.primIndex=e};sa.prototype.primary=function(){return this.ranges[this.primIndex]},sa.prototype.equals=function(t){var e=this;if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var i=e.ranges[n],r=t.ranges[n];if(!F(i.anchor,r.anchor)||!F(i.head,r.head))return!1}return!0},sa.prototype.deepCopy=function(){for(var t=this,e=[],n=0;n<this.ranges.length;n++)e[n]=new aa(j(t.ranges[n].anchor),j(t.ranges[n].head));return new sa(e,this.primIndex)},sa.prototype.somethingSelected=function(){for(var t=this,e=0;e<this.ranges.length;e++)if(!t.ranges[e].empty())return!0;return!1},sa.prototype.contains=function(t,e){var n=this;e||(e=t);for(var i=0;i<this.ranges.length;i++){var r=n.ranges[i];if(R(e,r.from())>=0&&R(t,r.to())<=0)return i}return-1};var aa=function(t,e){this.anchor=t,this.head=e};aa.prototype.from=function(){return W(this.anchor,this.head)},aa.prototype.to=function(){return H(this.anchor,this.head)},aa.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};var la=function(t){var e=this;this.lines=t,this.parent=null;for(var n=0,i=0;i<t.length;++i)t[i].parent=e,n+=t[i].height;this.height=n};la.prototype.chunkSize=function(){return this.lines.length},la.prototype.removeInner=function(t,e){for(var n=this,i=t,r=t+e;i<r;++i){var o=n.lines[i];n.height-=o.height,ue(o),ke(o,"delete")}this.lines.splice(t,e)},la.prototype.collapse=function(t){t.push.apply(t,this.lines)},la.prototype.insertInner=function(t,e,n){var i=this;this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var r=0;r<e.length;++r)e[r].parent=i},la.prototype.iterN=function(t,e,n){for(var i=this,r=t+e;t<r;++t)if(n(i.lines[t]))return!0};var ua=function(t){var e=this;this.children=t;for(var n=0,i=0,r=0;r<t.length;++r){var o=t[r];n+=o.chunkSize(),i+=o.height,o.parent=e}this.size=n,this.height=i,this.parent=null};ua.prototype.chunkSize=function(){return this.size},ua.prototype.removeInner=function(t,e){var n=this;this.size-=e;for(var i=0;i<this.children.length;++i){var r=n.children[i],o=r.chunkSize();if(t<o){var s=Math.min(e,o-t),a=r.height;if(r.removeInner(t,s),n.height-=a-r.height,o==s&&(n.children.splice(i--,1),r.parent=null),0==(e-=s))break;t=0}else t-=o}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof la))){var l=[];this.collapse(l),this.children=[new la(l)],this.children[0].parent=this}},ua.prototype.collapse=function(t){for(var e=this,n=0;n<this.children.length;++n)e.children[n].collapse(t)},ua.prototype.insertInner=function(t,e,n){var i=this;this.size+=e.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=i.children[r],s=o.chunkSize();if(t<=s){if(o.insertInner(t,e,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,l=a;l<o.lines.length;){var u=new la(o.lines.slice(l,l+=25));o.height-=u.height,i.children.splice(++r,0,u),u.parent=i}o.lines=o.lines.slice(0,a),i.maybeSpill()}break}t-=s}},ua.prototype.maybeSpill=function(){if(!(this.children.length<=10)){var t=this;do{var e=t.children.splice(t.children.length-5,5),n=new ua(e);if(t.parent){t.size-=n.size,t.height-=n.height;var i=h(t.parent.children,t);t.parent.children.splice(i+1,0,n)}else{var r=new ua(t.children);r.parent=t,t.children=[r,n],t=r}n.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},ua.prototype.iterN=function(t,e,n){for(var i=this,r=0;r<this.children.length;++r){var o=i.children[r],s=o.chunkSize();if(t<s){var a=Math.min(e,s-t);if(o.iterN(t,a,n))return!0;if(0==(e-=a))break;t=0}else t-=s}};var ca=function(t,e,n){var i=this;if(n)for(var r in n)n.hasOwnProperty(r)&&(i[r]=n[r]);this.doc=t,this.node=e};ca.prototype.clear=function(){var t=this,e=this.doc.cm,n=this.line.widgets,i=this.line,r=P(i);if(null!=r&&n){for(var o=0;o<n.length;++o)n[o]==t&&n.splice(o--,1);n.length||(i.widgets=null);var s=Fe(this);O(i,Math.max(0,i.height-s)),e&&(ci(e,function(){Ar(e,i,-s),mi(e,r,"widget")}),ke(e,"lineWidgetCleared",e,this,r))}},ca.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=Fe(this)-e;r&&(O(i,i.height+r),n&&ci(n,function(){n.curOp.forceUpdate=!0,Ar(n,i,r),ke(n,"lineWidgetChanged",n,t,P(i))}))},It(ca);var da=0,ha=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++da};ha.prototype.clear=function(){var t=this;if(!this.explicitlyCleared){var e=this.doc.cm,n=e&&!e.curOp;if(n&&ni(e),At(this,"clear")){var i=this.find();i&&ke(this,"clear",i.from,i.to)}for(var r=null,o=null,s=0;s<this.lines.length;++s){var a=t.lines[s],l=K(a.markedSpans,t);e&&!t.collapsed?mi(e,P(a),"text"):e&&(null!=l.to&&(o=P(a)),null!=l.from&&(r=P(a))),a.markedSpans=X(a.markedSpans,l),null==l.from&&t.collapsed&&!gt(t.doc,a)&&e&&O(a,yn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=dt(t.lines[u]),d=bt(c);d>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=d,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&fi(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&mr(e.doc)),
5
+ e&&ke(e,"markerCleared",e,this,r,o),n&&ii(e),this.parent&&this.parent.clear()}},ha.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var i,r,o=0;o<this.lines.length;++o){var s=n.lines[o],a=K(s.markedSpans,n);if(null!=a.from&&(i=L(e?s:P(s),a.from),t==-1))return i;if(null!=a.to&&(r=L(e?s:P(s),a.to),1==t))return r}return i&&{from:i,to:r}},ha.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,i=this.doc.cm;e&&i&&ci(i,function(){var r=e.line,o=P(e.line),s=Xe(i,o);if(s&&(nn(s),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!gt(n.doc,r)&&null!=n.height){var a=n.height;n.height=null;var l=Fe(n)-a;l&&O(r,r.height+l)}ke(i,"markerChanged",i,t)})},ha.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&h(e.maybeHiddenMarkers,this)!=-1||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},ha.prototype.detachLine=function(t){if(this.lines.splice(h(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},It(ha);var pa=function(t,e){var n=this;this.markers=t,this.primary=e;for(var i=0;i<t.length;++i)t[i].parent=n};pa.prototype.clear=function(){var t=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)t.markers[e].clear();ke(this,"clear")}},pa.prototype.find=function(t,e){return this.primary.find(t,e)},It(pa);var fa=0,ma=function(t,e,n,i,r){if(!(this instanceof ma))return new ma(t,e,n,i,r);null==n&&(n=0),ua.call(this,[new la([new Gs("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var o=L(n,0);this.sel=Ni(o),this.history=new Gi(null),this.id=++fa,this.modeOption=e,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),zi(this,{from:o,to:o,text:t}),hr(this,Ni(o),Ss)};ma.prototype=b(ua.prototype,{constructor:ma,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,i=0;i<e.length;++i)n+=e[i].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=E(this,this.first,this.first+this.size);return t===!1?e:e.join(t||this.lineSeparator())},setValue:pi(function(t){var e=L(this.first,0),n=this.first+this.size-1;xr(this,{from:e,to:L(n,M(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&this.cm.scrollTo(0,0),hr(this,Ni(e),Ss)}),replaceRange:function(t,e,n,i){e=U(this,e),n=n?U(this,n):e,Dr(this,t,e,n,i)},getRange:function(t,e,n){var i=D(this,U(this,t),U(this,e));return n===!1?i:i.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(A(this,t))return M(this,t)},getLineNumber:function(t){return P(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=M(this,t)),dt(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return U(this,t)},getCursor:function(t){var e,n=this.sel.primary();return e=null==t||"head"==t?n.head:"anchor"==t?n.anchor:"end"==t||"to"==t||t===!1?n.to():n.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:pi(function(t,e,n){ur(this,U(this,"number"==typeof t?L(t,e||0):t),null,n)}),setSelection:pi(function(t,e,n){ur(this,U(this,t),U(this,e||t),n)}),extendSelection:pi(function(t,e,n){sr(this,U(this,t),e&&U(this,e),n)}),extendSelections:pi(function(t,e){ar(this,Y(this,t),e)}),extendSelectionsBy:pi(function(t,e){var n=g(this.sel.ranges,t);ar(this,Y(this,n),e)}),setSelections:pi(function(t,e,n){var i=this;if(t.length){for(var r=[],o=0;o<t.length;o++)r[o]=new aa(U(i,t[o].anchor),U(i,t[o].head));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),hr(this,Pi(r,e),n)}}),addSelection:pi(function(t,e,n){var i=this.sel.ranges.slice(0);i.push(new aa(U(this,t),U(this,e||t))),hr(this,Pi(i,i.length-1),n)}),getSelection:function(t){for(var e,n=this,i=this.sel.ranges,r=0;r<i.length;r++){var o=D(n,i[r].from(),i[r].to());e=e?e.concat(o):o}return t===!1?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=this,n=[],i=this.sel.ranges,r=0;r<i.length;r++){var o=D(e,i[r].from(),i[r].to());t!==!1&&(o=o.join(t||e.lineSeparator())),n[r]=o}return n},replaceSelection:function(t,e,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=t;this.replaceSelections(i,e,n||"+input")},replaceSelections:pi(function(t,e,n){for(var i=this,r=[],o=this.sel,s=0;s<o.ranges.length;s++){var a=o.ranges[s];r[s]={from:a.from(),to:a.to(),text:i.splitLines(t[s]),origin:n}}for(var l=e&&"end"!=e&&Fi(this,r,e),u=r.length-1;u>=0;u--)xr(i,r[u]);l?dr(this,l):this.cm&&ti(this.cm)}),undo:pi(function(){Cr(this,"undo")}),redo:pi(function(){Cr(this,"redo")}),undoSelection:pi(function(){Cr(this,"undo",!0)}),redoSelection:pi(function(){Cr(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i<t.done.length;i++)t.done[i].ranges||++e;for(var r=0;r<t.undone.length;r++)t.undone[r].ranges||++n;return{undo:e,redo:n}},clearHistory:function(){this.history=new Gi(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:rr(this.history.done),undone:rr(this.history.undone)}},setHistory:function(t){var e=this.history=new Gi(this.history.maxGeneration);e.done=rr(t.done.slice(0),null,!0),e.undone=rr(t.undone.slice(0),null,!0)},setGutterMarker:pi(function(t,e,n){return Nr(this,t,"gutter",function(t){var i=t.gutterMarkers||(t.gutterMarkers={});return i[e]=n,!n&&x(i)&&(t.gutterMarkers=null),!0})}),clearGutter:pi(function(t){var e=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[t]&&Nr(e,n,"gutter",function(){return n.gutterMarkers[t]=null,x(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(t){var e;if("number"==typeof t){if(!A(this,t))return null;if(e=t,t=M(this,t),!t)return null}else if(e=P(t),null==e)return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:pi(function(e,n,i){return Nr(this,e,"gutter"==n?"gutter":"class",function(e){var r="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass";if(e[r]){if(t(i).test(e[r]))return!1;e[r]+=" "+i}else e[r]=i;return!0})}),removeLineClass:pi(function(e,n,i){return Nr(this,e,"gutter"==n?"gutter":"class",function(e){var r="text"==n?"textClass":"background"==n?"bgClass":"gutter"==n?"gutterClass":"wrapClass",o=e[r];if(!o)return!1;if(null==i)e[r]=null;else{var s=o.match(t(i));if(!s)return!1;var a=s.index+s[0].length;e[r]=o.slice(0,s.index)+(s.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0})}),addLineWidget:pi(function(t,e,n){return Ir(this,t,e,n)}),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return Lr(this,U(this,t),U(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return t=U(this,t),Lr(this,t,t,n,"bookmark")},findMarksAt:function(t){t=U(this,t);var e=[],n=M(this,t.line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=t.ch)&&(null==r.to||r.to>=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=U(this,t),e=U(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&r==t.line&&t.ch>=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&t.push(n[i].marker)}),t},posFromIndex:function(t){var e,n=this.first,i=this.lineSeparator().length;return this.iter(function(r){var o=r.text.length+i;return o>t?(e=t,!0):(t-=o,void++n)}),U(this,L(n,e))},indexFromPos:function(t){t=U(this,t);var e=t.ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,function(t){e+=t.text.length+n}),e},copy:function(t){var e=new ma(E(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var i=new ma(E(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:t.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],jr(i,Fr(this)),i},unlinkDoc:function(t){var e=this;if(t instanceof Mo&&(t=t.doc),this.linked)for(var n=0;n<this.linked.length;++n){var i=e.linked[n];if(i.doc==t){e.linked.splice(n,1),t.unlinkDoc(e),Hr(Fr(e));break}}if(t.history==this.history){var r=[t.id];Ui(t,function(t){return r.push(t.id)},!0),t.history=new Gi(null),t.history.done=rr(this.history.done,r),t.history.undone=rr(this.history.undone,r)}},iterLinkedDocs:function(t){Ui(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):js(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:pi(function(t){"rtl"!=t&&(t="ltr"),t!=this.direction&&(this.direction=t,this.iter(function(t){return t.order=null}),this.cm&&Vi(this.cm))})}),ma.prototype.eachLine=ma.prototype.iter;for(var ga=0,va=!1,ya={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ba=0;ba<10;ba++)ya[ba+48]=ya[ba+96]=String(ba);for(var wa=65;wa<=90;wa++)ya[wa]=String.fromCharCode(wa);for(var _a=1;_a<=12;_a++)ya[_a+111]=ya[_a+63235]="F"+_a;var xa={};xa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},xa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},xa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},xa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},xa.default=ds?xa.macDefault:xa.pcDefault;var ka,Ca,Sa={selectAll:wr,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),Ss)},killLine:function(t){return to(t,function(e){if(e.empty()){var n=M(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:L(e.head.line+1,0)}:{from:e.head,to:L(e.head.line,n)}}return{from:e.from(),to:e.to()}})},deleteLine:function(t){return to(t,function(e){return{from:L(e.from().line,0),to:U(t.doc,L(e.to().line+1,0))}})},delLineLeft:function(t){return to(t,function(t){return{from:L(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(t){return to(t,function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:0,top:n},"div");return{from:i,to:e.from()}})},delWrappedLineRight:function(t){return to(t,function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:i}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(L(t.firstLine(),0))},goDocEnd:function(t){return t.extendSelection(L(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return eo(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return io(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){return no(t,e.head.line)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(e){var n=t.charCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")},Ms)},goLineLeft:function(t){return t.extendSelectionsBy(function(e){var n=t.charCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")},Ms)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(e){var n=t.charCoords(e.head,"div").top+5,i=t.coordsChar({left:0,top:n},"div");return i.ch<t.getLine(i.line).search(/\S/)?io(t,e.head):i},Ms)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"char")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection("\t")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),i=t.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),s=d(t.getLine(o.line),o.ch,i);e.push(f(i-s%i))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return ci(t,function(){for(var e=t.listSelections(),n=[],i=0;i<e.length;i++)if(e[i].empty()){var r=e[i].head,o=M(t.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new L(r.line,r.ch-1)),r.ch>0)r=new L(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),L(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=M(t.doc,r.line-1).text;s&&(r=new L(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),L(r.line-1,s.length-1),r,"+transpose"))}n.push(new aa(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return ci(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;i<e.length;i++)t.indentLine(e[i].from().line,null,!0);ti(t)})},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}},Ta=new ws,Ma=null,Da={toString:function(){return"CodeMirror.Init"}},Ea={},Oa={};Mo.defaults=Ea,Mo.optionHandlers=Oa;var Pa=[];Mo.defineInitHook=function(t){return Pa.push(t)};var Na=null,Aa=function(t){var e=t.optionHandlers,n=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var i=this.options,r=i[t];i[t]==n&&"mode"!=t||(i[t]=n,e.hasOwnProperty(t)&&di(this,e[t])(this,n,r),Ot(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Jr(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:hi(function(e,n){var i=e.token?e:t.getMode(this.options,e);if(i.startState)throw new Error("Overlays may not be stateful.");v(this.state.overlays,{mode:i,modeSpec:e,opaque:n&&n.opaque,priority:n&&n.priority||0},function(t){return t.priority}),this.state.modeGen++,fi(this)}),removeOverlay:hi(function(t){for(var e=this,n=this.state.overlays,i=0;i<n.length;++i){var r=n[i].modeSpec;if(r==t||"string"==typeof t&&r.name==t)return n.splice(i,1),e.state.modeGen++,void fi(e)}}),indentLine:hi(function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),A(this.doc,t)&&Eo(this,t,e,n)}),indentSelection:hi(function(t){for(var e=this,n=this.doc.sel.ranges,i=-1,r=0;r<n.length;r++){var o=n[r];if(o.empty())o.head.line>i&&(Eo(e,o.head.line,t,!0),i=o.head.line,r==e.doc.sel.primIndex&&ti(e));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var u=l;u<i;++u)Eo(e,u,t);var c=e.doc.sel.ranges;0==s.ch&&n.length==c.length&&c[r].from().ch>0&&lr(e.doc,r,new aa(s,c[r].to()),Ss)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,L(t),e,!0)},getTokenTypeAt:function(t){t=U(this.doc,t);var e,n=Jt(this,M(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]<o)){e=n[2*s+2];break}i=s+1}}var a=e?e.indexOf("overlay "):-1;return a<0?e:0==a?null:e.slice(0,a-1)},getModeAt:function(e){var n=this.doc.mode;return n.innerMode?t.innerMode(n,this.getTokenAt(e).state).mode:n},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var i=this,r=[];if(!n.hasOwnProperty(e))return r;var o=n[e],s=this.getModeAt(t);if("string"==typeof s[e])o[s[e]]&&r.push(o[s[e]]);else if(s[e])for(var a=0;a<s[e].length;a++){var l=o[s[e][a]];l&&r.push(l)}else s.helperType&&o[s.helperType]?r.push(o[s.helperType]):o[s.name]&&r.push(o[s.name]);for(var u=0;u<o._global.length;u++){var c=o._global[u];c.pred(s,i)&&h(r,c.val)==-1&&r.push(c.val)}return r},getStateAfter:function(t,e){var n=this.doc;return t=z(n,null==t?n.first+n.size-1:t),te(this,t+1,e)},cursorCoords:function(t,e){var n,i=this.doc.sel.primary();return n=null==t?i.head:"object"==typeof t?U(this.doc,t):t?i.from():i.to(),dn(this,n,e||"page")},charCoords:function(t,e){return cn(this,U(this.doc,t),e||"page")},coordsChar:function(t,e){return t=un(this,t,e||"page"),fn(this,t.left,t.top)},lineAtHeight:function(t,e){return t=un(this,{top:t,left:0},e||"page").top,N(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var i,r=!1;if("number"==typeof t){var o=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>o&&(t=o,r=!0),i=M(this.doc,t)}else i=t;return ln(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-yt(i):0)},defaultTextHeight:function(){return yn(this.display)},defaultCharWidth:function(){return bn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display;t=dn(this,U(this.doc,t));var s=t.bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)s=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>u&&(a=u-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&Zn(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:hi(uo),triggerOnKeyPress:hi(po),triggerOnKeyUp:ho,execCommand:function(t){if(Sa.hasOwnProperty(t))return Sa[t].call(null,this)},triggerElectric:hi(function(t){Ao(this,t)}),findPosH:function(t,e,n,i){var r=this,o=1;e<0&&(o=-1,e=-e);for(var s=U(this.doc,t),a=0;a<e&&(s=Fo(r.doc,s,o,n,i),!s.hitSide);++a);return s},moveH:hi(function(t,e){var n=this;this.extendSelectionsBy(function(i){return n.display.shift||n.doc.extend||i.empty()?Fo(n.doc,i.head,t,e,n.options.rtlMoveVisually):t<0?i.from():i.to()},Ms)}),deleteH:hi(function(t,e){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):to(this,function(n){var r=Fo(i,n.head,t,e,!1);return t<0?{from:r,to:n.head}:{from:n.head,to:r}})}),findPosV:function(t,e,n,i){var r=this,o=1,s=i;e<0&&(o=-1,e=-e);for(var a=U(this.doc,t),l=0;l<e;++l){var u=dn(r,a,"div");if(null==s?s=u.left:u.left=s,a=jo(r,u,o,n),a.hitSide)break}return a},moveV:hi(function(t,e){var n=this,i=this.doc,r=[],o=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy(function(s){if(o)return t<0?s.from():s.to();var a=dn(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),r.push(a.left);var l=jo(n,a,t,e);return"page"==e&&s==i.sel.primary()&&Jn(n,null,cn(n,l,"div").top-a.top),l},Ms),r.length)for(var s=0;s<i.sel.ranges.length;s++)i.sel.ranges[s].goalColumn=r[s]}),findWordAt:function(t){var e=this.doc,n=M(e,t.line).text,i=t.ch,r=t.ch;if(n){var o=this.getHelper(t,"wordChars");"before"!=t.sticky&&r!=n.length||!i?++r:--i;for(var s=n.charAt(i),a=_(s,o)?function(t){return _(t,o)}:/\s/.test(s)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!_(t)};i>0&&a(n.charAt(i-1));)--i;for(;r<n.length&&a(n.charAt(r));)++r}return new aa(L(t.line,i),L(t.line,r))},toggleOverwrite:function(t){null!=t&&t==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?a(this.display.cursorDiv,"CodeMirror-overwrite"):ys(this.display.cursorDiv,"CodeMirror-overwrite"),Ot(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==s()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:hi(function(t,e){null==t&&null==e||ei(this),null!=t&&(this.curOp.scrollLeft=t),null!=e&&(this.curOp.scrollTop=e)}),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-Ue(this)-this.display.barHeight,width:t.scrollWidth-Ue(this)-this.display.barWidth,clientHeight:Ye(this),clientWidth:Be(this)}},scrollIntoView:hi(function(t,e){if(null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:L(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line)ei(this),this.curOp.scrollToPos=t;else{var n=Qn(this,{left:Math.min(t.from.left,t.to.left),top:Math.min(t.from.top,t.to.top)-t.margin,right:Math.max(t.from.right,t.to.right),bottom:Math.max(t.from.bottom,t.to.bottom)+t.margin});this.scrollTo(n.scrollLeft,n.scrollTop)}}),setSize:hi(function(t,e){var n=this,i=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=i(t)),null!=e&&(this.display.wrapper.style.height=i(e)),this.options.lineWrapping&&rn(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(t){if(t.widgets)for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){mi(n,r,"widget");break}++r}),this.curOp.forceUpdate=!0,Ot(this,"refresh",this)}),operation:function(t){return ci(this,t)},refresh:hi(function(){var t=this.display.cachedTextHeight;fi(this),this.curOp.forceUpdate=!0,on(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),Mi(this),(null==t||Math.abs(t-yn(this.display))>.5)&&kn(this),Ot(this,"refresh",this)}),swapDoc:hi(function(t){var e=this.doc;return e.cm=null,Bi(this,t),on(this),this.display.input.reset(),this.scrollTo(t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ke(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},It(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}},Ia=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ws,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ia.prototype.init=function(t){function e(t){if(!Pt(r,t)){if(r.somethingSelected())Oo({lineWise:!1,text:r.getSelections()}),"cut"==t.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var e=Io(r);Oo({lineWise:!0,text:e.text}),"cut"==t.type&&r.operation(function(){r.setSelections(e.ranges,0,Ss),r.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var n=Na.text.join("\n");if(t.clipboardData.setData("Text",n),t.clipboardData.getData("Text")==n)return void t.preventDefault()}var s=Ro(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=Na.text.join("\n");var l=document.activeElement;bs(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=t.lineDiv;Lo(o,r.options.spellcheck),Rs(o,"paste",function(t){Pt(r,t)||No(t,r)||ts<=11&&setTimeout(di(r,function(){return n.updateFromDOM()}),20)}),Rs(o,"compositionstart",function(t){n.composing={data:t.data,done:!1}}),Rs(o,"compositionupdate",function(t){n.composing||(n.composing={data:t.data,done:!1})}),Rs(o,"compositionend",function(t){n.composing&&(t.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),Rs(o,"touchstart",function(){return i.forceCompositionEnd()}),Rs(o,"input",function(){n.composing||n.readFromDOMSoon()}),Rs(o,"copy",e),Rs(o,"cut",e)},Ia.prototype.prepareSelection=function(){var t=Mn(this.cm,!1);return t.focus=this.cm.state.focused,t},Ia.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},Ia.prototype.showPrimarySelection=function(){var t=window.getSelection(),e=this.cm,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(e.display.viewTo==e.display.viewFrom||i.line>=e.display.viewTo||r.line<e.display.viewFrom)return void t.removeAllRanges();var o=Bo(e,t.anchorNode,t.anchorOffset),s=Bo(e,t.focusNode,t.focusOffset);if(!o||o.bad||!s||s.bad||0!=R(W(o,s),i)||0!=R(H(o,s),r)){var a=e.display.view,l=i.line>=e.display.viewFrom&&Ho(e,i)||{node:a[0].measure.map[2],offset:0},u=r.line<e.display.viewTo&&Ho(e,r);if(!u){var c=a[a.length-1].measure,d=c.maps?c.maps[c.maps.length-1]:c.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(!l||!u)return void t.removeAllRanges();var h,p=t.rangeCount&&t.getRangeAt(0);try{h=ms(l.node,l.offset,u.offset,u.node)}catch(t){}h&&(!Xo&&e.state.focused?(t.collapse(l.node,l.offset),h.collapsed||(t.removeAllRanges(),t.addRange(h))):(t.removeAllRanges(),t.addRange(h)),p&&null==t.anchorNode?t.addRange(p):Xo&&this.startGracePeriod()),this.rememberSelection()}},Ia.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},Ia.prototype.showMultipleSelections=function(t){n(this.cm.display.cursorDiv,t.cursors),n(this.cm.display.selectionDiv,t.selection)},Ia.prototype.rememberSelection=function(){var t=window.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},Ia.prototype.selectionInEditor=function(){var t=window.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return o(this.div,e)},Ia.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ia.prototype.blur=function(){this.div.blur()},Ia.prototype.getField=function(){return this.div},Ia.prototype.supportsTouch=function(){return!0},Ia.prototype.receivedFocus=function(){function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}var e=this;this.selectionInEditor()?this.pollSelection():ci(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,t)},Ia.prototype.selectionChanged=function(){var t=window.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},Ia.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=window.getSelection(),e=this.cm;if(us&&is&&this.cm.options.gutters.length&&Wo(t.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Bo(e,t.anchorNode,t.anchorOffset),i=Bo(e,t.focusNode,t.focusOffset);n&&i&&ci(e,function(){hr(e.doc,Ni(n,i),Ss),(n.bad||i.bad)&&(e.curOp.selectionChanged=!0)})}}},Ia.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);
6
+ var t=this.cm,e=t.display,n=t.doc.sel.primary(),i=n.from(),r=n.to();if(0==i.ch&&i.line>t.firstLine()&&(i=L(i.line-1,M(t.doc,i.line-1).length)),r.ch==M(t.doc,r.line).text.length&&r.line<t.lastLine()&&(r=L(r.line+1,0)),i.line<e.viewFrom||r.line>e.viewTo-1)return!1;var o,s,a;i.line==e.viewFrom||0==(o=Sn(t,i.line))?(s=P(e.view[0].line),a=e.view[0].node):(s=P(e.view[o].line),a=e.view[o-1].node.nextSibling);var l,u,c=Sn(t,r.line);if(c==e.view.length-1?(l=e.viewTo-1,u=e.lineDiv.lastChild):(l=P(e.view[c+1].line)-1,u=e.view[c+1].node.previousSibling),!a)return!1;for(var d=t.doc.splitLines(Uo(t,a,u,s,l)),h=D(t.doc,L(s,0),L(l,M(t.doc,l).text.length));d.length>1&&h.length>1;)if(m(d)==m(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),s++}for(var p=0,f=0,g=d[0],v=h[0],y=Math.min(g.length,v.length);p<y&&g.charCodeAt(p)==v.charCodeAt(p);)++p;for(var b=m(d),w=m(h),_=Math.min(b.length-(1==d.length?p:0),w.length-(1==h.length?p:0));f<_&&b.charCodeAt(b.length-f-1)==w.charCodeAt(w.length-f-1);)++f;if(1==d.length&&1==h.length&&s==i.line)for(;p&&p>i.ch&&b.charCodeAt(b.length-f-1)==w.charCodeAt(w.length-f-1);)p--,f++;d[d.length-1]=b.slice(0,b.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var x=L(s,p),k=L(l,h.length?m(h).length-f:0);return d.length>1||d[0]||R(x,k)?(Dr(t.doc,d,x,k,"+input"),!0):void 0},Ia.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ia.prototype.reset=function(){this.forceCompositionEnd()},Ia.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ia.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()},80))},Ia.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||ci(this.cm,function(){return fi(t.cm)})},Ia.prototype.setUneditable=function(t){t.contentEditable="false"},Ia.prototype.onKeyPress=function(t){0!=t.charCode&&(t.preventDefault(),this.cm.isReadOnly()||di(this.cm,Po)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Ia.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Ia.prototype.onContextMenu=function(){},Ia.prototype.resetPosition=function(){},Ia.prototype.needsContentAttribute=!0;var La=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new ws,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};La.prototype.init=function(t){function e(t){if(!Pt(r,t)){if(r.somethingSelected())Oo({lineWise:!1,text:r.getSelections()}),i.inaccurateSelection&&(i.prevInput="",i.inaccurateSelection=!1,s.value=Na.text.join("\n"),bs(s));else{if(!r.options.lineWiseCopyCut)return;var e=Io(r);Oo({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,Ss):(i.prevInput="",s.value=e.text.join("\n"),bs(s))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=Ro(),s=this.textarea=o.firstChild;t.wrapper.insertBefore(o,t.wrapper.firstChild),ls&&(s.style.width="0px"),Rs(s,"input",function(){Jo&&ts>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),Rs(s,"paste",function(t){Pt(r,t)||No(t,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),Rs(s,"cut",e),Rs(s,"copy",e),Rs(t.scroller,"paste",function(e){je(t,e)||Pt(r,e)||(r.state.pasteIncoming=!0,i.focus())}),Rs(t.lineSpace,"selectstart",function(e){je(t,e)||Lt(e)}),Rs(s,"compositionstart",function(){var t=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Rs(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},La.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Mn(t);if(t.options.moveInputWithCursor){var r=dn(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},La.prototype.showSelection=function(t){var e=this.cm,i=e.display;n(i.cursorDiv,t.cursors),n(i.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},La.prototype.reset=function(t){if(!this.contextMenuPending){var e,n,i=this.cm,r=i.doc;if(i.somethingSelected()){this.prevInput="";var o=r.sel.primary();e=Ws&&(o.to().line-o.from().line>100||(n=i.getSelection()).length>1e3);var s=e?"-":n||i.getSelection();this.textarea.value=s,i.state.focused&&bs(this.textarea),Jo&&ts>=9&&(this.hasSelection=s)}else t||(this.prevInput=this.textarea.value="",Jo&&ts>=9&&(this.hasSelection=null));this.inaccurateSelection=e}},La.prototype.getField=function(){return this.textarea},La.prototype.supportsTouch=function(){return!1},La.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!cs||s()!=this.textarea))try{this.textarea.focus()}catch(t){}},La.prototype.blur=function(){this.textarea.blur()},La.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},La.prototype.receivedFocus=function(){this.slowPoll()},La.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},La.prototype.fastPoll=function(){function t(){var i=n.poll();i||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},La.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||Hs(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(Jo&&ts>=9&&this.hasSelection===r||ds&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,a=Math.min(i.length,r.length);s<a&&i.charCodeAt(s)==r.charCodeAt(s);)++s;return ci(e,function(){Po(e,r.slice(s),i.length-s,null,t.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},La.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},La.prototype.onKeyPress=function(){Jo&&ts>=9&&(this.hasSelection=null),this.fastPoll()},La.prototype.onContextMenu=function(t){function e(){if(null!=s.selectionStart){var t=r.somethingSelected(),e="​"+(t?s.value:"");s.value="⇚",s.value=e,i.prevInput=t?"":"​",s.selectionStart=1,s.selectionEnd=e.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=d,s.style.cssText=c,Jo&&ts<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!Jo||Jo&&ts<9)&&e();var t=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?di(r,wr)(r):t++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Cn(r,t),l=o.scroller.scrollTop;if(a&&!rs){var u=r.options.resetSelectionOnContextMenu;u&&r.doc.sel.contains(a)==-1&&di(r,hr)(r.doc,Ni(a),Ss);var c=s.style.cssText,d=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(Jo?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(es&&(p=window.scrollY),o.input.focus(),es&&window.scrollTo(null,p),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),Jo&&ts>=9&&e(),vs){jt(t);var f=function(){Et(window,"mouseup",f),setTimeout(n,20)};Rs(window,"mouseup",f)}else setTimeout(n,50)}},La.prototype.readOnlyChanged=function(t){t||this.reset()},La.prototype.setUneditable=function(){},La.prototype.needsContentAttribute=!1,ko(Mo),Aa(Mo);var Ra="iter insert remove copy getEditor constructor".split(" ");for(var Fa in ma.prototype)ma.prototype.hasOwnProperty(Fa)&&h(Ra,Fa)<0&&(Mo.prototype[Fa]=function(t){return function(){return t.apply(this.doc,arguments)}}(ma.prototype[Fa]));return It(ma),Mo.inputStyles={textarea:La,contenteditable:Ia},Mo.defineMode=function(t){Mo.defaults.mode||"null"==t||(Mo.defaults.mode=t),Yt.apply(this,arguments)},Mo.defineMIME=Vt,Mo.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Mo.defineMIME("text/plain","null"),Mo.defineExtension=function(t,e){Mo.prototype[t]=e},Mo.defineDocExtension=function(t,e){ma.prototype[t]=e},Mo.fromTextArea=Vo,Go(Mo),Mo.version="5.25.2",Mo})},function(t,e,n){"use strict";function i(t,e,n,i){this.dispatchConfig=t,this._targetInst=e,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];a?this[o]=a(n):"target"===o?this.target=i:this[o]=n[o]}var l=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return l?this.isDefaultPrevented=s.thatReturnsTrue:this.isDefaultPrevented=s.thatReturnsFalse,this.isPropagationStopped=s.thatReturnsFalse,this}var r=n(4),o=n(14),s=n(7),a=(n(2),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),l={type:null,target:null,currentTarget:s.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};r(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=s.thatReturnsTrue)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=s.thatReturnsTrue)},persist:function(){this.isPersistent=s.thatReturnsTrue},isPersistent:s.thatReturnsFalse,destructor:function(){var t=this.constructor.Interface;for(var e in t)this[e]=null;for(var n=0;n<a.length;n++)this[a[n]]=null}}),i.Interface=l,i.augmentClass=function(t,e){var n=this,i=function(){};i.prototype=n.prototype;var s=new i;r(s,t.prototype),t.prototype=s,t.prototype.constructor=t,t.Interface=r({},n.Interface,e),t.augmentClass=n.augmentClass,o.addPoolingTo(t,o.fourArgumentPooler)},o.addPoolingTo(i,o.fourArgumentPooler),t.exports=i},function(t,e){"use strict";var n={current:null};t.exports=n},function(t,e,n){"use strict";t.exports=n(18)},[205,3],function(t,e,n){"use strict";function i(t){if(g){var e=t.node,n=t.children;if(n.length)for(var i=0;i<n.length;i++)v(e,n[i],null);else null!=t.html?d(e,t.html):null!=t.text&&p(e,t.text)}}function r(t,e){t.parentNode.replaceChild(e.node,t),i(e)}function o(t,e){g?t.children.push(e):t.node.appendChild(e.node)}function s(t,e){g?t.html=e:d(t.node,e)}function a(t,e){g?t.text=e:p(t.node,e)}function l(){return this.node.nodeName}function u(t){return{node:t,children:[],html:null,text:null,toString:l}}var c=n(34),d=n(30),h=n(42),p=n(78),f=1,m=11,g="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),v=h(function(t,e,n){e.node.nodeType===m||e.node.nodeType===f&&"object"===e.node.nodeName.toLowerCase()&&(null==e.node.namespaceURI||e.node.namespaceURI===c.html)?(i(e),t.insertBefore(e.node,n)):(t.insertBefore(e.node,n),i(e))});u.insertTreeBefore=v,u.replaceChildWithTree=r,u.queueChild=o,u.queueHTML=s,u.queueText=a,t.exports=u},function(t,e,n){"use strict";function i(t,e){return(t&e)===e}var r=n(3),o=(n(1),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(t){var e=o,n=t.Properties||{},s=t.DOMAttributeNamespaces||{},l=t.DOMAttributeNames||{},u=t.DOMPropertyNames||{},c=t.DOMMutationMethods||{};t.isCustomAttribute&&a._isCustomAttributeFunctions.push(t.isCustomAttribute);for(var d in n){a.properties.hasOwnProperty(d)?r("48",d):void 0;var h=d.toLowerCase(),p=n[d],f={attributeName:h,attributeNamespace:null,propertyName:d,mutationMethod:null,mustUseProperty:i(p,e.MUST_USE_PROPERTY),hasBooleanValue:i(p,e.HAS_BOOLEAN_VALUE),hasNumericValue:i(p,e.HAS_NUMERIC_VALUE),hasPositiveNumericValue:i(p,e.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:i(p,e.HAS_OVERLOADED_BOOLEAN_VALUE)};if(f.hasBooleanValue+f.hasNumericValue+f.hasOverloadedBooleanValue<=1?void 0:r("50",d),l.hasOwnProperty(d)){var m=l[d];f.attributeName=m}s.hasOwnProperty(d)&&(f.attributeNamespace=s[d]),u.hasOwnProperty(d)&&(f.propertyName=u[d]),c.hasOwnProperty(d)&&(f.mutationMethod=c[d]),a.properties[d]=f}}}),s=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",a={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:s,ATTRIBUTE_NAME_CHAR:s+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(t){for(var e=0;e<a._isCustomAttributeFunctions.length;e++){var n=a._isCustomAttributeFunctions[e];if(n(t))return!0}return!1},injection:o};t.exports=a},function(t,e,n){"use strict";function i(){r.attachRefs(this,this._currentElement)}var r=n(160),o=(n(8),n(2),{mountComponent:function(t,e,n,r,o,s){var a=t.mountComponent(e,n,r,o,s);return t._currentElement&&null!=t._currentElement.ref&&e.getReactMountReady().enqueue(i,t),a},getHostNode:function(t){return t.getHostNode()},unmountComponent:function(t,e){r.detachRefs(t,t._currentElement),t.unmountComponent(e)},receiveComponent:function(t,e,n,o){var s=t._currentElement;if(e!==s||o!==t._context){var a=r.shouldUpdateRefs(s,e);a&&r.detachRefs(t,s),t.receiveComponent(e,n,o),a&&t._currentElement&&null!=t._currentElement.ref&&n.getReactMountReady().enqueue(i,t)}},performUpdateIfNecessary:function(t,e,n){t._updateBatchNumber===n&&t.performUpdateIfNecessary(e)}});t.exports=o},function(t,e,n){"use strict";var i=n(4),r=n(191),o=n(49),s=n(196),a=n(192),l=n(193),u=n(19),c=n(195),d=n(197),h=n(200),p=(n(2),u.createElement),f=u.createFactory,m=u.cloneElement,g=i,v={Children:{map:r.map,forEach:r.forEach,count:r.count,toArray:r.toArray,only:h},Component:o,PureComponent:s,createElement:p,cloneElement:m,isValidElement:u.isValidElement,PropTypes:c,createClass:a.createClass,createFactory:f,createMixin:function(t){return t},DOM:l,version:d,__spread:g};t.exports=v},function(t,e,n){"use strict";function i(t){return void 0!==t.ref}function r(t){return void 0!==t.key}var o=n(4),s=n(12),a=(n(2),n(82),Object.prototype.hasOwnProperty),l=n(81),u={key:!0,ref:!0,__self:!0,__source:!0},c=function(t,e,n,i,r,o,s){var a={$$typeof:l,type:t,key:e,ref:n,props:s,_owner:o};return a};c.createElement=function(t,e,n){var o,l={},d=null,h=null,p=null,f=null;if(null!=e){i(e)&&(h=e.ref),r(e)&&(d=""+e.key),p=void 0===e.__self?null:e.__self,f=void 0===e.__source?null:e.__source;for(o in e)a.call(e,o)&&!u.hasOwnProperty(o)&&(l[o]=e[o])}var m=arguments.length-2;if(1===m)l.children=n;else if(m>1){for(var g=Array(m),v=0;v<m;v++)g[v]=arguments[v+2];l.children=g}if(t&&t.defaultProps){var y=t.defaultProps;for(o in y)void 0===l[o]&&(l[o]=y[o])}return c(t,d,h,p,f,s.current,l)},c.createFactory=function(t){var e=c.createElement.bind(null,t);return e.type=t,e},c.cloneAndReplaceKey=function(t,e){var n=c(t.type,e,t.ref,t._self,t._source,t._owner,t.props);return n},c.cloneElement=function(t,e,n){var l,d=o({},t.props),h=t.key,p=t.ref,f=t._self,m=t._source,g=t._owner;if(null!=e){i(e)&&(p=e.ref,g=s.current),r(e)&&(h=""+e.key);var v;t.type&&t.type.defaultProps&&(v=t.type.defaultProps);for(l in e)a.call(e,l)&&!u.hasOwnProperty(l)&&(void 0===e[l]&&void 0!==v?d[l]=v[l]:d[l]=e[l])}var y=arguments.length-2;if(1===y)d.children=n;else if(y>1){for(var b=Array(y),w=0;w<y;w++)b[w]=arguments[w+2];d.children=b}return c(t.type,h,p,f,m,g,d)},c.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===l},t.exports=c},3,function(t,e,n){"use strict";var i={};t.exports=i},function(t,e,n){"use strict";function i(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function r(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!i(e));default:return!1}}var o=n(3),s=n(35),a=n(36),l=n(40),u=n(72),c=n(73),d=(n(1),{}),h=null,p=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},f=function(t){return p(t,!0)},m=function(t){return p(t,!1)},g=function(t){return"."+t._rootNodeID},v={injection:{injectEventPluginOrder:s.injectEventPluginOrder,injectEventPluginsByName:s.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?o("94",e,typeof n):void 0;var i=g(t),r=d[e]||(d[e]={});r[i]=n;var a=s.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,n)},getListener:function(t,e){var n=d[e];if(r(e,t._currentElement.type,t._currentElement.props))return null;var i=g(t);return n&&n[i]},deleteListener:function(t,e){var n=s.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var i=d[e];if(i){var r=g(t);delete i[r]}},deleteAllListeners:function(t){var e=g(t);for(var n in d)if(d.hasOwnProperty(n)&&d[n][e]){var i=s.registrationNameModules[n];i&&i.willDeleteListener&&i.willDeleteListener(t,n),delete d[n][e]}},extractEvents:function(t,e,n,i){for(var r,o=s.plugins,a=0;a<o.length;a++){var l=o[a];if(l){var c=l.extractEvents(t,e,n,i);c&&(r=u(r,c))}}return r},enqueueEvents:function(t){t&&(h=u(h,t))},processEventQueue:function(t){var e=h;h=null,t?c(e,f):c(e,m),h?o("95"):void 0,l.rethrowCaughtError()},__purge:function(){d={}},__getListenerBank:function(){return d}};t.exports=v},function(t,e,n){"use strict";function i(t,e,n){var i=e.dispatchConfig.phasedRegistrationNames[n];return v(t,i)}function r(t,e,n){var r=i(t,n,e);r&&(n._dispatchListeners=m(n._dispatchListeners,r),n._dispatchInstances=m(n._dispatchInstances,t))}function o(t){t&&t.dispatchConfig.phasedRegistrationNames&&f.traverseTwoPhase(t._targetInst,r,t)}function s(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?f.getParentInstance(e):null;f.traverseTwoPhase(n,r,t)}}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var i=n.dispatchConfig.registrationName,r=v(t,i);r&&(n._dispatchListeners=m(n._dispatchListeners,r),n._dispatchInstances=m(n._dispatchInstances,t))}}function l(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function u(t){g(t,o)}function c(t){g(t,s)}function d(t,e,n,i){f.traverseEnterLeave(n,i,a,t,e)}function h(t){g(t,l)}var p=n(22),f=n(36),m=n(72),g=n(73),v=(n(2),p.getListener),y={accumulateTwoPhaseDispatches:u,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:h,accumulateEnterLeaveDispatches:d};t.exports=y},function(t,e){"use strict";var n={remove:function(t){t._reactInternalInstance=void 0},get:function(t){return t._reactInternalInstance},has:function(t){return void 0!==t._reactInternalInstance},set:function(t,e){t._reactInternalInstance=e}};t.exports=n},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(11),o=n(45),s={view:function(t){if(t.view)return t.view;var e=o(t);if(e.window===e)return e;var n=e.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(t){return t.detail||0}};r.augmentClass(i,s),t.exports=i},function(t,e,n){"use strict";function i(t){return Object.prototype.hasOwnProperty.call(t,m)||(t[m]=p++,d[t[m]]={}),d[t[m]]}var r,o=n(4),s=n(35),a=n(152),l=n(71),u=n(184),c=n(46),d={},h=!1,p=0,f={topAbort:"abort",topAnimationEnd:u("animationend")||"animationend",topAnimationIteration:u("animationiteration")||"animationiteration",topAnimationStart:u("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:u("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),g=o({},a,{ReactEventListener:null,injection:{injectReactEventListener:function(t){t.setHandleTopLevel(g.handleTopLevel),g.ReactEventListener=t}},setEnabled:function(t){g.ReactEventListener&&g.ReactEventListener.setEnabled(t)},isEnabled:function(){return!(!g.ReactEventListener||!g.ReactEventListener.isEnabled())},listenTo:function(t,e){for(var n=e,r=i(n),o=s.registrationNameDependencies[t],a=0;a<o.length;a++){var l=o[a];r.hasOwnProperty(l)&&r[l]||("topWheel"===l?c("wheel")?g.ReactEventListener.trapBubbledEvent("topWheel","wheel",n):c("mousewheel")?g.ReactEventListener.trapBubbledEvent("topWheel","mousewheel",n):g.ReactEventListener.trapBubbledEvent("topWheel","DOMMouseScroll",n):"topScroll"===l?c("scroll",!0)?g.ReactEventListener.trapCapturedEvent("topScroll","scroll",n):g.ReactEventListener.trapBubbledEvent("topScroll","scroll",g.ReactEventListener.WINDOW_HANDLE):"topFocus"===l||"topBlur"===l?(c("focus",!0)?(g.ReactEventListener.trapCapturedEvent("topFocus","focus",n),g.ReactEventListener.trapCapturedEvent("topBlur","blur",n)):c("focusin")&&(g.ReactEventListener.trapBubbledEvent("topFocus","focusin",n),g.ReactEventListener.trapBubbledEvent("topBlur","focusout",n)),r.topBlur=!0,r.topFocus=!0):f.hasOwnProperty(l)&&g.ReactEventListener.trapBubbledEvent(l,f[l],n),r[l]=!0)}},trapBubbledEvent:function(t,e,n){return g.ReactEventListener.trapBubbledEvent(t,e,n)},trapCapturedEvent:function(t,e,n){return g.ReactEventListener.trapCapturedEvent(t,e,n)},supportsEventPageXY:function(){if(!document.createEvent)return!1;var t=document.createEvent("MouseEvent");return null!=t&&"pageX"in t},ensureScrollValueMonitoring:function(){if(void 0===r&&(r=g.supportsEventPageXY()),!r&&!h){var t=l.refreshScrollValues;g.ReactEventListener.monitorScrollValue(t),h=!0}}});t.exports=g},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(25),o=n(71),s=n(44),a={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:s,button:function(t){var e=t.button;return"which"in t?e:2===e?2:4===e?1:0},buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},pageX:function(t){return"pageX"in t?t.pageX:t.clientX+o.currentScrollLeft},pageY:function(t){return"pageY"in t?t.pageY:t.clientY+o.currentScrollTop}};r.augmentClass(i,a),t.exports=i},function(t,e,n){"use strict";var i=n(3),r=(n(1),{}),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(t,e,n,r,o,s,a,l){this.isInTransaction()?i("27"):void 0;var u,c;try{this._isInTransaction=!0,u=!0,this.initializeAll(0),c=t.call(e,n,r,o,s,a,l),u=!1}finally{try{if(u)try{this.closeAll(0)}catch(t){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(t){for(var e=this.transactionWrappers,n=t;n<e.length;n++){var i=e[n];try{this.wrapperInitData[n]=r,this.wrapperInitData[n]=i.initialize?i.initialize.call(this):null}finally{if(this.wrapperInitData[n]===r)try{this.initializeAll(n+1)}catch(t){}}}},closeAll:function(t){this.isInTransaction()?void 0:i("28");for(var e=this.transactionWrappers,n=t;n<e.length;n++){var o,s=e[n],a=this.wrapperInitData[n];try{o=!0,a!==r&&s.close&&s.close.call(this,a),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(t){}}}this.wrapperInitData.length=0}};t.exports=o},function(t,e){"use strict";function n(t){var e=""+t,n=r.exec(e);if(!n)return e;var i,o="",s=0,a=0;for(s=n.index;s<e.length;s++){switch(e.charCodeAt(s)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 39:i="&#x27;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}a!==s&&(o+=e.substring(a,s)),a=s+1,o+=i}return a!==s?o+e.substring(a,s):o}function i(t){return"boolean"==typeof t||"number"==typeof t?""+t:n(t)}var r=/["'&<>]/;t.exports=i},function(t,e,n){"use strict";var i,r=n(6),o=n(34),s=/^[ \r\n\t\f]/,a=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,l=n(42),u=l(function(t,e){if(t.namespaceURI!==o.svg||"innerHTML"in t)t.innerHTML=e;else{i=i||document.createElement("div"),i.innerHTML="<svg>"+e+"</svg>";for(var n=i.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(r.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(u=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),s.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),c=null}t.exports=u},function(t,e){"use strict";function n(t,e){return t===e?0!==t||0!==e||1/t===1/e:t!==t&&e!==e}function i(t,e){if(n(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(var s=0;s<i.length;s++)if(!r.call(e,i[s])||!n(t[i[s]],e[i[s]]))return!1;return!0}var r=Object.prototype.hasOwnProperty;t.exports=i},function(t,e,n){"use strict";t.exports=n(137)},function(t,e,n){"use strict";function i(t,e){return Array.isArray(e)&&(e=e[1]),e?e.nextSibling:t.firstChild}function r(t,e,n){c.insertTreeBefore(t,e,n)}function o(t,e,n){Array.isArray(e)?a(t,e[0],e[1],n):m(t,e,n)}function s(t,e){if(Array.isArray(e)){var n=e[1];e=e[0],l(t,e,n),t.removeChild(n)}t.removeChild(e)}function a(t,e,n,i){for(var r=e;;){var o=r.nextSibling;if(m(t,r,i),r===n)break;r=o}}function l(t,e,n){for(;;){var i=e.nextSibling;if(i===n)break;t.removeChild(i)}}function u(t,e,n){var i=t.parentNode,r=t.nextSibling;r===e?n&&m(i,document.createTextNode(n),r):n?(f(r,n),l(i,r,e)):l(i,t,e)}var c=n(15),d=n(129),h=(n(5),n(8),n(42)),p=n(30),f=n(78),m=h(function(t,e,n){t.insertBefore(e,n)}),g=d.dangerouslyReplaceNodeWithMarkup,v={dangerouslyReplaceNodeWithMarkup:g,replaceDelimitedText:u,processUpdates:function(t,e){for(var n=0;n<e.length;n++){var a=e[n];switch(a.type){case"INSERT_MARKUP":r(t,a.content,i(t,a.afterNode));break;case"MOVE_EXISTING":o(t,a.fromNode,i(t,a.afterNode));break;case"SET_MARKUP":p(t,a.content);break;case"TEXT_CONTENT":f(t,a.content);break;case"REMOVE_NODE":s(t,a.fromNode)}}}};t.exports=v},function(t,e){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};t.exports=n},function(t,e,n){"use strict";function i(){if(a)for(var t in l){var e=l[t],n=a.indexOf(t);if(n>-1?void 0:s("96",t),!u.plugins[n]){e.extractEvents?void 0:s("97",t),u.plugins[n]=e;var i=e.eventTypes;for(var o in i)r(i[o],e,o)?void 0:s("98",o,t)}}}function r(t,e,n){u.eventNameDispatchConfigs.hasOwnProperty(n)?s("99",n):void 0,u.eventNameDispatchConfigs[n]=t;var i=t.phasedRegistrationNames;if(i){for(var r in i)if(i.hasOwnProperty(r)){var a=i[r];o(a,e,n)}return!0}return!!t.registrationName&&(o(t.registrationName,e,n),!0)}function o(t,e,n){u.registrationNameModules[t]?s("100",t):void 0,u.registrationNameModules[t]=e,u.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var s=n(3),a=(n(1),null),l={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?s("101"):void 0,a=Array.prototype.slice.call(t),i()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];l.hasOwnProperty(n)&&l[n]===r||(l[n]?s("102",n):void 0,l[n]=r,e=!0)}e&&i()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return u.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var i in n)if(n.hasOwnProperty(i)){var r=u.registrationNameModules[n[i]];if(r)return r}}return null},_resetEventPlugins:function(){a=null;for(var t in l)l.hasOwnProperty(t)&&delete l[t];u.plugins.length=0;var e=u.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var i=u.registrationNameModules;for(var r in i)i.hasOwnProperty(r)&&delete i[r]}};t.exports=u},function(t,e,n){"use strict";function i(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function r(t){return"topMouseMove"===t||"topTouchMove"===t}function o(t){return"topMouseDown"===t||"topTouchStart"===t}function s(t,e,n,i){var r=t.type||"unknown-event";t.currentTarget=v.getNodeFromInstance(i),e?m.invokeGuardedCallbackWithCatch(r,n,t):m.invokeGuardedCallback(r,n,t),t.currentTarget=null}function a(t,e){var n=t._dispatchListeners,i=t._dispatchInstances;if(Array.isArray(n))for(var r=0;r<n.length&&!t.isPropagationStopped();r++)s(t,e,n[r],i[r]);else n&&s(t,e,n,i);t._dispatchListeners=null,t._dispatchInstances=null}function l(t){var e=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(e)){for(var i=0;i<e.length&&!t.isPropagationStopped();i++)if(e[i](t,n[i]))return n[i]}else if(e&&e(t,n))return n;return null}function u(t){var e=l(t);return t._dispatchInstances=null,t._dispatchListeners=null,e}function c(t){var e=t._dispatchListeners,n=t._dispatchInstances;Array.isArray(e)?f("103"):void 0,t.currentTarget=e?v.getNodeFromInstance(n):null;var i=e?e(t):null;return t.currentTarget=null,t._dispatchListeners=null,t._dispatchInstances=null,i}function d(t){return!!t._dispatchListeners}var h,p,f=n(3),m=n(40),g=(n(1),n(2),{injectComponentTree:function(t){h=t},injectTreeTraversal:function(t){p=t}}),v={isEndish:i,isMoveish:r,isStartish:o,executeDirectDispatch:c,executeDispatchesInOrder:a,executeDispatchesInOrderStopAtTrue:u,hasDispatches:d,getInstanceFromNode:function(t){return h.getInstanceFromNode(t)},getNodeFromInstance:function(t){return h.getNodeFromInstance(t);
7
+ },isAncestor:function(t,e){return p.isAncestor(t,e)},getLowestCommonAncestor:function(t,e){return p.getLowestCommonAncestor(t,e)},getParentInstance:function(t){return p.getParentInstance(t)},traverseTwoPhase:function(t,e,n){return p.traverseTwoPhase(t,e,n)},traverseEnterLeave:function(t,e,n,i,r){return p.traverseEnterLeave(t,e,n,i,r)},injection:g};t.exports=v},function(t,e){"use strict";function n(t){var e=/[=:]/g,n={"=":"=0",":":"=2"},i=(""+t).replace(e,function(t){return n[t]});return"$"+i}function i(t){var e=/(=0|=2)/g,n={"=0":"=","=2":":"},i="."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1);return(""+i).replace(e,function(t){return n[t]})}var r={escape:n,unescape:i};t.exports=r},function(t,e,n){"use strict";function i(t){null!=t.checkedLink&&null!=t.valueLink?a("87"):void 0}function r(t){i(t),null!=t.value||null!=t.onChange?a("88"):void 0}function o(t){i(t),null!=t.checked||null!=t.onChange?a("89"):void 0}function s(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}var a=n(3),l=n(158),u=n(58),c=n(18),d=u(c.isValidElement),h=(n(1),n(2),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(t,e,n){return!t[e]||h[t.type]||t.onChange||t.readOnly||t.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(t,e,n){return!t[e]||t.onChange||t.readOnly||t.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:d.func},f={},m={checkPropTypes:function(t,e,n){for(var i in p){if(p.hasOwnProperty(i))var r=p[i](e,i,t,"prop",null,l);if(r instanceof Error&&!(r.message in f)){f[r.message]=!0;s(n)}}},getValue:function(t){return t.valueLink?(r(t),t.valueLink.value):t.value},getChecked:function(t){return t.checkedLink?(o(t),t.checkedLink.value):t.checked},executeOnChange:function(t,e){return t.valueLink?(r(t),t.valueLink.requestChange(e.target.value)):t.checkedLink?(o(t),t.checkedLink.requestChange(e.target.checked)):t.onChange?t.onChange.call(void 0,e):void 0}};t.exports=m},function(t,e,n){"use strict";var i=n(3),r=(n(1),!1),o={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(t){r?i("104"):void 0,o.replaceNodeWithMarkup=t.replaceNodeWithMarkup,o.processChildrenUpdates=t.processChildrenUpdates,r=!0}}};t.exports=o},function(t,e,n){"use strict";function i(t,e,n){try{e(n)}catch(t){null===r&&(r=t)}}var r=null,o={invokeGuardedCallback:i,invokeGuardedCallbackWithCatch:i,rethrowCaughtError:function(){if(r){var t=r;throw r=null,t}}};t.exports=o},function(t,e,n){"use strict";function i(t){l.enqueueUpdate(t)}function r(t){var e=typeof t;if("object"!==e)return e;var n=t.constructor&&t.constructor.name||e,i=Object.keys(t);return i.length>0&&i.length<20?n+" (keys: "+i.join(", ")+")":n}function o(t,e){var n=a.get(t);if(!n){return null}return n}var s=n(3),a=(n(12),n(24)),l=(n(8),n(9)),u=(n(1),n(2),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){u.validateCallback(e,n);var r=o(t);return r?(r._pendingCallbacks?r._pendingCallbacks.push(e):r._pendingCallbacks=[e],void i(r)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],i(t)},enqueueForceUpdate:function(t){var e=o(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,i(e))},enqueueReplaceState:function(t,e,n){var r=o(t,"replaceState");r&&(r._pendingStateQueue=[e],r._pendingReplaceState=!0,void 0!==n&&null!==n&&(u.validateCallback(n,"replaceState"),r._pendingCallbacks?r._pendingCallbacks.push(n):r._pendingCallbacks=[n]),i(r))},enqueueSetState:function(t,e){var n=o(t,"setState");if(n){var r=n._pendingStateQueue||(n._pendingStateQueue=[]);r.push(e),i(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,i(t)},validateCallback:function(t,e){t&&"function"!=typeof t?s("122",e,r(t)):void 0}});t.exports=u},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,i,r){MSApp.execUnsafeLocalFunction(function(){return t(e,n,i,r)})}:t};t.exports=n},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e){"use strict";function n(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var i=r[t];return!!i&&!!n[i]}function i(t){return n}var r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=i},function(t,e){"use strict";function n(t){var e=t.target||t.srcElement||window;return e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}t.exports=n},function(t,e,n){"use strict";function i(t,e){if(!o.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i="function"==typeof s[n]}return!i&&r&&"wheel"===t&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,o=n(6);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=i},function(t,e){"use strict";function n(t,e){var n=null===t||t===!1,i=null===e||e===!1;if(n||i)return n===i;var r=typeof t,o=typeof e;return"string"===r||"number"===r?"string"===o||"number"===o:"object"===o&&t.type===e.type&&t.key===e.key}t.exports=n},function(t,e,n){"use strict";var i=(n(4),n(7)),r=(n(2),i);t.exports=r},function(t,e,n){"use strict";function i(t,e,n){this.props=t,this.context=e,this.refs=s,this.updater=n||o}var r=n(20),o=n(50),s=(n(82),n(21));n(1),n(2);i.prototype.isReactComponent={},i.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t?r("85"):void 0,this.updater.enqueueSetState(this,t),e&&this.updater.enqueueCallback(this,e,"setState")},i.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this),t&&this.updater.enqueueCallback(this,t,"forceUpdate")};t.exports=i},function(t,e,n){"use strict";function i(t,e){}var r=(n(2),{isMounted:function(t){return!1},enqueueCallback:function(t,e){},enqueueForceUpdate:function(t){i(t,"forceUpdate")},enqueueReplaceState:function(t,e){i(t,"replaceState")},enqueueSetState:function(t,e){i(t,"setState")}});t.exports=r},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),u=n(13),c=i(u);n(104);var d=n(187),h=function(t,e){return"function"==typeof t?t(e):t},p=function(t){function e(t){var n=t.initialSize,i=void 0===n?300:n;o(this,e);var r=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleDragStart=r.handleDragStart.bind(r),r.handleDrag=r.handleDrag.bind(r),r.state={size:i,startDragPos:0,startDragSize:0},r}return a(e,t),l(e,[{key:"handleDragStart",value:function(t){var e=t[this.eventAttr];this.setState({startDragPos:e,startDragSize:this.state.size})}},{key:"handleDrag",value:function(t){var e=t[this.eventAttr],n=this.state,i=n.startDragSize,r=n.startDragPos,o=i-r+e;this.setState({size:o})}},{key:"render",value:function(){var t=this.props,e=t.a,n=t.b,i=this.state.size,o=this.isVertical;return c.default.createElement("div",{className:"PanelSplit",style:{flexDirection:this.flexDirection}},c.default.createElement("div",{className:"PanelSplit-a",style:r({},this.sizeAttr,i)},h(e,i)),c.default.createElement(d.DraggableCore,{onStart:this.handleDragStart,onDrag:this.handleDrag},c.default.createElement("div",{className:"PanelSplit-resizer "+(o?"":"PanelSplit-resizer--horizontal")})),c.default.createElement("div",{className:"PanelSplit-b"},h(n,i)))}},{key:"isVertical",get:function(){return"horizontal"!==this.props.orientation}},{key:"flexDirection",get:function(){return this.isVertical?"column":"row"}},{key:"sizeAttr",get:function(){return this.isVertical?"height":"width"}},{key:"eventAttr",get:function(){return this.isVertical?"screenY":"screenX"}}]),e}(u.Component);e.default=p},function(t,e){},function(t,e,n){"use strict";var i=n(7),r={listen:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0},capture:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!0),{remove:function(){t.removeEventListener(e,n,!0)}}):{remove:i}},registerDefault:function(){}};t.exports=r},function(t,e){"use strict";function n(t){try{t.focus()}catch(t){}}t.exports=n},function(t,e){"use strict";function n(t){if(t=t||("undefined"!=typeof document?document:void 0),"undefined"==typeof t)return null;try{return t.activeElement||t.body}catch(e){return t.body}}t.exports=n},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function r(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function s(){m&&p&&(m=!1,p.length?f=p.concat(f):g=-1,f.length&&a())}function a(){if(!m){var t=r(s);m=!0;for(var e=f.length;e;){for(p=f,f=[];++g<e;)p&&p[g].run();g=-1,e=f.length}p=null,m=!1,o(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var c,d,h=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}}();var p,f=[],m=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new l(t,e)),1!==f.length||m||r(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.prependListener=u,h.prependOnceListener=u,h.listeners=function(t){return[]},h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,n){"use strict";function i(){}function r(t){try{return t.then}catch(t){return v=t,y}}function o(t,e){try{return t(e)}catch(t){return v=t,y}}function s(t,e,n){try{t(e,n)}catch(t){return v=t,y}}function a(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,t!==i&&m(t,this)}function l(t,e,n){return new t.constructor(function(r,o){var s=new a(i);s.then(r,o),u(t,new f(e,n,s))})}function u(t,e){for(;3===t._81;)t=t._65;return a._10&&a._10(t),0===t._81?0===t._45?(t._45=1,void(t._54=e)):1===t._45?(t._45=2,void(t._54=[t._54,e])):void t._54.push(e):void c(t,e)}function c(t,e){g(function(){var n=1===t._81?e.onFulfilled:e.onRejected;if(null===n)return void(1===t._81?d(e.promise,t._65):h(e.promise,t._65));var i=o(n,t._65);i===y?h(e.promise,v):d(e.promise,i)})}function d(t,e){if(e===t)return h(t,new TypeError("A promise cannot be resolved with itself."));if(e&&("object"==typeof e||"function"==typeof e)){var n=r(e);if(n===y)return h(t,v);if(n===t.then&&e instanceof a)return t._81=3,t._65=e,void p(t);if("function"==typeof n)return void m(n.bind(e),t)}t._81=1,t._65=e,p(t)}function h(t,e){t._81=2,t._65=e,a._97&&a._97(t,e),p(t)}function p(t){if(1===t._45&&(u(t,t._54),t._54=null),2===t._45){for(var e=0;e<t._54.length;e++)u(t,t._54[e]);t._54=null}}function f(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function m(t,e){var n=!1,i=s(t,function(t){n||(n=!0,d(e,t))},function(t){n||(n=!0,h(e,t))});n||i!==y||(n=!0,h(e,v))}var g=n(83),v=null,y={};t.exports=a,a._10=null,a._97=null,a._61=i,a.prototype.then=function(t,e){if(this.constructor!==a)return l(this,t,e);var n=new a(i);return u(this,new f(t,e,n)),n}},function(t,e,n){"use strict";var i=n(122);t.exports=function(t){var e=!1;return i(t,e)}},function(t,e,n){"use strict";function i(t){return t?t.replace(/\r\n|\r/g,"\n"):t}var r=n(13),o=n(32),s=o.findDOMNode,a=n(90),l=n(118),u=r.createClass({displayName:"CodeMirror",propTypes:{className:r.PropTypes.any,codeMirrorInstance:r.PropTypes.func,defaultValue:r.PropTypes.string,onChange:r.PropTypes.func,onFocusChange:r.PropTypes.func,onScroll:r.PropTypes.func,options:r.PropTypes.object,path:r.PropTypes.string,value:r.PropTypes.string,preserveScrollPosition:r.PropTypes.bool},getDefaultProps:function(){return{preserveScrollPosition:!1}},getCodeMirrorInstance:function(){return this.props.codeMirrorInstance||n(10)},getInitialState:function(){return{isFocused:!1}},componentWillMount:function(){this.componentWillReceiveProps=l(this.componentWillReceiveProps,0)},componentDidMount:function(){var t=s(this.refs.textarea),e=this.getCodeMirrorInstance();this.codeMirror=e.fromTextArea(t,this.props.options),this.codeMirror.on("change",this.codemirrorValueChanged),this.codeMirror.on("focus",this.focusChanged.bind(this,!0)),this.codeMirror.on("blur",this.focusChanged.bind(this,!1)),this.codeMirror.on("scroll",this.scrollChanged),this.codeMirror.setValue(this.props.defaultValue||this.props.value||"")},componentWillUnmount:function(){this.codeMirror&&this.codeMirror.toTextArea()},componentWillReceiveProps:function(t){if(this.codeMirror&&void 0!==t.value&&i(this.codeMirror.getValue())!==i(t.value))if(this.props.preserveScrollPosition){var e=this.codeMirror.getScrollInfo();this.codeMirror.setValue(t.value),this.codeMirror.scrollTo(e.left,e.top)}else this.codeMirror.setValue(t.value);if("object"==typeof t.options)for(var n in t.options)t.options.hasOwnProperty(n)&&this.codeMirror.setOption(n,t.options[n])},getCodeMirror:function(){return this.codeMirror},focus:function(){this.codeMirror&&this.codeMirror.focus()},focusChanged:function(t){this.setState({isFocused:t}),this.props.onFocusChange&&this.props.onFocusChange(t)},scrollChanged:function(t){this.props.onScroll&&this.props.onScroll(t.getScrollInfo())},codemirrorValueChanged:function(t,e){this.props.onChange&&"setValue"!==e.origin&&this.props.onChange(t.getValue(),e)},render:function(){var t=a("ReactCodeMirror",this.state.isFocused?"ReactCodeMirror--focused":null,this.props.className);return r.createElement("div",{className:t},r.createElement("textarea",{ref:"textarea",name:this.props.path,defaultValue:this.props.value,autoComplete:"off"}))}});t.exports=u},function(t,e){"use strict";function n(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var i={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},r=["Webkit","ms","Moz","O"];Object.keys(i).forEach(function(t){r.forEach(function(e){i[n(e,t)]=i[t]})});var o={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},s={isUnitlessNumber:i,shorthandPropertyExpansions:o};t.exports=s},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=n(3),o=n(14),s=(n(1),function(){function t(e){i(this,t),this._callbacks=null,this._contexts=null,this._arg=e}return t.prototype.enqueue=function(t,e){this._callbacks=this._callbacks||[],this._callbacks.push(t),this._contexts=this._contexts||[],this._contexts.push(e)},t.prototype.notifyAll=function(){var t=this._callbacks,e=this._contexts,n=this._arg;if(t&&e){t.length!==e.length?r("24"):void 0,this._callbacks=null,this._contexts=null;for(var i=0;i<t.length;i++)t[i].call(e[i],n);t.length=0,e.length=0}},t.prototype.checkpoint=function(){return this._callbacks?this._callbacks.length:0},t.prototype.rollback=function(t){this._callbacks&&this._contexts&&(this._callbacks.length=t,this._contexts.length=t)},t.prototype.reset=function(){this._callbacks=null,this._contexts=null},t.prototype.destructor=function(){this.reset()},t}());t.exports=o.addPoolingTo(s)},function(t,e,n){"use strict";function i(t){return!!u.hasOwnProperty(t)||!l.hasOwnProperty(t)&&(a.test(t)?(u[t]=!0,!0):(l[t]=!0,!1))}function r(t,e){return null==e||t.hasBooleanValue&&!e||t.hasNumericValue&&isNaN(e)||t.hasPositiveNumericValue&&e<1||t.hasOverloadedBooleanValue&&e===!1}var o=n(16),s=(n(5),n(8),n(185)),a=(n(2),new RegExp("^["+o.ATTRIBUTE_NAME_START_CHAR+"]["+o.ATTRIBUTE_NAME_CHAR+"]*$")),l={},u={},c={createMarkupForID:function(t){return o.ID_ATTRIBUTE_NAME+"="+s(t)},setAttributeForID:function(t,e){t.setAttribute(o.ID_ATTRIBUTE_NAME,e)},createMarkupForRoot:function(){return o.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(t){t.setAttribute(o.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(t,e){var n=o.properties.hasOwnProperty(t)?o.properties[t]:null;if(n){if(r(n,e))return"";var i=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&e===!0?i+'=""':i+"="+s(e)}return o.isCustomAttribute(t)?null==e?"":t+"="+s(e):null},createMarkupForCustomAttribute:function(t,e){return i(t)&&null!=e?t+"="+s(e):""},setValueForProperty:function(t,e,n){var i=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(i){var s=i.mutationMethod;if(s)s(t,n);else{if(r(i,n))return void this.deleteValueForProperty(t,e);if(i.mustUseProperty)t[i.propertyName]=n;else{var a=i.attributeName,l=i.attributeNamespace;l?t.setAttributeNS(l,a,""+n):i.hasBooleanValue||i.hasOverloadedBooleanValue&&n===!0?t.setAttribute(a,""):t.setAttribute(a,""+n)}}}else if(o.isCustomAttribute(e))return void c.setValueForAttribute(t,e,n)},setValueForAttribute:function(t,e,n){if(i(e)){null==n?t.removeAttribute(e):t.setAttribute(e,""+n)}},deleteValueForAttribute:function(t,e){t.removeAttribute(e)},deleteValueForProperty:function(t,e){var n=o.properties.hasOwnProperty(e)?o.properties[e]:null;if(n){var i=n.mutationMethod;if(i)i(t,void 0);else if(n.mustUseProperty){var r=n.propertyName;n.hasBooleanValue?t[r]=!1:t[r]=""}else t.removeAttribute(n.attributeName)}else o.isCustomAttribute(e)&&t.removeAttribute(e)}};t.exports=c},function(t,e){"use strict";var n={hasCachedChildNodes:1};t.exports=n},function(t,e,n){"use strict";function i(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var t=this._currentElement.props,e=a.getValue(t);null!=e&&r(this,Boolean(t.multiple),e)}}function r(t,e,n){var i,r,o=l.getNodeFromInstance(t).options;if(e){for(i={},r=0;r<n.length;r++)i[""+n[r]]=!0;for(r=0;r<o.length;r++){var s=i.hasOwnProperty(o[r].value);o[r].selected!==s&&(o[r].selected=s)}}else{for(i=""+n,r=0;r<o.length;r++)if(o[r].value===i)return void(o[r].selected=!0);o.length&&(o[0].selected=!0)}}function o(t){var e=this._currentElement.props,n=a.executeOnChange(e,t);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),u.asap(i,this),n}var s=n(4),a=n(38),l=n(5),u=n(9),c=(n(2),!1),d={getHostProps:function(t,e){return s({},e,{onChange:t._wrapperState.onChange,value:void 0})},mountWrapper:function(t,e){var n=a.getValue(e);t._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:e.defaultValue,listeners:null,onChange:o.bind(t),wasMultiple:Boolean(e.multiple)},void 0===e.value||void 0===e.defaultValue||c||(c=!0)},getSelectValueContext:function(t){return t._wrapperState.initialValue},postUpdateWrapper:function(t){var e=t._currentElement.props;t._wrapperState.initialValue=void 0;var n=t._wrapperState.wasMultiple;t._wrapperState.wasMultiple=Boolean(e.multiple);var i=a.getValue(e);null!=i?(t._wrapperState.pendingUpdate=!1,r(t,Boolean(e.multiple),i)):n!==Boolean(e.multiple)&&(null!=e.defaultValue?r(t,Boolean(e.multiple),e.defaultValue):r(t,Boolean(e.multiple),e.multiple?[]:""))}};t.exports=d},function(t,e){"use strict";var n,i={injectEmptyComponentFactory:function(t){n=t}},r={create:function(t){return n(t)}};r.injection=i,t.exports=r},function(t,e){"use strict";var n={logTopLevelRenders:!1};t.exports=n},function(t,e,n){"use strict";function i(t){return a?void 0:s("111",t.type),new a(t)}function r(t){return new l(t)}function o(t){return t instanceof l}var s=n(3),a=(n(1),null),l=null,u={injectGenericComponentClass:function(t){a=t},injectTextComponentClass:function(t){l=t}},c={createInternalComponent:i,createInstanceForText:r,isTextComponent:o,injection:u};t.exports=c},function(t,e,n){"use strict";function i(t){return o(document.documentElement,t)}var r=n(145),o=n(108),s=n(54),a=n(55),l={hasSelectionCapabilities:function(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&"text"===t.type||"textarea"===e||"true"===t.contentEditable)},getSelectionInformation:function(){var t=a();return{focusedElem:t,selectionRange:l.hasSelectionCapabilities(t)?l.getSelection(t):null}},restoreSelection:function(t){var e=a(),n=t.focusedElem,r=t.selectionRange;e!==n&&i(n)&&(l.hasSelectionCapabilities(n)&&l.setSelection(n,r),s(n))},getSelection:function(t){var e;if("selectionStart"in t)e={start:t.selectionStart,end:t.selectionEnd};else if(document.selection&&t.nodeName&&"input"===t.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===t&&(e={start:-n.moveStart("character",-t.value.length),end:-n.moveEnd("character",-t.value.length)})}else e=r.getOffsets(t);return e||{start:0,end:0}},setSelection:function(t,e){var n=e.start,i=e.end;if(void 0===i&&(i=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(i,t.value.length);else if(document.selection&&t.nodeName&&"input"===t.nodeName.toLowerCase()){var o=t.createTextRange();o.collapse(!0),o.moveStart("character",n),o.moveEnd("character",i-n),o.select()}else r.setOffsets(t,e)}};t.exports=l},function(t,e,n){"use strict";function i(t,e){for(var n=Math.min(t.length,e.length),i=0;i<n;i++)if(t.charAt(i)!==e.charAt(i))return i;return t.length===e.length?-1:n}function r(t){return t?t.nodeType===I?t.documentElement:t.firstChild:null}function o(t){return t.getAttribute&&t.getAttribute(P)||""}function s(t,e,n,i,r){var o;if(_.logTopLevelRenders){var s=t._currentElement.props.child,a=s.type;o="React mount: "+("string"==typeof a?a:a.displayName||a.name),console.time(o)}var l=C.mountComponent(t,n,null,b(t,e),r,0);o&&console.timeEnd(o),t._renderedComponent._topLevelWrapper=t,H._mountImageIntoNode(l,e,t,i,n)}function a(t,e,n,i){var r=T.ReactReconcileTransaction.getPooled(!n&&w.useCreateElement);r.perform(s,null,t,e,r,n,i),T.ReactReconcileTransaction.release(r)}function l(t,e,n){for(C.unmountComponent(t,n),e.nodeType===I&&(e=e.documentElement);e.lastChild;)e.removeChild(e.lastChild)}function u(t){var e=r(t);if(e){var n=y.getInstanceFromNode(e);return!(!n||!n._hostParent)}}function c(t){return!(!t||t.nodeType!==A&&t.nodeType!==I&&t.nodeType!==L)}function d(t){var e=r(t),n=e&&y.getInstanceFromNode(e);return n&&!n._hostParent?n:null}function h(t){var e=d(t);return e?e._hostContainerInfo._topLevelWrapper:null}var p=n(3),f=n(15),m=n(16),g=n(18),v=n(26),y=(n(12),n(5)),b=n(139),w=n(141),_=n(66),x=n(24),k=(n(8),n(155)),C=n(17),S=n(41),T=n(9),M=n(21),D=n(76),E=(n(1),n(30)),O=n(47),P=(n(2),m.ID_ATTRIBUTE_NAME),N=m.ROOT_ATTRIBUTE_NAME,A=1,I=9,L=11,R={},F=1,j=function(){this.rootID=F++};j.prototype.isReactComponent={},j.prototype.render=function(){return this.props.child},j.isReactTopLevelWrapper=!0;var H={TopLevelWrapper:j,_instancesByReactRootID:R,scrollMonitor:function(t,e){e()},_updateRootComponent:function(t,e,n,i,r){return H.scrollMonitor(i,function(){S.enqueueElementInternal(t,e,n),r&&S.enqueueCallbackInternal(t,r)}),t},_renderNewRootComponent:function(t,e,n,i){c(e)?void 0:p("37"),v.ensureScrollValueMonitoring();var r=D(t,!1);T.batchedUpdates(a,r,e,n,i);var o=r._instance.rootID;return R[o]=r,r},renderSubtreeIntoContainer:function(t,e,n,i){return null!=t&&x.has(t)?void 0:p("38"),H._renderSubtreeIntoContainer(t,e,n,i)},_renderSubtreeIntoContainer:function(t,e,n,i){S.validateCallback(i,"ReactDOM.render"),g.isValidElement(e)?void 0:p("39","string"==typeof e?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var s,a=g.createElement(j,{child:e});if(t){var l=x.get(t);s=l._processChildContext(l._context)}else s=M;var c=h(n);if(c){var d=c._currentElement,f=d.props.child;if(O(f,e)){var m=c._renderedComponent.getPublicInstance(),v=i&&function(){i.call(m)};return H._updateRootComponent(c,a,s,n,v),m}H.unmountComponentAtNode(n)}var y=r(n),b=y&&!!o(y),w=u(n),_=b&&!c&&!w,k=H._renderNewRootComponent(a,n,_,s)._renderedComponent.getPublicInstance();return i&&i.call(k),k},render:function(t,e,n){return H._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){c(t)?void 0:p("40");var e=h(t);if(!e){u(t),1===t.nodeType&&t.hasAttribute(N);return!1}return delete R[e._instance.rootID],T.batchedUpdates(l,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,o,s){if(c(e)?void 0:p("41"),o){var a=r(e);if(k.canReuseMarkup(t,a))return void y.precacheNode(n,a);var l=a.getAttribute(k.CHECKSUM_ATTR_NAME);a.removeAttribute(k.CHECKSUM_ATTR_NAME);var u=a.outerHTML;a.setAttribute(k.CHECKSUM_ATTR_NAME,l);var d=t,h=i(d,u),m=" (client) "+d.substring(h-20,h+20)+"\n (server) "+u.substring(h-20,h+20);e.nodeType===I?p("42",m):void 0}if(e.nodeType===I?p("43"):void 0,s.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);f.insertTreeBefore(e,t,null)}else E(e,t),y.precacheNode(n,e.firstChild)}};t.exports=H},function(t,e,n){"use strict";var i=n(3),r=n(18),o=(n(1),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(t){return null===t||t===!1?o.EMPTY:r.isValidElement(t)?"function"==typeof t.type?o.COMPOSITE:o.HOST:void i("26",t)}});t.exports=o},function(t,e){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(t){n.currentScrollLeft=t.x,n.currentScrollTop=t.y}};t.exports=n},function(t,e,n){"use strict";function i(t,e){return null==e?r("30"):void 0,null==t?e:Array.isArray(t)?Array.isArray(e)?(t.push.apply(t,e),t):(t.push(e),t):Array.isArray(e)?[t].concat(e):[t,e]}var r=n(3);n(1);t.exports=i},function(t,e){"use strict";function n(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)}t.exports=n},function(t,e,n){"use strict";function i(t){for(var e;(e=t._renderedNodeType)===r.COMPOSITE;)t=t._renderedComponent;return e===r.HOST?t._renderedComponent:e===r.EMPTY?null:void 0}var r=n(70);t.exports=i},function(t,e,n){"use strict";function i(){return!o&&r.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var r=n(6),o=null;t.exports=i},function(t,e,n){"use strict";function i(t){if(t){var e=t.getName();if(e)return" Check the render method of `"+e+"`."}return""}function r(t){return"function"==typeof t&&"undefined"!=typeof t.prototype&&"function"==typeof t.prototype.mountComponent&&"function"==typeof t.prototype.receiveComponent}function o(t,e){var n;if(null===t||t===!1)n=u.create(o);else if("object"==typeof t){var a=t,l=a.type;if("function"!=typeof l&&"string"!=typeof l){var h="";h+=i(a._owner),s("130",null==l?l:typeof l,h)}"string"==typeof a.type?n=c.createInternalComponent(a):r(a.type)?(n=new a.type(a),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new d(a)}else"string"==typeof t||"number"==typeof t?n=c.createInstanceForText(t):s("131",typeof t);return n._mountIndex=0,n._mountImage=null,n}var s=n(3),a=n(4),l=n(136),u=n(65),c=n(67),d=(n(199),n(1),n(2),function(t){this.construct(t)});a(d.prototype,l,{_instantiateReactComponent:o}),t.exports=o},function(t,e){"use strict";function n(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!i[t.type]:"textarea"===e}var i={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},function(t,e,n){"use strict";var i=n(6),r=n(29),o=n(30),s=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};i.canUseDOM&&("textContent"in document.documentElement||(s=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void o(t,r(e))})),t.exports=s},function(t,e,n){"use strict";function i(t,e){return t&&"object"==typeof t&&null!=t.key?u.escape(t.key):e.toString(36)}function r(t,e,n,o){var h=typeof t;if("undefined"!==h&&"boolean"!==h||(t=null),null===t||"string"===h||"number"===h||"object"===h&&t.$$typeof===a)return n(o,t,""===e?c+i(t,0):e),1;var p,f,m=0,g=""===e?c:e+d;if(Array.isArray(t))for(var v=0;v<t.length;v++)p=t[v],f=g+i(p,v),m+=r(p,f,n,o);else{var y=l(t);if(y){var b,w=y.call(t);if(y!==t.entries)for(var _=0;!(b=w.next()).done;)p=b.value,f=g+i(p,_++),m+=r(p,f,n,o);else for(;!(b=w.next()).done;){var x=b.value;x&&(p=x[1],f=g+u.escape(x[0])+d+i(p,0),m+=r(p,f,n,o))}}else if("object"===h){var k="",C=String(t);s("31","[object Object]"===C?"object with keys {"+Object.keys(t).join(", ")+"}":C,k)}}return m}function o(t,e,n){return null==t?0:r(t,"",e,n)}var s=n(3),a=(n(12),n(151)),l=n(182),u=(n(1),n(37)),c=(n(2),"."),d=":";t.exports=o},function(t,e,n){"use strict";function i(t){var e=Function.prototype.toString,n=Object.prototype.hasOwnProperty,i=RegExp("^"+e.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var r=e.call(t);return i.test(r)}catch(t){return!1}}function r(t){var e=u(t);if(e){var n=e.childIDs;c(t),n.forEach(r)}}function o(t,e,n){return"\n in "+(t||"Unknown")+(e?" (at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+")":n?" (created by "+n+")":"");
8
+ }function s(t){return null==t?"#empty":"string"==typeof t||"number"==typeof t?"#text":"string"==typeof t.type?t.type:t.type.displayName||t.type.name||"Unknown"}function a(t){var e,n=S.getDisplayName(t),i=S.getElement(t),r=S.getOwnerID(t);return r&&(e=S.getDisplayName(r)),o(n,i&&i._source,e)}var l,u,c,d,h,p,f,m=n(20),g=n(12),v=(n(1),n(2),"function"==typeof Array.from&&"function"==typeof Map&&i(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&i(Map.prototype.keys)&&"function"==typeof Set&&i(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&i(Set.prototype.keys));if(v){var y=new Map,b=new Set;l=function(t,e){y.set(t,e)},u=function(t){return y.get(t)},c=function(t){y.delete(t)},d=function(){return Array.from(y.keys())},h=function(t){b.add(t)},p=function(t){b.delete(t)},f=function(){return Array.from(b.keys())}}else{var w={},_={},x=function(t){return"."+t},k=function(t){return parseInt(t.substr(1),10)};l=function(t,e){var n=x(t);w[n]=e},u=function(t){var e=x(t);return w[e]},c=function(t){var e=x(t);delete w[e]},d=function(){return Object.keys(w).map(k)},h=function(t){var e=x(t);_[e]=!0},p=function(t){var e=x(t);delete _[e]},f=function(){return Object.keys(_).map(k)}}var C=[],S={onSetChildren:function(t,e){var n=u(t);n?void 0:m("144"),n.childIDs=e;for(var i=0;i<e.length;i++){var r=e[i],o=u(r);o?void 0:m("140"),null==o.childIDs&&"object"==typeof o.element&&null!=o.element?m("141"):void 0,o.isMounted?void 0:m("71"),null==o.parentID&&(o.parentID=t),o.parentID!==t?m("142",r,o.parentID,t):void 0}},onBeforeMountComponent:function(t,e,n){var i={element:e,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0};l(t,i)},onBeforeUpdateComponent:function(t,e){var n=u(t);n&&n.isMounted&&(n.element=e)},onMountComponent:function(t){var e=u(t);e?void 0:m("144"),e.isMounted=!0;var n=0===e.parentID;n&&h(t)},onUpdateComponent:function(t){var e=u(t);e&&e.isMounted&&e.updateCount++},onUnmountComponent:function(t){var e=u(t);if(e){e.isMounted=!1;var n=0===e.parentID;n&&p(t)}C.push(t)},purgeUnmountedComponents:function(){if(!S._preventPurging){for(var t=0;t<C.length;t++){var e=C[t];r(e)}C.length=0}},isMounted:function(t){var e=u(t);return!!e&&e.isMounted},getCurrentStackAddendum:function(t){var e="";if(t){var n=s(t),i=t._owner;e+=o(n,t._source,i&&i.getName())}var r=g.current,a=r&&r._debugID;return e+=S.getStackAddendumByID(a)},getStackAddendumByID:function(t){for(var e="";t;)e+=a(t),t=S.getParentID(t);return e},getChildIDs:function(t){var e=u(t);return e?e.childIDs:[]},getDisplayName:function(t){var e=S.getElement(t);return e?s(e):null},getElement:function(t){var e=u(t);return e?e.element:null},getOwnerID:function(t){var e=S.getElement(t);return e&&e._owner?e._owner._debugID:null},getParentID:function(t){var e=u(t);return e?e.parentID:null},getSource:function(t){var e=u(t),n=e?e.element:null,i=null!=n?n._source:null;return i},getText:function(t){var e=S.getElement(t);return"string"==typeof e?e:"number"==typeof e?""+e:null},getUpdateCount:function(t){var e=u(t);return e?e.updateCount:0},getRootIDs:f,getRegisteredIDs:d};t.exports=S},function(t,e){"use strict";var n="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=n},function(t,e,n){"use strict";var i=!1;t.exports=i},function(t,e){(function(e){"use strict";function n(t){a.length||(s(),l=!0),a[a.length]=t}function i(){for(;u<a.length;){var t=u;if(u+=1,a[t].call(),u>c){for(var e=0,n=a.length-u;e<n;e++)a[e]=a[e+u];a.length-=u,u=0}}a.length=0,u=0,l=!1}function r(t){var e=1,n=new h(t),i=document.createTextNode("");return n.observe(i,{characterData:!0}),function(){e=-e,i.data=e}}function o(t){return function(){function e(){clearTimeout(n),clearInterval(i),t()}var n=setTimeout(e,0),i=setInterval(e,50)}}t.exports=n;var s,a=[],l=!1,u=0,c=1024,d="undefined"!=typeof e?e:self,h=d.MutationObserver||d.WebKitMutationObserver;s="function"==typeof h?r(i):o(i),n.requestFlush=s,n.makeRequestCallFromTimer=o}).call(e,function(){return this}())},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),l=n(13),u=i(l);n(100);var c=n(87),d=i(c),h=n(86),p=i(h),f=n(51),m=i(f),g=function(t){function e(){r(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.handleSelect=t.handleSelect.bind(t),t.state={selectedEvent:void 0},t}return s(e,t),a(e,[{key:"handleSelect",value:function(t){this.setState({selectedEvent:t})}},{key:"render",value:function(){var t=this,e=this.state.selectedEvent;return u.default.createElement("div",{className:"App"},u.default.createElement(m.default,{a:function(e){return u.default.createElement(d.default,{onSelect:t.handleSelect})},b:u.default.createElement(p.default,{event:e})}))}}]),e}(l.Component);e.default=g},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),l=n(202),u=i(l),c=n(13),d=i(c),h=n(59),p=i(h);n(101),n(52),n(96),n(93);var f=function(t){return+t.split(":")[1]},m=function(t){var e=/\.([^.]*)$/.exec(t.split(":")[0])[1];return"erb"===e?"application/x-erb":"ruby"},g=function(t){function e(t){var n=t.path;r(this,e);var i=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.fetchCode(n),i.state={code:""},i}return s(e,t),a(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.path;e!==this.props.path&&(this.setState({code:""}),this.fetchCode(e))}},{key:"fetchCode",value:function(t){var e=this;(0,u.default)("/sql_probe/event/code?locator="+t).then(function(t){return t.json()}).then(function(n){e.setState({code:n.code},function(){setTimeout(function(){var n=f(t)-1;e.comp.codeMirror.doc.setSelection({line:n,ch:0},{line:n,ch:1e5})},100)})})}},{key:"render",value:function(){var t=this,e=this.props,n=e.path,i=e.className,r=this.state.code;return d.default.createElement(p.default,{ref:function(e){return t.comp=e},className:"Code "+(i||""),options:{lineNumbers:!0,lineWrapping:!0,readOnly:!0,mode:m(n)},value:r})}}]),e}(c.Component);e.default=g},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),l=n(13),u=i(l),c=n(59),d=i(c),h=n(85),p=i(h);n(102),n(52),n(97);var f=n(51),m=i(f),g={lineNumbers:!0,lineWrapping:!0,readOnly:!0,mode:"text/x-pgsql"},v=function(t){var e=t.callStack,n=t.selected,i=t.onSelect;return u.default.createElement("form",{className:"StackTrace"},u.default.createElement("fieldset",null,e.map(function(t,e){return u.default.createElement("div",{className:"StackTrace-call",key:e},u.default.createElement("input",{type:"radio",id:"radio-"+e,name:"call-stack",checked:n===e,onChange:function(){return i(e)}}),u.default.createElement("label",{htmlFor:"radio-"+e},t))})))},y=function(t){return t.split(/:\d+:in /)[0]},b=function(t){var e=t.event,n=e.caller,i=e.sql,r=t.selectedCall,o=t.onSelectCall,s=n[r];return u.default.createElement(m.default,{initialSize:40,a:u.default.createElement(d.default,{className:"EventDetails-sql",value:i,options:g}),b:u.default.createElement(m.default,{orientation:"horizontal",a:u.default.createElement("div",{className:"EventDetails-stack"},u.default.createElement("div",{className:"EventDetails-panelHeader"},"Stack"),u.default.createElement(v,{callStack:n,selected:r,onSelect:o})),b:u.default.createElement("div",{className:"EventDetails-code"},u.default.createElement("div",{className:"EventDetails-panelHeader"},y(s)),u.default.createElement(p.default,{className:"EventDetails-ruby",path:s}))})})},w=function(t){function e(){r(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.state={selectedCall:0},t}return s(e,t),a(e,[{key:"componentWillReceiveProps",value:function(t){var e=t.event;e!==this.props.event&&this.setState({selectedCall:0})}},{key:"render",value:function(){var t=this,e=this.props.event,n=this.state.selectedCall;return u.default.createElement("div",{className:"EventDetails"},e&&u.default.createElement(b,{event:e,selectedCall:n,onSelectCall:function(e){return t.setState({selectedCall:e})}}))}}]),e}(l.Component);e.default=w},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),u=n(13),c=i(u);n(103);var d=n(89),h=i(d);n(99);var p=n(203),f=function(t){var e;return(e=[]).concat.apply(e,a(t))},m=function(t){return t.time+":"+t.transaction_id+":"+t.duration},g=function(t){function e(){r(this,e);var t=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.handleEventsUpdated=function(e){t.setState({eventSets:e},function(){t.timeline.focus(e[0].start_time),t.timeline.fit()})},h.default.on(t.handleEventsUpdated),t.handleSelect=t.handleSelect.bind(t),t.state={eventSets:h.default.events},t}return s(e,t),l(e,[{key:"shouldComponentUpdate",value:function(t,e){return e.eventSets!==this.state.eventSets}},{key:"componentDidMount",value:function(){this.timeline=new p.Timeline(this.root),this.timeline.setOptions({height:"100%",stack:!1,horizontalScroll:!0,verticalScroll:!0,zoomKey:"ctrlKey",zoomMin:1e3,zoomMax:36e5,orientation:{axis:"bottom",item:"top"}}),this.timeline.on("select",this.handleSelect),this.componentDidUpdate()}},{key:"handleSelect",value:function(t){var e=this,n=t.items;if(this.props.onSelect){var i=this.events.find(function(t){return m(t)===n[0]});setTimeout(function(){return e.props.onSelect(i)},0)}}},{key:"componentDidUpdate",value:function(){this.timeline.setItems(this.timelineItems),this.timeline.setGroups(this.timelineGroups)}},{key:"componentWillUnmount",value:function(){h.default.off(this.handleEventsUpdated)}},{key:"render",value:function(){var t=this;return c.default.createElement("div",{className:"EventTimeline",style:{height:"100%"},ref:function(e){return t.root=e}})}},{key:"timelineItems",get:function(){var t=this.state.eventSets;return new p.DataSet(f(t.map(function(t){var e=t.duration,n=t.start_time,i=t.params,r=i.controller,o=i.action,s=t.events;return[{id:n,start:1e3*n,end:1e3*n+e,content:r+"#"+o,type:"background",className:"EventTimeline-eventSet",align:"center"}].concat(a(s.map(function(t){return{id:m(t),start:Date.parse(t.time),end:Date.parse(t.end),group:t.sql||t.name}})))})))}},{key:"events",get:function(){return f(this.state.eventSets.map(function(t){var e=t.events;return e}))}},{key:"timelineGroups",get:function(){var t=new Set(this.events.map(function(t){return t.sql||t.name})),e=new p.DataSet,n=!0,i=!1,r=void 0;try{for(var o,s=t.keys()[Symbol.iterator]();!(n=(o=s.next()).done);n=!0){var a=o.value;e.add({id:a,content:a.slice(0,30),style:"font-size: 12px"})}}catch(t){i=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw r}}return e}}]),e}(u.Component);e.default=g},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var r=n(13),o=i(r),s=n(32),a=i(s),l=n(84),u=i(l);n(105),a.default.render(o.default.createElement(u.default,null),document.getElementById("root"))},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=[],i=[],r=function(t){n=n.concat(t),i.forEach(function(t){return t(n)})};e.default={get events(){return n},on:function(t){i.indexOf(t)===-1&&i.push(t)},off:function(t){i=i.filter(function(e){return e!==t})}};var o=new WebSocket("ws://"+location.host+"/sql_probe/live/feed");o.onmessage=function(t){var e=t.data;123===e.charCodeAt(0)&&r(JSON.parse(e))}},function(t,e,n){var i,r;!function(){"use strict";function n(){for(var t=[],e=0;e<arguments.length;e++){var i=arguments[e];if(i){var r=typeof i;if("string"===r||"number"===r)t.push(i);else if(Array.isArray(i))t.push(n.apply(null,i));else if("object"===r)for(var s in i)o.call(i,s)&&i[s]&&t.push(s)}}return t.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof t&&t.exports?t.exports=n:(i=[],r=function(){return n}.apply(e,i),!(void 0!==r&&(t.exports=r)))}()},function(t,e,n){!function(t){t(n(10))}(function(t){"use strict";t.multiplexingMode=function(e){function n(t,e,n,i){if("string"==typeof e){var r=t.indexOf(e,n);return i&&r>-1?r+e.length:r}var o=e.exec(n?t.slice(n):t);return o?o.index+n+(i?o[0].length:0):-1}var i=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:t.startState(e),innerActive:null,inner:null}},copyState:function(n){return{outer:t.copyState(e,n.outer),innerActive:n.innerActive,inner:n.innerActive&&t.copyState(n.innerActive.mode,n.inner)}},token:function(r,o){if(o.innerActive){var s=o.innerActive,a=r.string;if(!s.close&&r.sol())return o.innerActive=o.inner=null,this.token(r,o);var l=s.close?n(a,s.close,r.pos,s.parseDelimiters):-1;if(l==r.pos&&!s.parseDelimiters)return r.match(s.close),o.innerActive=o.inner=null,s.delimStyle&&s.delimStyle+" "+s.delimStyle+"-close";l>-1&&(r.string=a.slice(0,l));var u=s.mode.token(r,o.inner);return l>-1&&(r.string=a),l==r.pos&&s.parseDelimiters&&(o.innerActive=o.inner=null),s.innerStyle&&(u=u?u+" "+s.innerStyle:s.innerStyle),u}for(var c=1/0,a=r.string,d=0;d<i.length;++d){var h=i[d],l=n(a,h.open,r.pos);if(l==r.pos)return h.parseDelimiters||r.match(h.open),o.innerActive=h,o.inner=t.startState(h.mode,e.indent?e.indent(o.outer,""):0),h.delimStyle&&h.delimStyle+" "+h.delimStyle+"-open";l!=-1&&l<c&&(c=l)}c!=1/0&&(r.string=a.slice(0,c));var p=e.token(r,o.outer);return c!=1/0&&(r.string=a),p},indent:function(n,i){var r=n.innerActive?n.innerActive.mode:e;return r.indent?r.indent(n.innerActive?n.inner:n.outer,i):t.Pass},blankLine:function(n){var r=n.innerActive?n.innerActive.mode:e;if(r.blankLine&&r.blankLine(n.innerActive?n.inner:n.outer),n.innerActive)"\n"===n.innerActive.close&&(n.innerActive=n.inner=null);else for(var o=0;o<i.length;++o){var s=i[o];"\n"===s.open&&(n.innerActive=s,n.inner=t.startState(s.mode,r.indent?r.indent(n.outer,""):0))}},electricChars:e.electricChars,innerMode:function(t){return t.inner?{state:t.inner,mode:t.innerActive.mode}:{state:t.outer,mode:e}}}}})},function(t,e,n){!function(t){t(n(10))}(function(t){"use strict";function e(t){for(var e={},n=0;n<t.length;++n)e[t[n].toLowerCase()]=!0;return e}function n(t,e){for(var n,i=!1;null!=(n=t.next());){if(i&&"/"==n){e.tokenize=null;break}i="*"==n}return["comment","comment"]}t.defineMode("css",function(e,n){function i(t,e){return f=e,t}function r(t,e){var n=t.next();if(v[n]){var r=v[n](t,e);if(r!==!1)return r}return"@"==n?(t.eatWhile(/[\w\\\-]/),i("def",t.current())):"="==n||("~"==n||"|"==n)&&t.eat("=")?i(null,"compare"):'"'==n||"'"==n?(e.tokenize=o(n),e.tokenize(t,e)):"#"==n?(t.eatWhile(/[\w\\\-]/),i("atom","hash")):"!"==n?(t.match(/^\s*\w*/),i("keyword","important")):/\d/.test(n)||"."==n&&t.eat(/\d/)?(t.eatWhile(/[\w.%]/),i("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?i(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?i("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?i(null,n):"u"==n&&t.match(/rl(-prefix)?\(/)||"d"==n&&t.match("omain(")||"r"==n&&t.match("egexp(")?(t.backUp(1),e.tokenize=s,i("property","word")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),i("property","word")):i(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),i("number","unit")):t.match(/^-[\w\\\-]+/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?i("variable-2","variable-definition"):i("variable-2","variable")):t.match(/^\w+-/)?i("meta","meta"):void 0}function o(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){")"==t&&e.backUp(1);break}o=!o&&"\\"==r}return(r==t||!o&&")"!=t)&&(n.tokenize=null),i("string","string")}}function s(t,e){return t.next(),t.match(/\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=o(")"),i(null,"(")}function a(t,e,n){this.type=t,this.indent=e,this.prev=n}function l(t,e,n,i){return t.context=new a(n,e.indentation()+(i===!1?0:g),t.context),n}function u(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function c(t,e,n){return P[n.context.type](t,e,n)}function d(t,e,n,i){for(var r=i||1;r>0;r--)n.context=n.context.prev;return c(t,e,n)}function h(t){var e=t.current().toLowerCase();m=M.hasOwnProperty(e)?"atom":T.hasOwnProperty(e)?"keyword":"variable"}var p=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var f,m,g=e.indentUnit,v=n.tokenHooks,y=n.documentTypes||{},b=n.mediaTypes||{},w=n.mediaFeatures||{},_=n.mediaValueKeywords||{},x=n.propertyKeywords||{},k=n.nonStandardPropertyKeywords||{},C=n.fontProperties||{},S=n.counterDescriptors||{},T=n.colorKeywords||{},M=n.valueKeywords||{},D=n.allowNested,E=n.lineComment,O=n.supportsAtComponent===!0,P={};return P.top=function(t,e,n){if("{"==t)return l(n,e,"block");if("}"==t&&n.context.prev)return u(n);if(O&&/@component/.test(t))return l(n,e,"atComponentBlock");if(/^@(-moz-)?document$/.test(t))return l(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(t))return l(n,e,"atBlock");if(/^@(font-face|counter-style)/.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return l(n,e,"at");if("hash"==t)m="builtin";else if("word"==t)m="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return l(n,e,"interpolation");if(":"==t)return"pseudo";if(D&&"("==t)return l(n,e,"parens")}return n.context.type},P.block=function(t,e,n){if("word"==t){var i=e.current().toLowerCase();return x.hasOwnProperty(i)?(m="property","maybeprop"):k.hasOwnProperty(i)?(m="string-2","maybeprop"):D?(m=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(m+=" error","maybeprop")}return"meta"==t?"block":D||"hash"!=t&&"qualifier"!=t?P.top(t,e,n):(m="error","block")},P.maybeprop=function(t,e,n){return":"==t?l(n,e,"prop"):c(t,e,n)},P.prop=function(t,e,n){if(";"==t)return u(n);if("{"==t&&D)return l(n,e,"propBlock");if("}"==t||"{"==t)return d(t,e,n);if("("==t)return l(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)h(e);else if("interpolation"==t)return l(n,e,"interpolation")}else m+=" error";return"prop"},P.propBlock=function(t,e,n){return"}"==t?u(n):"word"==t?(m="property","maybeprop"):n.context.type},P.parens=function(t,e,n){return"{"==t||"}"==t?d(t,e,n):")"==t?u(n):"("==t?l(n,e,"parens"):"interpolation"==t?l(n,e,"interpolation"):("word"==t&&h(e),"parens")},P.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(m="variable-3",n.context.type):c(t,e,n)},P.documentTypes=function(t,e,n){return"word"==t&&y.hasOwnProperty(e.current())?(m="tag",n.context.type):P.atBlock(t,e,n)},P.atBlock=function(t,e,n){if("("==t)return l(n,e,"atBlock_parens");if("}"==t||";"==t)return d(t,e,n);if("{"==t)return u(n)&&l(n,e,D?"block":"top");if("interpolation"==t)return l(n,e,"interpolation");if("word"==t){var i=e.current().toLowerCase();m="only"==i||"not"==i||"and"==i||"or"==i?"keyword":b.hasOwnProperty(i)?"attribute":w.hasOwnProperty(i)?"property":_.hasOwnProperty(i)?"keyword":x.hasOwnProperty(i)?"property":k.hasOwnProperty(i)?"string-2":M.hasOwnProperty(i)?"atom":T.hasOwnProperty(i)?"keyword":"error"}return n.context.type},P.atComponentBlock=function(t,e,n){return"}"==t?d(t,e,n):"{"==t?u(n)&&l(n,e,D?"block":"top",!1):("word"==t&&(m="error"),n.context.type)},P.atBlock_parens=function(t,e,n){return")"==t?u(n):"{"==t||"}"==t?d(t,e,n,2):P.atBlock(t,e,n)},P.restricted_atBlock_before=function(t,e,n){return"{"==t?l(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(m="variable","restricted_atBlock_before"):c(t,e,n)},P.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,u(n)):"word"==t?(m="@font-face"==n.stateArg&&!C.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!S.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},P.keyframes=function(t,e,n){return"word"==t?(m="variable","keyframes"):"{"==t?l(n,e,"top"):c(t,e,n)},P.at=function(t,e,n){return";"==t?u(n):"{"==t||"}"==t?d(t,e,n):("word"==t?m="tag":"hash"==t&&(m="builtin"),"at")},P.interpolation=function(t,e,n){return"}"==t?u(n):"{"==t||";"==t?d(t,e,n):("word"==t?m="variable":"variable"!=t&&"("!=t&&")"!=t&&(m="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:p?"block":"top",stateArg:null,context:new a(p?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||r)(t,e);return n&&"object"==typeof n&&(f=n[1],n=n[0]),m=n,e.state=P[e.state](f,t,e),m},indent:function(t,e){var n=t.context,i=e&&e.charAt(0),r=n.indent;return"prop"!=n.type||"}"!=i&&")"!=i||(n=n.prev),n.prev&&("}"!=i||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=i||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=i||"at"!=n.type&&"atBlock"!=n.type)||(r=Math.max(0,n.indent-g),n=n.prev):(n=n.prev,r=n.indent)),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:E,fold:"brace"}});var i=["domain","regexp","url","url-prefix"],r=e(i),o=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],s=e(o),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],l=e(a),u=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],c=e(u),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=e(d),p=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],f=e(p),m=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=e(m),v=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=e(v),b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],w=e(b),_=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],x=e(_),k=i.concat(o).concat(a).concat(u).concat(d).concat(p).concat(b).concat(_);
9
+ t.registerHelper("hintWords","css",k),t.defineMIME("text/css",{documentTypes:r,mediaTypes:s,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:w,valueKeywords:x,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:w,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(t,e)):["operator","operator"]},":":function(t){return!!t.match(/\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:s,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:h,nonStandardPropertyKeywords:f,colorKeywords:w,valueKeywords:x,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=n,n(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:s,mediaFeatures:l,propertyKeywords:h,nonStandardPropertyKeywords:f,fontProperties:g,counterDescriptors:y,colorKeywords:w,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=n,n(t,e))}},name:"css",helperType:"gss"})})},function(t,e,n){!function(t){t(n(10),n(94),n(91))}(function(t){"use strict";t.defineMode("htmlembedded",function(e,n){return t.multiplexingMode(t.getMode(e,"htmlmixed"),{open:n.open||n.scriptStartRegex||"<%",close:n.close||n.scriptEndRegex||"%>",mode:t.getMode(e,n.scriptingModeSpec)})},"htmlmixed"),t.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),t.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),t.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),t.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})})},function(t,e,n){!function(t){t(n(10),n(98),n(95),n(92))}(function(t){"use strict";function e(t,e,n){var i=t.current(),r=i.search(e);return r>-1?t.backUp(i.length-r):i.match(/<\/?$/)&&(t.backUp(i.length),t.match(e,!1)||t.match(i)),n}function n(t){var e=l[t];return e?e:l[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function i(t,e){var i=t.match(n(e));return i?/^\s*(.*?)\s*$/.exec(i[2])[1]:""}function r(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function o(t,e){for(var n in t)for(var i=e[n]||(e[n]=[]),r=t[n],o=r.length-1;o>=0;o--)i.unshift(r[o])}function s(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(!r[0]||r[1].test(i(e,r[0])))return r[2]}}var a={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},l={};t.defineMode("htmlmixed",function(n,i){function l(i,o){var a,d=u.token(i,o.htmlState),h=/\btag\b/.test(d);if(h&&!/[<>\s\/]/.test(i.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&h&&/>$/.test(i.current())){var p=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var f=">"==i.current()&&s(c[p[1]],p[2]),m=t.getMode(n,f),g=r(p[1],!0),v=r(p[1],!1);o.token=function(t,n){return t.match(g,!1)?(n.token=l,n.localState=n.localMode=null,null):e(t,v,n.localMode.token(t,n.localState))},o.localMode=m,o.localState=t.startState(m,u.indent(o.htmlState,""))}else o.inTag&&(o.inTag+=i.current(),i.eol()&&(o.inTag+=" "));return d}var u=t.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag}),c={},d=i&&i.tags,h=i&&i.scriptTypes;if(o(a,c),d&&o(d,c),h)for(var p=h.length-1;p>=0;p--)c.script.unshift(["type",h[p].matches,h[p].mode]);return{startState:function(){var e=t.startState(u);return{token:l,inTag:null,localMode:null,localState:null,htmlState:e}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(u,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n){return!e.localMode||/^\s*<\//.test(n)?u.indent(e.htmlState,n):e.localMode.indent?e.localMode.indent(e.localState,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||u}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})},function(t,e,n){!function(t){t(n(10))}(function(t){"use strict";function e(t,e,n){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}t.defineMode("javascript",function(n,i){function r(t){for(var e,n=!1,i=!1;null!=(e=t.next());){if(!n){if("/"==e&&!i)return;"["==e?i=!0:i&&"]"==e&&(i=!1)}n=!n&&"\\"==e}}function o(t,e,n){return St=t,Tt=n,e}function s(t,n){var i=t.next();if('"'==i||"'"==i)return n.tokenize=a(i),n.tokenize(t,n);if("."==i&&t.match(/^\d+(?:[eE][+\-]?\d+)?/))return o("number","number");if("."==i&&t.match(".."))return o("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(i))return o(i);if("="==i&&t.eat(">"))return o("=>","operator");if("0"==i&&t.eat(/x/i))return t.eatWhile(/[\da-f]/i),o("number","number");if("0"==i&&t.eat(/o/i))return t.eatWhile(/[0-7]/i),o("number","number");if("0"==i&&t.eat(/b/i))return t.eatWhile(/[01]/i),o("number","number");if(/\d/.test(i))return t.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),o("number","number");if("/"==i)return t.eat("*")?(n.tokenize=l,l(t,n)):t.eat("/")?(t.skipToEnd(),o("comment","comment")):e(t,n,1)?(r(t),t.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),o("regexp","string-2")):(t.eatWhile(It),o("operator","operator",t.current()));if("`"==i)return n.tokenize=u,u(t,n);if("#"==i)return t.skipToEnd(),o("error","error");if(It.test(i))return">"==i&&n.lexical&&">"==n.lexical.type||t.eatWhile(It),o("operator","operator",t.current());if(Nt.test(i)){t.eatWhile(Nt);var s=t.current(),c=At.propertyIsEnumerable(s)&&At[s];return c&&"."!=n.lastType?o(c.type,c.style,s):o("variable","variable",s)}}function a(t){return function(e,n){var i,r=!1;if(Et&&"@"==e.peek()&&e.match(Lt))return n.tokenize=s,o("jsonld-keyword","meta");for(;null!=(i=e.next())&&(i!=t||r);)r=!r&&"\\"==i;return r||(n.tokenize=s),o("string","string")}}function l(t,e){for(var n,i=!1;n=t.next();){if("/"==n&&i){e.tokenize=s;break}i="*"==n}return o("comment","comment")}function u(t,e){for(var n,i=!1;null!=(n=t.next());){if(!i&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=s;break}i=!i&&"\\"==n}return o("quasi","string-2",t.current())}function c(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(Pt){var i=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));i&&(n=i.index)}for(var r=0,o=!1,s=n-1;s>=0;--s){var a=t.string.charAt(s),l=Rt.indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(o=!0);break}}else if(l>=3&&l<6)++r;else if(Nt.test(a))o=!0;else{if(/["'\/]/.test(a))return;if(o&&!r){++s;break}}}o&&!r&&(e.fatArrowAt=s)}}function d(t,e,n,i,r,o){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=o,null!=i&&(this.align=i)}function h(t,e){for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var i=t.context;i;i=i.prev)for(var n=i.vars;n;n=n.next)if(n.name==e)return!0}function p(t,e,n,i,r){var o=t.cc;for(jt.state=t,jt.stream=r,jt.marked=null,jt.cc=o,jt.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;){var s=o.length?o.pop():Ot?k:x;if(s(n,i)){for(;o.length&&o[o.length-1].lex;)o.pop()();return jt.marked?jt.marked:"variable"==n&&h(t,i)?"variable-2":e}}}function f(){for(var t=arguments.length-1;t>=0;t--)jt.cc.push(arguments[t])}function m(){return f.apply(null,arguments),!0}function g(t){function e(e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}var n=jt.state;if(jt.marked="def",n.context){if(e(n.localVars))return;n.localVars={name:t,next:n.localVars}}else{if(e(n.globalVars))return;i.globalVars&&(n.globalVars={name:t,next:n.globalVars})}}function v(){jt.state.context={prev:jt.state.context,vars:jt.state.localVars},jt.state.localVars=Ht}function y(){jt.state.localVars=jt.state.context.vars,jt.state.context=jt.state.context.prev}function b(t,e){var n=function(){var n=jt.state,i=n.indented;if("stat"==n.lexical.type)i=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)i=r.indented;n.lexical=new d(i,jt.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function w(){var t=jt.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function _(t){function e(n){return n==t?m():";"==t?f():m(e)}return e}function x(t,e){return"var"==t?m(b("vardef",e.length),Q,_(";"),w):"keyword a"==t?m(b("form"),S,x,w):"keyword b"==t?m(b("form"),x,w):"{"==t?m(b("}"),V,w):";"==t?m():"if"==t?("else"==jt.state.lexical.info&&jt.state.cc[jt.state.cc.length-1]==w&&jt.state.cc.pop()(),m(b("form"),S,x,w,it)):"function"==t?m(ut):"for"==t?m(b("form"),rt,x,w):"variable"==t?m(b("stat"),j):"switch"==t?m(b("form"),S,b("}","switch"),_("{"),V,w,w):"case"==t?m(k,_(":")):"default"==t?m(_(":")):"catch"==t?m(b("form"),v,_("("),ct,_(")"),x,w,y):"class"==t?m(b("form"),ht,w):"export"==t?m(b("stat"),gt,w):"import"==t?m(b("stat"),yt,w):"module"==t?m(b("form"),J,b("}"),_("{"),V,w,w):"type"==t?m(q,_("operator"),q,_(";")):"async"==t?m(x):"@"==e?m(k,x):f(b("stat"),k,_(";"),w)}function k(t){return T(t,!1)}function C(t){return T(t,!0)}function S(t){return"("!=t?f():m(b(")"),k,_(")"),w)}function T(t,e){if(jt.state.fatArrowAt==jt.stream.start){var n=e?I:A;if("("==t)return m(v,b(")"),B(J,")"),w,_("=>"),n,y);if("variable"==t)return f(v,J,_("=>"),n,y)}var i=e?O:E;return Ft.hasOwnProperty(t)?m(i):"function"==t?m(ut,i):"class"==t?m(b("form"),dt,w):"keyword c"==t||"async"==t?m(e?D:M):"("==t?m(b(")"),M,_(")"),w,i):"operator"==t||"spread"==t?m(e?C:k):"["==t?m(b("]"),kt,w,i):"{"==t?Y(W,"}",null,i):"quasi"==t?f(P,i):"new"==t?m(L(e)):m()}function M(t){return t.match(/[;\}\)\],]/)?f():f(k)}function D(t){return t.match(/[;\}\)\],]/)?f():f(C)}function E(t,e){return","==t?m(k):O(t,e,!1)}function O(t,e,n){var i=0==n?E:O,r=0==n?k:C;return"=>"==t?m(v,n?I:A,y):"operator"==t?/\+\+|--/.test(e)?m(i):"?"==e?m(k,_(":"),r):m(r):"quasi"==t?f(P,i):";"!=t?"("==t?Y(C,")","call",i):"."==t?m(H,i):"["==t?m(b("]"),M,_("]"),w,i):void 0:void 0}function P(t,e){return"quasi"!=t?f():"${"!=e.slice(e.length-2)?m(P):m(k,N)}function N(t){if("}"==t)return jt.marked="string-2",jt.state.tokenize=u,m(P)}function A(t){return c(jt.stream,jt.state),f("{"==t?x:k)}function I(t){return c(jt.stream,jt.state),f("{"==t?x:C)}function L(t){return function(e){return"."==e?m(t?F:R):f(t?C:k)}}function R(t,e){if("target"==e)return jt.marked="keyword",m(E)}function F(t,e){if("target"==e)return jt.marked="keyword",m(O)}function j(t){return":"==t?m(w,x):f(E,_(";"),w)}function H(t){if("variable"==t)return jt.marked="property",m()}function W(t,e){return"async"==t?(jt.marked="property",m(W)):"variable"==t||"keyword"==jt.style?(jt.marked="property",m("get"==e||"set"==e?z:U)):"number"==t||"string"==t?(jt.marked=Et?"property":jt.style+" property",m(U)):"jsonld-keyword"==t?m(U):"modifier"==t?m(W):"["==t?m(k,_("]"),U):"spread"==t?m(k):":"==t?f(U):void 0}function z(t){return"variable"!=t?f(U):(jt.marked="property",m(ut))}function U(t){return":"==t?m(C):"("==t?f(ut):void 0}function B(t,e,n){function i(r,o){if(n?n.indexOf(r)>-1:","==r){var s=jt.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),m(function(n,i){return n==e||i==e?f():f(t)},i)}return r==e||o==e?m():m(_(e))}return function(n,r){return n==e||r==e?m():f(t,i)}}function Y(t,e,n){for(var i=3;i<arguments.length;i++)jt.cc.push(arguments[i]);return m(b(e,n),B(t,e),w)}function V(t){return"}"==t?m():f(x,V)}function G(t,e){if(Pt){if(":"==t)return m(q);if("?"==e)return m(G)}}function q(t){return"variable"==t?(jt.marked="variable-3",m(Z)):"string"==t||"number"==t||"atom"==t?m(Z):"{"==t?m(b("}"),B(X,"}",",;"),w):"("==t?m(B($,")"),K):void 0}function K(t){if("=>"==t)return m(q)}function X(t,e){return"variable"==t||"keyword"==jt.style?(jt.marked="property",m(X)):"?"==e?m(X):":"==t?m(q):void 0}function $(t){return"variable"==t?m($):":"==t?m(q):void 0}function Z(t,e){return"<"==e?m(b(">"),B(q,">"),w,Z):"|"==e||"."==t?m(q):"["==t?m(_("]"),Z):void 0}function Q(){return f(J,G,et,nt)}function J(t,e){return"modifier"==t?m(J):"variable"==t?(g(e),m()):"spread"==t?m(J):"["==t?Y(J,"]"):"{"==t?Y(tt,"}"):void 0}function tt(t,e){return"variable"!=t||jt.stream.match(/^\s*:/,!1)?("variable"==t&&(jt.marked="property"),"spread"==t?m(J):"}"==t?f():m(_(":"),J,et)):(g(e),m(et))}function et(t,e){if("="==e)return m(C)}function nt(t){if(","==t)return m(Q)}function it(t,e){if("keyword b"==t&&"else"==e)return m(b("form","else"),x,w)}function rt(t){if("("==t)return m(b(")"),ot,_(")"),w)}function ot(t){return"var"==t?m(Q,_(";"),at):";"==t?m(at):"variable"==t?m(st):f(k,_(";"),at)}function st(t,e){return"in"==e||"of"==e?(jt.marked="keyword",m(k)):m(E,at)}function at(t,e){return";"==t?m(lt):"in"==e||"of"==e?(jt.marked="keyword",m(k)):f(k,_(";"),lt)}function lt(t){")"!=t&&m(k)}function ut(t,e){return"*"==e?(jt.marked="keyword",m(ut)):"variable"==t?(g(e),m(ut)):"("==t?m(v,b(")"),B(ct,")"),w,G,x,y):Pt&&"<"==e?m(b(">"),B(q,">"),w,ut):void 0}function ct(t){return"spread"==t?m(ct):f(J,G,et)}function dt(t,e){return"variable"==t?ht(t,e):pt(t,e)}function ht(t,e){if("variable"==t)return g(e),m(pt)}function pt(t,e){return"<"==e?m(b(">"),B(q,">"),w,pt):"extends"==e||"implements"==e||Pt&&","==t?m(Pt?q:k,pt):"{"==t?m(b("}"),ft,w):void 0}function ft(t,e){return"variable"==t||"keyword"==jt.style?("async"==e||"static"==e||"get"==e||"set"==e||Pt&&("public"==e||"private"==e||"protected"==e||"readonly"==e||"abstract"==e))&&jt.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(jt.marked="keyword",m(ft)):(jt.marked="property",m(Pt?mt:ut,ft)):"["==t?m(k,_("]"),Pt?mt:ut,ft):"*"==e?(jt.marked="keyword",m(ft)):";"==t?m(ft):"}"==t?m():"@"==e?m(k,ft):void 0}function mt(t,e){return"?"==e?m(mt):":"==t?m(q,et):"="==e?m(C):f(ut)}function gt(t,e){return"*"==e?(jt.marked="keyword",m(xt,_(";"))):"default"==e?(jt.marked="keyword",m(k,_(";"))):"{"==t?m(B(vt,"}"),xt,_(";")):f(x)}function vt(t,e){return"as"==e?(jt.marked="keyword",m(_("variable"))):"variable"==t?f(C,vt):void 0}function yt(t){return"string"==t?m():f(bt,wt,xt)}function bt(t,e){return"{"==t?Y(bt,"}"):("variable"==t&&g(e),"*"==e&&(jt.marked="keyword"),m(_t))}function wt(t){if(","==t)return m(bt,wt)}function _t(t,e){if("as"==e)return jt.marked="keyword",m(bt)}function xt(t,e){if("from"==e)return jt.marked="keyword",m(k)}function kt(t){return"]"==t?m():f(B(C,"]"))}function Ct(t,e){return"operator"==t.lastType||","==t.lastType||It.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}var St,Tt,Mt=n.indentUnit,Dt=i.statementIndent,Et=i.jsonld,Ot=i.json||Et,Pt=i.typescript,Nt=i.wordCharacters||/[\w$\xa1-\uffff]/,At=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),i=t("keyword c"),r=t("operator"),o={type:"atom",style:"atom"},s={if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:t("new"),delete:i,throw:i,debugger:i,var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:r,typeof:r,instanceof:r,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:t("this"),class:t("class"),super:t("atom"),yield:i,export:t("export"),import:t("import"),extends:i,await:i,async:t("async")};if(Pt){var a={type:"variable",style:"variable-3"},l={interface:t("class"),implements:i,namespace:i,module:t("module"),enum:t("module"),type:t("type"),public:t("modifier"),private:t("modifier"),protected:t("modifier"),abstract:t("modifier"),as:r,string:a,number:a,boolean:a,any:a};for(var u in l)s[u]=l[u]}return s}(),It=/[+\-*&%=<>!?|~^@]/,Lt=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Rt="([{}])",Ft={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},jt={state:null,column:null,marked:null,cc:null},Ht={name:"this",next:{name:"arguments"}};return w.lex=!0,{startState:function(t){var e={tokenize:s,lastType:"sof",cc:[],lexical:new d((t||0)-Mt,0,"block",!1),localVars:i.localVars,context:i.localVars&&{vars:i.localVars},indented:t||0};return i.globalVars&&"object"==typeof i.globalVars&&(e.globalVars=i.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),c(t,e)),e.tokenize!=l&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==St?n:(e.lastType="operator"!=St||"++"!=Tt&&"--"!=Tt?St:"incdec",p(e,n,St,Tt,t))},indent:function(e,n){if(e.tokenize==l)return t.Pass;if(e.tokenize!=s)return 0;var r,o=n&&n.charAt(0),a=e.lexical;if(!/^\s*else\b/.test(n))for(var u=e.cc.length-1;u>=0;--u){var c=e.cc[u];if(c==w)a=a.prev;else if(c!=it)break}for(;("stat"==a.type||"form"==a.type)&&("}"==o||(r=e.cc[e.cc.length-1])&&(r==E||r==O)&&!/^[,\.=+\-*:?[\(]/.test(n));)a=a.prev;Dt&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var d=a.type,h=o==d;return"vardef"==d?a.indented+("operator"==e.lastType||","==e.lastType?a.info+1:0):"form"==d&&"{"==o?a.indented:"form"==d?a.indented+Mt:"stat"==d?a.indented+(Ct(e,n)?Dt||Mt:0):"switch"!=a.info||h||0==i.doubleIndentSwitch?a.align?a.column+(h?0:1):a.indented+(h?0:Mt):a.indented+(/^(?:case|default)\b/.test(n)?Mt:2*Mt)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ot?null:"/*",blockCommentEnd:Ot?null:"*/",lineComment:Ot?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ot?"json":"javascript",jsonldMode:Et,jsonMode:Ot,expressionAllowed:e,skipExpression:function(t){var e=t.cc[t.cc.length-1];e!=k&&e!=C||t.cc.pop()}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},function(t,e,n){!function(t){t(n(10))}(function(t){"use strict";t.defineMode("ruby",function(t){function e(t){for(var e={},n=0,i=t.length;n<i;++n)e[t[n]]=!0;return e}function n(t,e,n){return n.tokenize.push(t),t(e,n)}function i(t,e){if(t.sol()&&t.match("=begin")&&t.eol())return e.tokenize.push(u),"comment";if(t.eatSpace())return null;var i,o=t.next();if("`"==o||"'"==o||'"'==o)return n(a(o,"string",'"'==o||"`"==o),t,e);if("/"==o)return r(t)?n(a(o,"string-2",!0),t,e):"operator";if("%"==o){var s="string",d=!0;t.eat("s")?s="atom":t.eat(/[WQ]/)?s="string":t.eat(/[r]/)?s="string-2":t.eat(/[wxq]/)&&(s="string",d=!1);var h=t.eat(/[^\w\s=]/);return h?(f.propertyIsEnumerable(h)&&(h=f[h]),n(a(h,s,d,!0),t,e)):"operator"}if("#"==o)return t.skipToEnd(),"comment";if("<"==o&&(i=t.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return n(l(i[1]),t,e);if("0"==o)return t.eat("x")?t.eatWhile(/[\da-fA-F]/):t.eat("b")?t.eatWhile(/[01]/):t.eatWhile(/[0-7]/),"number";if(/\d/.test(o))return t.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==o){for(;t.match(/^\\[CM]-/););return t.eat("\\")?t.eatWhile(/\w/):t.next(),"string"}if(":"==o)return t.eat("'")?n(a("'","atom",!1),t,e):t.eat('"')?n(a('"',"atom",!0),t,e):t.eat(/[\<\>]/)?(t.eat(/[\<\>]/),"atom"):t.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":t.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(t.eatWhile(/[\w$\xa1-\uffff]/),t.eat(/[\?\!\=]/),"atom"):"operator";if("@"==o&&t.match(/^@?[a-zA-Z_\xa1-\uffff]/))return t.eat("@"),t.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==o)return t.eat(/[a-zA-Z_]/)?t.eatWhile(/[\w]/):t.eat(/\d/)?t.eat(/\d/):t.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(o))return t.eatWhile(/[\w\xa1-\uffff]/),t.eat(/[\?\!]/),t.eat(":")?"atom":"ident";if("|"!=o||!e.varList&&"{"!=e.lastTok&&"do"!=e.lastTok){if(/[\(\)\[\]{}\\;]/.test(o))return c=o,null;if("-"==o&&t.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(o)){var p=t.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=o||p||(c="."),"operator"}return null}return c="|",null}function r(t){for(var e,n=t.pos,i=0,r=!1,o=!1;null!=(e=t.next());)if(o)o=!1;else{if("[{(".indexOf(e)>-1)i++;else if("]})".indexOf(e)>-1){if(i--,i<0)break}else if("/"==e&&0==i){r=!0;break}o="\\"==e}return t.backUp(t.pos-n),r}function o(t){return t||(t=1),function(e,n){if("}"==e.peek()){if(1==t)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](e,n);n.tokenize[n.tokenize.length-1]=o(t-1)}else"{"==e.peek()&&(n.tokenize[n.tokenize.length-1]=o(t+1));return i(e,n)}}function s(){var t=!1;return function(e,n){return t?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](e,n)):(t=!0,i(e,n))}}function a(t,e,n,i){return function(r,a){var l,u=!1;for("read-quoted-paused"===a.context.type&&(a.context=a.context.prev,r.eat("}"));null!=(l=r.next());){if(l==t&&(i||!u)){a.tokenize.pop();break}if(n&&"#"==l&&!u){if(r.eat("{")){"}"==t&&(a.context={prev:a.context,type:"read-quoted-paused"}),a.tokenize.push(o());break}if(/[@\$]/.test(r.peek())){a.tokenize.push(s());break}}u=!u&&"\\"==l}return e}}function l(t){return function(e,n){return e.match(t)?n.tokenize.pop():e.skipToEnd(),"string"}}function u(t,e){return t.sol()&&t.match("=end")&&t.eol()&&e.tokenize.pop(),t.skipToEnd(),"comment"}var c,d=e(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"]),h=e(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),p=e(["end","until"]),f={"[":"]","{":"}","(":")"};return{startState:function(){return{tokenize:[i],indented:0,context:{type:"top",indented:-t.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(t,e){c=null,t.sol()&&(e.indented=t.indentation());var n,i=e.tokenize[e.tokenize.length-1](t,e),r=c;if("ident"==i){var o=t.current();i="."==e.lastTok?"property":d.propertyIsEnumerable(t.current())?"keyword":/^[A-Z]/.test(o)?"tag":"def"==e.lastTok||"class"==e.lastTok||e.varList?"def":"variable","keyword"==i&&(r=o,h.propertyIsEnumerable(o)?n="indent":p.propertyIsEnumerable(o)?n="dedent":"if"!=o&&"unless"!=o||t.column()!=t.indentation()?"do"==o&&e.context.indented<e.indented&&(n="indent"):n="indent")}return(c||i&&"comment"!=i)&&(e.lastTok=r),"|"==c&&(e.varList=!e.varList),"indent"==n||/[\(\[\{]/.test(c)?e.context={prev:e.context,type:c||i,indented:e.indented}:("dedent"==n||/[\)\]\}]/.test(c))&&e.context.prev&&(e.context=e.context.prev),t.eol()&&(e.continuedLine="\\"==c||"operator"==i),i},indent:function(e,n){if(e.tokenize[e.tokenize.length-1]!=i)return 0;var r=n&&n.charAt(0),o=e.context,s=o.type==f[r]||"keyword"==o.type&&/^(?:end|until|else|elsif|when|rescue)\b/.test(n);return o.indented+(s?0:t.indentUnit)+(e.continuedLine?t.indentUnit:0)},electricInput:/^\s*(?:end|rescue|elsif|else|\})$/,lineComment:"#"}}),t.defineMIME("text/x-ruby","ruby")})},function(t,e,n){!function(t){t(n(10))}(function(t){"use strict";t.defineMode("sql",function(e,n){function i(t,e){var n=t.next();if(f[n]){var i=f[n](t,e);if(i!==!1)return i}if(p.hexNumber&&("0"==n&&t.match(/^[xX][0-9a-fA-F]+/)||("x"==n||"X"==n)&&t.match(/^'[0-9a-fA-F]+'/)))return"number";if(p.binaryNumber&&(("b"==n||"B"==n)&&t.match(/^'[01]+'/)||"0"==n&&t.match(/^b[01]+/)))return"number";if(n.charCodeAt(0)>47&&n.charCodeAt(0)<58)return t.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/),p.decimallessFloat&&t.eat("."),"number";if("?"==n&&(t.eatSpace()||t.eol()||t.eat(";")))return"variable-3";if("'"==n||'"'==n&&p.doubleQuote)return e.tokenize=r(n),e.tokenize(t,e);if((p.nCharCast&&("n"==n||"N"==n)||p.charsetCast&&"_"==n&&t.match(/[a-z][a-z0-9]*/i))&&("'"==t.peek()||'"'==t.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(n))return null;if(p.commentSlashSlash&&"/"==n&&t.eat("/"))return t.skipToEnd(),"comment";if(p.commentHash&&"#"==n||"-"==n&&t.eat("-")&&(!p.commentSpaceRequired||t.eat(" ")))return t.skipToEnd(),"comment";if("/"==n&&t.eat("*"))return e.tokenize=o,e.tokenize(t,e);if("."!=n){if(h.test(n))return t.eatWhile(h),null;if("{"==n&&(t.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||t.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";t.eatWhile(/^[_\w\d]/);var s=t.current().toLowerCase();return m.hasOwnProperty(s)&&(t.match(/^( )+'[^']*'/)||t.match(/^( )+"[^"]*"/))?"number":u.hasOwnProperty(s)?"atom":c.hasOwnProperty(s)?"builtin":d.hasOwnProperty(s)?"keyword":l.hasOwnProperty(s)?"string-2":null}return p.zerolessFloat&&t.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":p.ODBCdotTable&&t.match(/^[a-zA-Z_]+/)?"variable-2":void 0}function r(t){return function(e,n){for(var r,o=!1;null!=(r=e.next());){if(r==t&&!o){n.tokenize=i;break}o=!o&&"\\"==r}return"string"}}function o(t,e){for(;;){if(!t.skipTo("*")){t.skipToEnd();break}if(t.next(),t.eat("/")){e.tokenize=i;break}}return"comment"}function s(t,e,n){e.context={prev:e.context,indent:t.indentation(),col:t.column(),type:n}}function a(t){t.indent=t.context.indent,t.context=t.context.prev}var l=n.client||{},u=n.atoms||{false:!0,true:!0,null:!0},c=n.builtin||{},d=n.keywords||{},h=n.operatorChars||/^[*+\-%<>!=&|~^]/,p=n.support||{},f=n.hooks||{},m=n.dateSQL||{date:!0,time:!0,timestamp:!0};return{startState:function(){return{tokenize:i,context:null}},token:function(t,e){if(t.sol()&&e.context&&null==e.context.align&&(e.context.align=!1),t.eatSpace())return null;var n=e.tokenize(t,e);if("comment"==n)return n;e.context&&null==e.context.align&&(e.context.align=!0);var i=t.current();return"("==i?s(t,e,")"):"["==i?s(t,e,"]"):e.context&&e.context.type==i&&a(e),n},indent:function(n,i){var r=n.context;if(!r)return t.Pass;var o=i.charAt(0)==r.type;return r.align?r.col+(o?0:1):r.indent+(o?0:e.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:p.commentSlashSlash?"//":p.commentHash?"#":null}}),function(){function e(t){for(var e;null!=(e=t.next());)if("`"==e&&!t.eat("`"))return"variable-2";return t.backUp(t.current().length-1),t.eatWhile(/\w/)?"variable-2":null}function n(t){for(var e;null!=(e=t.next());)if('"'==e&&!t.eat('"'))return"variable-2";return t.backUp(t.current().length-1),t.eatWhile(/\w/)?"variable-2":null}function i(t){return t.eat("@")&&(t.match(/^session\./),t.match(/^local\./),t.match(/^global\./)),t.eat("'")?(t.match(/^.*'/),"variable-2"):t.eat('"')?(t.match(/^.*"/),"variable-2"):t.eat("`")?(t.match(/^.*`/),"variable-2"):t.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function r(t){return t.eat("N")?"atom":t.match(/^[a-zA-Z.#!?]/)?"variable-2":null}function o(t){for(var e={},n=t.split(" "),i=0;i<n.length;++i)e[n[i]]=!0;return e}var s="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";t.defineMIME("text/x-sql",{name:"sql",keywords:o(s+"begin"),builtin:o("bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-mssql",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(s+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec"),builtin:o("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":i}}),t.defineMIME("text/x-mysql",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(s+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),
10
+ builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":i,"`":e,"\\":r}}),t.defineMIME("text/x-mariadb",{name:"sql",client:o("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:o(s+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":i,"`":e,"\\":r}}),t.defineMIME("text/x-sqlite",{name:"sql",client:o("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:o(s+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:o("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:o("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|\/~]/,dateSQL:o("date time timestamp datetime"),support:o("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":i,":":i,"?":i,$:i,'"':n,"`":e}}),t.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:o("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:o("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:o("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:o("commentSlashSlash decimallessFloat"),hooks:{}}),t.defineMIME("text/x-plsql",{name:"sql",client:o("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:o("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:o("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*+\-%<>!=~]/,dateSQL:o("date time timestamp"),support:o("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),t.defineMIME("text/x-hive",{name:"sql",keywords:o("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external false fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger true unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with"),builtin:o("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:o("date timestamp"),support:o("ODBCdotTable doubleQuote binaryNumber hexNumber")}),t.defineMIME("text/x-pgsql",{name:"sql",client:o("source"),keywords:o(s+"a abort abs absent absolute access according action ada add admin after aggregate all allocate also always analyse analyze any are array array_agg array_max_cardinality asensitive assertion assignment asymmetric at atomic attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli binary bit_length blob blocked bom both breadth c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain characteristics characters character_length character_set_catalog character_set_name character_set_schema char_length check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column columns column_name command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constraint constraints constraint_catalog constraint_name constraint_schema constructor contains content continue control conversion convert copy corr corresponding cost covar_pop covar_samp cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datetime_interval_code datetime_interval_precision day db deallocate dec declare default defaults deferrable deferred defined definer degree delimiter delimiters dense_rank depth deref derived describe descriptor deterministic diagnostics dictionary disable discard disconnect dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain dynamic dynamic_function dynamic_function_code each element else empty enable encoding encrypted end end-exec end_frame end_partition enforced enum equals escape event every except exception exclude excluding exclusive exec execute exists exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreign fortran forward found frame_row free freeze fs full function functions fusion g general generated get global go goto grant granted greatest grouping groups handler header hex hierarchy hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import including increment indent index indexes indicator inherit inherits initially inline inner inout input insensitive instance instantiable instead integrity intersect intersection invoker isnull isolation k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like_regex link listen ln load local localtime localtimestamp location locator lock locked logged lower m map mapping match matched materialized max maxvalue max_cardinality member merge message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized nothing notify notnull nowait nth_value ntile null nullable nullif nulls number object occurrences_regex octets octet_length of off offset oids old only open operator option options ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password percent percentile_cont percentile_disc percent_rank period permission placing plans pli policy portion position position_regex power precedes preceding prepare prepared preserve primary prior privileges procedural procedure program public quote range rank read reads reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns revoke right role rollback rollup routine routine_catalog routine_name routine_schema row rows row_count row_number rule savepoint scale schema schema_name scope scope_catalog scope_name scope_schema scroll search second section security selective self sensitive sequence sequences serializable server server_name session session_user setof sets share show similar simple size skip snapshot some source space specific specifictype specific_name sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset substring substring_regex succeeds sum symmetric sysid system system_time system_user t tables tablesample tablespace table_name temp template temporary then ties timezone_hour timezone_minute to token top_level_count trailing transaction transactions_committed transactions_rolled_back transaction_active transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted unique unknown unlink unlisten unlogged unnamed unnest until untyped upper uri usage user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of varbinary variadic var_pop var_samp verbose version versioning view views volatile when whenever whitespace width_bucket window within work wrapper write xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes loop repeat"),builtin:o("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:o("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:o("date time timestamp"),support:o("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),t.defineMIME("text/x-gql",{name:"sql",keywords:o("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:o("false true"),builtin:o("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/})}()})},function(t,e,n){!function(t){t(n(10))}(function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};t.defineMode("xml",function(i,r){function o(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();if("<"==i)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","-->")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(u(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(T=t.eat("/")?"closeTag":"openTag",e.tokenize=s,"tag bracket");if("&"==i){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function s(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=o,T=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return T="equals",null;if("<"==n){e.tokenize=o,e.state=p,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=s;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=o;break}n.next()}return t}}function u(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=u(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=o;break}return n.tokenize=u(t-1),n.tokenize(e,n)}}return"meta"}}function c(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(k.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function d(t){t.context&&(t.context=t.context.prev)}function h(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!k.contextGrabbers.hasOwnProperty(n)||!k.contextGrabbers[n].hasOwnProperty(e))return;d(t)}}function p(t,e,n){return"openTag"==t?(n.tagStart=e.column(),f):"closeTag"==t?m:p}function f(t,e,n){return"word"==t?(n.tagName=e.current(),M="tag",y):(M="error",f)}function m(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&k.implicitlyClosed.hasOwnProperty(n.context.tagName)&&d(n),n.context&&n.context.tagName==i||k.matchClosing===!1?(M="tag",g):(M="tag error",v)}return M="error",v}function g(t,e,n){return"endTag"!=t?(M="error",g):(d(n),p)}function v(t,e,n){return M="error",g(t,e,n)}function y(t,e,n){if("word"==t)return M="attribute",b;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||k.autoSelfClosers.hasOwnProperty(i)?h(n,i):(h(n,i),n.context=new c(n,i,r==n.indented)),p}return M="error",y}function b(t,e,n){return"equals"==t?w:(k.allowMissing||(M="error"),y(t,e,n))}function w(t,e,n){return"string"==t?_:"word"==t&&k.allowUnquoted?(M="string",y):(M="error",y(t,e,n))}function _(t,e,n){return"string"==t?_:y(t,e,n)}var x=i.indentUnit,k={},C=r.htmlMode?e:n;for(var S in C)k[S]=C[S];for(var S in r)k[S]=r[S];var T,M;return o.isInText=!0,{startState:function(t){var e={tokenize:o,state:p,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;T=null;var n=e.tokenize(t,e);return(n||T)&&"comment"!=n&&(M=null,e.state=e.state(T||n,t,e),M&&(n="error"==M?n+" error":M)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+x;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=s&&e.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return k.multilineTagIndentPastTag!==!1?e.tagStart+e.tagName.length+2:e.tagStart+x*(k.multilineTagIndentFactor||1);if(k.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var a=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(a&&a[1])for(;r;){if(r.tagName==a[2]){r=r.prev;break}if(!k.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(a)for(;r;){var l=k.contextGrabbers[r.tagName];if(!l||!l.hasOwnProperty(a[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+x:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml",skipAttribute:function(t){t.state==w&&(t.state=y)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},52,52,52,52,52,52,52,function(t,e){"use strict";function n(t){return t.replace(i,function(t,e){return e.toUpperCase()})}var i=/-(.)/g;t.exports=n},function(t,e,n){"use strict";function i(t){return r(t.replace(o,"ms-"))}var r=n(106),o=/^-ms-/;t.exports=i},function(t,e,n){"use strict";function i(t,e){return!(!t||!e)&&(t===e||!r(t)&&(r(e)?i(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var r=n(116);t.exports=i},function(t,e,n){"use strict";function i(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?s(!1):void 0,"number"!=typeof e?s(!1):void 0,0===e||e-1 in t?void 0:s(!1),"function"==typeof t.callee?s(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),i=0;i<e;i++)n[i]=t[i];return n}function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)}function o(t){return r(t)?Array.isArray(t)?t.slice():i(t):[t]}var s=n(1);t.exports=o},function(t,e,n){"use strict";function i(t){var e=t.match(c);return e&&e[1].toLowerCase()}function r(t,e){var n=u;u?void 0:l(!1);var r=i(t),o=r&&a(r);if(o){n.innerHTML=o[1]+t+o[2];for(var c=o[0];c--;)n=n.lastChild}else n.innerHTML=t;var d=n.getElementsByTagName("script");d.length&&(e?void 0:l(!1),s(d).forEach(e));for(var h=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return h}var o=n(6),s=n(109),a=n(111),l=n(1),u=o.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=r},function(t,e,n){"use strict";function i(t){return s?void 0:o(!1),h.hasOwnProperty(t)||(t="*"),a.hasOwnProperty(t)||("*"===t?s.innerHTML="<link />":s.innerHTML="<"+t+"></"+t+">",a[t]=!s.firstChild),a[t]?h[t]:null}var r=n(6),o=n(1),s=r.canUseDOM?document.createElement("div"):null,a={},l=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],d=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],h={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:l,option:l,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c},p=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];p.forEach(function(t){h[t]=d,a[t]=!0}),t.exports=i},function(t,e){"use strict";function n(t){return t.Window&&t instanceof t.Window?{x:t.pageXOffset||t.document.documentElement.scrollLeft,y:t.pageYOffset||t.document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}t.exports=n},function(t,e){"use strict";function n(t){return t.replace(i,"-$1").toLowerCase()}var i=/([A-Z])/g;t.exports=n},function(t,e,n){"use strict";function i(t){return r(t).replace(o,"-ms-")}var r=n(113),o=/^ms-/;t.exports=i},function(t,e){"use strict";function n(t){var e=t?t.ownerDocument||t:document,n=e.defaultView||window;return!(!t||!("function"==typeof n.Node?t instanceof n.Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e,n){"use strict";function i(t){return r(t)&&3==t.nodeType}var r=n(115);t.exports=i},function(t,e){"use strict";function n(t){var e={};return function(n){return e.hasOwnProperty(n)||(e[n]=t.call(this,n)),e[n]}}t.exports=n},function(t,e){(function(e){function n(t,e,n){function r(e){var n=m,i=g;return m=g=void 0,C=e,y=t.apply(i,n)}function o(t){return C=t,b=setTimeout(c,e),S?r(t):y}function l(t){var n=t-k,i=t-C,r=e-n;return T?_(r,v-i):r}function u(t){var n=t-k,i=t-C;return void 0===k||n>=e||n<0||T&&i>=v}function c(){var t=x();return u(t)?d(t):void(b=setTimeout(c,l(t)))}function d(t){return b=void 0,M&&m?r(t):(m=g=void 0,y)}function h(){void 0!==b&&clearTimeout(b),C=0,m=k=g=b=void 0}function p(){return void 0===b?y:d(x())}function f(){var t=x(),n=u(t);if(m=arguments,g=this,k=t,n){if(void 0===b)return o(k);if(T)return b=setTimeout(c,e),r(k)}return void 0===b&&(b=setTimeout(c,e)),y}var m,g,v,y,b,k,C=0,S=!1,T=!1,M=!0;if("function"!=typeof t)throw new TypeError(a);return e=s(e)||0,i(n)&&(S=!!n.leading,T="maxWait"in n,v=T?w(s(n.maxWait)||0,e):v,M="trailing"in n?!!n.trailing:M),f.cancel=h,f.flush=p,f}function i(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function r(t){return!!t&&"object"==typeof t}function o(t){return"symbol"==typeof t||r(t)&&b.call(t)==u}function s(t){if("number"==typeof t)return t;if(o(t))return l;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(c,"");var n=h.test(t);return n||p.test(t)?f(t.slice(2),n?2:8):d.test(t)?l:+t}var a="Expected a function",l=NaN,u="[object Symbol]",c=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,p=/^0o[0-7]+$/i,f=parseInt,m="object"==typeof e&&e&&e.Object===Object&&e,g="object"==typeof self&&self&&self.Object===Object&&self,v=m||g||Function("return this")(),y=Object.prototype,b=y.toString,w=Math.max,_=Math.min,x=function(){return v.Date.now()};t.exports=n}).call(e,function(){return this}())},function(t,e,n){"use strict";function i(t){var e=new r(r._61);return e._81=1,e._65=t,e}var r=n(57);t.exports=r;var o=i(!0),s=i(!1),a=i(null),l=i(void 0),u=i(0),c=i("");r.resolve=function(t){if(t instanceof r)return t;if(null===t)return a;if(void 0===t)return l;if(t===!0)return o;if(t===!1)return s;if(0===t)return u;if(""===t)return c;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new r(e.bind(t))}catch(t){return new r(function(e,n){n(t)})}return i(t)},r.all=function(t){var e=Array.prototype.slice.call(t);return new r(function(t,n){function i(s,a){if(a&&("object"==typeof a||"function"==typeof a)){if(a instanceof r&&a.then===r.prototype.then){for(;3===a._81;)a=a._65;return 1===a._81?i(s,a._65):(2===a._81&&n(a._65),void a.then(function(t){i(s,t)},n))}var l=a.then;if("function"==typeof l){var u=new r(l.bind(a));return void u.then(function(t){i(s,t)},n)}}e[s]=a,0===--o&&t(e)}if(0===e.length)return t([]);for(var o=e.length,s=0;s<e.length;s++)i(s,e[s])})},r.reject=function(t){return new r(function(e,n){n(t)})},r.race=function(t){return new r(function(e,n){t.forEach(function(t){r.resolve(t).then(e,n)})})},r.prototype.catch=function(t){return this.then(null,t)}},function(t,e,n){"use strict";function i(){u=!1,a._10=null,a._97=null}function r(t){function e(e){(t.allRejections||s(d[e].error,t.whitelist||l))&&(d[e].displayId=c++,t.onUnhandled?(d[e].logged=!0,t.onUnhandled(d[e].displayId,d[e].error)):(d[e].logged=!0,o(d[e].displayId,d[e].error)))}function n(e){d[e].logged&&(t.onHandled?t.onHandled(d[e].displayId,d[e].error):d[e].onUnhandled||(console.warn("Promise Rejection Handled (id: "+d[e].displayId+"):"),
11
+ console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+d[e].displayId+".")))}t=t||{},u&&i(),u=!0;var r=0,c=0,d={};a._10=function(t){2===t._81&&d[t._72]&&(d[t._72].logged?n(t._72):clearTimeout(d[t._72].timeout),delete d[t._72])},a._97=function(t,n){0===t._45&&(t._72=r++,d[t._72]={displayId:null,error:n,timeout:setTimeout(e.bind(null,t._72),s(n,l)?100:2e3),logged:!1})}}function o(t,e){console.warn("Possible Unhandled Promise Rejection (id: "+t+"):");var n=(e&&(e.stack||e))+"";n.split("\n").forEach(function(t){console.warn(" "+t)})}function s(t,e){return e.some(function(e){return t instanceof e})}var a=n(57),l=[ReferenceError,TypeError,RangeError],u=!1;e.disable=i,e.enable=r},function(t,e,n){"use strict";function i(t,e,n,i,r){}t.exports=i},function(t,e,n){"use strict";var i=n(7),r=n(1),o=(n(2),n(123)),s=n(121);t.exports=function(t,e){function n(t){var e=t&&(S&&t[S]||t[T]);if("function"==typeof e)return e}function a(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}function l(t){this.message=t,this.stack=""}function u(t){function n(n,i,s,a,u,c,d){if(a=a||M,c=c||s,d!==o)if(e)r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else;return null==i[s]?n?new l(null===i[s]?"The "+u+" `"+c+"` is marked as required "+("in `"+a+"`, but its value is `null`."):"The "+u+" `"+c+"` is marked as required in "+("`"+a+"`, but its value is `undefined`.")):null:t(i,s,a,u,c)}var i=n.bind(null,!1);return i.isRequired=n.bind(null,!0),i}function c(t){function e(e,n,i,r,o,s){var a=e[n],u=x(a);if(u!==t){var c=k(a);return new l("Invalid "+r+" `"+o+"` of type "+("`"+c+"` supplied to `"+i+"`, expected ")+("`"+t+"`."))}return null}return u(e)}function d(){return u(i.thatReturnsNull)}function h(t){function e(e,n,i,r,s){if("function"!=typeof t)return new l("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var a=e[n];if(!Array.isArray(a)){var u=x(a);return new l("Invalid "+r+" `"+s+"` of type "+("`"+u+"` supplied to `"+i+"`, expected an array."))}for(var c=0;c<a.length;c++){var d=t(a,c,i,r,s+"["+c+"]",o);if(d instanceof Error)return d}return null}return u(e)}function p(){function e(e,n,i,r,o){var s=e[n];if(!t(s)){var a=x(s);return new l("Invalid "+r+" `"+o+"` of type "+("`"+a+"` supplied to `"+i+"`, expected a single ReactElement."))}return null}return u(e)}function f(t){function e(e,n,i,r,o){if(!(e[n]instanceof t)){var s=t.name||M,a=C(e[n]);return new l("Invalid "+r+" `"+o+"` of type "+("`"+a+"` supplied to `"+i+"`, expected ")+("instance of `"+s+"`."))}return null}return u(e)}function m(t){function e(e,n,i,r,o){for(var s=e[n],u=0;u<t.length;u++)if(a(s,t[u]))return null;var c=JSON.stringify(t);return new l("Invalid "+r+" `"+o+"` of value `"+s+"` "+("supplied to `"+i+"`, expected one of "+c+"."))}return Array.isArray(t)?u(e):i.thatReturnsNull}function g(t){function e(e,n,i,r,s){if("function"!=typeof t)return new l("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var a=e[n],u=x(a);if("object"!==u)return new l("Invalid "+r+" `"+s+"` of type "+("`"+u+"` supplied to `"+i+"`, expected an object."));for(var c in a)if(a.hasOwnProperty(c)){var d=t(a,c,i,r,s+"."+c,o);if(d instanceof Error)return d}return null}return u(e)}function v(t){function e(e,n,i,r,s){for(var a=0;a<t.length;a++){var u=t[a];if(null==u(e,n,i,r,s,o))return null}return new l("Invalid "+r+" `"+s+"` supplied to "+("`"+i+"`."))}return Array.isArray(t)?u(e):i.thatReturnsNull}function y(){function t(t,e,n,i,r){return w(t[e])?null:new l("Invalid "+i+" `"+r+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return u(t)}function b(t){function e(e,n,i,r,s){var a=e[n],u=x(a);if("object"!==u)return new l("Invalid "+r+" `"+s+"` of type `"+u+"` "+("supplied to `"+i+"`, expected `object`."));for(var c in t){var d=t[c];if(d){var h=d(a,c,i,r,s+"."+c,o);if(h)return h}}return null}return u(e)}function w(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(w);if(null===e||t(e))return!0;var i=n(e);if(!i)return!1;var r,o=i.call(e);if(i!==e.entries){for(;!(r=o.next()).done;)if(!w(r.value))return!1}else for(;!(r=o.next()).done;){var s=r.value;if(s&&!w(s[1]))return!1}return!0;default:return!1}}function _(t,e){return"symbol"===t||("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}function x(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":_(e,t)?"symbol":e}function k(t){var e=x(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function C(t){return t.constructor&&t.constructor.name?t.constructor.name:M}var S="function"==typeof Symbol&&Symbol.iterator,T="@@iterator",M="<<anonymous>>",D={array:c("array"),bool:c("boolean"),func:c("function"),number:c("number"),object:c("object"),string:c("string"),symbol:c("symbol"),any:d(),arrayOf:h,element:p(),instanceOf:f,node:y(),objectOf:g,oneOf:m,oneOfType:v,shape:b};return l.prototype=Error.prototype,D.checkPropTypes=s,D.PropTypes=D,D}},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";var n={Properties:{"aria-current":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},DOMAttributeNames:{},DOMPropertyNames:{}};t.exports=n},function(t,e,n){"use strict";var i=n(5),r=n(54),o={focusDOMComponent:function(){r(i.getNodeFromInstance(this))}};t.exports=o},function(t,e,n){"use strict";function i(){var t=window.opera;return"object"==typeof t&&"function"==typeof t.version&&parseInt(t.version(),10)<=12}function r(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}function o(t){switch(t){case"topCompositionStart":return T.compositionStart;case"topCompositionEnd":return T.compositionEnd;case"topCompositionUpdate":return T.compositionUpdate}}function s(t,e){return"topKeyDown"===t&&e.keyCode===b}function a(t,e){switch(t){case"topKeyUp":return y.indexOf(e.keyCode)!==-1;case"topKeyDown":return e.keyCode!==b;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function l(t){var e=t.detail;return"object"==typeof e&&"data"in e?e.data:null}function u(t,e,n,i){var r,u;if(w?r=o(t):D?a(t,n)&&(r=T.compositionEnd):s(t,n)&&(r=T.compositionStart),!r)return null;k&&(D||r!==T.compositionStart?r===T.compositionEnd&&D&&(u=D.getData()):D=m.getPooled(i));var c=g.getPooled(r,e,n,i);if(u)c.data=u;else{var d=l(n);null!==d&&(c.data=d)}return p.accumulateTwoPhaseDispatches(c),c}function c(t,e){switch(t){case"topCompositionEnd":return l(e);case"topKeyPress":var n=e.which;return n!==C?null:(M=!0,S);case"topTextInput":var i=e.data;return i===S&&M?null:i;default:return null}}function d(t,e){if(D){if("topCompositionEnd"===t||!w&&a(t,e)){var n=D.getData();return m.release(D),D=null,n}return null}switch(t){case"topPaste":return null;case"topKeyPress":return e.which&&!r(e)?String.fromCharCode(e.which):null;case"topCompositionEnd":return k?null:e.data;default:return null}}function h(t,e,n,i){var r;if(r=x?c(t,n):d(t,n),!r)return null;var o=v.getPooled(T.beforeInput,e,n,i);return o.data=r,p.accumulateTwoPhaseDispatches(o),o}var p=n(23),f=n(6),m=n(132),g=n(169),v=n(172),y=[9,13,27,32],b=229,w=f.canUseDOM&&"CompositionEvent"in window,_=null;f.canUseDOM&&"documentMode"in document&&(_=document.documentMode);var x=f.canUseDOM&&"TextEvent"in window&&!_&&!i(),k=f.canUseDOM&&(!w||_&&_>8&&_<=11),C=32,S=String.fromCharCode(C),T={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},M=!1,D=null,E={eventTypes:T,extractEvents:function(t,e,n,i){return[u(t,e,n,i),h(t,e,n,i)]}};t.exports=E},function(t,e,n){"use strict";var i=n(60),r=n(6),o=(n(8),n(107),n(178)),s=n(114),a=n(117),l=(n(2),a(function(t){return s(t)})),u=!1,c="cssFloat";if(r.canUseDOM){var d=document.createElement("div").style;try{d.font=""}catch(t){u=!0}void 0===document.documentElement.style.cssFloat&&(c="styleFloat")}var h={createMarkupForStyles:function(t,e){var n="";for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];null!=r&&(n+=l(i)+":",n+=o(i,r,e)+";")}return n||null},setValueForStyles:function(t,e,n){var r=t.style;for(var s in e)if(e.hasOwnProperty(s)){var a=o(s,e[s],n);if("float"!==s&&"cssFloat"!==s||(s=c),a)r[s]=a;else{var l=u&&i.shorthandPropertyExpansions[s];if(l)for(var d in l)r[d]="";else r[s]=""}}}};t.exports=h},function(t,e,n){"use strict";function i(t){var e=t.nodeName&&t.nodeName.toLowerCase();return"select"===e||"input"===e&&"file"===t.type}function r(t){var e=C.getPooled(D.change,O,t,S(t));w.accumulateTwoPhaseDispatches(e),k.batchedUpdates(o,e)}function o(t){b.enqueueEvents(t),b.processEventQueue(!1)}function s(t,e){E=t,O=e,E.attachEvent("onchange",r)}function a(){E&&(E.detachEvent("onchange",r),E=null,O=null)}function l(t,e){if("topChange"===t)return e}function u(t,e,n){"topFocus"===t?(a(),s(e,n)):"topBlur"===t&&a()}function c(t,e){E=t,O=e,P=t.value,N=Object.getOwnPropertyDescriptor(t.constructor.prototype,"value"),Object.defineProperty(E,"value",L),E.attachEvent?E.attachEvent("onpropertychange",h):E.addEventListener("propertychange",h,!1)}function d(){E&&(delete E.value,E.detachEvent?E.detachEvent("onpropertychange",h):E.removeEventListener("propertychange",h,!1),E=null,O=null,P=null,N=null)}function h(t){if("value"===t.propertyName){var e=t.srcElement.value;e!==P&&(P=e,r(t))}}function p(t,e){if("topInput"===t)return e}function f(t,e,n){"topFocus"===t?(d(),c(e,n)):"topBlur"===t&&d()}function m(t,e){if(("topSelectionChange"===t||"topKeyUp"===t||"topKeyDown"===t)&&E&&E.value!==P)return P=E.value,O}function g(t){return t.nodeName&&"input"===t.nodeName.toLowerCase()&&("checkbox"===t.type||"radio"===t.type)}function v(t,e){if("topClick"===t)return e}function y(t,e){if(null!=t){var n=t._wrapperState||e._wrapperState;if(n&&n.controlled&&"number"===e.type){var i=""+e.value;e.getAttribute("value")!==i&&e.setAttribute("value",i)}}}var b=n(22),w=n(23),_=n(6),x=n(5),k=n(9),C=n(11),S=n(45),T=n(46),M=n(77),D={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:["topBlur","topChange","topClick","topFocus","topInput","topKeyDown","topKeyUp","topSelectionChange"]}},E=null,O=null,P=null,N=null,A=!1;_.canUseDOM&&(A=T("change")&&(!document.documentMode||document.documentMode>8));var I=!1;_.canUseDOM&&(I=T("input")&&(!document.documentMode||document.documentMode>11));var L={get:function(){return N.get.call(this)},set:function(t){P=""+t,N.set.call(this,t)}},R={eventTypes:D,extractEvents:function(t,e,n,r){var o,s,a=e?x.getNodeFromInstance(e):window;if(i(a)?A?o=l:s=u:M(a)?I?o=p:(o=m,s=f):g(a)&&(o=v),o){var c=o(t,e);if(c){var d=C.getPooled(D.change,c,n,r);return d.type="change",w.accumulateTwoPhaseDispatches(d),d}}s&&s(t,a,e),"topBlur"===t&&y(e,a)}};t.exports=R},function(t,e,n){"use strict";var i=n(3),r=n(15),o=n(6),s=n(110),a=n(7),l=(n(1),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(o.canUseDOM?void 0:i("56"),e?void 0:i("57"),"HTML"===t.nodeName?i("58"):void 0,"string"==typeof e){var n=s(e,a)[0];t.parentNode.replaceChild(n,t)}else r.replaceChildWithTree(t,e)}});t.exports=l},function(t,e){"use strict";var n=["ResponderEventPlugin","SimpleEventPlugin","TapEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin"];t.exports=n},function(t,e,n){"use strict";var i=n(23),r=n(5),o=n(27),s={mouseEnter:{registrationName:"onMouseEnter",dependencies:["topMouseOut","topMouseOver"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["topMouseOut","topMouseOver"]}},a={eventTypes:s,extractEvents:function(t,e,n,a){if("topMouseOver"===t&&(n.relatedTarget||n.fromElement))return null;if("topMouseOut"!==t&&"topMouseOver"!==t)return null;var l;if(a.window===a)l=a;else{var u=a.ownerDocument;l=u?u.defaultView||u.parentWindow:window}var c,d;if("topMouseOut"===t){c=e;var h=n.relatedTarget||n.toElement;d=h?r.getClosestInstanceFromNode(h):null}else c=null,d=e;if(c===d)return null;var p=null==c?l:r.getNodeFromInstance(c),f=null==d?l:r.getNodeFromInstance(d),m=o.getPooled(s.mouseLeave,c,n,a);m.type="mouseleave",m.target=p,m.relatedTarget=f;var g=o.getPooled(s.mouseEnter,d,n,a);return g.type="mouseenter",g.target=f,g.relatedTarget=p,i.accumulateEnterLeaveDispatches(m,g,c,d),[m,g]}};t.exports=a},function(t,e,n){"use strict";function i(t){this._root=t,this._startText=this.getText(),this._fallbackText=null}var r=n(4),o=n(14),s=n(75);r(i.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[s()]},getData:function(){if(this._fallbackText)return this._fallbackText;var t,e,n=this._startText,i=n.length,r=this.getText(),o=r.length;for(t=0;t<i&&n[t]===r[t];t++);var s=i-t;for(e=1;e<=s&&n[i-e]===r[o-e];e++);var a=e>1?1-e:void 0;return this._fallbackText=r.slice(t,a),this._fallbackText}}),o.addPoolingTo(i),t.exports=i},function(t,e,n){"use strict";var i=n(16),r=i.injection.MUST_USE_PROPERTY,o=i.injection.HAS_BOOLEAN_VALUE,s=i.injection.HAS_NUMERIC_VALUE,a=i.injection.HAS_POSITIVE_NUMERIC_VALUE,l=i.injection.HAS_OVERLOADED_BOOLEAN_VALUE,u={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+i.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:o,allowTransparency:0,alt:0,as:0,async:o,autoComplete:0,autoPlay:o,capture:o,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:r|o,cite:0,classID:0,className:0,cols:a,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:o,coords:0,crossOrigin:0,data:0,dateTime:0,default:o,defer:o,dir:0,disabled:o,download:l,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:o,formTarget:0,frameBorder:0,headers:0,height:0,hidden:o,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:o,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:r|o,muted:r|o,name:0,nonce:0,noValidate:o,open:o,optimum:0,pattern:0,placeholder:0,playsInline:o,poster:0,preload:0,profile:0,radioGroup:0,readOnly:o,referrerPolicy:0,rel:0,required:o,reversed:o,role:0,rows:a,rowSpan:s,sandbox:0,scope:0,scoped:o,scrolling:0,seamless:o,selected:r|o,shape:0,size:a,sizes:0,span:a,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:s,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:o,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{},DOMMutationMethods:{value:function(t,e){return null==e?t.removeAttribute("value"):void("number"!==t.type||t.hasAttribute("value")===!1?t.setAttribute("value",""+e):t.validity&&!t.validity.badInput&&t.ownerDocument.activeElement!==t&&t.setAttribute("value",""+e))}}};t.exports=u},function(t,e,n){(function(e){"use strict";function i(t,e,n,i){var r=void 0===t[n];null!=e&&r&&(t[n]=o(e,!0))}var r=n(17),o=n(76),s=(n(37),n(47)),a=n(79),l=(n(2),{instantiateChildren:function(t,e,n,r){if(null==t)return null;var o={};return a(t,i,o),o},updateChildren:function(t,e,n,i,a,l,u,c,d){if(e||t){var h,p;for(h in e)if(e.hasOwnProperty(h)){p=t&&t[h];var f=p&&p._currentElement,m=e[h];if(null!=p&&s(f,m))r.receiveComponent(p,m,a,c),e[h]=p;else{p&&(i[h]=r.getHostNode(p),r.unmountComponent(p,!1));var g=o(m,!0);e[h]=g;var v=r.mountComponent(g,a,l,u,c,d);n.push(v)}}for(h in t)!t.hasOwnProperty(h)||e&&e.hasOwnProperty(h)||(p=t[h],i[h]=r.getHostNode(p),r.unmountComponent(p,!1))}},unmountChildren:function(t,e){for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];r.unmountComponent(i,e)}}});t.exports=l}).call(e,n(56))},function(t,e,n){"use strict";var i=n(33),r=n(142),o={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup};t.exports=o},function(t,e,n){"use strict";function i(t){}function r(t,e){}function o(t){return!(!t.prototype||!t.prototype.isReactComponent)}function s(t){return!(!t.prototype||!t.prototype.isPureReactComponent)}var a=n(3),l=n(4),u=n(18),c=n(39),d=n(12),h=n(40),p=n(24),f=(n(8),n(70)),m=n(17),g=n(21),v=(n(1),n(31)),y=n(47),b=(n(2),{ImpureClass:0,PureClass:1,StatelessFunctional:2});i.prototype.render=function(){var t=p.get(this)._currentElement.type,e=t(this.props,this.context,this.updater);return r(t,e),e};var w=1,_={construct:function(t){this._currentElement=t,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(t,e,n,l){this._context=l,this._mountOrder=w++,this._hostParent=e,this._hostContainerInfo=n;var c,d=this._currentElement.props,h=this._processContext(l),f=this._currentElement.type,m=t.getUpdateQueue(),v=o(f),y=this._constructComponent(v,d,h,m);v||null!=y&&null!=y.render?s(f)?this._compositeType=b.PureClass:this._compositeType=b.ImpureClass:(c=y,r(f,c),null===y||y===!1||u.isValidElement(y)?void 0:a("105",f.displayName||f.name||"Component"),y=new i(f),this._compositeType=b.StatelessFunctional);y.props=d,y.context=h,y.refs=g,y.updater=m,this._instance=y,p.set(y,this);var _=y.state;void 0===_&&(y.state=_=null),"object"!=typeof _||Array.isArray(_)?a("106",this.getName()||"ReactCompositeComponent"):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var x;return x=y.unstable_handleError?this.performInitialMountWithErrorHandling(c,e,n,t,l):this.performInitialMount(c,e,n,t,l),y.componentDidMount&&t.getReactMountReady().enqueue(y.componentDidMount,y),x},_constructComponent:function(t,e,n,i){return this._constructComponentWithoutOwner(t,e,n,i)},_constructComponentWithoutOwner:function(t,e,n,i){var r=this._currentElement.type;return t?new r(e,n,i):r(e,n,i)},performInitialMountWithErrorHandling:function(t,e,n,i,r){var o,s=i.checkpoint();try{o=this.performInitialMount(t,e,n,i,r)}catch(a){i.rollback(s),this._instance.unstable_handleError(a),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),s=i.checkpoint(),this._renderedComponent.unmountComponent(!0),i.rollback(s),o=this.performInitialMount(t,e,n,i,r)}return o},performInitialMount:function(t,e,n,i,r){var o=this._instance,s=0;o.componentWillMount&&(o.componentWillMount(),this._pendingStateQueue&&(o.state=this._processPendingState(o.props,o.context))),void 0===t&&(t=this._renderValidatedComponent());var a=f.getType(t);this._renderedNodeType=a;var l=this._instantiateReactComponent(t,a!==f.EMPTY);this._renderedComponent=l;var u=m.mountComponent(l,i,e,n,this._processChildContext(r),s);return u},getHostNode:function(){return m.getHostNode(this._renderedComponent)},unmountComponent:function(t){if(this._renderedComponent){var e=this._instance;if(e.componentWillUnmount&&!e._calledComponentWillUnmount)if(e._calledComponentWillUnmount=!0,t){var n=this.getName()+".componentWillUnmount()";h.invokeGuardedCallback(n,e.componentWillUnmount.bind(e))}else e.componentWillUnmount();this._renderedComponent&&(m.unmountComponent(this._renderedComponent,t),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,p.remove(e)}},_maskContext:function(t){var e=this._currentElement.type,n=e.contextTypes;if(!n)return g;var i={};for(var r in n)i[r]=t[r];return i},_processContext:function(t){var e=this._maskContext(t);return e},_processChildContext:function(t){var e,n=this._currentElement.type,i=this._instance;if(i.getChildContext&&(e=i.getChildContext()),e){"object"!=typeof n.childContextTypes?a("107",this.getName()||"ReactCompositeComponent"):void 0;for(var r in e)r in n.childContextTypes?void 0:a("108",this.getName()||"ReactCompositeComponent",r);return l({},t,e)}return t},_checkContextTypes:function(t,e,n){},receiveComponent:function(t,e,n){var i=this._currentElement,r=this._context;this._pendingElement=null,this.updateComponent(e,i,t,r,n)},performUpdateIfNecessary:function(t){null!=this._pendingElement?m.receiveComponent(this,this._pendingElement,t,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(t,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(t,e,n,i,r){var o=this._instance;null==o?a("136",this.getName()||"ReactCompositeComponent"):void 0;var s,l=!1;this._context===r?s=o.context:(s=this._processContext(r),l=!0);var u=e.props,c=n.props;e!==n&&(l=!0),l&&o.componentWillReceiveProps&&o.componentWillReceiveProps(c,s);var d=this._processPendingState(c,s),h=!0;this._pendingForceUpdate||(o.shouldComponentUpdate?h=o.shouldComponentUpdate(c,d,s):this._compositeType===b.PureClass&&(h=!v(u,c)||!v(o.state,d))),this._updateBatchNumber=null,h?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,c,d,s,t,r)):(this._currentElement=n,this._context=r,o.props=c,o.state=d,o.context=s)},_processPendingState:function(t,e){var n=this._instance,i=this._pendingStateQueue,r=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!i)return n.state;if(r&&1===i.length)return i[0];for(var o=l({},r?i[0]:n.state),s=r?1:0;s<i.length;s++){var a=i[s];l(o,"function"==typeof a?a.call(n,o,t,e):a)}return o},_performComponentUpdate:function(t,e,n,i,r,o){var s,a,l,u=this._instance,c=Boolean(u.componentDidUpdate);c&&(s=u.props,a=u.state,l=u.context),u.componentWillUpdate&&u.componentWillUpdate(e,n,i),this._currentElement=t,this._context=o,u.props=e,u.state=n,u.context=i,this._updateRenderedComponent(r,o),c&&r.getReactMountReady().enqueue(u.componentDidUpdate.bind(u,s,a,l),u)},_updateRenderedComponent:function(t,e){var n=this._renderedComponent,i=n._currentElement,r=this._renderValidatedComponent(),o=0;if(y(i,r))m.receiveComponent(n,r,t,this._processChildContext(e));else{var s=m.getHostNode(n);m.unmountComponent(n,!1);var a=f.getType(r);this._renderedNodeType=a;var l=this._instantiateReactComponent(r,a!==f.EMPTY);this._renderedComponent=l;var u=m.mountComponent(l,t,this._hostParent,this._hostContainerInfo,this._processChildContext(e),o);this._replaceNodeWithMarkup(s,u,n)}},_replaceNodeWithMarkup:function(t,e,n){c.replaceNodeWithMarkup(t,e,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var t,e=this._instance;return t=e.render()},_renderValidatedComponent:function(){var t;if(this._compositeType!==b.StatelessFunctional){d.current=this;try{t=this._renderValidatedComponentWithoutOwnerOrContext()}finally{d.current=null}}else t=this._renderValidatedComponentWithoutOwnerOrContext();return null===t||t===!1||u.isValidElement(t)?void 0:a("109",this.getName()||"ReactCompositeComponent"),t},attachRef:function(t,e){var n=this.getPublicInstance();null==n?a("110"):void 0;var i=e.getPublicInstance(),r=n.refs===g?n.refs={}:n.refs;r[t]=i},detachRef:function(t){var e=this.getPublicInstance().refs;delete e[t]},getName:function(){var t=this._currentElement.type,e=this._instance&&this._instance.constructor;return t.displayName||e&&e.displayName||t.name||e&&e.name||null},getPublicInstance:function(){var t=this._instance;return this._compositeType===b.StatelessFunctional?null:t},_instantiateReactComponent:null};t.exports=_},function(t,e,n){"use strict";var i=n(5),r=n(150),o=n(69),s=n(17),a=n(9),l=n(163),u=n(179),c=n(74),d=n(186);n(2);r.inject();var h={findDOMNode:u,render:o.render,unmountComponentAtNode:o.unmountComponentAtNode,version:l,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:d};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:i.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=c(t)),t?i.getNodeFromInstance(t):null}},Mount:o,Reconciler:s});t.exports=h},function(t,e,n){"use strict";function i(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function r(t,e){e&&(K[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?m("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?m("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&U in e.dangerouslySetInnerHTML?void 0:m("61")),null!=e.style&&"object"!=typeof e.style?m("62",i(t)):void 0)}function o(t,e,n,i){if(!(i instanceof A)){var r=t._hostContainerInfo,o=r._node&&r._node.nodeType===Y,a=o?r._node:r._ownerDocument;j(e,a),i.getReactMountReady().enqueue(s,{inst:t,registrationName:e,listener:n})}}function s(){var t=this;k.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;D.postMountWrapper(t)}function l(){var t=this;P.postMountWrapper(t)}function u(){var t=this;E.postMountWrapper(t)}function c(){var t=this;t._rootNodeID?void 0:m("63");var e=F(t);switch(e?void 0:m("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[S.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in V)V.hasOwnProperty(n)&&t._wrapperState.listeners.push(S.trapBubbledEvent(n,V[n],e));break;case"source":t._wrapperState.listeners=[S.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[S.trapBubbledEvent("topError","error",e),S.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[S.trapBubbledEvent("topReset","reset",e),S.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[S.trapBubbledEvent("topInvalid","invalid",e)]}}function d(){O.postUpdateWrapper(this)}function h(t){Z.call($,t)||(X.test(t)?void 0:m("65",t),$[t]=!0)}function p(t,e){return t.indexOf("-")>=0||null!=e.is}function f(t){var e=t.type;h(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var m=n(3),g=n(4),v=n(125),y=n(127),b=n(15),w=n(34),_=n(16),x=n(62),k=n(22),C=n(35),S=n(26),T=n(63),M=n(5),D=n(143),E=n(144),O=n(64),P=n(147),N=(n(8),n(156)),A=n(161),I=(n(7),n(29)),L=(n(1),n(46),n(31),n(48),n(2),T),R=k.deleteListener,F=M.getNodeFromInstance,j=S.listenTo,H=C.registrationNameModules,W={string:!0,number:!0},z="style",U="__html",B={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},Y=11,V={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},q={listing:!0,pre:!0,textarea:!0},K=g({menuitem:!0},G),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,$={},Z={}.hasOwnProperty,Q=1;f.displayName="ReactDOMComponent",f.Mixin={mountComponent:function(t,e,n,i){this._rootNodeID=Q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var o=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(c,this);break;case"input":D.mountWrapper(this,o,e),o=D.getHostProps(this,o),t.getReactMountReady().enqueue(c,this);break;case"option":E.mountWrapper(this,o,e),o=E.getHostProps(this,o);break;case"select":O.mountWrapper(this,o,e),o=O.getHostProps(this,o),t.getReactMountReady().enqueue(c,this);break;case"textarea":P.mountWrapper(this,o,e),o=P.getHostProps(this,o),t.getReactMountReady().enqueue(c,this)}r(this,o);var s,d;null!=e?(s=e._namespaceURI,d=e._tag):n._tag&&(s=n._namespaceURI,d=n._tag),(null==s||s===w.svg&&"foreignobject"===d)&&(s=w.html),s===w.html&&("svg"===this._tag?s=w.svg:"math"===this._tag&&(s=w.mathml)),this._namespaceURI=s;var h;if(t.useCreateElement){var p,f=n._ownerDocument;if(s===w.html)if("script"===this._tag){var m=f.createElement("div"),g=this._currentElement.type;m.innerHTML="<"+g+"></"+g+">",p=m.removeChild(m.firstChild)}else p=o.is?f.createElement(this._currentElement.type,o.is):f.createElement(this._currentElement.type);else p=f.createElementNS(s,this._currentElement.type);M.precacheNode(this,p),this._flags|=L.hasCachedChildNodes,this._hostParent||x.setAttributeForRoot(p),this._updateDOMProperties(null,o,t);var y=b(p);this._createInitialChildren(t,o,i,y),h=y}else{var _=this._createOpenTagMarkupAndPutListeners(t,o),k=this._createContentMarkup(t,o,i);h=!k&&G[this._tag]?_+"/>":_+">"+k+"</"+this._currentElement.type+">"}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),o.autoFocus&&t.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(l,this),o.autoFocus&&t.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"select":o.autoFocus&&t.getReactMountReady().enqueue(v.focusDOMComponent,this);break;case"button":o.autoFocus&&t.getReactMountReady().enqueue(v.focusDOMComponent,this);
12
+ break;case"option":t.getReactMountReady().enqueue(u,this)}return h},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(null!=r)if(H.hasOwnProperty(i))r&&o(this,i,r,t);else{i===z&&(r&&(r=this._previousStyleCopy=g({},e.style)),r=y.createMarkupForStyles(r,this));var s=null;null!=this._tag&&p(this._tag,e)?B.hasOwnProperty(i)||(s=x.createMarkupForCustomAttribute(i,r)):s=x.createMarkupForProperty(i,r),s&&(n+=" "+s)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+x.createMarkupForRoot()),n+=" "+x.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var i="",r=e.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&(i=r.__html);else{var o=W[typeof e.children]?e.children:null,s=null!=o?null:e.children;if(null!=o)i=I(o);else if(null!=s){var a=this.mountChildren(s,t,n);i=a.join("")}}return q[this._tag]&&"\n"===i.charAt(0)?"\n"+i:i},_createInitialChildren:function(t,e,n,i){var r=e.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&b.queueHTML(i,r.__html);else{var o=W[typeof e.children]?e.children:null,s=null!=o?null:e.children;if(null!=o)""!==o&&b.queueText(i,o);else if(null!=s)for(var a=this.mountChildren(s,t,n),l=0;l<a.length;l++)b.queueChild(i,a[l])}},receiveComponent:function(t,e,n){var i=this._currentElement;this._currentElement=t,this.updateComponent(e,i,t,n)},updateComponent:function(t,e,n,i){var o=e.props,s=this._currentElement.props;switch(this._tag){case"input":o=D.getHostProps(this,o),s=D.getHostProps(this,s);break;case"option":o=E.getHostProps(this,o),s=E.getHostProps(this,s);break;case"select":o=O.getHostProps(this,o),s=O.getHostProps(this,s);break;case"textarea":o=P.getHostProps(this,o),s=P.getHostProps(this,s)}switch(r(this,s),this._updateDOMProperties(o,s,t),this._updateDOMChildren(o,s,t,i),this._tag){case"input":D.updateWrapper(this);break;case"textarea":P.updateWrapper(this);break;case"select":t.getReactMountReady().enqueue(d,this)}},_updateDOMProperties:function(t,e,n){var i,r,s;for(i in t)if(!e.hasOwnProperty(i)&&t.hasOwnProperty(i)&&null!=t[i])if(i===z){var a=this._previousStyleCopy;for(r in a)a.hasOwnProperty(r)&&(s=s||{},s[r]="");this._previousStyleCopy=null}else H.hasOwnProperty(i)?t[i]&&R(this,i):p(this._tag,t)?B.hasOwnProperty(i)||x.deleteValueForAttribute(F(this),i):(_.properties[i]||_.isCustomAttribute(i))&&x.deleteValueForProperty(F(this),i);for(i in e){var l=e[i],u=i===z?this._previousStyleCopy:null!=t?t[i]:void 0;if(e.hasOwnProperty(i)&&l!==u&&(null!=l||null!=u))if(i===z)if(l?l=this._previousStyleCopy=g({},l):this._previousStyleCopy=null,u){for(r in u)!u.hasOwnProperty(r)||l&&l.hasOwnProperty(r)||(s=s||{},s[r]="");for(r in l)l.hasOwnProperty(r)&&u[r]!==l[r]&&(s=s||{},s[r]=l[r])}else s=l;else if(H.hasOwnProperty(i))l?o(this,i,l,n):u&&R(this,i);else if(p(this._tag,e))B.hasOwnProperty(i)||x.setValueForAttribute(F(this),i,l);else if(_.properties[i]||_.isCustomAttribute(i)){var c=F(this);null!=l?x.setValueForProperty(c,i,l):x.deleteValueForProperty(c,i)}}s&&y.setValueForStyles(F(this),s,this)},_updateDOMChildren:function(t,e,n,i){var r=W[typeof t.children]?t.children:null,o=W[typeof e.children]?e.children:null,s=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,l=null!=r?null:t.children,u=null!=o?null:e.children,c=null!=r||null!=s,d=null!=o||null!=a;null!=l&&null==u?this.updateChildren(null,n,i):c&&!d&&this.updateTextContent(""),null!=o?r!==o&&this.updateTextContent(""+o):null!=a?s!==a&&this.updateMarkup(""+a):null!=u&&this.updateChildren(u,n,i)},getHostNode:function(){return F(this)},unmountComponent:function(t){switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":var e=this._wrapperState.listeners;if(e)for(var n=0;n<e.length;n++)e[n].remove();break;case"html":case"head":case"body":m("66",this._tag)}this.unmountChildren(t),M.uncacheNode(this),k.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null},getPublicInstance:function(){return F(this)}},g(f.prototype,f.Mixin,N.Mixin),t.exports=f},function(t,e,n){"use strict";function i(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===r?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var r=(n(48),9);t.exports=i},function(t,e,n){"use strict";var i=n(4),r=n(15),o=n(5),s=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};i(s.prototype,{mountComponent:function(t,e,n,i){var s=n._idCounter++;this._domID=s,this._hostParent=e,this._hostContainerInfo=n;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var l=n._ownerDocument,u=l.createComment(a);return o.precacheNode(this,u),r(u)}return t.renderToStaticMarkup?"":"<!--"+a+"-->"},receiveComponent:function(){},getHostNode:function(){return o.getNodeFromInstance(this)},unmountComponent:function(){o.uncacheNode(this)}}),t.exports=s},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var i=n(33),r=n(5),o={dangerouslyProcessChildrenUpdates:function(t,e){var n=r.getNodeFromInstance(t);i.processUpdates(n,e)}};t.exports=o},function(t,e,n){"use strict";function i(){this._rootNodeID&&h.updateWrapper(this)}function r(t){var e="checkbox"===t.type||"radio"===t.type;return e?null!=t.checked:null!=t.value}function o(t){var e=this._currentElement.props,n=u.executeOnChange(e,t);d.asap(i,this);var r=e.name;if("radio"===e.type&&null!=r){for(var o=c.getNodeFromInstance(this),a=o;a.parentNode;)a=a.parentNode;for(var l=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),h=0;h<l.length;h++){var p=l[h];if(p!==o&&p.form===o.form){var f=c.getInstanceFromNode(p);f?void 0:s("90"),d.asap(i,f)}}}return n}var s=n(3),a=n(4),l=n(62),u=n(38),c=n(5),d=n(9),h=(n(1),n(2),{getHostProps:function(t,e){var n=u.getValue(e),i=u.getChecked(e),r=a({type:void 0,step:void 0,min:void 0,max:void 0},e,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:t._wrapperState.initialValue,checked:null!=i?i:t._wrapperState.initialChecked,onChange:t._wrapperState.onChange});return r},mountWrapper:function(t,e){var n=e.defaultValue;t._wrapperState={initialChecked:null!=e.checked?e.checked:e.defaultChecked,initialValue:null!=e.value?e.value:n,listeners:null,onChange:o.bind(t),controlled:r(e)}},updateWrapper:function(t){var e=t._currentElement.props,n=e.checked;null!=n&&l.setValueForProperty(c.getNodeFromInstance(t),"checked",n||!1);var i=c.getNodeFromInstance(t),r=u.getValue(e);if(null!=r)if(0===r&&""===i.value)i.value="0";else if("number"===e.type){var o=parseFloat(i.value,10)||0;r!=o&&(i.value=""+r)}else r!=i.value&&(i.value=""+r);else null==e.value&&null!=e.defaultValue&&i.defaultValue!==""+e.defaultValue&&(i.defaultValue=""+e.defaultValue),null==e.checked&&null!=e.defaultChecked&&(i.defaultChecked=!!e.defaultChecked)},postMountWrapper:function(t){var e=t._currentElement.props,n=c.getNodeFromInstance(t);switch(e.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":n.value="",n.value=n.defaultValue;break;default:n.value=n.value}var i=n.name;""!==i&&(n.name=""),n.defaultChecked=!n.defaultChecked,n.defaultChecked=!n.defaultChecked,""!==i&&(n.name=i)}});t.exports=h},function(t,e,n){"use strict";function i(t){var e="";return o.Children.forEach(t,function(t){null!=t&&("string"==typeof t||"number"==typeof t?e+=t:l||(l=!0))}),e}var r=n(4),o=n(18),s=n(5),a=n(64),l=(n(2),!1),u={mountWrapper:function(t,e,n){var r=null;if(null!=n){var o=n;"optgroup"===o._tag&&(o=o._hostParent),null!=o&&"select"===o._tag&&(r=a.getSelectValueContext(o))}var s=null;if(null!=r){var l;if(l=null!=e.value?e.value+"":i(e.children),s=!1,Array.isArray(r)){for(var u=0;u<r.length;u++)if(""+r[u]===l){s=!0;break}}else s=""+r===l}t._wrapperState={selected:s}},postMountWrapper:function(t){var e=t._currentElement.props;if(null!=e.value){var n=s.getNodeFromInstance(t);n.setAttribute("value",e.value)}},getHostProps:function(t,e){var n=r({selected:void 0,children:void 0},e);null!=t._wrapperState.selected&&(n.selected=t._wrapperState.selected);var o=i(e.children);return o&&(n.children=o),n}};t.exports=u},function(t,e,n){"use strict";function i(t,e,n,i){return t===n&&e===i}function r(t){var e=document.selection,n=e.createRange(),i=n.text.length,r=n.duplicate();r.moveToElementText(t),r.setEndPoint("EndToStart",n);var o=r.text.length,s=o+i;return{start:o,end:s}}function o(t){var e=window.getSelection&&window.getSelection();if(!e||0===e.rangeCount)return null;var n=e.anchorNode,r=e.anchorOffset,o=e.focusNode,s=e.focusOffset,a=e.getRangeAt(0);try{a.startContainer.nodeType,a.endContainer.nodeType}catch(t){return null}var l=i(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),u=l?0:a.toString().length,c=a.cloneRange();c.selectNodeContents(t),c.setEnd(a.startContainer,a.startOffset);var d=i(c.startContainer,c.startOffset,c.endContainer,c.endOffset),h=d?0:c.toString().length,p=h+u,f=document.createRange();f.setStart(n,r),f.setEnd(o,s);var m=f.collapsed;return{start:m?p:h,end:m?h:p}}function s(t,e){var n,i,r=document.selection.createRange().duplicate();void 0===e.end?(n=e.start,i=n):e.start>e.end?(n=e.end,i=e.start):(n=e.start,i=e.end),r.moveToElementText(t),r.moveStart("character",n),r.setEndPoint("EndToStart",r),r.moveEnd("character",i-n),r.select()}function a(t,e){if(window.getSelection){var n=window.getSelection(),i=t[c()].length,r=Math.min(e.start,i),o=void 0===e.end?r:Math.min(e.end,i);if(!n.extend&&r>o){var s=o;o=r,r=s}var a=u(t,r),l=u(t,o);if(a&&l){var d=document.createRange();d.setStart(a.node,a.offset),n.removeAllRanges(),r>o?(n.addRange(d),n.extend(l.node,l.offset)):(d.setEnd(l.node,l.offset),n.addRange(d))}}}var l=n(6),u=n(183),c=n(75),d=l.canUseDOM&&"selection"in document&&!("getSelection"in window),h={getOffsets:d?r:o,setOffsets:d?s:a};t.exports=h},function(t,e,n){"use strict";var i=n(3),r=n(4),o=n(33),s=n(15),a=n(5),l=n(29),u=(n(1),n(48),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(u.prototype,{mountComponent:function(t,e,n,i){var r=n._idCounter++,o=" react-text: "+r+" ",u=" /react-text ";if(this._domID=r,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,d=c.createComment(o),h=c.createComment(u),p=s(c.createDocumentFragment());return s.queueChild(p,s(d)),this._stringText&&s.queueChild(p,s(c.createTextNode(this._stringText))),s.queueChild(p,s(h)),a.precacheNode(this,d),this._closingComment=h,p}var f=l(this._stringText);return t.renderToStaticMarkup?f:"<!--"+o+"-->"+f+"<!--"+u+"-->"},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var i=this.getHostNode();o.replaceDelimitedText(i[0],i[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?i("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=u},function(t,e,n){"use strict";function i(){this._rootNodeID&&c.updateWrapper(this)}function r(t){var e=this._currentElement.props,n=a.executeOnChange(e,t);return u.asap(i,this),n}var o=n(3),s=n(4),a=n(38),l=n(5),u=n(9),c=(n(1),n(2),{getHostProps:function(t,e){null!=e.dangerouslySetInnerHTML?o("91"):void 0;var n=s({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue,onChange:t._wrapperState.onChange});return n},mountWrapper:function(t,e){var n=a.getValue(e),i=n;if(null==n){var s=e.defaultValue,l=e.children;null!=l&&(null!=s?o("92"):void 0,Array.isArray(l)&&(l.length<=1?void 0:o("93"),l=l[0]),s=""+l),null==s&&(s=""),i=s}t._wrapperState={initialValue:""+i,listeners:null,onChange:r.bind(t)}},updateWrapper:function(t){var e=t._currentElement.props,n=l.getNodeFromInstance(t),i=a.getValue(e);if(null!=i){var r=""+i;r!==n.value&&(n.value=r),null==e.defaultValue&&(n.defaultValue=r)}null!=e.defaultValue&&(n.defaultValue=e.defaultValue)},postMountWrapper:function(t){var e=l.getNodeFromInstance(t),n=e.textContent;n===t._wrapperState.initialValue&&(e.value=n)}});t.exports=c},function(t,e,n){"use strict";function i(t,e){"_hostNode"in t?void 0:l("33"),"_hostNode"in e?void 0:l("33");for(var n=0,i=t;i;i=i._hostParent)n++;for(var r=0,o=e;o;o=o._hostParent)r++;for(;n-r>0;)t=t._hostParent,n--;for(;r-n>0;)e=e._hostParent,r--;for(var s=n;s--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function r(t,e){"_hostNode"in t?void 0:l("35"),"_hostNode"in e?void 0:l("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function o(t){return"_hostNode"in t?void 0:l("36"),t._hostParent}function s(t,e,n){for(var i=[];t;)i.push(t),t=t._hostParent;var r;for(r=i.length;r-- >0;)e(i[r],"captured",n);for(r=0;r<i.length;r++)e(i[r],"bubbled",n)}function a(t,e,n,r,o){for(var s=t&&e?i(t,e):null,a=[];t&&t!==s;)a.push(t),t=t._hostParent;for(var l=[];e&&e!==s;)l.push(e),e=e._hostParent;var u;for(u=0;u<a.length;u++)n(a[u],"bubbled",r);for(u=l.length;u-- >0;)n(l[u],"captured",o)}var l=n(3);n(1);t.exports={isAncestor:r,getLowestCommonAncestor:i,getParentInstance:o,traverseTwoPhase:s,traverseEnterLeave:a}},function(t,e,n){"use strict";function i(){this.reinitializeTransaction()}var r=n(4),o=n(9),s=n(28),a=n(7),l={initialize:a,close:function(){h.isBatchingUpdates=!1}},u={initialize:a,close:o.flushBatchedUpdates.bind(o)},c=[u,l];r(i.prototype,s,{getTransactionWrappers:function(){return c}});var d=new i,h={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,i,r,o){var s=h.isBatchingUpdates;return h.isBatchingUpdates=!0,s?t(e,n,i,r,o):d.perform(t,null,e,n,i,r,o)}};t.exports=h},function(t,e,n){"use strict";function i(){k||(k=!0,y.EventEmitter.injectReactEventListener(v),y.EventPluginHub.injectEventPluginOrder(a),y.EventPluginUtils.injectComponentTree(h),y.EventPluginUtils.injectTreeTraversal(f),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:x,EnterLeaveEventPlugin:l,ChangeEventPlugin:s,SelectEventPlugin:_,BeforeInputEventPlugin:o}),y.HostComponent.injectGenericComponentClass(d),y.HostComponent.injectTextComponentClass(m),y.DOMProperty.injectDOMPropertyConfig(r),y.DOMProperty.injectDOMPropertyConfig(u),y.DOMProperty.injectDOMPropertyConfig(w),y.EmptyComponent.injectEmptyComponentFactory(function(t){return new p(t)}),y.Updates.injectReconcileTransaction(b),y.Updates.injectBatchingStrategy(g),y.Component.injectEnvironment(c))}var r=n(124),o=n(126),s=n(128),a=n(130),l=n(131),u=n(133),c=n(135),d=n(138),h=n(5),p=n(140),f=n(148),m=n(146),g=n(149),v=n(153),y=n(154),b=n(159),w=n(164),_=n(165),x=n(166),k=!1;t.exports={inject:i}},81,function(t,e,n){"use strict";function i(t){r.enqueueEvents(t),r.processEventQueue(!1)}var r=n(22),o={handleTopLevel:function(t,e,n,o){var s=r.extractEvents(t,e,n,o);i(s)}};t.exports=o},function(t,e,n){"use strict";function i(t){for(;t._hostParent;)t=t._hostParent;var e=d.getNodeFromInstance(t),n=e.parentNode;return d.getClosestInstanceFromNode(n)}function r(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function o(t){var e=p(t.nativeEvent),n=d.getClosestInstanceFromNode(e),r=n;do t.ancestors.push(r),r=r&&i(r);while(r);for(var o=0;o<t.ancestors.length;o++)n=t.ancestors[o],m._handleTopLevel(t.topLevelType,n,t.nativeEvent,p(t.nativeEvent))}function s(t){var e=f(window);t(e)}var a=n(4),l=n(53),u=n(6),c=n(14),d=n(5),h=n(9),p=n(45),f=n(112);a(r.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(r,c.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(t){m._handleTopLevel=t},setEnabled:function(t){m._enabled=!!t},isEnabled:function(){return m._enabled},trapBubbledEvent:function(t,e,n){return n?l.listen(n,e,m.dispatchEvent.bind(null,t)):null},trapCapturedEvent:function(t,e,n){return n?l.capture(n,e,m.dispatchEvent.bind(null,t)):null},monitorScrollValue:function(t){var e=s.bind(null,t);l.listen(window,"scroll",e)},dispatchEvent:function(t,e){if(m._enabled){var n=r.getPooled(t,e);try{h.batchedUpdates(o,n)}finally{r.release(n)}}}};t.exports=m},function(t,e,n){"use strict";var i=n(16),r=n(22),o=n(36),s=n(39),a=n(65),l=n(26),u=n(67),c=n(9),d={Component:s.injection,DOMProperty:i.injection,EmptyComponent:a.injection,EventPluginHub:r.injection,EventPluginUtils:o.injection,EventEmitter:l.injection,HostComponent:u.injection,Updates:c.injection};t.exports=d},function(t,e,n){"use strict";var i=n(177),r=/\/?>/,o=/^<\!\-\-/,s={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=i(t);return o.test(t)?t:t.replace(r," "+s.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(s.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var r=i(t);return r===n}};t.exports=s},function(t,e,n){"use strict";function i(t,e,n){return{type:"INSERT_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:n,afterNode:e}}function r(t,e,n){return{type:"MOVE_EXISTING",content:null,fromIndex:t._mountIndex,fromNode:h.getHostNode(t),toIndex:n,afterNode:e}}function o(t,e){return{type:"REMOVE_NODE",content:null,fromIndex:t._mountIndex,fromNode:e,toIndex:null,afterNode:null}}function s(t){return{type:"SET_MARKUP",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function a(t){return{type:"TEXT_CONTENT",content:t,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function l(t,e){return e&&(t=t||[],t.push(e)),t}function u(t,e){d.processChildrenUpdates(t,e)}var c=n(3),d=n(39),h=(n(24),n(8),n(12),n(17)),p=n(134),f=(n(7),n(180)),m=(n(1),{Mixin:{_reconcilerInstantiateChildren:function(t,e,n){return p.instantiateChildren(t,e,n)},_reconcilerUpdateChildren:function(t,e,n,i,r,o){var s,a=0;return s=f(e,a),p.updateChildren(t,s,n,i,r,this,this._hostContainerInfo,o,a),s},mountChildren:function(t,e,n){var i=this._reconcilerInstantiateChildren(t,e,n);this._renderedChildren=i;var r=[],o=0;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s],l=0,u=h.mountComponent(a,e,this,this._hostContainerInfo,n,l);a._mountIndex=o++,r.push(u)}return r},updateTextContent:function(t){var e=this._renderedChildren;p.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&c("118");var i=[a(t)];u(this,i)},updateMarkup:function(t){var e=this._renderedChildren;p.unmountChildren(e,!1);for(var n in e)e.hasOwnProperty(n)&&c("118");var i=[s(t)];u(this,i)},updateChildren:function(t,e,n){this._updateChildren(t,e,n)},_updateChildren:function(t,e,n){var i=this._renderedChildren,r={},o=[],s=this._reconcilerUpdateChildren(i,t,o,r,e,n);if(s||i){var a,c=null,d=0,p=0,f=0,m=null;for(a in s)if(s.hasOwnProperty(a)){var g=i&&i[a],v=s[a];g===v?(c=l(c,this.moveChild(g,m,d,p)),p=Math.max(g._mountIndex,p),g._mountIndex=d):(g&&(p=Math.max(g._mountIndex,p)),c=l(c,this._mountChildAtIndex(v,o[f],m,d,e,n)),f++),d++,m=h.getHostNode(v)}for(a in r)r.hasOwnProperty(a)&&(c=l(c,this._unmountChild(i[a],r[a])));c&&u(this,c),this._renderedChildren=s}},unmountChildren:function(t){var e=this._renderedChildren;p.unmountChildren(e,t),this._renderedChildren=null},moveChild:function(t,e,n,i){if(t._mountIndex<i)return r(t,e,n)},createChild:function(t,e,n){return i(n,e,t._mountIndex)},removeChild:function(t,e){return o(t,e)},_mountChildAtIndex:function(t,e,n,i,r,o){return t._mountIndex=i,this.createChild(t,n,e)},_unmountChild:function(t,e){var n=this.removeChild(t,e);return t._mountIndex=null,n}}});t.exports=m},function(t,e,n){"use strict";function i(t){return!(!t||"function"!=typeof t.attachRef||"function"!=typeof t.detachRef)}var r=n(3),o=(n(1),{addComponentAsRefTo:function(t,e,n){i(n)?void 0:r("119"),n.attachRef(e,t)},removeComponentAsRefFrom:function(t,e,n){i(n)?void 0:r("120");var o=n.getPublicInstance();o&&o.refs[e]===t.getPublicInstance()&&n.detachRef(e)}});t.exports=o},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e,n){"use strict";function i(t){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.useCreateElement=t}var r=n(4),o=n(61),s=n(14),a=n(26),l=n(68),u=(n(8),n(28)),c=n(41),d={initialize:l.getSelectionInformation,close:l.restoreSelection},h={initialize:function(){var t=a.isEnabled();return a.setEnabled(!1),t},close:function(t){a.setEnabled(t)}},p={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},f=[d,h,p],m={getTransactionWrappers:function(){return f},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return c},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(t){this.reactMountReady.rollback(t)},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null}};r(i.prototype,u,m),s.addPoolingTo(i),t.exports=i},function(t,e,n){"use strict";function i(t,e,n){"function"==typeof t?t(e.getPublicInstance()):o.addComponentAsRefTo(e,t,n)}function r(t,e,n){"function"==typeof t?t(null):o.removeComponentAsRefFrom(e,t,n)}var o=n(157),s={};s.attachRefs=function(t,e){if(null!==e&&"object"==typeof e){var n=e.ref;null!=n&&i(n,t,e._owner)}},s.shouldUpdateRefs=function(t,e){var n=null,i=null;null!==t&&"object"==typeof t&&(n=t.ref,i=t._owner);var r=null,o=null;return null!==e&&"object"==typeof e&&(r=e.ref,o=e._owner),n!==r||"string"==typeof r&&o!==i},s.detachRefs=function(t,e){if(null!==e&&"object"==typeof e){var n=e.ref;null!=n&&r(n,t,e._owner)}},t.exports=s},function(t,e,n){"use strict";function i(t){this.reinitializeTransaction(),this.renderToStaticMarkup=t,this.useCreateElement=!1,this.updateQueue=new a(this)}var r=n(4),o=n(14),s=n(28),a=(n(8),n(162)),l=[],u={enqueue:function(){}},c={getTransactionWrappers:function(){return l},getReactMountReady:function(){return u},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};r(i.prototype,s,c),o.addPoolingTo(i),t.exports=i},function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){}var o=n(41),s=(n(2),function(){function t(e){i(this,t),this.transaction=e}return t.prototype.isMounted=function(t){return!1},t.prototype.enqueueCallback=function(t,e,n){this.transaction.isInTransaction()&&o.enqueueCallback(t,e,n)},t.prototype.enqueueForceUpdate=function(t){this.transaction.isInTransaction()?o.enqueueForceUpdate(t):r(t,"forceUpdate")},t.prototype.enqueueReplaceState=function(t,e){this.transaction.isInTransaction()?o.enqueueReplaceState(t,e):r(t,"replaceState")},t.prototype.enqueueSetState=function(t,e){this.transaction.isInTransaction()?o.enqueueSetState(t,e):r(t,"setState")},t}());t.exports=s},function(t,e){"use strict";t.exports="15.5.4"},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},i={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},r={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(i).forEach(function(t){r.Properties[t]=0,i[t]&&(r.DOMAttributeNames[t]=i[t])}),t.exports=r},function(t,e,n){"use strict";function i(t){if("selectionStart"in t&&l.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function r(t,e){if(y||null==m||m!==c())return null;var n=i(m);if(!v||!h(v,n)){v=n;var r=u.getPooled(f.select,g,t,e);return r.type="select",r.target=m,o.accumulateTwoPhaseDispatches(r),r}return null}var o=n(23),s=n(6),a=n(5),l=n(68),u=n(11),c=n(55),d=n(77),h=n(31),p=s.canUseDOM&&"documentMode"in document&&document.documentMode<=11,f={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},m=null,g=null,v=null,y=!1,b=!1,w={eventTypes:f,extractEvents:function(t,e,n,i){if(!b)return null;var o=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(d(o)||"true"===o.contentEditable)&&(m=o,g=e,v=null);break;case"topBlur":m=null,g=null,v=null;break;case"topMouseDown":y=!0;break;case"topContextMenu":case"topMouseUp":return y=!1,r(n,i);case"topSelectionChange":if(p)break;case"topKeyDown":case"topKeyUp":return r(n,i)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(b=!0)}};t.exports=w},function(t,e,n){"use strict";function i(t){return"."+t._rootNodeID}function r(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var o=n(3),s=n(53),a=n(23),l=n(5),u=n(167),c=n(168),d=n(11),h=n(171),p=n(173),f=n(27),m=n(170),g=n(174),v=n(175),y=n(25),b=n(176),w=n(7),_=n(43),x=(n(1),{}),k={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,i="top"+e,r={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[i]};x[t]=r,k[i]=r});var C={},S={eventTypes:x,extractEvents:function(t,e,n,i){var r=k[t];if(!r)return null;var s;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":s=d;break;case"topKeyPress":if(0===_(n))return null;case"topKeyDown":case"topKeyUp":
13
+ s=p;break;case"topBlur":case"topFocus":s=h;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":s=f;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":s=m;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":s=g;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":s=u;break;case"topTransitionEnd":s=v;break;case"topScroll":s=y;break;case"topWheel":s=b;break;case"topCopy":case"topCut":case"topPaste":s=c}s?void 0:o("86",t);var l=s.getPooled(r,e,n,i);return a.accumulateTwoPhaseDispatches(l),l},didPutListener:function(t,e,n){if("onClick"===e&&!r(t._tag)){var o=i(t),a=l.getNodeFromInstance(t);C[o]||(C[o]=s.listen(a,"click",w))}},willDeleteListener:function(t,e){if("onClick"===e&&!r(t._tag)){var n=i(t);C[n].remove(),delete C[n]}}};t.exports=S},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(11),o={animationName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(i,o),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(11),o={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};r.augmentClass(i,o),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(11),o={data:null};r.augmentClass(i,o),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(27),o={dataTransfer:null};r.augmentClass(i,o),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(25),o={relatedTarget:null};r.augmentClass(i,o),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(11),o={data:null};r.augmentClass(i,o),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(25),o=n(43),s=n(181),a=n(44),l={key:s,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?o(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?o(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};r.augmentClass(i,l),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(25),o=n(44),s={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};r.augmentClass(i,s),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(11),o={propertyName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(i,o),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return r.call(this,t,e,n,i)}var r=n(27),o={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(i,o),t.exports=i},function(t,e){"use strict";function n(t){for(var e=1,n=0,r=0,o=t.length,s=o&-4;r<s;){for(var a=Math.min(r+4096,s);r<a;r+=4)n+=(e+=t.charCodeAt(r))+(e+=t.charCodeAt(r+1))+(e+=t.charCodeAt(r+2))+(e+=t.charCodeAt(r+3));e%=i,n%=i}for(;r<o;r++)n+=e+=t.charCodeAt(r);return e%=i,n%=i,e|n<<16}var i=65521;t.exports=n},function(t,e,n){"use strict";function i(t,e,n){var i=null==e||"boolean"==typeof e||""===e;if(i)return"";var r=isNaN(e);if(r||0===e||o.hasOwnProperty(t)&&o[t])return""+e;if("string"==typeof e){e=e.trim()}return e+"px"}var r=n(60),o=(n(2),r.isUnitlessNumber);t.exports=i},function(t,e,n){"use strict";function i(t){if(null==t)return null;if(1===t.nodeType)return t;var e=s.get(t);return e?(e=a(e),e?o.getNodeFromInstance(e):null):void("function"==typeof t.render?r("44"):r("45",Object.keys(t)))}var r=n(3),o=(n(12),n(5)),s=n(24),a=n(74);n(1),n(2);t.exports=i},function(t,e,n){(function(e){"use strict";function i(t,e,n,i){if(t&&"object"==typeof t){var r=t,o=void 0===r[n];o&&null!=e&&(r[n]=e)}}function r(t,e){if(null==t)return t;var n={};return o(t,i,n),n}var o=(n(37),n(79));n(2);t.exports=r}).call(e,n(56))},function(t,e,n){"use strict";function i(t){if(t.key){var e=o[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=r(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?s[t.keyCode]||"Unidentified":""}var r=n(43),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=i},function(t,e){"use strict";function n(t){var e=t&&(i&&t[i]||t[r]);if("function"==typeof e)return e}var i="function"==typeof Symbol&&Symbol.iterator,r="@@iterator";t.exports=n},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function i(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function r(t,e){for(var r=n(t),o=0,s=0;r;){if(3===r.nodeType){if(s=o+r.textContent.length,o<=e&&s>=e)return{node:r,offset:e-o};o=s}r=n(i(r))}}t.exports=r},function(t,e,n){"use strict";function i(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n["ms"+t]="MS"+e,n["O"+t]="o"+e.toLowerCase(),n}function r(t){if(a[t])return a[t];if(!s[t])return t;var e=s[t];for(var n in e)if(e.hasOwnProperty(n)&&n in l)return a[t]=e[n];return""}var o=n(6),s={animationend:i("Animation","AnimationEnd"),animationiteration:i("Animation","AnimationIteration"),animationstart:i("Animation","AnimationStart"),transitionend:i("Transition","TransitionEnd")},a={},l={};o.canUseDOM&&(l=document.createElement("div").style,"AnimationEvent"in window||(delete s.animationend.animation,delete s.animationiteration.animation,delete s.animationstart.animation),"TransitionEvent"in window||delete s.transitionend.transition),t.exports=r},function(t,e,n){"use strict";function i(t){return'"'+r(t)+'"'}var r=n(29);t.exports=i},function(t,e,n){"use strict";var i=n(69);t.exports=i.renderSubtreeIntoContainer},function(t,e,n){!function(e,i){t.exports=i(n(13),n(32))}(this,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";t.exports=n(1).default,t.exports.DraggableCore=n(9).default},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},u=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),d=n(2),h=i(d),p=n(3),f=i(p),m=n(4),g=i(m),v=n(5),y=n(8),b=n(6),w=n(9),_=i(w),x=n(11),k=i(x),C=function(t){function e(t){o(this,e);var n=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.onDragStart=function(t,e){(0,k.default)("Draggable: onDragStart: %j",e);var i=n.props.onStart(t,(0,y.createDraggableData)(n,e));return i!==!1&&void n.setState({dragging:!0,dragged:!0})},n.onDrag=function(t,e){if(!n.state.dragging)return!1;(0,k.default)("Draggable: onDrag: %j",e);var i=(0,y.createDraggableData)(n,e),r={x:i.x,y:i.y};if(n.props.bounds){var o=r.x,s=r.y;r.x+=n.state.slackX,r.y+=n.state.slackY;var a=(0,y.getBoundPosition)(n,r.x,r.y),l=u(a,2);r.x=l[0],r.y=l[1],r.slackX=n.state.slackX+(o-r.x),r.slackY=n.state.slackY+(s-r.y),i.x=o,i.y=s,i.deltaX=r.x-n.state.x,i.deltaY=r.y-n.state.y}var c=n.props.onDrag(t,i);return c!==!1&&void n.setState(r)},n.onDragStop=function(t,e){if(!n.state.dragging)return!1;var i=n.props.onStop(t,(0,y.createDraggableData)(n,e));if(i===!1)return!1;(0,k.default)("Draggable: onDragStop: %j",e);var r={dragging:!1,slackX:0,slackY:0},o=Boolean(n.props.position);if(o){var s=n.props.position,a=s.x,l=s.y;r.x=a,r.y=l}n.setState(r)},n.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},n}return a(e,t),c(e,[{key:"componentWillMount",value:function(){!this.props.position||this.props.onDrag||this.props.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}},{key:"componentDidMount",value:function(){"undefined"!=typeof SVGElement&&f.default.findDOMNode(this)instanceof SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(t){!t.position||this.props.position&&t.position.x===this.props.position.x&&t.position.y===this.props.position.y||this.setState({x:t.position.x,y:t.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var t,e={},n=null,i=Boolean(this.props.position),o=!i||this.state.dragging,s=this.props.position||this.props.defaultPosition,a={x:(0,y.canDragX)(this)&&o?this.state.x:s.x,y:(0,y.canDragY)(this)&&o?this.state.y:s.y};this.state.isElementSVG?n=(0,v.createSVGTransform)(a):e=(0,v.createCSSTransform)(a);var u=this.props,c=u.defaultClassName,d=u.defaultClassNameDragging,p=u.defaultClassNameDragged,f=(0,g.default)(this.props.children.props.className||"",c,(t={},r(t,d,this.state.dragging),r(t,p,this.state.dragged),t));return h.default.createElement(_.default,l({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),h.default.cloneElement(h.default.Children.only(this.props.children),{className:f,style:l({},this.props.children.props.style,e),transform:n}))}}]),e}(h.default.Component);C.displayName="Draggable",C.propTypes=l({},_.default.propTypes,{axis:d.PropTypes.oneOf(["both","x","y","none"]),bounds:d.PropTypes.oneOfType([d.PropTypes.shape({left:d.PropTypes.number,right:d.PropTypes.number,top:d.PropTypes.number,bottom:d.PropTypes.number}),d.PropTypes.string,d.PropTypes.oneOf([!1])]),defaultClassName:d.PropTypes.string,defaultClassNameDragging:d.PropTypes.string,defaultClassNameDragged:d.PropTypes.string,defaultPosition:d.PropTypes.shape({x:d.PropTypes.number,y:d.PropTypes.number}),position:d.PropTypes.shape({x:d.PropTypes.number,y:d.PropTypes.number}),className:b.dontSetMe,style:b.dontSetMe,transform:b.dontSetMe}),C.defaultProps=l({},_.default.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null}),e.default=C},function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e,n){var i,r;!function(){"use strict";function n(){for(var t=[],e=0;e<arguments.length;e++){var i=arguments[e];if(i){var r=typeof i;if("string"===r||"number"===r)t.push(i);else if(Array.isArray(i))t.push(n.apply(null,i));else if("object"===r)for(var s in i)o.call(i,s)&&i[s]&&t.push(s)}}return t.join(" ")}var o={}.hasOwnProperty;"undefined"!=typeof t&&t.exports?t.exports=n:(i=[],r=function(){return n}.apply(e,i),!(void 0!==r&&(t.exports=r)))}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){return S||(S=(0,x.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(e){return(0,x.isFunction)(t[e])})),t[S].call(t,e)}function s(t,e,n){var i=t;do{if(o(i,e))return!0;if(i===n)return!1;i=i.parentNode}while(i);return!1}function a(t,e,n){t&&(t.attachEvent?t.attachEvent("on"+e,n):t.addEventListener?t.addEventListener(e,n,!0):t["on"+e]=n)}function l(t,e,n){t&&(t.detachEvent?t.detachEvent("on"+e,n):t.removeEventListener?t.removeEventListener(e,n,!0):t["on"+e]=null)}function u(t){var e=t.clientHeight,n=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,x.int)(n.borderTopWidth),e+=(0,x.int)(n.borderBottomWidth)}function c(t){var e=t.clientWidth,n=t.ownerDocument.defaultView.getComputedStyle(t);return e+=(0,x.int)(n.borderLeftWidth),e+=(0,x.int)(n.borderRightWidth)}function d(t){var e=t.clientHeight,n=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,x.int)(n.paddingTop),e-=(0,x.int)(n.paddingBottom)}function h(t){var e=t.clientWidth,n=t.ownerDocument.defaultView.getComputedStyle(t);return e-=(0,x.int)(n.paddingLeft),e-=(0,x.int)(n.paddingRight)}function p(t,e){var n=e===e.ownerDocument.body,i=n?{left:0,top:0}:e.getBoundingClientRect(),r=t.clientX+e.scrollLeft-i.left,o=t.clientY+e.scrollTop-i.top;return{x:r,y:o}}function f(t){var e=t.x,n=t.y;return r({},(0,k.browserPrefixToKey)("transform",C.default),"translate("+e+"px,"+n+"px)")}function m(t){var e=t.x,n=t.y;return"translate("+e+","+n+")"}function g(t,e){return t.targetTouches&&(0,x.findInArray)(t.targetTouches,function(t){return e===t.identifier})||t.changedTouches&&(0,x.findInArray)(t.changedTouches,function(t){return e===t.identifier})}function v(t){return t.targetTouches&&t.targetTouches[0]?t.targetTouches[0].identifier:t.changedTouches&&t.changedTouches[0]?t.changedTouches[0].identifier:void 0}function y(t){var e=t.getAttribute("style")||"";t.setAttribute("style",e+D)}function b(t){var e=t.getAttribute("style")||"";t.setAttribute("style",e.replace(E,""))}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return _({touchAction:"none"},t)}Object.defineProperty(e,"__esModule",{value:!0});var _=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t};e.matchesSelector=o,e.matchesSelectorAndParentsTo=s,e.addEvent=a,e.removeEvent=l,e.outerHeight=u,e.outerWidth=c,e.innerHeight=d,e.innerWidth=h,e.offsetXYFromParent=p,e.createCSSTransform=f,e.createSVGTransform=m,e.getTouch=g,e.getTouchIdentifier=v,e.addUserSelectStyles=y,e.removeUserSelectStyles=b,e.styleHacks=w;var x=n(6),k=n(7),C=i(k),S="",T=(0,k.getPrefix)("user-select"),M=(0,k.browserPrefixToStyle)("user-select",T),D=";"+M+": none;",E=new RegExp(";?"+M+": none;")},function(t,e){"use strict";function n(t,e){for(var n=0,i=t.length;n<i;n++)if(e.apply(e,[t[n],n,t]))return t[n]}function i(t){return"function"==typeof t||"[object Function]"===Object.prototype.toString.call(t)}function r(t){return"number"==typeof t&&!isNaN(t)}function o(t){return parseInt(t,10)}function s(t,e,n){if(t[e])return new Error("Invalid prop "+e+" passed to "+n+" - do not set this, set it on the child.")}Object.defineProperty(e,"__esModule",{value:!0}),e.findInArray=n,e.isFunction=i,e.isNum=r,e.int=o,e.dontSetMe=s},function(t,e){"use strict";function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||"undefined"==typeof window.document)return"";var e=window.document.documentElement.style;if(t in e)return"";for(var n=0;n<s.length;n++)if(i(t,s[n])in e)return s[n];return""}function i(t,e){return e?""+e+o(t):t}function r(t,e){return e?"-"+e.toLowerCase()+"-"+t:t}function o(t){for(var e="",n=!0,i=0;i<t.length;i++)n?(e+=t[i].toUpperCase(),n=!1):"-"===t[i]?n=!0:e+=t[i];return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getPrefix=n,e.browserPrefixToKey=i,e.browserPrefixToStyle=r;var s=["Moz","Webkit","O","ms"];e.default=n()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){if(!t.props.bounds)return[e,n];var i=t.props.bounds;i="string"==typeof i?i:d(i);var r=f.default.findDOMNode(t);if("string"==typeof i){var o=r.ownerDocument,s=o.defaultView,a=void 0;if("parent"===i)a=r.parentNode;else if(a=o.querySelector(i),!a)throw new Error('Bounds selector "'+i+'" could not find an element.');var l=s.getComputedStyle(r),u=s.getComputedStyle(a);i={left:-r.offsetLeft+(0,h.int)(u.paddingLeft)+(0,h.int)(l.borderLeftWidth)+(0,h.int)(l.marginLeft),top:-r.offsetTop+(0,h.int)(u.paddingTop)+(0,h.int)(l.borderTopWidth)+(0,h.int)(l.marginTop),right:(0,m.innerWidth)(a)-(0,m.outerWidth)(r)-r.offsetLeft,bottom:(0,m.innerHeight)(a)-(0,m.outerHeight)(r)-r.offsetTop}}return(0,h.isNum)(i.right)&&(e=Math.min(e,i.right)),(0,h.isNum)(i.bottom)&&(n=Math.min(n,i.bottom)),(0,h.isNum)(i.left)&&(e=Math.max(e,i.left)),(0,h.isNum)(i.top)&&(n=Math.max(n,i.top)),[e,n]}function o(t,e,n){var i=Math.round(e/t[0])*t[0],r=Math.round(n/t[1])*t[1];return[i,r]}function s(t){return"both"===t.props.axis||"x"===t.props.axis}function a(t){return"both"===t.props.axis||"y"===t.props.axis}function l(t,e,n){var i="number"==typeof e?(0,m.getTouch)(t,e):null;if("number"==typeof e&&!i)return null;var r=f.default.findDOMNode(n),o=n.props.offsetParent||r.offsetParent||r.ownerDocument.body;return(0,m.offsetXYFromParent)(i||t,o)}function u(t,e,n){var i=t.state,r=!(0,h.isNum)(i.lastX);return r?{node:f.default.findDOMNode(t),deltaX:0,deltaY:0,lastX:e,lastY:n,x:e,y:n}:{node:f.default.findDOMNode(t),deltaX:e-i.lastX,deltaY:n-i.lastY,lastX:i.lastX,lastY:i.lastY,x:e,y:n}}function c(t,e){return{node:e.node,x:t.state.x+e.deltaX,y:t.state.y+e.deltaY,deltaX:e.deltaX,deltaY:e.deltaY,lastX:t.state.x,lastY:t.state.y}}function d(t){return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}Object.defineProperty(e,"__esModule",{value:!0}),e.getBoundPosition=r,e.snapToGrid=o,e.canDragX=s,e.canDragY=a,e.getControlPosition=l,e.createCoreData=u,e.createDraggableData=c;var h=n(6),p=n(3),f=i(p),m=n(5)},function(t,e,n){(function(t){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],i=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){r=!0,o=t}finally{try{!i&&a.return&&a.return()}finally{if(r)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),u=n(2),c=i(u),d=n(3),h=i(d),p=n(5),f=n(8),m=n(6),g=n(11),v=i(g),y={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},b=y.mouse,w=function(t){function e(){var t,n,i,s;r(this,e);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=i=o(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(u))),i.state={dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null},i.handleDragStart=function(t){if(i.props.onMouseDown(t),!i.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var e=h.default.findDOMNode(i),n=e.ownerDocument;if(!(i.props.disabled||!(t.target instanceof n.defaultView.Node)||i.props.handle&&!(0,p.matchesSelectorAndParentsTo)(t.target,i.props.handle,e)||i.props.cancel&&(0,p.matchesSelectorAndParentsTo)(t.target,i.props.cancel,e))){var r=(0,p.getTouchIdentifier)(t);i.setState({touchIdentifier:r});var o=(0,f.getControlPosition)(t,r,i);if(null!=o){var s=o.x,a=o.y,l=(0,f.createCoreData)(i,s,a);(0,v.default)("DraggableCore: handleDragStart: %j",l),(0,v.default)("calling",i.props.onStart);var u=i.props.onStart(t,l);u!==!1&&(i.props.enableUserSelectHack&&(0,p.addUserSelectStyles)(n.body),i.setState({dragging:!0,lastX:s,lastY:a}),(0,p.addEvent)(n,b.move,i.handleDrag),(0,p.addEvent)(n,b.stop,i.handleDragStop))}}},i.handleDrag=function(t){"touchmove"===t.type&&t.preventDefault();var e=(0,f.getControlPosition)(t,i.state.touchIdentifier,i);if(null!=e){var n=e.x,r=e.y;if(Array.isArray(i.props.grid)){var o=n-i.state.lastX,s=r-i.state.lastY,l=(0,f.snapToGrid)(i.props.grid,o,s),u=a(l,2);if(o=u[0],s=u[1],!o&&!s)return;n=i.state.lastX+o,r=i.state.lastY+s}var c=(0,f.createCoreData)(i,n,r);(0,v.default)("DraggableCore: handleDrag: %j",c);var d=i.props.onDrag(t,c);if(d!==!1)i.setState({lastX:n,lastY:r});else try{i.handleDragStop(new MouseEvent("mouseup"))}catch(t){var h=document.createEvent("MouseEvents");h.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.handleDragStop(h)}}},i.handleDragStop=function(t){if(i.state.dragging){var e=(0,f.getControlPosition)(t,i.state.touchIdentifier,i);if(null!=e){var n=e.x,r=e.y,o=(0,f.createCoreData)(i,n,r),s=h.default.findDOMNode(i),a=s.ownerDocument;i.props.enableUserSelectHack&&(0,p.removeUserSelectStyles)(a.body),(0,v.default)("DraggableCore: handleDragStop: %j",o),i.setState({dragging:!1,lastX:NaN,lastY:NaN}),i.props.onStop(t,o),(0,v.default)("DraggableCore: Removing handlers"),(0,p.removeEvent)(a,b.move,i.handleDrag),(0,p.removeEvent)(a,b.stop,i.handleDragStop)}}},i.onMouseDown=function(t){return b=y.mouse,i.handleDragStart(t)},i.onMouseUp=function(t){return b=y.mouse,i.handleDragStop(t)},i.onTouchStart=function(t){return b=y.touch,i.handleDragStart(t)},i.onTouchEnd=function(t){return b=y.touch,i.handleDragStop(t)},s=n,o(i,s)}return s(e,t),l(e,[{key:"componentWillUnmount",value:function(){var t=h.default.findDOMNode(this),e=t.ownerDocument;(0,p.removeEvent)(e,y.mouse.move,this.handleDrag),(0,p.removeEvent)(e,y.touch.move,this.handleDrag),(0,p.removeEvent)(e,y.mouse.stop,this.handleDragStop),(0,p.removeEvent)(e,y.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&(0,p.removeUserSelectStyles)(e.body)}},{key:"render",value:function(){return c.default.cloneElement(c.default.Children.only(this.props.children),{style:(0,p.styleHacks)(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),e}(c.default.Component);w.displayName="DraggableCore",w.propTypes={allowAnyClick:u.PropTypes.bool,disabled:u.PropTypes.bool,enableUserSelectHack:u.PropTypes.bool,offsetParent:function(e,n){if(t.browser&&e[n]&&1!==e[n].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:u.PropTypes.arrayOf(u.PropTypes.number),handle:u.PropTypes.string,cancel:u.PropTypes.string,onStart:u.PropTypes.func,onDrag:u.PropTypes.func,onStop:u.PropTypes.func,onMouseDown:u.PropTypes.func,className:m.dontSetMe,style:m.dontSetMe,transform:m.dontSetMe},w.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}},e.default=w}).call(e,n(10))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function r(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function s(){m&&p&&(m=!1,p.length?f=p.concat(f):g=-1,f.length&&a())}function a(){if(!m){var t=r(s);m=!0;for(var e=f.length;e;){for(p=f,f=[];++g<e;)p&&p[g].run();g=-1,e=f.length}p=null,m=!1,o(t)}}function l(t,e){this.fun=t,this.array=e}function u(){}var c,d,h=t.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}}();var p,f=[],m=!1,g=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new l(t,e)),1!==f.length||m||r(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=u,h.addListener=u,h.once=u,h.off=u,h.removeListener=u,h.removeAllListeners=u,h.emit=u,h.binding=function(t){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(t){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},function(t,e,n){"use strict";function i(){}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i}])})},function(t,e,n){"use strict";"undefined"==typeof Promise&&(n(120).enable(),window.Promise=n(119)),n(204),Object.assign=n(4)},37,[205,20],function(t,e,n){"use strict";function i(t){return(""+t).replace(w,"$&/")}function r(t,e){this.func=t,this.context=e,this.count=0}function o(t,e,n){var i=t.func,r=t.context;i.call(r,e,t.count++)}function s(t,e,n){if(null==t)return t;var i=r.getPooled(e,n);v(t,o,i),r.release(i)}function a(t,e,n,i){this.result=t,this.keyPrefix=e,this.func=n,this.context=i,this.count=0}function l(t,e,n){var r=t.result,o=t.keyPrefix,s=t.func,a=t.context,l=s.call(a,e,t.count++);Array.isArray(l)?u(l,r,n,g.thatReturnsArgument):null!=l&&(m.isValidElement(l)&&(l=m.cloneAndReplaceKey(l,o+(!l.key||e&&e.key===l.key?"":i(l.key)+"/")+n)),r.push(l))}function u(t,e,n,r,o){var s="";null!=n&&(s=i(n)+"/");var u=a.getPooled(e,s,r,o);v(t,l,u),a.release(u)}function c(t,e,n){if(null==t)return t;var i=[];return u(t,i,null,e,n),i}function d(t,e,n){return null}function h(t,e){return v(t,d,null)}function p(t){var e=[];return u(t,e,null,g.thatReturnsArgument),e}var f=n(190),m=n(19),g=n(7),v=n(201),y=f.twoArgumentPooler,b=f.fourArgumentPooler,w=/\/+/g;r.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},f.addPoolingTo(r,y),a.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},f.addPoolingTo(a,b);var _={forEach:s,map:c,mapIntoWithKeyPrefixInternal:u,count:h,toArray:p};t.exports=_},function(t,e,n){"use strict";function i(t){return t}function r(t,e){var n=w.hasOwnProperty(e)?w[e]:null;x.hasOwnProperty(e)&&("OVERRIDE_BASE"!==n?h("73",e):void 0),t&&("DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n?h("74",e):void 0)}function o(t,e){if(e){"function"==typeof e?h("75"):void 0,m.isValidElement(e)?h("76"):void 0;var n=t.prototype,i=n.__reactAutoBindPairs;e.hasOwnProperty(y)&&_.mixins(t,e.mixins);for(var o in e)if(e.hasOwnProperty(o)&&o!==y){var s=e[o],a=n.hasOwnProperty(o);if(r(a,o),_.hasOwnProperty(o))_[o](t,s);else{var c=w.hasOwnProperty(o),d="function"==typeof s,p=d&&!c&&!a&&e.autobind!==!1;if(p)i.push(o,s),n[o]=s;else if(a){var f=w[o];!c||"DEFINE_MANY_MERGED"!==f&&"DEFINE_MANY"!==f?h("77",f,o):void 0,"DEFINE_MANY_MERGED"===f?n[o]=l(n[o],s):"DEFINE_MANY"===f&&(n[o]=u(n[o],s))}else n[o]=s}}}else;}function s(t,e){if(e)for(var n in e){var i=e[n];if(e.hasOwnProperty(n)){var r=n in _;r?h("78",n):void 0;var o=n in t;o?h("79",n):void 0,t[n]=i}}}function a(t,e){t&&e&&"object"==typeof t&&"object"==typeof e?void 0:h("80");for(var n in e)e.hasOwnProperty(n)&&(void 0!==t[n]?h("81",n):void 0,t[n]=e[n]);return t}function l(t,e){return function(){var n=t.apply(this,arguments),i=e.apply(this,arguments);if(null==n)return i;if(null==i)return n;var r={};return a(r,n),a(r,i),r}}function u(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function c(t,e){var n=e.bind(t);return n}function d(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var i=e[n],r=e[n+1];t[i]=c(t,r)}}var h=n(20),p=n(4),f=n(49),m=n(19),g=(n(194),n(50)),v=n(21),y=(n(1),n(2),"mixins"),b=[],w={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},_={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)o(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=p({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=p({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=l(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=p({},t.propTypes,e)},statics:function(t,e){s(t,e)},autobind:function(){}},x={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t),e&&this.updater.enqueueCallback(this,e,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},k=function(){};p(k.prototype,f.prototype,x);var C={createClass:function(t){var e=i(function(t,n,i){this.__reactAutoBindPairs.length&&d(this),this.props=t,this.context=n,this.refs=v,this.updater=i||g,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?h("82",e.displayName||"ReactCompositeComponent"):void 0,this.state=r});e.prototype=new k,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],b.forEach(o.bind(null,e)),o(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),e.prototype.render?void 0:h("83");for(var n in w)e.prototype[n]||(e.prototype[n]=null);return e},injection:{injectMixin:function(t){b.push(t)}}};t.exports=C},function(t,e,n){"use strict";var i=n(19),r=i.createFactory,o={a:r("a"),abbr:r("abbr"),
14
+ address:r("address"),area:r("area"),article:r("article"),aside:r("aside"),audio:r("audio"),b:r("b"),base:r("base"),bdi:r("bdi"),bdo:r("bdo"),big:r("big"),blockquote:r("blockquote"),body:r("body"),br:r("br"),button:r("button"),canvas:r("canvas"),caption:r("caption"),cite:r("cite"),code:r("code"),col:r("col"),colgroup:r("colgroup"),data:r("data"),datalist:r("datalist"),dd:r("dd"),del:r("del"),details:r("details"),dfn:r("dfn"),dialog:r("dialog"),div:r("div"),dl:r("dl"),dt:r("dt"),em:r("em"),embed:r("embed"),fieldset:r("fieldset"),figcaption:r("figcaption"),figure:r("figure"),footer:r("footer"),form:r("form"),h1:r("h1"),h2:r("h2"),h3:r("h3"),h4:r("h4"),h5:r("h5"),h6:r("h6"),head:r("head"),header:r("header"),hgroup:r("hgroup"),hr:r("hr"),html:r("html"),i:r("i"),iframe:r("iframe"),img:r("img"),input:r("input"),ins:r("ins"),kbd:r("kbd"),keygen:r("keygen"),label:r("label"),legend:r("legend"),li:r("li"),link:r("link"),main:r("main"),map:r("map"),mark:r("mark"),menu:r("menu"),menuitem:r("menuitem"),meta:r("meta"),meter:r("meter"),nav:r("nav"),noscript:r("noscript"),object:r("object"),ol:r("ol"),optgroup:r("optgroup"),option:r("option"),output:r("output"),p:r("p"),param:r("param"),picture:r("picture"),pre:r("pre"),progress:r("progress"),q:r("q"),rp:r("rp"),rt:r("rt"),ruby:r("ruby"),s:r("s"),samp:r("samp"),script:r("script"),section:r("section"),select:r("select"),small:r("small"),source:r("source"),span:r("span"),strong:r("strong"),style:r("style"),sub:r("sub"),summary:r("summary"),sup:r("sup"),table:r("table"),tbody:r("tbody"),td:r("td"),textarea:r("textarea"),tfoot:r("tfoot"),th:r("th"),thead:r("thead"),time:r("time"),title:r("title"),tr:r("tr"),track:r("track"),u:r("u"),ul:r("ul"),var:r("var"),video:r("video"),wbr:r("wbr"),circle:r("circle"),clipPath:r("clipPath"),defs:r("defs"),ellipse:r("ellipse"),g:r("g"),image:r("image"),line:r("line"),linearGradient:r("linearGradient"),mask:r("mask"),path:r("path"),pattern:r("pattern"),polygon:r("polygon"),polyline:r("polyline"),radialGradient:r("radialGradient"),rect:r("rect"),stop:r("stop"),svg:r("svg"),text:r("text"),tspan:r("tspan")};t.exports=o},function(t,e,n){"use strict";var i={};t.exports=i},function(t,e,n){"use strict";var i=n(19),r=i.isValidElement,o=n(58);t.exports=o(r)},function(t,e,n){"use strict";function i(t,e,n){this.props=t,this.context=e,this.refs=l,this.updater=n||a}function r(){}var o=n(4),s=n(49),a=n(50),l=n(21);r.prototype=s.prototype,i.prototype=new r,i.prototype.constructor=i,o(i.prototype,s.prototype),i.prototype.isPureReactComponent=!0,t.exports=i},163,182,function(t,e){"use strict";function n(){return i++}var i=1;t.exports=n},function(t,e,n){"use strict";function i(t){return o.isValidElement(t)?void 0:r("143"),t}var r=n(20),o=n(19);n(1);t.exports=i},function(t,e,n){"use strict";function i(t,e){return t&&"object"==typeof t&&null!=t.key?u.escape(t.key):e.toString(36)}function r(t,e,n,o){var h=typeof t;if("undefined"!==h&&"boolean"!==h||(t=null),null===t||"string"===h||"number"===h||"object"===h&&t.$$typeof===a)return n(o,t,""===e?c+i(t,0):e),1;var p,f,m=0,g=""===e?c:e+d;if(Array.isArray(t))for(var v=0;v<t.length;v++)p=t[v],f=g+i(p,v),m+=r(p,f,n,o);else{var y=l(t);if(y){var b,w=y.call(t);if(y!==t.entries)for(var _=0;!(b=w.next()).done;)p=b.value,f=g+i(p,_++),m+=r(p,f,n,o);else for(;!(b=w.next()).done;){var x=b.value;x&&(p=x[1],f=g+u.escape(x[0])+d+i(p,0),m+=r(p,f,n,o))}}else if("object"===h){var k="",C=String(t);s("31","[object Object]"===C?"object with keys {"+Object.keys(t).join(", ")+"}":C,k)}}return m}function o(t,e,n){return null==t?0:r(t,"",e,n)}var s=n(20),a=(n(12),n(81)),l=n(198),u=(n(1),n(189)),c=(n(2),"."),d=":";t.exports=o},function(t,e){t.exports="function"==typeof fetch?fetch:function(t,e){return e=e||{},new Promise(function(n,i){function r(){var t,e=[],n=[],i={};return o.getAllResponseHeaders().replace(/^(.*?):\s*([\s\S]*?)$/gm,function(r,o,s){e.push(o=o.toLowerCase()),n.push([o,s]),t=i[o],i[o]=t?t+","+s:s}),{ok:1==(o.status/200|0),status:o.status,statusText:o.statusText,url:o.responseURL,clone:r,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},xml:function(){return Promise.resolve(o.responseXML)},blob:function(){return Promise.resolve(new Blob([o.response]))},headers:{keys:function(){return e},entries:function(){return n},get:function(t){return i[t.toLowerCase()]},has:function(t){return t.toLowerCase()in i}}}}var o=new XMLHttpRequest;o.open(e.method||"get",t);for(var s in e.headers)o.setRequestHeader(s,e.headers[s]);o.withCredentials="include"==e.credentials,o.onload=function(){n(r())},o.onerror=i,o.send(e.body)})}},function(t,e,n){"use strict";!function(e,n){t.exports=n()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){e.util=n(1),e.DOMutil=n(87),e.DataSet=n(88),e.DataView=n(92),e.Queue=n(91),e.Timeline=n(93),e.Graph2d=n(129),e.timeline={Core:n(110),DateUtil:n(109),Range:n(107),stack:n(115),TimeStep:n(113),components:{items:{Item:n(117),BackgroundItem:n(121),BoxItem:n(119),PointItem:n(120),RangeItem:n(116)},BackgroundGroup:n(118),Component:n(108),CurrentTime:n(127),CustomTime:n(125),DataAxis:n(131),DataScale:n(132),GraphGroup:n(133),Group:n(114),ItemSet:n(111),Legend:n(137),LineGraph:n(130),TimeAxis:n(122)}},e.moment=n(82),e.Hammer=n(101),e.keycharm=n(124)},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}var r=n(2),o=i(r),s=n(55),a=i(s),l=n(58),u=i(l),c=n(62),d=i(c),h=n(82),p=n(86);e.isNumber=function(t){return t instanceof Number||"number"==typeof t},e.recursiveDOMDelete=function(t){if(t)for(;t.hasChildNodes()===!0;)e.recursiveDOMDelete(t.firstChild),t.removeChild(t.firstChild)},e.giveRange=function(t,e,n,i){if(e==t)return.5;var r=1/(e-t);return Math.max(0,(i-t)*r)},e.isString=function(t){return t instanceof String||"string"==typeof t},e.isDate=function(t){if(t instanceof Date)return!0;if(e.isString(t)){var n=f.exec(t);if(n)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},e.randomUUID=function(){return p.v4()},e.assignAllKeys=function(t,e){for(var n in t)t.hasOwnProperty(n)&&"object"!==(0,d.default)(t[n])&&(t[n]=e)},e.fillIfDefined=function(t,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var r in t)void 0!==n[r]&&("object"!==(0,d.default)(n[r])?void 0!==n[r]&&null!==n[r]||void 0===t[r]||i!==!0?t[r]=n[r]:delete t[r]:"object"===(0,d.default)(t[r])&&e.fillIfDefined(t[r],n[r],i))},e.protoExtend=function(t,e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)t[r]=i[r]}return t},e.extend=function(t,e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t},e.selectiveExtend=function(t,e,n){if(!Array.isArray(t))throw new Error("Array with property names expected as first argument");for(var i=2;i<arguments.length;i++)for(var r=arguments[i],o=0;o<t.length;o++){var s=t[o];r.hasOwnProperty(s)&&(e[s]=r[s])}return e},e.selectiveDeepExtend=function(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o=2;o<arguments.length;o++)for(var s=arguments[o],a=0;a<t.length;a++){var l=t[a];if(s.hasOwnProperty(l))if(i[l]&&i[l].constructor===Object)void 0===n[l]&&(n[l]={}),n[l].constructor===Object?e.deepExtend(n[l],i[l],!1,r):null===i[l]&&void 0!==n[l]&&r===!0?delete n[l]:n[l]=i[l];else{if(Array.isArray(i[l]))throw new TypeError("Arrays are not supported by deepExtend");null===i[l]&&void 0!==n[l]&&r===!0?delete n[l]:n[l]=i[l]}}return n},e.selectiveNotDeepExtend=function(t,n,i){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(Array.isArray(i))throw new TypeError("Arrays are not supported by deepExtend");for(var o in i)if(i.hasOwnProperty(o)&&t.indexOf(o)==-1)if(i[o]&&i[o].constructor===Object)void 0===n[o]&&(n[o]={}),n[o].constructor===Object?e.deepExtend(n[o],i[o]):null===i[o]&&void 0!==n[o]&&r===!0?delete n[o]:n[o]=i[o];else if(Array.isArray(i[o])){n[o]=[];for(var s=0;s<i[o].length;s++)n[o].push(i[o][s])}else null===i[o]&&void 0!==n[o]&&r===!0?delete n[o]:n[o]=i[o];return n},e.deepExtend=function(t,n,i,r){for(var o in n)if(n.hasOwnProperty(o)||i===!0)if(n[o]&&n[o].constructor===Object)void 0===t[o]&&(t[o]={}),t[o].constructor===Object?e.deepExtend(t[o],n[o],i):null===n[o]&&void 0!==t[o]&&r===!0?delete t[o]:t[o]=n[o];else if(Array.isArray(n[o])){t[o]=[];for(var s=0;s<n[o].length;s++)t[o].push(n[o][s])}else null===n[o]&&void 0!==t[o]&&r===!0?delete t[o]:t[o]=n[o];return t},e.equalArray=function(t,e){if(t.length!=e.length)return!1;for(var n=0,i=t.length;n<i;n++)if(t[n]!=e[n])return!1;return!0},e.convert=function(t,n){var i;if(void 0!==t){if(null===t)return null;if(!n)return t;if("string"!=typeof n&&!(n instanceof String))throw new Error("Type must be a string");switch(n){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return e.isString(t)&&!isNaN(Date.parse(t))?h(t).valueOf():Number(t.valueOf());case"string":case"String":return String(t);case"Date":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(h.isMoment(t))return new Date(t.valueOf());if(e.isString(t))return i=f.exec(t),i?new Date(Number(i[1])):h(new Date(t)).toDate();throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"Moment":if(e.isNumber(t))return h(t);if(t instanceof Date)return h(t.valueOf());if(h.isMoment(t))return h(t);if(e.isString(t))return i=f.exec(t),h(i?Number(i[1]):t);throw new Error("Cannot convert object of type "+e.getType(t)+" to type Date");case"ISODate":if(e.isNumber(t))return new Date(t);if(t instanceof Date)return t.toISOString();if(h.isMoment(t))return t.toDate().toISOString();if(e.isString(t))return i=f.exec(t),i?new Date(Number(i[1])).toISOString():h(t).format();throw new Error("Cannot convert object of type "+e.getType(t)+" to type ISODate");case"ASPDate":if(e.isNumber(t))return"/Date("+t+")/";if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(e.isString(t)){i=f.exec(t);var r;return r=i?new Date(Number(i[1])).valueOf():new Date(t).valueOf(),"/Date("+r+")/"}throw new Error("Cannot convert object of type "+e.getType(t)+" to type ASPDate");default:throw new Error('Unknown type "'+n+'"')}}};var f=/^\/?Date\((\-?\d+)/i;e.getType=function(t){var e="undefined"==typeof t?"undefined":(0,d.default)(t);return"object"==e?null===t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":Array.isArray(t)?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":void 0===e?"undefined":e},e.copyAndExtendArray=function(t,e){for(var n=[],i=0;i<t.length;i++)n.push(t[i]);return n.push(e),n},e.copyArray=function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e},e.getAbsoluteLeft=function(t){return t.getBoundingClientRect().left},e.getAbsoluteRight=function(t){return t.getBoundingClientRect().right},e.getAbsoluteTop=function(t){return t.getBoundingClientRect().top},e.addClassName=function(t,e){var n=t.className.split(" ");n.indexOf(e)==-1&&(n.push(e),t.className=n.join(" "))},e.removeClassName=function(t,e){var n=t.className.split(" "),i=n.indexOf(e);i!=-1&&(n.splice(i,1),t.className=n.join(" "))},e.forEach=function(t,e){var n,i;if(Array.isArray(t))for(n=0,i=t.length;n<i;n++)e(t[n],n,t);else for(n in t)t.hasOwnProperty(n)&&e(t[n],n,t)},e.toArray=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e},e.updateProperty=function(t,e,n){return t[e]!==n&&(t[e]=n,!0)},e.throttle=function(t){var e=!1;return function(){e||(e=!0,requestAnimationFrame(function(){e=!1,t()}))}},e.addEventListener=function(t,e,n,i){t.addEventListener?(void 0===i&&(i=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,n,i)):t.attachEvent("on"+e,n)},e.removeEventListener=function(t,e,n,i){t.removeEventListener?(void 0===i&&(i=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,n,i)):t.detachEvent("on"+e,n)},e.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},e.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},e.hasParent=function(t,e){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1},e.option={},e.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},e.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t)||e||null:e||null},e.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?String(t):e||null},e.option.asSize=function(t,n){return"function"==typeof t&&(t=t()),e.isString(t)?t:e.isNumber(t)?t+"px":n||null},e.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},e.hexToRGB=function(t){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;t=t.replace(e,function(t,e,n,i){return e+e+n+n+i+i});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:null},e.overrideOpacity=function(t,n){if(t.indexOf("rgba")!=-1)return t;if(t.indexOf("rgb")!=-1){var i=t.substr(t.indexOf("(")+1).replace(")","").split(",");return"rgba("+i[0]+","+i[1]+","+i[2]+","+n+")"}var i=e.hexToRGB(t);return null==i?t:"rgba("+i.r+","+i.g+","+i.b+","+n+")"},e.RGBToHex=function(t,e,n){return"#"+((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},e.parseColor=function(t){var n;if(e.isString(t)===!0){if(e.isValidRGB(t)===!0){var i=t.substr(4).substr(0,t.length-5).split(",").map(function(t){return parseInt(t)});t=e.RGBToHex(i[0],i[1],i[2])}if(e.isValidHex(t)===!0){var r=e.hexToHSV(t),o={h:r.h,s:.8*r.s,v:Math.min(1,1.02*r.v)},s={h:r.h,s:Math.min(1,1.25*r.s),v:.8*r.v},a=e.HSVToHex(s.h,s.s,s.v),l=e.HSVToHex(o.h,o.s,o.v);n={background:t,border:a,highlight:{background:l,border:a},hover:{background:l,border:a}}}else n={background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else n={},n.background=t.background||void 0,n.border=t.border||void 0,e.isString(t.highlight)?n.highlight={border:t.highlight,background:t.highlight}:(n.highlight={},n.highlight.background=t.highlight&&t.highlight.background||void 0,n.highlight.border=t.highlight&&t.highlight.border||void 0),e.isString(t.hover)?n.hover={border:t.hover,background:t.hover}:(n.hover={},n.hover.background=t.hover&&t.hover.background||void 0,n.hover.border=t.hover&&t.hover.border||void 0);return n},e.RGBToHSV=function(t,e,n){t/=255,e/=255,n/=255;var i=Math.min(t,Math.min(e,n)),r=Math.max(t,Math.max(e,n));if(i==r)return{h:0,s:0,v:i};var o=t==i?e-n:n==i?t-e:n-t,s=t==i?3:n==i?1:5,a=60*(s-o/(r-i))/360,l=(r-i)/r,u=r;return{h:a,s:l,v:u}};var m={split:function(t){var e={};return t.split(";").forEach(function(t){if(""!=t.trim()){var n=t.split(":"),i=n[0].trim(),r=n[1].trim();e[i]=r}}),e},join:function(t){return(0,u.default)(t).map(function(e){return e+": "+t[e]}).join("; ")}};e.addCssText=function(t,n){var i=m.split(t.style.cssText),r=m.split(n),o=e.extend(i,r);t.style.cssText=m.join(o)},e.removeCssText=function(t,e){var n=m.split(t.style.cssText),i=m.split(e);for(var r in i)i.hasOwnProperty(r)&&delete n[r];t.style.cssText=m.join(n)},e.HSVToRGB=function(t,e,n){var i,r,o,s=Math.floor(6*t),a=6*t-s,l=n*(1-e),u=n*(1-a*e),c=n*(1-(1-a)*e);switch(s%6){case 0:i=n,r=c,o=l;break;case 1:i=u,r=n,o=l;break;case 2:i=l,r=n,o=c;break;case 3:i=l,r=u,o=n;break;case 4:i=c,r=l,o=n;break;case 5:i=n,r=l,o=u}return{r:Math.floor(255*i),g:Math.floor(255*r),b:Math.floor(255*o)}},e.HSVToHex=function(t,n,i){var r=e.HSVToRGB(t,n,i);return e.RGBToHex(r.r,r.g,r.b)},e.hexToHSV=function(t){var n=e.hexToRGB(t);return e.RGBToHSV(n.r,n.g,n.b)},e.isValidHex=function(t){var e=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return e},e.isValidRGB=function(t){t=t.replace(" ","");var e=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/i.test(t);return e},e.isValidRGBA=function(t){t=t.replace(" ","");var e=/rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(.{1,3})\)/i.test(t);return e},e.selectiveBridgeObject=function(t,n){if("object"==("undefined"==typeof n?"undefined":(0,d.default)(n))){for(var i=(0,a.default)(n),r=0;r<t.length;r++)n.hasOwnProperty(t[r])&&"object"==(0,d.default)(n[t[r]])&&(i[t[r]]=e.bridgeObject(n[t[r]]));return i}return null},e.bridgeObject=function(t){if("object"==("undefined"==typeof t?"undefined":(0,d.default)(t))){var n=(0,a.default)(t);for(var i in t)t.hasOwnProperty(i)&&"object"==(0,d.default)(t[i])&&(n[i]=e.bridgeObject(t[i]));return n}return null},e.insertSort=function(t,e){for(var n=0;n<t.length;n++){for(var i=t[n],r=n;r>0&&e(i,t[r-1])<0;r--)t[r]=t[r-1];t[r]=i}return t},e.mergeOptions=function(t,e,n){var i=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]?arguments[4]:{});if(null===e[n])t[n]=(0,a.default)(i[n]);else if(void 0!==e[n])if("boolean"==typeof e[n])t[n].enabled=e[n];else{void 0===e[n].enabled&&(t[n].enabled=!0);for(var r in e[n])e[n].hasOwnProperty(r)&&(t[n][r]=e[n][r])}},e.binarySearchCustom=function(t,e,n,i){for(var r=1e4,o=0,s=0,a=t.length-1;s<=a&&o<r;){var l=Math.floor((s+a)/2),u=t[l],c=void 0===i?u[n]:u[n][i],d=e(c);if(0==d)return l;d==-1?s=l+1:a=l-1,o++}return-1},e.binarySearchValue=function(t,e,n,i,r){for(var o,s,a,l,u=1e4,c=0,d=0,h=t.length-1,r=void 0!=r?r:function(t,e){return t==e?0:t<e?-1:1};d<=h&&c<u;){if(l=Math.floor(.5*(h+d)),o=t[Math.max(0,l-1)][n],s=t[l][n],a=t[Math.min(t.length-1,l+1)][n],0==r(s,e))return l;if(r(o,e)<0&&r(s,e)>0)return"before"==i?Math.max(0,l-1):l;if(r(s,e)<0&&r(a,e)>0)return"before"==i?l:Math.min(t.length-1,l+1);r(s,e)<0?d=l+1:h=l-1,c++}return-1},e.easingFunctions={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:function(t){return t<.5?2*t*t:-1+(4-2*t)*t},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return--t*t*t+1},easeInOutCubic:function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return 1- --t*t*t*t},easeInOutQuart:function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return 1+--t*t*t*t*t},easeInOutQuint:function(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}},e.getScrollBarWidth=function(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),document.body.appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;return n==i&&(i=e.clientWidth),document.body.removeChild(e),n-i},e.topMost=function(t,e){var n=void 0;Array.isArray(e)||(e=[e]);var i=!0,r=!1,s=void 0;try{for(var a,l=(0,o.default)(t);!(i=(a=l.next()).done);i=!0){var u=a.value;if(u){n=u[e[0]];for(var c=1;c<e.length;c++)n&&(n=n[e[c]]);if("undefined"!=typeof n)break}}}catch(t){r=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(r)throw s}}return n}},function(t,e,n){t.exports={default:n(3),__esModule:!0}},function(t,e,n){n(4),n(50),t.exports=n(52)},function(t,e,n){n(5);for(var i=n(16),r=n(20),o=n(8),s=n(47)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],l=0;l<5;l++){var u=a[l],c=i[u],d=c&&c.prototype;d&&!d[s]&&r(d,s,u),o[u]=o.Array}},function(t,e,n){var i=n(6),r=n(7),o=n(8),s=n(9);t.exports=n(13)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):"keys"==e?r(0,n):"values"==e?r(0,t[n]):r(0,[n,t[n]])},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e){t.exports={}},function(t,e,n){var i=n(10),r=n(12);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(11);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var i=n(14),r=n(15),o=n(30),s=n(20),a=n(31),l=n(8),u=n(32),c=n(46),d=n(48),h=n(47)("iterator"),p=!([].keys&&"next"in[].keys()),f="@@iterator",m="keys",g="values",v=function(){return this};t.exports=function(t,e,n,y,b,w,_){u(n,e,y);var x,k,C,S=function(t){if(!p&&t in E)return E[t];switch(t){case m:return function(){return new n(this,t)};case g:return function(){return new n(this,t)}}return function(){return new n(this,t)}},T=e+" Iterator",M=b==g,D=!1,E=t.prototype,O=E[h]||E[f]||b&&E[b],P=O||S(b),N=b?M?S("entries"):P:void 0,A="Array"==e?E.entries||O:O;if(A&&(C=d(A.call(new t)),C!==Object.prototype&&(c(C,T,!0),i||a(C,h)||s(C,h,v))),M&&O&&O.name!==g&&(D=!0,P=function(){return O.call(this)}),i&&!_||!p&&!D&&E[h]||s(E,h,P),l[e]=P,l[T]=v,b)if(x={values:M?P:S(g),keys:w?P:S(m),entries:N},_)for(k in x)k in E||o(E,k,x[k]);else r(r.P+r.F*(p||D),e,x);return x}},function(t,e){t.exports=!0},function(t,e,n){var i=n(16),r=n(17),o=n(18),s=n(20),a="prototype",l=function(t,e,n){var u,c,d,h=t&l.F,p=t&l.G,f=t&l.S,m=t&l.P,g=t&l.B,v=t&l.W,y=p?r:r[e]||(r[e]={}),b=y[a],w=p?i:f?i[e]:(i[e]||{})[a];p&&(n=e);for(u in n)c=!h&&w&&void 0!==w[u],c&&u in y||(d=c?w[u]:n[u],y[u]=p&&"function"!=typeof w[u]?n[u]:g&&c?o(d,i):v&&w[u]==d?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[a]=t[a],e}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[u]=d,t&l.R&&b&&!b[u]&&s(b,u,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(19);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(21),r=n(29);t.exports=n(25)?function(t,e,n){return i.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(22),r=n(24),o=n(28),s=Object.defineProperty;e.f=n(25)?Object.defineProperty:function(t,e,n){if(i(t),e=o(e,!0),i(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(23);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(25)&&!n(26)(function(){return 7!=Object.defineProperty(n(27)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=!n(26)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(23),r=n(16).document,o=i(r)&&i(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},function(t,e,n){var i=n(23);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports=n(20)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(33),r=n(29),o=n(46),s={};n(20)(s,n(47)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:r(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var i=n(22),r=n(34),o=n(44),s=n(41)("IE_PROTO"),a=function(){},l="prototype",u=function(){var t,e=n(27)("iframe"),i=o.length,r="<",s=">";for(e.style.display="none",n(45).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(r+"script"+s+"document.F=Object"+r+"/script"+s),t.close(),u=t.F;i--;)delete u[l][o[i]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[l]=i(t),n=new a,a[l]=null,n[s]=t):n=u(),void 0===e?n:r(n,e)}},function(t,e,n){var i=n(21),r=n(22),o=n(35);t.exports=n(25)?Object.defineProperties:function(t,e){r(t);for(var n,s=o(e),a=s.length,l=0;a>l;)i.f(t,n=s[l++],e[n]);return t}},function(t,e,n){var i=n(36),r=n(44);t.exports=Object.keys||function(t){return i(t,r)}},function(t,e,n){var i=n(31),r=n(9),o=n(37)(!1),s=n(41)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),l=0,u=[];for(n in a)n!=s&&i(a,n)&&u.push(n);for(;e.length>l;)i(a,n=e[l++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var i=n(9),r=n(38),o=n(40);t.exports=function(t){return function(e,n,s){var a,l=i(e),u=r(l.length),c=o(s,u);if(t&&n!=n){for(;u>c;)if(a=l[c++],a!=a)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var i=n(39),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(39),r=Math.max,o=Math.min;t.exports=function(t,e){return t=i(t),t<0?r(t+e,0):o(t,e)}},function(t,e,n){var i=n(42)("keys"),r=n(43);t.exports=function(t){return i[t]||(i[t]=r(t))}},function(t,e,n){var i=n(16),r="__core-js_shared__",o=i[r]||(i[r]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){t.exports=n(16).document&&document.documentElement},function(t,e,n){var i=n(21).f,r=n(31),o=n(47)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},function(t,e,n){var i=n(42)("wks"),r=n(43),o=n(16).Symbol,s="function"==typeof o,a=t.exports=function(t){return i[t]||(i[t]=s&&o[t]||(s?o:r)("Symbol."+t))};a.store=i},function(t,e,n){var i=n(31),r=n(49),o=n(41)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),i(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(12);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(51)(!0);n(13)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var i=n(39),r=n(12);t.exports=function(t){return function(e,n){var o,s,a=String(r(e)),l=i(n),u=a.length;return l<0||l>=u?t?"":void 0:(o=a.charCodeAt(l),o<55296||o>56319||l+1===u||(s=a.charCodeAt(l+1))<56320||s>57343?t?a.charAt(l):o:t?a.slice(l,l+2):(o-55296<<10)+(s-56320)+65536)}}},function(t,e,n){var i=n(22),r=n(53);t.exports=n(17).getIterator=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return i(e.call(t))}},function(t,e,n){var i=n(54),r=n(47)("iterator"),o=n(8);t.exports=n(17).getIteratorMethod=function(t){if(void 0!=t)return t[r]||t["@@iterator"]||o[i(t)]}},function(t,e,n){var i=n(11),r=n(47)("toStringTag"),o="Arguments"==i(function(){return arguments}()),s=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=s(e=Object(t),r))?n:o?i(e):"Object"==(a=i(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){t.exports={default:n(56),__esModule:!0}},function(t,e,n){n(57);var i=n(17).Object;t.exports=function(t,e){return i.create(t,e)}},function(t,e,n){var i=n(15);i(i.S,"Object",{create:n(33)})},function(t,e,n){t.exports={default:n(59),__esModule:!0}},function(t,e,n){n(60),t.exports=n(17).Object.keys},function(t,e,n){var i=n(49),r=n(35);n(61)("keys",function(){return function(t){return r(i(t))}})},function(t,e,n){var i=n(15),r=n(17),o=n(26);t.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],s={};s[t]=e(n),i(i.S+i.F*o(function(){n(1)}),"Object",s)}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(63),o=i(r),s=n(66),a=i(s),l="function"==typeof a.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":typeof t};e.default="function"==typeof a.default&&"symbol"===l(o.default)?function(t){return"undefined"==typeof t?"undefined":l(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":"undefined"==typeof t?"undefined":l(t)}},function(t,e,n){t.exports={default:n(64),__esModule:!0}},function(t,e,n){n(50),n(4),t.exports=n(65).f("iterator")},function(t,e,n){e.f=n(47)},function(t,e,n){t.exports={default:n(67),__esModule:!0}},function(t,e,n){n(68),n(79),n(80),n(81),t.exports=n(17).Symbol},function(t,e,n){var i=n(16),r=n(31),o=n(25),s=n(15),a=n(30),l=n(69).KEY,u=n(26),c=n(42),d=n(46),h=n(43),p=n(47),f=n(65),m=n(70),g=n(71),v=n(72),y=n(75),b=n(22),w=n(9),_=n(28),x=n(29),k=n(33),C=n(76),S=n(78),T=n(21),M=n(35),D=S.f,E=T.f,O=C.f,P=i.Symbol,N=i.JSON,A=N&&N.stringify,I="prototype",L=p("_hidden"),R=p("toPrimitive"),F={}.propertyIsEnumerable,j=c("symbol-registry"),H=c("symbols"),W=c("op-symbols"),z=Object[I],U="function"==typeof P,B=i.QObject,Y=!B||!B[I]||!B[I].findChild,V=o&&u(function(){return 7!=k(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=D(z,e);i&&delete z[e],E(t,e,n),i&&t!==z&&E(z,e,i)}:E,G=function(t){var e=H[t]=k(P[I]);return e._k=t,e},q=U&&"symbol"==typeof P.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof P},K=function(t,e,n){return t===z&&K(W,e,n),b(t),e=_(e,!0),b(n),r(H,e)?(n.enumerable?(r(t,L)&&t[L][e]&&(t[L][e]=!1),n=k(n,{enumerable:x(0,!1)})):(r(t,L)||E(t,L,x(1,{})),t[L][e]=!0),V(t,e,n)):E(t,e,n)},X=function(t,e){b(t);for(var n,i=v(e=w(e)),r=0,o=i.length;o>r;)K(t,n=i[r++],e[n]);return t},$=function(t,e){return void 0===e?k(t):X(k(t),e)},Z=function(t){var e=F.call(this,t=_(t,!0));return!(this===z&&r(H,t)&&!r(W,t))&&(!(e||!r(this,t)||!r(H,t)||r(this,L)&&this[L][t])||e)},Q=function(t,e){if(t=w(t),e=_(e,!0),t!==z||!r(H,e)||r(W,e)){var n=D(t,e);return!n||!r(H,e)||r(t,L)&&t[L][e]||(n.enumerable=!0),n}},J=function(t){for(var e,n=O(w(t)),i=[],o=0;n.length>o;)r(H,e=n[o++])||e==L||e==l||i.push(e);return i},tt=function(t){for(var e,n=t===z,i=O(n?W:w(t)),o=[],s=0;i.length>s;)!r(H,e=i[s++])||n&&!r(z,e)||o.push(H[e]);return o};U||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(W,n),r(this,L)&&r(this[L],t)&&(this[L][t]=!1),V(this,t,x(1,n))};return o&&Y&&V(z,t,{configurable:!0,set:e}),G(t)},a(P[I],"toString",function(){return this._k}),S.f=Q,T.f=K,n(77).f=C.f=J,n(74).f=Z,n(73).f=tt,o&&!n(14)&&a(z,"propertyIsEnumerable",Z,!0),
15
+ f.f=function(t){return G(p(t))}),s(s.G+s.W+s.F*!U,{Symbol:P});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)p(et[nt++]);for(var et=M(p.store),nt=0;et.length>nt;)m(et[nt++]);s(s.S+s.F*!U,"Symbol",{for:function(t){return r(j,t+="")?j[t]:j[t]=P(t)},keyFor:function(t){if(q(t))return g(j,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),s(s.S+s.F*!U,"Object",{create:$,defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:Q,getOwnPropertyNames:J,getOwnPropertySymbols:tt}),N&&s(s.S+s.F*(!U||u(function(){var t=P();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!q(t)){for(var e,n,i=[t],r=1;arguments.length>r;)i.push(arguments[r++]);return e=i[1],"function"==typeof e&&(n=e),!n&&y(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!q(e))return e}),i[1]=e,A.apply(N,i)}}}),P[I][R]||n(20)(P[I],R,P[I].valueOf),d(P,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},function(t,e,n){var i=n(43)("meta"),r=n(23),o=n(31),s=n(21).f,a=0,l=Object.isExtensible||function(){return!0},u=!n(26)(function(){return l(Object.preventExtensions({}))}),c=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},d=function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,i)){if(!l(t))return"F";if(!e)return"E";c(t)}return t[i].i},h=function(t,e){if(!o(t,i)){if(!l(t))return!0;if(!e)return!1;c(t)}return t[i].w},p=function(t){return u&&f.NEED&&l(t)&&!o(t,i)&&c(t),t},f=t.exports={KEY:i,NEED:!1,fastKey:d,getWeak:h,onFreeze:p}},function(t,e,n){var i=n(16),r=n(17),o=n(14),s=n(65),a=n(21).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=o?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var i=n(35),r=n(9);t.exports=function(t,e){for(var n,o=r(t),s=i(o),a=s.length,l=0;a>l;)if(o[n=s[l++]]===e)return n}},function(t,e,n){var i=n(35),r=n(73),o=n(74);t.exports=function(t){var e=i(t),n=r.f;if(n)for(var s,a=n(t),l=o.f,u=0;a.length>u;)l.call(t,s=a[u++])&&e.push(s);return e}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(11);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(9),r=n(77).f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return r(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?a(t):r(i(t))}},function(t,e,n){var i=n(36),r=n(44).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},function(t,e,n){var i=n(74),r=n(29),o=n(9),s=n(28),a=n(31),l=n(24),u=Object.getOwnPropertyDescriptor;e.f=n(25)?u:function(t,e){if(t=o(t),e=s(e,!0),l)try{return u(t,e)}catch(t){}if(a(t,e))return r(!i.f.call(t,e),t[e])}},function(t,e){},function(t,e,n){n(70)("asyncIterator")},function(t,e,n){n(70)("observable")},function(t,e,n){t.exports="undefined"!=typeof window&&window.moment||n(83)},function(t,e,n){(function(t){!function(e,n){t.exports=n()}(this,function(){function e(){return wi.apply(null,arguments)}function n(t){wi=t}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t){var e;for(e in t)return!1;return!0}function s(t){return void 0===t}function a(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function c(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function d(t,e){for(var n in e)c(e,n)&&(t[n]=e[n]);return c(e,"toString")&&(t.toString=e.toString),c(e,"valueOf")&&(t.valueOf=e.valueOf),t}function h(t,e,n,i){return be(t,e,n,i,!0).utc()}function p(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function f(t){return null==t._pf&&(t._pf=p()),t._pf}function m(t){if(null==t._isValid){var e=f(t),n=xi.call(e.parsedDateParts,function(t){return null!=t}),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function g(t){var e=h(NaN);return null!=t?d(f(e),t):f(e).userInvalidated=!0,e}function v(t,e){var n,i,r;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=f(e)),s(e._locale)||(t._locale=e._locale),ki.length>0)for(n=0;n<ki.length;n++)i=ki[n],r=e[i],s(r)||(t[i]=r);return t}function y(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Ci===!1&&(Ci=!0,e.updateOffset(this),Ci=!1)}function b(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function _(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function x(t,e,n){var i,r=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(i=0;i<r;i++)(n&&t[i]!==e[i]||!n&&_(t[i])!==_(e[i]))&&s++;return s+o}function k(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,n){var i=!0;return d(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,t),i){for(var r,o=[],s=0;s<arguments.length;s++){if(r="","object"==typeof arguments[s]){r+="\n["+s+"] ";for(var a in arguments[0])r+=a+": "+arguments[0][a]+", ";r=r.slice(0,-2)}else r=arguments[s];o.push(r)}k(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),i=!1}return n.apply(this,arguments)},n)}function S(t,n){null!=e.deprecationHandler&&e.deprecationHandler(t,n),Si[t]||(k(n),Si[t]=!0)}function T(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function M(t){var e,n;for(n in t)e=t[n],T(e)?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function D(t,e){var n,i=d({},t);for(n in e)c(e,n)&&(r(t[n])&&r(e[n])?(i[n]={},d(i[n],t[n]),d(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)c(t,n)&&!c(e,n)&&r(t[n])&&(i[n]=d({},i[n]));return i}function E(t){null!=t&&this.set(t)}function O(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return T(i)?i.call(e,n):i}function P(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function N(){return this._invalidDate}function A(t){return this._ordinal.replace("%d",t)}function I(t,e,n,i){var r=this._relativeTime[n];return T(r)?r(t,e,n,i):r.replace(/%d/i,t)}function L(t,e){var n=this._relativeTime[t>0?"future":"past"];return T(n)?n(e):n.replace(/%s/i,e)}function R(t,e){var n=t.toLowerCase();Li[n]=Li[n+"s"]=Li[e]=t}function F(t){return"string"==typeof t?Li[t]||Li[t.toLowerCase()]:void 0}function j(t){var e,n,i={};for(n in t)c(t,n)&&(e=F(n),e&&(i[e]=t[n]));return i}function H(t,e){Ri[t]=e}function W(t){var e=[];for(var n in t)e.push({unit:n,priority:Ri[n]});return e.sort(function(t,e){return t.priority-e.priority}),e}function z(t,n){return function(i){return null!=i?(B(this,t,i),e.updateOffset(this,n),this):U(this,t)}}function U(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function B(t,e,n){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](n)}function Y(t){return t=F(t),T(this[t])?this[t]():this}function V(t,e){if("object"==typeof t){t=j(t);for(var n=W(t),i=0;i<n.length;i++)this[n[i].unit](t[n[i].unit])}else if(t=F(t),T(this[t]))return this[t](e);return this}function G(t,e,n){var i=""+Math.abs(t),r=e-i.length,o=t>=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function q(t,e,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),t&&(Wi[t]=r),e&&(Wi[e[0]]=function(){return G(r.apply(this,arguments),e[1],e[2])}),n&&(Wi[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),t)})}function K(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function X(t){var e,n,i=t.match(Fi);for(e=0,n=i.length;e<n;e++)Wi[i[e]]?i[e]=Wi[i[e]]:i[e]=K(i[e]);return function(e){var r,o="";for(r=0;r<n;r++)o+=T(i[r])?i[r].call(e,t):i[r];return o}}function $(t,e){return t.isValid()?(e=Z(e,t.localeData()),Hi[e]=Hi[e]||X(e),Hi[e](t)):t.localeData().invalidDate()}function Z(t,e){function n(t){return e.longDateFormat(t)||t}var i=5;for(ji.lastIndex=0;i>=0&&ji.test(t);)t=t.replace(ji,n),ji.lastIndex=0,i-=1;return t}function Q(t,e,n){rr[t]=T(e)?e:function(t,i){return t&&n?n:e}}function J(t,e){return c(rr,t)?rr[t](e._strict,e._locale):new RegExp(tt(t))}function tt(t){return et(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,i,r){return e||n||i||r}))}function et(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function nt(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),a(e)&&(i=function(t,n){n[e]=_(t)}),n=0;n<t.length;n++)or[t[n]]=i}function it(t,e){nt(t,function(t,n,i,r){i._w=i._w||{},e(t,i._w,i,r)})}function rt(t,e,n){null!=e&&c(or,t)&&or[t](e,n._a,n,t)}function ot(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function st(t,e){return t?i(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||gr).test(e)?"format":"standalone"][t.month()]:i(this._months)?this._months:this._months.standalone}function at(t,e){return t?i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[gr.test(e)?"format":"standalone"][t.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)o=h([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?(r=mr.call(this._shortMonthsParse,s),r!==-1?r:null):(r=mr.call(this._longMonthsParse,s),r!==-1?r:null):"MMM"===e?(r=mr.call(this._shortMonthsParse,s),r!==-1?r:(r=mr.call(this._longMonthsParse,s),r!==-1?r:null)):(r=mr.call(this._longMonthsParse,s),r!==-1?r:(r=mr.call(this._shortMonthsParse,s),r!==-1?r:null))}function ut(t,e,n){var i,r,o;if(this._monthsParseExact)return lt.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=h([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(o="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}}function ct(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=_(e);else if(e=t.localeData().monthsParse(e),!a(e))return t;return n=Math.min(t.date(),ot(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function dt(t){return null!=t?(ct(this,t),e.updateOffset(this,!0),this):U(this,"Month")}function ht(){return ot(this.year(),this.month())}function pt(t){return this._monthsParseExact?(c(this,"_monthsRegex")||mt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=br),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(t){return this._monthsParseExact?(c(this,"_monthsRegex")||mt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=wr),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function mt(){function t(t,e){return e.length-t.length}var e,n,i=[],r=[],o=[];for(e=0;e<12;e++)n=h([2e3,e]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(i.sort(t),r.sort(t),o.sort(t),e=0;e<12;e++)i[e]=et(i[e]),r[e]=et(r[e]);for(e=0;e<24;e++)o[e]=et(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function gt(t){return vt(t)?366:365}function vt(t){return t%4===0&&t%100!==0||t%400===0}function yt(){return vt(this.year())}function bt(t,e,n,i,r,o,s){var a=new Date(t,e,n,i,r,o,s);return t<100&&t>=0&&isFinite(a.getFullYear())&&a.setFullYear(t),a}function wt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function _t(t,e,n){var i=7+e-n,r=(7+wt(t,0,i).getUTCDay()-e)%7;return-r+i-1}function xt(t,e,n,i,r){var o,s,a=(7+n-i)%7,l=_t(t,i,r),u=1+7*(e-1)+a+l;return u<=0?(o=t-1,s=gt(o)+u):u>gt(t)?(o=t+1,s=u-gt(t)):(o=t,s=u),{year:o,dayOfYear:s}}function kt(t,e,n){var i,r,o=_t(t.year(),e,n),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?(r=t.year()-1,i=s+Ct(r,e,n)):s>Ct(t.year(),e,n)?(i=s-Ct(t.year(),e,n),r=t.year()+1):(r=t.year(),i=s),{week:i,year:r}}function Ct(t,e,n){var i=_t(t,e,n),r=_t(t+1,e,n);return(gt(t)-i+r)/7}function St(t){return kt(t,this._week.dow,this._week.doy).week}function Tt(){return this._week.dow}function Mt(){return this._week.doy}function Dt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Et(t){var e=kt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function Ot(t,e){return"string"!=typeof t?t:isNaN(t)?(t=e.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Pt(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Nt(t,e){return t?i(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone}function At(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function It(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Lt(t,e,n){var i,r,o,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=h([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?(r=mr.call(this._weekdaysParse,s),r!==-1?r:null):"ddd"===e?(r=mr.call(this._shortWeekdaysParse,s),r!==-1?r:null):(r=mr.call(this._minWeekdaysParse,s),r!==-1?r:null):"dddd"===e?(r=mr.call(this._weekdaysParse,s),r!==-1?r:(r=mr.call(this._shortWeekdaysParse,s),r!==-1?r:(r=mr.call(this._minWeekdaysParse,s),r!==-1?r:null))):"ddd"===e?(r=mr.call(this._shortWeekdaysParse,s),r!==-1?r:(r=mr.call(this._weekdaysParse,s),r!==-1?r:(r=mr.call(this._minWeekdaysParse,s),r!==-1?r:null))):(r=mr.call(this._minWeekdaysParse,s),r!==-1?r:(r=mr.call(this._weekdaysParse,s),r!==-1?r:(r=mr.call(this._shortWeekdaysParse,s),r!==-1?r:null)))}function Rt(t,e,n){var i,r,o;if(this._weekdaysParseExact)return Lt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=h([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}}function Ft(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Ot(t,this.localeData()),this.add(t-e,"d")):e}function jt(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ht(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=Pt(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Wt(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Tr),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function zt(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Mr),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ut(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Dr),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Bt(){function t(t,e){return e.length-t.length}var e,n,i,r,o,s=[],a=[],l=[],u=[];for(e=0;e<7;e++)n=h([2e3,1]).day(e),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),l.push(o),u.push(i),u.push(r),u.push(o);for(s.sort(t),a.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)a[e]=et(a[e]),l[e]=et(l[e]),u[e]=et(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Yt(){return this.hours()%12||12}function Vt(){return this.hours()||24}function Gt(t,e){q(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function qt(t,e){return e._meridiemParse}function Kt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Xt(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function $t(t){return t?t.toLowerCase().replace("_","-"):t}function Zt(t){for(var e,n,i,r,o=0;o<t.length;){for(r=$t(t[o]).split("-"),e=r.length,n=$t(t[o+1]),n=n?n.split("-"):null;e>0;){if(i=Qt(r.slice(0,e).join("-")))return i;if(n&&n.length>=e&&x(r,n,!0)>=e-1)break;e--}o++}return null}function Qt(e){var n=null;if(!Ar[e]&&"undefined"!=typeof t&&t&&t.exports)try{n=Er._abbr,!function(){var t=new Error('Cannot find module "./locale"');throw t.code="MODULE_NOT_FOUND",t}(),Jt(n)}catch(t){}return Ar[e]}function Jt(t,e){var n;return t&&(n=s(e)?ne(t):te(t,e),n&&(Er=n)),Er._abbr}function te(t,e){if(null!==e){var n=Nr;if(e.abbr=t,null!=Ar[t])S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ar[t]._config;else if(null!=e.parentLocale){if(null==Ar[e.parentLocale])return Ir[e.parentLocale]||(Ir[e.parentLocale]=[]),Ir[e.parentLocale].push({name:t,config:e}),null;n=Ar[e.parentLocale]._config}return Ar[t]=new E(D(n,e)),Ir[t]&&Ir[t].forEach(function(t){te(t.name,t.config)}),Jt(t),Ar[t]}return delete Ar[t],null}function ee(t,e){if(null!=e){var n,i=Nr;null!=Ar[t]&&(i=Ar[t]._config),e=D(i,e),n=new E(e),n.parentLocale=Ar[t],Ar[t]=n,Jt(t)}else null!=Ar[t]&&(null!=Ar[t].parentLocale?Ar[t]=Ar[t].parentLocale:null!=Ar[t]&&delete Ar[t]);return Ar[t]}function ne(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Er;if(!i(t)){if(e=Qt(t))return e;t=[t]}return Zt(t)}function ie(){return Di(Ar)}function re(t){var e,n=t._a;return n&&f(t).overflow===-2&&(e=n[ar]<0||n[ar]>11?ar:n[lr]<1||n[lr]>ot(n[sr],n[ar])?lr:n[ur]<0||n[ur]>24||24===n[ur]&&(0!==n[cr]||0!==n[dr]||0!==n[hr])?ur:n[cr]<0||n[cr]>59?cr:n[dr]<0||n[dr]>59?dr:n[hr]<0||n[hr]>999?hr:-1,f(t)._overflowDayOfYear&&(e<sr||e>lr)&&(e=lr),f(t)._overflowWeeks&&e===-1&&(e=pr),f(t)._overflowWeekday&&e===-1&&(e=fr),f(t).overflow=e),t}function oe(t){var e,n,i,r,o,s,a=t._i,l=Lr.exec(a)||Rr.exec(a);if(l){for(f(t).iso=!0,e=0,n=jr.length;e<n;e++)if(jr[e][1].exec(l[1])){r=jr[e][0],i=jr[e][2]!==!1;break}if(null==r)return void(t._isValid=!1);if(l[3]){for(e=0,n=Hr.length;e<n;e++)if(Hr[e][1].exec(l[3])){o=(l[2]||" ")+Hr[e][0];break}if(null==o)return void(t._isValid=!1)}if(!i&&null!=o)return void(t._isValid=!1);if(l[4]){if(!Fr.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=r+(o||"")+(s||""),he(t)}else t._isValid=!1}function se(t){var e,n,i,r,o,s,a,l,u={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},c="YXWVUTSRQPONZABCDEFGHIKLM";if(e=t._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),n=zr.exec(e)){if(i=n[1]?"ddd"+(5===n[1].length?", ":" "):"",r="D MMM "+(n[2].length>10?"YYYY ":"YY "),o="HH:mm"+(n[4]?":ss":""),n[1]){var d=new Date(n[2]),h=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][d.getDay()];if(n[1].substr(0,3)!==h)return f(t).weekdayMismatch=!0,void(t._isValid=!1)}switch(n[5].length){case 2:0===l?a=" +0000":(l=c.indexOf(n[5][1].toUpperCase())-12,a=(l<0?" -":" +")+(""+l).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:a=u[n[5]];break;default:a=u[" GMT"]}n[5]=a,t._i=n.splice(1).join(""),s=" ZZ",t._f=i+r+o+s,he(t),f(t).rfc2822=!0}else t._isValid=!1}function ae(t){var n=Wr.exec(t._i);return null!==n?void(t._d=new Date(+n[1])):(oe(t),void(t._isValid===!1&&(delete t._isValid,se(t),t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t)))))}function le(t,e,n){return null!=t?t:null!=e?e:n}function ue(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function ce(t){var e,n,i,r,o=[];if(!t._d){for(i=ue(t),t._w&&null==t._a[lr]&&null==t._a[ar]&&de(t),null!=t._dayOfYear&&(r=le(t._a[sr],i[sr]),(t._dayOfYear>gt(r)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=wt(r,0,t._dayOfYear),t._a[ar]=n.getUTCMonth(),t._a[lr]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=i[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ur]&&0===t._a[cr]&&0===t._a[dr]&&0===t._a[hr]&&(t._nextDay=!0,t._a[ur]=0),t._d=(t._useUTC?wt:bt).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ur]=24)}}function de(t){var e,n,i,r,o,s,a,l;if(e=t._w,null!=e.GG||null!=e.W||null!=e.E)o=1,s=4,n=le(e.GG,t._a[sr],kt(we(),1,4).year),i=le(e.W,1),r=le(e.E,1),(r<1||r>7)&&(l=!0);else{o=t._locale._week.dow,s=t._locale._week.doy;var u=kt(we(),o,s);n=le(e.gg,t._a[sr],u.year),i=le(e.w,u.week),null!=e.d?(r=e.d,(r<0||r>6)&&(l=!0)):null!=e.e?(r=e.e+o,(e.e<0||e.e>6)&&(l=!0)):r=o}i<1||i>Ct(n,o,s)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(a=xt(n,i,r,o,s),t._a[sr]=a.year,t._dayOfYear=a.dayOfYear)}function he(t){if(t._f===e.ISO_8601)return void oe(t);if(t._f===e.RFC_2822)return void se(t);t._a=[],f(t).empty=!0;var n,i,r,o,s,a=""+t._i,l=a.length,u=0;for(r=Z(t._f,t._locale).match(Fi)||[],n=0;n<r.length;n++)o=r[n],i=(a.match(J(o,t))||[])[0],i&&(s=a.substr(0,a.indexOf(i)),s.length>0&&f(t).unusedInput.push(s),a=a.slice(a.indexOf(i)+i.length),u+=i.length),Wi[o]?(i?f(t).empty=!1:f(t).unusedTokens.push(o),rt(o,i,t)):t._strict&&!i&&f(t).unusedTokens.push(o);f(t).charsLeftOver=l-u,a.length>0&&f(t).unusedInput.push(a),t._a[ur]<=12&&f(t).bigHour===!0&&t._a[ur]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[ur]=pe(t._locale,t._a[ur],t._meridiem),ce(t),re(t)}function pe(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(i=t.isPM(n),i&&e<12&&(e+=12),i||12!==e||(e=0),e):e}function fe(t){var e,n,i,r,o;if(0===t._f.length)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(r=0;r<t._f.length;r++)o=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[r],he(e),m(e)&&(o+=f(e).charsLeftOver,o+=10*f(e).unusedTokens.length,f(e).score=o,(null==i||o<i)&&(i=o,n=e));d(t,n||e)}function me(t){if(!t._d){var e=j(t._i);t._a=u([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ce(t)}}function ge(t){var e=new y(re(ve(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function ve(t){var e=t._i,n=t._f;return t._locale=t._locale||ne(t._l),null===e||void 0===n&&""===e?g({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),b(e)?new y(re(e)):(l(e)?t._d=e:i(n)?fe(t):n?he(t):ye(t),m(t)||(t._d=null),t))}function ye(t){var n=t._i;s(n)?t._d=new Date(e.now()):l(n)?t._d=new Date(n.valueOf()):"string"==typeof n?ae(t):i(n)?(t._a=u(n.slice(0),function(t){return parseInt(t,10)}),ce(t)):r(n)?me(t):a(n)?t._d=new Date(n):e.createFromInputFallback(t)}function be(t,e,n,s,a){var l={};return n!==!0&&n!==!1||(s=n,n=void 0),(r(t)&&o(t)||i(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=t,l._f=e,l._strict=s,ge(l)}function we(t,e,n,i){return be(t,e,n,i,!1)}function _e(t,e){var n,r;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return we();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}function xe(){var t=[].slice.call(arguments,0);return _e("isBefore",t)}function ke(){var t=[].slice.call(arguments,0);return _e("isAfter",t)}function Ce(t){for(var e in t)if(Vr.indexOf(e)===-1||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,i=0;i<Vr.length;++i)if(t[Vr[i]]){if(n)return!1;parseFloat(t[Vr[i]])!==_(t[Vr[i]])&&(n=!0)}return!0}function Se(){return this._isValid}function Te(){return Ve(NaN)}function Me(t){var e=j(t),n=e.year||0,i=e.quarter||0,r=e.month||0,o=e.week||0,s=e.day||0,a=e.hour||0,l=e.minute||0,u=e.second||0,c=e.millisecond||0;this._isValid=Ce(e),this._milliseconds=+c+1e3*u+6e4*l+1e3*a*60*60,this._days=+s+7*o,this._months=+r+3*i+12*n,this._data={},this._locale=ne(),this._bubble()}function De(t){return t instanceof Me}function Ee(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function Oe(t,e){q(t,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+G(~~(t/60),2)+e+G(~~t%60,2)})}function Pe(t,e){var n=(e||"").match(t);if(null===n)return null;var i=n[n.length-1]||[],r=(i+"").match(Gr)||["-",0,0],o=+(60*r[1])+_(r[2]);return 0===o?0:"+"===r[0]?o:-o}function Ne(t,n){var i,r;return n._isUTC?(i=n.clone(),r=(b(t)||l(t)?t.valueOf():we(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+r),e.updateOffset(i,!1),i):we(t).local()}function Ae(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ie(t,n,i){var r,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(t=Pe(er,t),null===t)return this}else Math.abs(t)<16&&!i&&(t*=60);return!this._isUTC&&n&&(r=Ae(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==t&&(!n||this._changeInProgress?$e(this,Ve(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?o:Ae(this)}function Le(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Re(t){return this.utcOffset(0,t)}function Fe(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ae(this),"m")),this}function je(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Pe(tr,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function He(t){return!!this.isValid()&&(t=t?we(t).utcOffset():0,(this.utcOffset()-t)%60===0)}function We(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ze(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),t=ve(t),t._a){var e=t._isUTC?h(t._a):we(t._a);this._isDSTShifted=this.isValid()&&x(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ue(){return!!this.isValid()&&!this._isUTC}function Be(){return!!this.isValid()&&this._isUTC}function Ye(){return!!this.isValid()&&this._isUTC&&0===this._offset}function Ve(t,e){var n,i,r,o=t,s=null;return De(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:a(t)?(o={},e?o[e]=t:o.milliseconds=t):(s=qr.exec(t))?(n="-"===s[1]?-1:1,o={y:0,d:_(s[lr])*n,h:_(s[ur])*n,m:_(s[cr])*n,s:_(s[dr])*n,ms:_(Ee(1e3*s[hr]))*n}):(s=Kr.exec(t))?(n="-"===s[1]?-1:1,o={y:Ge(s[2],n),M:Ge(s[3],n),w:Ge(s[4],n),d:Ge(s[5],n),h:Ge(s[6],n),m:Ge(s[7],n),s:Ge(s[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(r=Ke(we(o.from),we(o.to)),o={},o.ms=r.milliseconds,o.M=r.months),i=new Me(o),De(t)&&c(t,"_locale")&&(i._locale=t._locale),i}function Ge(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function qe(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ke(t,e){var n;return t.isValid()&&e.isValid()?(e=Ne(e,t),t.isBefore(e)?n=qe(t,e):(n=qe(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Xe(t,e){return function(n,i){var r,o;return null===i||isNaN(+i)||(S(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=i,i=o),n="string"==typeof n?+n:n,r=Ve(n,i),$e(this,r,t),this}}function $e(t,n,i,r){var o=n._milliseconds,s=Ee(n._days),a=Ee(n._months);t.isValid()&&(r=null==r||r,o&&t._d.setTime(t._d.valueOf()+o*i),s&&B(t,"Date",U(t,"Date")+s*i),a&&ct(t,U(t,"Month")+a*i),r&&e.updateOffset(t,s||a))}function Ze(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Qe(t,n){var i=t||we(),r=Ne(i,this).startOf("day"),o=e.calendarFormat(this,r)||"sameElse",s=n&&(T(n[o])?n[o].call(this,i):n[o]);return this.format(s||this.localeData().calendar(o,this,we(i)))}function Je(){return new y(this)}function tn(t,e){var n=b(t)?t:we(t);return!(!this.isValid()||!n.isValid())&&(e=F(s(e)?"millisecond":e),"millisecond"===e?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())}function en(t,e){var n=b(t)?t:we(t);return!(!this.isValid()||!n.isValid())&&(e=F(s(e)?"millisecond":e),"millisecond"===e?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())}function nn(t,e,n,i){return i=i||"()",("("===i[0]?this.isAfter(t,n):!this.isBefore(t,n))&&(")"===i[1]?this.isBefore(e,n):!this.isAfter(e,n))}function rn(t,e){var n,i=b(t)?t:we(t);return!(!this.isValid()||!i.isValid())&&(e=F(e||"millisecond"),"millisecond"===e?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()));
16
+ }function on(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function sn(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function an(t,e,n){var i,r,o,s;return this.isValid()?(i=Ne(t,this),i.isValid()?(r=6e4*(i.utcOffset()-this.utcOffset()),e=F(e),"year"===e||"month"===e||"quarter"===e?(s=ln(this,i),"quarter"===e?s/=3:"year"===e&&(s/=12)):(o=this-i,s="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-r)/864e5:"week"===e?(o-r)/6048e5:o),n?s:w(s)):NaN):NaN}function ln(t,e){var n,i,r=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(r,"months");return e-o<0?(n=t.clone().add(r-1,"months"),i=(e-o)/(o-n)):(n=t.clone().add(r+1,"months"),i=(e-o)/(n-o)),-(r+i)||0}function un(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function cn(){if(!this.isValid())return null;var t=this.clone().utc();return t.year()<0||t.year()>9999?$(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):T(Date.prototype.toISOString)?this.toDate().toISOString():$(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function dn(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",o=e+'[")]';return this.format(n+i+r+o)}function hn(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=$(this,t);return this.localeData().postformat(n)}function pn(t,e){return this.isValid()&&(b(t)&&t.isValid()||we(t).isValid())?Ve({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function fn(t){return this.from(we(),t)}function mn(t,e){return this.isValid()&&(b(t)&&t.isValid()||we(t).isValid())?Ve({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function gn(t){return this.to(we(),t)}function vn(t){var e;return void 0===t?this._locale._abbr:(e=ne(t),null!=e&&(this._locale=e),this)}function yn(){return this._locale}function bn(t){switch(t=F(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function wn(t){return t=F(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function _n(){return this._d.valueOf()-6e4*(this._offset||0)}function xn(){return Math.floor(this.valueOf()/1e3)}function kn(){return new Date(this.valueOf())}function Cn(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Sn(){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 Tn(){return this.isValid()?this.toISOString():null}function Mn(){return m(this)}function Dn(){return d({},f(this))}function En(){return f(this).overflow}function On(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Pn(t,e){q(0,[t,t.length],0,e)}function Nn(t){return Rn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function An(t){return Rn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function In(){return Ct(this.year(),1,4)}function Ln(){var t=this.localeData()._week;return Ct(this.year(),t.dow,t.doy)}function Rn(t,e,n,i,r){var o;return null==t?kt(this,i,r).year:(o=Ct(t,i,r),e>o&&(e=o),Fn.call(this,t,e,n,i,r))}function Fn(t,e,n,i,r){var o=xt(t,e,n,i,r),s=wt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function jn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Hn(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function Wn(t,e){e[hr]=_(1e3*("0."+t))}function zn(){return this._isUTC?"UTC":""}function Un(){return this._isUTC?"Coordinated Universal Time":""}function Bn(t){return we(1e3*t)}function Yn(){return we.apply(null,arguments).parseZone()}function Vn(t){return t}function Gn(t,e,n,i){var r=ne(),o=h().set(i,e);return r[n](o,t)}function qn(t,e,n){if(a(t)&&(e=t,t=void 0),t=t||"",null!=e)return Gn(t,e,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Gn(t,i,n,"month");return r}function Kn(t,e,n,i){"boolean"==typeof t?(a(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,a(e)&&(n=e,e=void 0),e=e||"");var r=ne(),o=t?r._week.dow:0;if(null!=n)return Gn(e,(n+o)%7,i,"day");var s,l=[];for(s=0;s<7;s++)l[s]=Gn(e,(s+o)%7,i,"day");return l}function Xn(t,e){return qn(t,e,"months")}function $n(t,e){return qn(t,e,"monthsShort")}function Zn(t,e,n){return Kn(t,e,n,"weekdays")}function Qn(t,e,n){return Kn(t,e,n,"weekdaysShort")}function Jn(t,e,n){return Kn(t,e,n,"weekdaysMin")}function ti(){var t=this._data;return this._milliseconds=oo(this._milliseconds),this._days=oo(this._days),this._months=oo(this._months),t.milliseconds=oo(t.milliseconds),t.seconds=oo(t.seconds),t.minutes=oo(t.minutes),t.hours=oo(t.hours),t.months=oo(t.months),t.years=oo(t.years),this}function ei(t,e,n,i){var r=Ve(e,n);return t._milliseconds+=i*r._milliseconds,t._days+=i*r._days,t._months+=i*r._months,t._bubble()}function ni(t,e){return ei(this,t,e,1)}function ii(t,e){return ei(this,t,e,-1)}function ri(t){return t<0?Math.floor(t):Math.ceil(t)}function oi(){var t,e,n,i,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*ri(ai(a)+s),s=0,a=0),l.milliseconds=o%1e3,t=w(o/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,n=w(e/60),l.hours=n%24,s+=w(n/24),r=w(si(s)),a+=r,s-=ri(ai(r)),i=w(a/12),a%=12,l.days=s,l.months=a,l.years=i,this}function si(t){return 4800*t/146097}function ai(t){return 146097*t/4800}function li(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if(t=F(t),"month"===t||"year"===t)return e=this._days+i/864e5,n=this._months+si(e),"month"===t?n:n/12;switch(e=this._days+Math.round(ai(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}}function ui(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*_(this._months/12):NaN}function ci(t){return function(){return this.as(t)}}function di(t){return t=F(t),this.isValid()?this[t+"s"]():NaN}function hi(t){return function(){return this.isValid()?this._data[t]:NaN}}function pi(){return w(this.days()/7)}function fi(t,e,n,i,r){return r.relativeTime(e||1,!!n,t,i)}function mi(t,e,n){var i=Ve(t).abs(),r=xo(i.as("s")),o=xo(i.as("m")),s=xo(i.as("h")),a=xo(i.as("d")),l=xo(i.as("M")),u=xo(i.as("y")),c=r<=ko.ss&&["s",r]||r<ko.s&&["ss",r]||o<=1&&["m"]||o<ko.m&&["mm",o]||s<=1&&["h"]||s<ko.h&&["hh",s]||a<=1&&["d"]||a<ko.d&&["dd",a]||l<=1&&["M"]||l<ko.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=e,c[3]=+t>0,c[4]=n,fi.apply(null,c)}function gi(t){return void 0===t?xo:"function"==typeof t&&(xo=t,!0)}function vi(t,e){return void 0!==ko[t]&&(void 0===e?ko[t]:(ko[t]=e,"s"===t&&(ko.ss=e-1),!0))}function yi(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=mi(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function bi(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,i=Co(this._milliseconds)/1e3,r=Co(this._days),o=Co(this._months);t=w(i/60),e=w(t/60),i%=60,t%=60,n=w(o/12),o%=12;var s=n,a=o,l=r,u=e,c=t,d=i,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(l?l+"D":"")+(u||c||d?"T":"")+(u?u+"H":"")+(c?c+"M":"")+(d?d+"S":""):"P0D"}var wi,_i;_i=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var xi=_i,ki=e.momentProperties=[],Ci=!1,Si={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var Ti;Ti=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)c(t,e)&&n.push(e);return n};var Mi,Di=Ti,Ei={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Oi={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"},Pi="Invalid date",Ni="%d",Ai=/\d{1,2}/,Ii={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Li={},Ri={},Fi=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ji=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Hi={},Wi={},zi=/\d/,Ui=/\d\d/,Bi=/\d{3}/,Yi=/\d{4}/,Vi=/[+-]?\d{6}/,Gi=/\d\d?/,qi=/\d\d\d\d?/,Ki=/\d\d\d\d\d\d?/,Xi=/\d{1,3}/,$i=/\d{1,4}/,Zi=/[+-]?\d{1,6}/,Qi=/\d+/,Ji=/[+-]?\d+/,tr=/Z|[+-]\d\d:?\d\d/gi,er=/Z|[+-]\d\d(?::?\d\d)?/gi,nr=/[+-]?\d+(\.\d{1,3})?/,ir=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,rr={},or={},sr=0,ar=1,lr=2,ur=3,cr=4,dr=5,hr=6,pr=7,fr=8;Mi=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};var mr=Mi;q("M",["MM",2],"Mo",function(){return this.month()+1}),q("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),q("MMMM",0,0,function(t){return this.localeData().months(this,t)}),R("month","M"),H("month",8),Q("M",Gi),Q("MM",Gi,Ui),Q("MMM",function(t,e){return e.monthsShortRegex(t)}),Q("MMMM",function(t,e){return e.monthsRegex(t)}),nt(["M","MM"],function(t,e){e[ar]=_(t)-1}),nt(["MMM","MMMM"],function(t,e,n,i){var r=n._locale.monthsParse(t,i,n._strict);null!=r?e[ar]=r:f(n).invalidMonth=t});var gr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,vr="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),yr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),br=ir,wr=ir;q("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),q(0,["YY",2],0,function(){return this.year()%100}),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),R("year","y"),H("year",1),Q("Y",Ji),Q("YY",Gi,Ui),Q("YYYY",$i,Yi),Q("YYYYY",Zi,Vi),Q("YYYYYY",Zi,Vi),nt(["YYYYY","YYYYYY"],sr),nt("YYYY",function(t,n){n[sr]=2===t.length?e.parseTwoDigitYear(t):_(t)}),nt("YY",function(t,n){n[sr]=e.parseTwoDigitYear(t)}),nt("Y",function(t,e){e[sr]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return _(t)+(_(t)>68?1900:2e3)};var _r=z("FullYear",!0);q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),H("week",5),H("isoWeek",5),Q("w",Gi),Q("ww",Gi,Ui),Q("W",Gi),Q("WW",Gi,Ui),it(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=_(t)});var xr={dow:0,doy:6};q("d",0,"do","day"),q("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),q("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),q("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),Q("d",Gi),Q("e",Gi),Q("E",Gi),Q("dd",function(t,e){return e.weekdaysMinRegex(t)}),Q("ddd",function(t,e){return e.weekdaysShortRegex(t)}),Q("dddd",function(t,e){return e.weekdaysRegex(t)}),it(["dd","ddd","dddd"],function(t,e,n,i){var r=n._locale.weekdaysParse(t,i,n._strict);null!=r?e.d=r:f(n).invalidWeekday=t}),it(["d","e","E"],function(t,e,n,i){e[i]=_(t)});var kr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Cr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Sr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Tr=ir,Mr=ir,Dr=ir;q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Yt),q("k",["kk",2],0,Vt),q("hmm",0,0,function(){return""+Yt.apply(this)+G(this.minutes(),2)}),q("hmmss",0,0,function(){return""+Yt.apply(this)+G(this.minutes(),2)+G(this.seconds(),2)}),q("Hmm",0,0,function(){return""+this.hours()+G(this.minutes(),2)}),q("Hmmss",0,0,function(){return""+this.hours()+G(this.minutes(),2)+G(this.seconds(),2)}),Gt("a",!0),Gt("A",!1),R("hour","h"),H("hour",13),Q("a",qt),Q("A",qt),Q("H",Gi),Q("h",Gi),Q("k",Gi),Q("HH",Gi,Ui),Q("hh",Gi,Ui),Q("kk",Gi,Ui),Q("hmm",qi),Q("hmmss",Ki),Q("Hmm",qi),Q("Hmmss",Ki),nt(["H","HH"],ur),nt(["k","kk"],function(t,e,n){var i=_(t);e[ur]=24===i?0:i}),nt(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),nt(["h","hh"],function(t,e,n){e[ur]=_(t),f(n).bigHour=!0}),nt("hmm",function(t,e,n){var i=t.length-2;e[ur]=_(t.substr(0,i)),e[cr]=_(t.substr(i)),f(n).bigHour=!0}),nt("hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[ur]=_(t.substr(0,i)),e[cr]=_(t.substr(i,2)),e[dr]=_(t.substr(r)),f(n).bigHour=!0}),nt("Hmm",function(t,e,n){var i=t.length-2;e[ur]=_(t.substr(0,i)),e[cr]=_(t.substr(i))}),nt("Hmmss",function(t,e,n){var i=t.length-4,r=t.length-2;e[ur]=_(t.substr(0,i)),e[cr]=_(t.substr(i,2)),e[dr]=_(t.substr(r))});var Er,Or=/[ap]\.?m?\.?/i,Pr=z("Hours",!0),Nr={calendar:Ei,longDateFormat:Oi,invalidDate:Pi,ordinal:Ni,dayOfMonthOrdinalParse:Ai,relativeTime:Ii,months:vr,monthsShort:yr,week:xr,weekdays:kr,weekdaysMin:Sr,weekdaysShort:Cr,meridiemParse:Or},Ar={},Ir={},Lr=/^\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)?)?$/,Rr=/^\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)?)?$/,Fr=/Z|[+-]\d\d(?::?\d\d)?/,jr=[["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}/]],Hr=[["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/]],Wr=/^\/?Date\((\-?\d+)/i,zr=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;e.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),e.ISO_8601=function(){},e.RFC_2822=function(){};var Ur=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=we.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()}),Br=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=we.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:g()}),Yr=function(){return Date.now?Date.now():+new Date},Vr=["year","quarter","month","week","day","hour","minute","second","millisecond"];Oe("Z",":"),Oe("ZZ",""),Q("Z",er),Q("ZZ",er),nt(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Pe(er,t)});var Gr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var qr=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Kr=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Ve.fn=Me.prototype,Ve.invalid=Te;var Xr=Xe(1,"add"),$r=Xe(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Zr=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)});q(0,["gg",2],0,function(){return this.weekYear()%100}),q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Pn("gggg","weekYear"),Pn("ggggg","weekYear"),Pn("GGGG","isoWeekYear"),Pn("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),Q("G",Ji),Q("g",Ji),Q("GG",Gi,Ui),Q("gg",Gi,Ui),Q("GGGG",$i,Yi),Q("gggg",$i,Yi),Q("GGGGG",Zi,Vi),Q("ggggg",Zi,Vi),it(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,i){e[i.substr(0,2)]=_(t)}),it(["gg","GG"],function(t,n,i,r){n[r]=e.parseTwoDigitYear(t)}),q("Q",0,"Qo","quarter"),R("quarter","Q"),H("quarter",7),Q("Q",zi),nt("Q",function(t,e){e[ar]=3*(_(t)-1)}),q("D",["DD",2],"Do","date"),R("date","D"),H("date",9),Q("D",Gi),Q("DD",Gi,Ui),Q("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),nt(["D","DD"],lr),nt("Do",function(t,e){e[lr]=_(t.match(Gi)[0],10)});var Qr=z("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),H("dayOfYear",4),Q("DDD",Xi),Q("DDDD",Bi),nt(["DDD","DDDD"],function(t,e,n){n._dayOfYear=_(t)}),q("m",["mm",2],0,"minute"),R("minute","m"),H("minute",14),Q("m",Gi),Q("mm",Gi,Ui),nt(["m","mm"],cr);var Jr=z("Minutes",!1);q("s",["ss",2],0,"second"),R("second","s"),H("second",15),Q("s",Gi),Q("ss",Gi,Ui),nt(["s","ss"],dr);var to=z("Seconds",!1);q("S",0,0,function(){return~~(this.millisecond()/100)}),q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),R("millisecond","ms"),H("millisecond",16),Q("S",Xi,zi),Q("SS",Xi,Ui),Q("SSS",Xi,Bi);var eo;for(eo="SSSS";eo.length<=9;eo+="S")Q(eo,Qi);for(eo="S";eo.length<=9;eo+="S")nt(eo,Wn);var no=z("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var io=y.prototype;io.add=Xr,io.calendar=Qe,io.clone=Je,io.diff=an,io.endOf=wn,io.format=hn,io.from=pn,io.fromNow=fn,io.to=mn,io.toNow=gn,io.get=Y,io.invalidAt=En,io.isAfter=tn,io.isBefore=en,io.isBetween=nn,io.isSame=rn,io.isSameOrAfter=on,io.isSameOrBefore=sn,io.isValid=Mn,io.lang=Zr,io.locale=vn,io.localeData=yn,io.max=Br,io.min=Ur,io.parsingFlags=Dn,io.set=V,io.startOf=bn,io.subtract=$r,io.toArray=Cn,io.toObject=Sn,io.toDate=kn,io.toISOString=cn,io.inspect=dn,io.toJSON=Tn,io.toString=un,io.unix=xn,io.valueOf=_n,io.creationData=On,io.year=_r,io.isLeapYear=yt,io.weekYear=Nn,io.isoWeekYear=An,io.quarter=io.quarters=jn,io.month=dt,io.daysInMonth=ht,io.week=io.weeks=Dt,io.isoWeek=io.isoWeeks=Et,io.weeksInYear=Ln,io.isoWeeksInYear=In,io.date=Qr,io.day=io.days=Ft,io.weekday=jt,io.isoWeekday=Ht,io.dayOfYear=Hn,io.hour=io.hours=Pr,io.minute=io.minutes=Jr,io.second=io.seconds=to,io.millisecond=io.milliseconds=no,io.utcOffset=Ie,io.utc=Re,io.local=Fe,io.parseZone=je,io.hasAlignedHourOffset=He,io.isDST=We,io.isLocal=Ue,io.isUtcOffset=Be,io.isUtc=Ye,io.isUTC=Ye,io.zoneAbbr=zn,io.zoneName=Un,io.dates=C("dates accessor is deprecated. Use date instead.",Qr),io.months=C("months accessor is deprecated. Use month instead",dt),io.years=C("years accessor is deprecated. Use year instead",_r),io.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Le),io.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",ze);var ro=E.prototype;ro.calendar=O,ro.longDateFormat=P,ro.invalidDate=N,ro.ordinal=A,ro.preparse=Vn,ro.postformat=Vn,ro.relativeTime=I,ro.pastFuture=L,ro.set=M,ro.months=st,ro.monthsShort=at,ro.monthsParse=ut,ro.monthsRegex=ft,ro.monthsShortRegex=pt,ro.week=St,ro.firstDayOfYear=Mt,ro.firstDayOfWeek=Tt,ro.weekdays=Nt,ro.weekdaysMin=It,ro.weekdaysShort=At,ro.weekdaysParse=Rt,ro.weekdaysRegex=Wt,ro.weekdaysShortRegex=zt,ro.weekdaysMinRegex=Ut,ro.isPM=Kt,ro.meridiem=Xt,Jt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===_(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),e.lang=C("moment.lang is deprecated. Use moment.locale instead.",Jt),e.langData=C("moment.langData is deprecated. Use moment.localeData instead.",ne);var oo=Math.abs,so=ci("ms"),ao=ci("s"),lo=ci("m"),uo=ci("h"),co=ci("d"),ho=ci("w"),po=ci("M"),fo=ci("y"),mo=hi("milliseconds"),go=hi("seconds"),vo=hi("minutes"),yo=hi("hours"),bo=hi("days"),wo=hi("months"),_o=hi("years"),xo=Math.round,ko={ss:44,s:45,m:45,h:22,d:26,M:11},Co=Math.abs,So=Me.prototype;return So.isValid=Se,So.abs=ti,So.add=ni,So.subtract=ii,So.as=li,So.asMilliseconds=so,So.asSeconds=ao,So.asMinutes=lo,So.asHours=uo,So.asDays=co,So.asWeeks=ho,So.asMonths=po,So.asYears=fo,So.valueOf=ui,So._bubble=oi,So.get=di,So.milliseconds=mo,So.seconds=go,So.minutes=vo,So.hours=yo,So.days=bo,So.weeks=pi,So.months=wo,So.years=_o,So.humanize=yi,So.toISOString=bi,So.toString=bi,So.toJSON=bi,So.locale=vn,So.localeData=yn,So.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bi),So.lang=Zr,q("X",0,0,"unix"),q("x",0,0,"valueOf"),Q("x",Ji),Q("X",nr),nt("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),nt("x",function(t,e,n){n._d=new Date(_(t))}),e.version="2.18.0",n(we),e.fn=io,e.min=xe,e.max=ke,e.now=Yr,e.utc=h,e.unix=Bn,e.months=Xn,e.isDate=l,e.locale=Jt,e.invalid=g,e.duration=Ve,e.isMoment=b,e.weekdays=Zn,e.parseZone=Yn,e.localeData=ne,e.isDuration=De,e.monthsShort=$n,e.weekdaysMin=Jn,e.defineLocale=te,e.updateLocale=ee,e.locales=ie,e.weekdaysShort=Qn,e.normalizeUnits=F,e.relativeTimeRounding=gi,e.relativeTimeThreshold=vi,e.calendarFormat=Ze,e.prototype=io,e})}).call(e,n(84)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){function n(t){throw new Error("Cannot find module '"+t+"'.")}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id=85},function(t,e){(function(e){function n(t,e,n){var i=e&&n||0,r=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){r<16&&(e[i+r++]=d[t])});r<16;)e[i+r++]=0;return e}function i(t,e){var n=e||0,i=c;return i[t[n++]]+i[t[n++]]+i[t[n++]]+i[t[n++]]+"-"+i[t[n++]]+i[t[n++]]+"-"+i[t[n++]]+i[t[n++]]+"-"+i[t[n++]]+i[t[n++]]+"-"+i[t[n++]]+i[t[n++]]+i[t[n++]]+i[t[n++]]+i[t[n++]]+i[t[n++]]}function r(t,e,n){var r=e&&n||0,o=e||[];t=t||{};var s=void 0!==t.clockseq?t.clockseq:m,a=void 0!==t.msecs?t.msecs:(new Date).getTime(),l=void 0!==t.nsecs?t.nsecs:v+1,u=a-g+(l-v)/1e4;if(u<0&&void 0===t.clockseq&&(s=s+1&16383),(u<0||a>g)&&void 0===t.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=a,v=l,m=s,a+=122192928e5;var c=(1e4*(268435455&a)+l)%4294967296;o[r++]=c>>>24&255,o[r++]=c>>>16&255,o[r++]=c>>>8&255,o[r++]=255&c;var d=a/4294967296*1e4&268435455;o[r++]=d>>>8&255,o[r++]=255&d,o[r++]=d>>>24&15|16,o[r++]=d>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(var h=t.node||f,p=0;p<6;p++)o[r+p]=h[p];return e?e:i(o)}function o(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var o=t.random||(t.rng||s)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;a<16;a++)e[r+a]=o[a];return e||i(o)}var s,a="undefined"!=typeof window?window:"undefined"!=typeof e?e:null;if(a&&a.crypto&&crypto.getRandomValues){var l=new Uint8Array(16);s=function(){return crypto.getRandomValues(l),l}}if(!s){var u=new Array(16);s=function(){for(var t,e=0;e<16;e++)0===(3&e)&&(t=4294967296*Math.random()),u[e]=t>>>((3&e)<<3)&255;return u}}for(var c=[],d={},h=0;h<256;h++)c[h]=(h+256).toString(16).substr(1),d[c[h]]=h;var p=s(),f=[1|p[0],p[1],p[2],p[3],p[4],p[5]],m=16383&(p[6]<<8|p[7]),g=0,v=0,y=o;y.v1=r,y.v4=o,y.parse=n,y.unparse=i,t.exports=y}).call(e,function(){return this}())},function(t,e){e.prepareElements=function(t){for(var e in t)t.hasOwnProperty(e)&&(t[e].redundant=t[e].used,t[e].used=[])},e.cleanupElements=function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].redundant){for(var n=0;n<t[e].redundant.length;n++)t[e].redundant[n].parentNode.removeChild(t[e].redundant[n]);t[e].redundant=[]}},e.resetElements=function(t){e.prepareElements(t),e.cleanupElements(t),e.prepareElements(t)},e.getSVGElement=function(t,e,n){var i;return e.hasOwnProperty(t)?e[t].redundant.length>0?(i=e[t].redundant[0],e[t].redundant.shift()):(i=document.createElementNS("http://www.w3.org/2000/svg",t),n.appendChild(i)):(i=document.createElementNS("http://www.w3.org/2000/svg",t),e[t]={used:[],redundant:[]},n.appendChild(i)),e[t].used.push(i),i},e.getDOMElement=function(t,e,n,i){var r;return e.hasOwnProperty(t)?e[t].redundant.length>0?(r=e[t].redundant[0],e[t].redundant.shift()):(r=document.createElement(t),void 0!==i?n.insertBefore(r,i):n.appendChild(r)):(r=document.createElement(t),e[t]={used:[],redundant:[]},void 0!==i?n.insertBefore(r,i):n.appendChild(r)),e[t].used.push(r),r},e.drawPoint=function(t,n,i,r,o,s){var a;if("circle"==i.style?(a=e.getSVGElement("circle",r,o),a.setAttributeNS(null,"cx",t),a.setAttributeNS(null,"cy",n),a.setAttributeNS(null,"r",.5*i.size)):(a=e.getSVGElement("rect",r,o),a.setAttributeNS(null,"x",t-.5*i.size),a.setAttributeNS(null,"y",n-.5*i.size),a.setAttributeNS(null,"width",i.size),a.setAttributeNS(null,"height",i.size)),void 0!==i.styles&&a.setAttributeNS(null,"style",i.styles),a.setAttributeNS(null,"class",i.className+" vis-point"),s){var l=e.getSVGElement("text",r,o);s.xOffset&&(t+=s.xOffset),s.yOffset&&(n+=s.yOffset),s.content&&(l.textContent=s.content),s.className&&l.setAttributeNS(null,"class",s.className+" vis-label"),l.setAttributeNS(null,"x",t),l.setAttributeNS(null,"y",n)}return a},e.drawBar=function(t,n,i,r,o,s,a,l){if(0!=r){r<0&&(r*=-1,n-=r);var u=e.getSVGElement("rect",s,a);u.setAttributeNS(null,"x",t-.5*i),u.setAttributeNS(null,"y",n),u.setAttributeNS(null,"width",i),u.setAttributeNS(null,"height",r),u.setAttributeNS(null,"class",o),l&&u.setAttributeNS(null,"style",l)}}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(t&&!Array.isArray(t)&&(e=t,t=null),this._options=e||{},this._data={},this.length=0,this._fieldId=this._options.fieldId||"id",this._type={},this._options.type)for(var n=(0,c.default)(this._options.type),i=0,r=n.length;i<r;i++){var o=n[i],s=this._options.type[o];"Date"==s||"ISODate"==s||"ASPDate"==s?this._type[o]="Date":this._type[o]=s}if(this._options.convert)throw new Error('Option "convert" is deprecated. Use "type" instead.');this._subscribers={},t&&this.add(t),this.setOptions(e)}var o=n(89),s=i(o),a=n(62),l=i(a),u=n(58),c=i(u),d=n(1),h=n(91);r.prototype.setOptions=function(t){t&&void 0!==t.queue&&(t.queue===!1?this._queue&&(this._queue.destroy(),delete this._queue):(this._queue||(this._queue=h.extend(this,{replace:["add","update","remove"]})),"object"===(0,l.default)(t.queue)&&this._queue.setOptions(t.queue)))},r.prototype.on=function(t,e){var n=this._subscribers[t];n||(n=[],this._subscribers[t]=n),n.push({callback:e})},r.prototype.subscribe=function(){throw new Error("DataSet.subscribe is deprecated. Use DataSet.on instead.")},r.prototype.off=function(t,e){var n=this._subscribers[t];n&&(this._subscribers[t]=n.filter(function(t){return t.callback!=e}))},r.prototype.unsubscribe=function(){throw new Error("DataSet.unsubscribe is deprecated. Use DataSet.off instead.")},r.prototype._trigger=function(t,e,n){if("*"==t)throw new Error("Cannot trigger event *");var i=[];t in this._subscribers&&(i=i.concat(this._subscribers[t])),"*"in this._subscribers&&(i=i.concat(this._subscribers["*"]));for(var r=0,o=i.length;r<o;r++){var s=i[r];s.callback&&s.callback(t,e,n||null)}},r.prototype.add=function(t,e){var n,i=[],r=this;if(Array.isArray(t))for(var o=0,s=t.length;o<s;o++)n=r._addItem(t[o]),i.push(n);else{if(!t||"object"!==("undefined"==typeof t?"undefined":(0,l.default)(t)))throw new Error("Unknown dataType");n=r._addItem(t),i.push(n)}return i.length&&this._trigger("add",{items:i},e),i},r.prototype.update=function(t,e){var n=[],i=[],r=[],o=[],s=this,a=s._fieldId,u=function(t){var e=t[a];if(s._data[e]){var l=d.extend({},s._data[e]);e=s._updateItem(t),i.push(e),o.push(t),r.push(l)}else e=s._addItem(t),n.push(e)};if(Array.isArray(t))for(var c=0,h=t.length;c<h;c++)t[c]&&"object"===(0,l.default)(t[c])?u(t[c]):console.warn("Ignoring input item, which is not an object at index "+c);else{if(!t||"object"!==("undefined"==typeof t?"undefined":(0,l.default)(t)))throw new Error("Unknown dataType");u(t)}if(n.length&&this._trigger("add",{items:n},e),i.length){var p={items:i,oldData:r,data:o};this._trigger("update",p,e)}return n.concat(i)},r.prototype.get=function(t){var e,n,i,r=this,o=d.getType(arguments[0]);"String"==o||"Number"==o?(e=arguments[0],i=arguments[1]):"Array"==o?(n=arguments[0],i=arguments[1]):i=arguments[0];var s;if(i&&i.returnType){var a=["Array","Object"];s=a.indexOf(i.returnType)==-1?"Array":i.returnType}else s="Array";var l,u,h,p,f,m=i&&i.type||this._options.type,g=i&&i.filter,v=[];if(void 0!=e)l=r._getItem(e,m),l&&g&&!g(l)&&(l=null);else if(void 0!=n)for(p=0,f=n.length;p<f;p++)l=r._getItem(n[p],m),g&&!g(l)||v.push(l);else for(u=(0,c.default)(this._data),p=0,f=u.length;p<f;p++)h=u[p],l=r._getItem(h,m),g&&!g(l)||v.push(l);if(i&&i.order&&void 0==e&&this._sort(v,i.order),i&&i.fields){var y=i.fields;if(void 0!=e)l=this._filterFields(l,y);else for(p=0,f=v.length;p<f;p++)v[p]=this._filterFields(v[p],y)}if("Object"==s){var b,w={};for(p=0,f=v.length;p<f;p++)b=v[p],w[b.id]=b;return w}return void 0!=e?l:v},r.prototype.getIds=function(t){var e,n,i,r,o,s=this._data,a=t&&t.filter,l=t&&t.order,u=t&&t.type||this._options.type,d=(0,c.default)(s),h=[];if(a)if(l){for(o=[],e=0,n=d.length;e<n;e++)i=d[e],r=this._getItem(i,u),a(r)&&o.push(r);for(this._sort(o,l),e=0,n=o.length;e<n;e++)h.push(o[e][this._fieldId])}else for(e=0,n=d.length;e<n;e++)i=d[e],r=this._getItem(i,u),a(r)&&h.push(r[this._fieldId]);else if(l){for(o=[],e=0,n=d.length;e<n;e++)i=d[e],o.push(s[i]);for(this._sort(o,l),e=0,n=o.length;e<n;e++)h.push(o[e][this._fieldId])}else for(e=0,n=d.length;e<n;e++)i=d[e],r=s[i],h.push(r[this._fieldId]);return h},r.prototype.getDataSet=function(){return this},r.prototype.forEach=function(t,e){var n,i,r,o,s=e&&e.filter,a=e&&e.type||this._options.type,l=this._data,u=(0,c.default)(l);if(e&&e.order){var d=this.get(e);for(n=0,i=d.length;n<i;n++)r=d[n],o=r[this._fieldId],t(r,o)}else for(n=0,i=u.length;n<i;n++)o=u[n],r=this._getItem(o,a),s&&!s(r)||t(r,o)},r.prototype.map=function(t,e){var n,i,r,o,s=e&&e.filter,a=e&&e.type||this._options.type,l=[],u=this._data,d=(0,c.default)(u);for(n=0,i=d.length;n<i;n++)r=d[n],o=this._getItem(r,a),s&&!s(o)||l.push(t(o,r));return e&&e.order&&this._sort(l,e.order),l},r.prototype._filterFields=function(t,e){if(!t)return t;var n,i,r={},o=(0,c.default)(t),s=o.length;if(Array.isArray(e))for(n=0;n<s;n++)i=o[n],e.indexOf(i)!=-1&&(r[i]=t[i]);else for(n=0;n<s;n++)i=o[n],e.hasOwnProperty(i)&&(r[e[i]]=t[i]);return r},r.prototype._sort=function(t,e){if(d.isString(e)){var n=e;t.sort(function(t,e){var i=t[n],r=e[n];return i>r?1:i<r?-1:0})}else{if("function"!=typeof e)throw new TypeError("Order must be a function or a string");t.sort(e)}},r.prototype.remove=function(t,e){var n,i,r,o,s=[],a=[],l=[];for(l=Array.isArray(t)?t:[t],n=0,i=l.length;n<i;n++)o=this._remove(l[n]),o&&(r=o[this._fieldId],
17
+ void 0!=r&&(s.push(r),a.push(o)));return s.length&&this._trigger("remove",{items:s,oldData:a},e),s},r.prototype._remove=function(t){var e,n;return d.isNumber(t)||d.isString(t)?n=t:t&&"object"===("undefined"==typeof t?"undefined":(0,l.default)(t))&&(n=t[this._fieldId]),void 0!==n&&this._data[n]?(e=this._data[n],delete this._data[n],this.length--,e):null},r.prototype.clear=function(t){var e,n,i=(0,c.default)(this._data),r=[];for(e=0,n=i.length;e<n;e++)r.push(this._data[i[e]]);return this._data={},this.length=0,this._trigger("remove",{items:i,oldData:r},t),i},r.prototype.max=function(t){var e,n,i=this._data,r=(0,c.default)(i),o=null,s=null;for(e=0,n=r.length;e<n;e++){var a=r[e],l=i[a],u=l[t];null!=u&&(!o||u>s)&&(o=l,s=u)}return o},r.prototype.min=function(t){var e,n,i=this._data,r=(0,c.default)(i),o=null,s=null;for(e=0,n=r.length;e<n;e++){var a=r[e],l=i[a],u=l[t];null!=u&&(!o||u<s)&&(o=l,s=u)}return o},r.prototype.distinct=function(t){var e,n,i,r=this._data,o=(0,c.default)(r),s=[],a=this._options.type&&this._options.type[t]||null,l=0;for(e=0,i=o.length;e<i;e++){var u=o[e],h=r[u],p=h[t],f=!1;for(n=0;n<l;n++)if(s[n]==p){f=!0;break}f||void 0===p||(s[l]=p,l++)}if(a)for(e=0,i=s.length;e<i;e++)s[e]=d.convert(s[e],a);return s},r.prototype._addItem=function(t){var e=t[this._fieldId];if(void 0!=e){if(this._data[e])throw new Error("Cannot add item: item with id "+e+" already exists")}else e=d.randomUUID(),t[this._fieldId]=e;var n,i,r={},o=(0,c.default)(t);for(n=0,i=o.length;n<i;n++){var s=o[n],a=this._type[s];r[s]=d.convert(t[s],a)}return this._data[e]=r,this.length++,e},r.prototype._getItem=function(t,e){var n,i,r,o,s=this._data[t];if(!s)return null;var a={},l=(0,c.default)(s);if(e)for(r=0,o=l.length;r<o;r++)n=l[r],i=s[n],a[n]=d.convert(i,e[n]);else for(r=0,o=l.length;r<o;r++)n=l[r],i=s[n],a[n]=i;return a[this._fieldId]||(a[this._fieldId]=s.id),a},r.prototype._updateItem=function(t){var e=t[this._fieldId];if(void 0==e)throw new Error("Cannot update item: item has no id (item: "+(0,s.default)(t)+")");var n=this._data[e];if(!n)throw new Error("Cannot update item: no item with id "+e+" found");for(var i=(0,c.default)(t),r=0,o=i.length;r<o;r++){var a=i[r],l=this._type[a];n[a]=d.convert(t[a],l)}return e},t.exports=r},function(t,e,n){t.exports={default:n(90),__esModule:!0}},function(t,e,n){var i=n(17),r=i.JSON||(i.JSON={stringify:JSON.stringify});t.exports=function(t){return r.stringify.apply(r,arguments)}},function(t,e){function n(t){this.delay=null,this.max=1/0,this._queue=[],this._timeout=null,this._extended=null,this.setOptions(t)}n.prototype.setOptions=function(t){t&&"undefined"!=typeof t.delay&&(this.delay=t.delay),t&&"undefined"!=typeof t.max&&(this.max=t.max),this._flushIfNeeded()},n.extend=function(t,e){var i=new n(e);if(void 0!==t.flush)throw new Error("Target object already has a property flush");t.flush=function(){i.flush()};var r=[{name:"flush",original:void 0}];if(e&&e.replace)for(var o=0;o<e.replace.length;o++){var s=e.replace[o];r.push({name:s,original:t[s]}),i.replace(t,s)}return i._extended={object:t,methods:r},i},n.prototype.destroy=function(){if(this.flush(),this._extended){for(var t=this._extended.object,e=this._extended.methods,n=0;n<e.length;n++){var i=e[n];i.original?t[i.name]=i.original:delete t[i.name]}this._extended=null}},n.prototype.replace=function(t,e){var n=this,i=t[e];if(!i)throw new Error("Method "+e+" undefined");t[e]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];n.queue({args:t,fn:i,context:this})}},n.prototype.queue=function(t){"function"==typeof t?this._queue.push({fn:t}):this._queue.push(t),this._flushIfNeeded()},n.prototype._flushIfNeeded=function(){if(this._queue.length>this.max&&this.flush(),clearTimeout(this._timeout),this.queue.length>0&&"number"==typeof this.delay){var t=this;this._timeout=setTimeout(function(){t.flush()},this.delay)}},n.prototype.flush=function(){for(;this._queue.length>0;){var t=this._queue.shift();t.fn.apply(t.context||t.fn,t.args||[])}},t.exports=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){this._data=null,this._ids={},this.length=0,this._options=e||{},this._fieldId="id",this._subscribers={};var n=this;this.listener=function(){n._onEvent.apply(n,arguments)},this.setData(t)}var o=n(58),s=i(o),a=n(1),l=n(88);r.prototype.setData=function(t){var e,n,i,r,o;if(this._data){for(this._data.off&&this._data.off("*",this.listener),e=this._data.getIds({filter:this._options&&this._options.filter}),o=[],i=0,r=e.length;i<r;i++)o.push(this._data._data[e[i]]);this._ids={},this.length=0,this._trigger("remove",{items:e,oldData:o})}if(this._data=t,this._data){for(this._fieldId=this._options.fieldId||this._data&&this._data.options&&this._data.options.fieldId||"id",e=this._data.getIds({filter:this._options&&this._options.filter}),i=0,r=e.length;i<r;i++)n=e[i],this._ids[n]=!0;this.length=e.length,this._trigger("add",{items:e}),this._data.on&&this._data.on("*",this.listener)}},r.prototype.refresh=function(){var t,e,n,i=this._data.getIds({filter:this._options&&this._options.filter}),r=(0,s.default)(this._ids),o={},a=[],l=[],u=[];for(e=0,n=i.length;e<n;e++)t=i[e],o[t]=!0,this._ids[t]||(a.push(t),this._ids[t]=!0);for(e=0,n=r.length;e<n;e++)t=r[e],o[t]||(l.push(t),u.push(this._data._data[t]),delete this._ids[t]);this.length+=a.length-l.length,a.length&&this._trigger("add",{items:a}),l.length&&this._trigger("remove",{items:l,oldData:u})},r.prototype.get=function(t){var e,n,i,r=this,o=a.getType(arguments[0]);"String"==o||"Number"==o||"Array"==o?(e=arguments[0],n=arguments[1],i=arguments[2]):(n=arguments[0],i=arguments[1]);var s=a.extend({},this._options,n);this._options.filter&&n&&n.filter&&(s.filter=function(t){return r._options.filter(t)&&n.filter(t)});var l=[];return void 0!=e&&l.push(e),l.push(s),l.push(i),this._data&&this._data.get.apply(this._data,l)},r.prototype.getIds=function(t){var e;if(this._data){var n,i=this._options.filter;n=t&&t.filter?i?function(e){return i(e)&&t.filter(e)}:t.filter:i,e=this._data.getIds({filter:n,order:t&&t.order})}else e=[];return e},r.prototype.map=function(t,e){var n=[];if(this._data){var i,r=this._options.filter;i=e&&e.filter?r?function(t){return r(t)&&e.filter(t)}:e.filter:r,n=this._data.map(t,{filter:i,order:e&&e.order})}else n=[];return n},r.prototype.getDataSet=function(){for(var t=this;t instanceof r;)t=t._data;return t||null},r.prototype._onEvent=function(t,e,n){var i,r,o,s,a=e&&e.items,l=[],u=[],c=[],d=[],h=[],p=[];if(a&&this._data){switch(t){case"add":for(i=0,r=a.length;i<r;i++)o=a[i],s=this.get(o),s&&(this._ids[o]=!0,l.push(o));break;case"update":for(i=0,r=a.length;i<r;i++)o=a[i],s=this.get(o),s?this._ids[o]?(u.push(o),h.push(e.data[i]),d.push(e.oldData[i])):(this._ids[o]=!0,l.push(o)):this._ids[o]&&(delete this._ids[o],c.push(o),p.push(e.oldData[i]));break;case"remove":for(i=0,r=a.length;i<r;i++)o=a[i],this._ids[o]&&(delete this._ids[o],c.push(o),p.push(e.oldData[i]))}this.length+=l.length-c.length,l.length&&this._trigger("add",{items:l},n),u.length&&this._trigger("update",{items:u,oldData:d,data:h},n),c.length&&this._trigger("remove",{items:c,oldData:p},n)}},r.prototype.on=l.prototype.on,r.prototype.off=l.prototype.off,r.prototype._trigger=l.prototype._trigger,r.prototype.subscribe=r.prototype.on,r.prototype.unsubscribe=r.prototype.off,t.exports=r},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n,i){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!(Array.isArray(n)||n instanceof d||n instanceof h)&&n instanceof Object){var o=i;i=n,n=o}i&&i.throttleRedraw&&console.warn('Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var s=this;if(this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:u,width:null,height:null,maxHeight:null,minHeight:null},this.options=c.deepExtend({},this.defaultOptions),this._create(t),!i||i&&"undefined"==typeof i.rtl){for(var a,l=this.dom.root;!a&&l;)a=window.getComputedStyle(l,null).direction,l=l.parentElement;this.options.rtl=a&&"rtl"==a.toLowerCase()}else this.options.rtl=i.rtl;this.options.rollingMode=i&&i.rollingMode,this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{getScale:function(){return s.timeAxis.step.scale},getStep:function(){return s.timeAxis.step.step},toScreen:s._toScreen.bind(s),toGlobalScreen:s._toGlobalScreen.bind(s),toTime:s._toTime.bind(s),toGlobalTime:s._toGlobalTime.bind(s)}},this.range=new p(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new m(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new g(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new y(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null,this.dom.root.onclick=function(t){s.emit("click",s.getEventProperties(t))},this.dom.root.ondblclick=function(t){s.emit("doubleClick",s.getEventProperties(t))},this.dom.root.oncontextmenu=function(t){s.emit("contextmenu",s.getEventProperties(t))},this.dom.root.onmouseover=function(t){s.emit("mouseOver",s.getEventProperties(t))},this.dom.root.onmousemove=function(t){s.emit("mouseMove",s.getEventProperties(t))},this.fitDone=!1,this.on("changed",function(){if(null!=this.itemsData&&!this.options.rollingMode&&!s.fitDone)if(s.fitDone=!0,void 0!=s.options.start||void 0!=s.options.end){if(void 0==s.options.start||void 0==s.options.end)var t=s.getItemRange();var e=void 0!=s.options.start?s.options.start:t.min,n=void 0!=s.options.end?s.options.end:t.max;s.setWindow(e,n,{animation:!1})}else s.fit({animation:!1})}),i&&this.setOptions(i),n&&this.setGroups(n),e&&this.setItems(e),this._redraw()}var o=n(94),s=i(o),a=n(105),l=i(a),u=(n(106),n(101),n(82)),c=n(1),d=n(88),h=n(92),p=n(107),f=n(110),m=n(122),g=n(127),v=n(125),y=n(111),b=n(105).printStyle,w=n(128).allOptions,_=n(128).configureOptions;r.prototype=new f,r.prototype._createConfigurator=function(){return new s.default(this,this.dom.container,_)},r.prototype.redraw=function(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()},r.prototype.setOptions=function(t){var e=l.default.validate(t,w);if(e===!0&&console.log("%cErrors have been found in the supplied options object.",b),f.prototype.setOptions.call(this,t),"type"in t&&t.type!==this.options.type){this.options.type=t.type;var n=this.itemsData;if(n){var i=this.getSelection();this.setItems(null),this.setItems(n),this.setSelection(i)}}},r.prototype.setItems=function(t){var e;e=t?t instanceof d||t instanceof h?t:new d(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.itemSet&&this.itemSet.setItems(e)},r.prototype.setGroups=function(t){var e;if(t){var n=function(t){return t.visible!==!1};e=t instanceof d||t instanceof h?new h(t,{filter:n}):new d(t.filter(n))}else e=null;this.groupsData=e,this.itemSet.setGroups(e)},r.prototype.setData=function(t){t&&t.groups&&this.setGroups(t.groups),t&&t.items&&this.setItems(t.items)},r.prototype.setSelection=function(t,e){this.itemSet&&this.itemSet.setSelection(t),e&&e.focus&&this.focus(t,e)},r.prototype.getSelection=function(){return this.itemSet&&this.itemSet.getSelection()||[]},r.prototype.focus=function(t,e){if(this.itemsData&&void 0!=t){var n=Array.isArray(t)?t:[t],i=this.itemsData.getDataSet().get(n,{type:{start:"Date",end:"Date"}}),r=null,o=null;if(i.forEach(function(t){var e=t.start.valueOf(),n="end"in t?t.end.valueOf():t.start.valueOf();(null===r||e<r)&&(r=e),(null===o||n>o)&&(o=n)}),null!==r&&null!==o){var s=(r+o)/2,a=Math.max(this.range.end-this.range.start,1.1*(o-r)),l=!e||void 0===e.animation||e.animation;this.range.setRange(s-a/2,s+a/2,l)}}},r.prototype.fit=function(t){var e,n=!t||void 0===t.animation||t.animation,i=this.itemsData&&this.itemsData.getDataSet();1===i.length&&void 0===i.get()[0].end?(e=this.getDataRange(),this.moveTo(e.min.valueOf(),{animation:n})):(e=this.getItemRange(),this.range.setRange(e.min,e.max,n))},r.prototype.getItemRange=function(){var t=this.getDataRange(),e=null!==t.min?t.min.valueOf():null,n=null!==t.max?t.max.valueOf():null,i=null,r=null;if(null!=e&&null!=n){var o=function(t){return c.convert(t.data.start,"Date").valueOf()},s=function(t){var e=void 0!=t.data.end?t.data.end:t.data.start;return c.convert(e,"Date").valueOf()},a=n-e;a<=0&&(a=10);var l=a/this.props.center.width;if(c.forEach(this.itemSet.items,function(t){t.groupShowing&&(t.show(),t.repositionX());var a=o(t),u=s(t);if(this.options.rtl)var c=a-(t.getWidthRight()+10)*l,d=u+(t.getWidthLeft()+10)*l;else var c=a-(t.getWidthLeft()+10)*l,d=u+(t.getWidthRight()+10)*l;c<e&&(e=c,i=t),d>n&&(n=d,r=t)}.bind(this)),i&&r){var u=i.getWidthLeft()+10,d=r.getWidthRight()+10,h=this.props.center.width-u-d;h>0&&(this.options.rtl?(e=o(i)-d*a/h,n=s(r)+u*a/h):(e=o(i)-u*a/h,n=s(r)+d*a/h))}}return{min:null!=e?new Date(e):null,max:null!=n?new Date(n):null}},r.prototype.getDataRange=function(){var t=null,e=null,n=this.itemsData&&this.itemsData.getDataSet();return n&&n.forEach(function(n){var i=c.convert(n.start,"Date").valueOf(),r=c.convert(void 0!=n.end?n.end:n.start,"Date").valueOf();(null===t||i<t)&&(t=i),(null===e||r>e)&&(e=r)}),{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},r.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,n=t.center?t.center.y:t.clientY;if(this.options.rtl)var i=c.getAbsoluteRight(this.dom.centerContainer)-e;else var i=e-c.getAbsoluteLeft(this.dom.centerContainer);var r=n-c.getAbsoluteTop(this.dom.centerContainer),o=this.itemSet.itemFromTarget(t),s=this.itemSet.groupFromTarget(t),a=v.customTimeFromTarget(t),l=this.itemSet.options.snap||null,u=this.body.util.getScale(),d=this.body.util.getStep(),h=this._toTime(i),p=l?l(h,u,d):h,f=c.getTarget(t),m=null;return null!=o?m="item":null!=a?m="custom-time":c.hasParent(f,this.timeAxis.dom.foreground)?m="axis":this.timeAxis2&&c.hasParent(f,this.timeAxis2.dom.foreground)?m="axis":c.hasParent(f,this.itemSet.dom.labelSet)?m="group-label":c.hasParent(f,this.currentTime.bar)?m="current-time":c.hasParent(f,this.dom.center)&&(m="background"),{event:t,item:o?o.id:null,group:s?s.groupId:null,what:m,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:i,y:r,time:h,snappedTime:p}},r.prototype.toggleRollingMode=function(){this.range.rolling?this.range.stopRolling():(void 0==this.options.rollingMode&&this.setOptions(this.options),this.range.startRolling())},t.exports=r},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(89),o=i(r),s=n(62),a=i(s),l=n(95),u=i(l),c=n(96),d=i(c),h=n(100),p=i(h),f=n(1),m=function(){function t(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;(0,u.default)(this,t),this.parent=e,this.changedOptions=[],this.container=n,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},f.extend(this.options,this.defaultOptions),this.configureOptions=i,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new p.default(r),this.wrapper=void 0}return(0,d.default)(t,[{key:"setOptions",value:function(t){if(void 0!==t){this.popupHistory={},this._removePopup();var e=!0;"string"==typeof t?this.options.filter=t:t instanceof Array?this.options.filter=t.join():"object"===("undefined"==typeof t?"undefined":(0,a.default)(t))?(void 0!==t.container&&(this.options.container=t.container),void 0!==t.filter&&(this.options.filter=t.filter),void 0!==t.showButton&&(this.options.showButton=t.showButton),void 0!==t.enabled&&(e=t.enabled)):"boolean"==typeof t?(this.options.filter=!0,e=t):"function"==typeof t&&(this.options.filter=t,e=!0),this.options.filter===!1&&(e=!1),this.options.enabled=e}this._clean()}},{key:"setModuleOptions",value:function(t){this.moduleOptions=t,this.options.enabled===!0&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){var t=this;this._clean(),this.changedOptions=[];var e=this.options.filter,n=0,i=!1;for(var r in this.configureOptions)this.configureOptions.hasOwnProperty(r)&&(this.allowCreation=!1,i=!1,"function"==typeof e?(i=e(r,[]),i=i||this._handleObject(this.configureOptions[r],[r],!0)):e!==!0&&e.indexOf(r)===-1||(i=!0),i!==!1&&(this.allowCreation=!0,n>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),n++);if(this.options.showButton===!0){var o=document.createElement("div");o.className="vis-configuration vis-config-button",o.innerHTML="generate options",o.onclick=function(){t._printOptions()},o.onmouseover=function(){o.className="vis-configuration vis-config-button hover"},o.onmouseout=function(){o.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(o)}this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var t=0;t<this.domElements.length;t++)this.wrapper.appendChild(this.domElements[t]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var t=0;t<this.domElements.length;t++)this.wrapper.removeChild(this.domElements[t]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(t){for(var e=this.moduleOptions,n=0;n<t.length;n++){if(void 0===e[t[n]]){e=void 0;break}e=e[t[n]]}return e}},{key:"_makeItem",value:function(t){if(this.allowCreation===!0){var e=document.createElement("div");e.className="vis-configuration vis-config-item vis-config-s"+t.length;for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return i.forEach(function(t){e.appendChild(t)}),this.domElements.push(e),this.domElements.length}return 0}},{key:"_makeHeader",value:function(t){var e=document.createElement("div");e.className="vis-configuration vis-config-header",e.innerHTML=t,this._makeItem([],e)}},{key:"_makeLabel",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=document.createElement("div");return i.className="vis-configuration vis-config-label vis-config-s"+e.length,n===!0?i.innerHTML="<i><b>"+t+":</b></i>":i.innerHTML=t+":",i}},{key:"_makeDropdown",value:function(t,e,n){var i=document.createElement("select");i.className="vis-configuration vis-config-select";var r=0;void 0!==e&&t.indexOf(e)!==-1&&(r=t.indexOf(e));for(var o=0;o<t.length;o++){var s=document.createElement("option");s.value=t[o],o===r&&(s.selected="selected"),s.innerHTML=t[o],i.appendChild(s)}var a=this;i.onchange=function(){a._update(this.value,n)};var l=this._makeLabel(n[n.length-1],n);this._makeItem(n,l,i)}},{key:"_makeRange",value:function(t,e,n){var i=t[0],r=t[1],o=t[2],s=t[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=r,a.max=o}catch(t){}a.step=s;var l="",u=0;if(void 0!==e){var c=1.2;e<0&&e*c<r?(a.min=Math.ceil(e*c),u=a.min,l="range increased"):e/c<r&&(a.min=Math.ceil(e/c),u=a.min,l="range increased"),e*c>o&&1!==o&&(a.max=Math.ceil(e*c),u=a.max,l="range increased"),a.value=e}else a.value=i;var d=document.createElement("input");d.className="vis-configuration vis-config-rangeinput",d.value=a.value;var h=this;a.onchange=function(){d.value=this.value,h._update(Number(this.value),n)},a.oninput=function(){d.value=this.value};var p=this._makeLabel(n[n.length-1],n),f=this._makeItem(n,p,a,d);""!==l&&this.popupHistory[f]!==u&&(this.popupHistory[f]=u,this._setupPopup(l,f))}},{key:"_setupPopup",value:function(t,e){var n=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){var i=document.createElement("div");i.id="vis-configuration-popup",i.className="vis-configuration-popup",i.innerHTML=t,i.onclick=function(){n._removePopup()},this.popupCounter+=1,this.popupDiv={html:i,index:e}}}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var t=this;if(void 0!==this.popupDiv.html){var e=this.domElements[this.popupDiv.index],n=e.getBoundingClientRect();this.popupDiv.html.style.left=n.left+"px",this.popupDiv.html.style.top=n.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=setTimeout(function(){t.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=setTimeout(function(){t._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(t,e,n){var i=document.createElement("input");i.type="checkbox",i.className="vis-configuration vis-config-checkbox",i.checked=t,void 0!==e&&(i.checked=e,e!==t&&("object"===("undefined"==typeof t?"undefined":(0,a.default)(t))?e!==t.enabled&&this.changedOptions.push({path:n,value:e}):this.changedOptions.push({path:n,value:e})));var r=this;i.onchange=function(){r._update(this.checked,n)};var o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,i)}},{key:"_makeTextInput",value:function(t,e,n){var i=document.createElement("input");i.type="text",i.className="vis-configuration vis-config-text",i.value=e,e!==t&&this.changedOptions.push({path:n,value:e});var r=this;i.onchange=function(){r._update(this.value,n)};var o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,i)}},{key:"_makeColorField",value:function(t,e,n){var i=this,r=t[1],o=document.createElement("div");e=void 0===e?r:e,"none"!==e?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=e):o.className="vis-configuration vis-config-colorBlock none",e=void 0===e?r:e,o.onclick=function(){i._showColorPicker(e,o,n)};var s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,o)}},{key:"_showColorPicker",value:function(t,e,n){var i=this;e.onclick=function(){},this.colorPicker.insertTo(e),this.colorPicker.show(),this.colorPicker.setColor(t),this.colorPicker.setUpdateCallback(function(t){var r="rgba("+t.r+","+t.g+","+t.b+","+t.a+")";e.style.backgroundColor=r,i._update(r,n)}),this.colorPicker.setCloseCallback(function(){e.onclick=function(){i._showColorPicker(t,e,n)}})}},{key:"_handleObject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!1,r=this.options.filter,o=!1;for(var s in t)if(t.hasOwnProperty(s)){i=!0;var a=t[s],l=f.copyAndExtendArray(e,s);if("function"==typeof r&&(i=r(s,e),i===!1&&!(a instanceof Array)&&"string"!=typeof a&&"boolean"!=typeof a&&a instanceof Object&&(this.allowCreation=!1,i=this._handleObject(a,l,!0),this.allowCreation=n===!1)),i!==!1){o=!0;var u=this._getValue(l);if(a instanceof Array)this._handleArray(a,u,l);else if("string"==typeof a)this._makeTextInput(a,u,l);else if("boolean"==typeof a)this._makeCheckbox(a,u,l);else if(a instanceof Object){var c=!0;if(e.indexOf("physics")!==-1&&this.moduleOptions.physics.solver!==s&&(c=!1),c===!0)if(void 0!==a.enabled){var d=f.copyAndExtendArray(l,"enabled"),h=this._getValue(d);if(h===!0){var p=this._makeLabel(s,l,!0);this._makeItem(l,p),o=this._handleObject(a,l)||o}else this._makeCheckbox(a,h,l)}else{var m=this._makeLabel(s,l,!0);this._makeItem(l,m),o=this._handleObject(a,l)||o}}else console.error("dont know how to handle",a,s,l)}}return o}},{key:"_handleArray",value:function(t,e,n){"string"==typeof t[0]&&"color"===t[0]?(this._makeColorField(t,e,n),t[1]!==e&&this.changedOptions.push({path:n,value:e})):"string"==typeof t[0]?(this._makeDropdown(t,e,n),t[0]!==e&&this.changedOptions.push({path:n,value:e})):"number"==typeof t[0]&&(this._makeRange(t,e,n),t[0]!==e&&this.changedOptions.push({path:n,value:Number(e)}))}},{key:"_update",value:function(t,e){var n=this._constructOptions(t,e);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n;t="true"===t||t,t="false"!==t&&t;for(var r=0;r<e.length;r++)"global"!==e[r]&&(void 0===i[e[r]]&&(i[e[r]]={}),r!==e.length-1?i=i[e[r]]:i[e[r]]=t);return n}},{key:"_printOptions",value:function(){var t=this.getOptions();this.optionsContainer.innerHTML="<pre>var options = "+(0,o.default)(t,null,2)+"</pre>"}},{key:"getOptions",value:function(){for(var t={},e=0;e<this.changedOptions.length;e++)this._constructOptions(this.changedOptions[e].value,this.changedOptions[e].path,t);return t}}]),t}();e.default=m},function(t,e){e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var r=n(97),o=i(r);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,o.default)(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}()},function(t,e,n){t.exports={default:n(98),__esModule:!0}},function(t,e,n){n(99);var i=n(17).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){var i=n(15);i(i.S+i.F*!n(25),"Object",{defineProperty:n(21).f})},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(89),o=i(r),s=n(95),a=i(s),l=n(96),u=i(l),c=n(101),d=n(104),h=n(1),p=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,a.default)(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return(0,u.default)(t,[{key:"insertTo",value:function(t){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=t,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=t}},{key:"setCloseCallback",value:function(t){if("function"!=typeof t)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=t}},{key:"_isColorString",value:function(t){var e={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};if("string"==typeof t)return e[t]}},{key:"setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if("none"!==t){var n=void 0,i=this._isColorString(t);if(void 0!==i&&(t=i),h.isString(t)===!0){if(h.isValidRGB(t)===!0){var r=t.substr(4).substr(0,t.length-5).split(",");n={r:r[0],g:r[1],b:r[2],a:1}}else if(h.isValidRGBA(t)===!0){var s=t.substr(5).substr(0,t.length-6).split(",");n={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(h.isValidHex(t)===!0){var a=h.hexToRGB(t);n={r:a.r,g:a.g,b:a.b,a:1}}}else if(t instanceof Object&&void 0!==t.r&&void 0!==t.g&&void 0!==t.b){var l=void 0!==t.a?t.a:"1.0";n={r:t.r,g:t.g,b:t.b,a:l}}if(void 0===n)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: "+(0,o.default)(t));this._setColor(n,e)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e===!0&&(this.previousColor=h.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(function(){void 0!==t.closeCallback&&(t.closeCallback(),t.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e===!0&&(this.initialColor=h.extend({},t)),this.color=t;var n=h.RGBToHSV(t.r,t.g,t.b),i=2*Math.PI,r=this.r*n.s,o=this.centerCoordinates.x+r*Math.sin(i*n.h),s=this.centerCoordinates.y+r*Math.cos(i*n.h);this.colorPickerSelector.style.left=o-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",
18
+ this._updatePicker(t)}},{key:"_setOpacity",value:function(t){this.color.a=t/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(t){var e=h.RGBToHSV(this.color.r,this.color.g,this.color.b);e.v=t/100;var n=h.HSVToRGB(e.h,e.s,e.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.color,e=h.RGBToHSV(t.r,t.g,t.b),n=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var i=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,i,r),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-e.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),n.fill(),this.brightnessRange.value=100*e.v,this.opacityRange.value=100*t.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerHTML="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(t){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(t){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var n=this;this.opacityRange.onchange=function(){n._setOpacity(this.value)},this.opacityRange.oninput=function(){n._setOpacity(this.value)},this.brightnessRange.onchange=function(){n._setBrightness(this.value)},this.brightnessRange.oninput=function(){n._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerHTML="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerHTML="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerHTML="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerHTML="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerHTML="cancel",this.cancelButton.onclick=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerHTML="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerHTML="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerHTML="load last",this.loadButton.onclick=this._loadLast.bind(this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new c(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),d.onTouch(this.hammer,function(e){t._moveSelector(e)}),this.hammer.on("tap",function(e){t._moveSelector(e)}),this.hammer.on("panstart",function(e){t._moveSelector(e)}),this.hammer.on("panmove",function(e){t._moveSelector(e)}),this.hammer.on("panend",function(e){t._moveSelector(e)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var t=this.colorPickerCanvas.getContext("2d");void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1)),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var e=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;t.clearRect(0,0,e,n);var i=void 0,r=void 0,o=void 0,s=void 0;this.centerCoordinates={x:.5*e,y:.5*n},this.r=.49*e;var a=2*Math.PI/360,l=1/360,u=1/this.r,c=void 0;for(o=0;o<360;o++)for(s=0;s<this.r;s++)i=this.centerCoordinates.x+s*Math.sin(a*o),r=this.centerCoordinates.y+s*Math.cos(a*o),c=h.HSVToRGB(o*l,s*u,1),t.fillStyle="rgb("+c.r+","+c.g+","+c.b+")",t.fillRect(i-.5,r-.5,2,2);t.strokeStyle="rgba(0,0,0,1)",t.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),t.stroke(),this.hueCircle=t.getImageData(0,0,e,n)}this.generated=!0}},{key:"_moveSelector",value:function(t){var e=this.colorPickerDiv.getBoundingClientRect(),n=t.center.x-e.left,i=t.center.y-e.top,r=.5*this.colorPickerDiv.clientHeight,o=.5*this.colorPickerDiv.clientWidth,s=n-o,a=i-r,l=Math.atan2(s,a),u=.98*Math.min(Math.sqrt(s*s+a*a),o),c=Math.cos(l)*u+r,d=Math.sin(l)*u+o;this.colorPickerSelector.style.top=c-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+"px";var p=l/(2*Math.PI);p=p<0?p+1:p;var f=u/this.r,m=h.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=p,m.s=f;var g=h.HSVToRGB(m.h,m.s,m.v);g.a=this.color.a,this.color=g,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}();e.default=p},function(t,e,n){if("undefined"!=typeof window){var i=n(102),r=window.Hammer||n(103);t.exports=i(r,{preventDefault:"mouse"})}else t.exports=function(){throw Error("hammer.js is only available in a browser, not in node.js.")}},function(t,e,n){var i,r,o;!function(n){r=[],i=n,o="function"==typeof i?i.apply(e,r):i,!(void 0!==o&&(t.exports=o))}(function(){var t=null;return function e(n,i){function r(t){return t.match(/[^ ]+/g)}function o(e){if("hammer.input"!==e.type){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var n=!1;e.stopPropagation=function(){n=!0};var i=e.srcEvent.stopPropagation.bind(e.srcEvent);"function"==typeof i&&(e.srcEvent.stopPropagation=function(){i(),e.stopPropagation()}),e.firstTarget=t;for(var r=t;r&&!n;){var o=r.hammer;if(o)for(var s,a=0;a<o.length;a++)if(s=o[a]._handlers[e.type])for(var l=0;l<s.length&&!n;l++)s[l](e);r=r.parentNode}}var s=i||{preventDefault:!1};if(n.Manager){var a=n,l=function(t,n){var i=Object.create(s);return n&&a.assign(i,n),e(new a(t,i),i)};return a.assign(l,a),l.Manager=function(t,n){var i=Object.create(s);return n&&a.assign(i,n),e(new a.Manager(t,i),i)},l}var u=Object.create(n),c=n.element;return c.hammer||(c.hammer=[]),c.hammer.push(u),n.on("hammer.input",function(e){s.preventDefault!==!0&&s.preventDefault!==e.pointerType||e.preventDefault(),e.isFirst&&(t=e.target)}),u._handlers={},u.on=function(t,e){return r(t).forEach(function(t){var i=u._handlers[t];i||(u._handlers[t]=i=[],n.on(t,o)),i.push(e)}),u},u.off=function(t,e){return r(t).forEach(function(t){var i=u._handlers[t];i&&(i=e?i.filter(function(t){return t!==e}):[],i.length>0?u._handlers[t]=i:(n.off(t,o),delete u._handlers[t]))}),u},u.emit=function(e,i){t=i.target,n.emit(e,i)},u.destroy=function(){var t=n.element.hammer,e=t.indexOf(u);e!==-1&&t.splice(e,1),t.length||delete n.element.hammer,u._handlers={},n.destroy()},u}})},function(t,e,n){var i;!function(r,o,s,a){function l(t,e,n){return setTimeout(p(t,n),e)}function u(t,e,n){return!!Array.isArray(t)&&(c(t,n[e],n),!0)}function c(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function d(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}function h(t,e,n){var i,r=e.prototype;i=t.prototype=Object.create(r),i.constructor=t,i._super=r,n&&mt(i,n)}function p(t,e){return function(){return t.apply(e,arguments)}}function f(t,e){return typeof t==yt?t.apply(e?e[0]||a:a,e):t}function m(t,e){return t===a?e:t}function g(t,e,n){c(w(e),function(e){t.addEventListener(e,n,!1)})}function v(t,e,n){c(w(e),function(e){t.removeEventListener(e,n,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function w(t){return t.trim().split(/\s+/g)}function _(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function x(t){return Array.prototype.slice.call(t,0)}function k(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];_(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort(function(t,n){return t[e]>n[e]}):i.sort()),i}function C(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<gt.length;){if(n=gt[o],i=n?n+r:e,i in t)return i;o++}return a}function S(){return Ct++}function T(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}function M(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){f(t.options.enable,[t])&&n.handler(e)},this.init()}function D(t){var e,n=t.options.inputClass;return new(e=n?n:Mt?U:Dt?V:Tt?q:z)(t,E)}function E(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=e&It&&i-r===0,s=e&(Rt|Ft)&&i-r===0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,O(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function O(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=A(e)),r>1&&!n.firstMultiple?n.firstMultiple=A(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,a=s?s.center:o.center,l=e.center=I(i);e.timeStamp=_t(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=j(a,l),e.distance=F(a,l),P(n,e),e.offsetDirection=R(e.deltaX,e.deltaY);var u=L(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=wt(u.x)>wt(u.y)?u.x:u.y,e.scale=s?W(s.pointers,i):1,e.rotation=s?H(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,N(n,e);var c=t.element;y(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function P(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};e.eventType!==It&&o.eventType!==Rt||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}function N(t,e){var n,i,r,o,s=t.lastInterval||e,l=e.timeStamp-s.timeStamp;if(e.eventType!=Ft&&(l>At||s.velocity===a)){var u=e.deltaX-s.deltaX,c=e.deltaY-s.deltaY,d=L(l,u,c);i=d.x,r=d.y,n=wt(d.x)>wt(d.y)?d.x:d.y,o=R(u,c),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}function A(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:bt(t.pointers[n].clientX),clientY:bt(t.pointers[n].clientY)},n++;return{timeStamp:_t(),pointers:e,center:I(e),deltaX:t.deltaX,deltaY:t.deltaY}}function I(t){var e=t.length;if(1===e)return{x:bt(t[0].clientX),y:bt(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:bt(n/e),y:bt(i/e)}}function L(t,e,n){return{x:e/t||0,y:n/t||0}}function R(t,e){return t===e?jt:wt(t)>=wt(e)?t<0?Ht:Wt:e<0?zt:Ut}function F(t,e,n){n||(n=Gt);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function j(t,e,n){n||(n=Gt);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}function H(t,e){return j(e[1],e[0],qt)+j(t[1],t[0],qt)}function W(t,e){return F(e[0],e[1],qt)/F(t[0],t[1],qt)}function z(){this.evEl=Xt,this.evWin=$t,this.pressed=!1,M.apply(this,arguments)}function U(){this.evEl=Jt,this.evWin=te,M.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function B(){this.evTarget=ne,this.evWin=ie,this.started=!1,M.apply(this,arguments)}function Y(t,e){var n=x(t.touches),i=x(t.changedTouches);return e&(Rt|Ft)&&(n=k(n.concat(i),"identifier",!0)),[n,i]}function V(){this.evTarget=oe,this.targetIds={},M.apply(this,arguments)}function G(t,e){var n=x(t.touches),i=this.targetIds;if(e&(It|Lt)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=x(t.changedTouches),a=[],l=this.target;if(o=n.filter(function(t){return y(t.target,l)}),e===It)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),e&(Rt|Ft)&&delete i[s[r].identifier],r++;return a.length?[k(o.concat(a),"identifier",!0),a]:void 0}function q(){M.apply(this,arguments);var t=p(this.handler,this);this.touch=new V(this.manager,t),this.mouse=new z(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function K(t,e){t&It?(this.primaryTouch=e.changedPointers[0].identifier,X.call(this,e)):t&(Rt|Ft)&&X.call(this,e)}function X(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches,r=function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)};setTimeout(r,se)}}function $(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=ae&&s<=ae)return!0}return!1}function Z(t,e){this.manager=t,this.set(e)}function Q(t){if(b(t,pe))return pe;var e=b(t,fe),n=b(t,me);return e&&n?pe:e||n?e?fe:me:b(t,he)?he:de}function J(){if(!ue)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||r.CSS.supports("touch-action",n)}),t}function tt(t){this.options=mt({},this.defaults,t||{}),this.id=S(),this.manager=null,this.options.enable=m(this.options.enable,!0),this.state=ve,this.simultaneous={},this.requireFail=[]}function et(t){return t&xe?"cancel":t&we?"end":t&be?"move":t&ye?"start":""}function nt(t){return t==Ut?"down":t==zt?"up":t==Ht?"left":t==Wt?"right":""}function it(t,e){var n=e.manager;return n?n.get(t):t}function rt(){tt.apply(this,arguments)}function ot(){rt.apply(this,arguments),this.pX=null,this.pY=null}function st(){rt.apply(this,arguments)}function at(){tt.apply(this,arguments),this._timer=null,this._input=null}function lt(){rt.apply(this,arguments)}function ut(){rt.apply(this,arguments)}function ct(){tt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function dt(t,e){return e=e||{},e.recognizers=m(e.recognizers,dt.defaults.preset),new ht(t,e)}function ht(t,e){this.options=mt({},dt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=D(this),this.touchAction=new Z(this,this.options.touchAction),pt(this,!0),c(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function pt(t,e){var n=t.element;if(n.style){var i;c(t.options.cssProps,function(r,o){i=C(n.style,o),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||""}),e||(t.oldCssProps={})}}function ft(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}var mt,gt=["","webkit","Moz","MS","ms","o"],vt=o.createElement("div"),yt="function",bt=Math.round,wt=Math.abs,_t=Date.now;mt="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var xt=d(function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t},"extend","Use `assign`."),kt=d(function(t,e){return xt(t,e,!0)},"merge","Use `assign`."),Ct=1,St=/mobile|tablet|ip(ad|hone|od)|android/i,Tt="ontouchstart"in r,Mt=C(r,"PointerEvent")!==a,Dt=Tt&&St.test(navigator.userAgent),Et="touch",Ot="pen",Pt="mouse",Nt="kinect",At=25,It=1,Lt=2,Rt=4,Ft=8,jt=1,Ht=2,Wt=4,zt=8,Ut=16,Bt=Ht|Wt,Yt=zt|Ut,Vt=Bt|Yt,Gt=["x","y"],qt=["clientX","clientY"];M.prototype={handler:function(){},init:function(){this.evEl&&g(this.element,this.evEl,this.domHandler),this.evTarget&&g(this.target,this.evTarget,this.domHandler),this.evWin&&g(T(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&v(this.element,this.evEl,this.domHandler),this.evTarget&&v(this.target,this.evTarget,this.domHandler),this.evWin&&v(T(this.element),this.evWin,this.domHandler)}};var Kt={mousedown:It,mousemove:Lt,mouseup:Rt},Xt="mousedown",$t="mousemove mouseup";h(z,M,{handler:function(t){var e=Kt[t.type];e&It&&0===t.button&&(this.pressed=!0),e&Lt&&1!==t.which&&(e=Rt),this.pressed&&(e&Rt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Pt,srcEvent:t}))}});var Zt={pointerdown:It,pointermove:Lt,pointerup:Rt,pointercancel:Ft,pointerout:Ft},Qt={2:Et,3:Ot,4:Pt,5:Nt},Jt="pointerdown",te="pointermove pointerup pointercancel";r.MSPointerEvent&&!r.PointerEvent&&(Jt="MSPointerDown",te="MSPointerMove MSPointerUp MSPointerCancel"),h(U,M,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=Zt[i],o=Qt[t.pointerType]||t.pointerType,s=o==Et,a=_(e,t.pointerId,"pointerId");r&It&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):r&(Rt|Ft)&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var ee={touchstart:It,touchmove:Lt,touchend:Rt,touchcancel:Ft},ne="touchstart",ie="touchstart touchmove touchend touchcancel";h(B,M,{handler:function(t){var e=ee[t.type];if(e===It&&(this.started=!0),this.started){var n=Y.call(this,t,e);e&(Rt|Ft)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:Et,srcEvent:t})}}});var re={touchstart:It,touchmove:Lt,touchend:Rt,touchcancel:Ft},oe="touchstart touchmove touchend touchcancel";h(V,M,{handler:function(t){var e=re[t.type],n=G.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:Et,srcEvent:t})}});var se=2500,ae=25;h(q,M,{handler:function(t,e,n){var i=n.pointerType==Et,r=n.pointerType==Pt;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)K.call(this,e,n);else if(r&&$.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var le=C(vt.style,"touchAction"),ue=le!==a,ce="compute",de="auto",he="manipulation",pe="none",fe="pan-x",me="pan-y",ge=J();Z.prototype={set:function(t){t==ce&&(t=this.compute()),ue&&this.manager.element.style&&ge[t]&&(this.manager.element.style[le]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return c(this.manager.recognizers,function(e){f(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Q(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var i=this.actions,r=b(i,pe)&&!ge[pe],o=b(i,me)&&!ge[me],s=b(i,fe)&&!ge[fe];if(r){var a=1===t.pointers.length,l=t.distance<2,u=t.deltaTime<250;if(a&&l&&u)return}return s&&o?void 0:r||o&&n&Bt||s&&n&Yt?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var ve=1,ye=2,be=4,we=8,_e=we,xe=16,ke=32;tt.prototype={defaults:{},set:function(t){return mt(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(u(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=it(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return u(t,"dropRecognizeWith",this)?this:(t=it(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(u(t,"requireFailure",this))return this;var e=this.requireFail;return t=it(t,this),_(e,t)===-1&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(u(t,"dropRequireFailure",this))return this;t=it(t,this);var e=_(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,i=this.state;i<we&&e(n.options.event+et(i)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),i>=we&&e(n.options.event+et(i))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=ke)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(ke|ve)))return!1;t++}return!0},recognize:function(t){var e=mt({},t);return f(this.options.enable,[this,e])?(this.state&(_e|xe|ke)&&(this.state=ve),this.state=this.process(e),void(this.state&(ye|be|we|xe)&&this.tryEmit(e))):(this.reset(),void(this.state=ke))},process:function(t){},getTouchAction:function(){},reset:function(){}},h(rt,tt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=e&(ye|be),r=this.attrTest(t);return i&&(n&Ft||!r)?e|xe:i||r?n&Rt?e|we:e&ye?e|be:ye:ke}}),h(ot,rt,{defaults:{event:"pan",threshold:10,pointers:1,direction:Vt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Bt&&e.push(me),t&Yt&&e.push(fe),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(e.direction&Bt?(r=0===o?jt:o<0?Ht:Wt,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?jt:s<0?zt:Ut,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&ye||!(this.state&ye)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=nt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(st,rt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[pe]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ye)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),h(at,tt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[de]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||t.eventType&(Rt|Ft)&&!r)this.reset();else if(t.eventType&It)this.reset(),this._timer=l(function(){this.state=_e,this.tryEmit()},e.time,this);else if(t.eventType&Rt)return _e;return ke},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===_e&&(t&&t.eventType&Rt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=_t(),this.manager.emit(this.options.event,this._input)))}}),h(lt,rt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[pe]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ye)}}),h(ut,rt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Bt|Yt,pointers:1},getTouchAction:function(){return ot.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Bt|Yt)?e=t.overallVelocity:n&Bt?e=t.overallVelocityX:n&Yt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&wt(e)>this.options.velocity&&t.eventType&Rt},emit:function(t){var e=nt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(ct,tt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[he]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&It&&0===this.count)return this.failTimeout();if(i&&r&&n){if(t.eventType!=Rt)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||F(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t;var a=this.count%e.taps;if(0===a)return this.hasRequireFailures()?(this._timer=l(function(){this.state=_e,this.tryEmit()},e.interval,this),ye):_e}return ke},failTimeout:function(){return this._timer=l(function(){this.state=ke},this.options.interval,this),ke},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==_e&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),dt.VERSION="2.0.7",dt.defaults={domEvents:!1,touchAction:ce,enable:!0,inputTarget:null,inputClass:null,preset:[[lt,{enable:!1}],[st,{enable:!1},["rotate"]],[ut,{direction:Bt}],[ot,{direction:Bt},["swipe"]],[ct],[ct,{event:"doubletap",taps:2},["tap"]],[at]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Ce=1,Se=2;ht.prototype={set:function(t){return mt(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?Se:Ce},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,i=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&_e)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],e.stopped===Se||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&n.state&(ye|be|we)&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof tt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(u(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(u(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=_(e,t);n!==-1&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return c(w(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==a){var n=this.handlers;return c(w(t),function(t){e?n[t]&&n[t].splice(_(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&ft(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&pt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},mt(dt,{INPUT_START:It,INPUT_MOVE:Lt,INPUT_END:Rt,INPUT_CANCEL:Ft,STATE_POSSIBLE:ve,STATE_BEGAN:ye,STATE_CHANGED:be,STATE_ENDED:we,STATE_RECOGNIZED:_e,STATE_CANCELLED:xe,STATE_FAILED:ke,DIRECTION_NONE:jt,DIRECTION_LEFT:Ht,DIRECTION_RIGHT:Wt,DIRECTION_UP:zt,DIRECTION_DOWN:Ut,DIRECTION_HORIZONTAL:Bt,DIRECTION_VERTICAL:Yt,DIRECTION_ALL:Vt,Manager:ht,Input:M,TouchAction:Z,TouchInput:V,MouseInput:z,PointerEventInput:U,TouchMouseInput:q,SingleTouchInput:B,Recognizer:tt,AttrRecognizer:rt,Tap:ct,Pan:ot,Swipe:ut,Pinch:st,Rotate:lt,Press:at,on:g,off:v,each:c,merge:kt,extend:xt,assign:mt,inherit:h,bindFn:p,prefixed:C});var Te="undefined"!=typeof r?r:"undefined"!=typeof self?self:{};Te.Hammer=dt,i=function(){return dt}.call(e,n,e,t),!(i!==a&&(t.exports=i))}(window,document,"Hammer")},function(t,e,n){n(101),e.onTouch=function(t,e){e.inputHandler=function(t){t.isFirst&&e(t)},t.on("hammer.input",e.inputHandler)},e.onRelease=function(t,e){return e.inputHandler=function(t){t.isFinal&&e(t)},t.on("hammer.input",e.inputHandler)},e.offTouch=function(t,e){t.off("hammer.input",e.inputHandler)},e.offRelease=e.offTouch,e.disablePreventDefaultVertically=function(t){var e="pan-y";return t.getTouchAction=function(){return[e]},t}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.printStyle=void 0;var r=n(89),o=i(r),s=n(62),a=i(s),l=n(58),u=i(l),c=n(95),d=i(c),h=n(96),p=i(h),f=n(1),m=!1,g=void 0,v="background: #FFeeee; color: #dd0000",y=function(){function t(){(0,d.default)(this,t)}return(0,p.default)(t,null,[{key:"validate",value:function(e,n,i){m=!1,g=n;var r=n;return void 0!==i&&(r=n[i]),t.parse(e,r,[]),m}},{key:"parse",value:function(e,n,i){for(var r in e)e.hasOwnProperty(r)&&t.check(r,e,n,i)}},{key:"check",value:function(e,n,i,r){void 0===i[e]&&void 0===i.__any__?t.getSuggestion(e,i,r):void 0===i[e]&&void 0!==i.__any__?"object"===t.getType(n[e])&&void 0!==i.__any__.__type__?t.checkFields(e,n,i,"__any__",i.__any__.__type__,r):t.checkFields(e,n,i,"__any__",i.__any__,r):void 0!==i[e].__type__?t.checkFields(e,n,i,e,i[e].__type__,r):t.checkFields(e,n,i,e,i[e],r)}},{key:"checkFields",value:function(e,n,i,r,o,s){var a=t.getType(n[e]),l=o[a];void 0!==l?"array"===t.getType(l)&&l.indexOf(n[e])===-1?(console.log('%cInvalid option detected in "'+e+'". Allowed values are:'+t.print(l)+' not "'+n[e]+'". '+t.printLocation(s,e),v),m=!0):"object"===a&&"__any__"!==r&&(s=f.copyAndExtendArray(s,e),
19
+ t.parse(n[e],i[r],s)):void 0===o.any&&(console.log('%cInvalid type received for "'+e+'". Expected: '+t.print((0,u.default)(o))+". Received ["+a+'] "'+n[e]+'"'+t.printLocation(s,e),v),m=!0)}},{key:"getType",value:function(t){var e="undefined"==typeof t?"undefined":(0,a.default)(t);return"object"===e?null===t?"null":t instanceof Boolean?"boolean":t instanceof Number?"number":t instanceof String?"string":Array.isArray(t)?"array":t instanceof Date?"date":void 0!==t.nodeType?"dom":t._isAMomentObject===!0?"moment":"object":"number"===e?"number":"boolean"===e?"boolean":"string"===e?"string":void 0===e?"undefined":e}},{key:"getSuggestion",value:function(e,n,i){var r=t.findInOptions(e,n,i,!1),o=t.findInOptions(e,g,[],!0),s=8,a=4;void 0!==r.indexMatch?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(r.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+r.indexMatch+'"?\n\n',v):o.distance<=a&&r.distance>o.distance?console.log('%cUnknown option detected: "'+e+'" in '+t.printLocation(r.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(o.path,o.closestMatch,""),v):r.distance<=s?console.log('%cUnknown option detected: "'+e+'". Did you mean "'+r.closestMatch+'"?'+t.printLocation(r.path,e),v):console.log('%cUnknown option detected: "'+e+'". Did you mean one of these: '+t.print((0,u.default)(n))+t.printLocation(i,e),v),m=!0}},{key:"findInOptions",value:function(e,n,i){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=1e9,s="",a=[],l=e.toLowerCase(),u=void 0;for(var c in n){var d=void 0;if(void 0!==n[c].__type__&&r===!0){var h=t.findInOptions(e,n[c],f.copyAndExtendArray(i,c));o>h.distance&&(s=h.closestMatch,a=h.path,o=h.distance,u=h.indexMatch)}else c.toLowerCase().indexOf(l)!==-1&&(u=c),d=t.levenshteinDistance(e,c),o>d&&(s=c,a=f.copyArray(i),o=d)}return{closestMatch:s,path:a,distance:o,indexMatch:u}}},{key:"printLocation",value:function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n",i="\n\n"+n+"options = {\n",r=0;r<t.length;r++){for(var o=0;o<r+1;o++)i+=" ";i+=t[r]+": {\n"}for(var s=0;s<t.length+1;s++)i+=" ";i+=e+"\n";for(var a=0;a<t.length+1;a++){for(var l=0;l<t.length-a;l++)i+=" ";i+="}\n"}return i+"\n\n"}},{key:"print",value:function(t){return(0,o.default)(t).replace(/(\")|(\[)|(\])|(,"__type__")/g,"").replace(/(\,)/g,", ")}},{key:"levenshteinDistance",value:function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var n,i=[];for(n=0;n<=e.length;n++)i[n]=[n];var r;for(r=0;r<=t.length;r++)i[0][r]=r;for(n=1;n<=e.length;n++)for(r=1;r<=t.length;r++)e.charAt(n-1)==t.charAt(r-1)?i[n][r]=i[n-1][r-1]:i[n][r]=Math.min(i[n-1][r-1]+1,Math.min(i[n][r-1]+1,i[n-1][r]+1));return i[e.length][t.length]}}]),t}();e.default=y,e.printStyle=v},function(t,e){function n(t){if(t)return i(t)}function i(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},n.prototype.once=function(t,e){function n(){i.off(t,n),e.apply(this,arguments)}var i=this;return this._callbacks=this._callbacks||{},n.fn=e,this.on(t,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var i,r=0;r<n.length;r++)if(i=n[r],i===e||i.fn===e){n.splice(r,1);break}return this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks[t];if(n){n=n.slice(0);for(var i=0,r=n.length;i<r;++i)n[i].apply(this,e)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){var n=p().hours(0).minutes(0).seconds(0).milliseconds(0),i=n.clone().add(-3,"days").valueOf(),r=n.clone().add(3,"days").valueOf();void 0===e?(this.start=i,this.end=r):(this.start=e.start||i,this.end=e.end||r),this.rolling=!1,this.body=t,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:p,direction:"horizontal",moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10},this.options=h.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on("panstart",this._onDragStart.bind(this)),this.body.emitter.on("panmove",this._onDrag.bind(this)),this.body.emitter.on("panend",this._onDragEnd.bind(this)),this.body.emitter.on("mousewheel",this._onMouseWheel.bind(this)),this.body.emitter.on("touch",this._onTouch.bind(this)),this.body.emitter.on("pinch",this._onPinch.bind(this)),this.body.dom.rollingModeBtn.addEventListener("click",this.startRolling.bind(this)),this.setOptions(e)}function o(t){if("horizontal"!=t&&"vertical"!=t)throw new TypeError('Unknown direction "'+t+'". Choose "horizontal" or "vertical".')}var s=n(58),a=i(s),l=n(89),u=i(l),c=n(62),d=i(c),h=n(1),p=(n(104),n(82)),f=n(108),m=n(109);r.prototype=new f,r.prototype.setOptions=function(t){if(t){var e=["animation","direction","min","max","zoomMin","zoomMax","moveable","zoomable","moment","activate","hiddenDates","zoomKey","rtl","showCurrentTime","rollMode","horizontalScroll"];h.selectiveExtend(e,this.options,t),t.rollingMode&&this.startRolling(),("start"in t||"end"in t)&&this.setRange(t.start,t.end)}},r.prototype.startRolling=function(){function t(){e.stopRolling(),e.rolling=!0;var n=e.end-e.start,i=h.convert(new Date,"Date").valueOf(),r=i-n/2,o=i+n/2;!e.options||void 0===e.options.animation||e.options.animation,e.setRange(r,o,!1);var s=e.conversion(e.body.domProps.center.width).scale,n=1/s/10;n<30&&(n=30),n>1e3&&(n=1e3),e.body.dom.rollingModeBtn.style.visibility="hidden",e.currentTimeTimer=setTimeout(t,n)}var e=this;t()},r.prototype.stopRolling=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility="visible")},r.prototype.setRange=function(t,e,n,i,r){i!==!0&&(i=!1);var o=void 0!=t?h.convert(t,"Date").valueOf():null,s=void 0!=e?h.convert(e,"Date").valueOf():null;if(this._cancelAnimation(),n){var l=this,c=this.start,p=this.end,f="object"===("undefined"==typeof n?"undefined":(0,d.default)(n))&&"duration"in n?n.duration:500,g="object"===("undefined"==typeof n?"undefined":(0,d.default)(n))&&"easingFunction"in n?n.easingFunction:"easeInOutQuad",v=h.easingFunctions[g];if(!v)throw new Error("Unknown easing function "+(0,u.default)(g)+". Choose from: "+(0,a.default)(h.easingFunctions).join(", "));var y=(new Date).valueOf(),b=!1,w=function t(){if(!l.props.touch.dragging){var e=(new Date).valueOf(),n=e-y,a=v(n/f),u=n>f,d=u||null===o?o:c+(o-c)*a,h=u||null===s?s:p+(s-p)*a;_=l._applyRange(d,h),m.updateHiddenDates(l.options.moment,l.body,l.options.hiddenDates),b=b||_;var g={start:new Date(l.start),end:new Date(l.end),byUser:i,event:r};_&&l.body.emitter.emit("rangechange",g),u?b&&l.body.emitter.emit("rangechanged",g):l.animationTimer=setTimeout(t,20)}};return w()}var _=this._applyRange(o,s);if(m.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),_){var x={start:new Date(this.start),end:new Date(this.end),byUser:i,event:r};this.body.emitter.emit("rangechange",x),this.body.emitter.emit("rangechanged",x)}},r.prototype.getMillisecondsPerPixel=function(){return(this.end-this.start)/this.body.dom.center.clientWidth},r.prototype._cancelAnimation=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.animationTimer=null)},r.prototype._applyRange=function(t,e){var n,i=null!=t?h.convert(t,"Date").valueOf():this.start,r=null!=e?h.convert(e,"Date").valueOf():this.end,o=null!=this.options.max?h.convert(this.options.max,"Date").valueOf():null,s=null!=this.options.min?h.convert(this.options.min,"Date").valueOf():null;if(isNaN(i)||null===i)throw new Error('Invalid start "'+t+'"');if(isNaN(r)||null===r)throw new Error('Invalid end "'+e+'"');if(r<i&&(r=i),null!==s&&i<s&&(n=s-i,i+=n,r+=n,null!=o&&r>o&&(r=o)),null!==o&&r>o&&(n=r-o,i-=n,r-=n,null!=s&&i<s&&(i=s)),null!==this.options.zoomMin){var a=parseFloat(this.options.zoomMin);if(a<0&&(a=0),r-i<a){var l=.5;this.end-this.start===a&&i>=this.start-l&&r<=this.end?(i=this.start,r=this.end):(n=a-(r-i),i-=n/2,r+=n/2)}}if(null!==this.options.zoomMax){var u=parseFloat(this.options.zoomMax);u<0&&(u=0),r-i>u&&(this.end-this.start===u&&i<this.start&&r>this.end?(i=this.start,r=this.end):(n=r-i-u,i+=n/2,r-=n/2))}var c=this.start!=i||this.end!=r;return i>=this.start&&i<=this.end||r>=this.start&&r<=this.end||this.start>=i&&this.start<=r||this.end>=i&&this.end<=r||this.body.emitter.emit("checkRangedItems"),this.start=i,this.end=r,c},r.prototype.getRange=function(){return{start:this.start,end:this.end}},r.prototype.conversion=function(t,e){return r.conversion(this.start,this.end,t,e)},r.conversion=function(t,e,n,i){return void 0===i&&(i=0),0!=n&&e-t!=0?{offset:t,scale:n/(e-t-i)}:{offset:0,scale:1}},r.prototype._onDragStart=function(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"))},r.prototype._onDrag=function(t){if(t&&this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging){var e=this.options.direction;o(e);var n="horizontal"==e?t.deltaX:t.deltaY;n-=this.deltaDifference;var i=this.props.touch.end-this.props.touch.start,r=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end);i-=r;var s="horizontal"==e?this.body.domProps.center.width:this.body.domProps.center.height;if(this.options.rtl)var a=n/s*i;else var a=-n/s*i;var l=this.props.touch.start+a,u=this.props.touch.end+a,c=m.snapAwayFromHidden(this.body.hiddenDates,l,this.previousDelta-n,!0),d=m.snapAwayFromHidden(this.body.hiddenDates,u,this.previousDelta-n,!0);if(c!=l||d!=u)return this.deltaDifference+=n,this.props.touch.start=c,this.props.touch.end=d,void this._onDrag(t);this.previousDelta=n,this._applyRange(l,u);var h=new Date(this.start),p=new Date(this.end);this.body.emitter.emit("rangechange",{start:h,end:p,byUser:!0,event:t}),this.body.emitter.emit("panmove")}},r.prototype._onDragEnd=function(t){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor="auto"),this.body.emitter.emit("rangechanged",{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:t}))},r.prototype._onMouseWheel=function(t){var e=0;if(t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3),this.options.zoomKey&&!t[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable){if(this.options.horizontalScroll){t.preventDefault();var n=e*(this.end-this.start)/20,i=this.start-n,r=this.end-n;this.setRange(i,r,!1,!0,t)}}else if(this.options.zoomable&&this.options.moveable&&this._isInsideRange(t)&&e){var o;o=e<0?1-e/5:1/(1+e/5);var s;if(this.rolling)s=(this.start+this.end)/2;else{var a=this.getPointer({x:t.clientX,y:t.clientY},this.body.dom.center);s=this._pointerToDate(a)}this.zoom(o,s,e,t),t.preventDefault()}},r.prototype._onTouch=function(t){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.scaleOffset=0,this.deltaDifference=0},r.prototype._onPinch=function(t){if(this.options.zoomable&&this.options.moveable){this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(t.center,this.body.dom.center)),this.stopRolling();var e=1/(t.scale+this.scaleOffset),n=this._pointerToDate(this.props.touch.center),i=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),r=m.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,n),o=i-r,s=n-r+(this.props.touch.start-(n-r))*e,a=n+o+(this.props.touch.end-(n+o))*e;this.startToFront=1-e<=0,this.endToFront=e-1<=0;var l=m.snapAwayFromHidden(this.body.hiddenDates,s,1-e,!0),u=m.snapAwayFromHidden(this.body.hiddenDates,a,e-1,!0);l==s&&u==a||(this.props.touch.start=l,this.props.touch.end=u,this.scaleOffset=1-t.scale,s=l,a=u),this.setRange(s,a,!1,!0,t),this.startToFront=!1,this.endToFront=!0}},r.prototype._isInsideRange=function(t){var e=t.center?t.center.x:t.clientX;if(this.options.rtl)var n=e-h.getAbsoluteLeft(this.body.dom.centerContainer);else var n=h.getAbsoluteRight(this.body.dom.centerContainer)-e;var i=this.body.util.toTime(n);return i>=this.start&&i<=this.end},r.prototype._pointerToDate=function(t){var e,n=this.options.direction;if(o(n),"horizontal"==n)return this.body.util.toTime(t.x).valueOf();var i=this.body.domProps.center.height;return e=this.conversion(i),t.y/e.scale+e.offset},r.prototype.getPointer=function(t,e){return this.options.rtl?{x:h.getAbsoluteRight(e)-t.x,y:t.y-h.getAbsoluteTop(e)}:{x:t.x-h.getAbsoluteLeft(e),y:t.y-h.getAbsoluteTop(e)}},r.prototype.zoom=function(t,e,n,i){null==e&&(e=(this.start+this.end)/2);var r=m.getHiddenDurationBetween(this.body.hiddenDates,this.start,this.end),o=m.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this,e),s=r-o,a=e-o+(this.start-(e-o))*t,l=e+s+(this.end-(e+s))*t;this.startToFront=!(n>0),this.endToFront=!(-n>0);var u=m.snapAwayFromHidden(this.body.hiddenDates,a,n,!0),c=m.snapAwayFromHidden(this.body.hiddenDates,l,-n,!0);u==a&&c==l||(a=u,l=c),this.setRange(a,l,!1,!0,i),this.startToFront=!1,this.endToFront=!0},r.prototype.move=function(t){var e=this.end-this.start,n=this.start+e*t,i=this.end+e*t;this.start=n,this.end=i},r.prototype.moveTo=function(t){var e=(this.start+this.end)/2,n=e-t,i=this.start-n,r=this.end-n;this.setRange(i,r,!1,!0,null)},t.exports=r},function(t,e,n){function i(t,e){this.options=null,this.props=null}var r=n(1);i.prototype.setOptions=function(t){t&&r.extend(this.options,t)},i.prototype.redraw=function(){return!1},i.prototype.destroy=function(){},i.prototype._isResized=function(){var t=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,t},t.exports=i},function(t,e){e.convertHiddenOptions=function(t,n,i){if(i&&!Array.isArray(i))return e.convertHiddenOptions(t,n,[i]);if(n.hiddenDates=[],i&&1==Array.isArray(i)){for(var r=0;r<i.length;r++)if(void 0===i[r].repeat){var o={};o.start=t(i[r].start).toDate().valueOf(),o.end=t(i[r].end).toDate().valueOf(),n.hiddenDates.push(o)}n.hiddenDates.sort(function(t,e){return t.start-e.start})}},e.updateHiddenDates=function(t,n,i){if(i&&!Array.isArray(i))return e.updateHiddenDates(t,n,[i]);if(i&&void 0!==n.domProps.centerContainer.width){e.convertHiddenOptions(t,n,i);for(var r=t(n.range.start),o=t(n.range.end),s=n.range.end-n.range.start,a=s/n.domProps.centerContainer.width,l=0;l<i.length;l++)if(void 0!==i[l].repeat){var u=t(i[l].start),c=t(i[l].end);if("Invalid Date"==u._d)throw new Error("Supplied start date is not valid: "+i[l].start);if("Invalid Date"==c._d)throw new Error("Supplied end date is not valid: "+i[l].end);var d=c-u;if(d>=4*a){var h=0,p=o.clone();switch(i[l].repeat){case"daily":u.day()!=c.day()&&(h=1),u.dayOfYear(r.dayOfYear()),u.year(r.year()),u.subtract(7,"days"),c.dayOfYear(r.dayOfYear()),c.year(r.year()),c.subtract(7-h,"days"),p.add(1,"weeks");break;case"weekly":var f=c.diff(u,"days"),m=u.day();u.date(r.date()),u.month(r.month()),u.year(r.year()),c=u.clone(),u.day(m),c.day(m),c.add(f,"days"),u.subtract(1,"weeks"),c.subtract(1,"weeks"),p.add(1,"weeks");break;case"monthly":u.month()!=c.month()&&(h=1),u.month(r.month()),u.year(r.year()),u.subtract(1,"months"),c.month(r.month()),c.year(r.year()),c.subtract(1,"months"),c.add(h,"months"),p.add(1,"months");break;case"yearly":u.year()!=c.year()&&(h=1),u.year(r.year()),u.subtract(1,"years"),c.year(r.year()),c.subtract(1,"years"),c.add(h,"years"),p.add(1,"years");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",i[l].repeat)}for(;u<p;)switch(n.hiddenDates.push({start:u.valueOf(),end:c.valueOf()}),i[l].repeat){case"daily":u.add(1,"days"),c.add(1,"days");break;case"weekly":u.add(1,"weeks"),c.add(1,"weeks");break;case"monthly":u.add(1,"months"),c.add(1,"months");break;case"yearly":u.add(1,"y"),c.add(1,"y");break;default:return void console.log("Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:",i[l].repeat)}n.hiddenDates.push({start:u.valueOf(),end:c.valueOf()})}}e.removeDuplicates(n);var g=e.isHidden(n.range.start,n.hiddenDates),v=e.isHidden(n.range.end,n.hiddenDates),y=n.range.start,b=n.range.end;1==g.hidden&&(y=1==n.range.startToFront?g.startDate-1:g.endDate+1),1==v.hidden&&(b=1==n.range.endToFront?v.startDate-1:v.endDate+1),1!=g.hidden&&1!=v.hidden||n.range._applyRange(y,b)}},e.removeDuplicates=function(t){for(var e=t.hiddenDates,n=[],i=0;i<e.length;i++)for(var r=0;r<e.length;r++)i!=r&&1!=e[r].remove&&1!=e[i].remove&&(e[r].start>=e[i].start&&e[r].end<=e[i].end?e[r].remove=!0:e[r].start>=e[i].start&&e[r].start<=e[i].end?(e[i].end=e[r].end,e[r].remove=!0):e[r].end>=e[i].start&&e[r].end<=e[i].end&&(e[i].start=e[r].start,e[r].remove=!0));for(var i=0;i<e.length;i++)e[i].remove!==!0&&n.push(e[i]);t.hiddenDates=n,t.hiddenDates.sort(function(t,e){return t.start-e.start})},e.printDates=function(t){for(var e=0;e<t.length;e++)console.log(e,new Date(t[e].start),new Date(t[e].end),t[e].start,t[e].end,t[e].remove)},e.stepOverHiddenDates=function(t,e,n){for(var i=!1,r=e.current.valueOf(),o=0;o<e.hiddenDates.length;o++){var s=e.hiddenDates[o].start,a=e.hiddenDates[o].end;if(r>=s&&r<a){i=!0;break}}if(1==i&&r<e._end.valueOf()&&r!=n){var l=t(n),u=t(a);l.year()!=u.year()?e.switchedYear=!0:l.month()!=u.month()?e.switchedMonth=!0:l.dayOfYear()!=u.dayOfYear()&&(e.switchedDay=!0),e.current=u}},e.toScreen=function(t,n,i){if(0==t.body.hiddenDates.length){var r=t.range.conversion(i);return(n.valueOf()-r.offset)*r.scale}var o=e.isHidden(n,t.body.hiddenDates);1==o.hidden&&(n=o.startDate);var s=e.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end);if(n<t.range.start){var r=t.range.conversion(i,s),a=e.getHiddenDurationBeforeStart(t.body.hiddenDates,n,r.offset);return n=t.options.moment(n).toDate().valueOf(),n+=a,-(r.offset-n.valueOf())*r.scale}if(n>t.range.end){var l={start:t.range.start,end:n};n=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,l,n);var r=t.range.conversion(i,s);return(n.valueOf()-r.offset)*r.scale}n=e.correctTimeForHidden(t.options.moment,t.body.hiddenDates,t.range,n);var r=t.range.conversion(i,s);return(n.valueOf()-r.offset)*r.scale},e.toTime=function(t,n,i){if(0==t.body.hiddenDates.length){var r=t.range.conversion(i);return new Date(n/r.scale+r.offset)}var o=e.getHiddenDurationBetween(t.body.hiddenDates,t.range.start,t.range.end),s=t.range.end-t.range.start-o,a=s*n/i,l=e.getAccumulatedHiddenDuration(t.body.hiddenDates,t.range,a),u=new Date(l+a+t.range.start);return u},e.getHiddenDurationBetween=function(t,e,n){for(var i=0,r=0;r<t.length;r++){var o=t[r].start,s=t[r].end;o>=e&&s<n&&(i+=s-o)}return i},e.getHiddenDurationBeforeStart=function(t,e,n){for(var i=0,r=0;r<t.length;r++){var o=t[r].start,s=t[r].end;o>=e&&s<=n&&(i+=s-o)}return i},e.correctTimeForHidden=function(t,n,i,r){return r=t(r).toDate().valueOf(),r-=e.getHiddenDurationBefore(t,n,i,r)},e.getHiddenDurationBefore=function(t,e,n,i){var r=0;i=t(i).toDate().valueOf();for(var o=0;o<e.length;o++){var s=e[o].start,a=e[o].end;s>=n.start&&a<n.end&&i>=a&&(r+=a-s)}return r},e.getAccumulatedHiddenDuration=function(t,e,n){for(var i=0,r=0,o=e.start,s=0;s<t.length;s++){var a=t[s].start,l=t[s].end;if(a>=e.start&&l<e.end){if(r+=a-o,o=l,r>=n)break;i+=l-a}}return i},e.snapAwayFromHidden=function(t,n,i,r){var o=e.isHidden(n,t);return 1==o.hidden?i<0?1==r?o.startDate-(o.endDate-n)-1:o.startDate-1:1==r?o.endDate+(n-o.startDate)+1:o.endDate+1:n},e.isHidden=function(t,e){for(var n=0;n<e.length;n++){var i=e[n].start,r=e[n].end;if(t>=i&&t<r)return{hidden:!0,startDate:i,endDate:r}}return{hidden:!1,startDate:i,endDate:r}}},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(){}var o=n(89),s=i(o),a=n(62),l=i(a),u=n(106),c=n(101),d=n(104),h=n(1),p=(n(88),n(92),n(107),n(111),n(122)),f=n(123),m=n(109),g=n(125);u(r.prototype),r.prototype._create=function(t){function e(t){if(this.isActive()&&this.emit("mousewheel",t),this.options.verticalScroll&&!this.options.horizontalScroll&&this.options.zoomKey&&!t[this.options.zoomKey]){t.preventDefault();var e=0;t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3);var n=this.props.scrollTop,i=n+120*e;this.isActive()&&(this._setScrollTop(i),this._redraw(),this.emit("scroll",t))}}function n(t){if(o.options.verticalScroll&&(t.preventDefault(),o.isActive())){var e=-t.target.scrollTop;o._setScrollTop(e),o._redraw(),o.emit("scrollSide",t)}}function i(t){if(t.preventDefault&&t.preventDefault(),!(!t.target.className.indexOf("vis")>-1||l))return t.dataTransfer.dropEffect="move",l=!0,!1}function r(t){t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation();try{var e=JSON.parse(t.dataTransfer.getData("text"));if(!e.content)return}catch(t){return!1}return l=!1,t.center={x:t.clientX,y:t.clientY},o.itemSet._onAddItem(t),!1}this.dom={},this.dom.container=t,this.dom.root=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.backgroundVertical=document.createElement("div"),this.dom.backgroundHorizontal=document.createElement("div"),this.dom.centerContainer=document.createElement("div"),this.dom.leftContainer=document.createElement("div"),this.dom.rightContainer=document.createElement("div"),this.dom.center=document.createElement("div"),this.dom.left=document.createElement("div"),this.dom.right=document.createElement("div"),this.dom.top=document.createElement("div"),this.dom.bottom=document.createElement("div"),this.dom.shadowTop=document.createElement("div"),this.dom.shadowBottom=document.createElement("div"),this.dom.shadowTopLeft=document.createElement("div"),this.dom.shadowBottomLeft=document.createElement("div"),this.dom.shadowTopRight=document.createElement("div"),this.dom.shadowBottomRight=document.createElement("div"),this.dom.rollingModeBtn=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.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.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",function(){this.initialDrawDone===!0&&this._redraw()}.bind(this)),this.on("touch",this._onTouch.bind(this)),this.on("panmove",this._onDrag.bind(this));var o=this;this._origRedraw=this._redraw.bind(this),this._redraw=h.throttle(this._origRedraw),this.on("_change",function(t){o.itemSet&&o.itemSet.initialItemSetDrawn&&t&&1==t.queue?o._redraw():o._origRedraw()}),this.hammer=new c(this.dom.root);var s=this.hammer.get("pinch").set({enable:!0});d.disablePreventDefaultVertically(s),this.hammer.get("pan").set({threshold:5,direction:c.DIRECTION_HORIZONTAL}),this.listeners={};var a=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];a.forEach(function(t){var e=function(e){o.isActive()&&o.emit(t,e)};o.hammer.on(t,e),o.listeners[t]=e}),d.onTouch(this.hammer,function(t){o.emit("touch",t)}.bind(this)),d.onRelease(this.hammer,function(t){o.emit("release",t)}.bind(this)),this.dom.centerContainer.addEventListener?(this.dom.centerContainer.addEventListener("mousewheel",e.bind(this),!1),this.dom.centerContainer.addEventListener("DOMMouseScroll",e.bind(this),!1)):this.dom.centerContainer.attachEvent("onmousewheel",e.bind(this)),this.dom.left.parentNode.addEventListener("scroll",n.bind(this)),this.dom.right.parentNode.addEventListener("scroll",n.bind(this));var l=!1;if(this.dom.center.addEventListener("dragover",i.bind(this),!1),this.dom.center.addEventListener("drop",r.bind(this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,!t)throw new Error("No container provided");t.appendChild(this.dom.root)},r.prototype.setOptions=function(t){if(t){var e=["width","height","minHeight","maxHeight","autoResize","start","end","clickToUse","dataAttributes","hiddenDates","locale","locales","moment","rtl","zoomKey","horizontalScroll","verticalScroll"];if(h.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"),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"===(0,l.default)(t.orientation)&&("item"in t.orientation&&(this.options.orientation.item=t.orientation.item),"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis))),"both"===this.options.orientation.axis){if(!this.timeAxis2){var n=this.timeAxis2=new p(this.body);n.setOptions=function(t){var e=t?h.extend({},t):{};e.orientation="top",p.prototype.setOptions.call(n,e)},this.components.push(n)}}else if(this.timeAxis2){var i=this.components.indexOf(this.timeAxis2);i!==-1&&this.components.splice(i,1),this.timeAxis2.destroy(),this.timeAxis2=null}if("function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),"hiddenDates"in this.options&&m.convertHiddenOptions(this.options.moment,this.body,this.options.hiddenDates),"clickToUse"in t&&(t.clickToUse?this.activator||(this.activator=new f(this.dom.root)):this.activator&&(this.activator.destroy(),delete this.activator)),"showCustomTime"in t)throw new Error("Option `showCustomTime` is deprecated. Create a custom time bar via timeline.addCustomTime(time [, id])");this._initAutoResize()}if(this.components.forEach(function(e){return e.setOptions(t)}),"configure"in t){this.configurator||(this.configurator=this._createConfigurator()),this.configurator.setOptions(t.configure);var r=h.deepExtend({},this.options);this.components.forEach(function(t){h.deepExtend(r,t.options)}),this.configurator.setModuleOptions({global:r})}this._redraw()},r.prototype.isActive=function(){return!this.activator||this.activator.active},r.prototype.destroy=function(){this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(var t in this.listeners)this.listeners.hasOwnProperty(t)&&delete this.listeners[t];this.listeners=null,this.hammer=null,this.components.forEach(function(t){return t.destroy()}),this.body=null},r.prototype.setCustomTime=function(t,e){var n=this.customTimes.filter(function(t){return e===t.options.id});if(0===n.length)throw new Error("No custom time bar found with id "+(0,s.default)(e));n.length>0&&n[0].setCustomTime(t)},r.prototype.getCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+(0,s.default)(t));return e[0].getCustomTime()},r.prototype.setCustomTimeTitle=function(t,e){var n=this.customTimes.filter(function(t){return t.options.id===e});if(0===n.length)throw new Error("No custom time bar found with id "+(0,s.default)(e));if(n.length>0)return n[0].setCustomTitle(t)},r.prototype.getEventProperties=function(t){return{event:t}},r.prototype.addCustomTime=function(t,e){var n=void 0!==t?h.convert(t,"Date").valueOf():new Date,i=this.customTimes.some(function(t){return t.options.id===e});if(i)throw new Error("A custom time with id "+(0,s.default)(e)+" already exists");var r=new g(this.body,h.extend({},this.options,{time:n,id:e}));return this.customTimes.push(r),this.components.push(r),this._redraw(),e},r.prototype.removeCustomTime=function(t){var e=this.customTimes.filter(function(e){return e.options.id===t});if(0===e.length)throw new Error("No custom time bar found with id "+(0,s.default)(t));e.forEach(function(t){this.customTimes.splice(this.customTimes.indexOf(t),1),this.components.splice(this.components.indexOf(t),1),t.destroy()}.bind(this))},r.prototype.getVisibleItems=function(){return this.itemSet&&this.itemSet.getVisibleItems()||[]},r.prototype.fit=function(t){var e=this.getDataRange();if(null!==e.min||null!==e.max){var n=e.max-e.min,i=new Date(e.min.valueOf()-.01*n),r=new Date(e.max.valueOf()+.01*n),o=!t||void 0===t.animation||t.animation;this.range.setRange(i,r,o)}},r.prototype.getDataRange=function(){throw new Error("Cannot invoke abstract method getDataRange")},r.prototype.setWindow=function(t,e,n){var i;if(1==arguments.length){var r=arguments[0];i=void 0===r.animation||r.animation,this.range.setRange(r.start,r.end,i)}else i=!n||void 0===n.animation||n.animation,this.range.setRange(t,e,i)},r.prototype.moveTo=function(t,e){var n=this.range.end-this.range.start,i=h.convert(t,"Date").valueOf(),r=i-n/2,o=i+n/2,s=!e||void 0===e.animation||e.animation;this.range.setRange(r,o,s)},r.prototype.getWindow=function(){var t=this.range.getRange();return{start:new Date(t.start),end:new Date(t.end)}},r.prototype.zoomIn=function(t,e){if(!(!t||t<0||t>1)){var n=this.getWindow(),i=n.start.valueOf(),r=n.end.valueOf(),o=r-i,s=o/(1+t),a=(o-s)/2,l=i+a,u=r-a;this.setWindow(l,u,e)}},r.prototype.zoomOut=function(t,e){if(!(!t||t<0||t>1)){var n=this.getWindow(),i=n.start.valueOf(),r=n.end.valueOf(),o=r-i,s=i-o*t/2,a=r+o*t/2;
20
+ this.setWindow(s,a,e)}},r.prototype.redraw=function(){this._redraw()},r.prototype._redraw=function(){this.redrawCount++;var t=!1,e=this.options,n=this.props,i=this.dom;if(i&&i.container&&0!=i.root.offsetWidth){m.updateHiddenDates(this.options.moment,this.body,this.options.hiddenDates),"top"==e.orientation?(h.addClassName(i.root,"vis-top"),h.removeClassName(i.root,"vis-bottom")):(h.removeClassName(i.root,"vis-top"),h.addClassName(i.root,"vis-bottom")),i.root.style.maxHeight=h.option.asSize(e.maxHeight,""),i.root.style.minHeight=h.option.asSize(e.minHeight,""),i.root.style.width=h.option.asSize(e.width,""),n.border.left=(i.centerContainer.offsetWidth-i.centerContainer.clientWidth)/2,n.border.right=n.border.left,n.border.top=(i.centerContainer.offsetHeight-i.centerContainer.clientHeight)/2,n.border.bottom=n.border.top,n.borderRootHeight=i.root.offsetHeight-i.root.clientHeight,n.borderRootWidth=i.root.offsetWidth-i.root.clientWidth,0===i.centerContainer.clientHeight&&(n.border.left=n.border.top,n.border.right=n.border.left),0===i.root.clientHeight&&(n.borderRootWidth=n.borderRootHeight),n.center.height=i.center.offsetHeight,n.left.height=i.left.offsetHeight,n.right.height=i.right.offsetHeight,n.top.height=i.top.clientHeight||-n.border.top,n.bottom.height=i.bottom.clientHeight||-n.border.bottom;var r=Math.max(n.left.height,n.center.height,n.right.height),o=n.top.height+r+n.bottom.height+n.borderRootHeight+n.border.top+n.border.bottom;i.root.style.height=h.option.asSize(e.height,o+"px"),n.root.height=i.root.offsetHeight,n.background.height=n.root.height-n.borderRootHeight;var s=n.root.height-n.top.height-n.bottom.height-n.borderRootHeight;n.centerContainer.height=s,n.leftContainer.height=s,n.rightContainer.height=n.leftContainer.height,n.root.width=i.root.offsetWidth,n.background.width=n.root.width-n.borderRootWidth,this.initialDrawDone||(n.scrollbarWidth=h.getScrollBarWidth()),e.verticalScroll?e.rtl?(n.left.width=i.leftContainer.clientWidth||-n.border.left,n.right.width=i.rightContainer.clientWidth+n.scrollbarWidth||-n.border.right):(n.left.width=i.leftContainer.clientWidth+n.scrollbarWidth||-n.border.left,n.right.width=i.rightContainer.clientWidth||-n.border.right):(n.left.width=i.leftContainer.clientWidth||-n.border.left,n.right.width=i.rightContainer.clientWidth||-n.border.right),this._setDOM();var a=this._updateScrollTop();"top"!=e.orientation.item&&(a+=Math.max(n.centerContainer.height-n.center.height-n.border.top-n.border.bottom,0)),i.center.style.top=a+"px";var l=0==n.scrollTop?"hidden":"",u=n.scrollTop==n.scrollTopMin?"hidden":"";i.shadowTop.style.visibility=l,i.shadowBottom.style.visibility=u,i.shadowTopLeft.style.visibility=l,i.shadowBottomLeft.style.visibility=u,i.shadowTopRight.style.visibility=l,i.shadowBottomRight.style.visibility=u,e.verticalScroll&&(i.rightContainer.className="vis-panel vis-right vis-vertical-scroll",i.leftContainer.className="vis-panel vis-left vis-vertical-scroll",i.shadowTopRight.style.visibility="hidden",i.shadowBottomRight.style.visibility="hidden",i.shadowTopLeft.style.visibility="hidden",i.shadowBottomLeft.style.visibility="hidden",i.left.style.top="0px",i.right.style.top="0px"),(!e.verticalScroll||n.center.height<n.centerContainer.height)&&(i.left.style.top=a+"px",i.right.style.top=a+"px",i.rightContainer.className=i.rightContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),i.leftContainer.className=i.leftContainer.className.replace(new RegExp("(?:^|\\s)vis-vertical-scroll(?:\\s|$)")," "),n.left.width=i.leftContainer.clientWidth||-n.border.left,n.right.width=i.rightContainer.clientWidth||-n.border.right,this._setDOM());var d=n.center.height>n.centerContainer.height;this.hammer.get("pan").set({direction:d?c.DIRECTION_ALL:c.DIRECTION_HORIZONTAL}),this.components.forEach(function(e){t=e.redraw()||t});var p=5;if(t){if(this.redrawCount<p)return void this.body.emitter.emit("_change");console.log("WARNING: infinite loop in redraw?")}else this.redrawCount=0;this.initialDrawDone=!0,this.body.emitter.emit("changed")}},r.prototype._setDOM=function(){var t=this.props,e=this.dom;t.leftContainer.width=t.left.width,t.rightContainer.width=t.right.width;var n=t.root.width-t.left.width-t.right.width-t.borderRootWidth;t.center.width=n,t.centerContainer.width=n,t.top.width=n,t.bottom.width=n,e.background.style.height=t.background.height+"px",e.backgroundVertical.style.height=t.background.height+"px",e.backgroundHorizontal.style.height=t.centerContainer.height+"px",e.centerContainer.style.height=t.centerContainer.height+"px",e.leftContainer.style.height=t.leftContainer.height+"px",e.rightContainer.style.height=t.rightContainer.height+"px",e.background.style.width=t.background.width+"px",e.backgroundVertical.style.width=t.centerContainer.width+"px",e.backgroundHorizontal.style.width=t.background.width+"px",e.centerContainer.style.width=t.center.width+"px",e.top.style.width=t.top.width+"px",e.bottom.style.width=t.bottom.width+"px",e.background.style.left="0",e.background.style.top="0",e.backgroundVertical.style.left=t.left.width+t.border.left+"px",e.backgroundVertical.style.top="0",e.backgroundHorizontal.style.left="0",e.backgroundHorizontal.style.top=t.top.height+"px",e.centerContainer.style.left=t.left.width+"px",e.centerContainer.style.top=t.top.height+"px",e.leftContainer.style.left="0",e.leftContainer.style.top=t.top.height+"px",e.rightContainer.style.left=t.left.width+t.center.width+"px",e.rightContainer.style.top=t.top.height+"px",e.top.style.left=t.left.width+"px",e.top.style.top="0",e.bottom.style.left=t.left.width+"px",e.bottom.style.top=t.top.height+t.centerContainer.height+"px",e.center.style.left="0",e.left.style.left="0",e.right.style.left="0"},r.prototype.repaint=function(){throw new Error("Function repaint is deprecated. Use redraw instead.")},r.prototype.setCurrentTime=function(t){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");this.currentTime.setCurrentTime(t)},r.prototype.getCurrentTime=function(){if(!this.currentTime)throw new Error("Option showCurrentTime must be true");return this.currentTime.getCurrentTime()},r.prototype._toTime=function(t){return m.toTime(this,t,this.props.center.width)},r.prototype._toGlobalTime=function(t){return m.toTime(this,t,this.props.root.width)},r.prototype._toScreen=function(t){return m.toScreen(this,t,this.props.center.width)},r.prototype._toGlobalScreen=function(t){return m.toScreen(this,t,this.props.root.width)},r.prototype._initAutoResize=function(){1==this.options.autoResize?this._startAutoResize():this._stopAutoResize()},r.prototype._startAutoResize=function(){var t=this;this._stopAutoResize(),this._onResize=function(){return 1!=t.options.autoResize?void t._stopAutoResize():void(t.dom.root&&(t.dom.root.offsetWidth==t.props.lastWidth&&t.dom.root.offsetHeight==t.props.lastHeight||(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight,t.props.scrollbarWidth=h.getScrollBarWidth(),t.body.emitter.emit("_change"))))},h.addEventListener(window,"resize",this._onResize),t.dom.root&&(t.props.lastWidth=t.dom.root.offsetWidth,t.props.lastHeight=t.dom.root.offsetHeight),this.watchTimer=setInterval(this._onResize,1e3)},r.prototype._stopAutoResize=function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0),this._onResize&&(h.removeEventListener(window,"resize",this._onResize),this._onResize=null)},r.prototype._onTouch=function(t){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop},r.prototype._onPinch=function(t){this.touch.allowDragging=!1},r.prototype._onDrag=function(t){if(t&&this.touch.allowDragging){var e=t.deltaY,n=this._getScrollTop(),i=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),i!=n&&this.emit("verticalDrag")}},r.prototype._setScrollTop=function(t){return this.props.scrollTop=t,this._updateScrollTop(),this.props.scrollTop},r.prototype._updateScrollTop=function(){var t=Math.min(this.props.centerContainer.height-this.props.center.height,0);return t!=this.props.scrollTopMin&&("top"!=this.options.orientation.item&&(this.props.scrollTop+=t-this.props.scrollTopMin),this.props.scrollTopMin=t),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<t&&(this.props.scrollTop=t),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop},r.prototype._getScrollTop=function(){return this.props.scrollTop},r.prototype._createConfigurator=function(){throw new Error("Cannot invoke abstract method _createConfigurator")},t.exports=r},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){this.body=t,this.defaultOptions={type:null,orientation:{item:"bottom"},align:"auto",stack:!0,stackSubgroups:!0,groupOrderSwap:function(t,e,n){var i=e.order;e.order=t.order,t.order=i},groupOrder:"order",selectable:!0,multiselect:!1,itemsAlwaysDraggable:!1,editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:m.snap,onAdd:function(t,e){e(t)},onUpdate:function(t,e){e(t)},onMove:function(t,e){e(t)},onRemove:function(t,e){e(t)},onMoving:function(t,e){e(t)},onAddGroup:function(t,e){e(t)},onMoveGroup:function(t,e){e(t)},onRemoveGroup:function(t,e){e(t)},margin:{item:{horizontal:10,vertical:10},axis:20},tooltip:{followMouse:!1,overflowMethod:"flip"},tooltipOnItemUpdateTime:!1},this.options=h.extend({},this.defaultOptions),this.options.rtl=e.rtl,this.itemOptions={type:{start:"Date",end:"Date"}},this.conversion={toScreen:t.util.toScreen,toTime:t.util.toTime},this.dom={},this.props={},this.hammer=null;var n=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,i){n._onAdd(e.items)},update:function(t,e,i){n._onUpdate(e.items)},remove:function(t,e,i){n._onRemove(e.items)}},this.groupListeners={add:function(t,e,i){n._onAddGroups(e.items)},update:function(t,e,i){n._onUpdateGroups(e.items)},remove:function(t,e,i){n._onRemoveGroups(e.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.stackDirty=!0,this.popup=null,this.touchParams={},this.groupTouchParams={},this._create(),this.setOptions(e)}var o=n(55),s=i(o),a=n(62),l=i(a),u=n(112),c=i(u),d=n(101),h=n(1),p=n(88),f=n(92),m=n(113),g=n(108),v=n(114),y=n(118),b=n(119),w=n(120),_=n(116),x=n(121),k="__ungrouped__",C="__background__";r.prototype=new g,r.types={background:x,box:b,range:_,point:w},r.prototype._create=function(){var t=document.createElement("div");t.className="vis-itemset",t["timeline-itemset"]=this,this.dom.frame=t;var e=document.createElement("div");e.className="vis-background",t.appendChild(e),this.dom.background=e;var n=document.createElement("div");n.className="vis-foreground",t.appendChild(n),this.dom.foreground=n;var i=document.createElement("div");i.className="vis-axis",this.dom.axis=i;var r=document.createElement("div");r.className="vis-labelset",this.dom.labelSet=r,this._updateUngrouped();var o=new y(C,null,this);o.show(),this.groups[C]=o,this.hammer=new d(this.body.dom.centerContainer),this.hammer.on("hammer.input",function(t){t.isFirst&&this._onTouch(t)}.bind(this)),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:d.DIRECTION_HORIZONTAL}),this.hammer.on("tap",this._onSelectItem.bind(this)),this.hammer.on("press",this._onMultiSelectItem.bind(this)),this.hammer.on("doubletap",this._onAddItem.bind(this)),this.options.rtl?this.groupHammer=new d(this.body.dom.rightContainer):this.groupHammer=new d(this.body.dom.leftContainer),this.groupHammer.on("tap",this._onGroupClick.bind(this)),this.groupHammer.on("panstart",this._onGroupDragStart.bind(this)),this.groupHammer.on("panmove",this._onGroupDrag.bind(this)),this.groupHammer.on("panend",this._onGroupDragEnd.bind(this)),this.groupHammer.get("pan").set({threshold:5,direction:d.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener("mouseover",this._onMouseOver.bind(this)),this.body.dom.centerContainer.addEventListener("mouseout",this._onMouseOut.bind(this)),this.body.dom.centerContainer.addEventListener("mousemove",this._onMouseMove.bind(this)),this.body.dom.centerContainer.addEventListener("contextmenu",this._onDragEnd.bind(this)),this.body.dom.centerContainer.addEventListener("mousewheel",this._onMouseWheel.bind(this)),this.show()},r.prototype.setOptions=function(t){if(t){var e=["type","rtl","align","order","stack","stackSubgroups","selectable","multiselect","itemsAlwaysDraggable","multiselectPerGroup","groupOrder","dataAttributes","template","groupTemplate","visibleFrameTemplate","hide","snap","groupOrderSwap","tooltip","tooltipOnItemUpdateTime"];h.selectiveExtend(e,this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.item="top"===t.orientation?"top":"bottom":"object"===(0,l.default)(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"===(0,l.default)(t.margin)&&(h.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"===(0,l.default)(t.margin.item)&&h.selectiveExtend(["horizontal","vertical"],this.options.margin.item,t.margin.item)))),"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"===(0,l.default)(t.editable)&&h.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"===(0,l.default)(t.groupEditable)&&h.selectiveExtend(["order","add","remove"],this.options.groupEditable,t.groupEditable));var n=function(e){var n=t[e];if(n){if(!(n instanceof Function))throw new Error("option "+e+" must be a function "+e+"(item, callback)");this.options[e]=n}}.bind(this);["onAdd","onUpdate","onRemove","onMove","onMoving","onAddGroup","onMoveGroup","onRemoveGroup"].forEach(n),this.markDirty()}},r.prototype.markDirty=function(t){this.groupIds=[],this.stackDirty=!0,t&&t.refreshItems&&h.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()})},r.prototype.destroy=function(){this.hide(),this.setItems(null),this.setGroups(null),this.hammer=null,this.body=null,this.conversion=null},r.prototype.hide=function(){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)},r.prototype.show=function(){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))},r.prototype.setSelection=function(t){var e,n,i,r;for(void 0==t&&(t=[]),Array.isArray(t)||(t=[t]),e=0,n=this.selection.length;e<n;e++)i=this.selection[e],r=this.items[i],r&&r.unselect();for(this.selection=[],e=0,n=t.length;e<n;e++)i=t[e],r=this.items[i],r&&(this.selection.push(i),r.select())},r.prototype.getSelection=function(){return this.selection.concat([])},r.prototype.getVisibleItems=function(){var t=this.body.range.getRange();if(this.options.rtl)var e=this.body.util.toScreen(t.start),n=this.body.util.toScreen(t.end);else var n=this.body.util.toScreen(t.start),e=this.body.util.toScreen(t.end);var i=[];for(var r in this.groups)if(this.groups.hasOwnProperty(r))for(var o=this.groups[r],s=o.visibleItems,a=0;a<s.length;a++){var l=s[a];this.options.rtl?l.right<n&&l.right+l.width>e&&i.push(l.id):l.left<e&&l.left+l.width>n&&i.push(l.id)}return i},r.prototype._deselect=function(t){for(var e=this.selection,n=0,i=e.length;n<i;n++)if(e[n]==t){e.splice(n,1);break}},r.prototype.redraw=function(){var t=this.options.margin,e=this.body.range,n=h.option.asSize,i=this.options,r=i.orientation.item,o=!1,s=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,s.className="vis-itemset",o=this._orderGroups()||o;var a=e.end-e.start,l=a!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,u=e.start!=this.lastRangeStart;(l||u)&&(this.stackDirty=!0),this.lastVisibleInterval=a,this.lastRangeStart=e.start,this.props.lastWidth=this.props.width;var c=this.stackDirty,d=this._firstGroup(),p={item:t.item,axis:t.axis},f={item:t.item,axis:t.item.vertical/2},m=0,g=t.axis+t.item.vertical;return this.groups[C].redraw(e,f,c),h.forEach(this.groups,function(t){var n=t==d?p:f,i=t.redraw(e,n,c);o=i||o,m+=t.height}),m=Math.max(m,g),this.stackDirty=!1,s.style.height=n(m),this.props.width=s.offsetWidth,this.props.height=m,this.dom.axis.style.top=n("top"==r?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.initialItemSetDrawn=!0,o=this._isResized()||o},r.prototype._firstGroup=function(){var t="top"==this.options.orientation.item?0:this.groupIds.length-1,e=this.groupIds[t],n=this.groups[e]||this.groups[k];return n||null},r.prototype._updateUngrouped=function(){var t,e,n=this.groups[k];if(this.groups[C],this.groupsData){if(n){n.hide(),delete this.groups[k];for(e in this.items)if(this.items.hasOwnProperty(e)){t=this.items[e],t.parent&&t.parent.remove(t);var i=this._getGroupId(t.data),r=this.groups[i];r&&r.add(t)||t.hide()}}}else if(!n){var o=null,s=null;n=new v(o,s,this),this.groups[k]=n;for(e in this.items)this.items.hasOwnProperty(e)&&(t=this.items[e],n.add(t));n.show()}},r.prototype.getLabelSet=function(){return this.dom.labelSet},r.prototype.setItems=function(t){var e,n=this,i=this.itemsData;if(t){if(!(t instanceof p||t instanceof f))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(i&&(h.forEach(this.itemListeners,function(t,e){i.off(e,t)}),e=i.getIds(),this._onRemove(e)),this.itemsData){var r=this.id;h.forEach(this.itemListeners,function(t,e){n.itemsData.on(e,t,r)}),e=this.itemsData.getIds(),this._onAdd(e),this._updateUngrouped()}this.body.emitter.emit("_change",{queue:!0})},r.prototype.getItems=function(){return this.itemsData},r.prototype.setGroups=function(t){var e,n=this;if(this.groupsData&&(h.forEach(this.groupListeners,function(t,e){n.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(e)),t){if(!(t instanceof p||t instanceof f))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var i=this.groupsData;this.groupsData instanceof f&&(i=this.groupsData.getDataSet()),i.get().forEach(function(t){t.nestedGroups&&t.nestedGroups.forEach(function(e){var n=i.get(e);n.nestedInGroup=t.id,0==t.showNested&&(n.visible=!1),i.update(n)})});var r=this.id;h.forEach(this.groupListeners,function(t,e){n.groupsData.on(e,t,r)}),e=this.groupsData.getIds(),this._onAddGroups(e)}this._updateUngrouped(),this._order(),this.body.emitter.emit("_change",{queue:!0})},r.prototype.getGroups=function(){return this.groupsData},r.prototype.removeItem=function(t){var e=this.itemsData.get(t),n=this.itemsData.getDataSet();this.items[t],e&&this.options.onRemove(e,function(e){e&&n.remove(t)})},r.prototype._getType=function(t){return t.type||this.options.type||(t.end?"range":"box")},r.prototype._getGroupId=function(t){var e=this._getType(t);return"background"==e&&void 0==t.group?C:this.groupsData?t.group:k},r.prototype._onUpdate=function(t){var e=this;t.forEach(function(t){var n,i=e.itemsData.get(t,e.itemOptions),o=e.items[t],s=i?e._getType(i):null,a=r.types[s];if(o&&(a&&o instanceof a?e._updateItem(o,i):(n=o.selected,e._removeItem(o),o=null)),!o&&i){if(!a)throw"rangeoverflow"==s?new TypeError('Item type "rangeoverflow" is deprecated. Use css styling instead: .vis-item.vis-range .vis-item-content {overflow: visible;}'):new TypeError('Unknown item type "'+s+'"');o=new a(i,e.conversion,e.options),o.id=t,e._addItem(o),n&&(this.selection.push(t),o.select())}}.bind(this)),this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0})},r.prototype._onAdd=r.prototype._onUpdate,r.prototype._onRemove=function(t){var e=0,n=this;t.forEach(function(t){var i=n.items[t];i&&(e++,n._removeItem(i))}),e&&(this._order(),this.stackDirty=!0,this.body.emitter.emit("_change",{queue:!0}))},r.prototype._order=function(){h.forEach(this.groups,function(t){t.order()})},r.prototype._onUpdateGroups=function(t){this._onAddGroups(t)},r.prototype._onAddGroups=function(t){var e=this;t.forEach(function(t){var n=e.groupsData.get(t),i=e.groups[t];if(i)i.setData(n);else{if(t==k||t==C)throw new Error("Illegal group id. "+t+" is a reserved id.");var r=(0,s.default)(e.options);h.extend(r,{height:null}),i=new v(t,n,e),e.groups[t]=i;for(var o in e.items)if(e.items.hasOwnProperty(o)){var a=e.items[o];a.data.group==t&&i.add(a)}i.order(),i.show()}}),this.body.emitter.emit("_change",{queue:!0})},r.prototype._onRemoveGroups=function(t){var e=this.groups;t.forEach(function(t){var n=e[t];n&&(n.hide(),delete e[t])}),this.markDirty(),this.body.emitter.emit("_change",{queue:!0})},r.prototype._orderGroups=function(){if(this.groupsData){var t=this.groupsData.getIds({order:this.options.groupOrder});t=this._orderNestedGroups(t);var e=!h.equalArray(t,this.groupIds);if(e){var n=this.groups;t.forEach(function(t){n[t].hide()}),t.forEach(function(t){n[t].show()}),this.groupIds=t}return e}return!1},r.prototype._orderNestedGroups=function(t){var e=[];return t.forEach(function(t){var n=this.groupsData.get(t);if(n.nestedInGroup||e.push(t),n.nestedGroups){var i=this.groupsData.get({filter:function(e){return e.nestedInGroup==t},order:this.options.groupOrder}),r=i.map(function(t){return t.id});e=e.concat(r)}},this),e},r.prototype._addItem=function(t){this.items[t.id]=t;var e=this._getGroupId(t.data),n=this.groups[e];n?n&&n.data&&n.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,n&&n.add(t)},r.prototype._updateItem=function(t,e){var n=t.data.group,i=t.data.subgroup;if(n!=e.group){var r=this.groups[n];r&&r.remove(t)}t.setData(e);var o=this._getGroupId(t.data),s=this.groups[o];s?s&&s.data&&s.data.showNested&&(t.groupShowing=!0):t.groupShowing=!1,s&&(n!=t.data.group?s.add(t):i!=t.data.subgroup&&s.changeSubgroup(t,i))},r.prototype._removeItem=function(t){t.hide(),delete this.items[t.id];var e=this.selection.indexOf(t.id);e!=-1&&this.selection.splice(e,1),t.parent&&t.parent.remove(t)},r.prototype._constructByEndArray=function(t){for(var e=[],n=0;n<t.length;n++)t[n]instanceof _&&e.push(t[n]);return e},r.prototype._onTouch=function(t){this.touchParams.item=this.itemFromTarget(t),this.touchParams.dragLeftItem=t.target.dragLeftItem||!1,this.touchParams.dragRightItem=t.target.dragRightItem||!1,this.touchParams.itemProps=null},r.prototype._getGroupIndex=function(t){for(var e=0;e<this.groupIds.length;e++)if(t==this.groupIds[e])return e},r.prototype._onDragStart=function(t){if(!this.touchParams.itemIsDragging){var e,n=this.touchParams.item||null,i=this;if(n&&(n.selected||this.options.itemsAlwaysDraggable)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;if(null!=n.editable&&!n.editable.updateTime&&!n.editable.updateGroup&&!this.options.editable.overrideItems)return;var r=this.touchParams.dragLeftItem,o=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=n,r)e={item:r,initialX:t.center.x,dragLeft:!0,data:this._cloneItemData(n.data)},this.touchParams.itemProps=[e];else if(o)e={item:o,initialX:t.center.x,dragRight:!0,data:this._cloneItemData(n.data)},this.touchParams.itemProps=[e];else{var s=this._getGroupIndex(n.data.group),a=this.options.itemsAlwaysDraggable&&!n.selected?[n.id]:this.getSelection();this.touchParams.itemProps=a.map(function(e){var n=i.items[e],r=i._getGroupIndex(n.data.group);return{item:n,initialX:t.center.x,groupOffset:s-r,data:this._cloneItemData(n.data)}}.bind(this))}t.stopPropagation()}else this.options.editable.add&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey)&&this._onDragStartAddItem(t)}},r.prototype._onDragStartAddItem=function(t){var e=this.options.snap||null;if(this.options.rtl)var n=h.getAbsoluteRight(this.dom.frame),i=n-t.center.x+10;else var n=h.getAbsoluteLeft(this.dom.frame),i=t.center.x-n-10;var r=this.body.util.toTime(i),o=this.body.util.getScale(),s=this.body.util.getStep(),a=e?e(r,o,s):r,l=a,u={type:"range",start:a,end:l,content:"new item"},c=h.randomUUID();u[this.itemsData._fieldId]=c;var d=this.groupFromTarget(t);d&&(u.group=d.groupId);var p=new _(u,this.conversion,this.options);p.id=c,p.data=this._cloneItemData(u),this._addItem(p),this.touchParams.selectedItem=p;var f={item:p,initialX:t.center.x,data:p.data};this.options.rtl?f.dragLeft=!0:f.dragRight=!0,this.touchParams.itemProps=[f],t.stopPropagation()},r.prototype._onDrag=function(t){if(this.touchParams.itemProps){t.stopPropagation();var e=this,n=this.options.snap||null;if(this.options.rtl)var i=this.body.dom.root.offsetLeft+this.body.domProps.right.width;else var i=this.body.dom.root.offsetLeft+this.body.domProps.left.width;var r=this.body.util.getScale(),o=this.body.util.getStep(),s=this.touchParams.selectedItem,a=(this.options.editable.overrideItems||null==s.editable)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&null!=s.editable&&s.editable.updateGroup,l=null;if(a&&s&&void 0!=s.data.group){var u=e.groupFromTarget(t);u&&(l=this._getGroupIndex(u.groupId))}this.touchParams.itemProps.forEach(function(u){var c=e.body.util.toTime(t.center.x-i),d=e.body.util.toTime(u.initialX-i);if(this.options.rtl)var p=-(c-d);else var p=c-d;var f=this._cloneItemData(u.item.data);if(null==u.item.editable||u.item.editable.updateTime||u.item.editable.updateGroup||e.options.editable.overrideItems){var m=(this.options.editable.overrideItems||null==s.editable)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&null!=s.editable&&s.editable.updateTime;if(m)if(u.dragLeft){if(this.options.rtl){if(void 0!=f.end){var g=h.convert(u.data.end,"Date"),v=new Date(g.valueOf()+p);f.end=n?n(v,r,o):v}}else if(void 0!=f.start){var y=h.convert(u.data.start,"Date"),b=new Date(y.valueOf()+p);f.start=n?n(b,r,o):b}}else if(u.dragRight){if(this.options.rtl){if(void 0!=f.start){var y=h.convert(u.data.start,"Date"),b=new Date(y.valueOf()+p);f.start=n?n(b,r,o):b}}else if(void 0!=f.end){var g=h.convert(u.data.end,"Date"),v=new Date(g.valueOf()+p);f.end=n?n(v,r,o):v}}else if(void 0!=f.start){var y=h.convert(u.data.start,"Date").valueOf(),b=new Date(y+p);if(void 0!=f.end){var g=h.convert(u.data.end,"Date"),w=g.valueOf()-y.valueOf();f.start=n?n(b,r,o):b,f.end=new Date(f.start.valueOf()+w)}else f.start=n?n(b,r,o):b}if(a&&!u.dragLeft&&!u.dragRight&&null!=l&&void 0!=f.group){var _=l-u.groupOffset;_=Math.max(0,_),_=Math.min(e.groupIds.length-1,_),f.group=e.groupIds[_]}f=this._cloneItemData(f),e.options.onMoving(f,function(t){t&&u.item.setData(this._cloneItemData(t,"Date"))}.bind(this))}}.bind(this)),this.stackDirty=!0,this.body.emitter.emit("_change")}},r.prototype._moveToGroup=function(t,e){var n=this.groups[e];if(n&&n.groupId!=t.data.group){var i=t.parent;i.remove(t),i.order(),n.add(t),n.order(),t.data.group=n.groupId}},r.prototype._onDragEnd=function(t){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){t.stopPropagation();var e=this,n=this.itemsData.getDataSet(),i=this.touchParams.itemProps;this.touchParams.itemProps=null,i.forEach(function(t){var i=t.item.id,r=null!=e.itemsData.get(i,e.itemOptions);if(r){var o=this._cloneItemData(t.item.data);e.options.onMove(o,function(r){r?(r[n._fieldId]=i,n.update(r)):(t.item.setData(t.data),e.stackDirty=!0,e.body.emitter.emit("_change"))})}else e.options.onAdd(t.item.data,function(n){e._removeItem(t.item),n&&e.itemsData.getDataSet().add(n),e.stackDirty=!0,e.body.emitter.emit("_change")})}.bind(this))}},r.prototype._onGroupClick=function(t){var e=this.groupFromTarget(t);if(e&&e.nestedGroups){var n=this.groupsData;this.groupsData instanceof f&&(n=this.groupsData.getDataSet()),e.showNested=!e.showNested;var i=n.get(e.nestedGroups).map(function(t){return void 0==t.visible&&(t.visible=!0),t.visible=!!e.showNested,t});if(n.update(i),e.showNested)h.removeClassName(e.dom.label,"collapsed"),h.addClassName(e.dom.label,"expanded");else{h.removeClassName(e.dom.label,"expanded");var r=this.options.rtl?"collapsed-rtl":"collapsed";h.addClassName(e.dom.label,r)}}},r.prototype._onGroupDragStart=function(t){this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(t),this.groupTouchParams.group&&(t.stopPropagation(),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))},r.prototype._onGroupDrag=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this.groupsData;this.groupsData instanceof f&&(e=this.groupsData.getDataSet());var n=this.groupFromTarget(t);if(n&&n.height!=this.groupTouchParams.group.height){var i=n.top<this.groupTouchParams.group.top,r=t.center?t.center.y:t.clientY,o=h.getAbsoluteTop(n.dom.foreground),s=this.groupTouchParams.group.height;if(i){if(o+s<r)return}else{var a=n.height;if(o+a-s>r)return}}if(n&&n!=this.groupTouchParams.group){var l=e.get(n.groupId),u=e.get(this.groupTouchParams.group.groupId);u&&l&&(this.options.groupOrderSwap(u,l,e),e.update(u),e.update(l));var c=e.getIds({order:this.options.groupOrder});if(!h.equalArray(c,this.groupTouchParams.originalOrder))for(var d=this.groupTouchParams.originalOrder,p=this.groupTouchParams.group.groupId,m=Math.min(d.length,c.length),g=0,v=0,y=0;g<m;){for(;g+v<m&&g+y<m&&c[g+v]==d[g+y];)g++;if(g+v>=m)break;if(c[g+v]!=p)if(d[g+y]!=p){var b=c.indexOf(d[g+y]),w=e.get(c[g+v]),_=e.get(d[g+y]);this.options.groupOrderSwap(w,_,e),e.update(w),e.update(_);var x=c[g+v];c[g+v]=d[g+y],c[b]=x,g++}else y=1;else v=1}}}},r.prototype._onGroupDragEnd=function(t){if(this.options.groupEditable.order&&this.groupTouchParams.group){t.stopPropagation();var e=this,n=e.groupTouchParams.group.groupId,i=e.groupsData.getDataSet(),r=h.extend({},i.get(n));e.options.onMoveGroup(r,function(t){if(t)t[i._fieldId]=n,i.update(t);else{var r=i.getIds({order:e.options.groupOrder});if(!h.equalArray(r,e.groupTouchParams.originalOrder))for(var o=e.groupTouchParams.originalOrder,s=Math.min(o.length,r.length),a=0;a<s;){for(;a<s&&r[a]==o[a];)a++;if(a>=s)break;var l=r.indexOf(o[a]),u=i.get(r[a]),c=i.get(o[a]);e.options.groupOrderSwap(u,c,i),i.update(u),i.update(c);var d=r[a];r[a]=o[a],r[l]=d,a++}}}),e.body.emitter.emit("groupDragged",{groupId:n})}},r.prototype._onSelectItem=function(t){if(this.options.selectable){var e=t.srcEvent&&(t.srcEvent.ctrlKey||t.srcEvent.metaKey),n=t.srcEvent&&t.srcEvent.shiftKey;if(e||n)return void this._onMultiSelectItem(t);var i=this.getSelection(),r=this.itemFromTarget(t),o=r?[r.id]:[];
21
+ this.setSelection(o);var s=this.getSelection();(s.length>0||i.length>0)&&this.body.emitter.emit("select",{items:s,event:t})}},r.prototype._onMouseOver=function(t){var e=this.itemFromTarget(t);if(e){var n=this.itemFromRelatedTarget(t);if(e!==n){var i=e.getTitle();if(i){null==this.popup&&(this.popup=new c.default(this.body.dom.root,this.options.tooltip.overflowMethod||"flip")),this.popup.setText(i);var r=this.body.dom.centerContainer;this.popup.setPosition(t.clientX-h.getAbsoluteLeft(r)+r.offsetLeft,t.clientY-h.getAbsoluteTop(r)+r.offsetTop),this.popup.show()}else null!=this.popup&&this.popup.hide();this.body.emitter.emit("itemover",{item:e.id,event:t})}}},r.prototype._onMouseOut=function(t){var e=this.itemFromTarget(t);if(e){var n=this.itemFromRelatedTarget(t);e!==n&&(null!=this.popup&&this.popup.hide(),this.body.emitter.emit("itemout",{item:e.id,event:t}))}},r.prototype._onMouseMove=function(t){var e=this.itemFromTarget(t);if(e&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden){var n=this.body.dom.centerContainer;this.popup.setPosition(t.clientX-h.getAbsoluteLeft(n)+n.offsetLeft,t.clientY-h.getAbsoluteTop(n)+n.offsetTop),this.popup.show()}},r.prototype._onMouseWheel=function(t){this.touchParams.itemIsDragging&&this._onDragEnd(t)},r.prototype._onUpdateItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this;if(t){var n=e.itemsData.get(t.id);this.options.onUpdate(n,function(t){t&&e.itemsData.getDataSet().update(t)})}}},r.prototype._onAddItem=function(t){if(this.options.selectable&&this.options.editable.add){var e=this,n=this.options.snap||null,i=this.itemFromTarget(t);if(!i){if(this.options.rtl)var r=h.getAbsoluteRight(this.dom.frame),o=r-t.center.x;else var r=h.getAbsoluteLeft(this.dom.frame),o=t.center.x-r;var s=this.body.util.toTime(o),a=this.body.util.getScale(),l=this.body.util.getStep(),u={start:n?n(s,a,l):s,content:"new item"};if("drop"==t.type){var c=JSON.parse(t.dataTransfer.getData("text"));if(u.content=c.content,u.type=c.type||"box",u[this.itemsData._fieldId]=c.id||h.randomUUID(),"range"==c.type||c.end&&c.start)if(c.end)u.end=c.end,u.start=c.start;else{var d=this.body.util.toTime(o+this.props.width/5);u.end=n?n(d,a,l):d}}else if(u[this.itemsData._fieldId]=h.randomUUID(),"range"===this.options.type){var d=this.body.util.toTime(o+this.props.width/5);u.end=n?n(d,a,l):d}var p=this.groupFromTarget(t);p&&(u.group=p.groupId),u=this._cloneItemData(u),this.options.onAdd(u,function(n){n&&(e.itemsData.getDataSet().add(n),"drop"==t.type&&e.setSelection([n.id]))})}}},r.prototype._onMultiSelectItem=function(t){if(this.options.selectable){var e=this.itemFromTarget(t);if(e){var n=this.options.multiselect?this.getSelection():[],i=t.srcEvent&&t.srcEvent.shiftKey||!1;if(i&&this.options.multiselect){var o=this.itemsData.get(e.id).group,s=void 0;this.options.multiselectPerGroup&&n.length>0&&(s=this.itemsData.get(n[0]).group),this.options.multiselectPerGroup&&void 0!=s&&s!=o||n.push(e.id);var a=r._getItemRange(this.itemsData.get(n,this.itemOptions));if(!this.options.multiselectPerGroup||s==o){n=[];for(var l in this.items)if(this.items.hasOwnProperty(l)){var u=this.items[l],c=u.data.start,d=void 0!==u.data.end?u.data.end:c;!(c>=a.min&&d<=a.max)||this.options.multiselectPerGroup&&s!=this.itemsData.get(u.id).group||u instanceof x||n.push(u.id)}}}else{var h=n.indexOf(e.id);h==-1?n.push(e.id):n.splice(h,1)}this.setSelection(n),this.body.emitter.emit("select",{items:this.getSelection(),event:t})}}},r._getItemRange=function(t){var e=null,n=null;return t.forEach(function(t){(null==n||t.start<n)&&(n=t.start),void 0!=t.end?(null==e||t.end>e)&&(e=t.end):(null==e||t.start>e)&&(e=t.start)}),{min:n,max:e}},r.prototype.itemFromElement=function(t){for(var e=t;e;){if(e.hasOwnProperty("timeline-item"))return e["timeline-item"];e=e.parentNode}return null},r.prototype.itemFromTarget=function(t){return this.itemFromElement(t.target)},r.prototype.itemFromRelatedTarget=function(t){return this.itemFromElement(t.relatedTarget)},r.prototype.groupFromTarget=function(t){for(var e=t.center?t.center.y:t.clientY,n=0;n<this.groupIds.length;n++){var i=this.groupIds[n],r=this.groups[i],o=r.dom.foreground,s=h.getAbsoluteTop(o);if(e>s&&e<s+o.offsetHeight)return r;if("top"===this.options.orientation.item){if(n===this.groupIds.length-1&&e>s)return r}else if(0===n&&e<s+o.offset)return r}return null},r.itemSetFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("timeline-itemset"))return e["timeline-itemset"];e=e.parentNode}return null},r.prototype._cloneItemData=function(t,e){var n=h.extend({},t);return e||(e=this.itemsData.getDataSet()._options.type),void 0!=n.start&&(n.start=h.convert(n.start,e&&e.start||"Date")),void 0!=n.end&&(n.end=h.convert(n.end,e&&e.end||"Date")),n},t.exports=r},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(95),o=i(r),s=n(96),a=i(s),l=function(){function t(e,n){(0,o.default)(this,t),this.container=e,this.overflowMethod=n||"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)}return(0,a.default)(t,[{key:"setPosition",value:function(t,e){this.x=parseInt(t),this.y=parseInt(e)}},{key:"setText",value:function(t){t instanceof Element?(this.frame.innerHTML="",this.frame.appendChild(t)):this.frame.innerHTML=t}},{key:"show",value:function(t){if(void 0===t&&(t=!0),t===!0){var e=this.frame.clientHeight,n=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,r=this.frame.parentNode.clientWidth,o=0,s=0;if("flip"==this.overflowMethod){var a=!1,l=!0;this.y-e<this.padding&&(l=!1),this.x+n>r-this.padding&&(a=!0),o=a?this.x-n:this.x,s=l?this.y-e:this.y}else s=this.y-e,s+e+this.padding>i&&(s=i-e-this.padding),s<this.padding&&(s=this.padding),o=this.x,o+n+this.padding>r&&(o=r-n-this.padding),o<this.padding&&(o=this.padding);this.frame.style.left=o+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),t}();e.default=l},function(t,e,n){function i(t,e,n,o){this.moment=r,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,n),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,Array.isArray(o)?this.hiddenDates=o:void 0!=o?this.hiddenDates=[o]:this.hiddenDates=[],this.format=i.FORMAT}var r=n(82),o=n(109),s=n(1);i.FORMAT={minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",month:"YYYY",year:""}},i.prototype.setMoment=function(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())},i.prototype.setFormat=function(t){var e=s.deepExtend({},i.FORMAT);this.format=s.deepExtend(e,t)},i.prototype.setRange=function(t,e,n){if(!(t instanceof Date&&e instanceof Date))throw"No legal start or end date in method setRange";this._start=void 0!=t?this.moment(t.valueOf()):new Date,this._end=void 0!=e?this.moment(e.valueOf()):new Date,this.autoScale&&this.setMinimumStep(n)},i.prototype.start=function(){this.current=this._start.clone(),this.roundToMinor()},i.prototype.roundToMinor=function(){switch(this.scale){case"year":this.current.year(this.step*Math.floor(this.current.year()/this.step)),this.current.month(0);case"month":this.current.date(1);case"day":case"weekday":this.current.hours(0);case"hour":this.current.minutes(0);case"minute":this.current.seconds(0);case"second":this.current.milliseconds(0)}if(1!=this.step)switch(this.scale){case"millisecond":this.current.subtract(this.current.milliseconds()%this.step,"milliseconds");break;case"second":this.current.subtract(this.current.seconds()%this.step,"seconds");break;case"minute":this.current.subtract(this.current.minutes()%this.step,"minutes");break;case"hour":this.current.subtract(this.current.hours()%this.step,"hours");break;case"weekday":case"day":this.current.subtract((this.current.date()-1)%this.step,"day");break;case"month":this.current.subtract(this.current.month()%this.step,"month");break;case"year":this.current.subtract(this.current.year()%this.step,"year")}},i.prototype.hasNext=function(){return this.current.valueOf()<=this._end.valueOf()},i.prototype.next=function(){var t=this.current.valueOf();switch(this.scale){case"millisecond":this.current.add(this.step,"millisecond");break;case"second":this.current.add(this.step,"second");break;case"minute":this.current.add(this.step,"minute");break;case"hour":this.current.add(this.step,"hour"),this.current.month()<6?this.current.subtract(this.current.hours()%this.step,"hour"):this.current.hours()%this.step!==0&&this.current.add(this.step-this.current.hours()%this.step,"hour");break;case"weekday":case"day":this.current.add(this.step,"day");break;case"month":this.current.add(this.step,"month");break;case"year":this.current.add(this.step,"year")}if(1!=this.step)switch(this.scale){case"millisecond":this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&this.current.milliseconds(0);break;case"second":this.current.seconds()>0&&this.current.seconds()<this.step&&this.current.seconds(0);break;case"minute":this.current.minutes()>0&&this.current.minutes()<this.step&&this.current.minutes(0);break;case"hour":this.current.hours()>0&&this.current.hours()<this.step&&this.current.hours(0);break;case"weekday":case"day":this.current.date()<this.step+1&&this.current.date(1);break;case"month":this.current.month()<this.step&&this.current.month(0);break;case"year":}this.current.valueOf()==t&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,o.stepOverHiddenDates(this.moment,this,t)},i.prototype.getCurrent=function(){return this.current},i.prototype.setScale=function(t){t&&"string"==typeof t.scale&&(this.scale=t.scale,this.step=t.step>0?t.step:1,this.autoScale=!1)},i.prototype.setAutoScale=function(t){this.autoScale=t},i.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,n=2592e6,i=864e5,r=36e5,o=6e4,s=1e3,a=1;1e3*e>t&&(this.scale="year",this.step=1e3),500*e>t&&(this.scale="year",this.step=500),100*e>t&&(this.scale="year",this.step=100),50*e>t&&(this.scale="year",this.step=50),10*e>t&&(this.scale="year",this.step=10),5*e>t&&(this.scale="year",this.step=5),e>t&&(this.scale="year",this.step=1),3*n>t&&(this.scale="month",this.step=3),n>t&&(this.scale="month",this.step=1),5*i>t&&(this.scale="day",this.step=5),2*i>t&&(this.scale="day",this.step=2),i>t&&(this.scale="day",this.step=1),i/2>t&&(this.scale="weekday",this.step=1),4*r>t&&(this.scale="hour",this.step=4),r>t&&(this.scale="hour",this.step=1),15*o>t&&(this.scale="minute",this.step=15),10*o>t&&(this.scale="minute",this.step=10),5*o>t&&(this.scale="minute",this.step=5),o>t&&(this.scale="minute",this.step=1),15*s>t&&(this.scale="second",this.step=15),10*s>t&&(this.scale="second",this.step=10),5*s>t&&(this.scale="second",this.step=5),s>t&&(this.scale="second",this.step=1),200*a>t&&(this.scale="millisecond",this.step=200),100*a>t&&(this.scale="millisecond",this.step=100),50*a>t&&(this.scale="millisecond",this.step=50),10*a>t&&(this.scale="millisecond",this.step=10),5*a>t&&(this.scale="millisecond",this.step=5),a>t&&(this.scale="millisecond",this.step=1)}},i.snap=function(t,e,n){var i=r(t);if("year"==e){var o=i.year()+Math.round(i.month()/12);i.year(Math.round(o/n)*n),i.month(0),i.date(0),i.hours(0),i.minutes(0),i.seconds(0),i.milliseconds(0)}else if("month"==e)i.date()>15?(i.date(1),i.add(1,"month")):i.date(1),i.hours(0),i.minutes(0),i.seconds(0),i.milliseconds(0);else if("day"==e){switch(n){case 5:case 2:i.hours(24*Math.round(i.hours()/24));break;default:i.hours(12*Math.round(i.hours()/12))}i.minutes(0),i.seconds(0),i.milliseconds(0)}else if("weekday"==e){switch(n){case 5:case 2:i.hours(12*Math.round(i.hours()/12));break;default:i.hours(6*Math.round(i.hours()/6))}i.minutes(0),i.seconds(0),i.milliseconds(0)}else if("hour"==e){switch(n){case 4:i.minutes(60*Math.round(i.minutes()/60));break;default:i.minutes(30*Math.round(i.minutes()/30))}i.seconds(0),i.milliseconds(0)}else if("minute"==e){switch(n){case 15:case 10:i.minutes(5*Math.round(i.minutes()/5)),i.seconds(0);break;case 5:i.seconds(60*Math.round(i.seconds()/60));break;default:i.seconds(30*Math.round(i.seconds()/30))}i.milliseconds(0)}else if("second"==e)switch(n){case 15:case 10:i.seconds(5*Math.round(i.seconds()/5)),i.milliseconds(0);break;case 5:i.milliseconds(1e3*Math.round(i.milliseconds()/1e3));break;default:i.milliseconds(500*Math.round(i.milliseconds()/500))}else if("millisecond"==e){var s=n>5?n/2:1;i.milliseconds(Math.round(i.milliseconds()/s)*s)}return i},i.prototype.isMajor=function(){if(1==this.switchedYear)switch(this.scale){case"year":case"month":case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedMonth)switch(this.scale){case"weekday":case"day":case"hour":case"minute":case"second":case"millisecond":return!0;default:return!1}else if(1==this.switchedDay)switch(this.scale){case"millisecond":case"second":case"minute":case"hour":return!0;default:return!1}var t=this.moment(this.current);switch(this.scale){case"millisecond":return 0==t.milliseconds();case"second":return 0==t.seconds();case"minute":return 0==t.hours()&&0==t.minutes();case"hour":return 0==t.hours();case"weekday":case"day":return 1==t.date();case"month":return 0==t.month();case"year":return!1;default:return!1}},i.prototype.getLabelMinor=function(t){if(void 0==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);var e=this.format.minorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},i.prototype.getLabelMajor=function(t){if(void 0==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);var e=this.format.majorLabels[this.scale];return e&&e.length>0?this.moment(t).format(e):""},i.prototype.getClassName=function(){function t(t){return t/l%2==0?" vis-even":" vis-odd"}function e(t){return t.isSame(new Date,"day")?" vis-today":t.isSame(o().add(1,"day"),"day")?" vis-tomorrow":t.isSame(o().add(-1,"day"),"day")?" vis-yesterday":""}function n(t){return t.isSame(new Date,"week")?" vis-current-week":""}function i(t){return t.isSame(new Date,"month")?" vis-current-month":""}function r(t){return t.isSame(new Date,"year")?" vis-current-year":""}var o=this.moment,s=this.moment(this.current),a=s.locale?s.locale("en"):s.lang("en"),l=this.step;switch(this.scale){case"millisecond":return e(a)+t(a.milliseconds()).trim();case"second":return e(a)+t(a.seconds()).trim();case"minute":return e(a)+t(a.minutes()).trim();case"hour":return"vis-h"+a.hours()+(4==this.step?"-h"+(a.hours()+4):"")+e(a)+t(a.hours());case"weekday":return"vis-"+a.format("dddd").toLowerCase()+e(a)+n(a)+t(a.date());case"day":return"vis-day"+a.date()+" vis-"+a.format("MMMM").toLowerCase()+e(a)+i(a)+(this.step<=2?e(a):"")+(this.step<=2?" vis-"+a.format("dddd").toLowerCase():""+t(a.date()-1));case"month":return"vis-"+a.format("MMMM").toLowerCase()+i(a)+t(a.month());case"year":var u=a.year();return"vis-year"+u+r(a)+t(u);default:return""}},t.exports=i},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){this.groupId=t,this.subgroups={},this.subgroupIndex=0,this.subgroupOrderer=e&&e.subgroupOrder,this.itemSet=n,this.isVisible=null,e&&e.nestedGroups&&(this.nestedGroups=e.nestedGroups,0==e.showNested?this.showNested=!1:this.showNested=!0),this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;var i=this;this.itemSet.body.emitter.on("checkRangedItems",function(){i.checkRangedItems=!0}),this._create(),this.setData(e)}var o=n(58),s=i(o),a=n(1),l=n(115);n(116),r.prototype._create=function(){var t=document.createElement("div");this.itemSet.options.groupEditable.order?t.className="vis-label draggable":t.className="vis-label",this.dom.label=t;var e=document.createElement("div");e.className="vis-inner",t.appendChild(e),this.dom.inner=e;var n=document.createElement("div");n.className="vis-group",n["timeline-group"]=this,this.dom.foreground=n,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)},r.prototype.setData=function(t){var e,n;if(this.itemSet.options&&this.itemSet.options.groupTemplate?(n=this.itemSet.options.groupTemplate.bind(this),e=n(t,this.dom.inner)):e=t&&t.content,e instanceof Element){for(this.dom.inner.appendChild(e);this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(e)}else e instanceof Object?n(t,this.dom.inner):void 0!==e&&null!==e?this.dom.inner.innerHTML=e:this.dom.inner.innerHTML=this.groupId||"";if(this.dom.label.title=t&&t.title||"",this.dom.inner.firstChild?a.removeClassName(this.dom.inner,"vis-hidden"):a.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),a.addClassName(this.dom.label,"vis-nesting-group");var i=this.itemSet.options.rtl?"collapsed-rtl":"collapsed";this.showNested?(a.removeClassName(this.dom.label,i),a.addClassName(this.dom.label,"expanded")):(a.removeClassName(this.dom.label,"expanded"),a.addClassName(this.dom.label,i))}else if(this.nestedGroups){this.nestedGroups=null;var i=this.itemSet.options.rtl?"collapsed-rtl":"collapsed";a.removeClassName(this.dom.label,i),a.removeClassName(this.dom.label,"expanded"),a.removeClassName(this.dom.label,"vis-nesting-group")}t&&t.nestedInGroup&&(a.addClassName(this.dom.label,"vis-nested-group"),this.itemSet.options&&this.itemSet.options.rtl?this.dom.inner.style.paddingRight="30px":this.dom.inner.style.paddingLeft="30px");var r=t&&t.className||null;r!=this.className&&(this.className&&(a.removeClassName(this.dom.label,this.className),a.removeClassName(this.dom.foreground,this.className),a.removeClassName(this.dom.background,this.className),a.removeClassName(this.dom.axis,this.className)),a.addClassName(this.dom.label,r),a.addClassName(this.dom.foreground,r),a.addClassName(this.dom.background,r),a.addClassName(this.dom.axis,r),this.className=r),this.style&&(a.removeCssText(this.dom.label,this.style),this.style=null),t&&t.style&&(a.addCssText(this.dom.label,t.style),this.style=t.style)},r.prototype.getLabelWidth=function(){return this.props.label.width},r.prototype.redraw=function(t,e,n){var i=!1,r=this.dom.marker.clientHeight;r!=this.lastMarkerHeight&&(this.lastMarkerHeight=r,a.forEach(this.items,function(t){t.dirty=!0,t.displayed&&t.redraw()}),n=!0),this._calculateSubGroupHeights(e);var o=this.dom.foreground;if(this.top=o.offsetTop,this.right=o.offsetLeft,this.width=o.offsetWidth,this.isVisible=this._isGroupVisible(t,e),"function"==typeof this.itemSet.options.order){if(n){var s=this,u=!1;a.forEach(this.items,function(t){t.displayed||(t.redraw(),s.visibleItems.push(t)),t.repositionX(u)});var c=this.orderedItems.byStart.slice().sort(function(t,e){return s.itemSet.options.order(t.data,e.data)});l.stack(c,e,!0)}this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t)}else this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t),this.itemSet.options.stack?l.stack(this.visibleItems,e,n):l.nostack(this.visibleItems,e,this.subgroups,this.itemSet.options.stackSubgroups);this._updateSubgroupsSizes();var d=this._calculateHeight(e),o=this.dom.foreground;this.top=o.offsetTop,this.right=o.offsetLeft,this.width=o.offsetWidth,i=a.updateProperty(this,"height",d)||i,i=a.updateProperty(this.props.label,"width",this.dom.inner.clientWidth)||i,i=a.updateProperty(this.props.label,"height",this.dom.inner.clientHeight)||i,this.dom.background.style.height=d+"px",this.dom.foreground.style.height=d+"px",this.dom.label.style.height=d+"px";for(var h=0,p=this.visibleItems.length;h<p;h++){var f=this.visibleItems[h];f.repositionY(e),this.isVisible||"__background__"==this.groupId||f.displayed&&f.hide()}return!this.isVisible&&this.height?i=!1:i},r.prototype._calculateSubGroupHeights=function(t){if((0,s.default)(this.subgroups).length>0){var e=this;this.resetSubgroups(),a.forEach(this.visibleItems,function(n){void 0!==n.data.subgroup&&(e.subgroups[n.data.subgroup].height=Math.max(e.subgroups[n.data.subgroup].height,n.height+t.item.vertical),e.subgroups[n.data.subgroup].visible=!0)})}},r.prototype._isGroupVisible=function(t,e){var n=this.top<=t.body.domProps.centerContainer.height-t.body.domProps.scrollTop+e.axis&&this.top+this.height+e.axis>=-t.body.domProps.scrollTop;return n},r.prototype._calculateHeight=function(t){var e,n=this.visibleItems;if(n.length>0){var i=n[0].top,r=n[0].top+n[0].height;if(a.forEach(n,function(t){i=Math.min(i,t.top),r=Math.max(r,t.top+t.height)}),i>t.axis){var o=i-t.axis;r-=o,a.forEach(n,function(t){t.top-=o})}e=r+t.item.vertical/2}else e=0;return e=Math.max(e,this.props.label.height)},r.prototype.show=function(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)},r.prototype.hide=function(){var t=this.dom.label;t.parentNode&&t.parentNode.removeChild(t);var e=this.dom.foreground;e.parentNode&&e.parentNode.removeChild(e);var n=this.dom.background;n.parentNode&&n.parentNode.removeChild(n);var i=this.dom.axis;i.parentNode&&i.parentNode.removeChild(i)},r.prototype.add=function(t){if(this.items[t.id]=t,t.setParent(this),void 0!==t.data.subgroup&&(this._addToSubgroup(t),this.orderSubgroups()),this.visibleItems.indexOf(t)==-1){var e=this.itemSet.body.range;this._checkIfVisible(t,this.visibleItems,e)}},r.prototype._addToSubgroup=function(t,e){e=e||t.data.subgroup,void 0!=e&&void 0===this.subgroups[e]&&(this.subgroups[e]={height:0,top:0,start:t.data.start,end:t.data.end,visible:!1,index:this.subgroupIndex,items:[]},this.subgroupIndex++),new Date(t.data.start)<new Date(this.subgroups[e].start)&&(this.subgroups[e].start=t.data.start),new Date(t.data.end)>new Date(this.subgroups[e].end)&&(this.subgroups[e].end=t.data.end),this.subgroups[e].items.push(t)},r.prototype._updateSubgroupsSizes=function(){var t=this;if(t.subgroups)for(var e in t.subgroups){var n=t.subgroups[e].items[0].data.start,i=t.subgroups[e].items[0].data.end;t.subgroups[e].items.forEach(function(t){new Date(t.data.start)<new Date(n)&&(n=t.data.start),new Date(t.data.end)>new Date(i)&&(i=t.data.end)}),t.subgroups[e].start=n,t.subgroups[e].end=i}},r.prototype.orderSubgroups=function(){if(void 0!==this.subgroupOrderer){var t=[];if("string"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push({subgroup:e,sortField:this.subgroups[e].items[0].data[this.subgroupOrderer]});t.sort(function(t,e){return t.sortField-e.sortField})}else if("function"==typeof this.subgroupOrderer){for(var e in this.subgroups)t.push(this.subgroups[e].items[0].data);t.sort(this.subgroupOrderer)}if(t.length>0)for(var n=0;n<t.length;n++)this.subgroups[t[n].subgroup].index=n}},r.prototype.resetSubgroups=function(){for(var t in this.subgroups)this.subgroups.hasOwnProperty(t)&&(this.subgroups[t].visible=!1)},r.prototype.remove=function(t){delete this.items[t.id],t.setParent(null);var e=this.visibleItems.indexOf(t);e!=-1&&this.visibleItems.splice(e,1),void 0!==t.data.subgroup&&(this._removeFromSubgroup(t),this.orderSubgroups())},r.prototype._removeFromSubgroup=function(t,e){if(e=e||t.data.subgroup,void 0!=e){var n=this.subgroups[e];if(n){var i=n.items.indexOf(t);i>=0&&(n.items.splice(i,1),n.items.length?this._updateSubgroupsSizes():delete this.subgroups[e])}}},r.prototype.removeFromDataSet=function(t){this.itemSet.removeItem(t.id)},r.prototype.order=function(){for(var t=a.toArray(this.items),e=[],n=[],i=0;i<t.length;i++)void 0!==t[i].data.end&&n.push(t[i]),e.push(t[i]);this.orderedItems={byStart:e,byEnd:n},l.orderByStart(this.orderedItems.byStart),l.orderByEnd(this.orderedItems.byEnd)},r.prototype._updateItemsInRange=function(t,e,n){var i=[],r={},o=(n.end-n.start)/4,s=n.start-o,l=n.end+o,u=function(t){return t<s?-1:t<=l?0:1};if(e.length>0)for(var c=0;c<e.length;c++)this._checkIfVisibleWithReference(e[c],i,r,n);var d=a.binarySearchCustom(t.byStart,u,"data","start");if(this._traceVisible(d,t.byStart,i,r,function(t){return t.data.start<s||t.data.start>l}),1==this.checkRangedItems)for(this.checkRangedItems=!1,c=0;c<t.byEnd.length;c++)this._checkIfVisibleWithReference(t.byEnd[c],i,r,n);else{var h=a.binarySearchCustom(t.byEnd,u,"data","end");this._traceVisible(h,t.byEnd,i,r,function(t){return t.data.end<s||t.data.end>l})}for(var c=0;c<i.length;c++){var p=i[c];p.displayed||p.show(),p.repositionX()}return i},r.prototype._traceVisible=function(t,e,n,i,r){if(t!=-1){for(var o=t;o>=0;o--){var s=e[o];if(r(s))break;void 0===i[s.id]&&(i[s.id]=!0,n.push(s))}for(var o=t+1;o<e.length;o++){var s=e[o];if(r(s))break;void 0===i[s.id]&&(i[s.id]=!0,n.push(s))}}},r.prototype._checkIfVisible=function(t,e,n){t.isVisible(n)?(t.displayed||t.show(),t.repositionX(),e.push(t)):t.displayed&&t.hide()},r.prototype._checkIfVisibleWithReference=function(t,e,n,i){t.isVisible(i)?void 0===n[t.id]&&(n[t.id]=!0,e.push(t)):t.displayed&&t.hide()},r.prototype.changeSubgroup=function(t,e,n){this._removeFromSubgroup(t,e),this._addToSubgroup(t,n),this.orderSubgroups()},t.exports=r},function(t,e){var n=.001;e.orderByStart=function(t){t.sort(function(t,e){return t.data.start-e.data.start})},e.orderByEnd=function(t){t.sort(function(t,e){var n="end"in t.data?t.data.end:t.data.start,i="end"in e.data?e.data.end:e.data.start;return n-i})},e.stack=function(t,n,i){if(i)for(var r=0;r<t.length;r++)t[r].top=null;for(var r=0;r<t.length;r++){var o=t[r];if(o.stack&&null===o.top){o.top=n.axis;do{for(var s=null,a=0,l=t.length;a<l;a++){var u=t[a];if(null!==u.top&&u!==o&&u.stack&&e.collision(o,u,n.item,u.options.rtl)){s=u;break}}null!=s&&(o.top=s.top+s.height+n.item.vertical)}while(s)}}},e.nostack=function(t,n,i,r){for(var o=0;o<t.length;o++)if(void 0==t[o].data.subgroup)t[o].top=n.item.vertical;else if(void 0!==t[o].data.subgroup&&r){var s=0;for(var a in i)i.hasOwnProperty(a)&&1==i[a].visible&&i[a].index<i[t[o].data.subgroup].index&&(s+=i[a].height,i[t[o].data.subgroup].top=s);t[o].top=s+.5*n.item.vertical}r||e.stackSubgroups(t,n,i)},e.stackSubgroups=function(t,n,i){for(var r in i)if(i.hasOwnProperty(r)){i[r].top=0;do{var o=null;for(var s in i)if(null!==i[s].top&&s!==r&&i[r].index>i[s].index&&e.collisionByTimes(i[r],i[s])){o=i[s];break}null!=o&&(i[r].top=o.top+o.height)}while(o)}for(var a=0;a<t.length;a++)void 0!==t[a].data.subgroup&&(t[a].top=i[t[a].data.subgroup].top+.5*n.item.vertical)},e.collision=function(t,e,i,r){return r?t.right-i.horizontal+n<e.right+e.width&&t.right+t.width+i.horizontal-n>e.right&&t.top-i.vertical+n<e.top+e.height&&t.top+t.height+i.vertical-n>e.top:t.left-i.horizontal+n<e.left+e.width&&t.left+t.width+i.horizontal-n>e.left&&t.top-i.vertical+n<e.top+e.height&&t.top+t.height+i.vertical-n>e.top},e.collisionByTimes=function(t,e){return t.start<=e.start&&t.end>=e.start&&t.top<e.top+e.height&&t.top+t.height>e.top||e.start<=t.start&&e.end>=t.start&&e.top<t.top+t.height&&e.top+e.height>t.top}},function(t,e,n){function i(t,e,n){if(this.props={content:{width:0}},this.overflow=!1,this.options=n,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}r.call(this,t,e,n)}var r=(n(101),n(117));i.prototype=new r(null,null,null),i.prototype.baseClassName="vis-item vis-range",i.prototype.isVisible=function(t){return this.data.start<t.end&&this.data.end>t.start},i.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.visibleFrame=document.createElement("div"),t.visibleFrame.className="vis-item-visible-frame",t.box.appendChild(t.visibleFrame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var n=this.editable.updateTime||this.editable.updateGroup,i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(n?" vis-editable":" vis-readonly");t.box.className=this.baseClassName+i,this.overflow="hidden"!==window.getComputedStyle(t.frame).overflow,this.dom.content.style.maxWidth="none",this.props.content.width=this.dom.content.offsetWidth,this.height=this.dom.box.offsetHeight,this.dom.content.style.maxWidth="",this.dirty=!1}this._repaintOnItemUpdateTimeTooltip(t.box),this._repaintDeleteButton(t.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()},i.prototype.show=function(){this.displayed||this.redraw()},i.prototype.hide=function(){if(this.displayed){var t=this.dom.box;t.parentNode&&t.parentNode.removeChild(t),this.displayed=!1}},i.prototype.repositionX=function(t){var e,n,i=this.parent.width,r=this.conversion.toScreen(this.data.start),o=this.conversion.toScreen(this.data.end);void 0!==t&&t!==!0||(r<-i&&(r=-i),o>2*i&&(o=2*i));var s=Math.max(o-r+.5,1);switch(this.overflow?(this.options.rtl?this.right=r:this.left=r,this.width=s+this.props.content.width,n=this.props.content.width):(this.options.rtl?this.right=r:this.left=r,this.width=s,n=Math.min(o-r,this.props.content.width)),this.options.rtl?this.dom.box.style.right=this.right+"px":this.dom.box.style.left=this.left+"px",this.dom.box.style.width=s+"px",this.options.align){case"left":this.options.rtl?this.dom.content.style.right="0":this.dom.content.style.left="0";break;case"right":this.options.rtl?this.dom.content.style.right=Math.max(s-n,0)+"px":this.dom.content.style.left=Math.max(s-n,0)+"px";break;case"center":this.options.rtl?this.dom.content.style.right=Math.max((s-n)/2,0)+"px":this.dom.content.style.left=Math.max((s-n)/2,0)+"px";break;default:e=this.overflow?o>0?Math.max(-r,0):-n:r<0?-r:0,this.options.rtl?this.dom.content.style.right=e+"px":(this.dom.content.style.left=e+"px",this.dom.content.style.width="calc(100% - "+e+"px)")}},i.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},i.prototype._repaintDragLeft=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragLeft){var t=document.createElement("div");t.className="vis-drag-left",t.dragLeftItem=this,
22
+ this.dom.box.appendChild(t),this.dom.dragLeft=t}else!this.selected&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)},i.prototype._repaintDragRight=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragRight){var t=document.createElement("div");t.className="vis-drag-right",t.dragRightItem=this,this.dom.box.appendChild(t),this.dom.dragRight=t}else!this.selected&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)},t.exports=i},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){this.id=null,this.parent=null,this.data=t,this.dom=null,this.conversion=e||{},this.options=n||{},this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.editable=null,this._updateEditStatus()}var o=n(62),s=i(o),a=n(58),l=i(a),u=n(101),c=n(1),d=n(82);r.prototype.stack=!0,r.prototype.select=function(){this.selected=!0,this.dirty=!0,this.displayed&&this.redraw()},r.prototype.unselect=function(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()},r.prototype.setData=function(t){var e=void 0!=t.group&&this.data.group!=t.group;e&&this.parent.itemSet._moveToGroup(this,t.group),this.data=t,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()},r.prototype.setParent=function(t){this.displayed?(this.hide(),this.parent=t,this.parent&&this.show()):this.parent=t},r.prototype.isVisible=function(t){return!1},r.prototype.show=function(){return!1},r.prototype.hide=function(){return!1},r.prototype.redraw=function(){},r.prototype.repositionX=function(){},r.prototype.repositionY=function(){},r.prototype._repaintDragCenter=function(){if(this.selected&&this.options.editable.updateTime&&!this.dom.dragCenter){var t=this,e=document.createElement("div");e.className="vis-drag-center",e.dragCenterItem=this,new u(e).on("doubletap",function(e){e.stopPropagation(),t.parent.itemSet._onUpdateItem(t)}),this.dom.box?this.dom.box.appendChild(e):this.dom.point&&this.dom.point.appendChild(e),this.dom.dragCenter=e}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null)},r.prototype._repaintDeleteButton=function(t){var 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){var n=this,i=document.createElement("div");this.options.rtl?i.className="vis-delete-rtl":i.className="vis-delete",i.title="Delete this item",new u(i).on("tap",function(t){t.stopPropagation(),n.parent.removeFromDataSet(n)}),t.appendChild(i),this.dom.deleteButton=i}else!this.selected&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null)},r.prototype._repaintOnItemUpdateTimeTooltip=function(t){if(this.options.tooltipOnItemUpdateTime){var e=(this.options.editable.updateTime||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&e&&!this.dom.onItemUpdateTimeTooltip){var n=document.createElement("div");n.className="vis-onUpdateTime-tooltip",t.appendChild(n),this.dom.onItemUpdateTimeTooltip=n}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?"visible":"hidden",this.options.rtl?this.dom.onItemUpdateTimeTooltip.style.right=this.dom.content.style.right:this.dom.onItemUpdateTimeTooltip.style.left=this.dom.content.style.left;var i,r=50,o=this.parent.itemSet.body.domProps.scrollTop;i="top"==this.options.orientation.item?this.top:this.parent.height-this.top-this.height;var s=i+this.parent.top-r<-o;s?(this.dom.onItemUpdateTimeTooltip.style.bottom="",this.dom.onItemUpdateTimeTooltip.style.top=this.height+2+"px"):(this.dom.onItemUpdateTimeTooltip.style.top="",this.dom.onItemUpdateTimeTooltip.style.bottom=this.height+2+"px");var a,l;this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template?(l=this.options.tooltipOnItemUpdateTime.template.bind(this),a=l(this.data)):(a="start: "+d(this.data.start).format("MM/DD/YYYY hh:mm"),this.data.end&&(a+="<br> end: "+d(this.data.end).format("MM/DD/YYYY hh:mm"))),this.dom.onItemUpdateTimeTooltip.innerHTML=a}}},r.prototype._updateContents=function(t){var e,n,i,r,o=this.parent.itemSet.itemsData.get(this.id),s=this.dom.box||this.dom.point,a=s.getElementsByClassName("vis-item-visible-frame")[0];if(this.options.visibleFrameTemplate?(r=this.options.visibleFrameTemplate.bind(this),i=r(o,s)):i="",a)if(i instanceof Object&&!(i instanceof Element))r(o,a);else{var l=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(i);if(l){if(i instanceof Element)a.innerHTML="",a.appendChild(i);else if(void 0!=i)a.innerHTML=i;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.itemVisibleFrameContent=i}}if(this.options.template?(n=this.options.template.bind(this),e=n(o,t,this.data)):e=this.data.content,e instanceof Object&&!(e instanceof Element))n(o,t);else{var l=this._contentToString(this.content)!==this._contentToString(e);if(l){if(e instanceof Element)t.innerHTML="",t.appendChild(e);else if(void 0!=e)t.innerHTML=e;else if("background"!=this.data.type||void 0!==this.data.content)throw new Error('Property "content" missing in item '+this.id);this.content=e}}},r.prototype._updateDataAttributes=function(t){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){var e=[];if(Array.isArray(this.options.dataAttributes))e=this.options.dataAttributes;else{if("all"!=this.options.dataAttributes)return;e=(0,l.default)(this.data)}for(var n=0;n<e.length;n++){var i=e[n],r=this.data[i];null!=r?t.setAttribute("data-"+i,r):t.removeAttribute("data-"+i)}}},r.prototype._updateStyle=function(t){this.style&&(c.removeCssText(t,this.style),this.style=null),this.data.style&&(c.addCssText(t,this.data.style),this.style=this.data.style)},r.prototype._contentToString=function(t){return"string"==typeof t?t:t&&"outerHTML"in t?t.outerHTML:t},r.prototype._updateEditStatus=function(){this.options&&("boolean"==typeof this.options.editable?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:"object"===(0,s.default)(this.options.editable)&&(this.editable={},c.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.options.editable))),this.options&&this.options.editable&&this.options.editable.overrideItems===!0||this.data&&("boolean"==typeof this.data.editable?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:"object"===(0,s.default)(this.data.editable)&&(this.editable={},c.selectiveExtend(["updateTime","updateGroup","remove"],this.editable,this.data.editable)))},r.prototype.getWidthLeft=function(){return 0},r.prototype.getWidthRight=function(){return 0},r.prototype.getTitle=function(){return this.data.title},t.exports=r},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n){a.call(this,t,e,n),this.width=0,this.height=0,this.top=0,this.left=0}var o=n(55),s=i(o),a=(n(1),n(114));r.prototype=(0,s.default)(a.prototype),r.prototype.redraw=function(t,e,n){var i=!1;this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,t),this.width=this.dom.background.offsetWidth,this.dom.background.style.height="0";for(var r=0,o=this.visibleItems.length;r<o;r++){var s=this.visibleItems[r];s.repositionY(e)}return i},r.prototype.show=function(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)},t.exports=r},function(t,e,n){function i(t,e,n){if(this.props={dot:{width:0,height:0},line:{width:0,height:0}},this.options=n,t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);r.call(this,t,e,n)}var r=n(117);n(1),i.prototype=new r(null,null,null),i.prototype.isVisible=function(t){var e,n=this.options.align,i=this.width*t.getMillisecondsPerPixel();return e="right"==n?this.data.start.getTime()>t.start&&this.data.start.getTime()-i<t.end:"left"==n?this.data.start.getTime()+i>t.start&&this.data.start.getTime()<t.end:this.data.start.getTime()+i/2>t.start&&this.data.start.getTime()-i/2<t.end},i.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("DIV"),t.content=document.createElement("DIV"),t.content.className="vis-item-content",t.box.appendChild(t.content),t.line=document.createElement("DIV"),t.line.className="vis-line",t.dot=document.createElement("DIV"),t.dot.className="vis-dot",t.box["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.box)}if(!t.line.parentNode){var n=this.parent.dom.background;if(!n)throw new Error("Cannot redraw item: parent has no background container element");n.appendChild(t.line)}if(!t.dot.parentNode){var i=this.parent.dom.axis;if(!n)throw new Error("Cannot redraw item: parent has no axis container element");i.appendChild(t.dot)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);var r=this.editable.updateTime||this.editable.updateGroup,o=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(r?" vis-editable":" vis-readonly");t.box.className="vis-item vis-box"+o,t.line.className="vis-item vis-line"+o,t.dot.className="vis-item vis-dot"+o;var s=t.box.style.right,a=t.box.style.left;this.options.rtl?t.box.style.right="0px":t.box.style.left="0px",this.props.dot.height=t.dot.offsetHeight,this.props.dot.width=t.dot.offsetWidth,this.props.line.width=t.line.offsetWidth,this.width=t.box.offsetWidth,this.height=t.box.offsetHeight,this.options.rtl?t.box.style.right=s:t.box.style.left=a,this.dirty=!1}this._repaintOnItemUpdateTimeTooltip(t.box),this._repaintDragCenter(),this._repaintDeleteButton(t.box)},i.prototype.show=function(){this.displayed||this.redraw()},i.prototype.hide=function(){if(this.displayed){var t=this.dom;t.box.parentNode&&t.box.parentNode.removeChild(t.box),t.line.parentNode&&t.line.parentNode.removeChild(t.line),t.dot.parentNode&&t.dot.parentNode.removeChild(t.dot),this.displayed=!1}},i.prototype.repositionX=function(){var t=this.conversion.toScreen(this.data.start),e=this.options.align;"right"==e?this.options.rtl?(this.right=t-this.width,this.dom.box.style.right=this.right+"px",this.dom.line.style.right=t-this.props.line.width+"px",this.dom.dot.style.right=t-this.props.line.width/2-this.props.dot.width/2+"px"):(this.left=t-this.width,this.dom.box.style.left=this.left+"px",this.dom.line.style.left=t-this.props.line.width+"px",this.dom.dot.style.left=t-this.props.line.width/2-this.props.dot.width/2+"px"):"left"==e?this.options.rtl?(this.right=t,this.dom.box.style.right=this.right+"px",this.dom.line.style.right=t+"px",this.dom.dot.style.right=t+this.props.line.width/2-this.props.dot.width/2+"px"):(this.left=t,this.dom.box.style.left=this.left+"px",this.dom.line.style.left=t+"px",this.dom.dot.style.left=t+this.props.line.width/2-this.props.dot.width/2+"px"):this.options.rtl?(this.right=t-this.width/2,this.dom.box.style.right=this.right+"px",this.dom.line.style.right=t-this.props.line.width+"px",this.dom.dot.style.right=t-this.props.dot.width/2+"px"):(this.left=t-this.width/2,this.dom.box.style.left=this.left+"px",this.dom.line.style.left=t-this.props.line.width/2+"px",this.dom.dot.style.left=t-this.props.dot.width/2+"px")},i.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.box,n=this.dom.line,i=this.dom.dot;if("top"==t)e.style.top=(this.top||0)+"px",n.style.top="0",n.style.height=this.parent.top+this.top+1+"px",n.style.bottom="";else{var r=this.parent.itemSet.props.height,o=r-this.parent.top-this.parent.height+this.top;e.style.top=(this.parent.height-this.top-this.height||0)+"px",n.style.top=r-o+"px",n.style.bottom="0"}i.style.top=-this.props.dot.height/2+"px"},i.prototype.getWidthLeft=function(){return this.width/2},i.prototype.getWidthRight=function(){return this.width/2},t.exports=i},function(t,e,n){function i(t,e,n){if(this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},this.options=n,t&&void 0==t.start)throw new Error('Property "start" missing in item '+t);r.call(this,t,e,n)}var r=n(117);i.prototype=new r(null,null,null),i.prototype.isVisible=function(t){var e=this.width*t.getMillisecondsPerPixel();return this.data.start.getTime()+e>t.start&&this.data.start<t.end},i.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.point=document.createElement("div"),t.content=document.createElement("div"),t.content.className="vis-item-content",t.point.appendChild(t.content),t.dot=document.createElement("div"),t.point.appendChild(t.dot),t.point["timeline-item"]=this,this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.point.parentNode){var e=this.parent.dom.foreground;if(!e)throw new Error("Cannot redraw item: parent has no foreground container element");e.appendChild(t.point)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);var n=this.editable.updateTime||this.editable.updateGroup,i=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"")+(n?" vis-editable":" vis-readonly");t.point.className="vis-item vis-point"+i,t.dot.className="vis-item vis-dot"+i,this.props.dot.width=t.dot.offsetWidth,this.props.dot.height=t.dot.offsetHeight,this.props.content.height=t.content.offsetHeight,this.options.rtl?t.content.style.marginRight=2*this.props.dot.width+"px":t.content.style.marginLeft=2*this.props.dot.width+"px",this.width=t.point.offsetWidth,this.height=t.point.offsetHeight,t.dot.style.top=(this.height-this.props.dot.height)/2+"px",this.options.rtl?t.dot.style.right=this.props.dot.width/2+"px":t.dot.style.left=this.props.dot.width/2+"px",this.dirty=!1}this._repaintOnItemUpdateTimeTooltip(t.point),this._repaintDragCenter(),this._repaintDeleteButton(t.point)},i.prototype.show=function(){this.displayed||this.redraw()},i.prototype.hide=function(){this.displayed&&(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),this.displayed=!1)},i.prototype.repositionX=function(){var t=this.conversion.toScreen(this.data.start);this.options.rtl?(this.right=t-this.props.dot.width,this.dom.point.style.right=this.right+"px"):(this.left=t-this.props.dot.width,this.dom.point.style.left=this.left+"px")},i.prototype.repositionY=function(){var t=this.options.orientation.item,e=this.dom.point;"top"==t?e.style.top=this.top+"px":e.style.top=this.parent.height-this.top-this.height+"px"},i.prototype.getWidthLeft=function(){return this.props.dot.width},i.prototype.getWidthRight=function(){return this.props.dot.width},t.exports=i},function(t,e,n){function i(t,e,n){if(this.props={content:{width:0}},this.overflow=!1,t){if(void 0==t.start)throw new Error('Property "start" missing in item '+t.id);if(void 0==t.end)throw new Error('Property "end" missing in item '+t.id)}r.call(this,t,e,n)}var r=(n(101),n(117)),o=n(118),s=n(116);i.prototype=new r(null,null,null),i.prototype.baseClassName="vis-item vis-background",i.prototype.stack=!1,i.prototype.isVisible=function(t){return this.data.start<t.end&&this.data.end>t.start},i.prototype.redraw=function(){var t=this.dom;if(t||(this.dom={},t=this.dom,t.box=document.createElement("div"),t.frame=document.createElement("div"),t.frame.className="vis-item-overflow",t.box.appendChild(t.frame),t.content=document.createElement("div"),t.content.className="vis-item-content",t.frame.appendChild(t.content),this.dirty=!0),!this.parent)throw new Error("Cannot redraw item: no parent attached");if(!t.box.parentNode){var e=this.parent.dom.background;if(!e)throw new Error("Cannot redraw item: parent has no background container element");e.appendChild(t.box)}if(this.displayed=!0,this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);var n=(this.data.className?" "+this.data.className:"")+(this.selected?" vis-selected":"");t.box.className=this.baseClassName+n,this.overflow="hidden"!==window.getComputedStyle(t.content).overflow,this.props.content.width=this.dom.content.offsetWidth,this.height=0,this.dirty=!1}},i.prototype.show=s.prototype.show,i.prototype.hide=s.prototype.hide,i.prototype.repositionX=s.prototype.repositionX,i.prototype.repositionY=function(t){var e,n=this.options.orientation.item;if(void 0!==this.data.subgroup){var i=this.data.subgroup,r=this.parent.subgroups;r[i].index,this.dom.box.style.height=this.parent.subgroups[i].height+"px","top"==n?this.dom.box.style.top=this.parent.top+this.parent.subgroups[i].top+"px":this.dom.box.style.top=this.parent.top+this.parent.height-this.parent.subgroups[i].top-this.parent.subgroups[i].height+"px",this.dom.box.style.bottom=""}else this.parent instanceof o?(e=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"==n?"0":"",this.dom.box.style.top="top"==n?"0":""):(e=this.parent.height,this.dom.box.style.top=this.parent.top+"px",this.dom.box.style.bottom="");this.dom.box.style.height=e+"px"},t.exports=i},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:"bottom"},showMinorLabels:!0,showMajorLabels:!0,maxMinorChars:7,format:u.FORMAT,moment:d,timeAxis:null},this.options=a.extend({},this.defaultOptions),this.body=t,this._create(),this.setOptions(e)}var o=n(62),s=i(o),a=n(1),l=n(108),u=n(113),c=n(109),d=n(82);r.prototype=new l,r.prototype.setOptions=function(t){t&&(a.selectiveExtend(["showMinorLabels","showMajorLabels","maxMinorChars","hiddenDates","timeAxis","moment","rtl"],this.options,t),a.selectiveDeepExtend(["format"],this.options,t),"orientation"in t&&("string"==typeof t.orientation?this.options.orientation.axis=t.orientation:"object"===(0,s.default)(t.orientation)&&"axis"in t.orientation&&(this.options.orientation.axis=t.orientation.axis)),"locale"in t&&("function"==typeof d.locale?d.locale(t.locale):d.lang(t.locale)))},r.prototype._create=function(){this.dom.foreground=document.createElement("div"),this.dom.background=document.createElement("div"),this.dom.foreground.className="vis-time-axis vis-foreground",this.dom.background.className="vis-time-axis vis-background"},r.prototype.destroy=function(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null},r.prototype.redraw=function(){var t=this.props,e=this.dom.foreground,n=this.dom.background,i="top"==this.options.orientation.axis?this.body.dom.top:this.body.dom.bottom,r=e.parentNode!==i;this._calculateCharSize();var o=this.options.showMinorLabels&&"none"!==this.options.orientation.axis,s=this.options.showMajorLabels&&"none"!==this.options.orientation.axis;t.minorLabelHeight=o?t.minorCharHeight:0,t.majorLabelHeight=s?t.majorCharHeight:0,t.height=t.minorLabelHeight+t.majorLabelHeight,t.width=e.offsetWidth,t.minorLineHeight=this.body.domProps.root.height-t.majorLabelHeight-("top"==this.options.orientation.axis?this.body.domProps.bottom.height:this.body.domProps.top.height),t.minorLineWidth=1,t.majorLineHeight=t.minorLineHeight+t.majorLabelHeight,t.majorLineWidth=1;var a=e.nextSibling,l=n.nextSibling;return e.parentNode&&e.parentNode.removeChild(e),n.parentNode&&n.parentNode.removeChild(n),e.style.height=this.props.height+"px",this._repaintLabels(),a?i.insertBefore(e,a):i.appendChild(e),l?this.body.dom.backgroundVertical.insertBefore(n,l):this.body.dom.backgroundVertical.appendChild(n),this._isResized()||r},r.prototype._repaintLabels=function(){var t=this.options.orientation.axis,e=a.convert(this.body.range.start,"Number"),n=a.convert(this.body.range.end,"Number"),i=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),r=i-c.getHiddenDurationBefore(this.options.moment,this.body.hiddenDates,this.body.range,i);r-=this.body.util.toTime(0).valueOf();var o=new u(new Date(e),new Date(n),r,this.body.hiddenDates);o.setMoment(this.options.moment),this.options.format&&o.setFormat(this.options.format),this.options.timeAxis&&o.setScale(this.options.timeAxis),this.step=o;var s=this.dom;s.redundant.lines=s.lines,s.redundant.majorTexts=s.majorTexts,s.redundant.minorTexts=s.minorTexts,s.lines=[],s.majorTexts=[],s.minorTexts=[];var l,d,p,f,m,g,v,y,b,w,_=0,x=void 0,k=0,C=1e3;for(o.start(),d=o.getCurrent(),f=this.body.util.toScreen(d);o.hasNext()&&k<C;){k++,m=o.isMajor(),w=o.getClassName(),b=o.getLabelMinor(),l=d,p=f,o.next(),d=o.getCurrent(),g=o.isMajor(),f=this.body.util.toScreen(d),v=_,_=f-p;var S=_>=.4*v;if(this.options.showMinorLabels&&S){var T=this._repaintMinorText(p,b,t,w);T.style.width=_+"px"}m&&this.options.showMajorLabels?(p>0&&(void 0==x&&(x=p),T=this._repaintMajorText(p,o.getLabelMajor(),t,w)),y=this._repaintMajorLine(p,_,t,w)):S?y=this._repaintMinorLine(p,_,t,w):y&&(y.style.width=parseInt(y.style.width)+_+"px")}if(k!==C||h||(console.warn("Something is wrong with the Timeline scale. Limited drawing of grid lines to "+C+" lines."),h=!0),this.options.showMajorLabels){var M=this.body.util.toTime(0),D=o.getLabelMajor(M),E=D.length*(this.props.majorCharWidth||10)+10;(void 0==x||E<x)&&this._repaintMajorText(0,D,t,w)}a.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},r.prototype._repaintMinorText=function(t,e,n,i){var r=this.dom.redundant.minorTexts.shift();if(!r){var o=document.createTextNode("");r=document.createElement("div"),r.appendChild(o),this.dom.foreground.appendChild(r)}return this.dom.minorTexts.push(r),r.innerHTML=e,r.style.top="top"==n?this.props.majorLabelHeight+"px":"0",this.options.rtl?(r.style.left="",r.style.right=t+"px"):r.style.left=t+"px",r.className="vis-text vis-minor "+i,r},r.prototype._repaintMajorText=function(t,e,n,i){var r=this.dom.redundant.majorTexts.shift();if(!r){var o=document.createElement("div");r=document.createElement("div"),r.appendChild(o),this.dom.foreground.appendChild(r)}return r.childNodes[0].innerHTML=e,r.className="vis-text vis-major "+i,r.style.top="top"==n?"0":this.props.minorLabelHeight+"px",this.options.rtl?(r.style.left="",r.style.right=t+"px"):r.style.left=t+"px",this.dom.majorTexts.push(r),r},r.prototype._repaintMinorLine=function(t,e,n,i){var r=this.dom.redundant.lines.shift();r||(r=document.createElement("div"),this.dom.background.appendChild(r)),this.dom.lines.push(r);var o=this.props;return"top"==n?r.style.top=o.majorLabelHeight+"px":r.style.top=this.body.domProps.top.height+"px",r.style.height=o.minorLineHeight+"px",this.options.rtl?(r.style.left="",r.style.right=t-o.minorLineWidth/2+"px",r.className="vis-grid vis-vertical-rtl vis-minor "+i):(r.style.left=t-o.minorLineWidth/2+"px",r.className="vis-grid vis-vertical vis-minor "+i),r.style.width=e+"px",r},r.prototype._repaintMajorLine=function(t,e,n,i){var r=this.dom.redundant.lines.shift();r||(r=document.createElement("div"),this.dom.background.appendChild(r)),this.dom.lines.push(r);var o=this.props;return"top"==n?r.style.top="0":r.style.top=this.body.domProps.top.height+"px",this.options.rtl?(r.style.left="",r.style.right=t-o.majorLineWidth/2+"px",r.className="vis-grid vis-vertical-rtl vis-major "+i):(r.style.left=t-o.majorLineWidth/2+"px",r.className="vis-grid vis-vertical vis-major "+i),r.style.height=o.majorLineHeight+"px",r.style.width=e+"px",r},r.prototype._calculateCharSize=function(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement("DIV"),this.dom.measureCharMinor.className="vis-text vis-minor vis-measure",this.dom.measureCharMinor.style.position="absolute",this.dom.measureCharMinor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement("DIV"),this.dom.measureCharMajor.className="vis-text vis-major vis-measure",this.dom.measureCharMajor.style.position="absolute",this.dom.measureCharMajor.appendChild(document.createTextNode("0")),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth};var h=!1;t.exports=r},function(t,e,n){function i(t){this.active=!1,this.dom={container:t},this.dom.overlay=document.createElement("div"),this.dom.overlay.className="vis-overlay",this.dom.container.appendChild(this.dom.overlay),this.hammer=a(this.dom.overlay),this.hammer.on("tap",this._onTapOverlay.bind(this));var e=this,n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];n.forEach(function(t){e.hammer.on(t,function(t){t.stopPropagation()})}),document&&document.body&&(this.onClick=function(n){r(n.target,t)||e.deactivate()},document.body.addEventListener("click",this.onClick)),void 0!==this.keycharm&&this.keycharm.destroy(),this.keycharm=o(),this.escListener=this.deactivate.bind(this)}function r(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var o=n(124),s=n(106),a=n(101),l=n(1);s(i.prototype),i.current=null,i.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener("click",this.onClick),this.hammer.destroy(),this.hammer=null},i.prototype.activate=function(){i.current&&i.current.deactivate(),i.current=this,this.active=!0,this.dom.overlay.style.display="none",l.addClassName(this.dom.container,"vis-active"),this.emit("change"),this.emit("activate"),this.keycharm.bind("esc",this.escListener)},i.prototype.deactivate=function(){this.active=!1,this.dom.overlay.style.display="",l.removeClassName(this.dom.container,"vis-active"),this.keycharm.unbind("esc",this.escListener),this.emit("change"),this.emit("deactivate")},i.prototype._onTapOverlay=function(t){this.activate(),t.stopPropagation()},t.exports=i},function(t,e,n){var i,r,o;!function(n,s){r=[],i=s,o="function"==typeof i?i.apply(e,r):i,!(void 0!==o&&(t.exports=o))}(this,function(){function t(t){var e,n=t&&t.preventDefault||!1,i=t&&t.container||window,r={},o={keydown:{},keyup:{}},s={};for(e=97;e<=122;e++)s[String.fromCharCode(e)]={code:65+(e-97),shift:!1};for(e=65;e<=90;e++)s[String.fromCharCode(e)]={code:e,shift:!0};for(e=0;e<=9;e++)s[""+e]={code:48+e,shift:!1};for(e=1;e<=12;e++)s["F"+e]={code:111+e,shift:!1};for(e=0;e<=9;e++)s["num"+e]={code:96+e,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(t){u(t,"keydown")},l=function(t){u(t,"keyup")},u=function(t,e){if(void 0!==o[e][t.keyCode]){for(var i=o[e][t.keyCode],r=0;r<i.length;r++)void 0===i[r].shift?i[r].fn(t):1==i[r].shift&&1==t.shiftKey?i[r].fn(t):0==i[r].shift&&0==t.shiftKey&&i[r].fn(t);1==n&&t.preventDefault()}};return r.bind=function(t,e,n){if(void 0===n&&(n="keydown"),void 0===s[t])throw new Error("unsupported key: "+t);void 0===o[n][s[t].code]&&(o[n][s[t].code]=[]),o[n][s[t].code].push({fn:e,shift:s[t].shift})},r.bindAll=function(t,e){void 0===e&&(e="keydown");for(var n in s)s.hasOwnProperty(n)&&r.bind(n,t,e)},r.getKey=function(t){for(var e in s)if(s.hasOwnProperty(e)){if(1==t.shiftKey&&1==s[e].shift&&t.keyCode==s[e].code)return e;if(0==t.shiftKey&&0==s[e].shift&&t.keyCode==s[e].code)return e;if(t.keyCode==s[e].code&&"shift"==e)return e}return"unknown key, currently not supported"},r.unbind=function(t,e,n){if(void 0===n&&(n="keydown"),void 0===s[t])throw new Error("unsupported key: "+t);if(void 0!==e){var i=[],r=o[n][s[t].code];if(void 0!==r)for(var a=0;a<r.length;a++)r[a].fn==e&&r[a].shift==s[t].shift||i.push(o[n][s[t].code][a]);o[n][s[t].code]=i}else o[n][s[t].code]=[]},r.reset=function(){o={keydown:{},keyup:{}}},r.destroy=function(){o={keydown:{},keyup:{}},i.removeEventListener("keydown",a,!0),i.removeEventListener("keyup",l,!0)},i.addEventListener("keydown",a,!0),i.addEventListener("keyup",l,!0),r}return t})},function(t,e,n){function i(t,e){this.body=t,this.defaultOptions={moment:a,locales:l,locale:"en",id:void 0,title:void 0},this.options=o.extend({},this.defaultOptions),e&&e.time?this.customTime=e.time:this.customTime=new Date,this.eventParams={},this.setOptions(e),this._create()}var r=n(101),o=n(1),s=n(108),a=n(82),l=n(126);i.prototype=new s,i.prototype.setOptions=function(t){t&&o.selectiveExtend(["moment","locale","locales","id"],this.options,t)},i.prototype._create=function(){function t(t){this.body.range._onMouseWheel(t)}var e=document.createElement("div");e["custom-time"]=this,e.className="vis-custom-time "+(this.options.id||""),e.style.position="absolute",e.style.top="0px",e.style.height="100%",this.bar=e;var n=document.createElement("div");n.style.position="relative",n.style.top="0px",n.style.left="-10px",n.style.height="100%",n.style.width="20px",n.addEventListener?(n.addEventListener("mousewheel",t.bind(this),!1),n.addEventListener("DOMMouseScroll",t.bind(this),!1)):n.attachEvent("onmousewheel",t.bind(this)),e.appendChild(n),this.hammer=new r(n),this.hammer.on("panstart",this._onDragStart.bind(this)),this.hammer.on("panmove",this._onDrag.bind(this)),this.hammer.on("panend",this._onDragEnd.bind(this)),this.hammer.get("pan").set({threshold:5,direction:r.DIRECTION_HORIZONTAL})},i.prototype.destroy=function(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null},i.prototype.redraw=function(){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar));var e=this.body.util.toScreen(this.customTime),n=this.options.locales[this.options.locale];n||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline/#Localization"),this.warned=!0),n=this.options.locales.en);var i=this.options.title;return void 0===i?(i=n.time+": "+this.options.moment(this.customTime).format("dddd, MMMM Do YYYY, H:mm:ss"),i=i.charAt(0).toUpperCase()+i.substring(1)):"function"==typeof i&&(i=i.call(this.customTime)),this.bar.style.left=e+"px",this.bar.title=i,!1},i.prototype.hide=function(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar);
23
+ },i.prototype.setCustomTime=function(t){this.customTime=o.convert(t,"Date"),this.redraw()},i.prototype.getCustomTime=function(){return new Date(this.customTime.valueOf())},i.prototype.setCustomTitle=function(t){this.options.title=t},i.prototype._onDragStart=function(t){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,t.stopPropagation()},i.prototype._onDrag=function(t){if(this.eventParams.dragging){var e=this.body.util.toScreen(this.eventParams.customTime)+t.deltaX,n=this.body.util.toTime(e);this.setCustomTime(n),this.body.emitter.emit("timechange",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:o.elementsCensor(t)}),t.stopPropagation()}},i.prototype._onDragEnd=function(t){this.eventParams.dragging&&(this.body.emitter.emit("timechanged",{id:this.options.id,time:new Date(this.customTime.valueOf()),event:o.elementsCensor(t)}),t.stopPropagation())},i.customTimeFromTarget=function(t){for(var e=t.target;e;){if(e.hasOwnProperty("custom-time"))return e["custom-time"];e=e.parentNode}return null},t.exports=i},function(t,e){e.en={current:"current",time:"time"},e.en_EN=e.en,e.en_US=e.en,e.it={current:"attuale",time:"tempo"},e.it_IT=e.it,e.it_CH=e.it,e.nl={current:"huidige",time:"tijd"},e.nl_NL=e.nl,e.nl_BE=e.nl,e.de={current:"Aktuelle",time:"Zeit"},e.de_DE=e.de,e.fr={current:"actuel",time:"heure"},e.fr_FR=e.fr,e.fr_CA=e.fr,e.fr_BE=e.fr,e.es={current:"corriente",time:"hora"},e.es_ES=e.es},function(t,e,n){function i(t,e){this.body=t,this.defaultOptions={rtl:!1,showCurrentTime:!0,moment:s,locales:a,locale:"en"},this.options=r.extend({},this.defaultOptions),this.offset=0,this._create(),this.setOptions(e)}var r=n(1),o=n(108),s=n(82),a=n(126);i.prototype=new o,i.prototype._create=function(){var t=document.createElement("div");t.className="vis-current-time",t.style.position="absolute",t.style.top="0px",t.style.height="100%",this.bar=t},i.prototype.destroy=function(){this.options.showCurrentTime=!1,this.redraw(),this.body=null},i.prototype.setOptions=function(t){t&&r.selectiveExtend(["rtl","showCurrentTime","moment","locale","locales"],this.options,t)},i.prototype.redraw=function(){if(this.options.showCurrentTime){var t=this.body.dom.backgroundVertical;this.bar.parentNode!=t&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),t.appendChild(this.bar),this.start());var e=this.options.moment((new Date).valueOf()+this.offset),n=this.body.util.toScreen(e),i=this.options.locales[this.options.locale];i||(this.warned||(console.log("WARNING: options.locales['"+this.options.locale+"'] not found. See http://visjs.org/docs/timeline/#Localization"),this.warned=!0),i=this.options.locales.en);var r=i.current+" "+i.time+": "+e.format("dddd, MMMM Do YYYY, H:mm:ss");r=r.charAt(0).toUpperCase()+r.substring(1),this.options.rtl?this.bar.style.right=n+"px":this.bar.style.left=n+"px",this.bar.title=r}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1},i.prototype.start=function(){function t(){e.stop();var n=e.body.range.conversion(e.body.domProps.center.width).scale,i=1/n/10;i<30&&(i=30),i>1e3&&(i=1e3),e.redraw(),e.body.emitter.emit("currentTimeTick"),e.currentTimeTimer=setTimeout(t,i)}var e=this;t()},i.prototype.stop=function(){void 0!==this.currentTimeTimer&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)},i.prototype.setCurrentTime=function(t){var e=r.convert(t,"Date").valueOf(),n=(new Date).valueOf();this.offset=e-n,this.redraw()},i.prototype.getCurrentTime=function(){return new Date((new Date).valueOf()+this.offset)},t.exports=i},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="string",i="boolean",r="number",o="array",s="date",a="object",l="dom",u="moment",c="any",d={configure:{enabled:{boolean:i},filter:{boolean:i,function:"function"},container:{dom:l},__type__:{object:a,boolean:i,function:"function"}},align:{string:n},rtl:{boolean:i,undefined:"undefined"},rollingMode:{boolean:i,undefined:"undefined"},verticalScroll:{boolean:i,undefined:"undefined"},horizontalScroll:{boolean:i,undefined:"undefined"},autoResize:{boolean:i},throttleRedraw:{number:r},clickToUse:{boolean:i},dataAttributes:{string:n,array:o},editable:{add:{boolean:i,undefined:"undefined"},remove:{boolean:i,undefined:"undefined"},updateGroup:{boolean:i,undefined:"undefined"},updateTime:{boolean:i,undefined:"undefined"},overrideItems:{boolean:i,undefined:"undefined"},__type__:{boolean:i,object:a}},end:{number:r,date:s,string:n,moment:u},format:{minorLabels:{millisecond:{string:n,undefined:"undefined"},second:{string:n,undefined:"undefined"},minute:{string:n,undefined:"undefined"},hour:{string:n,undefined:"undefined"},weekday:{string:n,undefined:"undefined"},day:{string:n,undefined:"undefined"},month:{string:n,undefined:"undefined"},year:{string:n,undefined:"undefined"},__type__:{object:a,function:"function"}},majorLabels:{millisecond:{string:n,undefined:"undefined"},second:{string:n,undefined:"undefined"},minute:{string:n,undefined:"undefined"},hour:{string:n,undefined:"undefined"},weekday:{string:n,undefined:"undefined"},day:{string:n,undefined:"undefined"},month:{string:n,undefined:"undefined"},year:{string:n,undefined:"undefined"},__type__:{object:a,function:"function"}},__type__:{object:a}},moment:{function:"function"},groupOrder:{string:n,function:"function"},groupEditable:{add:{boolean:i,undefined:"undefined"},remove:{boolean:i,undefined:"undefined"},order:{boolean:i,undefined:"undefined"},__type__:{boolean:i,object:a}},groupOrderSwap:{function:"function"},height:{string:n,number:r},hiddenDates:{start:{date:s,number:r,string:n,moment:u},end:{date:s,number:r,string:n,moment:u},repeat:{string:n},__type__:{object:a,array:o}},itemsAlwaysDraggable:{boolean:i},locale:{string:n},locales:{__any__:{any:c},__type__:{object:a}},margin:{axis:{number:r},item:{horizontal:{number:r,undefined:"undefined"},vertical:{number:r,undefined:"undefined"},__type__:{object:a,number:r}},__type__:{object:a,number:r}},max:{date:s,number:r,string:n,moment:u},maxHeight:{number:r,string:n},maxMinorChars:{number:r},min:{date:s,number:r,string:n,moment:u},minHeight:{number:r,string:n},moveable:{boolean:i},multiselect:{boolean:i},multiselectPerGroup:{boolean:i},onAdd:{function:"function"},onUpdate:{function:"function"},onMove:{function:"function"},onMoving:{function:"function"},onRemove:{function:"function"},onAddGroup:{function:"function"},onMoveGroup:{function:"function"},onRemoveGroup:{function:"function"},order:{function:"function"},orientation:{axis:{string:n,undefined:"undefined"},item:{string:n,undefined:"undefined"},__type__:{string:n,object:a}},selectable:{boolean:i},showCurrentTime:{boolean:i},showMajorLabels:{boolean:i},showMinorLabels:{boolean:i},stack:{boolean:i},stackSubgroups:{boolean:i},snap:{function:"function",null:"null"},start:{date:s,number:r,string:n,moment:u},template:{function:"function"},groupTemplate:{function:"function"},visibleFrameTemplate:{string:n,function:"function"},tooltip:{followMouse:{boolean:i},overflowMethod:{string:["cap","flip"]},__type__:{object:a}},tooltipOnItemUpdateTime:{template:{function:"function"},__type__:{boolean:i,object:a}},timeAxis:{scale:{string:n,undefined:"undefined"},step:{number:r,undefined:"undefined"},__type__:{object:a}},type:{string:n},width:{string:n,number:r},zoomable:{boolean:i},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:r},zoomMin:{number:r},__type__:{object:a}},h={global:{align:["center","left","right"],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",month:"YYYY",year:""}},groupsDraggable:!1,height:"",locale:"",margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:["both","bottom","top"],item:["bottom","top"]},selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,start:"",tooltip:{followMouse:!1,overflowMethod:"flip"},tooltipOnItemUpdateTime:!1,type:["box","point","range","background"],width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1]}};e.allOptions=d,e.configureOptions=h},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n,i){if(!(Array.isArray(n)||n instanceof d||n instanceof h)&&n instanceof Object){var r=i;i=n,n=r}i&&i.throttleRedraw&&console.warn('Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.');var o=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:"bottom",item:"bottom"},moment:u,width:null,height:null,maxHeight:null,minHeight:null},this.options=c.deepExtend({},this.defaultOptions),this._create(t),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:this.on.bind(this),off:this.off.bind(this),emit:this.emit.bind(this)},hiddenDates:[],util:{toScreen:o._toScreen.bind(o),toGlobalScreen:o._toGlobalScreen.bind(o),toTime:o._toTime.bind(o),toGlobalTime:o._toGlobalTime.bind(o)}},this.range=new p(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new m(this.body),this.components.push(this.timeAxis),this.currentTime=new g(this.body),this.components.push(this.currentTime),this.linegraph=new y(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on("tap",function(t){o.emit("click",o.getEventProperties(t))}),this.on("doubletap",function(t){o.emit("doubleClick",o.getEventProperties(t))}),this.dom.root.oncontextmenu=function(t){o.emit("contextmenu",o.getEventProperties(t))},i&&this.setOptions(i),n&&this.setGroups(n),e&&this.setItems(e),this._redraw()}var o=n(94),s=i(o),a=n(105),l=i(a),u=(n(106),n(101),n(82)),c=n(1),d=n(88),h=n(92),p=n(107),f=n(110),m=n(122),g=n(127),v=n(125),y=n(130),b=n(105).printStyle,w=n(138).allOptions,_=n(138).configureOptions;r.prototype=new f,r.prototype.setOptions=function(t){var e=l.default.validate(t,w);e===!0&&console.log("%cErrors have been found in the supplied options object.",b),f.prototype.setOptions.call(this,t)},r.prototype.setItems=function(t){var e,n=null==this.itemsData;if(e=t?t instanceof d||t instanceof h?t:new d(t,{type:{start:"Date",end:"Date"}}):null,this.itemsData=e,this.linegraph&&this.linegraph.setItems(e),n)if(void 0!=this.options.start||void 0!=this.options.end){var i=void 0!=this.options.start?this.options.start:null,r=void 0!=this.options.end?this.options.end:null;this.setWindow(i,r,{animation:!1})}else this.fit({animation:!1})},r.prototype.setGroups=function(t){var e;e=t?t instanceof d||t instanceof h?t:new d(t):null,this.groupsData=e,this.linegraph.setGroups(e)},r.prototype.getLegend=function(t,e,n){return void 0===e&&(e=15),void 0===n&&(n=15),void 0!==this.linegraph.groups[t]?this.linegraph.groups[t].getLegend(e,n):"cannot find group:'"+t+"'"},r.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])},r.prototype.getDataRange=function(){var t=null,e=null;for(var n in this.linegraph.groups)if(this.linegraph.groups.hasOwnProperty(n)&&1==this.linegraph.groups[n].visible)for(var i=0;i<this.linegraph.groups[n].itemsData.length;i++){var r=this.linegraph.groups[n].itemsData[i],o=c.convert(r.x,"Date").valueOf();t=null==t?o:t>o?o:t,e=null==e?o:e<o?o:e}return{min:null!=t?new Date(t):null,max:null!=e?new Date(e):null}},r.prototype.getEventProperties=function(t){var e=t.center?t.center.x:t.clientX,n=t.center?t.center.y:t.clientY,i=e-c.getAbsoluteLeft(this.dom.centerContainer),r=n-c.getAbsoluteTop(this.dom.centerContainer),o=this._toTime(i),s=v.customTimeFromTarget(t),a=c.getTarget(t),l=null;c.hasParent(a,this.timeAxis.dom.foreground)?l="axis":this.timeAxis2&&c.hasParent(a,this.timeAxis2.dom.foreground)?l="axis":c.hasParent(a,this.linegraph.yAxisLeft.dom.frame)?l="data-axis":c.hasParent(a,this.linegraph.yAxisRight.dom.frame)?l="data-axis":c.hasParent(a,this.linegraph.legendLeft.dom.frame)?l="legend":c.hasParent(a,this.linegraph.legendRight.dom.frame)?l="legend":null!=s?l="custom-time":c.hasParent(a,this.currentTime.bar)?l="current-time":c.hasParent(a,this.dom.center)&&(l="background");var u=[],d=this.linegraph.yAxisLeft,h=this.linegraph.yAxisRight;return!d.hidden&&this.itemsData.length>0&&u.push(d.screenToValue(r)),!h.hidden&&this.itemsData.length>0&&u.push(h.screenToValue(r)),{event:t,what:l,pageX:t.srcEvent?t.srcEvent.pageX:t.pageX,pageY:t.srcEvent?t.srcEvent.pageY:t.pageY,x:i,y:r,time:o,value:u}},r.prototype._createConfigurator=function(){return new s.default(this,this.dom.container,_)},t.exports=r},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){this.id=a.randomUUID(),this.body=t,this.defaultOptions={yAxisOrientation:"left",defaultGroup:"default",sort:!0,sampling:!0,stack:!1,graphHeight:"400px",shaded:{enabled:!1,orientation:"bottom"},style:"line",barChart:{width:50,sideBySide:!1,align:"center"},interpolation:{enabled:!0,parametrization:"centripetal",alpha:.5},drawPoints:{enabled:!0,size:6,style:"square"},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=a.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var n=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(t,e,i){n._onAdd(e.items)},update:function(t,e,i){n._onUpdate(e.items)},remove:function(t,e,i){n._onRemove(e.items)}},this.groupListeners={add:function(t,e,i){n._onAddGroups(e.items)},update:function(t,e,i){n._onUpdateGroups(e.items)},remove:function(t,e,i){n._onRemoveGroups(e.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(e),this.groupsUsingDefaultStyles=[0],this.body.emitter.on("rangechanged",function(){n.lastStart=n.body.range.start,n.svg.style.left=a.option.asSize(-n.props.width),n.forceGraphUpdate=!0,n.redraw.call(n)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}var o=n(62),s=i(o),a=n(1),l=n(87),u=n(88),c=n(92),d=n(108),h=n(131),p=n(133),f=n(137),m=n(134),g=n(136),v=n(135),y="__ungrouped__";r.prototype=new d,r.prototype._create=function(){var t=document.createElement("div");t.className="vis-line-graph",this.dom.frame=t,this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="relative",this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",this.svg.style.display="block",t.appendChild(this.svg),this.options.dataAxis.orientation="left",this.yAxisLeft=new h(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation="right",this.yAxisRight=new h(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new f(this.body,this.options.legend,"left",this.options.groups),this.legendRight=new f(this.body,this.options.legend,"right",this.options.groups),this.show()},r.prototype.setOptions=function(t){if(t){var e=["sampling","defaultGroup","stack","height","graphHeight","yAxisOrientation","style","barChart","dataAxis","sort","groups"];void 0===t.graphHeight&&void 0!==t.height?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):void 0!==this.body.domProps.centerContainer.height&&void 0!==t.graphHeight&&parseInt((t.graphHeight+"").replace("px",""))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),a.selectiveDeepExtend(e,this.options,t),a.mergeOptions(this.options,t,"interpolation"),a.mergeOptions(this.options,t,"drawPoints"),a.mergeOptions(this.options,t,"shaded"),a.mergeOptions(this.options,t,"legend"),t.interpolation&&"object"==(0,s.default)(t.interpolation)&&t.interpolation.parametrization&&("uniform"==t.interpolation.parametrization?this.options.interpolation.alpha=0:"chordal"==t.interpolation.parametrization?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization="centripetal",this.options.interpolation.alpha=.5)),this.yAxisLeft&&void 0!==t.dataAxis&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&void 0!==t.legend&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),this.groups.hasOwnProperty(y)&&this.groups[y].setOptions(t)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0}))},r.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},r.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},r.prototype.setItems=function(t){var e,n=this,i=this.itemsData;if(t){if(!(t instanceof u||t instanceof c))throw new TypeError("Data must be an instance of DataSet or DataView");this.itemsData=t}else this.itemsData=null;if(i&&(a.forEach(this.itemListeners,function(t,e){i.off(e,t)}),e=i.getIds(),this._onRemove(e)),this.itemsData){var r=this.id;a.forEach(this.itemListeners,function(t,e){n.itemsData.on(e,t,r)}),e=this.itemsData.getIds(),this._onAdd(e)}},r.prototype.setGroups=function(t){var e,n=this;if(this.groupsData){a.forEach(this.groupListeners,function(t,e){n.groupsData.off(e,t)}),e=this.groupsData.getIds(),this.groupsData=null;for(var i=0;i<e.length;i++)this._removeGroup(e[i])}if(t){if(!(t instanceof u||t instanceof c))throw new TypeError("Data must be an instance of DataSet or DataView");this.groupsData=t}else this.groupsData=null;if(this.groupsData){var r=this.id;a.forEach(this.groupListeners,function(t,e){n.groupsData.on(e,t,r)}),e=this.groupsData.getIds(),this._onAddGroups(e)}},r.prototype._onUpdate=function(t){this._updateAllGroupData(t)},r.prototype._onAdd=function(t){this._onUpdate(t)},r.prototype._onRemove=function(t){this._onUpdate(t)},r.prototype._onUpdateGroups=function(t){this._updateAllGroupData(null,t)},r.prototype._onAddGroups=function(t){this._onUpdateGroups(t)},r.prototype._onRemoveGroups=function(t){for(var e=0;e<t.length;e++)this._removeGroup(t[e]);this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})},r.prototype._removeGroup=function(t){this.groups.hasOwnProperty(t)&&("right"==this.groups[t].options.yAxisOrientation?(this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t),this.legendLeft.redraw()),delete this.groups[t])},r.prototype._updateGroup=function(t,e){this.groups.hasOwnProperty(e)?(this.groups[e].update(t),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.updateGroup(e,this.groups[e]),this.legendRight.updateGroup(e,this.groups[e]),this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e)):(this.yAxisLeft.updateGroup(e,this.groups[e]),this.legendLeft.updateGroup(e,this.groups[e]),this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e))):(this.groups[e]=new p(t,e,this.options,this.groupsUsingDefaultStyles),"right"==this.groups[e].options.yAxisOrientation?(this.yAxisRight.addGroup(e,this.groups[e]),this.legendRight.addGroup(e,this.groups[e])):(this.yAxisLeft.addGroup(e,this.groups[e]),this.legendLeft.addGroup(e,this.groups[e]))),this.legendLeft.redraw(),this.legendRight.redraw()},r.prototype._updateAllGroupData=function(t,e){if(null!=this.itemsData){var n={},i=this.itemsData.get(),r=this.itemsData._fieldId,o={};t&&t.map(function(t){o[t]=t});for(var s={},l=0;l<i.length;l++){var u=i[l],c=u.group;null!==c&&void 0!==c||(c=y),s.hasOwnProperty(c)?s[c]++:s[c]=1}if(!e&&t)for(var c in this.groups)if(this.groups.hasOwnProperty(c)){var d=this.groups[c],h=d.getItems();n[c]=h.filter(function(t){return t[r]!==o[t[r]]});var p=s[c];s[c]-=n[c].length,n[c].length<p&&(n[c][p-1]={})}for(var l=0;l<i.length;l++){var u=i[l],c=u.group;if(null!==c&&void 0!==c||(c=y),e||!t||u[r]===o[u[r]]){n.hasOwnProperty(c)||(n[c]=new Array(s[c]));var f=a.bridgeObject(u);f.x=a.convert(u.x,"Date"),f.end=a.convert(u.end,"Date"),f.orginalY=u.y,f.y=Number(u.y),f[r]=u[r];var m=n[c].length-s[c]--;n[c][m]=f}}for(var c in this.groups)this.groups.hasOwnProperty(c)&&(n.hasOwnProperty(c)||(n[c]=new Array(0)));for(var c in n)if(n.hasOwnProperty(c))if(0==n[c].length)this.groups.hasOwnProperty(c)&&this._removeGroup(c);else{var d=void 0;void 0!=this.groupsData&&(d=this.groupsData.get(c)),void 0==d&&(d={id:c,content:this.options.defaultGroup+c}),this._updateGroup(d,c),this.groups[c].setItems(n[c])}this.forceGraphUpdate=!0,this.body.emitter.emit("_change",{queue:!0})}},r.prototype.redraw=function(){var t=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,t=this._isResized()||t;var e=this.body.range.end-this.body.range.start,n=e!=this.lastVisibleInterval;if(this.lastVisibleInterval=e,1==t&&(this.svg.style.width=a.option.asSize(3*this.props.width),this.svg.style.left=a.option.asSize(-this.props.width),(this.options.height+"").indexOf("%")==-1&&1!=this.updateSVGheightOnResize||(this.updateSVGheight=!0)),1==this.updateSVGheight?(this.options.graphHeight!=this.props.height+"px"&&(this.options.graphHeight=this.props.height+"px",this.svg.style.height=this.props.height+"px"),this.updateSVGheight=!1):this.svg.style.height=(""+this.options.graphHeight).replace("px","")+"px",1==t||1==n||1==this.abortedGraphUpdate||1==this.forceGraphUpdate)t=this._updateGraph()||t,this.forceGraphUpdate=!1;else if(0!=this.lastStart){var i=this.body.range.start-this.lastStart,r=this.body.range.end-this.body.range.start;if(0!=this.props.width){var o=this.props.width/r,s=i*o;this.svg.style.left=-this.props.width-s+"px"}}return this.legendLeft.redraw(),this.legendRight.redraw(),t},r.prototype._getSortedGroupIds=function(){var t=[];for(var e in this.groups)if(this.groups.hasOwnProperty(e)){var n=this.groups[e];1!=n.visible||void 0!==this.options.groups.visibility[e]&&1!=this.options.groups.visibility[e]||t.push({id:e,zIndex:n.options.zIndex})}a.insertSort(t,function(t,e){var n=t.zIndex,i=e.zIndex;return void 0===n&&(n=0),void 0===i&&(i=0),n==i?0:n<i?-1:1});for(var i=new Array(t.length),r=0;r<t.length;r++)i[r]=t[r].id;return i},r.prototype._updateGraph=function(){if(l.prepareElements(this.svgElements),0!=this.props.width&&null!=this.itemsData){var t,e,n={},i=!1,r=this.body.util.toGlobalTime(-this.body.domProps.root.width),o=this.body.util.toGlobalTime(2*this.body.domProps.root.width),s=this._getSortedGroupIds();if(s.length>0){var a={};for(this._getRelevantData(s,a,r,o),this._applySampling(s,a),e=0;e<s.length;e++)this._convertXcoordinates(a[s[e]]);if(this._getYRanges(s,a,n),i=this._updateYAxis(s,n),1==i)return l.cleanupElements(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var u=void 0;for(e=0;e<s.length;e++)t=this.groups[s[e]],this.options.stack===!0&&"line"===this.options.style&&(void 0!=t.options.excludeFromStacking&&t.options.excludeFromStacking||(void 0!=u&&(this._stack(a[t.id],a[u.id]),1==t.options.shaded.enabled&&"group"!==t.options.shaded.orientation&&("top"==t.options.shaded.orientation&&"group"!==u.options.shaded.orientation?(u.options.shaded.orientation="group",u.options.shaded.groupId=t.id):(t.options.shaded.orientation="group",t.options.shaded.groupId=u.id))),u=t)),this._convertYcoordinates(a[s[e]],t);var c={};for(e=0;e<s.length;e++)if(t=this.groups[s[e]],"line"===t.options.style&&1==t.options.shaded.enabled){var d=a[s[e]];if(null==d||0==d.length)continue;if(c.hasOwnProperty(s[e])||(c[s[e]]=g.calcPath(d,t)),"group"===t.options.shaded.orientation){var h=t.options.shaded.groupId;if(s.indexOf(h)===-1){console.log(t.id+": Unknown shading group target given:"+h);continue}c.hasOwnProperty(h)||(c[h]=g.calcPath(a[h],this.groups[h])),g.drawShading(c[s[e]],t,c[h],this.framework)}else g.drawShading(c[s[e]],t,void 0,this.framework)}for(m.draw(s,a,this.framework),e=0;e<s.length;e++)if(t=this.groups[s[e]],a[s[e]].length>0)switch(t.options.style){case"line":c.hasOwnProperty(s[e])||(c[s[e]]=g.calcPath(a[s[e]],t)),g.draw(c[s[e]],t,this.framework);case"point":case"points":"point"!=t.options.style&&"points"!=t.options.style&&1!=t.options.drawPoints.enabled||v.draw(a[s[e]],t,this.framework);break;case"bar":}}}return l.cleanupElements(this.svgElements),!1},r.prototype._stack=function(t,e){var n,i,r,o,s;n=0;for(var a=0;a<t.length;a++){o=void 0,s=void 0;for(var l=n;l<e.length;l++){if(e[l].x===t[a].x){o=e[l],s=e[l],n=l;break}if(e[l].x>t[a].x){s=e[l],o=0==l?s:e[l-1],n=l;break}}void 0===s&&(o=e[e.length-1],s=e[e.length-1]),i=s.x-o.x,r=s.y-o.y,0==i?t[a].y=t[a].orginalY+s.y:t[a].y=t[a].orginalY+r/i*(t[a].x-o.x)+o.y}},r.prototype._getRelevantData=function(t,e,n,i){var r,o,s,l;if(t.length>0)for(o=0;o<t.length;o++){r=this.groups[t[o]];var u=r.getItems();if(1==r.options.sort){var c=function(t,e){return t.getTime()==e.getTime()?0:t<e?-1:1},d=Math.max(0,a.binarySearchValue(u,n,"x","before",c)),h=Math.min(u.length,a.binarySearchValue(u,i,"x","after",c)+1);h<=0&&(h=u.length);var p=new Array(h-d);for(s=d;s<h;s++)l=r.itemsData[s],p[s-d]=l;e[t[o]]=p}else e[t[o]]=r.itemsData}},r.prototype._applySampling=function(t,e){var n;if(t.length>0)for(var i=0;i<t.length;i++)if(n=this.groups[t[i]],1==n.options.sampling){var r=e[t[i]];if(r.length>0){var o=1,s=r.length,a=this.body.util.toGlobalScreen(r[r.length-1].x)-this.body.util.toGlobalScreen(r[0].x),l=s/a;o=Math.min(Math.ceil(.2*s),Math.max(1,Math.round(l)));for(var u=new Array(s),c=0;c<s;c+=o){var d=Math.round(c/o);u[d]=r[c]}e[t[i]]=u.splice(0,Math.round(s/o))}}},r.prototype._getYRanges=function(t,e,n){var i,r,o,s,a=[],l=[];if(t.length>0){for(o=0;o<t.length;o++)i=e[t[o]],s=this.groups[t[o]].options,i.length>0&&(r=this.groups[t[o]],s.stack===!0&&"bar"===s.style?"left"===s.yAxisOrientation?a=a.concat(i):l=l.concat(i):n[t[o]]=r.getYRange(i,t[o]));m.getStackedYRange(a,n,t,"__barStackLeft","left"),m.getStackedYRange(l,n,t,"__barStackRight","right")}},r.prototype._updateYAxis=function(t,e){var n,i,r=!1,o=!1,s=!1,a=1e9,l=1e9,u=-1e9,c=-1e9;if(t.length>0){for(var d=0;d<t.length;d++){var h=this.groups[t[d]];h&&"right"!=h.options.yAxisOrientation?(o=!0,a=1e9,u=-1e9):h&&h.options.yAxisOrientation&&(s=!0,l=1e9,c=-1e9)}for(var d=0;d<t.length;d++)e.hasOwnProperty(t[d])&&e[t[d]].ignore!==!0&&(n=e[t[d]].min,i=e[t[d]].max,"right"!=e[t[d]].yAxisOrientation?(o=!0,a=a>n?n:a,u=u<i?i:u):(s=!0,l=l>n?n:l,c=c<i?i:c));1==o&&this.yAxisLeft.setRange(a,u),1==s&&this.yAxisRight.setRange(l,c)}r=this._toggleAxisVisiblity(o,this.yAxisLeft)||r,r=this._toggleAxisVisiblity(s,this.yAxisRight)||r,1==s&&1==o?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!o,this.yAxisRight.masterAxis=this.yAxisLeft,0==this.yAxisRight.master?(1==s?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,r=this.yAxisLeft.redraw()||r,r=this.yAxisRight.redraw()||r):r=this.yAxisRight.redraw()||r;for(var p=["__barStackLeft","__barStackRight","__lineStackLeft","__lineStackRight"],d=0;d<p.length;d++)t.indexOf(p[d])!=-1&&t.splice(t.indexOf(p[d]),1);return r},r.prototype._toggleAxisVisiblity=function(t,e){var n=!1;return 0==t?e.dom.frame.parentNode&&0==e.hidden&&(e.hide(),n=!0):e.dom.frame.parentNode||1!=e.hidden||(e.show(),n=!0),n},r.prototype._convertXcoordinates=function(t){for(var e=this.body.util.toScreen,n=0;n<t.length;n++)t[n].screen_x=e(t[n].x)+this.props.width,t[n].screen_y=t[n].y,void 0!=t[n].end?t[n].screen_end=e(t[n].end)+this.props.width:t[n].screen_end=void 0},r.prototype._convertYcoordinates=function(t,e){var n=this.yAxisLeft,i=Number(this.svg.style.height.replace("px",""));"right"==e.options.yAxisOrientation&&(n=this.yAxisRight);for(var r=0;r<t.length;r++)t[r].screen_y=Math.round(n.convertValue(t[r].y));e.setZeroPosition(Math.min(i,n.convertValue(0)))},t.exports=r},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n,i){this.id=a.randomUUID(),this.body=t,this.defaultOptions={orientation:"left",showMinorLabels:!0,showMajorLabels:!0,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:"40px",visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format:function(t){return""+parseFloat(t.toPrecision(3))},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format:function(t){return""+parseFloat(t.toPrecision(3))},title:{text:void 0,style:void 0}}},this.linegraphOptions=i,this.linegraphSVG=n,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=a.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(e),this.width=Number((""+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(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};var r=this;this.body.emitter.on("verticalDrag",function(){r.dom.lineContainer.style.top=r.body.domProps.scrollTop+"px"})}var o=n(58),s=i(o),a=n(1),l=n(87),u=n(108),c=n(132);r.prototype=new u,r.prototype.addGroup=function(t,e){this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1},r.prototype.updateGroup=function(t,e){this.groups.hasOwnProperty(t)||(this.amountOfGroups+=1),this.groups[t]=e},r.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},r.prototype.setOptions=function(t){if(t){var e=!1;this.options.orientation!=t.orientation&&void 0!==t.orientation&&(e=!0);var n=["orientation","showMinorLabels","showMajorLabels","icons","majorLinesOffset","minorLinesOffset","labelOffsetX","labelOffsetY","iconWidth","width","visible","left","right","alignZeros"];a.selectiveDeepExtend(n,this.options,t),this.minWidth=Number((""+this.options.width).replace("px","")),e===!0&&this.dom.frame&&(this.hide(),this.show())}},r.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement("div"),this.dom.lineContainer.style.width="100%",this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position="relative",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.height="100%",this.svg.style.width="100%",this.svg.style.display="block",this.dom.frame.appendChild(this.svg)},r.prototype._redrawGroupIcons=function(){l.prepareElements(this.svgElements);var t,e=this.options.iconWidth,n=15,i=4,r=i+.5*n;t="left"===this.options.orientation?i:this.width-e-i;var o=(0,s.default)(this.groups);o.sort(function(t,e){return t<e?-1:1});for(var a=0;a<o.length;a++){var u=o[a];this.groups[u].visible!==!0||void 0!==this.linegraphOptions.visibility[u]&&this.linegraphOptions.visibility[u]!==!0||(this.groups[u].getLegend(e,n,this.framework,t,r),r+=n+i)}l.cleanupElements(this.svgElements),this.iconsRemoved=!1},r.prototype._cleanupIcons=function(){this.iconsRemoved===!1&&(l.prepareElements(this.svgElements),l.cleanupElements(this.svgElements),this.iconsRemoved=!0)},r.prototype.show=function(){this.hidden=!1,
24
+ this.dom.frame.parentNode||("left"===this.options.orientation?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer)},r.prototype.hide=function(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.parentNode&&this.dom.lineContainer.parentNode.removeChild(this.dom.lineContainer)},r.prototype.setRange=function(t,e){this.range.start=t,this.range.end=e},r.prototype.redraw=function(){var t=!1,e=0;this.dom.lineContainer.style.top=this.body.domProps.scrollTop+"px";for(var n in this.groups)this.groups.hasOwnProperty(n)&&(this.groups[n].visible!==!0||void 0!==this.linegraphOptions.visibility[n]&&this.linegraphOptions.visibility[n]!==!0||e++);if(0===this.amountOfGroups||0===e)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace("px","")),this.dom.lineContainer.style.height=this.height+"px",this.width=this.options.visible===!0?Number((""+this.options.width).replace("px","")):0;var i=this.props,r=this.dom.frame;r.className="vis-data-axis",this._calculateCharSize();var o=this.options.orientation,s=this.options.showMinorLabels,a=this.options.showMajorLabels;i.minorLabelHeight=s?i.minorCharHeight:0,i.majorLabelHeight=a?i.majorCharHeight:0,i.minorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.minorLinesOffset,i.minorLineHeight=1,i.majorLineWidth=this.body.dom.backgroundHorizontal.offsetWidth-this.lineOffset-this.width+2*this.options.majorLinesOffset,i.majorLineHeight=1,"left"===o?(r.style.top="0",r.style.left="0",r.style.bottom="",r.style.width=this.width+"px",r.style.height=this.height+"px",this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(r.style.top="",r.style.bottom="0",r.style.left="0",r.style.width=this.width+"px",r.style.height=this.height+"px",this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),t=this._redrawLabels(),t=this._isResized()||t,this.options.icons===!0?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(o)}return t},r.prototype._redrawLabels=function(){var t=this,e=!1;l.prepareElements(this.DOMelements.lines),l.prepareElements(this.DOMelements.labels);var n=this.options.orientation,i=void 0!=this.options[n].range?this.options[n].range:{},r=!0;void 0!=i.max&&(this.range.end=i.max,r=!1);var o=!0;void 0!=i.min&&(this.range.start=i.min,o=!1),this.scale=new c(this.range.start,this.range.end,o,r,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[n].format),this.master===!1&&void 0!=this.masterAxis&&this.scale.followScale(this.masterAxis.scale),this.maxLabelSize=0;var s=this.scale.getLines();s.forEach(function(e){var i=e.y,r=e.major;t.options.showMinorLabels&&r===!1&&t._redrawLabel(i-2,e.val,n,"vis-y-axis vis-minor",t.props.minorCharHeight),r&&i>=0&&t._redrawLabel(i-2,e.val,n,"vis-y-axis vis-major",t.props.majorCharHeight),t.master===!0&&(r?t._redrawLine(i,n,"vis-grid vis-horizontal vis-major",t.options.majorLinesOffset,t.props.majorLineWidth):t._redrawLine(i,n,"vis-grid vis-horizontal vis-minor",t.options.minorLinesOffset,t.props.minorLineWidth))});var a=0;void 0!==this.options[n].title&&void 0!==this.options[n].title.text&&(a=this.props.titleCharHeight);var u=this.options.icons===!0?Math.max(this.options.iconWidth,a)+this.options.labelOffsetX+15:a+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-u&&this.options.visible===!0?(this.width=this.maxLabelSize+u,this.options.width=this.width+"px",l.cleanupElements(this.DOMelements.lines),l.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSize<this.width-u&&this.options.visible===!0&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+u),this.options.width=this.width+"px",l.cleanupElements(this.DOMelements.lines),l.cleanupElements(this.DOMelements.labels),this.redraw(),e=!0):(l.cleanupElements(this.DOMelements.lines),l.cleanupElements(this.DOMelements.labels),e=!1),e},r.prototype.convertValue=function(t){return this.scale.convertValue(t)},r.prototype.screenToValue=function(t){return this.scale.screenToValue(t)},r.prototype._redrawLabel=function(t,e,n,i,r){var o=l.getDOMElement("div",this.DOMelements.labels,this.dom.frame);o.className=i,o.innerHTML=e,"left"===n?(o.style.left="-"+this.options.labelOffsetX+"px",o.style.textAlign="right"):(o.style.right="-"+this.options.labelOffsetX+"px",o.style.textAlign="left"),o.style.top=t-.5*r+this.options.labelOffsetY+"px",e+="";var s=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<e.length*s&&(this.maxLabelSize=e.length*s)},r.prototype._redrawLine=function(t,e,n,i,r){if(this.master===!0){var o=l.getDOMElement("div",this.DOMelements.lines,this.dom.lineContainer);o.className=n,o.innerHTML="","left"===e?o.style.left=this.width-i+"px":o.style.right=this.width-i+"px",o.style.width=r+"px",o.style.top=t+"px"}},r.prototype._redrawTitle=function(t){if(l.prepareElements(this.DOMelements.title),void 0!==this.options[t].title&&void 0!==this.options[t].title.text){var e=l.getDOMElement("div",this.DOMelements.title,this.dom.frame);e.className="vis-y-axis vis-title vis-"+t,e.innerHTML=this.options[t].title.text,void 0!==this.options[t].title.style&&a.addCssText(e,this.options[t].title.style),"left"===t?e.style.left=this.props.titleCharHeight+"px":e.style.right=this.props.titleCharHeight+"px",e.style.width=this.height+"px"}l.cleanupElements(this.DOMelements.title)},r.prototype._calculateCharSize=function(){if(!("minorCharHeight"in this.props)){var t=document.createTextNode("0"),e=document.createElement("div");e.className="vis-y-axis vis-minor vis-measure",e.appendChild(t),this.dom.frame.appendChild(e),this.props.minorCharHeight=e.clientHeight,this.props.minorCharWidth=e.clientWidth,this.dom.frame.removeChild(e)}if(!("majorCharHeight"in this.props)){var n=document.createTextNode("0"),i=document.createElement("div");i.className="vis-y-axis vis-major vis-measure",i.appendChild(n),this.dom.frame.appendChild(i),this.props.majorCharHeight=i.clientHeight,this.props.majorCharWidth=i.clientWidth,this.dom.frame.removeChild(i)}if(!("titleCharHeight"in this.props)){var r=document.createTextNode("0"),o=document.createElement("div");o.className="vis-y-axis vis-title vis-measure",o.appendChild(r),this.dom.frame.appendChild(o),this.props.titleCharHeight=o.clientHeight,this.props.titleCharWidth=o.clientWidth,this.dom.frame.removeChild(o)}},t.exports=r},function(t,e){function n(t,e,n,i,r,o){var s=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=r,this.majorCharHeight=o,this._start=t,this._end=e,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=s,this.autoScaleStart=n,this.autoScaleEnd=i,this.formattingFunction=a,n||i){var l=this,u=function(t){var e=t-t%(l.magnitudefactor*l.minorSteps[l.minorStepIdx]);return t%(l.magnitudefactor*l.minorSteps[l.minorStepIdx])>.5*(l.magnitudefactor*l.minorSteps[l.minorStepIdx])?e+l.magnitudefactor*l.minorSteps[l.minorStepIdx]:e};n&&(this._start-=2*this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._start=u(this._start)),i&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=u(this._end)),this.determineScale()}}n.prototype.setCharHeight=function(t){this.majorCharHeight=t},n.prototype.setHeight=function(t){this.containerHeight=t},n.prototype.determineScale=function(){var t=this._end-this._start;this.scale=this.containerHeight/t;var e=this.majorCharHeight/this.scale,n=t>0?Math.round(Math.log(t)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=Math.pow(10,n);var i=0;n<0&&(i=n);for(var r=!1,o=i;Math.abs(o)<=Math.abs(n);o++){this.magnitudefactor=Math.pow(10,o);for(var s=0;s<this.minorSteps.length;s++){var a=this.magnitudefactor*this.minorSteps[s];if(a>=e){r=!0,this.minorStepIdx=s;break}}if(r===!0)break}},n.prototype.is_major=function(t){return t%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0},n.prototype.getStep=function(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]},n.prototype.getFirstMajor=function(){var t=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(t-this._start%t)%t)},n.prototype.formatValue=function(t){var e=t.toPrecision(5);return"function"==typeof this.formattingFunction&&(e=this.formattingFunction(t)),"number"==typeof e?""+e:"string"==typeof e?e:t.toPrecision(5)},n.prototype.getLines=function(){for(var t=[],e=this.getStep(),n=(e-this._start%e)%e,i=this._start+n;this._end-i>1e-5;i+=e)i!=this._start&&t.push({major:this.is_major(i),y:this.convertValue(i),val:this.formatValue(i)});return t},n.prototype.followScale=function(t){var e=this.minorStepIdx,n=this._start,i=this._end,r=this,o=function(){r.magnitudefactor*=2},s=function(){r.magnitudefactor/=2};t.minorStepIdx<=1&&this.minorStepIdx<=1||t.minorStepIdx>1&&this.minorStepIdx>1||(t.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,2==e?o():(o(),o())):(this.minorStepIdx=2,1==e?s():(s(),s())));for(var a=(t.getLines(),t.convertValue(0)),l=t.getStep()*t.scale,u=!1,c=0;!u&&c++<5;){this.scale=l/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);var d=this.containerHeight/this.scale;this._start=n,this._end=this._start+d;var h=this._end*this.scale,p=this.magnitudefactor*this.majorSteps[this.minorStepIdx],f=this.getFirstMajor()-t.getFirstMajor();if(this.zeroAlign){var m=a-h;this._end+=m/this.scale,this._start=this._end-d}else this.autoScaleStart?(this._start-=f/this.scale,this._end=this._start+d):(this._start+=p-f/this.scale,this._end=this._start+d);if(!this.autoScaleEnd&&this._end>i+1e-5)s(),u=!1;else{if(!this.autoScaleStart&&this._start<n-1e-5){if(!(this.zeroAlign&&n>=0)){s(),u=!1;continue}console.warn("Can't adhere to given 'min' range, due to zeroalign")}this.autoScaleStart&&this.autoScaleEnd&&d<i-n?(o(),u=!1):u=!0}}},n.prototype.convertValue=function(t){return this.containerHeight-(t-this._start)*this.scale},n.prototype.screenToValue=function(t){return(this.containerHeight-t)/this.scale+this._start},t.exports=n},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n,i){this.id=e;var r=["sampling","style","sort","yAxisOrientation","barChart","drawPoints","shaded","interpolation","zIndex","excludeFromStacking","excludeFromLegend"];this.options=a.selectiveBridgeObject(r,n),this.usingDefaultStyle=void 0===t.className,this.groupsUsingDefaultStyles=i,this.zeroPosition=0,this.update(t),1==this.usingDefaultStyle&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=void 0===t.visible||t.visible}var o=n(62),s=i(o),a=n(1),l=(n(87),n(134)),u=n(136),c=n(135);r.prototype.setItems=function(t){null!=t?(this.itemsData=t,1==this.options.sort&&a.insertSort(this.itemsData,function(t,e){return t.x>e.x?1:-1})):this.itemsData=[]},r.prototype.getItems=function(){return this.itemsData},r.prototype.setZeroPosition=function(t){this.zeroPosition=t},r.prototype.setOptions=function(t){if(void 0!==t){var e=["sampling","style","sort","yAxisOrientation","barChart","zIndex","excludeFromStacking","excludeFromLegend"];a.selectiveDeepExtend(e,this.options,t),"function"==typeof t.drawPoints&&(t.drawPoints={onRender:t.drawPoints}),a.mergeOptions(this.options,t,"interpolation"),a.mergeOptions(this.options,t,"drawPoints"),a.mergeOptions(this.options,t,"shaded"),t.interpolation&&"object"==(0,s.default)(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))}},r.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)},r.prototype.getLegend=function(t,e,n,i,r){if(void 0==n||null==n){var o=document.createElementNS("http://www.w3.org/2000/svg","svg");n={svg:o,svgElements:{},options:this.options,groups:[this]}}switch(void 0!=i&&null!=i||(i=0),void 0!=r&&null!=r||(r=.5*e),this.options.style){case"line":u.drawIcon(this,i,r,t,e,n);break;case"points":case"point":c.drawIcon(this,i,r,t,e,n);break;case"bar":l.drawIcon(this,i,r,t,e,n)}return{icon:n.svg,label:this.content,orientation:this.options.yAxisOrientation}},r.prototype.getYRange=function(t){for(var e=t[0].y,n=t[0].y,i=0;i<t.length;i++)e=e>t[i].y?t[i].y:e,n=n<t[i].y?t[i].y:n;return{min:e,max:n,yAxisOrientation:this.options.yAxisOrientation}},t.exports=r},function(t,e,n){function i(t,e){}var r=n(87),o=n(135);i.drawIcon=function(t,e,n,i,o,s){var a=.5*o,l=r.getSVGElement("rect",s.svgElements,s.svg);l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",n-a),l.setAttributeNS(null,"width",i),l.setAttributeNS(null,"height",2*a),l.setAttributeNS(null,"class","vis-outline");var u=Math.round(.3*i),c=t.options.barChart.width,d=c/u,h=Math.round(.4*o),p=Math.round(.75*o),f=Math.round((i-2*u)/3);if(r.drawBar(e+.5*u+f,n+a-h-1,u,h,t.className+" vis-bar",s.svgElements,s.svg,t.style),r.drawBar(e+1.5*u+f+2,n+a-p-1,u,p,t.className+" vis-bar",s.svgElements,s.svg,t.style),1==t.options.drawPoints.enabled){var m={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size/d,className:t.className};r.drawPoint(e+.5*u+f,n+a-h-1,m,s.svgElements,s.svg),r.drawPoint(e+1.5*u+f+2,n+a-p-1,m,s.svgElements,s.svg)}},i.draw=function(t,e,n){var s,a,l,u,c,d,h=[],p={},f=0;for(c=0;c<t.length;c++)if(u=n.groups[t[c]],"bar"===u.options.style&&u.visible===!0&&(void 0===n.options.groups.visibility[t[c]]||n.options.groups.visibility[t[c]]===!0))for(d=0;d<e[t[c]].length;d++)h.push({screen_x:e[t[c]][d].screen_x,screen_end:e[t[c]][d].screen_end,screen_y:e[t[c]][d].screen_y,x:e[t[c]][d].x,end:e[t[c]][d].end,y:e[t[c]][d].y,groupId:t[c],label:e[t[c]][d].label}),f+=1;if(0!==f)for(h.sort(function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x}),i._getDataIntersections(p,h),c=0;c<h.length;c++){u=n.groups[h[c].groupId];var m=void 0!=u.options.barChart.minWidth?u.options.barChart.minWidth:.1*u.options.barChart.width;a=h[c].screen_x;var g=0;if(void 0===p[a])c+1<h.length&&(s=Math.abs(h[c+1].screen_x-a)),l=i._getSafeDrawData(s,u,m);else{var v=c+(p[a].amount-p[a].resolved);c-(p[a].resolved+1),v<h.length&&(s=Math.abs(h[v].screen_x-a)),l=i._getSafeDrawData(s,u,m),p[a].resolved+=1,u.options.stack===!0&&u.options.excludeFromStacking!==!0?h[c].screen_y<u.zeroPosition?(g=p[a].accumulatedNegative,p[a].accumulatedNegative+=u.zeroPosition-h[c].screen_y):(g=p[a].accumulatedPositive,p[a].accumulatedPositive+=u.zeroPosition-h[c].screen_y):u.options.barChart.sideBySide===!0&&(l.width=l.width/p[a].amount,l.offset+=p[a].resolved*l.width-.5*l.width*(p[a].amount+1))}var y=l.width,b=h[c].screen_x;if(void 0!=h[c].screen_end?(y=h[c].screen_end-h[c].screen_x,b+=.5*y):b+=l.offset,r.drawBar(b,h[c].screen_y-g,y,u.zeroPosition-h[c].screen_y,u.className+" vis-bar",n.svgElements,n.svg,u.style),u.options.drawPoints.enabled===!0){var w={screen_x:h[c].screen_x,screen_y:h[c].screen_y-g,x:h[c].x,y:h[c].y,groupId:h[c].groupId,label:h[c].label};o.draw([w],u,n,l.offset)}}},i._getDataIntersections=function(t,e){for(var n,i=0;i<e.length;i++)i+1<e.length&&(n=Math.abs(e[i+1].screen_x-e[i].screen_x)),i>0&&(n=Math.min(n,Math.abs(e[i-1].screen_x-e[i].screen_x))),0===n&&(void 0===t[e[i].screen_x]&&(t[e[i].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),t[e[i].screen_x].amount+=1)},i._getSafeDrawData=function(t,e,n){var i,r;return t<e.options.barChart.width&&t>0?(i=t<n?n:t,r=0,"left"===e.options.barChart.align?r-=.5*t:"right"===e.options.barChart.align&&(r+=.5*t)):(i=e.options.barChart.width,r=0,"left"===e.options.barChart.align?r-=.5*e.options.barChart.width:"right"===e.options.barChart.align&&(r+=.5*e.options.barChart.width)),{width:i,offset:r}},i.getStackedYRange=function(t,e,n,r,o){if(t.length>0){t.sort(function(t,e){return t.screen_x===e.screen_x?t.groupId<e.groupId?-1:1:t.screen_x-e.screen_x});var s={};i._getDataIntersections(s,t),e[r]=i._getStackedYRange(s,t),e[r].yAxisOrientation=o,n.push(r)}},i._getStackedYRange=function(t,e){for(var n,i=e[0].screen_y,r=e[0].screen_y,o=0;o<e.length;o++)n=e[o].screen_x,void 0===t[n]?(i=i>e[o].screen_y?e[o].screen_y:i,r=r<e[o].screen_y?e[o].screen_y:r):e[o].screen_y<0?t[n].accumulatedNegative+=e[o].screen_y:t[n].accumulatedPositive+=e[o].screen_y;for(var s in t)t.hasOwnProperty(s)&&(i=i>t[s].accumulatedNegative?t[s].accumulatedNegative:i,i=i>t[s].accumulatedPositive?t[s].accumulatedPositive:i,r=r<t[s].accumulatedNegative?t[s].accumulatedNegative:r,r=r<t[s].accumulatedPositive?t[s].accumulatedPositive:r);return{min:i,max:r}},t.exports=i},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){}function o(t,e){return e="undefined"==typeof e?{}:e,{style:e.style||t.options.drawPoints.style,styles:e.styles||t.options.drawPoints.styles,size:e.size||t.options.drawPoints.size,className:e.className||t.className}}function s(t,e){var n=void 0;return t.options&&t.options.drawPoints&&t.options.drawPoints.onRender&&"function"==typeof t.options.drawPoints.onRender&&(n=t.options.drawPoints.onRender),e.group.options&&e.group.options.drawPoints&&e.group.options.drawPoints.onRender&&"function"==typeof e.group.options.drawPoints.onRender&&(n=e.group.options.drawPoints.onRender),n}var a=n(62),l=i(a),u=n(87);r.draw=function(t,e,n,i){i=i||0;for(var r=s(n,e),a=0;a<t.length;a++)if(r){var c=r(t[a],e);c!==!0&&"object"!==("undefined"==typeof c?"undefined":(0,l.default)(c))||u.drawPoint(t[a].screen_x+i,t[a].screen_y,o(e,c),n.svgElements,n.svg,t[a].label)}else u.drawPoint(t[a].screen_x+i,t[a].screen_y,o(e),n.svgElements,n.svg,t[a].label)},r.drawIcon=function(t,e,n,i,r,s){var a=.5*r,l=u.getSVGElement("rect",s.svgElements,s.svg);l.setAttributeNS(null,"x",e),l.setAttributeNS(null,"y",n-a),l.setAttributeNS(null,"width",i),l.setAttributeNS(null,"height",2*a),l.setAttributeNS(null,"class","vis-outline"),u.drawPoint(e+.5*i,n,o(t),s.svgElements,s.svg)},t.exports=r},function(t,e,n){function i(t,e){}var r=n(87);i.calcPath=function(t,e){if(null!=t&&t.length>0){var n=[];return n=1==e.options.interpolation.enabled?i._catmullRom(t,e):i._linear(t)}},i.drawIcon=function(t,e,n,i,o,s){var a,l,u=.5*o,c=r.getSVGElement("rect",s.svgElements,s.svg);if(c.setAttributeNS(null,"x",e),c.setAttributeNS(null,"y",n-u),c.setAttributeNS(null,"width",i),c.setAttributeNS(null,"height",2*u),c.setAttributeNS(null,"class","vis-outline"),a=r.getSVGElement("path",s.svgElements,s.svg),a.setAttributeNS(null,"class",t.className),void 0!==t.style&&a.setAttributeNS(null,"style",t.style),a.setAttributeNS(null,"d","M"+e+","+n+" L"+(e+i)+","+n),1==t.options.shaded.enabled&&(l=r.getSVGElement("path",s.svgElements,s.svg),"top"==t.options.shaded.orientation?l.setAttributeNS(null,"d","M"+e+", "+(n-u)+"L"+e+","+n+" L"+(e+i)+","+n+" L"+(e+i)+","+(n-u)):l.setAttributeNS(null,"d","M"+e+","+n+" L"+e+","+(n+u)+" L"+(e+i)+","+(n+u)+"L"+(e+i)+","+n),l.setAttributeNS(null,"class",t.className+" vis-icon-fill"),void 0!==t.options.shaded.style&&""!==t.options.shaded.style&&l.setAttributeNS(null,"style",t.options.shaded.style)),1==t.options.drawPoints.enabled){var d={style:t.options.drawPoints.style,styles:t.options.drawPoints.styles,size:t.options.drawPoints.size,className:t.className};r.drawPoint(e+.5*i,n,d,s.svgElements,s.svg)}},i.drawShading=function(t,e,n,i){if(1==e.options.shaded.enabled){var o=Number(i.svg.style.height.replace("px","")),s=r.getSVGElement("path",i.svgElements,i.svg),a="L";1==e.options.interpolation.enabled&&(a="C");var l,u=0;u="top"==e.options.shaded.orientation?0:"bottom"==e.options.shaded.orientation?o:Math.min(Math.max(0,e.zeroPosition),o),l="group"==e.options.shaded.orientation&&null!=n&&void 0!=n?"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" L"+n[n.length-1][0]+","+n[n.length-1][1]+" "+this.serializePath(n,a,!0)+n[0][0]+","+n[0][1]+" Z":"M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,a,!1)+" V"+u+" H"+t[0][0]+" Z",s.setAttributeNS(null,"class",e.className+" vis-fill"),void 0!==e.options.shaded.style&&s.setAttributeNS(null,"style",e.options.shaded.style),s.setAttributeNS(null,"d",l)}},i.draw=function(t,e,n){if(null!=t&&void 0!=t){var i=r.getSVGElement("path",n.svgElements,n.svg);i.setAttributeNS(null,"class",e.className),void 0!==e.style&&i.setAttributeNS(null,"style",e.style);var o="L";1==e.options.interpolation.enabled&&(o="C"),i.setAttributeNS(null,"d","M"+t[0][0]+","+t[0][1]+" "+this.serializePath(t,o,!1))}},i.serializePath=function(t,e,n){if(t.length<2)return"";var i=e;if(n)for(var r=t.length-2;r>0;r--)i+=t[r][0]+","+t[r][1]+" ";else for(var r=1;r<t.length;r++)i+=t[r][0]+","+t[r][1]+" ";return i},i._catmullRomUniform=function(t){var e,n,i,r,o,s,a=[];a.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var l=1/6,u=t.length,c=0;c<u-1;c++)e=0==c?t[0]:t[c-1],n=t[c],i=t[c+1],r=c+2<u?t[c+2]:i,o={screen_x:(-e.screen_x+6*n.screen_x+i.screen_x)*l,screen_y:(-e.screen_y+6*n.screen_y+i.screen_y)*l},s={screen_x:(n.screen_x+6*i.screen_x-r.screen_x)*l,screen_y:(n.screen_y+6*i.screen_y-r.screen_y)*l},a.push([o.screen_x,o.screen_y]),a.push([s.screen_x,s.screen_y]),a.push([i.screen_x,i.screen_y]);return a},i._catmullRom=function(t,e){var n=e.options.interpolation.alpha;if(0==n||void 0===n)return this._catmullRomUniform(t);var i,r,o,s,a,l,u,c,d,h,p,f,m,g,v,y,b,w,_,x=[];x.push([Math.round(t[0].screen_x),Math.round(t[0].screen_y)]);for(var k=t.length,C=0;C<k-1;C++)i=0==C?t[0]:t[C-1],r=t[C],o=t[C+1],s=C+2<k?t[C+2]:o,u=Math.sqrt(Math.pow(i.screen_x-r.screen_x,2)+Math.pow(i.screen_y-r.screen_y,2)),c=Math.sqrt(Math.pow(r.screen_x-o.screen_x,2)+Math.pow(r.screen_y-o.screen_y,2)),d=Math.sqrt(Math.pow(o.screen_x-s.screen_x,2)+Math.pow(o.screen_y-s.screen_y,2)),g=Math.pow(d,n),y=Math.pow(d,2*n),v=Math.pow(c,n),b=Math.pow(c,2*n),_=Math.pow(u,n),w=Math.pow(u,2*n),h=2*w+3*_*v+b,p=2*y+3*g*v+b,f=3*_*(_+v),f>0&&(f=1/f),m=3*g*(g+v),m>0&&(m=1/m),a={screen_x:(-b*i.screen_x+h*r.screen_x+w*o.screen_x)*f,screen_y:(-b*i.screen_y+h*r.screen_y+w*o.screen_y)*f},l={screen_x:(y*r.screen_x+p*o.screen_x-b*s.screen_x)*m,screen_y:(y*r.screen_y+p*o.screen_y-b*s.screen_y)*m},0==a.screen_x&&0==a.screen_y&&(a=r),0==l.screen_x&&0==l.screen_y&&(l=o),x.push([a.screen_x,a.screen_y]),x.push([l.screen_x,l.screen_y]),x.push([o.screen_x,o.screen_y]);return x},i._linear=function(t){for(var e=[],n=0;n<t.length;n++)e.push([t[n].screen_x,t[n].screen_y]);return e},t.exports=i},function(t,e,n){function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e,n,i){this.body=t,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:"top-left"},right:{visible:!0,position:"top-right"}},this.side=n,this.options=a.extend({},this.defaultOptions),this.linegraphOptions=i,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(e)}var o=n(58),s=i(o),a=n(1),l=n(87),u=n(108);r.prototype=new u,r.prototype.clear=function(){this.groups={},this.amountOfGroups=0},r.prototype.addGroup=function(t,e){1!=e.options.excludeFromLegend&&(this.groups.hasOwnProperty(t)||(this.groups[t]=e),this.amountOfGroups+=1)},r.prototype.updateGroup=function(t,e){this.groups[t]=e},r.prototype.removeGroup=function(t){this.groups.hasOwnProperty(t)&&(delete this.groups[t],this.amountOfGroups-=1)},r.prototype._create=function(){this.dom.frame=document.createElement("div"),this.dom.frame.className="vis-legend",this.dom.frame.style.position="absolute",this.dom.frame.style.top="10px",this.dom.frame.style.display="block",this.dom.textArea=document.createElement("div"),this.dom.textArea.className="vis-legend-text",this.dom.textArea.style.position="relative",this.dom.textArea.style.top="0px",this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.svg.style.position="absolute",this.svg.style.top="0px",this.svg.style.width=this.options.iconSize+5+"px",this.svg.style.height="100%",this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},r.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},r.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},r.prototype.setOptions=function(t){var e=["enabled","orientation","icons","left","right"];a.selectiveDeepExtend(e,this.options,t)},r.prototype.redraw=function(){var t=0,e=(0,s.default)(this.groups);e.sort(function(t,e){return t<e?-1:1});for(var n=0;n<e.length;n++){var i=e[n];1!=this.groups[i].visible||void 0!==this.linegraphOptions.visibility[i]&&1!=this.linegraphOptions.visibility[i]||t++}if(0==this.options[this.side].visible||0==this.amountOfGroups||0==this.options.enabled||0==t)this.hide();else{if(this.show(),"top-left"==this.options[this.side].position||"bottom-left"==this.options[this.side].position?(this.dom.frame.style.left="4px",this.dom.frame.style.textAlign="left",this.dom.textArea.style.textAlign="left",this.dom.textArea.style.left=this.options.iconSize+15+"px",this.dom.textArea.style.right="",this.svg.style.left="0px",this.svg.style.right=""):(this.dom.frame.style.right="4px",this.dom.frame.style.textAlign="right",this.dom.textArea.style.textAlign="right",this.dom.textArea.style.right=this.options.iconSize+15+"px",this.dom.textArea.style.left="",this.svg.style.right="0px",this.svg.style.left=""),"top-left"==this.options[this.side].position||"top-right"==this.options[this.side].position)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.bottom="";else{var r=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+r+Number(this.body.dom.center.style.top.replace("px",""))+"px",this.dom.frame.style.top=""}0==this.options.icons?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+"px",this.dom.textArea.style.right="",this.dom.textArea.style.left="",this.svg.style.width="0px"):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+"px",this.drawLegendIcons());for(var o="",n=0;n<e.length;n++){var i=e[n];1!=this.groups[i].visible||void 0!==this.linegraphOptions.visibility[i]&&1!=this.linegraphOptions.visibility[i]||(o+=this.groups[i].content+"<br />")}this.dom.textArea.innerHTML=o,this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+"px"}},r.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var t=(0,s.default)(this.groups);t.sort(function(t,e){return t<e?-1:1}),l.resetElements(this.svgElements);var e=window.getComputedStyle(this.dom.frame).paddingTop,n=Number(e.replace("px","")),i=n,r=this.options.iconSize,o=.75*this.options.iconSize,a=n+.5*o+3;this.svg.style.width=r+5+n+"px";for(var u=0;u<t.length;u++){var c=t[u];1!=this.groups[c].visible||void 0!==this.linegraphOptions.visibility[c]&&1!=this.linegraphOptions.visibility[c]||(this.groups[c].getLegend(r,o,this.framework,i,a),a+=o+this.options.iconSpacing)}}},t.exports=r},function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n="string",i="boolean",r="number",o="array",s="date",a="object",l="dom",u="moment",c="any",d={configure:{enabled:{boolean:i},filter:{boolean:i,function:"function"},container:{dom:l},__type__:{object:a,boolean:i,function:"function"}},yAxisOrientation:{string:["left","right"]},defaultGroup:{string:n},sort:{boolean:i},sampling:{boolean:i},stack:{boolean:i},graphHeight:{string:n,number:r},shaded:{enabled:{boolean:i},orientation:{string:["bottom","top","zero","group"]},groupId:{object:a},__type__:{boolean:i,object:a}},style:{string:["line","bar","points"]},barChart:{width:{number:r},minWidth:{number:r},sideBySide:{boolean:i},align:{string:["left","center","right"]},__type__:{object:a}},interpolation:{enabled:{boolean:i},parametrization:{string:["centripetal","chordal","uniform"]},alpha:{number:r},__type__:{object:a,boolean:i}},drawPoints:{enabled:{boolean:i},onRender:{function:"function"},size:{number:r},style:{string:["square","circle"]},__type__:{object:a,boolean:i,function:"function"}},dataAxis:{showMinorLabels:{boolean:i},showMajorLabels:{boolean:i},icons:{boolean:i},width:{string:n,number:r},visible:{boolean:i},alignZeros:{boolean:i},left:{range:{min:{number:r,undefined:"undefined"},max:{number:r,undefined:"undefined"},__type__:{object:a}},format:{function:"function"},title:{text:{string:n,number:r,undefined:"undefined"},style:{string:n,undefined:"undefined"},__type__:{object:a}},__type__:{object:a}},right:{range:{min:{number:r,undefined:"undefined"},max:{number:r,undefined:"undefined"},__type__:{object:a}},format:{function:"function"},title:{text:{string:n,number:r,undefined:"undefined"},style:{string:n,undefined:"undefined"},__type__:{object:a}},__type__:{object:a}},__type__:{object:a}},legend:{enabled:{boolean:i},icons:{boolean:i},left:{visible:{boolean:i},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:a}},right:{visible:{boolean:i},position:{string:["top-right","bottom-right","top-left","bottom-left"]},__type__:{object:a}},__type__:{object:a,boolean:i}},groups:{visibility:{any:c},__type__:{object:a}},autoResize:{boolean:i},throttleRedraw:{number:r},clickToUse:{boolean:i},end:{number:r,date:s,string:n,moment:u},format:{minorLabels:{millisecond:{string:n,undefined:"undefined"},second:{string:n,undefined:"undefined"},minute:{string:n,undefined:"undefined"},hour:{string:n,undefined:"undefined"},weekday:{string:n,undefined:"undefined"},day:{string:n,undefined:"undefined"},month:{string:n,undefined:"undefined"},year:{string:n,undefined:"undefined"},__type__:{object:a}},majorLabels:{millisecond:{string:n,undefined:"undefined"},second:{string:n,undefined:"undefined"},minute:{string:n,undefined:"undefined"},hour:{string:n,undefined:"undefined"},weekday:{string:n,undefined:"undefined"},day:{string:n,undefined:"undefined"},month:{string:n,undefined:"undefined"},year:{string:n,undefined:"undefined"},__type__:{object:a}},__type__:{object:a}},moment:{function:"function"},height:{string:n,number:r},hiddenDates:{start:{date:s,number:r,string:n,moment:u},end:{date:s,number:r,string:n,moment:u},repeat:{string:n},__type__:{object:a,array:o}},locale:{string:n},locales:{__any__:{any:c},__type__:{object:a}},max:{date:s,number:r,string:n,moment:u},maxHeight:{number:r,string:n},maxMinorChars:{number:r},min:{date:s,number:r,string:n,moment:u},minHeight:{number:r,string:n},moveable:{boolean:i},multiselect:{boolean:i},orientation:{string:n},showCurrentTime:{boolean:i},showMajorLabels:{boolean:i},showMinorLabels:{boolean:i},start:{date:s,number:r,string:n,moment:u},timeAxis:{scale:{string:n,undefined:"undefined"},step:{number:r,undefined:"undefined"},__type__:{object:a}},width:{string:n,number:r},zoomable:{boolean:i},zoomKey:{string:["ctrlKey","altKey","metaKey",""]},zoomMax:{number:r},zoomMin:{number:r},zIndex:{number:r},__type__:{object:a}},h={global:{sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:["zero","top","bottom","group"]},style:["line","bar","points"],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:["left","center","right"]},interpolation:{enabled:!0,parametrization:["centripetal","chordal","uniform"]},drawPoints:{enabled:!0,size:[6,2,30,1],style:["square","circle"]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:"",
25
+ style:""}},right:{title:{text:"",style:""}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]},right:{visible:!0,position:["top-right","bottom-right","top-left","bottom-left"]}},autoResize:!0,clickToUse:!1,end:"",format:{minorLabels:{millisecond:"SSS",second:"s",minute:"HH:mm",hour:"HH:mm",weekday:"ddd D",day:"D",month:"MMM",year:"YYYY"},majorLabels:{millisecond:"HH:mm:ss",second:"D MMMM HH:mm",minute:"ddd D MMMM",hour:"ddd D MMMM",weekday:"MMMM YYYY",day:"MMMM YYYY",month:"YYYY",year:""}},height:"",locale:"",max:"",maxHeight:"",maxMinorChars:[7,0,20,1],min:"",minHeight:"",moveable:!0,orientation:["both","bottom","top"],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,start:"",width:"100%",zoomable:!0,zoomKey:["ctrlKey","altKey","metaKey",""],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};e.allOptions=d,e.configureOptions=h}])})},function(t,e){!function(t){"use strict";function e(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function n(t){return"string"!=typeof t&&(t=String(t)),t}function i(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return v.iterable&&(e[Symbol.iterator]=function(){return e}),e}function r(t){this.map={},t instanceof r?t.forEach(function(t,e){this.append(e,t)},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function o(t){return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function s(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function a(t){var e=new FileReader,n=s(e);return e.readAsArrayBuffer(t),n}function l(t){var e=new FileReader,n=s(e);return e.readAsText(t),n}function u(t){for(var e=new Uint8Array(t),n=new Array(e.length),i=0;i<e.length;i++)n[i]=String.fromCharCode(e[i]);return n.join("")}function c(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function d(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(v.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(v.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(v.arrayBuffer&&v.blob&&b(t))this._bodyArrayBuffer=c(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!v.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!w(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=c(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):v.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},v.blob&&(this.blob=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?o(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(a)}),this.text=function(){var t=o(this);if(t)return t;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(u(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},v.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function h(t){var e=t.toUpperCase();return _.indexOf(e)>-1?e:t}function p(t,e){e=e||{};var n=e.body;if(t instanceof p){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new r(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new r(e.headers)),this.method=h(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function f(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(r))}}),e}function m(t){var e=new r;return t.split(/\r?\n/).forEach(function(t){var n=t.split(":"),i=n.shift().trim();if(i){var r=n.join(":").trim();e.append(i,r)}}),e}function g(t,e){e||(e={}),this.type="default",this.status="status"in e?e.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new r(e.headers),this.url=e.url||"",this._initBody(t)}if(!t.fetch){var v={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(v.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(t){return t&&DataView.prototype.isPrototypeOf(t)},w=ArrayBuffer.isView||function(t){return t&&y.indexOf(Object.prototype.toString.call(t))>-1};r.prototype.append=function(t,i){t=e(t),i=n(i);var r=this.map[t];this.map[t]=r?r+","+i:i},r.prototype.delete=function(t){delete this.map[e(t)]},r.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},r.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},r.prototype.set=function(t,i){this.map[e(t)]=n(i)},r.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},r.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),i(t)},r.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),i(t)},r.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),i(t)},v.iterable&&(r.prototype[Symbol.iterator]=r.prototype.entries);var _=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this,{body:this._bodyInit})},d.call(p.prototype),d.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},g.error=function(){var t=new g(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];g.redirect=function(t,e){if(x.indexOf(e)===-1)throw new RangeError("Invalid status code");return new g(null,{status:e,headers:{location:t}})},t.Headers=r,t.Request=p,t.Response=g,t.fetch=function(t,e){return new Promise(function(n,i){var r=new p(t,e),o=new XMLHttpRequest;o.onload=function(){var t={status:o.status,statusText:o.statusText,headers:m(o.getAllResponseHeaders()||"")};t.url="responseURL"in o?o.responseURL:t.headers.get("X-Request-URL");var e="response"in o?o.response:o.responseText;n(new g(e,t))},o.onerror=function(){i(new TypeError("Network request failed"))},o.ontimeout=function(){i(new TypeError("Network request failed"))},o.open(r.method,r.url,!0),"include"===r.credentials&&(o.withCredentials=!0),"responseType"in o&&v.blob&&(o.responseType="blob"),r.headers.forEach(function(t,e){o.setRequestHeader(e,t)}),o.send("undefined"==typeof r._bodyInit?null:r._bodyInit)})},t.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(t,e,n,i){"use strict";var r=n(i),o=(n(1),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),s=function(t,e){var n=this;if(n.instancePool.length){var i=n.instancePool.pop();return n.call(i,t,e),i}return new n(t,e)},a=function(t,e,n){var i=this;if(i.instancePool.length){var r=i.instancePool.pop();return i.call(r,t,e,n),r}return new i(t,e,n)},l=function(t,e,n,i){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n,i),o}return new r(t,e,n,i)},u=function(t){var e=this;t instanceof e?void 0:r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=10,d=o,h=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||d,n.poolSize||(n.poolSize=c),n.release=u,n},p={addPoolingTo:h,oneArgumentPooler:o,twoArgumentPooler:s,threeArgumentPooler:a,fourArgumentPooler:l};t.exports=p}]));
26
+ //# sourceMappingURL=main.0ed973fd.js.map
Binary file
@@ -0,0 +1,39 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
7
+ <!--
8
+ Notice the use of %PUBLIC_URL% in the tag above.
9
+ It will be replaced with the URL of the `public` folder during the build.
10
+ Only files inside the `public` folder can be referenced from the HTML.
11
+
12
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
13
+ work correctly both with client-side routing and a non-root public URL.
14
+ Learn how to configure a non-root public URL by running `npm run build`.
15
+ -->
16
+ <title>SQL Probe</title>
17
+ </head>
18
+ <body>
19
+ <div id="root"></div>
20
+ <!--
21
+ This HTML file is a template.
22
+ If you open it directly in the browser, you will see an empty page.
23
+
24
+ You can add webfonts, meta tags, or analytics to this file.
25
+ The build step will place the bundled scripts into the <body> tag.
26
+
27
+ To begin the development, run `npm start`.
28
+ To create a production bundle, use `npm run build`.
29
+ -->
30
+ <script>
31
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
32
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
33
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
34
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
35
+ ga('create', 'UA-97616584-3', 'auto');
36
+ ga('send', 'pageview');
37
+ </script>
38
+ </body>
39
+ </html>
@@ -0,0 +1,27 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ html, body, #root, .App {
6
+ height: 100%;
7
+ width: 100%;
8
+ }
9
+
10
+ .App {
11
+ display: flex;
12
+ flex-direction: column;
13
+ }
14
+
15
+ .App-panelSplit {
16
+ height: 3px;
17
+ background: #CCC;
18
+ cursor: ns-resize;
19
+ position: relative;
20
+ overflow: hidden;
21
+ }
22
+
23
+ .App-panelDetails {
24
+ flex-grow: 1;
25
+ position: relative;
26
+ overflow: hidden;
27
+ }
@@ -0,0 +1,34 @@
1
+ import React, { Component } from 'react';
2
+ import './App.css';
3
+ import PanelSplit from './components/PanelSplit';
4
+ import PryEvents from './services/PryEvents';
5
+
6
+ export default class extends Component {
7
+ constructor(){
8
+ super();
9
+ this.state = {
10
+ selected: undefined,
11
+ visibleEvents: []
12
+ };
13
+ }
14
+
15
+ render() {
16
+ const { selected, visibleEvents } = this.state;
17
+ return (
18
+ <div className='App'>
19
+ <PanelSplit
20
+ a={height =>
21
+ <div>
22
+ TOP
23
+ </div>
24
+ }
25
+ b={
26
+ <div>
27
+ Bottom
28
+ </div>
29
+ }
30
+ />
31
+ </div>
32
+ )
33
+ }
34
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom';
3
+ import App from './App';
4
+
5
+ it('renders without crashing', () => {
6
+ const div = document.createElement('div');
7
+ ReactDOM.render(<App />, div);
8
+ });
@@ -0,0 +1,42 @@
1
+ .PanelSplit {
2
+ display: flex;
3
+ height: 100%;
4
+ width: 100%;
5
+ position: absolute;
6
+ }
7
+
8
+ .PanelSplit-resizer {
9
+ height: 2px;
10
+ background: #AAA;
11
+ cursor: ns-resize;
12
+ position: relative;
13
+ }
14
+
15
+ .PanelSplit-resizer::before {
16
+ content: '';
17
+ position: absolute;
18
+ top: -3px;
19
+ bottom: -3px;
20
+ right: -3px;
21
+ left: -3px;
22
+ z-index: 999;
23
+ background: rgba(255,255,255,0.1);
24
+ }
25
+
26
+ .PanelSplit-resizer--horizontal {
27
+ height: 100%;
28
+ width: 2px;
29
+ position: relative;
30
+ cursor: ew-resize;
31
+ }
32
+
33
+ .PanelSplit-a,
34
+ .PanelSplit-b {
35
+ overflow: hidden;
36
+ }
37
+
38
+ .PanelSplit-b {
39
+ flex-grow: 1;
40
+ position: relative;
41
+ overflow: hidden;
42
+ }
@@ -0,0 +1,54 @@
1
+ import React, { Component } from 'react';
2
+ import './PanelSplit.css';
3
+ import { DraggableCore } from 'react-draggable';
4
+
5
+ const renderPanel = (p, size) =>
6
+ typeof p === 'function' ? p(size) : p;
7
+
8
+ export default class extends Component {
9
+ constructor({ initialSize = 300 }){
10
+ super();
11
+ this.handleDragStart = this.handleDragStart.bind(this);
12
+ this.handleDrag = this.handleDrag.bind(this);
13
+ this.state = {
14
+ size: initialSize,
15
+ startDragPos: 0,
16
+ startDragSize: 0
17
+ };
18
+ }
19
+
20
+ get isVertical() { return this.props.orientation !== 'horizontal'; }
21
+ get flexDirection() { return this.isVertical ? 'column' : 'row' }
22
+ get sizeAttr() { return this.isVertical ? 'height' : 'width' }
23
+ get eventAttr() { return this.isVertical ? 'screenY' : 'screenX' }
24
+
25
+ handleDragStart({ [this.eventAttr]: pos }) {
26
+ this.setState({
27
+ startDragPos: pos,
28
+ startDragSize: this.state.size
29
+ })
30
+ }
31
+
32
+ handleDrag({ [this.eventAttr]: pos }) {
33
+ const { startDragSize, startDragPos } = this.state;
34
+ const size = startDragSize - startDragPos + pos;
35
+ this.setState({ size });
36
+ }
37
+
38
+ render() {
39
+ const { props: { a, b }, state: { size }, isVertical } = this;
40
+ return (
41
+ <div className='PanelSplit' style={{flexDirection: this.flexDirection}}>
42
+ <div className='PanelSplit-a' style={{ [this.sizeAttr]: size }}>
43
+ {renderPanel(a, size)}
44
+ </div>
45
+ <DraggableCore onStart={this.handleDragStart} onDrag={this.handleDrag}>
46
+ <div className={`PanelSplit-resizer ${isVertical ? '' : 'PanelSplit-resizer--horizontal'}`}></div>
47
+ </DraggableCore>
48
+ <div className='PanelSplit-b'>
49
+ {renderPanel(b, size)}
50
+ </div>
51
+ </div>
52
+ );
53
+ }
54
+ }
@@ -0,0 +1,24 @@
1
+ .flex {
2
+ display: flex;
3
+ flex-direction: column;
4
+ }
5
+
6
+ .flex.flex--row {
7
+ flex-direction: row;
8
+ }
9
+
10
+ .flex {
11
+ display: flex;
12
+ }
13
+
14
+ .flex-grow {
15
+ flex-grow: 1;
16
+ }
17
+
18
+ .flex-self-center {
19
+ align-self: center;
20
+ }
21
+
22
+ .flex-content-center {
23
+ align-items: center;
24
+ }