aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet.com/_autocomplete.scss139
-rw-r--r--web/cobrands/fixmystreet.com/_dashboard.scss213
-rw-r--r--web/cobrands/fixmystreet.com/base.scss3
-rw-r--r--web/cobrands/fixmystreet.com/dashboard.js142
-rw-r--r--web/cobrands/fixmystreet.com/fmsforcouncils.scss3
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js22
-rw-r--r--web/cobrands/sass/_base.scss17
-rw-r--r--web/vendor/accessible-autocomplete.min.js2
-rw-r--r--web/vendor/chart.min.js79
9 files changed, 614 insertions, 6 deletions
diff --git a/web/cobrands/fixmystreet.com/_autocomplete.scss b/web/cobrands/fixmystreet.com/_autocomplete.scss
new file mode 100644
index 000000000..deebc1803
--- /dev/null
+++ b/web/cobrands/fixmystreet.com/_autocomplete.scss
@@ -0,0 +1,139 @@
+.autocomplete__wrapper {
+ position: relative;
+}
+
+.autocomplete__hint,
+.autocomplete__input {
+ -webkit-appearance: none;
+ border: 2px solid;
+ border-radius: 0; /* Safari 10 on iOS adds implicit border rounding. */
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ margin-bottom: 0; /* BUG: Safari 10 on macOS seems to add an implicit margin. */
+ width: 100%;
+}
+
+.autocomplete__input {
+ background-color: transparent;
+ position: relative;
+}
+
+.autocomplete__hint {
+ color: #BFC1C3;
+ position: absolute;
+}
+
+.autocomplete__input--default{
+ padding: 4px;
+}
+
+.autocomplete__input--focused {
+ outline-offset: 0;
+ outline: 3px solid #ffbf47;
+}
+
+.autocomplete__input--show-all-values {
+ padding: 4px 34px 4px 4px;
+ cursor: pointer;
+}
+
+.autocomplete__dropdown-arrow-down{
+ z-index: -1;
+ display: inline-block;
+ position: absolute;
+ right: 8px;
+ width: 24px;
+ height: 24px;
+ top: 10px;
+}
+
+.autocomplete__menu {
+ background-color: #fff;
+ border: 2px solid #0B0C0C;
+ border-top: 0;
+ color: #34384B;
+ margin: 0;
+ max-height: 342px;
+ overflow-x: hidden;
+ padding: 0;
+ width: 100%;
+ width: calc(100% - 4px);
+}
+
+.autocomplete__menu--visible {
+ display: block;
+}
+
+.autocomplete__menu--hidden {
+ display: none;
+}
+
+.autocomplete__menu--overlay {
+ box-shadow: rgba(0, 0, 0, 0.256863) 0px 2px 6px;
+ left: 0;
+ position: absolute;
+ top: 100%;
+ z-index: 100;
+}
+
+.autocomplete__menu--inline {
+ position: relative;
+}
+
+.autocomplete__option {
+ border-bottom: solid #BFC1C3;
+ border-width: 1px 0;
+ cursor: pointer;
+ display: block;
+ position: relative;
+}
+
+.autocomplete__option > * {
+ pointer-events: none;
+}
+
+.autocomplete__option:first-of-type {
+ border-top-width: 0;
+}
+
+.autocomplete__option:last-of-type {
+ border-bottom-width: 0;
+}
+
+.autocomplete__option--odd {
+ background-color: #FAFAFA;
+}
+
+.autocomplete__option--focused,
+.autocomplete__option:hover {
+ background-color: #005EA5;
+ border-color: #005EA5;
+ color: white;
+ outline: none;
+}
+
+.autocomplete__option--no-results {
+ background-color: #FAFAFA;
+ color: #646b6f;
+ cursor: not-allowed;
+}
+
+/* mySociety changes below */
+
+.autocomplete__wrapper {
+ background-color: #fff; // Otherwise it has a yellow background
+}
+
+.autocomplete__hint {
+ padding: 0.5em; // Match base input padding
+}
+.autocomplete__option {
+ padding: 4px;
+ margin-bottom: 0; // Override base li margin
+ line-height: 1.25;
+}
+
+.js .js-autocomplete {
+ display: none;
+}
diff --git a/web/cobrands/fixmystreet.com/_dashboard.scss b/web/cobrands/fixmystreet.com/_dashboard.scss
new file mode 100644
index 000000000..aae8aa98b
--- /dev/null
+++ b/web/cobrands/fixmystreet.com/_dashboard.scss
@@ -0,0 +1,213 @@
+.dashboard-header {
+ background-color: $primary;
+ margin: 0 -1em;
+ padding: 1em;
+
+ @media (min-width: 48em) {
+ margin: -1em -1em 0 -1em;
+ padding: 2em;
+ }
+
+ h1 {
+ font-family: inherit;
+ font-weight: bold;
+ margin: 0;
+ }
+}
+
+.dashboard-row {
+ @include clearfix();
+ margin: 0 -1em;
+}
+
+.dashboard-item {
+ @include box-sizing(border-box);
+ padding: 1em;
+
+ @media (min-width: 48em) {
+ float: left;
+ padding: 2em;
+ }
+
+ h2 {
+ font-family: inherit;
+ margin-top: 0;
+ }
+}
+
+@media (min-width: 48em) {
+ .dashboard-item--12 {
+ width: 100%;
+ }
+
+ .dashboard-item--6 {
+ width: 50%;
+ }
+}
+
+.dashboard-subheading {
+ margin-top: 1em;
+ padding-bottom: 0.5em;
+ border-bottom: 1px solid #ddd;
+ margin-bottom: 1em;
+}
+
+.labelled-line-chart,
+.labelled-sparkline {
+ position: relative;
+ width: 100%;
+ line-height: 1.2em;
+
+ canvas {
+ width: 100% !important;
+ height: auto !important;
+ }
+
+ .label {
+ strong {
+ display: block;
+ font-size: 2em;
+ line-height: 1em;
+ margin-bottom: 0.1em;
+ font-weight: bold;
+ }
+ }
+}
+
+.labelled-line-chart {
+ @include box-sizing(border-box);
+
+ @media (min-width: 48em) {
+ padding-right: 20%;
+ }
+
+ .label {
+ float: left;
+ margin-right: 2em;
+ }
+}
+.js .labelled-line-chart .label {
+ @media (min-width: 48em) {
+ position: absolute;
+ margin-top: -1em;
+ margin-right: 0;
+ }
+}
+
+.labelled-sparkline {
+ .label {
+ strong {
+ margin-top: 0.3em;
+ }
+ }
+}
+
+.dashboard-sparklines {
+ margin: 0 -1em;
+
+ & > * {
+ @include box-sizing(border-box);
+ padding: 0 1em 1em 1em;
+ }
+
+ @media (min-width: 48em) {
+ @include clearfix();
+
+ & > * {
+ float: $left;
+ width: 33%;
+ }
+ }
+}
+
+.dashboard-search {
+ background-color: $primary;
+ margin: 0 -1em;
+ padding: 1em;
+
+ @include clearfix();
+
+ @media (min-width: 48em) {
+ margin: 0 -3em 0 0;
+ padding: 2em;
+ }
+
+ input[type="text"] {
+ margin-bottom: 0;
+ }
+
+ input[type="submit"] {
+ background: #000;
+ color: #fff;
+ text-transform: uppercase;
+ font-weight: bold;
+ font-family: inherit;
+ border-radius: 4px;
+ border: none;
+ }
+}
+
+.dashboard-search__input {
+ @include box-sizing(border-box);
+ width: 80%;
+ float: left;
+ padding-right: 1em;
+}
+
+.dashboard-search__submit {
+ width: 20%;
+ float: right;
+
+ input {
+ width: 100%;
+ font-size: 16px;
+ line-height: 18px;
+ padding: 10px 8px;
+ }
+}
+
+.dashboard-search #geolocate_link {
+ display: block;
+ color: inherit;
+
+ &:before {
+ content: "";
+ display: inline-block;
+ width: 16px;
+ height: 16px;
+ background: transparent url(/cobrands/fixmystreet/images/crosshairs.png) no-repeat 0 0;
+ background-size: 16px 16px;
+ margin-#{$right}: 0.5em;
+ vertical-align: -0.1em;
+
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
+ background-image: url(/cobrands/fixmystreet/images/crosshairs@2x.png);
+ }
+
+ @media all {
+ background-image: url(/cobrands/fixmystreet/images/crosshairs.svg), none;
+ }
+ }
+}
+
+.dashboard-ranking-table {
+ width: 100%;
+
+ td {
+ padding: 0.4em 0.8em;
+
+ &:last-child {
+ text-align: $right;
+ }
+ }
+
+ tbody tr:nth-child(odd) {
+ td {
+ background-color: mix($primary, #fff, 15%);
+ }
+ }
+
+ tfoot td {
+ font-weight: bold;
+ }
+}
diff --git a/web/cobrands/fixmystreet.com/base.scss b/web/cobrands/fixmystreet.com/base.scss
index 4f2a7b1de..c90b65c1a 100644
--- a/web/cobrands/fixmystreet.com/base.scss
+++ b/web/cobrands/fixmystreet.com/base.scss
@@ -258,3 +258,6 @@ $grid-breakpoint-sm: $mysoc-footer-breakpoint-sm;
margin-bottom: 0;
}
}
+
+@import "autocomplete";
+@import "dashboard";
diff --git a/web/cobrands/fixmystreet.com/dashboard.js b/web/cobrands/fixmystreet.com/dashboard.js
new file mode 100644
index 000000000..f436b8d18
--- /dev/null
+++ b/web/cobrands/fixmystreet.com/dashboard.js
@@ -0,0 +1,142 @@
+$(function(){
+
+ Chart.defaults.global.defaultFontSize = 16;
+
+ var setUpLabelsForChart = function(chart){
+ var $parent = $(chart.chart.canvas).parent();
+ var xGutterInPixels = 30;
+
+ var lasty = 0;
+ $.each(chart.config.data.datasets, function(datasetIndex, dataset){
+ var $label = $('.label[data-datasetIndex="' + datasetIndex + '"]', $parent);
+ var latestPoint = chart.getDatasetMeta(datasetIndex).data[ dataset.data.length - 1 ];
+ var y = latestPoint._model.y;
+ if (y < lasty) {
+ y = lasty;
+ }
+ $label.css({
+ top: y,
+ left: latestPoint._model.x + xGutterInPixels
+ });
+ lasty = y + $label.height() + 8;
+ });
+ };
+
+ // Returns an array `numberOfPoints` long, where the final item
+ // is `radius`, and all the other items are 0.
+ var pointRadiusFinalDot = function(numberOfPoints, radius){
+ var pointRadius = [];
+ for (var i=1; i < numberOfPoints; i++) {
+ pointRadius.push(0);
+ }
+ pointRadius.push(radius);
+ return pointRadius;
+ };
+
+ var makeSparkline = function makeSparkline($el, valuesStr, color, title){
+ var values = [];
+ var labels = [];
+ $.each(valuesStr.split(' '), function(key, value){
+ values.push(Number(value));
+ labels.push('');
+ });
+ var spread = Math.max.apply(null, values) - Math.min.apply(null, values);
+
+ return new Chart($el, {
+ type: 'line',
+ data: {
+ labels: labels,
+ datasets: [{
+ data: values,
+ pointRadius: pointRadiusFinalDot(values.length, 4),
+ pointBackgroundColor: color,
+ borderColor: color,
+ lineTension: 0
+ }]
+ },
+ options: {
+ layout: {
+ padding: {
+ top: 0,
+ right: 5,
+ bottom: 0,
+ left: 2
+ }
+ },
+ scales: {
+ xAxes: [{
+ type: "category",
+ display: false
+ }],
+ yAxes: [{
+ type: "linear",
+ display: false,
+ ticks: {
+ min: Math.min.apply(null, values) - (spread * 0.3),
+ max: Math.max.apply(null, values) + (spread * 0.3)
+ }
+ }]
+ }
+ }
+ });
+ };
+
+ $('.labelled-sparkline canvas').each(function(){
+ makeSparkline(
+ $(this),
+ $(this).data('values'),
+ $(this).data('color')
+ );
+ });
+
+ var $allReports = $('#chart-all-reports'),
+ labels = $allReports.data('labels'),
+ data0 = $allReports.data('values-reports'),
+ data1 = $allReports.data('values-fixed');
+ window.chartAllReports = new Chart($allReports, {
+ type: 'line',
+ data: {
+ labels: labels,
+ datasets: [{
+ data: data0,
+ pointRadius: pointRadiusFinalDot(data0.length, 4),
+ pointBackgroundColor: '#F4A140',
+ borderColor: '#F4A140'
+ }, {
+ data: data1,
+ pointRadius: pointRadiusFinalDot(data1.length, 4),
+ pointBackgroundColor: '#62B356',
+ borderColor: '#62B356'
+ }]
+ },
+ options: {
+ animation: {
+ onComplete: function(){
+ setUpLabelsForChart(this);
+ }
+ },
+ layout: {
+ padding: {
+ top: 4
+ }
+ },
+ scales: {
+ xAxes: [{
+ type: 'category',
+ gridLines: {
+ display: false
+ }
+ }],
+ yAxes: [{
+ type: "linear",
+ ticks: {
+ display: false
+ }
+ }]
+ },
+ onResize: function(chart, size){
+ setUpLabelsForChart(chart);
+ }
+ }
+ });
+});
diff --git a/web/cobrands/fixmystreet.com/fmsforcouncils.scss b/web/cobrands/fixmystreet.com/fmsforcouncils.scss
index 6351b7b9c..bf156b73d 100644
--- a/web/cobrands/fixmystreet.com/fmsforcouncils.scss
+++ b/web/cobrands/fixmystreet.com/fmsforcouncils.scss
@@ -805,6 +805,9 @@ $fms-pink: #E65376;
top: 3px;
font-size: 0.75em;
color: $fms-pink;
+ &.required--optional {
+ color: #777;
+ }
}
.council-order__screenshot {
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index bc1d7d9a0..f1dda5f91 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -379,17 +379,29 @@ $.extend(fixmystreet.set_up, {
});
},
+ autocomplete: function() {
+ $('.js-autocomplete').each(function() {
+ accessibleAutocomplete.enhanceSelectElement({
+ selectElement: this,
+ displayMenu: 'overlay',
+ required: true,
+ // showAllValues: true, // Currently undismissable on iOS
+ defaultValue: ''
+ });
+ });
+ },
+
report_geolocation: function() {
if (!geo_position_js.init()) {
return;
}
- if ($('#postcodeForm').length) {
- var link = '<a href="LINK" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
- $('form[action="/alert/list"]').append(link.replace('LINK','/alert/list'));
+ if ($('.js-geolocate').length) {
+ var link = $('.js-geolocate').attr('action');
+ link = '<a href="' + link + '" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
if ($('body.frontpage').length) {
- $('#postcodeForm').after(link.replace('LINK','/around'));
+ $('.js-geolocate').after(link);
} else{
- $('#postcodeForm').append(link.replace('LINK','/around'));
+ $('.js-geolocate').append(link);
}
fixmystreet.geolocate.setup(function(pos) {
var latitude = pos.coords.latitude;
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index cd7199df2..a261c3b0a 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -294,6 +294,21 @@ select.form-control {
}
}
+.form-group {
+ position: relative;
+ max-width: 27em;
+}
+
+.required-text {
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+.required-text--optional {
+ color: #666;
+}
+
.form-section-heading {
font-family: inherit;
color: inherit;
@@ -385,7 +400,7 @@ select.form-control {
}
.form-txt-submit-box {
- min-height:3em;
+ @include clearfix();
input[type=password],
input[type=text],
input[type=email] {
diff --git a/web/vendor/accessible-autocomplete.min.js b/web/vendor/accessible-autocomplete.min.js
new file mode 100644
index 000000000..9eafe639f
--- /dev/null
+++ b/web/vendor/accessible-autocomplete.min.js
@@ -0,0 +1,2 @@
+!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.accessibleAutocomplete=t():e.accessibleAutocomplete=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=1)}([function(e,t,n){!function(){"use strict";function t(){}function n(e,n){var o,r,l,i,u=T;for(i=arguments.length;i-- >2;)D.push(arguments[i]);for(n&&null!=n.children&&(D.length||D.push(n.children),delete n.children);D.length;)if((r=D.pop())&&void 0!==r.pop)for(i=r.length;i--;)D.push(r[i]);else!0!==r&&!1!==r||(r=null),(l="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(l=!1)),l&&o?u[u.length-1]+=r:u===T?u=[r]:u.push(r),o=l;var s=new t;return s.nodeName=e,s.children=u,s.attributes=null==n?void 0:n,s.key=null==n?void 0:n.key,void 0!==A.vnode&&A.vnode(s),s}function o(e,t){for(var n in t)e[n]=t[n];return e}function r(e,t){return n(e.nodeName,o(o({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function l(e){!e.__d&&(e.__d=!0)&&1==V.push(e)&&(A.debounceRendering||setTimeout)(i)}function i(){var e,t=V;for(V=[];e=t.pop();)e.__d&&N(e)}function u(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&s(e,t.nodeName):n||e._componentConstructor===t.nodeName}function s(e,t){return e.__n===t||e.nodeName.toLowerCase()===t.toLowerCase()}function a(e){var t=o({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function p(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.__n=e,n}function c(e){e.parentNode&&e.parentNode.removeChild(e)}function d(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var l in n)l in o||(e.style[l]="");for(var l in o)e.style[l]="number"==typeof o[l]&&!1===L.test(l)?o[l]+"px":o[l]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var i=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,h,i):e.removeEventListener(t,h,i),(e.__l||(e.__l={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e)f(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var u=r&&t!==(t=t.replace(/^xlink\:?/,""));null==o||!1===o?u?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(u?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function f(e,t,n){try{e[t]=n}catch(e){}}function h(e){return this.__l[e.type](A.event&&A.event(e)||e)}function m(){for(var e;e=j.pop();)A.afterMount&&A.afterMount(e),e.componentDidMount&&e.componentDidMount()}function _(e,t,n,o,r,l){P++||(q=null!=r&&void 0!==r.ownerSVGElement,B=null!=e&&!("__preactattr_"in e));var i=v(e,t,n,o,l);return r&&i.parentNode!==r&&r.appendChild(i),--P||(B=!1,l||m()),i}function v(e,t,n,o,r){var l=e,i=q;if(null==t&&(t=""),"string"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(l=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(l,e),b(e,!0))),l.__preactattr_=!0,l;if("function"==typeof t.nodeName)return I(e,t,n,o);if(q="svg"===t.nodeName||"foreignObject"!==t.nodeName&&q,(!e||!s(e,String(t.nodeName)))&&(l=p(String(t.nodeName),q),e)){for(;e.firstChild;)l.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(l,e),b(e,!0)}var u=l.firstChild,a=l.__preactattr_||(l.__preactattr_={}),c=t.children;return!B&&c&&1===c.length&&"string"==typeof c[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=c[0]&&(u.nodeValue=c[0]):(c&&c.length||null!=u)&&y(l,c,n,o,B||null!=a.dangerouslySetInnerHTML),O(l,t.attributes,a),q=i,l}function y(e,t,n,o,r){var l,i,s,a,p=e.childNodes,d=[],f={},h=0,m=0,_=p.length,y=0,g=t?t.length:0;if(0!==_)for(var O=0;O<_;O++){var w=p[O],C=w.__preactattr_,E=g&&C?w._component?w._component.__k:C.key:null;null!=E?(h++,f[E]=w):(C||(void 0!==w.splitText?!r||w.nodeValue.trim():r))&&(d[y++]=w)}if(0!==g)for(var O=0;O<g;O++){s=t[O],a=null;var E=s.key;if(null!=E)h&&void 0!==f[E]&&(a=f[E],f[E]=void 0,h--);else if(!a&&m<y)for(l=m;l<y;l++)if(void 0!==d[l]&&u(i=d[l],s,r)){a=i,d[l]=void 0,l===y-1&&y--,l===m&&m++;break}(a=v(a,s,n,o))&&a!==e&&(O>=_?e.appendChild(a):a!==p[O]&&(a===p[O+1]?c(p[O]):e.insertBefore(a,p[O]||null)))}if(h)for(var O in f)void 0!==f[O]&&b(f[O],!1);for(;m<=y;)void 0!==(a=d[y--])&&b(a,!1)}function b(e,t){var n=e._component;n?k(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||c(e),g(e))}function g(e){for(e=e.lastChild;e;){var t=e.previousSibling;b(e,!0),e=t}}function O(e,t,n){var o;for(o in n)t&&null!=t[o]||null==n[o]||d(e,o,n[o],n[o]=void 0,q);for(o in t)"children"===o||"innerHTML"===o||o in n&&t[o]===("value"===o||"checked"===o?e[o]:n[o])||d(e,o,n[o],n[o]=t[o],q)}function w(e){var t=e.constructor.name;(U[t]||(U[t]=[])).push(e)}function C(e,t,n){var o,r=U[e.name];if(e.prototype&&e.prototype.render?(o=new e(t,n),M.call(o,t,n)):(o=new M(t,n),o.constructor=e,o.render=E),r)for(var l=r.length;l--;)if(r[l].constructor===e){o.__b=r[l].__b,r.splice(l,1);break}return o}function E(e,t,n){return this.constructor(e,n)}function x(e,t,n,o,r){e.__x||(e.__x=!0,(e.__r=t.ref)&&delete t.ref,(e.__k=t.key)&&delete t.key,!e.base||r?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,o),o&&o!==e.context&&(e.__c||(e.__c=e.context),e.context=o),e.__p||(e.__p=e.props),e.props=t,e.__x=!1,0!==n&&(1!==n&&!1===A.syncComponentUpdates&&e.base?l(e):N(e,1,r)),e.__r&&e.__r(e))}function N(e,t,n,r){if(!e.__x){var l,i,u,s=e.props,p=e.state,c=e.context,d=e.__p||s,f=e.__s||p,h=e.__c||c,v=e.base,y=e.__b,g=v||y,O=e._component,w=!1;if(v&&(e.props=d,e.state=f,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(s,p,c)?w=!0:e.componentWillUpdate&&e.componentWillUpdate(s,p,c),e.props=s,e.state=p,e.context=c),e.__p=e.__s=e.__c=e.__b=null,e.__d=!1,!w){l=e.render(s,p,c),e.getChildContext&&(c=o(o({},c),e.getChildContext()));var E,I,M=l&&l.nodeName;if("function"==typeof M){var S=a(l);i=O,i&&i.constructor===M&&S.key==i.__k?x(i,S,1,c,!1):(E=i,e._component=i=C(M,S,c),i.__b=i.__b||y,i.__u=e,x(i,S,0,c,!1),N(i,1,n,!0)),I=i.base}else u=g,E=O,E&&(u=e._component=null),(g||1===t)&&(u&&(u._component=null),I=_(u,l,c,n||!v,g&&g.parentNode,!0));if(g&&I!==g&&i!==O){var D=g.parentNode;D&&I!==D&&(D.replaceChild(I,g),E||(g._component=null,b(g,!1)))}if(E&&k(E),e.base=I,I&&!r){for(var T=e,L=e;L=L.__u;)(T=L).base=I;I._component=T,I._componentConstructor=T.constructor}}if(!v||n?j.unshift(e):w||(m(),e.componentDidUpdate&&e.componentDidUpdate(d,f,h),A.afterUpdate&&A.afterUpdate(e)),null!=e.__h)for(;e.__h.length;)e.__h.pop().call(e);P||r||m()}}function I(e,t,n,o){for(var r=e&&e._component,l=r,i=e,u=r&&e._componentConstructor===t.nodeName,s=u,p=a(t);r&&!s&&(r=r.__u);)s=r.constructor===t.nodeName;return r&&s&&(!o||r._component)?(x(r,p,3,n,o),e=r.base):(l&&!u&&(k(l),e=i=null),r=C(t.nodeName,p,n),e&&!r.__b&&(r.__b=e,i=null),x(r,p,1,n,o),e=r.base,i&&e!==i&&(i._component=null,b(i,!1))),e}function k(e){A.beforeUnmount&&A.beforeUnmount(e);var t=e.base;e.__x=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?k(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.__b=t,c(t),w(e),g(t)),e.__r&&e.__r(null)}function M(e,t){this.__d=!0,this.context=t,this.props=e,this.state=this.state||{}}function S(e,t,n){return _(n,e,{},!1,t,!1)}var A={},D=[],T=[],L=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,V=[],j=[],P=0,q=!1,B=!1,U={};o(M.prototype,{setState:function(e,t){var n=this.state;this.__s||(this.__s=o({},n)),o(n,"function"==typeof e?e(n,this.props):e),t&&(this.__h=this.__h||[]).push(t),l(this)},forceUpdate:function(e){e&&(this.__h=this.__h||[]).push(e),N(this,2)},render:function(){}});var R={h:n,createElement:n,cloneElement:r,Component:M,render:S,rerender:i,options:A};e.exports=R}()},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";function o(e){if(!e.element)throw new Error("element is not defined");if(!e.id)throw new Error("id is not defined");if(!e.source)throw new Error("source is not defined");Array.isArray(e.source)&&(e.source=s(e.source)),(0,l.render)((0,l.createElement)(u.default,e),e.element)}var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l=n(0),i=n(3),u=function(e){return e&&e.__esModule?e:{default:e}}(i),s=function(e){return function(t,n){n(e.filter(function(e){return-1!==e.toLowerCase().indexOf(t.toLowerCase())}))}};o.enhanceSelectElement=function(e){if(!e.selectElement)throw new Error("selectElement is not defined");if(!e.source){var t=[].filter.call(e.selectElement.options,function(t){return t.value||e.preserveNullOptions});e.source=t.map(function(e){return e.textContent||e.innerText})}if(e.onConfirm=e.onConfirm||function(t){var n=[].filter.call(e.selectElement.options,function(e){return(e.textContent||e.innerText)===t})[0];n&&(n.selected=!0)},e.selectElement.value||void 0===e.defaultValue){var n=e.selectElement.options[e.selectElement.options.selectedIndex];e.defaultValue=n.textContent||n.innerText}void 0===e.name&&(e.name=""),void 0===e.id&&(void 0===e.selectElement.id?e.id="":e.id=e.selectElement.id),void 0===e.autoselect&&(e.autoselect=!0);var l=document.createElement("span");e.selectElement.parentNode.insertBefore(l,e.selectElement),o(r({},e,{element:l})),e.selectElement.style.display="none",e.selectElement.id=e.selectElement.id+"-select"},e.exports=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){}function l(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){"function"!=typeof t&&null!==t||(e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t))}function u(){return!(!navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||!navigator.userAgent.match(/AppleWebKit/g))}function s(e){return e>47&&e<58||32===e||8===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223}function a(e){return y?{onInput:e}:b?{onChange:e}:void 0}t.__esModule=!0,t.default=void 0;var p,c,d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},f=n(0),h=n(4),m=o(h),_=n(5),v=o(_),y=!0,b=!1,g={13:"enter",27:"escape",32:"space",38:"up",40:"down"},O=function(){var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),w=(c=p=function(e){function t(n){r(this,t);var o=l(this,e.call(this,n));return o.elementReferences={},o.state={focused:null,hovered:null,menuOpen:!1,options:n.defaultValue?[n.defaultValue]:[],query:n.defaultValue,selected:null},o.handleComponentBlur=o.handleComponentBlur.bind(o),o.handleKeyDown=o.handleKeyDown.bind(o),o.handleUpArrow=o.handleUpArrow.bind(o),o.handleDownArrow=o.handleDownArrow.bind(o),o.handleEnter=o.handleEnter.bind(o),o.handlePrintableKey=o.handlePrintableKey.bind(o),o.handleOptionBlur=o.handleOptionBlur.bind(o),o.handleOptionClick=o.handleOptionClick.bind(o),o.handleOptionFocus=o.handleOptionFocus.bind(o),o.handleOptionMouseDown=o.handleOptionMouseDown.bind(o),o.handleOptionMouseEnter=o.handleOptionMouseEnter.bind(o),o.handleOptionMouseOut=o.handleOptionMouseOut.bind(o),o.handleOptionTouchEnd=o.handleOptionTouchEnd.bind(o),o.handleInputBlur=o.handleInputBlur.bind(o),o.handleInputChange=o.handleInputChange.bind(o),o.handleInputFocus=o.handleInputFocus.bind(o),o.pollInputElement=o.pollInputElement.bind(o),o.getDirectInputChanges=o.getDirectInputChanges.bind(o),o}return i(t,e),t.prototype.componentDidMount=function(){this.pollInputElement()},t.prototype.componentWillUnmount=function(){clearTimeout(this.$pollInput)},t.prototype.pollInputElement=function(){var e=this;this.getDirectInputChanges(),this.$pollInput=setTimeout(function(){e.pollInputElement()},100)},t.prototype.getDirectInputChanges=function(){var e=this.elementReferences[-1];e.value!==this.state.query&&this.handleInputChange({target:{value:e.value}})},t.prototype.componentDidUpdate=function(e,t){var n=this.state.focused,o=null===n,r=t.focused!==n;r&&!o&&this.elementReferences[n].focus();var l=-1===n,i=r&&null===t.focused;if(l&&i){var u=this.elementReferences[n];u.setSelectionRange(0,u.value.length)}},t.prototype.hasAutoselect=function(){return!u()&&this.props.autoselect},t.prototype.templateInputValue=function(e){var t=this.props.templates&&this.props.templates.inputValue;return t?t(e):e},t.prototype.templateSuggestion=function(e){var t=this.props.templates&&this.props.templates.suggestion;return t?t(e):e},t.prototype.handleComponentBlur=function(e){var t=this.state,n=t.options,o=t.query,r=t.selected,l=void 0;this.props.confirmOnBlur?(l=e.query||o,this.props.onConfirm(n[r])):l=o,this.setState({focused:null,menuOpen:e.menuOpen||!1,query:l,selected:null})},t.prototype.handleOptionBlur=function(e,t){var n=this.state,o=n.focused,r=n.menuOpen,l=n.options,i=n.selected,s=null===e.relatedTarget,a=e.relatedTarget===this.elementReferences[-1],p=o!==t&&-1!==o;if(s||!p&&!a){var c=r&&u();this.handleComponentBlur({menuOpen:c,query:this.templateInputValue(l[i])})}},t.prototype.handleInputBlur=function(e){var t=this.state,n=t.focused,o=t.menuOpen,r=t.options,l=t.query,i=t.selected;if(-1===n){var s=o&&u(),a=u()?l:this.templateInputValue(r[i]);this.handleComponentBlur({menuOpen:s,query:a})}},t.prototype.handleInputChange=function(e){var t=this,n=this.props,o=n.minLength,r=n.source,l=n.showAllValues,i=this.hasAutoselect(),u=e.target.value,s=0===u.length,a=this.state.query.length!==u.length,p=u.length>=o;this.setState({query:u}),l||!s&&a&&p?r(u,function(e){var n=e.length>0;t.setState({menuOpen:n,options:e,selected:i&&n?0:-1})}):!s&&p||this.setState({menuOpen:!1,options:[]})},t.prototype.handleInputClick=function(e){this.handleInputChange(e)},t.prototype.handleInputFocus=function(e){this.setState({focused:-1})},t.prototype.handleOptionFocus=function(e){this.setState({focused:e,hovered:null,selected:e})},t.prototype.handleOptionMouseEnter=function(e,t){this.setState({hovered:t})},t.prototype.handleOptionMouseOut=function(e,t){this.setState({hovered:null})},t.prototype.handleOptionTouchEnd=function(e,t){this.handleOptionClick(e,t)},t.prototype.handleOptionClick=function(e,t){var n=this.state.options[t],o=this.templateInputValue(n);this.props.onConfirm(n),this.setState({focused:-1,menuOpen:!1,query:o,selected:-1})},t.prototype.handleOptionMouseDown=function(e){e.preventDefault()},t.prototype.handleUpArrow=function(e){e.preventDefault();var t=this.state,n=t.menuOpen,o=t.selected;-1!==o&&n&&this.handleOptionFocus(o-1)},t.prototype.handleDownArrow=function(e){var t=this;if(e.preventDefault(),this.props.showAllValues&&!1===this.state.menuOpen)e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e,selected:0,focused:0,hovered:null})});else if(!0===this.state.menuOpen){var n=this.state,o=n.menuOpen,r=n.options,l=n.selected,i=l!==r.length-1,u=i&&o;u&&this.handleOptionFocus(l+1)}},t.prototype.handleSpace=function(e){var t=this;this.props.showAllValues&&!1===this.state.menuOpen&&(e.preventDefault(),this.props.source("",function(e){t.setState({menuOpen:!0,options:e})}))},t.prototype.handleEnter=function(e){this.state.menuOpen&&(e.preventDefault(),this.state.selected>=0&&this.handleOptionClick(e,this.state.selected))},t.prototype.handlePrintableKey=function(e){var t=this.elementReferences[-1];e.target===t||t.focus()},t.prototype.handleKeyDown=function(e){switch(g[e.keyCode]){case"up":this.handleUpArrow(e);break;case"down":this.handleDownArrow(e);break;case"space":this.handleSpace(e);break;case"enter":this.handleEnter(e);break;case"escape":this.handleComponentBlur({query:this.state.query});break;default:s(e.keyCode)&&this.handlePrintableKey(e)}},t.prototype.render=function(){var e=this,t=this.props,n=t.cssNamespace,o=t.displayMenu,r=t.id,l=t.minLength,i=t.name,u=t.placeholder,s=t.required,p=t.showAllValues,c=this.state,h=c.focused,_=c.hovered,y=c.menuOpen,b=c.options,g=c.query,w=c.selected,C=this.hasAutoselect(),E=-1===h,x=0===b.length,N=0!==g.length,I=g.length>=l,k=this.props.showNoOptionsFound&&E&&x&&N&&I,M=n+"__wrapper",S=n+"__input",A=null!==h,D=A?" "+S+"--focused":"",T=this.props.showAllValues?" "+S+"--show-all-values":" "+S+"--default",L=n+"__dropdown-arrow-down",V=-1!==h&&null!==h,j=n+"__menu",P=j+"--"+o,q=y||k,B=j+"--"+(q?"visible":"hidden"),U=n+"__option",R=n+"__hint",F=this.templateInputValue(b[w]),W=F&&0===F.toLowerCase().indexOf(g.toLowerCase()),K=W&&C?g+F.substr(g.length):"",H=O&&K;return(0,f.createElement)("div",{className:M,onKeyDown:this.handleKeyDown},(0,f.createElement)(m.default,{length:b.length,queryLength:g.length,minQueryLength:l,selectedOption:this.templateInputValue(b[w])}),H&&(0,f.createElement)("span",null,(0,f.createElement)("input",{className:R,readonly:!0,tabIndex:"-1",value:K})),(0,f.createElement)("input",d({"aria-activedescendant":!!V&&r+"__option--"+h,"aria-expanded":y,"aria-owns":r+"__listbox",autoComplete:"off",className:""+S+D+T,id:r,onClick:function(t){return e.handleInputClick(t)},onBlur:this.handleInputBlur},a(this.handleInputChange),{onFocus:this.handleInputFocus,name:i,placeholder:u,ref:function(t){e.elementReferences[-1]=t},role:"combobox",type:"text",required:s,value:g})),p&&(0,f.createElement)(v.default,{className:L}),(0,f.createElement)("ul",{className:j+" "+P+" "+B,id:r+"__listbox",role:"listbox"},b.map(function(t,n){var o=-1===h?w===n:h===n,l=o&&null===_?" "+U+"--focused":"",i=n%2?" "+U+"--odd":"";return(0,f.createElement)("li",{"aria-selected":h===n,className:""+U+l+i,dangerouslySetInnerHTML:{__html:e.templateSuggestion(t)},id:r+"__option--"+n,key:n,onBlur:function(t){return e.handleOptionBlur(t,n)},onClick:function(t){return e.handleOptionClick(t,n)},onMouseDown:e.handleOptionMouseDown,onMouseEnter:function(t){return e.handleOptionMouseEnter(t,n)},onMouseOut:function(t){return e.handleOptionMouseOut(t,n)},onTouchEnd:function(t){return e.handleOptionTouchEnd(t,n)},ref:function(t){e.elementReferences[n]=t},role:"option",tabIndex:"-1"})}),k&&(0,f.createElement)("li",{className:U+" "+U+"--no-results"},"No results found")))},t}(f.Component),p.defaultProps={autoselect:!1,cssNamespace:"autocomplete",defaultValue:"",displayMenu:"inline",minLength:0,name:"input-autocomplete",placeholder:"",onConfirm:function(){},confirmOnBlur:!0,showNoOptionsFound:!0,showAllValues:!1,required:!1},c);t.default=w},function(e,t,n){"use strict";function o(e,t){}function r(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){"function"!=typeof t&&null!==t||(e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t))}t.__esModule=!0,t.default=void 0;var i=n(0),u=function(e){function t(){var n,l,i;o(this,t);for(var u=arguments.length,s=Array(u),a=0;a<u;a++)s[a]=arguments[a];return n=l=r(this,e.call.apply(e,[this].concat(s))),l.state={bump:!1},i=n,r(l,i)}return l(t,e),t.prototype.componentWillReceiveProps=function(e){e.queryLength!==this.props.queryLength&&this.setState(function(e){return{bump:!e.bump}})},t.prototype.render=function(){var e=this.props,t=e.length,n=e.queryLength,o=e.minQueryLength,r=e.selectedOption,l=this.state.bump,u={result:1===t?"result":"results",is:1===t?"is":"are"},s=n<o,a=0===t,p=r?(0,i.createElement)("span",null,r," (1 of ",t,") is selected."):null,c=null;return c=s?(0,i.createElement)("span",null,"Type in ",o," or more characters for results."):a?(0,i.createElement)("span",null,"No search results."):(0,i.createElement)("span",null,t," ",u.result," ",u.is," available. ",p),(0,i.createElement)("div",{"aria-atomic":"true","aria-live":"polite",role:"status",style:{border:"0",clip:"rect(0 0 0 0)",height:"1px",marginBottom:"-1px",marginRight:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}},c,(0,i.createElement)("span",null,l?",":",,"))},t}(i.Component);t.default=u},function(e,t,n){"use strict";function o(e,t){}function r(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){"function"!=typeof t&&null!==t||(e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t))}t.__esModule=!0,t.default=void 0;var i=n(0),u=function(e){function t(){return o(this,t),r(this,e.apply(this,arguments))}return l(t,e),t.prototype.render=function(){return(0,i.createElement)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:this.props.className},(0,i.createElement)("g",{stroke:"none",fill:"none","fill-rule":"evenodd"},(0,i.createElement)("polygon",{fill:"#000000",points:"0 0 22 0 11 17"})))},t}(i.Component);t.default=u}])});
+//# sourceMappingURL=accessible-autocomplete.min.js.map \ No newline at end of file
diff --git a/web/vendor/chart.min.js b/web/vendor/chart.min.js
new file mode 100644
index 000000000..899fbaf48
--- /dev/null
+++ b/web/vendor/chart.min.js
@@ -0,0 +1,79 @@
+Chart=function(){return function p(m,n,g){function l(a,c){if(!n[a]){if(!m[a]){var e="function"==typeof require&&require;if(!c&&e)return e(a,!0);if(f)return f(a,!0);e=Error("Cannot find module '"+a+"'");throw e.code="MODULE_NOT_FOUND",e;}e=n[a]={exports:{}};m[a][0].call(e.exports,function(e){var c=m[a][1][e];return l(c?c:e)},e,e.exports,p,m,n,g)}return n[a].exports}for(var f="function"==typeof require&&require,b=0;b<g.length;b++)l(g[b]);return l}({7:[function(p,m,n){n=p(28)();p(26)(n);p(40)(n);p(22)(n);
+p(25)(n);p(23)(n);p(24)(n);p(29)(n);p(32)(n);p(33)(n);p(31)(n);p(36)(n);p(37)(n);p(46)(n);p(44)(n);p(45)(n);p(18)(n);m.exports=n;window.Chart=n},{18:18,22:22,23:23,24:24,25:25,26:26,28:28,29:29,31:31,32:32,33:33,36:36,37:37,40:40,44:44,45:45,46:46}],18:[function(p,m,n){m.exports=function(g){var l=g.helpers;g.defaults.line={showLines:!0,spanGaps:!1,scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}};g.controllers.line=g.DatasetController.extend({datasetElementType:g.elements.Line,
+dataElementType:g.elements.Point,update:function(f){var b=this.getMeta(),a=b.dataset,c=b.data||[],e=this.chart.options,d=e.elements.line,k=this.getScaleForId(b.yAxisID),h=this.getDataset();if(b=l.getValueOrDefault(h.showLine,e.showLines))a._scale=k,a._datasetIndex=this.index,a._children=c,a._model={spanGaps:h.spanGaps?h.spanGaps:e.spanGaps,tension:l.getValueOrDefault(h.lineTension,d.tension),backgroundColor:h.backgroundColor||d.backgroundColor,borderWidth:h.borderWidth||d.borderWidth,borderColor:h.borderColor||
+d.borderColor,borderCapStyle:h.borderCapStyle||d.borderCapStyle,borderDash:h.borderDash||d.borderDash,borderDashOffset:h.borderDashOffset||d.borderDashOffset,borderJoinStyle:h.borderJoinStyle||d.borderJoinStyle,steppedLine:l.getValueOrDefault(h.steppedLine,d.stepped)},a.pivot();e=0;for(d=c.length;e<d;++e)this.updateElement(c[e],e,f);b&&0!==a._model.tension&&this.updateBezierControlPoints();e=0;for(d=c.length;e<d;++e)c[e].pivot()},updateElement:function(f,b,a){var c=this.getMeta(),e=this.getDataset(),
+d=this.index,k=e.data[b],h=this.getScaleForId(c.yAxisID),V=this.getScaleForId(c.xAxisID),g=this.chart.options.elements.point,q;q=V.getPixelForValue("object"===typeof k?k:NaN,b,d,1===(this.chart.data.labels||[]).length||1===e.data.length||this.chart.isCombo);a=a?h.getBasePixel():this.calculatePointY(k,b,d);f._xScale=V;f._yScale=h;f._datasetIndex=d;f._index=b;f._model={x:q,y:a,skip:isNaN(q)||isNaN(a),radius:l.getValueAtIndexOrDefault(e.pointRadius,b,g.radius),pointStyle:l.getValueAtIndexOrDefault(e.pointStyle,
+b,g.pointStyle),backgroundColor:e.pointBackgroundColor,borderColor:e.borderColor,borderWidth:e.pointBorderWidth,tension:c.dataset._model?c.dataset._model.tension:0,steppedLine:c.dataset._model?c.dataset._model.steppedLine:!1}},calculatePointY:function(f,b,a){b=this.getMeta();return this.getScaleForId(b.yAxisID).getPixelForValue(f)},updateBezierControlPoints:function(){var f=this.getMeta(),b=this.chart.chartArea,a=f.data||[],c,e,d,k;f.dataset._model.spanGaps&&(a=a.filter(function(a){return!a._model.skip}));
+c=0;for(e=a.length;c<e;++c)d=a[c],d=d._model,k=l.splineCurve(l.previousItem(a,c)._model,d,l.nextItem(a,c)._model,f.dataset._model.tension),d.controlPointPreviousX=k.previous.x,d.controlPointPreviousY=k.previous.y,d.controlPointNextX=k.next.x,d.controlPointNextY=k.next.y;if(this.chart.options.elements.line.capBezierPoints)for(c=0,e=a.length;c<e;++c)d=a[c]._model,d.controlPointPreviousX=Math.max(Math.min(d.controlPointPreviousX,b.right),b.left),d.controlPointPreviousY=Math.max(Math.min(d.controlPointPreviousY,
+b.bottom),b.top),d.controlPointNextX=Math.max(Math.min(d.controlPointNextX,b.right),b.left),d.controlPointNextY=Math.max(Math.min(d.controlPointNextY,b.bottom),b.top)},draw:function(){var f=this.chart,b=this.getMeta(),a=b.data||[],c=f.chartArea,e=a.length,d=0;g.canvasHelpers.clipArea(f.ctx,c);var k=this.getDataset();l.getValueOrDefault(k.showLine,f.options.showLines)&&b.dataset.draw();for(g.canvasHelpers.unclipArea(f.ctx);d<e;++d)a[d].draw(c)}})}},{}],22:[function(p,m,n){m.exports=function(g){var l=
+g.canvasHelpers={};l.drawPoint=function(f,b,a,c,e){isNaN(a)||0>=a||(f.beginPath(),f.arc(c,e,a,0,2*Math.PI),f.closePath(),f.fill(),f.stroke())};l.clipArea=function(f,b){f.save();f.beginPath();f.rect(b.left,b.top,b.right-b.left,b.bottom-b.top);f.clip()};l.unclipArea=function(f){f.restore()};l.lineTo=function(f,b,a,c){a.steppedLine?("after"===a.steppedLine?f.lineTo(b.x,a.y):f.lineTo(a.x,b.y),f.lineTo(a.x,a.y)):a.tension?f.bezierCurveTo(c?b.controlPointPreviousX:b.controlPointNextX,c?b.controlPointPreviousY:
+b.controlPointNextY,c?a.controlPointNextX:a.controlPointPreviousX,c?a.controlPointNextY:a.controlPointPreviousY,a.x,a.y):f.lineTo(a.x,a.y)};g.helpers.canvas=l}},{}],23:[function(p,m,n){m.exports=function(g){function l(e){e=e||{};var c=e.data=e.data||{};c.datasets=c.datasets||[];c.labels=c.labels||[];e.options=a.configMerge(g.defaults.global,g.defaults[e.type],e.options||{});return e}function f(a){var c=a.options;c.scale?a.scale.options=c.scale:c.scales&&c.scales.xAxes.concat(c.scales.yAxes).forEach(function(c){a.scales[c.id].options=
+c})}function b(a){return"top"===a||"bottom"===a}var a=g.helpers,c=g.platform;g.types={};g.instances={};g.controllers={};a.extend(g.prototype,{construct:function(e,d){var b=this;d=l(d);var h=c.acquireContext(e,d),f=h&&h.canvas,N=f&&f.height,q=f&&f.width;b.id=a.uid();b.ctx=h;b.canvas=f;b.config=d;b.width=q;b.height=N;b.aspectRatio=N?q/N:null;b.options=d.options;b._bufferedRender=!1;b.chart=b;b.controller=b;g.instances[b.id]=b;Object.defineProperty(b,"data",{get:function(){return b.config.data},set:function(a){b.config.data=
+a}});h&&f?(b.initialize(),b.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){a.retinaScale(this);this.bindEvents();this.resize(!0);this.ensureScalesHaveIDs();this.buildScales();return this},clear:function(){a.clear(this);return this},resize:function(c){var b=this.canvas,k=this.options.maintainAspectRatio&&this.aspectRatio||null,h=Math.floor(a.getMaximumWidth(b)),k=Math.floor(k?h/k:a.getMaximumHeight(b));if(this.width!==h||this.height!==
+k)if(b.width=this.width=h,b.height=this.height=k,b.style.width=h+"px",b.style.height=k+"px",a.retinaScale(this),!c){c={width:h,height:k};if(this.options.onResize)this.options.onResize(this,c);this.update(0)}},ensureScalesHaveIDs:function(){var c=this.options,b=c.scales||{},c=c.scale;a.each(b.xAxes,function(a,c){a.id=a.id||"x-axis-"+c});a.each(b.yAxes,function(a,c){a.id=a.id||"y-axis-"+c});c&&(c.id=c.id||"scale")},buildScales:function(){var c=this,d=c.options,k=c.scales={},h=[];d.scales&&(h=h.concat((d.scales.xAxes||
+[]).map(function(a){return{options:a,dtype:"category",dposition:"bottom"}}),(d.scales.yAxes||[]).map(function(a){return{options:a,dtype:"linear",dposition:"left"}})));d.scale&&h.push({options:d.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"});a.each(h,function(d){var h=d.options,f=a.getValueOrDefault(h.type,d.dtype);if(f=g.scaleService.getScaleConstructor(f))b(h.position)!==b(d.dposition)&&(h.position=d.dposition),h=new f({id:h.id,options:h,ctx:c.ctx,chart:c}),k[h.id]=h,d.isDefault&&
+(c.scale=h)});g.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var c=this,b=[],k=[];a.each(c.data.datasets,function(a,h){var f=c.getDatasetMeta(h);f.type||(f.type=a.type||c.config.type);b.push(f.type);if(f.controller)f.controller.updateIndex(h);else{var l=g.controllers[f.type];if(void 0===l)throw Error('"'+f.type+'" is not a chart type.');f.controller=new l(c,h);k.push(f.controller)}},c);if(1<b.length)for(var h=1;h<b.length;h++)if(b[h]!==b[h-1]){c.isCombo=!0;break}return k},
+update:function(c,b){var k=this;f(k);var h=k.buildOrUpdateControllers();a.each(k.data.datasets,function(a,c){k.getDatasetMeta(c).controller.buildOrUpdateElements()},k);k.updateLayout();a.each(h,function(a){a.reset()});k.updateDatasets();k._bufferedRender?k._bufferedRequest={lazy:b,duration:c}:k.render(c,b)},updateLayout:function(){g.layoutService.update(this,this.width,this.height)},updateDatasets:function(){for(var a=0,c=this.data.datasets.length;a<c;++a)this.updateDataset(a)},updateDataset:function(a){this.getDatasetMeta(a).controller.update()},
+render:function(c,b){var k=this.options.animation;this.draw();a.callback(k&&k.onComplete,[void 0],this);return this},draw:function(){var c=this;c.clear();c.transition();a.each(c.boxes,function(a){a.draw(c.chartArea)},c);c.scale&&c.scale.draw();c.drawDatasets()},transition:function(){for(var a=0,c=(this.data.datasets||[]).length;a<c;++a)this.isDatasetVisible(a)&&this.getDatasetMeta(a).controller.transition()},drawDatasets:function(){for(var a=(this.data.datasets||[]).length-1;0<=a;--a)this.isDatasetVisible(a)&&
+this.drawDataset(a)},drawDataset:function(a){this.getDatasetMeta(a).controller.draw()},getDatasetMeta:function(a){a=this.data.datasets[a];a._meta||(a._meta={});var c=a._meta[this.id];c||(c=a._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null});return c},getVisibleDatasetCount:function(){for(var a=0,c=0,b=this.data.datasets.length;c<b;++c)this.isDatasetVisible(c)&&a++;return a},isDatasetVisible:function(a){var c=this.getDatasetMeta(a);return"boolean"===
+typeof c.hidden?!c.hidden:!this.data.datasets[a].hidden},bindEvents:function(){var a=this,b=a._listeners={},k=function(){a.resize()};c.addEventListener(a,"resize",k);b.resize=k}});g.Controller=g}},{}],24:[function(p,m,n){m.exports=function(g){function l(c,e){c._chartjs?c._chartjs.listeners.push(e):(Object.defineProperty(c,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),a.forEach(function(a){var e="onData"+a.charAt(0).toUpperCase()+a.slice(1),h=c[a];Object.defineProperty(c,a,{configurable:!0,
+enumerable:!1,value:function(){var a=Array.prototype.slice.call(arguments),d=h.apply(this,a);b.each(c._chartjs.listeners,function(c){"function"===typeof c[e]&&c[e].apply(c,a)});return d}})}))}function f(c,b){var d=c._chartjs;if(d){var d=d.listeners,k=d.indexOf(b);-1!==k&&d.splice(k,1);0<d.length||(a.forEach(function(a){delete c[a]}),delete c._chartjs)}}var b=g.helpers,a=["push","pop","shift","splice","unshift"];g.DatasetController=function(a,b){this.initialize(a,b)};b.extend(g.DatasetController.prototype,
+{datasetElementType:null,dataElementType:null,initialize:function(a,b){this.chart=a;this.index=b;this.linkScales();this.addElements()},updateIndex:function(a){this.index=a},linkScales:function(){var a=this.getMeta(),b=this.getDataset();null===a.xAxisID&&(a.xAxisID=b.xAxisID||this.chart.options.scales.xAxes[0].id);null===a.yAxisID&&(a.yAxisID=b.yAxisID||this.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},
+getScaleForId:function(a){return this.chart.scales[a]},reset:function(){this.update(!0)},createMetaDataset:function(){var a=this.datasetElementType;return a&&new a({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(a){var b=this.dataElementType;return b&&new b({_chart:this.chart,_datasetIndex:this.index,_index:a})},addElements:function(){var a=this.getMeta(),b=this.getDataset().data||[],d=a.data,k;k=0;for(b=b.length;k<b;++k)d[k]=d[k]||this.createMetaData(k);a.dataset=a.dataset||
+this.createMetaDataset()},addElementAndReset:function(a){var b=this.createMetaData(a);this.getMeta().data.splice(a,0,b);this.updateElement(b,a,!0)},buildOrUpdateElements:function(){var a=this.getDataset(),a=a.data||(a.data=[]);this._data!==a&&(this._data&&f(this._data,this),l(a,this),this._data=a);this.resyncElements()},update:b.noop,transition:function(){for(var a=this.getMeta(),b=a.data||[],d=b.length,k=0;k<d;++k)b[k].transition();a.dataset&&a.dataset.transition()},draw:function(){var a=this.getMeta(),
+b=a.data||[],d=b.length,k=0;for(a.dataset&&a.dataset.draw();k<d;++k)b[k].draw()},resyncElements:function(){var a=this.getMeta(),b=this.getDataset().data,d=a.data.length,b=b.length;b<d?a.data.splice(b,d-b):b>d&&this.insertElements(d,b-d)},insertElements:function(a,b){for(var d=0;d<b;++d)this.addElementAndReset(a+d)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},
+onDataSplice:function(a,b){this.getMeta().data.splice(a,b);this.insertElements(a,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}});g.DatasetController.extend=b.inherits}},{}],25:[function(p,m,n){m.exports=function(g){var l=g.helpers;g.elements={};g.Element=function(f){l.extend(this,f);this.initialize.apply(this,arguments)};l.extend(g.Element.prototype,{initialize:function(){this.hidden=!1},pivot:function(){this._view||(this._view=l.clone(this._model));this._start=
+{};return this},transition:function(){this._view=this._model;this._start=null;return this},hasValue:function(){return l.isNumber(this._model.x)&&l.isNumber(this._model.y)}});g.Element.extend=l.inherits}},{}],26:[function(p,m,n){m.exports=function(g){function l(a,c,b){var d;"string"===typeof a?(d=parseInt(a,10),-1!==a.indexOf("%")&&(d=d/100*c.parentNode[b])):d=a;return d}function f(a,c,b){var d=document.defaultView,k=a.parentNode,h=d.getComputedStyle(a)[c];c=d.getComputedStyle(k)[c];var d=void 0!==
+h&&null!==h&&"none"!==h,f=void 0!==c&&null!==c&&"none"!==c,g=Number.POSITIVE_INFINITY;return d||f?Math.min(d?l(h,a,b):g,f?l(c,k,b):g):"none"}var b=g.helpers={};b.each=function(a,c,e,d){var k;if(b.isArray(a))if(k=a.length,d)for(d=k-1;0<=d;d--)c.call(e,a[d],d);else for(d=0;d<k;d++)c.call(e,a[d],d);else if("object"===typeof a){var h=Object.keys(a);k=h.length;for(d=0;d<k;d++)c.call(e,a[h[d]],h[d])}};b.clone=function(a){var c={};b.each(a,function(a,d){b.isArray(a)?c[d]=a.slice(0):c[d]="object"===typeof a&&
+null!==a?b.clone(a):a});return c};b.extend=function(a){for(var c=function(c,b){a[b]=c},e=1,d=arguments.length;e<d;e++)b.each(arguments[e],c);return a};b.configMerge=function(a){var c=b.clone(a);b.each(Array.prototype.slice.call(arguments,1),function(a){b.each(a,function(a,e){var h=c.hasOwnProperty(e),f=h?c[e]:{};"scales"===e?c[e]=b.scaleMerge(f,a):"scale"===e?c[e]=b.configMerge(f,g.scaleService.getScaleDefaults(a.type),a):!h||"object"!==typeof f||b.isArray(f)||null===f||"object"!==typeof a||b.isArray(a)?
+c[e]=a:c[e]=b.configMerge(f,a)})});return c};b.scaleMerge=function(a,c){var e=b.clone(a);b.each(c,function(a,c){"xAxes"===c||"yAxes"===c?e.hasOwnProperty(c)?b.each(a,function(a,d){var f=b.getValueOrDefault(a.type,"xAxes"===c?"category":"linear"),f=g.scaleService.getScaleDefaults(f);d>=e[c].length||!e[c][d].type?e[c].push(b.configMerge(f,a)):e[c][d]=a.type&&a.type!==e[c][d].type?b.configMerge(e[c][d],f,a):b.configMerge(e[c][d],a)}):(e[c]=[],b.each(a,function(a){var d=b.getValueOrDefault(a.type,"xAxes"===
+c?"category":"linear");e[c].push(b.configMerge(g.scaleService.getScaleDefaults(d),a))})):e.hasOwnProperty(c)&&"object"===typeof e[c]&&null!==e[c]&&"object"===typeof a?e[c]=b.configMerge(e[c],a):e[c]=a});return e};b.getValueAtIndexOrDefault=function(a,c,e){return void 0===a||null===a?e:b.isArray(a)?c<a.length?a[c]:e:a};b.getValueOrDefault=function(a,c){return void 0===a?c:a};b.indexOf=Array.prototype.indexOf?function(a,c){return a.indexOf(c)}:function(a,c){for(var b=0,d=a.length;b<d;++b)if(a[b]===
+c)return b;return-1};b.where=function(a,c){if(b.isArray(a)&&Array.prototype.filter)return a.filter(c);var e=[];b.each(a,function(a){c(a)&&e.push(a)});return e};b.findIndex=Array.prototype.findIndex?function(a,c,b){return a.findIndex(c,b)}:function(a,c,b){b=void 0===b?a:b;for(var d=0,k=a.length;d<k;++d)if(c.call(b,a[d],d,a))return d;return-1};b.findNextWhere=function(a,c,b){if(void 0===b||null===b)b=-1;for(b+=1;b<a.length;b++){var d=a[b];if(c(d))return d}};b.findPreviousWhere=function(a,c,b){if(void 0===
+b||null===b)b=a.length;for(--b;0<=b;b--){var d=a[b];if(c(d))return d}};b.inherits=function(a){var c=this,e=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return c.apply(this,arguments)},d=function(){this.constructor=e};d.prototype=c.prototype;e.prototype=new d;e.extend=b.inherits;a&&b.extend(e.prototype,a);e.__super__=c.prototype;return e};b.noop=function(){};b.uid=function(){var a=0;return function(){return a++}}();b.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)};b.almostEquals=
+function(a,c,b){return Math.abs(a-c)<b};b.almostWhole=function(a,c){var b=Math.round(a);return b-c<a&&b+c>a};b.max=function(a){return a.reduce(function(a,b){return isNaN(b)?a:Math.max(a,b)},Number.NEGATIVE_INFINITY)};b.min=function(a){return a.reduce(function(a,b){return isNaN(b)?a:Math.min(a,b)},Number.POSITIVE_INFINITY)};b.sign=Math.sign?function(a){return Math.sign(a)}:function(a){a=+a;return 0===a||isNaN(a)?a:0<a?1:-1};b.log10=Math.log10?function(a){return Math.log10(a)}:function(a){return Math.log(a)/
+Math.LN10};b.toRadians=function(a){return Math.PI/180*a};b.aliasPixel=function(a){return 0===a%2?0:.5};b.splineCurve=function(a,c,b,d){a=a.skip?c:a;b=b.skip?c:b;var k=Math.sqrt(Math.pow(c.x-a.x,2)+Math.pow(c.y-a.y,2)),f=Math.sqrt(Math.pow(b.x-c.x,2)+Math.pow(b.y-c.y,2)),g=k/(k+f),k=f/(k+f),g=isNaN(g)?0:g,k=isNaN(k)?0:k,g=d*g;d*=k;return{previous:{x:c.x-g*(b.x-a.x),y:c.y-g*(b.y-a.y)},next:{x:c.x+d*(b.x-a.x),y:c.y+d*(b.y-a.y)}}};b.nextItem=function(a,c,b){return b?c>=a.length-1?a[0]:a[c+1]:c>=a.length-
+1?a[a.length-1]:a[c+1]};b.previousItem=function(a,b,e){return e?0>=b?a[a.length-1]:a[b-1]:0>=b?a[0]:a[b-1]};b.niceNum=function(a,c){var e=Math.floor(b.log10(a)),d=a/Math.pow(10,e);return(c?1.5>d?1:3>d?2:7>d?5:10:1>=d?1:2>=d?2:5>=d?5:10)*Math.pow(10,e)};b.requestAnimFrame=function(){return"undefined"===typeof window?function(a){a()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,
+1E3/60)}}();b.addEvent=function(a,b,e){a.addEventListener?a.addEventListener(b,e):a.attachEvent?a.attachEvent("on"+b,e):a["on"+b]=e};b.getConstraintWidth=function(a){return f(a,"max-width","clientWidth")};b.getConstraintHeight=function(a){return f(a,"max-height","clientHeight")};b.getMaximumWidth=function(a){var c=a.parentNode,e=parseInt(b.getStyle(c,"padding-left"),10),d=parseInt(b.getStyle(c,"padding-right"),10),c=c.clientWidth-e-d;a=b.getConstraintWidth(a);return isNaN(a)?c:Math.min(c,a)};b.getMaximumHeight=
+function(a){var c=a.parentNode,e=parseInt(b.getStyle(c,"padding-top"),10),d=parseInt(b.getStyle(c,"padding-bottom"),10),c=c.clientHeight-e-d;a=b.getConstraintHeight(a);return isNaN(a)?c:Math.min(c,a)};b.getStyle=function(a,b){return a.currentStyle?a.currentStyle[b]:document.defaultView.getComputedStyle(a,null).getPropertyValue(b)};b.retinaScale=function(a){var b=a.currentDevicePixelRatio=window.devicePixelRatio||1;if(1!==b){var e=a.canvas,d=a.height,f=a.width;e.height=d*b;e.width=f*b;a.ctx.scale(b,
+b);e.style.height=d+"px";e.style.width=f+"px"}};b.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)};b.fontString=function(a,b,e){return b+" "+a+"px "+e};b.longestText=function(a,c,e,d){d=d||{};var f=d.data=d.data||{},h=d.garbageCollect=d.garbageCollect||[];d.font!==c&&(f=d.data={},h=d.garbageCollect=[],d.font=c);a.font=c;var g=0;b.each(e,function(c){void 0!==c&&null!==c&&!0!==b.isArray(c)?g=b.measureText(a,f,h,g,c):b.isArray(c)&&b.each(c,function(c){void 0===c||null===c||b.isArray(c)||(g=b.measureText(a,
+f,h,g,c))})});c=h.length/2;if(c>e.length){for(e=0;e<c;e++)delete f[h[e]];h.splice(0,c)}return g};b.measureText=function(a,b,e,d,f){var h=b[f];h||(h=b[f]=a.measureText(f).width,e.push(f));h>d&&(d=h);return d};b.numberOfLabelLines=function(a){var c=1;b.each(a,function(a){b.isArray(a)&&a.length>c&&(c=a.length)});return c};b.isArray=Array.isArray?function(a){return Array.isArray(a)}:function(a){return"[object Array]"===Object.prototype.toString.call(a)};b.arrayEquals=function(a,c){var e,d,f,h;if(!a||
+!c||a.length!==c.length)return!1;e=0;for(d=a.length;e<d;++e)if(f=a[e],h=c[e],f instanceof Array&&h instanceof Array){if(!b.arrayEquals(f,h))return!1}else if(f!==h)return!1;return!0};b.callback=function(a,b,e){a&&"function"===typeof a.call&&a.apply(e,b)};b.callCallback=b.callback}},{}],28:[function(p,m,n){m.exports=function(){var g=function(g,f){this.construct(g,f);return this};g.defaults={global:{maintainAspectRatio:!0,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
+defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{}}};return g.Chart=g}},{}],29:[function(p,m,n){m.exports=function(g){function l(a,c){return b.where(a,function(a){return a.position===c})}function f(a,b){a.forEach(function(a,b){a._tmpIndex_=b;return a});a.sort(function(a,d){var f=b?d:a,h=b?a:d;return f.weight===h.weight?f._tmpIndex_-h._tmpIndex_:f.weight-h.weight});a.forEach(function(a){delete a._tmpIndex_})}var b=g.helpers;g.layoutService={defaults:{},addBox:function(a,b){a.boxes||
+(a.boxes=[]);b.fullWidth=b.fullWidth||!1;b.position=b.position||"top";b.weight=b.weight||0;a.boxes.push(b)},removeBox:function(a,b){var e=a.boxes?a.boxes.indexOf(b):-1;-1!==e&&a.boxes.splice(e,1)},configure:function(a,b,e){a=["fullWidth","position","weight"];for(var d=a.length,f=0,h;f<d;++f)h=a[f],e.hasOwnProperty(h)&&(b[h]=e[h])},update:function(a,c,e){function d(a){var b,c=a.isHorizontal();c?(b=a.update(a.fullWidth?z:B,Q),D-=b.height):(b=a.update(R,J),B-=b.width);S.push({horizontal:c,minSize:b,
+box:a})}function k(a){var c=b.findNextWhere(S,function(b){return b.box===a});c&&(a.isHorizontal()?a.update(a.fullWidth?z:B,I/2,{left:Math.max(r,K),right:Math.max(y,L),top:0,bottom:0}):a.update(c.minSize.width,D))}function h(a){var c=b.findNextWhere(S,function(b){return b.box===a}),d={left:0,right:0,top:v,bottom:E};c&&a.update(c.minSize.width,D,d)}function g(a){a.isHorizontal()?(a.left=a.fullWidth?n:r,a.right=a.fullWidth?c-p:r+B,a.top=A,a.bottom=A+a.height,A=a.bottom):(a.left=F,a.right=F+a.width,a.top=
+v,a.bottom=v+D,F=a.right)}if(a){var m=a.options.layout,q=m?m.padding:null,n=0,p=0,t=m=0;isNaN(q)?(n=q.left||0,p=q.right||0,m=q.top||0,t=q.bottom||0):t=m=p=n=q;var q=l(a.boxes,"left"),w=l(a.boxes,"right"),x=l(a.boxes,"top"),u=l(a.boxes,"bottom"),M=l(a.boxes,"chartArea");f(q,!0);f(w,!1);f(x,!0);f(u,!1);var z=c-n-p,I=e-m-t,J=I/2,R=(c-z/2)/(q.length+w.length),Q=(e-J)/(x.length+u.length),B=z,D=I,S=[];b.each(q.concat(w,x,u),d);var K=0,L=0,T=0,U=0;b.each(x.concat(u),function(a){a.getPadding&&(a=a.getPadding(),
+K=Math.max(K,a.left),L=Math.max(L,a.right))});b.each(q.concat(w),function(a){a.getPadding&&(a=a.getPadding(),T=Math.max(T,a.top),U=Math.max(U,a.bottom))});var r=n,y=p,v=m,E=t;b.each(q.concat(w),k);b.each(q,function(a){r+=a.width});b.each(w,function(a){y+=a.width});b.each(x.concat(u),k);b.each(x,function(a){v+=a.height});b.each(u,function(a){E+=a.height});b.each(q.concat(w),h);r=n;y=p;v=m;E=t;b.each(q,function(a){r+=a.width});b.each(w,function(a){y+=a.width});b.each(x,function(a){v+=a.height});b.each(u,
+function(a){E+=a.height});var t=Math.max(K-r,0),r=r+t,y=y+Math.max(L-y,0),X=Math.max(T-v,0),v=v+X,E=E+Math.max(U-E,0),G=e-v-E,H=c-r-y;if(H!==B||G!==D)b.each(q,function(a){a.height=G}),b.each(w,function(a){a.height=G}),b.each(x,function(a){a.fullWidth||(a.width=H)}),b.each(u,function(a){a.fullWidth||(a.width=H)}),D=G,B=H;var F=n+t,A=m+X;b.each(q.concat(x),g);F+=B;A+=D;b.each(w,g);b.each(u,g);a.chartArea={left:r,top:v,right:r+B,bottom:v+D};b.each(M,function(b){b.left=a.chartArea.left;b.top=a.chartArea.top;
+b.right=a.chartArea.right;b.bottom=a.chartArea.bottom;b.update(B,D)})}}}}},{}],31:[function(p,m,n){m.exports=function(g){function l(a,c,e){return b.isArray(c)?b.longestText(a,e,c):a.measureText(c).width}function f(a){var c=g.defaults.global;a=c.defaultFontSize;var e=c.defaultFontStyle,c=c.defaultFontFamily;return{size:a,style:e,family:c,font:b.fontString(a,e,c)}}var b=g.helpers;g.defaults.scale={display:!0,position:"left",gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawOnChartArea:!0,
+drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},ticks:{minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:g.Ticks.formatters.values}};g.Scale=g.Element.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},
+update:function(a,c,e){this.maxWidth=a;this.maxHeight=c;this.margins=b.extend({left:0,right:0,top:0,bottom:0},e);this.longestTextCache=this.longestTextCache||{};this.setDimensions();this.determineDataLimits();this.buildTicks();this.convertTicksToLabels();this.calculateTickRotation();this.fit();return this.minSize},setDimensions:function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height);this.paddingBottom=
+this.paddingRight=this.paddingTop=this.paddingLeft=0},determineDataLimits:b.noop,buildTicks:b.noop,convertTicksToLabels:function(){var a=this.options.ticks;this.ticks=this.ticks.map(a.userCallback||a.callback)},calculateTickRotation:function(){var a=this.ctx,c=this.options.ticks,e=f(c);a.font=e.font;var d=c.minRotation||0;if(this.options.display&&this.isHorizontal())for(var k=a=b.longestText(a,e.font,this.ticks,this.longestTextCache),h,e=this.getPixelForTick(1)-this.getPixelForTick(0)-6;k>e&&d<c.maxRotation;){h=
+b.toRadians(d);k=Math.cos(h);h=Math.sin(h);if(h*a>this.maxHeight){d--;break}d++;k*=a}this.labelRotation=d},fit:function(){var a=this.minSize={width:0,height:0},c=this.options,e=c.ticks,d=c.gridLines,k=c.display,h=this.isHorizontal(),g=f(e),m=c.gridLines.tickMarkLength;a.width=h?this.isFullWidth()?this.maxWidth-this.margins.left-this.margins.right:this.maxWidth:k&&d.drawTicks?m:0;a.height=h?k&&d.drawTicks?m:0:this.maxHeight;e.display&&k&&(k=b.longestText(this.ctx,g.font,this.ticks,this.longestTextCache),
+m=b.numberOfLabelLines(this.ticks),d=.5*g.size,h?(this.longestLabelWidth=k,h=b.toRadians(this.labelRotation),e=Math.cos(h),a.height=Math.min(this.maxHeight,a.height+(Math.sin(h)*k+g.size*m+d*m)),this.ctx.font=g.font,h=l(this.ctx,this.ticks[0],g.font),g=l(this.ctx,this.ticks[this.ticks.length-1],g.font),0!==this.labelRotation?(this.paddingLeft="bottom"===c.position?e*h+3:e*d+3,this.paddingRight="bottom"===c.position?e*d+3:e*g+3):(this.paddingLeft=h/2+3,this.paddingRight=g/2+3)):(k=e.mirror?0:k+this.options.ticks.padding,
+a.width=Math.min(this.maxWidth,a.width+k),this.paddingTop=g.size/2,this.paddingBottom=g.size/2));this.handleMargins();this.width=a.width;this.height=a.height},handleMargins:function(){this.margins&&(this.paddingLeft=Math.max(this.paddingLeft-this.margins.left,0),this.paddingTop=Math.max(this.paddingTop-this.margins.top,0),this.paddingRight=Math.max(this.paddingRight-this.margins.right,0),this.paddingBottom=Math.max(this.paddingBottom-this.margins.bottom,0))},isHorizontal:function(){return"top"===
+this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(a){return null===a||"undefined"===typeof a||"number"===typeof a&&!isFinite(a)?NaN:"object"===typeof a?a instanceof Date||a.isValid?a:this.getRightValue(this.isHorizontal()?a.x:a.y):a},getPixelForValue:b.noop,getValueForPixel:b.noop,getPixelForTick:function(a,b){if(this.isHorizontal()){var e=(this.width-(this.paddingLeft+this.paddingRight))/Math.max(this.ticks.length-
+(this.options.gridLines.offsetGridLines?0:1),1),d=e*a+this.paddingLeft;b&&(d+=e/2);e=this.left+Math.round(d);return e+=this.isFullWidth()?this.margins.left:0}return this.top+(this.height-(this.paddingTop+this.paddingBottom))/(this.ticks.length-1)*a},getPixelForDecimal:function(a){return this.isHorizontal()?(a=this.left+Math.round((this.width-(this.paddingLeft+this.paddingRight))*a+this.paddingLeft),a+=this.isFullWidth()?this.margins.left:0):this.top+a*this.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},
+getBaseValue:function(){var a=this.min,b=this.max;return 0>a&&0>b?b:0<a&&0<b?a:0},draw:function(a){var c=this,e=c.options;if(e.display){var d=c.ctx,k=g.defaults.global,h=e.ticks,l=e.gridLines,m=0!==c.labelRotation,n,p=h.autoSkip,W=c.isHorizontal(),t;h.maxTicksLimit&&(t=h.maxTicksLimit);var w=b.getValueOrDefault(h.fontColor,k.defaultFontColor),x=f(h),u=l.drawTicks?l.tickMarkLength:0,M=b.toRadians(c.labelRotation),z=c.longestLabelWidth*Math.cos(M);d.fillStyle=w;var I=[];if(W){n=!1;(z+h.autoSkipPadding)*
+c.ticks.length>c.width-(c.paddingLeft+c.paddingRight)&&(n=1+Math.floor((z+h.autoSkipPadding)*c.ticks.length/(c.width-(c.paddingLeft+c.paddingRight))));if(t&&c.ticks.length>t)for(;!n||c.ticks.length/(n||1)>t;)n||(n=1),n+=1;p||(n=!1)}var J="right"===e.position?c.left:c.right-u,R="right"===e.position?c.left+u:c.right,Q="bottom"===e.position?c.top:c.bottom-u,B="bottom"===e.position?c.top+u:c.bottom;b.each(c.ticks,function(d,f){if(void 0!==d&&null!==d){var g=c.ticks.length===f+1;if((!(1<n&&0<f%n||0===
+f%n&&f+n>=c.ticks.length)||g)&&void 0!==d&&null!==d){var p,t,w;f===("undefined"!==typeof c.zeroLineIndex?c.zeroLineIndex:0)?(g=l.zeroLineWidth,p=l.zeroLineColor,t=l.zeroLineBorderDash,w=l.zeroLineBorderDashOffset):(g=b.getValueAtIndexOrDefault(l.lineWidth,f),p=b.getValueAtIndexOrDefault(l.color,f),t=b.getValueOrDefault(l.borderDash,k.borderDash),w=b.getValueOrDefault(l.borderDashOffset,k.borderDashOffset));var r,y,v,x,O,G,H,F,A,C,z,P="middle";W?("bottom"===e.position?(P=m?"middle":"top",z=m?"right":
+"center",C=c.top+u):(P=m?"middle":"bottom",z=m?"left":"center",C=c.bottom-u),r=c.getPixelForTick(f)+b.aliasPixel(g),A=c.getPixelForTick(f,l.offsetGridLines)+h.labelOffset,r=v=O=H=r,y=Q,x=B,G=a.top,F=a.bottom):(A="left"===e.position,C=h.padding,h.mirror?z=A?"left":"right":(z=A?"right":"left",C=u+C),A=A?c.right-C:c.left+C,y=c.getPixelForTick(f),y+=b.aliasPixel(g),C=c.getPixelForTick(f,l.offsetGridLines),r=J,v=R,O=a.left,H=a.right,y=x=G=F=y);I.push({tx1:r,ty1:y,tx2:v,ty2:x,x1:O,y1:G,x2:H,y2:F,labelX:A,
+labelY:C,glWidth:g,glColor:p,glBorderDash:t,glBorderDashOffset:w,rotation:-1*M,label:d,textBaseline:P,textAlign:z})}}});b.each(I,function(a){l.display&&(d.save(),d.lineWidth=a.glWidth,d.strokeStyle=a.glColor,d.setLineDash&&(d.setLineDash(a.glBorderDash),d.lineDashOffset=a.glBorderDashOffset),d.beginPath(),l.drawTicks&&(d.moveTo(a.tx1,a.ty1),d.lineTo(a.tx2,a.ty2)),l.drawOnChartArea&&(d.moveTo(a.x1,a.y1),d.lineTo(a.x2,a.y2)),d.stroke(),d.restore());if(h.display){d.save();d.translate(a.labelX,a.labelY);
+d.rotate(a.rotation);d.font=x.font;d.textBaseline=a.textBaseline;d.textAlign=a.textAlign;a=a.label;if(b.isArray(a))for(var c=0,e=0;c<a.length;++c)d.fillText(""+a[c],0,e),e+=1.5*x.size;else d.fillText(a,0,0);d.restore()}})}}})}},{}],32:[function(p,m,n){m.exports=function(g){var l=g.helpers;g.scaleService={constructors:{},defaults:{},registerScaleType:function(f,b,a){this.constructors[f]=b;this.defaults[f]=l.clone(a)},getScaleConstructor:function(f){return this.constructors.hasOwnProperty(f)?this.constructors[f]:
+void 0},getScaleDefaults:function(f){return this.defaults.hasOwnProperty(f)?l.scaleMerge(g.defaults.scale,this.defaults[f]):{}},updateScaleDefaults:function(f,b){var a=this.defaults;a.hasOwnProperty(f)&&(a[f]=l.extend(a[f],b))},addScalesToLayout:function(f){l.each(f.scales,function(b){b.fullWidth=b.options.fullWidth;b.position=b.options.position;b.weight=b.options.weight;g.layoutService.addBox(f,b)})}}}},{}],33:[function(p,m,n){m.exports=function(g){var l=g.helpers;g.Ticks={generators:{linear:function(f,
+b){var a=[],c;f.stepSize&&0<f.stepSize?c=f.stepSize:(c=l.niceNum(b.max-b.min,!1),c=l.niceNum(c/(f.maxTicks-1),!0));var e=Math.floor(b.min/c)*c,d=Math.ceil(b.max/c)*c;f.min&&f.max&&f.stepSize&&l.almostWhole((f.max-f.min)/f.stepSize,c/1E3)&&(e=f.min,d=f.max);var g=(d-e)/c,g=l.almostEquals(g,Math.round(g),c/1E3)?Math.round(g):Math.ceil(g);a.push(void 0!==f.min?f.min:e);for(var h=1;h<g;++h)a.push(e+h*c);a.push(void 0!==f.max?f.max:d);return a}},formatters:{values:function(f){return l.isArray(f)?f:""+
+f},linear:function(f,b,a){b=3<a.length?a[2]-a[1]:a[1]-a[0];1<Math.abs(b)&&f!==Math.floor(f)&&(b=f-Math.floor(f));b=l.log10(Math.abs(b));0!==f?(b=-1*Math.floor(b),b=Math.max(Math.min(b,20),0),f=f.toFixed(b)):f="0";return f}}}}},{}],36:[function(p,m,n){m.exports=function(g){var l=g.helpers,f=g.defaults.global;g.defaults.global.elements.line={tension:.4,backgroundColor:f.defaultColor,borderWidth:3,borderColor:f.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",
+capBezierPoints:!0};g.elements.Line=g.Element.extend({draw:function(){var b=this._view,a=this._chart.ctx,c=b.spanGaps,e=this._children.slice(),d=f.elements.line,g,h,m;this._loop&&e.length&&e.push(e[0]);a.save();a.lineCap=b.borderCapStyle||d.borderCapStyle;a.setLineDash&&a.setLineDash(b.borderDash||d.borderDash);a.lineDashOffset=b.borderDashOffset||d.borderDashOffset;a.lineJoin=b.borderJoinStyle||d.borderJoinStyle;a.lineWidth=b.borderWidth||d.borderWidth;a.strokeStyle=b.borderColor||f.defaultColor;
+a.beginPath();b=-1;for(d=0;d<e.length;++d)g=e[d],h=l.previousItem(e,d),m=g._view,0===d?m.skip||(a.moveTo(m.x,m.y),b=d):(h=-1===b?h:e[b],m.skip||(b!==d-1&&!c||-1===b?a.moveTo(m.x,m.y):l.canvas.lineTo(a,h._view,g._view),b=d));a.stroke();a.restore()}})}},{}],37:[function(p,m,n){m.exports=function(g){var l=g.helpers,f=g.defaults.global,b=f.defaultColor;f.elements.point={radius:3,pointStyle:"circle",backgroundColor:b,borderWidth:0,borderColor:b};g.elements.Point=g.Element.extend({getCenterPoint:function(){var a=
+this._view;return{x:a.x,y:a.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},draw:function(a){a=this._view;var c=this._chart.ctx,e=a.pointStyle,d=a.radius,k=a.x,h=a.y;a.skip||(c.strokeStyle=a.borderColor||b,c.lineWidth=l.getValueOrDefault(a.borderWidth,f.elements.point.borderWidth),c.fillStyle=a.backgroundColor||b,g.canvasHelpers.drawPoint(c,e,d,k,h))}})}},{}],39:[function(p,m,n){m.exports=function(g){function l(b,e){var d=a.getStyle(b,e);return(d=d&&d.match(/^(\d+)(\.\d+)?px$/))?
+Number(d[1]):void 0}function f(b){var e=document.createElement("iframe");e.className="chartjs-hidden-iframe";e.style.cssText="display:block;overflow:hidden;border:0;margin:0;top:0;left:0;bottom:0;right:0;height:100%;width:100%;position:absolute;pointer-events:none;z-index:-1;";e.tabIndex=-1;a.addEvent(e,"load",function(){a.addEvent(e.contentWindow||e,"resize",b);b()});return e}function b(b,e,d){var g=b._chartjs={ticking:!1};g.resizer=f(function(){g.ticking||(g.ticking=!0,a.requestAnimFrame.call(window,
+function(){if(g.resizer)return g.ticking=!1,e({type:"resize",chart:d,"native":null,x:null,y:null})}))});b.insertBefore(g.resizer,b.firstChild)}var a=g.helpers;return{acquireContext:function(a,b){"string"===typeof a?a=document.getElementById(a):a.length&&(a=a[0]);a&&a.canvas&&(a=a.canvas);var d=a&&a.getContext&&a.getContext("2d");if(d&&d.canvas===a){var f=a,g=f.style,m=f.getAttribute("height"),n=f.getAttribute("width");f._chartjs={initial:{height:m,width:n,style:{display:g.display,height:g.height,
+width:g.width}}};g.display=g.display||"block";if(null===n||""===n){var p=l(f,"width");void 0!==p&&(f.width=p)}if(null===m||""===m)""===f.style.height?f.height=f.width/(b.options.aspectRatio||2):(g=l(f,"height"),void 0!==p&&(f.height=g));return d}return null},addEventListener:function(a,e,d){var f=a.canvas;"resize"===e&&b(f.parentNode,d,a)}}}},{}],40:[function(p,m,n){var g=p(39);m.exports=function(l){l.platform=g(l)}},{39:39}],44:[function(p,m,n){m.exports=function(g){var l=g.helpers,f=g.Scale.extend({getLabels:function(){var b=
+this.chart.data;return(this.isHorizontal()?b.xLabels:b.yLabels)||b.labels},determineDataLimits:function(){var b=this.getLabels();this.minIndex=0;this.maxIndex=b.length-1;var a;void 0!==this.options.ticks.min&&(a=l.indexOf(b,this.options.ticks.min),this.minIndex=-1!==a?a:this.minIndex);void 0!==this.options.ticks.max&&(a=l.indexOf(b,this.options.ticks.max),this.maxIndex=-1!==a?a:this.maxIndex);this.min=b[this.minIndex];this.max=b[this.maxIndex]},buildTicks:function(){var b=this.getLabels();this.ticks=
+0===this.minIndex&&this.maxIndex===b.length-1?b:b.slice(this.minIndex,this.maxIndex+1)},getPixelForValue:function(b,a,c,e){c=Math.max(this.maxIndex+1-this.minIndex-(this.options.gridLines.offsetGridLines?0:1),1);var d;void 0!==b&&null!==b&&(d=this.isHorizontal()?b.x:b.y);if(void 0!==d||void 0!==b&&isNaN(a))b=this.getLabels().indexOf(d||b),a=-1!==b?b:a;if(this.isHorizontal()){b=this.width/c;a=b*(a-this.minIndex);if(this.options.gridLines.offsetGridLines&&e||this.maxIndex===this.minIndex&&e)a+=b/2;
+return this.left+Math.round(a)}b=this.height/c;a=b*(a-this.minIndex);this.options.gridLines.offsetGridLines&&e&&(a+=b/2);return this.top+Math.round(a)},getPixelForTick:function(b,a){return this.getPixelForValue(this.ticks[b],b+this.minIndex,null,a)},getValueForPixel:function(b){var a=Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1),c=this.isHorizontal(),a=(c?this.width:this.height)/a;b-=c?this.left:this.top;this.options.gridLines.offsetGridLines&&(b-=a/2);return 0>=b?0:Math.round(b/
+a)},getBasePixel:function(){return this.bottom}});g.scaleService.registerScaleType("category",f,{position:"bottom"})}},{}],45:[function(p,m,n){m.exports=function(g){var l=g.helpers,f={position:"left",ticks:{callback:g.Ticks.formatters.linear}},b=g.LinearScaleBase.extend({determineDataLimits:function(){var a=this,b=a.chart,e=b.data.datasets,d=a.isHorizontal();a.min=null;a.max=null;l.each(e,function(e,f){var g=b.getDatasetMeta(f);b.isDatasetVisible(f)&&(d?g.xAxisID===a.id:g.yAxisID===a.id)&&l.each(e.data,
+function(b,c){var d=+a.getRightValue(b);isNaN(d)||g.data[c].hidden||(null===a.min?a.min=d:d<a.min&&(a.min=d),null===a.max?a.max=d:d>a.max&&(a.max=d))})});a.min=isFinite(a.min)?a.min:0;a.max=isFinite(a.max)?a.max:1;this.handleTickRangeOptions()},getTickLimit:function(){var a;a=this.options.ticks;if(this.isHorizontal())a=Math.min(a.maxTicksLimit?a.maxTicksLimit:11,Math.ceil(this.width/50));else{var b=l.getValueOrDefault(a.fontSize,g.defaults.global.defaultFontSize);a=Math.min(a.maxTicksLimit?a.maxTicksLimit:
+11,Math.ceil(this.height/(2*b)))}return a},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getPixelForValue:function(a){var b=this.start;a=+this.getRightValue(a);var e=this.end-b;if(this.isHorizontal())return b=this.left+this.width/e*(a-b),Math.round(b);b=this.bottom-this.height/e*(a-b);return Math.round(b)},getValueForPixel:function(a){var b=this.isHorizontal();return this.start+(b?a-this.left:this.bottom-a)/(b?this.width:this.height)*(this.end-this.start)},getPixelForTick:function(a){return this.getPixelForValue(this.ticksAsNumbers[a])}});
+g.scaleService.registerScaleType("linear",b,f)}},{}],46:[function(p,m,n){m.exports=function(g){var l=g.helpers,f=l.noop;g.LinearScaleBase=g.Scale.extend({handleTickRangeOptions:function(){var b=this.options.ticks;void 0!==b.min?this.min=b.min:void 0!==b.suggestedMin&&(this.min=null===this.min?b.suggestedMin:Math.min(this.min,b.suggestedMin));void 0!==b.max?this.max=b.max:void 0!==b.suggestedMax&&(this.max=null===this.max?b.suggestedMax:Math.max(this.max,b.suggestedMax));this.min===this.max&&(this.max++,
+this.min--)},getTickLimit:f,handleDirectionalChanges:f,buildTicks:function(){var b=this.options.ticks,a=this.getTickLimit(),a=Math.max(2,a),a={maxTicks:a,min:b.min,max:b.max,stepSize:l.getValueOrDefault(b.fixedStepSize,b.stepSize)},a=this.ticks=g.Ticks.generators.linear(a,this);this.handleDirectionalChanges();this.max=l.max(a);this.min=l.min(a);b.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max)},convertTicksToLabels:function(){this.ticksAsNumbers=
+this.ticks.slice();this.zeroLineIndex=this.ticks.indexOf(0);g.Scale.prototype.convertTicksToLabels.call(this)}})}},{}]},{},[7])(7)}();