diff --git a/production/form.html b/production/form.html
index 6732892d..eb2fa457 100755
--- a/production/form.html
+++ b/production/form.html
@@ -1611,10 +1611,6 @@
rating: 4
});
- $('.starrr').on('click', function (e) {
- e.preventDefault();
- });
-
$('.stars').on('starrr:change', function (e, value) {
$('.stars-count').html(value);
});
diff --git a/vendors/Chart.js/.bower.json b/vendors/Chart.js/.bower.json
index b5cc30f7..24fe5947 100644
--- a/vendors/Chart.js/.bower.json
+++ b/vendors/Chart.js/.bower.json
@@ -1,23 +1,23 @@
{
"name": "Chart.js",
- "version": "2.0.2",
+ "version": "2.1.0",
"description": "Simple HTML5 Charts using the canvas element",
"homepage": "https://github.com/nnnick/Chart.js",
"author": "nnnick",
+ "license": "MIT",
"main": [
"dist/Chart.js"
],
"devDependencies": {
"jquery": "~2.1.4"
},
- "_release": "2.0.2",
+ "_release": "2.1.0",
"_resolution": {
"type": "version",
- "tag": "2.0.2",
- "commit": "67625063a3c1242ca13858aa629668007b5b8106"
+ "tag": "2.1.0",
+ "commit": "2ee37e12e379ca9b8ad3be7105715bf8c543ead0"
},
"_source": "https://github.com/nnnick/Chart.js.git",
"_target": "^2.0.2",
- "_originalSource": "Chart.js",
- "_direct": true
+ "_originalSource": "Chart.js"
}
\ No newline at end of file
diff --git a/vendors/Chart.js/.codeclimate.yml b/vendors/Chart.js/.codeclimate.yml
index 2d90af82..d865954a 100644
--- a/vendors/Chart.js/.codeclimate.yml
+++ b/vendors/Chart.js/.codeclimate.yml
@@ -1,4 +1,3 @@
----
engines:
duplication:
enabled: true
@@ -11,9 +10,9 @@ engines:
enabled: true
ratings:
paths:
- - "**.js"
+ - "src/**/*.js"
exclude_paths:
-- dist/
-- node_modules/
-- test/
-- coverage/
+- dist/**/*
+- node_modules/**/*
+- test/**/*
+- coverage/**/*
diff --git a/vendors/Chart.js/.travis.yml b/vendors/Chart.js/.travis.yml
index cdb70857..2e66dc7b 100644
--- a/vendors/Chart.js/.travis.yml
+++ b/vendors/Chart.js/.travis.yml
@@ -1,7 +1,6 @@
language: node_js
node_js:
- - "5.6"
- - "4.3"
+ - "5.10"
before_install:
- "export CHROME_BIN=/usr/bin/google-chrome"
diff --git a/vendors/Chart.js/CONTRIBUTING.md b/vendors/Chart.js/CONTRIBUTING.md
index beab22d0..0d026275 100644
--- a/vendors/Chart.js/CONTRIBUTING.md
+++ b/vendors/Chart.js/CONTRIBUTING.md
@@ -7,9 +7,9 @@ Contributions to Chart.js are welcome and encouraged, but please have a look thr
Using issues
------------
-The [issue tracker](https://github.com/nnnick/Chart.js/issues) is the preferred channel for reporting bugs, requesting new features and submitting pull requests.
+The [issue tracker](https://github.com/chartjs/Chart.js/issues) is the preferred channel for reporting bugs, requesting new features and submitting pull requests.
-If you're suggesting a new chart type, please take a look at [writing new chart types](https://github.com/nnnick/Chart.js/blob/master/docs/06-Advanced.md#writing-new-chart-types) in the documentation, and some of the [community extensions](https://github.com/nnnick/Chart.js/blob/master/docs/06-Advanced.md#community-extensions) that have been created already.
+If you're suggesting a new chart type, please take a look at [writing new chart types](https://github.com/chartjs/Chart.js/blob/master/docs/07-Advanced.md#writing-new-chart-types) in the documentation or consider [creating a plugin](https://github.com/chartjs/Chart.js/blob/master/docs/07-Advanced.md#creating-plugins).
To keep the library lightweight for everyone, it's unlikely we'll add many more chart types to the core of Chart.js, but issues are a good medium to design and spec out how new chart types could work and look.
@@ -41,21 +41,24 @@ Pull requests
Clear, concise pull requests are excellent at continuing the project's community driven growth. But please review [these guidelines](https://github.com/blog/1943-how-to-write-the-perfect-pull-request) and the guidelines below before starting work on the project.
-Guidlines:
+Be advised that **Chart.js 1.0.2 is in feature-complete status**. Pull requests adding new features to the 1.x branch will be disregarded.
+
+Guidelines:
- Please create an issue first:
- For bugs, we can discuss the fixing approach
- For enhancements, we can discuss if it is within the project scope and avoid duplicate effort
- - Please make changes to the files in [`/src`](https://github.com/nnnick/Chart.js/tree/master/src), not `Chart.js` or `Chart.min.js` in the repo root directory, this avoids merge conflicts
+ - Please make changes to the files in [`/src`](https://github.com/chartjs/Chart.js/tree/master/src), not `Chart.js` or `Chart.min.js` in the repo root directory, this avoids merge conflicts
- Tabs for indentation, not spaces please
- - If adding new functionality, please also update the relevant `.md` file in [`/docs`](https://github.com/nnnick/Chart.js/tree/master/docs)
+ - If adding new functionality, please also update the relevant `.md` file in [`/docs`](https://github.com/chartjs/Chart.js/tree/master/docs)
- Please make your commits in logical sections with clear commit messages
-Joining the Project
+Joining the project
-------------
- - Active committers and contributors are invited to introduce yourself and request commit access to this project. Please send an email to hello@nickdownie.com or file an issue.
+ - Active committers and contributors are invited to introduce yourself and request commit access to this project. Please send an email to hello@nickdownie.com or file an issue.
+ - We have a very active Slack community that you can join at https://chartjs-slack-automation.herokuapp.com. If you think you can help, we'd love to have you!
License
-------
-By contributing your code, you agree to license your contribution under the [MIT license](https://github.com/nnnick/Chart.js/blob/master/LICENSE.md).
+By contributing your code, you agree to license your contribution under the [MIT license](https://github.com/chartjs/Chart.js/blob/master/LICENSE.md).
diff --git a/vendors/Chart.js/LICENSE.md b/vendors/Chart.js/LICENSE.md
index e10bc0ff..dc93bcc3 100644
--- a/vendors/Chart.js/LICENSE.md
+++ b/vendors/Chart.js/LICENSE.md
@@ -1,4 +1,5 @@
-Copyright (c) 2013-2015 Nick Downie
+The MIT License (MIT)
+Copyright (c) 2013-2016 Nick Downie
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
diff --git a/vendors/Chart.js/README.md b/vendors/Chart.js/README.md
index f6341264..547a92f8 100644
--- a/vendors/Chart.js/README.md
+++ b/vendors/Chart.js/README.md
@@ -1,45 +1,36 @@
-# Chart.js
-
-[![Build Status](https://travis-ci.org/nnnick/Chart.js.svg?branch=v2.0-dev)](https://travis-ci.org/nnnick/Chart.js) [![Code Climate](https://codeclimate.com/github/nnnick/Chart.js/badges/gpa.svg)](https://codeclimate.com/github/nnnick/Chart.js)[![Coverage Status](https://coveralls.io/repos/nnnick/Chart.js/badge.svg?branch=v2.0-dev)](https://coveralls.io/r/nnnick/Chart.js?branch=v2.0-dev)
+# Chart.js
+[![Build Status](https://travis-ci.org/chartjs/Chart.js.svg?branch=master)](https://travis-ci.org/chartjs/Chart.js) [![Code Climate](https://codeclimate.com/github/nnnick/Chart.js/badges/gpa.svg)](https://codeclimate.com/github/nnnick/Chart.js) [![Coverage Status](https://coveralls.io/repos/github/chartjs/Chart.js/badge.svg?branch=master)](https://coveralls.io/github/chartjs/Chart.js?branch=master)
+[![Chart.js on Slack](https://img.shields.io/badge/slack-Chart.js-blue.svg)](https://chartjs-slack-automation.herokuapp.com/)
*Simple HTML5 Charts using the canvas element* [chartjs.org](http://www.chartjs.org)
-## v2.0 Beta
+## Installation
-Current Release: [2.0.0-beta2](https://github.com/nnnick/Chart.js/releases/tag/2.0.0-beta2)
+To download a zip, go to the Chart.js on Github
-The next generation and release of Chart.js has been well under way this year and we are very close to releasing some amazing new features including, but not limited to:
-- Rewritten, optimized, and unit-tested
-- New and improved scales (log, time, linear, category, multiple scales)
-- Improved responsiveness and resizing
-- Powerful support for adding, removing, changing, and updating data on the fly
-- Animations on all elements, colors and tooltips
-- Powerful customization when you need it. Automatic and dynamic when you don't.
-- Excellent support for modern frameworks and modular build systems.
-- Even more extensible via new element controllers, combo chart support, and hook system
-- Bug fixes not addressed in 1.x, and much, much more...
+To install via npm / bower:
-#####Contributing to 2.0
-Submit PR's to the v2.0-dev branch.
-
-#####Building and Testing
-`gulp build`, `gulp test`
-
-## v1.x Status: Feature Complete
-We are now treating v1.x as feature complete. PR's for bug fixes are welcome, but we urge any open PR's for v1.x features to be refactored and resubmitted for v2.x (if the feature has not already been implemented).
+```bash
+npm install chart.js --save
+bower install Chart.js --save
+```
+CDN: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.0.0/Chart.js
## Documentation
-You can find documentation at [chartjs.org/docs](http://www.chartjs.org/docs/). The markdown files that build the site are available under `/docs`. Please note - in some of the json examples of configuration you might notice some liquid tags - this is just for the generating the site html, please disregard.
+You can find documentation at [www.chartjs.org/docs](http://www.chartjs.org/docs). The markdown files that build the site are available under `/docs`. Previous version documentation is available at [www.chartjs.org/docs/#notes-previous-versions](http://www.chartjs.org/docs/#notes-previous-versions).
-## Bugs, issues and contributing
+## Contributing
-Before submitting an issue or a pull request to the project, please take a moment to look over the [contributing guidelines](https://github.com/nnnick/Chart.js/blob/master/CONTRIBUTING.md) first.
+Before submitting an issue or a pull request to the project, please take a moment to look over the [contributing guidelines](https://github.com/chartjs/Chart.js/blob/master/CONTRIBUTING.md) first.
For support using Chart.js, please post questions with the [`chartjs` tag on Stack Overflow](http://stackoverflow.com/questions/tagged/chartjs).
+## Building and Testing
+`gulp build`, `gulp test`
+
## License
Chart.js is available under the [MIT license](http://opensource.org/licenses/MIT).
diff --git a/vendors/Chart.js/bower.json b/vendors/Chart.js/bower.json
index 5e4c4da1..e1bb8c25 100644
--- a/vendors/Chart.js/bower.json
+++ b/vendors/Chart.js/bower.json
@@ -1,9 +1,10 @@
{
"name": "Chart.js",
- "version": "2.0.2",
+ "version": "2.1.0",
"description": "Simple HTML5 Charts using the canvas element",
"homepage": "https://github.com/nnnick/Chart.js",
"author": "nnnick",
+ "license": "MIT",
"main": [
"dist/Chart.js"
],
diff --git a/vendors/Chart.js/dist/Chart.bundle.js b/vendors/Chart.js/dist/Chart.bundle.js
index 20447e4f..68d4b054 100644
--- a/vendors/Chart.js/dist/Chart.bundle.js
+++ b/vendors/Chart.js/dist/Chart.bundle.js
@@ -1,3 +1,12 @@
+/*!
+ * Chart.js
+ * http://chartjs.org/
+ * Version: 2.0.2
+ *
+ * Copyright 2016 Nick Downie
+ * Released under the MIT license
+ * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
+ */
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0 ? posDS.data[index] : 0;
}
}
@@ -5133,9 +5136,9 @@ module.exports = function(Chart) {
},
getRuler: function() {
-
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
- var yScale = this.getScaleForId(this.getDataset().yAxisID);
+ var meta = this.getMeta();
+ var xScale = this.getScaleForId(meta.xAxisID);
+ var yScale = this.getScaleForId(meta.yAxisID);
var datasetCount = this.getBarCount();
var tickWidth = (function() {
@@ -5148,6 +5151,12 @@ module.exports = function(Chart) {
var categoryWidth = tickWidth * xScale.options.categoryPercentage;
var categorySpacing = (tickWidth - (tickWidth * xScale.options.categoryPercentage)) / 2;
var fullBarWidth = categoryWidth / datasetCount;
+
+ if (xScale.ticks.length !== this.chart.data.labels.length) {
+ var perc = xScale.ticks.length / this.chart.data.labels.length;
+ fullBarWidth = fullBarWidth * perc;
+ }
+
var barWidth = fullBarWidth * xScale.options.barPercentage;
var barSpacing = fullBarWidth - (fullBarWidth * xScale.options.barPercentage);
@@ -5163,7 +5172,7 @@ module.exports = function(Chart) {
},
calculateBarWidth: function() {
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
+ var xScale = this.getScaleForId(this.getMeta().xAxisID);
var ruler = this.getRuler();
return xScale.options.stacked ? ruler.categoryWidth : ruler.barWidth;
},
@@ -5171,9 +5180,11 @@ module.exports = function(Chart) {
// Get bar index from the given dataset index accounting for the fact that not all bars are visible
getBarIndex: function(datasetIndex) {
var barIndex = 0;
+ var meta, j;
- for (var j = 0; j < datasetIndex; ++j) {
- if (helpers.isDatasetVisible(this.chart.data.datasets[j]) && this.chart.data.datasets[j].bar) {
+ for (j = 0; j < datasetIndex; ++j) {
+ meta = this.chart.getDatasetMeta(j);
+ if (meta.bar && this.chart.isDatasetVisible(j)) {
++barIndex;
}
}
@@ -5182,9 +5193,9 @@ module.exports = function(Chart) {
},
calculateBarX: function(index, datasetIndex) {
-
- var yScale = this.getScaleForId(this.getDataset().yAxisID);
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
+ var meta = this.getMeta();
+ var yScale = this.getScaleForId(meta.yAxisID);
+ var xScale = this.getScaleForId(meta.xAxisID);
var barIndex = this.getBarIndex(datasetIndex);
var ruler = this.getRuler();
@@ -5204,9 +5215,9 @@ module.exports = function(Chart) {
},
calculateBarY: function(index, datasetIndex) {
-
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
- var yScale = this.getScaleForId(this.getDataset().yAxisID);
+ var meta = this.getMeta();
+ var xScale = this.getScaleForId(meta.xAxisID);
+ var yScale = this.getScaleForId(meta.yAxisID);
var value = this.getDataset().data[index];
@@ -5217,7 +5228,8 @@ module.exports = function(Chart) {
for (var i = 0; i < datasetIndex; i++) {
var ds = this.chart.data.datasets[i];
- if (helpers.isDatasetVisible(ds) && ds.bar && ds.yAxisID === yScale.id) {
+ var dsMeta = this.chart.getDatasetMeta(i);
+ if (dsMeta.bar && dsMeta.yAxisID === yScale.id && this.chart.isDatasetVisible(i)) {
if (ds.data[index] < 0) {
sumNeg += ds.data[index] || 0;
} else {
@@ -5231,8 +5243,6 @@ module.exports = function(Chart) {
} else {
return yScale.getPixelForValue(sumPos + value);
}
-
- return yScale.getPixelForValue(value);
}
return yScale.getPixelForValue(value);
@@ -5240,7 +5250,7 @@ module.exports = function(Chart) {
draw: function(ease) {
var easingDecimal = ease || 1;
- helpers.each(this.getDataset().metaData, function(rectangle, index) {
+ helpers.each(this.getMeta().data, function(rectangle, index) {
var d = this.getDataset().data[index];
if (d !== null && d !== undefined && !isNaN(d)) {
rectangle.transition(easingDecimal).draw();
@@ -5267,6 +5277,296 @@ module.exports = function(Chart) {
}
});
+
+
+ // including horizontalBar in the bar file, instead of a file of its own
+ // it extends bar (like pie extends doughnut)
+ Chart.defaults.horizontalBar = {
+ hover: {
+ mode: "label"
+ },
+
+ scales: {
+ xAxes: [{
+ type: "linear",
+ position: "bottom"
+ }],
+ yAxes: [{
+ position: "left",
+ type: "category",
+
+ // Specific to Horizontal Bar Controller
+ categoryPercentage: 0.8,
+ barPercentage: 0.9,
+
+ // grid line settings
+ gridLines: {
+ offsetGridLines: true
+ }
+ }]
+ },
+ };
+
+ Chart.controllers.horizontalBar = Chart.controllers.bar.extend({
+ updateElement: function updateElement(rectangle, index, reset, numBars) {
+ var meta = this.getMeta();
+ var xScale = this.getScaleForId(meta.xAxisID);
+ var yScale = this.getScaleForId(meta.yAxisID);
+
+ var xScalePoint;
+
+ if (xScale.min < 0 && xScale.max < 0) {
+ // all less than 0. use the right
+ xScalePoint = xScale.getPixelForValue(xScale.max);
+ } else if (xScale.min > 0 && xScale.max > 0) {
+ xScalePoint = xScale.getPixelForValue(xScale.min);
+ } else {
+ xScalePoint = xScale.getPixelForValue(0);
+ }
+
+ helpers.extend(rectangle, {
+ // Utility
+ _chart: this.chart.chart,
+ _xScale: xScale,
+ _yScale: yScale,
+ _datasetIndex: this.index,
+ _index: index,
+
+ // Desired view properties
+ _model: {
+ x: reset ? xScalePoint : this.calculateBarX(index, this.index),
+ y: this.calculateBarY(index, this.index),
+
+ // Tooltip
+ label: this.chart.data.labels[index],
+ datasetLabel: this.getDataset().label,
+
+ // Appearance
+ base: reset ? xScalePoint : this.calculateBarBase(this.index, index),
+ height: this.calculateBarHeight(numBars),
+ backgroundColor: rectangle.custom && rectangle.custom.backgroundColor ? rectangle.custom.backgroundColor : helpers.getValueAtIndexOrDefault(this.getDataset().backgroundColor, index, this.chart.options.elements.rectangle.backgroundColor),
+ borderSkipped: rectangle.custom && rectangle.custom.borderSkipped ? rectangle.custom.borderSkipped : this.chart.options.elements.rectangle.borderSkipped,
+ borderColor: rectangle.custom && rectangle.custom.borderColor ? rectangle.custom.borderColor : helpers.getValueAtIndexOrDefault(this.getDataset().borderColor, index, this.chart.options.elements.rectangle.borderColor),
+ borderWidth: rectangle.custom && rectangle.custom.borderWidth ? rectangle.custom.borderWidth : helpers.getValueAtIndexOrDefault(this.getDataset().borderWidth, index, this.chart.options.elements.rectangle.borderWidth)
+ },
+
+ draw: function () {
+
+ var ctx = this._chart.ctx;
+ var vm = this._view;
+
+ var halfHeight = vm.height / 2,
+ topY = vm.y - halfHeight,
+ bottomY = vm.y + halfHeight,
+ right = vm.base - (vm.base - vm.x),
+ halfStroke = vm.borderWidth / 2;
+
+ // Canvas doesn't allow us to stroke inside the width so we can
+ // adjust the sizes to fit if we're setting a stroke on the line
+ if (vm.borderWidth) {
+ topY += halfStroke;
+ bottomY -= halfStroke;
+ right += halfStroke;
+ }
+
+ ctx.beginPath();
+
+ ctx.fillStyle = vm.backgroundColor;
+ ctx.strokeStyle = vm.borderColor;
+ ctx.lineWidth = vm.borderWidth;
+
+ // Corner points, from bottom-left to bottom-right clockwise
+ // | 1 2 |
+ // | 0 3 |
+ var corners = [
+ [vm.base, bottomY],
+ [vm.base, topY],
+ [right, topY],
+ [right, bottomY]
+ ];
+
+ // Find first (starting) corner with fallback to 'bottom'
+ var borders = ['bottom', 'left', 'top', 'right'];
+ var startCorner = borders.indexOf(vm.borderSkipped, 0);
+ if (startCorner === -1)
+ startCorner = 0;
+
+ function cornerAt(index) {
+ return corners[(startCorner + index) % 4];
+ }
+
+ // Draw rectangle from 'startCorner'
+ ctx.moveTo.apply(ctx, cornerAt(0));
+ for (var i = 1; i < 4; i++)
+ ctx.lineTo.apply(ctx, cornerAt(i));
+
+ ctx.fill();
+ if (vm.borderWidth) {
+ ctx.stroke();
+ }
+ },
+
+ inRange: function (mouseX, mouseY) {
+ var vm = this._view;
+ var inRange = false;
+
+ if (vm) {
+ if (vm.x < vm.base) {
+ inRange = (mouseY >= vm.y - vm.height / 2 && mouseY <= vm.y + vm.height / 2) && (mouseX >= vm.x && mouseX <= vm.base);
+ } else {
+ inRange = (mouseY >= vm.y - vm.height / 2 && mouseY <= vm.y + vm.height / 2) && (mouseX >= vm.base && mouseX <= vm.x);
+ }
+ }
+
+ return inRange;
+ }
+ });
+
+ rectangle.pivot();
+ },
+
+ calculateBarBase: function (datasetIndex, index) {
+ var meta = this.getMeta();
+ var xScale = this.getScaleForId(meta.xAxisID);
+ var yScale = this.getScaleForId(meta.yAxisID);
+
+ var base = 0;
+
+ if (xScale.options.stacked) {
+
+ var value = this.chart.data.datasets[datasetIndex].data[index];
+
+ if (value < 0) {
+ for (var i = 0; i < datasetIndex; i++) {
+ var negDS = this.chart.data.datasets[i];
+ var negDSMeta = this.chart.getDatasetMeta(i);
+ if (negDSMeta.bar && negDSMeta.xAxisID === xScale.id && this.chart.isDatasetVisible(i)) {
+ base += negDS.data[index] < 0 ? negDS.data[index] : 0;
+ }
+ }
+ } else {
+ for (var j = 0; j < datasetIndex; j++) {
+ var posDS = this.chart.data.datasets[j];
+ var posDSMeta = this.chart.getDatasetMeta(j);
+ if (posDSMeta.bar && posDSMeta.xAxisID === xScale.id && this.chart.isDatasetVisible(j)) {
+ base += posDS.data[index] > 0 ? posDS.data[index] : 0;
+ }
+ }
+ }
+
+ return xScale.getPixelForValue(base);
+ }
+
+ base = xScale.getPixelForValue(xScale.min);
+
+ if (xScale.beginAtZero || ((xScale.min <= 0 && xScale.max >= 0) || (xScale.min >= 0 && xScale.max <= 0))) {
+ base = xScale.getPixelForValue(0, 0);
+ } else if (xScale.min < 0 && xScale.max < 0) {
+ // All values are negative. Use the right as the base
+ base = xScale.getPixelForValue(xScale.max);
+ }
+
+ return base;
+ },
+
+ getRuler: function () {
+ var meta = this.getMeta();
+ var xScale = this.getScaleForId(meta.xAxisID);
+ var yScale = this.getScaleForId(meta.yAxisID);
+ var datasetCount = this.getBarCount();
+
+ var tickHeight = (function () {
+ var min = yScale.getPixelForTick(1) - yScale.getPixelForTick(0);
+ for (var i = 2; i < this.getDataset().data.length; i++) {
+ min = Math.min(yScale.getPixelForTick(i) - yScale.getPixelForTick(i - 1), min);
+ }
+ return min;
+ }).call(this);
+ var categoryHeight = tickHeight * yScale.options.categoryPercentage;
+ var categorySpacing = (tickHeight - (tickHeight * yScale.options.categoryPercentage)) / 2;
+ var fullBarHeight = categoryHeight / datasetCount;
+
+ if (yScale.ticks.length !== this.chart.data.labels.length) {
+ var perc = yScale.ticks.length / this.chart.data.labels.length;
+ fullBarHeight = fullBarHeight * perc;
+ }
+
+ var barHeight = fullBarHeight * yScale.options.barPercentage;
+ var barSpacing = fullBarHeight - (fullBarHeight * yScale.options.barPercentage);
+
+ return {
+ datasetCount: datasetCount,
+ tickHeight: tickHeight,
+ categoryHeight: categoryHeight,
+ categorySpacing: categorySpacing,
+ fullBarHeight: fullBarHeight,
+ barHeight: barHeight,
+ barSpacing: barSpacing,
+ };
+ },
+
+ calculateBarHeight: function () {
+ var yScale = this.getScaleForId(this.getMeta().yAxisID);
+ var ruler = this.getRuler();
+ return yScale.options.stacked ? ruler.categoryHeight : ruler.barHeight;
+ },
+
+ calculateBarX: function (index, datasetIndex) {
+ var meta = this.getMeta();
+ var xScale = this.getScaleForId(meta.xAxisID);
+ var yScale = this.getScaleForId(meta.yAxisID);
+
+ var value = this.getDataset().data[index];
+
+ if (xScale.options.stacked) {
+
+ var sumPos = 0,
+ sumNeg = 0;
+
+ for (var i = 0; i < datasetIndex; i++) {
+ var ds = this.chart.data.datasets[i];
+ var dsMeta = this.chart.getDatasetMeta(i);
+ if (dsMeta.bar && dsMeta.xAxisID === xScale.id && this.chart.isDatasetVisible(i)) {
+ if (ds.data[index] < 0) {
+ sumNeg += ds.data[index] || 0;
+ } else {
+ sumPos += ds.data[index] || 0;
+ }
+ }
+ }
+
+ if (value < 0) {
+ return xScale.getPixelForValue(sumNeg + value);
+ } else {
+ return xScale.getPixelForValue(sumPos + value);
+ }
+ }
+
+ return xScale.getPixelForValue(value);
+ },
+
+ calculateBarY: function (index, datasetIndex) {
+ var meta = this.getMeta();
+ var yScale = this.getScaleForId(meta.yAxisID);
+ var xScale = this.getScaleForId(meta.xAxisID);
+ var barIndex = this.getBarIndex(datasetIndex);
+
+ var ruler = this.getRuler();
+ var topTick = yScale.getPixelForValue(null, index, datasetIndex, this.chart.isCombo);
+ topTick -= this.chart.isCombo ? (ruler.tickHeight / 2) : 0;
+
+ if (yScale.options.stacked) {
+ return topTick + (ruler.categoryHeight / 2) + ruler.categorySpacing;
+ }
+
+ return topTick +
+ (ruler.barHeight / 2) +
+ ruler.categorySpacing +
+ (ruler.barHeight * barIndex) +
+ (ruler.barSpacing / 2) +
+ (ruler.barSpacing * barIndex);
+ }
+ });
};
},{}],16:[function(require,module,exports){
@@ -5312,11 +5612,9 @@ module.exports = function(Chart) {
Chart.controllers.bubble = Chart.DatasetController.extend({
addElements: function() {
-
- this.getDataset().metaData = this.getDataset().metaData || [];
-
+ var meta = this.getMeta();
helpers.each(this.getDataset().data, function(value, index) {
- this.getDataset().metaData[index] = this.getDataset().metaData[index] || new Chart.elements.Point({
+ meta.data[index] = meta.data[index] || new Chart.elements.Point({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index
@@ -5324,25 +5622,22 @@ module.exports = function(Chart) {
}, this);
},
addElementAndReset: function(index) {
- this.getDataset().metaData = this.getDataset().metaData || [];
var point = new Chart.elements.Point({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index
});
- // Reset the point
+ // Add to the points array and reset it
+ this.getMeta().data.splice(index, 0, point);
this.updateElement(point, index, true);
-
- // Add to the points array
- this.getDataset().metaData.splice(index, 0, point);
},
update: function update(reset) {
- var points = this.getDataset().metaData;
-
- var yScale = this.getScaleForId(this.getDataset().yAxisID);
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
+ var meta = this.getMeta();
+ var points = meta.data;
+ var yScale = this.getScaleForId(meta.yAxisID);
+ var xScale = this.getScaleForId(meta.xAxisID);
var scaleBase;
if (yScale.min < 0 && yScale.max < 0) {
@@ -5361,8 +5656,9 @@ module.exports = function(Chart) {
},
updateElement: function(point, index, reset) {
- var yScale = this.getScaleForId(this.getDataset().yAxisID);
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
+ var meta = this.getMeta();
+ var yScale = this.getScaleForId(meta.yAxisID);
+ var xScale = this.getScaleForId(meta.xAxisID);
var scaleBase;
if (yScale.min < 0 && yScale.max < 0) {
@@ -5409,7 +5705,7 @@ module.exports = function(Chart) {
var easingDecimal = ease || 1;
// Transition and Draw the Points
- helpers.each(this.getDataset().metaData, function(point, index) {
+ helpers.each(this.getMeta().data, function(point, index) {
point.transition(easingDecimal);
point.draw();
});
@@ -5462,11 +5758,11 @@ module.exports = function(Chart) {
if (chart.data.datasets.length) {
for (var i = 0; i < chart.data.datasets[0].data.length; ++i) {
- text.push('
');
+ text.push('
');
if (chart.data.labels[i]) {
text.push(chart.data.labels[i]);
}
- text.push('
');
+ text.push('');
}
}
@@ -5475,37 +5771,45 @@ module.exports = function(Chart) {
},
legend: {
labels: {
- generateLabels: function(data) {
+ generateLabels: function(chart) {
+ var data = chart.data;
if (data.labels.length && data.datasets.length) {
return data.labels.map(function(label, i) {
+ var meta = chart.getDatasetMeta(0);
+ var ds = data.datasets[0];
+ var arc = meta.data[i];
+ var fill = arc.custom && arc.custom.backgroundColor ? arc.custom.backgroundColor : helpers.getValueAtIndexOrDefault(ds.backgroundColor, i, this.chart.options.elements.arc.backgroundColor);
+ var stroke = arc.custom && arc.custom.borderColor ? arc.custom.borderColor : helpers.getValueAtIndexOrDefault(ds.borderColor, i, this.chart.options.elements.arc.borderColor);
+ var bw = arc.custom && arc.custom.borderWidth ? arc.custom.borderWidth : helpers.getValueAtIndexOrDefault(ds.borderWidth, i, this.chart.options.elements.arc.borderWidth);
+
return {
text: label,
- fillStyle: data.datasets[0].backgroundColor[i],
- hidden: isNaN(data.datasets[0].data[i]),
+ fillStyle: fill,
+ strokeStyle: stroke,
+ lineWidth: bw,
+ hidden: isNaN(ds.data[i]) || meta.data[i].hidden,
// Extra data used for toggling the correct item
index: i
};
- });
+ }, this);
} else {
return [];
}
}
},
+
onClick: function(e, legendItem) {
- helpers.each(this.chart.data.datasets, function(dataset) {
- dataset.metaHiddenData = dataset.metaHiddenData || [];
- var idx = legendItem.index;
+ var index = legendItem.index;
+ var chart = this.chart;
+ var i, ilen, meta;
- if (!isNaN(dataset.data[idx])) {
- dataset.metaHiddenData[idx] = dataset.data[idx];
- dataset.data[idx] = NaN;
- } else if (!isNaN(dataset.metaHiddenData[idx])) {
- dataset.data[idx] = dataset.metaHiddenData[idx];
- }
- });
+ for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {
+ meta = chart.getDatasetMeta(i);
+ meta.data[index].hidden = !meta.data[index].hidden;
+ }
- this.chart.update();
+ chart.update();
}
},
@@ -5543,17 +5847,17 @@ module.exports = function(Chart) {
},
addElements: function() {
- this.getDataset().metaData = this.getDataset().metaData || [];
+ var meta = this.getMeta();
helpers.each(this.getDataset().data, function(value, index) {
- this.getDataset().metaData[index] = this.getDataset().metaData[index] || new Chart.elements.Arc({
+ meta.data[index] = meta.data[index] || new Chart.elements.Arc({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index
});
}, this);
},
+
addElementAndReset: function(index, colorForNewElement) {
- this.getDataset().metaData = this.getDataset().metaData || [];
var arc = new Chart.elements.Arc({
_chart: this.chart.chart,
_datasetIndex: this.index,
@@ -5564,17 +5868,9 @@ module.exports = function(Chart) {
this.getDataset().backgroundColor.splice(index, 0, colorForNewElement);
}
- // Reset the point
+ // Add to the points array and reset it
+ this.getMeta().data.splice(index, 0, arc);
this.updateElement(arc, index, true);
-
- // Add to the points array
- this.getDataset().metaData.splice(index, 0, arc);
- },
-
- getVisibleDatasetCount: function getVisibleDatasetCount() {
- return helpers.where(this.chart.data.datasets, function(ds) {
- return helpers.isDatasetVisible(ds);
- }).length;
},
// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly
@@ -5582,7 +5878,7 @@ module.exports = function(Chart) {
var ringIndex = 0;
for (var j = 0; j < datasetIndex; ++j) {
- if (helpers.isDatasetVisible(this.chart.data.datasets[j])) {
+ if (this.chart.isDatasetVisible(j)) {
++ringIndex;
}
}
@@ -5597,7 +5893,7 @@ module.exports = function(Chart) {
var offset = {x: 0, y: 0};
// If the chart's circumference isn't a full circle, calculate minSize as a ratio of the width/height of the arc
- if (this.chart.options.circumference && this.chart.options.circumference < Math.PI * 2.0) {
+ if (this.chart.options.circumference < Math.PI * 2.0) {
var startAngle = this.chart.options.rotation % (Math.PI * 2.0);
startAngle += Math.PI * 2.0 * (startAngle >= Math.PI ? -1 : startAngle < -Math.PI ? 1 : 0);
var endAngle = startAngle + this.chart.options.circumference;
@@ -5617,30 +5913,26 @@ module.exports = function(Chart) {
this.chart.outerRadius = Math.max(minSize / 2, 0);
this.chart.innerRadius = Math.max(this.chart.options.cutoutPercentage ? (this.chart.outerRadius / 100) * (this.chart.options.cutoutPercentage) : 1, 0);
- this.chart.radiusLength = (this.chart.outerRadius - this.chart.innerRadius) / this.getVisibleDatasetCount();
+ this.chart.radiusLength = (this.chart.outerRadius - this.chart.innerRadius) / this.chart.getVisibleDatasetCount();
this.chart.offsetX = offset.x * this.chart.outerRadius;
this.chart.offsetY = offset.y * this.chart.outerRadius;
- this.getDataset().total = 0;
- helpers.each(this.getDataset().data, function(value) {
- if (!isNaN(value)) {
- this.getDataset().total += Math.abs(value);
- }
- }, this);
+ this.getMeta().total = this.calculateTotal();
this.outerRadius = this.chart.outerRadius - (this.chart.radiusLength * this.getRingIndex(this.index));
this.innerRadius = this.outerRadius - this.chart.radiusLength;
- helpers.each(this.getDataset().metaData, function(arc, index) {
+ helpers.each(this.getMeta().data, function(arc, index) {
this.updateElement(arc, index, reset);
}, this);
},
+
updateElement: function(arc, index, reset) {
var centerX = (this.chart.chartArea.left + this.chart.chartArea.right) / 2;
var centerY = (this.chart.chartArea.top + this.chart.chartArea.bottom) / 2;
- var startAngle = this.chart.options.rotation || (Math.PI * -0.5); // non reset case handled later
- var endAngle = this.chart.options.rotation || (Math.PI * -0.5); // non reset case handled later
- var circumference = reset && this.chart.options.animation.animateRotate ? 0 : this.calculateCircumference(this.getDataset().data[index]) * ((this.chart.options.circumference || (2.0 * Math.PI)) / (2.0 * Math.PI));
+ var startAngle = this.chart.options.rotation; // non reset case handled later
+ var endAngle = this.chart.options.rotation; // non reset case handled later
+ var circumference = reset && this.chart.options.animation.animateRotate ? 0 : arc.hidden? 0 : this.calculateCircumference(this.getDataset().data[index]) * (this.chart.options.circumference / (2.0 * Math.PI));
var innerRadius = reset && this.chart.options.animation.animateScale ? 0 : this.innerRadius;
var outerRadius = reset && this.chart.options.animation.animateScale ? 0 : this.outerRadius;
@@ -5670,12 +5962,12 @@ module.exports = function(Chart) {
});
// Set correct angles if not resetting
- if (!reset) {
+ if (!reset || !this.chart.options.animation.animateRotate) {
if (index === 0) {
- arc._model.startAngle = this.chart.options.rotation || (Math.PI * -0.5);
+ arc._model.startAngle = this.chart.options.rotation;
} else {
- arc._model.startAngle = this.getDataset().metaData[index - 1]._model.endAngle;
+ arc._model.startAngle = this.getMeta().data[index - 1]._model.endAngle;
}
arc._model.endAngle = arc._model.startAngle + arc._model.circumference;
@@ -5686,7 +5978,7 @@ module.exports = function(Chart) {
draw: function(ease) {
var easingDecimal = ease || 1;
- helpers.each(this.getDataset().metaData, function(arc, index) {
+ helpers.each(this.getMeta().data, function(arc, index) {
arc.transition(easingDecimal).draw();
});
},
@@ -5709,15 +6001,33 @@ module.exports = function(Chart) {
arc._model.borderWidth = arc.custom && arc.custom.borderWidth ? arc.custom.borderWidth : helpers.getValueAtIndexOrDefault(this.getDataset().borderWidth, index, this.chart.options.elements.arc.borderWidth);
},
+ calculateTotal: function() {
+ var dataset = this.getDataset();
+ var meta = this.getMeta();
+ var total = 0;
+ var value;
+
+ helpers.each(meta.data, function(element, index) {
+ value = dataset.data[index];
+ if (!isNaN(value) && !element.hidden) {
+ total += Math.abs(value);
+ }
+ });
+
+ return total;
+ },
+
calculateCircumference: function(value) {
- if (this.getDataset().total > 0 && !isNaN(value)) {
- return (Math.PI * 1.999999) * (value / this.getDataset().total);
+ var total = this.getMeta().total;
+ if (total > 0 && !isNaN(value)) {
+ return (Math.PI * 2.0) * (value / total);
} else {
return 0;
}
}
});
};
+
},{}],18:[function(require,module,exports){
"use strict";
@@ -5747,48 +6057,45 @@ module.exports = function(Chart) {
Chart.controllers.line = Chart.DatasetController.extend({
addElements: function() {
-
- this.getDataset().metaData = this.getDataset().metaData || [];
-
- this.getDataset().metaDataset = this.getDataset().metaDataset || new Chart.elements.Line({
+ var meta = this.getMeta();
+ meta.dataset = meta.dataset || new Chart.elements.Line({
_chart: this.chart.chart,
_datasetIndex: this.index,
- _points: this.getDataset().metaData
+ _points: meta.data
});
helpers.each(this.getDataset().data, function(value, index) {
- this.getDataset().metaData[index] = this.getDataset().metaData[index] || new Chart.elements.Point({
+ meta.data[index] = meta.data[index] || new Chart.elements.Point({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index
});
}, this);
},
+
addElementAndReset: function(index) {
- this.getDataset().metaData = this.getDataset().metaData || [];
var point = new Chart.elements.Point({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index
});
- // Reset the point
+ // Add to the points array and reset it
+ this.getMeta().data.splice(index, 0, point);
this.updateElement(point, index, true);
- // Add to the points array
- this.getDataset().metaData.splice(index, 0, point);
-
// Make sure bezier control points are updated
if (this.chart.options.showLines && this.chart.options.elements.line.tension !== 0)
this.updateBezierControlPoints();
},
update: function update(reset) {
- var line = this.getDataset().metaDataset;
- var points = this.getDataset().metaData;
+ var meta = this.getMeta();
+ var line = meta.dataset;
+ var points = meta.data;
- var yScale = this.getScaleForId(this.getDataset().yAxisID);
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
+ var yScale = this.getScaleForId(meta.yAxisID);
+ var xScale = this.getScaleForId(meta.xAxisID);
var scaleBase;
if (yScale.min < 0 && yScale.max < 0) {
@@ -5807,9 +6114,16 @@ module.exports = function(Chart) {
// Data
line._children = points;
// Model
+
+ // Compatibility: If the properties are defined with only the old name, use those values
+ if ((this.getDataset().tension !== undefined) && (this.getDataset().lineTension === undefined))
+ {
+ this.getDataset().lineTension = this.getDataset().tension;
+ }
+
line._model = {
// Appearance
- tension: line.custom && line.custom.tension ? line.custom.tension : helpers.getValueOrDefault(this.getDataset().tension, this.chart.options.elements.line.tension),
+ tension: line.custom && line.custom.tension ? line.custom.tension : helpers.getValueOrDefault(this.getDataset().lineTension, this.chart.options.elements.line.tension),
backgroundColor: line.custom && line.custom.backgroundColor ? line.custom.backgroundColor : (this.getDataset().backgroundColor || this.chart.options.elements.line.backgroundColor),
borderWidth: line.custom && line.custom.borderWidth ? line.custom.borderWidth : (this.getDataset().borderWidth || this.chart.options.elements.line.borderWidth),
borderColor: line.custom && line.custom.borderColor ? line.custom.borderColor : (this.getDataset().borderColor || this.chart.options.elements.line.borderColor),
@@ -5879,8 +6193,9 @@ module.exports = function(Chart) {
},
updateElement: function(point, index, reset) {
- var yScale = this.getScaleForId(this.getDataset().yAxisID);
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
+ var meta = this.getMeta();
+ var yScale = this.getScaleForId(meta.yAxisID);
+ var xScale = this.getScaleForId(meta.xAxisID);
var scaleBase;
if (yScale.min < 0 && yScale.max < 0) {
@@ -5899,27 +6214,37 @@ module.exports = function(Chart) {
point._index = index;
// Desired view properties
+
+ // Compatibility: If the properties are defined with only the old name, use those values
+ if ((this.getDataset().radius !== undefined) && (this.getDataset().pointRadius === undefined))
+ {
+ this.getDataset().pointRadius = this.getDataset().radius;
+ }
+ if ((this.getDataset().hitRadius !== undefined) && (this.getDataset().pointHitRadius === undefined))
+ {
+ this.getDataset().pointHitRadius = this.getDataset().hitRadius;
+ }
+
point._model = {
x: xScale.getPixelForValue(this.getDataset().data[index], index, this.index, this.chart.isCombo),
y: reset ? scaleBase : this.calculatePointY(this.getDataset().data[index], index, this.index, this.chart.isCombo),
// Appearance
- tension: point.custom && point.custom.tension ? point.custom.tension : helpers.getValueOrDefault(this.getDataset().tension, this.chart.options.elements.line.tension),
- radius: point.custom && point.custom.radius ? point.custom.radius : helpers.getValueAtIndexOrDefault(this.getDataset().radius, index, this.chart.options.elements.point.radius),
+ radius: point.custom && point.custom.radius ? point.custom.radius : helpers.getValueAtIndexOrDefault(this.getDataset().pointRadius, index, this.chart.options.elements.point.radius),
pointStyle: point.custom && point.custom.pointStyle ? point.custom.pointStyle : helpers.getValueAtIndexOrDefault(this.getDataset().pointStyle, index, this.chart.options.elements.point.pointStyle),
backgroundColor: this.getPointBackgroundColor(point, index),
borderColor: this.getPointBorderColor(point, index),
borderWidth: this.getPointBorderWidth(point, index),
// Tooltip
- hitRadius: point.custom && point.custom.hitRadius ? point.custom.hitRadius : helpers.getValueAtIndexOrDefault(this.getDataset().hitRadius, index, this.chart.options.elements.point.hitRadius)
+ hitRadius: point.custom && point.custom.hitRadius ? point.custom.hitRadius : helpers.getValueAtIndexOrDefault(this.getDataset().pointHitRadius, index, this.chart.options.elements.point.hitRadius)
};
point._model.skip = point.custom && point.custom.skip ? point.custom.skip : (isNaN(point._model.x) || isNaN(point._model.y));
},
calculatePointY: function(value, index, datasetIndex, isCombo) {
-
- var xScale = this.getScaleForId(this.getDataset().xAxisID);
- var yScale = this.getScaleForId(this.getDataset().yAxisID);
+ var meta = this.getMeta();
+ var xScale = this.getScaleForId(meta.xAxisID);
+ var yScale = this.getScaleForId(meta.yAxisID);
if (yScale.options.stacked) {
@@ -5928,7 +6253,8 @@ module.exports = function(Chart) {
for (var i = 0; i < datasetIndex; i++) {
var ds = this.chart.data.datasets[i];
- if (ds.type === 'line' && helpers.isDatasetVisible(ds)) {
+ var dsMeta = this.chart.getDatasetMeta(i);
+ if (dsMeta.type === 'line' && this.chart.isDatasetVisible(i)) {
if (ds.data[index] < 0) {
sumNeg += ds.data[index] || 0;
} else {
@@ -5949,12 +6275,13 @@ module.exports = function(Chart) {
updateBezierControlPoints: function() {
// Update bezier control points
- helpers.each(this.getDataset().metaData, function(point, index) {
+ var meta = this.getMeta();
+ helpers.each(meta.data, function(point, index) {
var controlPoints = helpers.splineCurve(
- helpers.previousItem(this.getDataset().metaData, index)._model,
+ helpers.previousItem(meta.data, index)._model,
point._model,
- helpers.nextItem(this.getDataset().metaData, index)._model,
- point._model.tension
+ helpers.nextItem(meta.data, index)._model,
+ meta.dataset._model.tension
);
// Prevent the bezier going outside of the bounds of the graph
@@ -5970,19 +6297,20 @@ module.exports = function(Chart) {
},
draw: function(ease) {
+ var meta = this.getMeta();
var easingDecimal = ease || 1;
// Transition Point Locations
- helpers.each(this.getDataset().metaData, function(point) {
+ helpers.each(meta.data, function(point) {
point.transition(easingDecimal);
});
// Transition and Draw the line
if (this.chart.options.showLines)
- this.getDataset().metaDataset.transition(easingDecimal).draw();
+ meta.dataset.transition(easingDecimal).draw();
// Draw the points
- helpers.each(this.getDataset().metaData, function(point) {
+ helpers.each(meta.data, function(point) {
point.draw();
});
},
@@ -6002,7 +6330,13 @@ module.exports = function(Chart) {
var dataset = this.chart.data.datasets[point._datasetIndex];
var index = point._index;
- point._model.radius = point.custom && point.custom.radius ? point.custom.radius : helpers.getValueAtIndexOrDefault(this.getDataset().radius, index, this.chart.options.elements.point.radius);
+ // Compatibility: If the properties are defined with only the old name, use those values
+ if ((this.getDataset().radius !== undefined) && (this.getDataset().pointRadius === undefined))
+ {
+ this.getDataset().pointRadius = this.getDataset().radius;
+ }
+
+ point._model.radius = point.custom && point.custom.radius ? point.custom.radius : helpers.getValueAtIndexOrDefault(this.getDataset().pointRadius, index, this.chart.options.elements.point.radius);
point._model.backgroundColor = this.getPointBackgroundColor(point, index);
point._model.borderColor = this.getPointBorderColor(point, index);
point._model.borderWidth = this.getPointBorderWidth(point, index);
@@ -6025,8 +6359,10 @@ module.exports = function(Chart) {
},
//Boolean - Whether to animate the rotation of the chart
- animateRotate: true,
- animateScale: true,
+ animation: {
+ animateRotate: true,
+ animateScale: true
+ },
aspectRatio: 1,
legendCallback: function(chart) {
@@ -6048,37 +6384,45 @@ module.exports = function(Chart) {
},
legend: {
labels: {
- generateLabels: function(data) {
+ generateLabels: function(chart) {
+ var data = chart.data;
if (data.labels.length && data.datasets.length) {
return data.labels.map(function(label, i) {
+ var meta = chart.getDatasetMeta(0);
+ var ds = data.datasets[0];
+ var arc = meta.data[i];
+ var fill = arc.custom && arc.custom.backgroundColor ? arc.custom.backgroundColor : helpers.getValueAtIndexOrDefault(ds.backgroundColor, i, this.chart.options.elements.arc.backgroundColor);
+ var stroke = arc.custom && arc.custom.borderColor ? arc.custom.borderColor : helpers.getValueAtIndexOrDefault(ds.borderColor, i, this.chart.options.elements.arc.borderColor);
+ var bw = arc.custom && arc.custom.borderWidth ? arc.custom.borderWidth : helpers.getValueAtIndexOrDefault(ds.borderWidth, i, this.chart.options.elements.arc.borderWidth);
+
return {
text: label,
- fillStyle: data.datasets[0].backgroundColor[i],
- hidden: isNaN(data.datasets[0].data[i]),
+ fillStyle: fill,
+ strokeStyle: stroke,
+ lineWidth: bw,
+ hidden: isNaN(ds.data[i]) || meta.data[i].hidden,
// Extra data used for toggling the correct item
index: i
};
- });
+ }, this);
} else {
return [];
}
}
},
+
onClick: function(e, legendItem) {
- helpers.each(this.chart.data.datasets, function(dataset) {
- dataset.metaHiddenData = dataset.metaHiddenData || [];
- var idx = legendItem.index;
+ var index = legendItem.index;
+ var chart = this.chart;
+ var i, ilen, meta;
- if (!isNaN(dataset.data[idx])) {
- dataset.metaHiddenData[idx] = dataset.data[idx];
- dataset.data[idx] = NaN;
- } else if (!isNaN(dataset.metaHiddenData[idx])) {
- dataset.data[idx] = dataset.metaHiddenData[idx];
- }
- });
+ for (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {
+ meta = chart.getDatasetMeta(i);
+ meta.data[index].hidden = !meta.data[index].hidden;
+ }
- this.chart.update();
+ chart.update();
}
},
@@ -6099,51 +6443,43 @@ module.exports = function(Chart) {
linkScales: function() {
// no scales for doughnut
},
+
addElements: function() {
- this.getDataset().metaData = this.getDataset().metaData || [];
+ var meta = this.getMeta();
helpers.each(this.getDataset().data, function(value, index) {
- this.getDataset().metaData[index] = this.getDataset().metaData[index] || new Chart.elements.Arc({
+ meta.data[index] = meta.data[index] || new Chart.elements.Arc({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index
});
}, this);
},
+
addElementAndReset: function(index) {
- this.getDataset().metaData = this.getDataset().metaData || [];
var arc = new Chart.elements.Arc({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index
});
- // Reset the point
+ // Add to the points array and reset it
+ this.getMeta().data.splice(index, 0, arc);
this.updateElement(arc, index, true);
-
- // Add to the points array
- this.getDataset().metaData.splice(index, 0, arc);
- },
- getVisibleDatasetCount: function getVisibleDatasetCount() {
- return helpers.where(this.chart.data.datasets, function(ds) {
- return helpers.isDatasetVisible(ds);
- }).length;
},
update: function update(reset) {
+ var meta = this.getMeta();
var minSize = Math.min(this.chart.chartArea.right - this.chart.chartArea.left, this.chart.chartArea.bottom - this.chart.chartArea.top);
this.chart.outerRadius = Math.max((minSize - this.chart.options.elements.arc.borderWidth / 2) / 2, 0);
this.chart.innerRadius = Math.max(this.chart.options.cutoutPercentage ? (this.chart.outerRadius / 100) * (this.chart.options.cutoutPercentage) : 1, 0);
- this.chart.radiusLength = (this.chart.outerRadius - this.chart.innerRadius) / this.getVisibleDatasetCount();
-
- this.getDataset().total = 0;
- helpers.each(this.getDataset().data, function(value) {
- this.getDataset().total += Math.abs(value);
- }, this);
+ this.chart.radiusLength = (this.chart.outerRadius - this.chart.innerRadius) / this.chart.getVisibleDatasetCount();
this.outerRadius = this.chart.outerRadius - (this.chart.radiusLength * this.index);
this.innerRadius = this.outerRadius - this.chart.radiusLength;
- helpers.each(this.getDataset().metaData, function(arc, index) {
+ meta.count = this.countVisibleElements();
+
+ helpers.each(meta.data, function(arc, index) {
this.updateElement(arc, index, reset);
}, this);
},
@@ -6155,23 +6491,25 @@ module.exports = function(Chart) {
// If there is NaN data before us, we need to calculate the starting angle correctly.
// We could be way more efficient here, but its unlikely that the polar area chart will have a lot of data
- var notNullIndex = 0;
+ var visibleCount = 0;
+ var meta = this.getMeta();
for (var i = 0; i < index; ++i) {
- if (!isNaN(this.getDataset().data[i])) {
- ++notNullIndex;
+ if (!isNaN(this.getDataset().data[i]) && !meta.data[i].hidden) {
+ ++visibleCount;
}
}
- var startAngle = (-0.5 * Math.PI) + (circumference * notNullIndex);
- var endAngle = startAngle + circumference;
+ var distance = arc.hidden? 0 : this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[index]);
+ var startAngle = (-0.5 * Math.PI) + (circumference * visibleCount);
+ var endAngle = startAngle + (arc.hidden? 0 : circumference);
var resetModel = {
x: centerX,
y: centerY,
innerRadius: 0,
- outerRadius: this.chart.options.animateScale ? 0 : this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[index]),
- startAngle: this.chart.options.animateRotate ? Math.PI * -0.5 : startAngle,
- endAngle: this.chart.options.animateRotate ? Math.PI * -0.5 : endAngle,
+ outerRadius: this.chart.options.animation.animateScale ? 0 : this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[index]),
+ startAngle: this.chart.options.animation.animateRotate ? Math.PI * -0.5 : startAngle,
+ endAngle: this.chart.options.animation.animateRotate ? Math.PI * -0.5 : endAngle,
backgroundColor: arc.custom && arc.custom.backgroundColor ? arc.custom.backgroundColor : helpers.getValueAtIndexOrDefault(this.getDataset().backgroundColor, index, this.chart.options.elements.arc.backgroundColor),
borderWidth: arc.custom && arc.custom.borderWidth ? arc.custom.borderWidth : helpers.getValueAtIndexOrDefault(this.getDataset().borderWidth, index, this.chart.options.elements.arc.borderWidth),
@@ -6192,7 +6530,7 @@ module.exports = function(Chart) {
x: centerX,
y: centerY,
innerRadius: 0,
- outerRadius: this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[index]),
+ outerRadius: distance,
startAngle: startAngle,
endAngle: endAngle,
@@ -6209,7 +6547,7 @@ module.exports = function(Chart) {
draw: function(ease) {
var easingDecimal = ease || 1;
- helpers.each(this.getDataset().metaData, function(arc, index) {
+ helpers.each(this.getMeta().data, function(arc, index) {
arc.transition(easingDecimal).draw();
});
},
@@ -6232,21 +6570,31 @@ module.exports = function(Chart) {
arc._model.borderWidth = arc.custom && arc.custom.borderWidth ? arc.custom.borderWidth : helpers.getValueAtIndexOrDefault(this.getDataset().borderWidth, index, this.chart.options.elements.arc.borderWidth);
},
- calculateCircumference: function(value) {
- if (isNaN(value)) {
- return 0;
- } else {
- // Count the number of NaN values
- var numNaN = helpers.where(this.getDataset().data, function(data) {
- return isNaN(data);
- }).length;
+ countVisibleElements: function() {
+ var dataset = this.getDataset();
+ var meta = this.getMeta();
+ var count = 0;
- return (2 * Math.PI) / (this.getDataset().data.length - numNaN);
+ helpers.each(meta.data, function(element, index) {
+ if (!isNaN(dataset.data[index]) && !element.hidden) {
+ count++;
+ }
+ });
+
+ return count;
+ },
+
+ calculateCircumference: function(value) {
+ var count = this.getMeta().count;
+ if (count > 0 && !isNaN(value)) {
+ return (2 * Math.PI) / count;
+ } else {
+ return 0;
}
}
});
-
};
+
},{}],20:[function(require,module,exports){
"use strict";
@@ -6272,18 +6620,17 @@ module.exports = function(Chart) {
},
addElements: function() {
+ var meta = this.getMeta();
- this.getDataset().metaData = this.getDataset().metaData || [];
-
- this.getDataset().metaDataset = this.getDataset().metaDataset || new Chart.elements.Line({
+ meta.dataset = meta.dataset || new Chart.elements.Line({
_chart: this.chart.chart,
_datasetIndex: this.index,
- _points: this.getDataset().metaData,
+ _points: meta.data,
_loop: true
});
helpers.each(this.getDataset().data, function(value, index) {
- this.getDataset().metaData[index] = this.getDataset().metaData[index] || new Chart.elements.Point({
+ meta.data[index] = meta.data[index] || new Chart.elements.Point({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index,
@@ -6295,27 +6642,24 @@ module.exports = function(Chart) {
}, this);
},
addElementAndReset: function(index) {
- this.getDataset().metaData = this.getDataset().metaData || [];
var point = new Chart.elements.Point({
_chart: this.chart.chart,
_datasetIndex: this.index,
_index: index
});
- // Reset the point
+ // Add to the points array and reset it
+ this.getMeta().data.splice(index, 0, point);
this.updateElement(point, index, true);
- // Add to the points array
- this.getDataset().metaData.splice(index, 0, point);
-
// Make sure bezier control points are updated
this.updateBezierControlPoints();
},
update: function update(reset) {
-
- var line = this.getDataset().metaDataset;
- var points = this.getDataset().metaData;
+ var meta = this.getMeta();
+ var line = meta.dataset;
+ var points = meta.data;
var scale = this.chart.scale;
var scaleBase;
@@ -6328,15 +6672,21 @@ module.exports = function(Chart) {
scaleBase = scale.getPointPositionForValue(0, 0);
}
- helpers.extend(this.getDataset().metaDataset, {
+ // Compatibility: If the properties are defined with only the old name, use those values
+ if ((this.getDataset().tension !== undefined) && (this.getDataset().lineTension === undefined))
+ {
+ this.getDataset().lineTension = this.getDataset().tension;
+ }
+
+ helpers.extend(meta.dataset, {
// Utility
_datasetIndex: this.index,
// Data
- _children: this.getDataset().metaData,
+ _children: points,
// Model
_model: {
// Appearance
- tension: line.custom && line.custom.tension ? line.custom.tension : helpers.getValueOrDefault(this.getDataset().tension, this.chart.options.elements.line.tension),
+ tension: line.custom && line.custom.tension ? line.custom.tension : helpers.getValueOrDefault(this.getDataset().lineTension, this.chart.options.elements.line.tension),
backgroundColor: line.custom && line.custom.backgroundColor ? line.custom.backgroundColor : (this.getDataset().backgroundColor || this.chart.options.elements.line.backgroundColor),
borderWidth: line.custom && line.custom.borderWidth ? line.custom.borderWidth : (this.getDataset().borderWidth || this.chart.options.elements.line.borderWidth),
borderColor: line.custom && line.custom.borderColor ? line.custom.borderColor : (this.getDataset().borderColor || this.chart.options.elements.line.borderColor),
@@ -6353,7 +6703,7 @@ module.exports = function(Chart) {
}
});
- this.getDataset().metaDataset.pivot();
+ meta.dataset.pivot();
// Update Points
helpers.each(points, function(point, index) {
@@ -6394,11 +6744,12 @@ module.exports = function(Chart) {
point._model.skip = point.custom && point.custom.skip ? point.custom.skip : (isNaN(point._model.x) || isNaN(point._model.y));
},
updateBezierControlPoints: function() {
- helpers.each(this.getDataset().metaData, function(point, index) {
+ var meta = this.getMeta();
+ helpers.each(meta.data, function(point, index) {
var controlPoints = helpers.splineCurve(
- helpers.previousItem(this.getDataset().metaData, index, true)._model,
+ helpers.previousItem(meta.data, index, true)._model,
point._model,
- helpers.nextItem(this.getDataset().metaData, index, true)._model,
+ helpers.nextItem(meta.data, index, true)._model,
point._model.tension
);
@@ -6415,18 +6766,19 @@ module.exports = function(Chart) {
},
draw: function(ease) {
+ var meta = this.getMeta();
var easingDecimal = ease || 1;
// Transition Point Locations
- helpers.each(this.getDataset().metaData, function(point, index) {
+ helpers.each(meta.data, function(point, index) {
point.transition(easingDecimal);
});
// Transition and Draw the line
- this.getDataset().metaDataset.transition(easingDecimal).draw();
+ meta.dataset.transition(easingDecimal).draw();
// Draw the points
- helpers.each(this.getDataset().metaData, function(point) {
+ helpers.each(meta.data, function(point) {
point.draw();
});
},
@@ -6629,9 +6981,8 @@ module.exports = function(Chart) {
helpers.extend(Chart.Controller.prototype, {
initialize: function initialize() {
-
- // TODO
- // If BeforeInit(this) doesn't return false, proceed
+ // Before init plugin notification
+ Chart.pluginService.notifyPlugins('beforeInit', [this]);
this.bindEvents();
@@ -6646,8 +6997,8 @@ module.exports = function(Chart) {
this.initToolTip();
this.update();
- // TODO
- // If AfterInit(this) doesn't return false, proceed
+ // After init plugin notification
+ Chart.pluginService.notifyPlugins('afterInit', [this]);
return this;
},
@@ -6795,18 +7146,18 @@ module.exports = function(Chart) {
var newControllers = [];
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
- if (!dataset.type) {
- dataset.type = this.config.type;
+ var meta = this.getDatasetMeta(datasetIndex);
+ if (!meta.type) {
+ meta.type = dataset.type || this.config.type;
}
- var type = dataset.type;
- types.push(type);
+ types.push(meta.type);
- if (dataset.controller) {
- dataset.controller.updateIndex(datasetIndex);
+ if (meta.controller) {
+ meta.controller.updateIndex(datasetIndex);
} else {
- dataset.controller = new Chart.controllers[type](this, datasetIndex);
- newControllers.push(dataset.controller);
+ meta.controller = new Chart.controllers[meta.type](this, datasetIndex);
+ newControllers.push(meta.controller);
}
}, this);
@@ -6824,17 +7175,24 @@ module.exports = function(Chart) {
resetElements: function resetElements() {
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
- dataset.controller.reset();
- });
+ this.getDatasetMeta(datasetIndex).controller.reset();
+ }, this);
},
update: function update(animationDuration, lazy) {
+ Chart.pluginService.notifyPlugins('beforeUpdate', [this]);
+
// In case the entire data object changed
this.tooltip._data = this.data;
// Make sure dataset controllers are updated and new controllers are reset
var newControllers = this.buildOrUpdateControllers();
+ // Make sure all dataset controllers have correct meta data counts
+ helpers.each(this.data.datasets, function(dataset, datasetIndex) {
+ this.getDatasetMeta(datasetIndex).controller.buildOrUpdateElements();
+ }, this);
+
Chart.layoutService.update(this, this.chart.width, this.chart.height);
// Can only reset the new controllers after the scales have been updated
@@ -6842,19 +7200,18 @@ module.exports = function(Chart) {
controller.reset();
});
- // Make sure all dataset controllers have correct meta data counts
- helpers.each(this.data.datasets, function(dataset, datasetIndex) {
- dataset.controller.buildOrUpdateElements();
- });
-
// This will loop through any data and do the appropriate element update for the type
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
- dataset.controller.update();
- });
+ this.getDatasetMeta(datasetIndex).controller.update();
+ }, this);
+
this.render(animationDuration, lazy);
+
+ Chart.pluginService.notifyPlugins('afterUpdate', [this]);
},
render: function render(duration, lazy) {
+ Chart.pluginService.notifyPlugins('beforeRender', [this]);
if (this.options.animation && ((typeof duration !== 'undefined' && duration !== 0) || (typeof duration === 'undefined' && this.options.animation.duration !== 0))) {
var animation = new Chart.Animation();
@@ -6888,6 +7245,8 @@ module.exports = function(Chart) {
var easingDecimal = ease || 1;
this.clear();
+ Chart.pluginService.notifyPlugins('beforeDraw', [this, easingDecimal]);
+
// Draw all the scales
helpers.each(this.boxes, function(box) {
box.draw(this.chartArea);
@@ -6904,35 +7263,37 @@ module.exports = function(Chart) {
// Draw each dataset via its respective controller (reversed to support proper line stacking)
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
- if (helpers.isDatasetVisible(dataset)) {
- dataset.controller.draw(ease);
+ if (this.isDatasetVisible(datasetIndex)) {
+ this.getDatasetMeta(datasetIndex).controller.draw(ease);
}
- }, null, true);
+ }, this, true);
// Restore from the clipping operation
this.chart.ctx.restore();
// Finally draw the tooltip
this.tooltip.transition(easingDecimal).draw();
+
+ Chart.pluginService.notifyPlugins('afterDraw', [this, easingDecimal]);
},
// Get the single element that was clicked on
// @return : An object containing the dataset index and element index of the matching element. Also contains the rectangle that was draw
getElementAtEvent: function(e) {
-
var eventPosition = helpers.getRelativePosition(e, this.chart);
var elementsArray = [];
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
- if (helpers.isDatasetVisible(dataset)) {
- helpers.each(dataset.metaData, function(element, index) {
+ if (this.isDatasetVisible(datasetIndex)) {
+ var meta = this.getDatasetMeta(datasetIndex);
+ helpers.each(meta.data, function(element, index) {
if (element.inRange(eventPosition.x, eventPosition.y)) {
elementsArray.push(element);
return elementsArray;
}
});
}
- });
+ }, this);
return elementsArray;
},
@@ -6944,10 +7305,11 @@ module.exports = function(Chart) {
var found = (function() {
if (this.data.datasets) {
for (var i = 0; i < this.data.datasets.length; i++) {
- if (helpers.isDatasetVisible(this.data.datasets[i])) {
- for (var j = 0; j < this.data.datasets[i].metaData.length; j++) {
- if (this.data.datasets[i].metaData[j].inRange(eventPosition.x, eventPosition.y)) {
- return this.data.datasets[i].metaData[j];
+ var meta = this.getDatasetMeta(i);
+ if (this.isDatasetVisible(i)) {
+ for (var j = 0; j < meta.data.length; j++) {
+ if (meta.data[j].inRange(eventPosition.x, eventPosition.y)) {
+ return meta.data[j];
}
}
}
@@ -6959,11 +7321,12 @@ module.exports = function(Chart) {
return elementsArray;
}
- helpers.each(this.data.datasets, function(dataset, dsIndex) {
- if (helpers.isDatasetVisible(dataset)) {
- elementsArray.push(dataset.metaData[found._index]);
+ helpers.each(this.data.datasets, function(dataset, datasetIndex) {
+ if (this.isDatasetVisible(datasetIndex)) {
+ var meta = this.getDatasetMeta(datasetIndex);
+ elementsArray.push(meta.data[found._index]);
}
- });
+ }, this);
return elementsArray;
},
@@ -6972,12 +7335,52 @@ module.exports = function(Chart) {
var elementsArray = this.getElementAtEvent(e);
if (elementsArray.length > 0) {
- elementsArray = this.data.datasets[elementsArray[0]._datasetIndex].metaData;
+ elementsArray = this.getDatasetMeta(elementsArray[0]._datasetIndex).data;
}
return elementsArray;
},
+ getDatasetMeta: function(datasetIndex) {
+ var dataset = this.data.datasets[datasetIndex];
+ if (!dataset._meta) {
+ dataset._meta = {};
+ }
+
+ var meta = dataset._meta[this.id];
+ if (!meta) {
+ meta = dataset._meta[this.id] = {
+ type: null,
+ data: [],
+ dataset: null,
+ controller: null,
+ hidden: null, // See isDatasetVisible() comment
+ xAxisID: null,
+ yAxisID: null
+ };
+ }
+
+ return meta;
+ },
+
+ getVisibleDatasetCount: function() {
+ var count = 0;
+ for (var i = 0, ilen = this.data.datasets.length; i numMetaData) {
// Add new elements
for (var index = numMetaData; index < numData; ++index) {
@@ -7245,7 +7654,9 @@ module.exports = function(Chart) {
this.initialize.apply(this, arguments);
};
helpers.extend(Chart.Element.prototype, {
- initialize: function() {},
+ initialize: function() {
+ this.hidden = false;
+ },
pivot: function() {
if (!this._view) {
this._view = helpers.clone(this._model);
@@ -7601,7 +8012,7 @@ module.exports = function(Chart) {
helpers.uid = (function() {
var id = 0;
return function() {
- return "chart-" + id++;
+ return id++;
};
})();
helpers.warn = function(str) {
@@ -8267,9 +8678,6 @@ module.exports = function(Chart) {
array.push(element);
}
};
- helpers.isDatasetVisible = function(dataset) {
- return !dataset.hidden;
- };
helpers.callCallback = function(fn, args, _tArg) {
if (fn && typeof fn.call === 'function') {
fn.apply(_tArg, args);
@@ -8440,10 +8848,6 @@ module.exports = function(Chart) {
return box.options.position === "chartArea";
});
- function fullWidthSorter(a, b) {
-
- }
-
// Ensure that full width boxes are at the very top / bottom
topBoxes.sort(function(a, b) {
return (b.options.fullWidth ? 1 : 0) - (a.options.fullWidth ? 1 : 0);
@@ -8640,11 +9044,15 @@ module.exports = function(Chart) {
});
helpers.each(topBoxes, function(box) {
- box.width = newMaxChartAreaWidth;
+ if (!box.options.fullWidth) {
+ box.width = newMaxChartAreaWidth;
+ }
});
helpers.each(bottomBoxes, function(box) {
- box.width = newMaxChartAreaWidth;
+ if (!box.options.fullWidth) {
+ box.width = newMaxChartAreaWidth;
+ }
});
maxChartAreaHeight = newMaxChartAreaHeight;
@@ -8725,8 +9133,11 @@ module.exports = function(Chart) {
// a callback that will handle
onClick: function(e, legendItem) {
- var dataset = this.chart.data.datasets[legendItem.datasetIndex];
- dataset.hidden = !dataset.hidden;
+ var index = legendItem.datasetIndex;
+ var meta = this.chart.getDatasetMeta(index);
+
+ // See controller.isDatasetVisible comment
+ meta.hidden = meta.hidden === null? !this.chart.data.datasets[index].hidden : null;
// We hid a dataset ... rerender the chart
this.chart.update();
@@ -8746,12 +9157,13 @@ module.exports = function(Chart) {
// lineDashOffset :
// lineJoin :
// lineWidth :
- generateLabels: function(data) {
+ generateLabels: function(chart) {
+ var data = chart.data;
return helpers.isArray(data.datasets) ? data.datasets.map(function(dataset, i) {
return {
text: dataset.label,
fillStyle: dataset.backgroundColor,
- hidden: dataset.hidden,
+ hidden: !chart.isDatasetVisible(i),
lineCap: dataset.borderCapStyle,
lineDash: dataset.borderDash,
lineDashOffset: dataset.borderDashOffset,
@@ -8811,7 +9223,6 @@ module.exports = function(Chart) {
this.afterUpdate();
return this.minSize;
-
},
afterUpdate: helpers.noop,
@@ -8851,7 +9262,7 @@ module.exports = function(Chart) {
beforeBuildLabels: helpers.noop,
buildLabels: function() {
- this.legendItems = this.options.labels.generateLabels.call(this, this.chart.data);
+ this.legendItems = this.options.labels.generateLabels.call(this, this.chart);
if(this.options.reverse){
this.legendItems.reverse();
}
@@ -9045,12 +9456,73 @@ module.exports = function(Chart) {
},{}],29:[function(require,module,exports){
"use strict";
+module.exports = function(Chart) {
+ var helpers = Chart.helpers;
+
+ // Plugins are stored here
+ Chart.plugins = [];
+ Chart.pluginService = {
+ // Register a new plugin
+ register: function(plugin) {
+ if (Chart.plugins.indexOf(plugin) === -1) {
+ Chart.plugins.push(plugin);
+ }
+ },
+
+ // Remove a registered plugin
+ remove: function(plugin) {
+ var idx = Chart.plugins.indexOf(plugin);
+ if (idx !== -1) {
+ Chart.plugins.splice(idx, 1);
+ }
+ },
+
+ // Iterate over all plugins
+ notifyPlugins: function(method, args, scope) {
+ helpers.each(Chart.plugins, function(plugin) {
+ if (plugin[method] && typeof plugin[method] === 'function') {
+ plugin[method].apply(scope, args);
+ }
+ }, scope);
+ }
+ };
+
+ Chart.PluginBase = Chart.Element.extend({
+ // Plugin methods. All functions are passed the chart instance
+
+ // Called at start of chart init
+ beforeInit: helpers.noop,
+
+ // Called at end of chart init
+ afterInit: helpers.noop,
+
+ // Called at start of update
+ beforeUpdate: helpers.noop,
+
+ // Called at end of update
+ afterUpdate: helpers.noop,
+
+ // Called at start of draw
+ beforeDraw: helpers.noop,
+
+ // Called at end of draw
+ afterDraw: helpers.noop,
+
+ // Called during destroy
+ destroy: helpers.noop,
+ });
+};
+
+},{}],30:[function(require,module,exports){
+"use strict";
+
module.exports = function(Chart) {
var helpers = Chart.helpers;
Chart.defaults.scale = {
display: true,
+ position: "left",
// grid line settings
gridLines: {
@@ -9059,6 +9531,7 @@ module.exports = function(Chart) {
lineWidth: 1,
drawOnChartArea: true,
drawTicks: true,
+ tickMarkLength: 10,
zeroLineWidth: 1,
zeroLineColor: "rgba(0,0,0,0.25)",
offsetGridLines: false
@@ -9316,12 +9789,12 @@ module.exports = function(Chart) {
// subtract the margins to line up with the chartArea if we are a full width scale
this.minSize.width = this.isFullWidth() ? this.maxWidth - this.margins.left - this.margins.right : this.maxWidth;
} else {
- this.minSize.width = this.options.gridLines.display && this.options.display ? 10 : 0;
+ this.minSize.width = this.options.gridLines.tickMarkLength;
}
// height
if (this.isHorizontal()) {
- this.minSize.height = this.options.gridLines.display && this.options.display ? 10 : 0;
+ this.minSize.height = this.options.gridLines.tickMarkLength;
} else {
this.minSize.height = this.maxHeight; // fill all the height
}
@@ -9437,6 +9910,9 @@ module.exports = function(Chart) {
// Used to get data value locations. Value can either be an index or a numerical value
getPixelForValue: helpers.noop,
+ // Used to get the data value from a given pixel. This is the inverse of getPixelForValue
+ getValueForPixel: helpers.noop,
+
// Used for tick location, should
getPixelForTick: function(index, includeOffset) {
if (this.isHorizontal()) {
@@ -9496,6 +9972,7 @@ module.exports = function(Chart) {
var tickFontStyle = helpers.getValueOrDefault(this.options.ticks.fontStyle, Chart.defaults.global.defaultFontStyle);
var tickFontFamily = helpers.getValueOrDefault(this.options.ticks.fontFamily, Chart.defaults.global.defaultFontFamily);
var tickLabelFont = helpers.fontString(tickFontSize, tickFontStyle, tickFontFamily);
+ var tl = this.options.gridLines.tickMarkLength;
var scaleLabelFontColor = helpers.getValueOrDefault(this.options.scaleLabel.fontColor, Chart.defaults.global.defaultFontColor);
var scaleLabelFontSize = helpers.getValueOrDefault(this.options.scaleLabel.fontSize, Chart.defaults.global.defaultFontSize);
@@ -9513,8 +9990,8 @@ module.exports = function(Chart) {
if (this.isHorizontal()) {
setContextLineSettings = true;
- var yTickStart = this.options.position === "bottom" ? this.top : this.bottom - 10;
- var yTickEnd = this.options.position === "bottom" ? this.top + 10 : this.bottom;
+ var yTickStart = this.options.position === "bottom" ? this.top : this.bottom - tl;
+ var yTickEnd = this.options.position === "bottom" ? this.top + tl : this.bottom;
skipRatio = false;
if (((longestRotatedLabel / 2) + this.options.ticks.autoSkipPadding) * this.ticks.length > (this.width - (this.paddingLeft + this.paddingRight))) {
@@ -9582,7 +10059,7 @@ module.exports = function(Chart) {
if (this.options.ticks.display) {
this.ctx.save();
- this.ctx.translate(xLabelValue, (isRotated) ? this.top + 12 : this.options.position === "top" ? this.bottom - 10 : this.top + 10);
+ this.ctx.translate(xLabelValue, (isRotated) ? this.top + 12 : this.options.position === "top" ? this.bottom - tl : this.top + tl);
this.ctx.rotate(helpers.toRadians(this.labelRotation) * -1);
this.ctx.font = tickLabelFont;
this.ctx.textAlign = (isRotated) ? "right" : "center";
@@ -9729,7 +10206,7 @@ module.exports = function(Chart) {
});
};
-},{}],30:[function(require,module,exports){
+},{}],31:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -9764,7 +10241,7 @@ module.exports = function(Chart) {
}
};
};
-},{}],31:[function(require,module,exports){
+},{}],32:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -9958,7 +10435,7 @@ module.exports = function(Chart) {
}
});
};
-},{}],32:[function(require,module,exports){
+},{}],33:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -10197,10 +10674,12 @@ module.exports = function(Chart) {
tooltipPosition = this.getAveragePosition(this._active);
} else {
helpers.each(this._data.datasets, function(dataset, datasetIndex) {
- if (!helpers.isDatasetVisible(dataset)) {
+ if (!this._chartInstance.isDatasetVisible(datasetIndex)) {
return;
}
- var currentElement = dataset.metaData[element._index];
+
+ var meta = this._chartInstance.getDatasetMeta(datasetIndex);
+ var currentElement = meta.data[element._index];
if (currentElement) {
var yScale = element._yScale || element._scale; // handle radar || polarArea charts
@@ -10211,7 +10690,7 @@ module.exports = function(Chart) {
datasetIndex: datasetIndex
});
}
- }, null, element._yScale.options.stacked);
+ }, this);
helpers.each(this._active, function(active) {
if (active) {
@@ -10220,10 +10699,9 @@ module.exports = function(Chart) {
backgroundColor: active._view.backgroundColor
});
}
- }, null, element._yScale.options.stacked);
+ }, null);
tooltipPosition = this.getAveragePosition(this._active);
- tooltipPosition.y = this._active[0]._yScale.getPixelForDecimal(0.5);
}
// Build the Text Lines
@@ -10452,7 +10930,7 @@ module.exports = function(Chart) {
if (vm.title.length) {
ctx.textAlign = vm._titleAlign;
ctx.textBaseline = "top";
-
+
var titleColor = helpers.color(vm.titleColor);
ctx.fillStyle = titleColor.alpha(opacity * titleColor.alpha()).rgbString();
ctx.font = helpers.fontString(vm.titleFontSize, vm._titleFontStyle, vm._titleFontFamily);
@@ -10519,7 +10997,7 @@ module.exports = function(Chart) {
ctx.textAlign = vm._footerAlign;
ctx.textBaseline = "top";
-
+
var footerColor = helpers.color(vm.footerColor);
ctx.fillStyle = footerColor.alpha(opacity * footerColor.alpha()).rgbString();
ctx.font = helpers.fontString(vm.footerFontSize, vm._footerFontStyle, vm._footerFontFamily);
@@ -10575,7 +11053,7 @@ module.exports = function(Chart) {
});
};
-},{}],33:[function(require,module,exports){
+},{}],34:[function(require,module,exports){
"use strict";
module.exports = function(Chart, moment) {
@@ -10667,7 +11145,7 @@ module.exports = function(Chart, moment) {
});
};
-},{}],34:[function(require,module,exports){
+},{}],35:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -10829,7 +11307,7 @@ module.exports = function(Chart) {
}
});
};
-},{}],35:[function(require,module,exports){
+},{}],36:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -10983,7 +11461,7 @@ module.exports = function(Chart) {
}
});
};
-},{}],36:[function(require,module,exports){
+},{}],37:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -11090,7 +11568,7 @@ module.exports = function(Chart) {
});
};
-},{}],37:[function(require,module,exports){
+},{}],38:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -11102,25 +11580,31 @@ module.exports = function(Chart) {
};
var DatasetScale = Chart.Scale.extend({
- buildTicks: function(index) {
- this.startIndex = 0;
- this.endIndex = this.chart.data.labels.length;
+ // Implement this so that
+ determineDataLimits: function() {
+ this.minIndex = 0;
+ this.maxIndex = this.chart.data.labels.length - 1;
var findIndex;
if (this.options.ticks.min !== undefined) {
// user specified min value
findIndex = helpers.indexOf(this.chart.data.labels, this.options.ticks.min);
- this.startIndex = findIndex !== -1 ? findIndex : this.startIndex;
+ this.minIndex = findIndex !== -1 ? findIndex : this.minIndex;
}
if (this.options.ticks.max !== undefined) {
// user specified max value
findIndex = helpers.indexOf(this.chart.data.labels, this.options.ticks.max);
- this.endIndex = findIndex !== -1 ? findIndex : this.endIndex;
+ this.maxIndex = findIndex !== -1 ? findIndex : this.maxIndex;
}
+ this.min = this.chart.data.labels[this.minIndex];
+ this.max = this.chart.data.labels[this.maxIndex];
+ },
+
+ buildTicks: function(index) {
// If we are viewing some subset of labels, slice the original array
- this.ticks = (this.startIndex === 0 && this.endIndex === this.chart.data.labels.length) ? this.chart.data.labels : this.chart.data.labels.slice(this.startIndex, this.endIndex + 1);
+ this.ticks = (this.minIndex === 0 && this.maxIndex === this.chart.data.labels.length - 1) ? this.chart.data.labels : this.chart.data.labels.slice(this.minIndex, this.maxIndex + 1);
},
getLabelForIndex: function(index, datasetIndex) {
@@ -11130,12 +11614,12 @@ module.exports = function(Chart) {
// Used to get data value locations. Value can either be an index or a numerical value
getPixelForValue: function(value, index, datasetIndex, includeOffset) {
// 1 is added because we need the length but we have the indexes
- var offsetAmt = Math.max((this.ticks.length - ((this.options.gridLines.offsetGridLines) ? 0 : 1)), 1);
+ var offsetAmt = Math.max((this.maxIndex + 1 - this.minIndex - ((this.options.gridLines.offsetGridLines) ? 0 : 1)), 1);
if (this.isHorizontal()) {
var innerWidth = this.width - (this.paddingLeft + this.paddingRight);
var valueWidth = innerWidth / offsetAmt;
- var widthOffset = (valueWidth * (index - this.startIndex)) + this.paddingLeft;
+ var widthOffset = (valueWidth * (index - this.minIndex)) + this.paddingLeft;
if (this.options.gridLines.offsetGridLines && includeOffset) {
widthOffset += (valueWidth / 2);
@@ -11145,7 +11629,7 @@ module.exports = function(Chart) {
} else {
var innerHeight = this.height - (this.paddingTop + this.paddingBottom);
var valueHeight = innerHeight / offsetAmt;
- var heightOffset = (valueHeight * (index - this.startIndex)) + this.paddingTop;
+ var heightOffset = (valueHeight * (index - this.minIndex)) + this.paddingTop;
if (this.options.gridLines.offsetGridLines && includeOffset) {
heightOffset += (valueHeight / 2);
@@ -11155,14 +11639,34 @@ module.exports = function(Chart) {
}
},
getPixelForTick: function(index, includeOffset) {
- return this.getPixelForValue(this.ticks[index], index + this.startIndex, null, includeOffset);
+ return this.getPixelForValue(this.ticks[index], index + this.minIndex, null, includeOffset);
+ },
+ getValueForPixel: function(pixel) {
+ var value
+; var offsetAmt = Math.max((this.ticks.length - ((this.options.gridLines.offsetGridLines) ? 0 : 1)), 1);
+ var horz = this.isHorizontal();
+ var innerDimension = horz ? this.width - (this.paddingLeft + this.paddingRight) : this.height - (this.paddingTop + this.paddingBottom);
+ var valueDimension = innerDimension / offsetAmt;
+
+ if (this.options.gridLines.offsetGridLines) {
+ pixel -= (valueDimension / 2);
+ }
+ pixel -= horz ? this.paddingLeft : this.paddingTop;
+
+ if (pixel <= 0) {
+ value = 0;
+ } else {
+ value = Math.round(pixel / valueDimension);
+ }
+
+ return value;
}
});
Chart.scaleService.registerScaleType("category", DatasetScale, defaultConfig);
};
-},{}],38:[function(require,module,exports){
+},{}],39:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -11173,7 +11677,8 @@ module.exports = function(Chart) {
position: "left",
ticks: {
callback: function(tickValue, index, ticks) {
- var delta = ticks[1] - ticks[0];
+ // If we have lots of ticks, don't use the ones
+ var delta = ticks.length > 3 ? ticks[2] - ticks[1] : ticks[1] - ticks[0];
// If we have a number like 2.5 as the delta, figure out how many decimal places we need
if (Math.abs(delta) > 1) {
@@ -11210,23 +11715,23 @@ module.exports = function(Chart) {
var hasPositiveValues = false;
var hasNegativeValues = false;
- helpers.each(this.chart.data.datasets, function(dataset) {
- if (valuesPerType[dataset.type] === undefined) {
- valuesPerType[dataset.type] = {
+ helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) {
+ var meta = this.chart.getDatasetMeta(datasetIndex);
+ if (valuesPerType[meta.type] === undefined) {
+ valuesPerType[meta.type] = {
positiveValues: [],
negativeValues: []
};
}
// Store these per type
- var positiveValues = valuesPerType[dataset.type].positiveValues;
- var negativeValues = valuesPerType[dataset.type].negativeValues;
+ var positiveValues = valuesPerType[meta.type].positiveValues;
+ var negativeValues = valuesPerType[meta.type].negativeValues;
- if (helpers.isDatasetVisible(dataset) && (this.isHorizontal() ? dataset.xAxisID === this.id : dataset.yAxisID === this.id)) {
+ if (this.chart.isDatasetVisible(datasetIndex) && (this.isHorizontal() ? meta.xAxisID === this.id : meta.yAxisID === this.id)) {
helpers.each(dataset.data, function(rawValue, index) {
-
var value = +this.getRightValue(rawValue);
- if (isNaN(value)) {
+ if (isNaN(value) || meta.data[index].hidden) {
return;
}
@@ -11257,11 +11762,12 @@ module.exports = function(Chart) {
}, this);
} else {
- helpers.each(this.chart.data.datasets, function(dataset) {
- if (helpers.isDatasetVisible(dataset) && (this.isHorizontal() ? dataset.xAxisID === this.id : dataset.yAxisID === this.id)) {
+ helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) {
+ var meta = this.chart.getDatasetMeta(datasetIndex);
+ if (this.chart.isDatasetVisible(datasetIndex) && (this.isHorizontal() ? meta.xAxisID === this.id : meta.yAxisID === this.id)) {
helpers.each(dataset.data, function(rawValue, index) {
var value = +this.getRightValue(rawValue);
- if (isNaN(value)) {
+ if (isNaN(value) || meta.data[index].hidden) {
return;
}
@@ -11414,6 +11920,19 @@ module.exports = function(Chart) {
return Math.round(pixel);
}
},
+ getValueForPixel: function(pixel) {
+ var offset;
+
+ if (this.isHorizontal()) {
+ var innerWidth = this.width - (this.paddingLeft + this.paddingRight);
+ offset = (pixel - this.left - this.paddingLeft) / innerWidth;
+ } else {
+ var innerHeight = this.height - (this.paddingTop + this.paddingBottom);
+ offset = (this.bottom - this.paddingBottom - pixel) / innerHeight;
+ }
+
+ return this.start + ((this.end - this.start) * offset);
+ },
getPixelForTick: function(index, includeOffset) {
return this.getPixelForValue(this.ticksAsNumbers[index], null, null, includeOffset);
}
@@ -11421,7 +11940,7 @@ module.exports = function(Chart) {
Chart.scaleService.registerScaleType("linear", LinearScale, defaultConfig);
};
-},{}],39:[function(require,module,exports){
+},{}],40:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -11454,16 +11973,17 @@ module.exports = function(Chart) {
if (this.options.stacked) {
var valuesPerType = {};
- helpers.each(this.chart.data.datasets, function(dataset) {
- if (helpers.isDatasetVisible(dataset) && (this.isHorizontal() ? dataset.xAxisID === this.id : dataset.yAxisID === this.id)) {
- if (valuesPerType[dataset.type] === undefined) {
- valuesPerType[dataset.type] = [];
+ helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) {
+ var meta = this.chart.getDatasetMeta(datasetIndex);
+ if (this.chart.isDatasetVisible(datasetIndex) && (this.isHorizontal() ? meta.xAxisID === this.id : meta.yAxisID === this.id)) {
+ if (valuesPerType[meta.type] === undefined) {
+ valuesPerType[meta.type] = [];
}
helpers.each(dataset.data, function(rawValue, index) {
- var values = valuesPerType[dataset.type];
+ var values = valuesPerType[meta.type];
var value = +this.getRightValue(rawValue);
- if (isNaN(value)) {
+ if (isNaN(value) || meta.data[index].hidden) {
return;
}
@@ -11487,11 +12007,12 @@ module.exports = function(Chart) {
}, this);
} else {
- helpers.each(this.chart.data.datasets, function(dataset) {
- if (helpers.isDatasetVisible(dataset) && (this.isHorizontal() ? dataset.xAxisID === this.id : dataset.yAxisID === this.id)) {
+ helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) {
+ var meta = this.chart.getDatasetMeta(datasetIndex);
+ if (this.chart.isDatasetVisible(datasetIndex) && (this.isHorizontal() ? meta.xAxisID === this.id : meta.yAxisID === this.id)) {
helpers.each(dataset.data, function(rawValue, index) {
var value = +this.getRightValue(rawValue);
- if (isNaN(value)) {
+ if (isNaN(value) || meta.data[index].hidden) {
return;
}
@@ -11588,8 +12109,8 @@ module.exports = function(Chart) {
getPixelForValue: function(value, index, datasetIndex, includeOffset) {
var pixel;
- var newVal = +this.getRightValue(value);
- var range = helpers.log10(this.end) - helpers.log10(this.start);
+ var newVal = +this.getRightValue(value)
+; var range = helpers.log10(this.end) - helpers.log10(this.start);
if (this.isHorizontal()) {
@@ -11611,13 +12132,28 @@ module.exports = function(Chart) {
}
return pixel;
+ },
+ getValueForPixel: function(pixel) {
+ var offset;
+ var range = helpers.log10(this.end) - helpers.log10(this.start);
+ var value;
+
+ if (this.isHorizontal()) {
+ var innerWidth = this.width - (this.paddingLeft + this.paddingRight);
+ value = this.start * Math.pow(10, (pixel - this.left - this.paddingLeft) * range / innerWidth);
+ } else {
+ var innerHeight = this.height - (this.paddingTop + this.paddingBottom);
+ value = Math.pow(10, (this.bottom - this.paddingBottom - pixel) * range / innerHeight) / this.start;
+ }
+
+ return value;
}
});
Chart.scaleService.registerScaleType("logarithmic", LogarithmicScale, defaultConfig);
};
-},{}],40:[function(require,module,exports){
+},{}],41:[function(require,module,exports){
"use strict";
module.exports = function(Chart) {
@@ -11683,11 +12219,12 @@ module.exports = function(Chart) {
this.min = null;
this.max = null;
- helpers.each(this.chart.data.datasets, function(dataset) {
- if (helpers.isDatasetVisible(dataset)) {
+ helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) {
+ if (this.chart.isDatasetVisible(datasetIndex)) {
+ var meta = this.chart.getDatasetMeta(datasetIndex);
helpers.each(dataset.data, function(rawValue, index) {
var value = +this.getRightValue(rawValue);
- if (isNaN(value)) {
+ if (isNaN(value) || meta.data[index].hidden) {
return;
}
@@ -12015,7 +12552,7 @@ module.exports = function(Chart) {
}
// Extra 3px out for some label spacing
var pointLabelPosition = this.getPointPosition(i, this.getDistanceFromCenterForValue(this.options.reverse ? this.min : this.max) + 5);
-
+
var pointLabelFontColor = helpers.getValueOrDefault(this.options.pointLabels.fontColor, Chart.defaults.global.defaultFontColor);
var pointLabelFontSize = helpers.getValueOrDefault(this.options.pointLabels.fontSize, Chart.defaults.global.defaultFontSize);
var pointLabeFontStyle = helpers.getValueOrDefault(this.options.pointLabels.fontStyle, Chart.defaults.global.defaultFontStyle);
@@ -12058,7 +12595,7 @@ module.exports = function(Chart) {
Chart.scaleService.registerScaleType("radialLinear", LinearRadialScale, defaultConfig);
};
-},{}],41:[function(require,module,exports){
+},{}],42:[function(require,module,exports){
/*global window: false */
"use strict";
@@ -12147,10 +12684,13 @@ module.exports = function(Chart) {
if (this.chart.data.labels && this.chart.data.labels.length > 0) {
helpers.each(this.chart.data.labels, function(label, index) {
var labelMoment = this.parseTime(label);
- if (this.options.time.round) {
- labelMoment.startOf(this.options.time.round);
+
+ if (labelMoment.isValid()) {
+ if (this.options.time.round) {
+ labelMoment.startOf(this.options.time.round);
+ }
+ scaleLabelMoments.push(labelMoment);
}
- scaleLabelMoments.push(labelMoment);
}, this);
this.firstTick = moment.min.call(this, scaleLabelMoments);
@@ -12162,18 +12702,24 @@ module.exports = function(Chart) {
helpers.each(this.chart.data.datasets, function(dataset, datasetIndex) {
var momentsForDataset = [];
+ var datasetVisible = this.chart.isDatasetVisible(datasetIndex);
if (typeof dataset.data[0] === 'object') {
helpers.each(dataset.data, function(value, index) {
var labelMoment = this.parseTime(this.getRightValue(value));
- if (this.options.time.round) {
- labelMoment.startOf(this.options.time.round);
- }
- momentsForDataset.push(labelMoment);
- // May have gone outside the scale ranges, make sure we keep the first and last ticks updated
- this.firstTick = this.firstTick !== null ? moment.min(this.firstTick, labelMoment) : labelMoment;
- this.lastTick = this.lastTick !== null ? moment.max(this.lastTick, labelMoment) : labelMoment;
+ if (labelMoment.isValid()) {
+ if (this.options.time.round) {
+ labelMoment.startOf(this.options.time.round);
+ }
+ momentsForDataset.push(labelMoment);
+
+ if (datasetVisible) {
+ // May have gone outside the scale ranges, make sure we keep the first and last ticks updated
+ this.firstTick = this.firstTick !== null ? moment.min(this.firstTick, labelMoment) : labelMoment;
+ this.lastTick = this.lastTick !== null ? moment.max(this.lastTick, labelMoment) : labelMoment;
+ }
+ }
}, this);
} else {
// We have no labels. Use the ones from the scale
@@ -12260,7 +12806,9 @@ module.exports = function(Chart) {
unitDefinition = time.units[unitDefinitionIndex];
this.tickUnit = unitDefinition.name;
- this.scaleSizeInUnits = this.lastTick.diff(this.firstTick, this.tickUnit, true);
+ var leadingUnitBuffer = this.firstTick.diff(this.firstTick.clone().startOf(this.tickUnit), this.tickUnit, true);
+ var trailingUnitBuffer = this.lastTick.clone().add(1, this.tickUnit).startOf(this.tickUnit).diff(this.lastTick, this.tickUnit, true);
+ this.scaleSizeInUnits = this.lastTick.diff(this.firstTick, this.tickUnit, true) + leadingUnitBuffer + trailingUnitBuffer;
this.displayFormat = this.options.time.displayFormats[unitDefinition.name];
}
}
@@ -12278,7 +12826,11 @@ module.exports = function(Chart) {
// Only round the last tick if we have no hard maximum
if (!this.options.time.max) {
- this.lastTick.endOf(this.tickUnit);
+ var roundedEnd = this.lastTick.clone().startOf(this.tickUnit);
+ if (roundedEnd.diff(this.lastTick, this.tickUnit, true) !== 0) {
+ // Do not use end of because we need this to be in the next time unit
+ this.lastTick.add(1, this.tickUnit).startOf(this.tickUnit);
+ }
}
this.smallestLabelSeparation = this.width;
@@ -12298,7 +12850,7 @@ module.exports = function(Chart) {
this.ticks.push(this.firstTick.clone());
// For every unit in between the first and last moment, create a moment and add it to the ticks tick
- for (var i = 1; i < this.scaleSizeInUnits; ++i) {
+ for (var i = 1; i <= this.scaleSizeInUnits; ++i) {
var newTick = roundedStart.clone().add(i, this.tickUnit);
// Are we greater than the max time
@@ -12312,18 +12864,19 @@ module.exports = function(Chart) {
}
// Always show the right tick
- if (this.ticks[this.ticks.length - 1].diff(this.lastTick, this.tickUnit) !== 0 || this.scaleSizeInUnits === 0) {
- // this is a weird case. If the option is the same as the end option, we can't just diff the times because the tick was created from the roundedStart
- // but the last tick was not rounded.
+ var diff = this.ticks[this.ticks.length - 1].diff(this.lastTick, this.tickUnit);
+ if (diff !== 0 || this.scaleSizeInUnits === 0) {
+ // this is a weird case. If the option is the same as the end option, we can't just diff the times because the tick was created from the roundedStart
+ // but the last tick was not rounded.
if (this.options.time.max) {
this.ticks.push(this.lastTick.clone());
this.scaleSizeInUnits = this.lastTick.diff(this.ticks[0], this.tickUnit, true);
} else {
- this.scaleSizeInUnits = Math.ceil(this.scaleSizeInUnits / this.unitScale) * this.unitScale;
- this.ticks.push(this.firstTick.clone().add(this.scaleSizeInUnits, this.tickUnit));
- this.lastTick = this.ticks[this.ticks.length - 1].clone();
+ this.ticks.push(this.lastTick.clone());
+ this.scaleSizeInUnits = this.lastTick.diff(this.firstTick, this.tickUnit, true);
}
}
+
this.ctx.restore();
},
// Get tooltip label
@@ -12355,7 +12908,7 @@ module.exports = function(Chart) {
this.ticks = this.ticks.map(this.tickFormatFunction, this);
},
getPixelForValue: function(value, index, datasetIndex, includeOffset) {
- var labelMoment = this.getLabelMoment(datasetIndex, index);
+ var labelMoment = value && value.isValid && value.isValid() ? value : this.getLabelMoment(datasetIndex, index);
if (labelMoment) {
var offset = labelMoment.diff(this.firstTick, this.tickUnit, true);
@@ -12377,6 +12930,12 @@ module.exports = function(Chart) {
}
}
},
+ getValueForPixel: function(pixel) {
+ var innerDimension = this.isHorizontal() ? this.width - (this.paddingLeft + this.paddingRight) : this.height - (this.paddingTop + this.paddingBottom);
+ var offset = (pixel - (this.isHorizontal() ? this.left + this.paddingLeft : this.top + this.paddingTop)) / innerDimension;
+ offset *= this.scaleSizeInUnits;
+ return this.firstTick.clone().add(moment.duration(offset, this.tickUnit).asSeconds(), 'seconds');
+ },
parseTime: function(label) {
if (typeof this.options.time.parser === 'string') {
return moment(label, this.options.time.parser);
diff --git a/vendors/Chart.js/dist/Chart.bundle.min.js b/vendors/Chart.js/dist/Chart.bundle.min.js
index bd2f96b5..35fc5913 100644
--- a/vendors/Chart.js/dist/Chart.bundle.min.js
+++ b/vendors/Chart.js/dist/Chart.bundle.min.js
@@ -1,21 +1,21 @@
-!function t(e,i,a){function s(n,r){if(!i[n]){if(!e[n]){var l="function"==typeof require&&require;if(!r&&l)return l(n,!0);if(o)return o(n,!0);var h=new Error("Cannot find module '"+n+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[n]={exports:{}};e[n][0].call(c.exports,function(t){var i=e[n][1][t];return s(i?i:t)},c,c.exports,t,e,i,a)}return i[n].exports}for(var o="function"==typeof require&&require,n=0;ne&&(e+=360),a=(r+l)/2,i=l==r?0:.5>=a?h/(l+r):h/(2-l-r),[e,100*i,100*a]}function s(t){var e,i,a,s=t[0],o=t[1],n=t[2],r=Math.min(s,o,n),l=Math.max(s,o,n),h=l-r;return i=0==l?0:h/l*1e3/10,l==r?e=0:s==l?e=(o-n)/h:o==l?e=2+(n-s)/h:n==l&&(e=4+(s-o)/h),e=Math.min(60*e,360),0>e&&(e+=360),a=l/255*1e3/10,[e,i,a]}function o(t){var e=t[0],i=t[1],s=t[2],o=a(t)[0],n=1/255*Math.min(e,Math.min(i,s)),s=1-1/255*Math.max(e,Math.max(i,s));return[o,100*n,100*s]}function n(t){var e,i,a,s,o=t[0]/255,n=t[1]/255,r=t[2]/255;return s=Math.min(1-o,1-n,1-r),e=(1-o-s)/(1-s)||0,i=(1-n-s)/(1-s)||0,a=(1-r-s)/(1-s)||0,[100*e,100*i,100*a,100*s]}function l(t){return X[JSON.stringify(t)]}function h(t){var e=t[0]/255,i=t[1]/255,a=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92;var s=.4124*e+.3576*i+.1805*a,o=.2126*e+.7152*i+.0722*a,n=.0193*e+.1192*i+.9505*a;return[100*s,100*o,100*n]}function c(t){var e,i,a,s=h(t),o=s[0],n=s[1],r=s[2];return o/=95.047,n/=100,r/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*n-16,i=500*(o-n),a=200*(n-r),[e,i,a]}function u(t){return z(c(t))}function d(t){var e,i,a,s,o,n=t[0]/360,r=t[1]/100,l=t[2]/100;if(0==r)return o=255*l,[o,o,o];i=.5>l?l*(1+r):l+r-l*r,e=2*l-i,s=[0,0,0];for(var h=0;3>h;h++)a=n+1/3*-(h-1),0>a&&a++,a>1&&a--,o=1>6*a?e+6*(i-e)*a:1>2*a?i:2>3*a?e+(i-e)*(2/3-a)*6:e,s[h]=255*o;return s}function f(t){var e,i,a=t[0],s=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,s*=1>=o?o:2-o,i=(o+s)/2,e=2*s/(o+s),[a,100*e,100*i])}function m(t){return o(d(t))}function p(t){return n(d(t))}function v(t){return l(d(t))}function x(t){var e=t[0]/60,i=t[1]/100,a=t[2]/100,s=Math.floor(e)%6,o=e-Math.floor(e),n=255*a*(1-i),r=255*a*(1-i*o),l=255*a*(1-i*(1-o)),a=255*a;switch(s){case 0:return[a,l,n];case 1:return[r,a,n];case 2:return[n,a,l];case 3:return[n,r,a];case 4:return[l,n,a];case 5:return[a,n,r]}}function y(t){var e,i,a=t[0],s=t[1]/100,o=t[2]/100;return i=(2-s)*o,e=s*o,e/=1>=i?i:2-i,e=e||0,i/=2,[a,100*e,100*i]}function k(t){return o(x(t))}function _(t){return n(x(t))}function D(t){return l(x(t))}function S(t){var e,i,a,s,o=t[0]/360,n=t[1]/100,l=t[2]/100,h=n+l;switch(h>1&&(n/=h,l/=h),e=Math.floor(6*o),i=1-l,a=6*o-e,0!=(1&e)&&(a=1-a),s=n+a*(i-n),e){default:case 6:case 0:r=i,g=s,b=n;break;case 1:r=s,g=i,b=n;break;case 2:r=n,g=i,b=s;break;case 3:r=n,g=s,b=i;break;case 4:r=s,g=n,b=i;break;case 5:r=i,g=n,b=s}return[255*r,255*g,255*b]}function w(t){return a(S(t))}function C(t){return s(S(t))}function M(t){return n(S(t))}function A(t){return l(S(t))}function I(t){var e,i,a,s=t[0]/100,o=t[1]/100,n=t[2]/100,r=t[3]/100;return e=1-Math.min(1,s*(1-r)+r),i=1-Math.min(1,o*(1-r)+r),a=1-Math.min(1,n*(1-r)+r),[255*e,255*i,255*a]}function T(t){return a(I(t))}function F(t){return s(I(t))}function P(t){return o(I(t))}function O(t){return l(I(t))}function V(t){var e,i,a,s=t[0]/100,o=t[1]/100,n=t[2]/100;return e=3.2406*s+-1.5372*o+n*-.4986,i=s*-.9689+1.8758*o+.0415*n,a=.0557*s+o*-.204+1.057*n,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e=12.92*e,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i=12.92*i,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=12.92*a,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*e,255*i,255*a]}function W(t){var e,i,a,s=t[0],o=t[1],n=t[2];return s/=95.047,o/=100,n/=108.883,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,e=116*o-16,i=500*(s-o),a=200*(o-n),[e,i,a]}function L(t){return z(W(t))}function R(t){var e,i,a,s,o=t[0],n=t[1],r=t[2];return 8>=o?(i=100*o/903.3,s=7.787*(i/100)+16/116):(i=100*Math.pow((o+16)/116,3),s=Math.pow(i/100,1/3)),e=.008856>=e/95.047?e=95.047*(n/500+s-16/116)/7.787:95.047*Math.pow(n/500+s,3),a=.008859>=a/108.883?a=108.883*(s-r/200-16/116)/7.787:108.883*Math.pow(s-r/200,3),[e,i,a]}function z(t){var e,i,a,s=t[0],o=t[1],n=t[2];return e=Math.atan2(n,o),i=360*e/2/Math.PI,0>i&&(i+=360),a=Math.sqrt(o*o+n*n),[s,a,i]}function B(t){return V(R(t))}function Y(t){var e,i,a,s=t[0],o=t[1],n=t[2];return a=n/360*2*Math.PI,e=o*Math.cos(a),i=o*Math.sin(a),[s,e,i]}function N(t){return R(Y(t))}function H(t){return B(Y(t))}function E(t){return J[t]}function U(t){return a(E(t))}function j(t){return s(E(t))}function q(t){return o(E(t))}function G(t){return n(E(t))}function Z(t){return c(E(t))}function Q(t){return h(E(t))}e.exports={rgb2hsl:a,rgb2hsv:s,rgb2hwb:o,rgb2cmyk:n,rgb2keyword:l,rgb2xyz:h,rgb2lab:c,rgb2lch:u,hsl2rgb:d,hsl2hsv:f,hsl2hwb:m,hsl2cmyk:p,hsl2keyword:v,hsv2rgb:x,hsv2hsl:y,hsv2hwb:k,hsv2cmyk:_,hsv2keyword:D,hwb2rgb:S,hwb2hsl:w,hwb2hsv:C,hwb2cmyk:M,hwb2keyword:A,cmyk2rgb:I,cmyk2hsl:T,cmyk2hsv:F,cmyk2hwb:P,cmyk2keyword:O,keyword2rgb:E,keyword2hsl:U,keyword2hsv:j,keyword2hwb:q,keyword2cmyk:G,keyword2lab:Z,keyword2xyz:Q,xyz2rgb:V,xyz2lab:W,xyz2lch:L,lab2xyz:R,lab2rgb:B,lab2lch:z,lch2lab:Y,lch2xyz:N,lch2rgb:H};var J={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},X={};for(var $ in J)X[JSON.stringify(J[$])]=$},{}],2:[function(t,e,i){var a=t("./conversions"),s=function(){return new h};for(var o in a){s[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(o);var n=/(\w+)2(\w+)/.exec(o),r=n[1],l=n[2];s[r]=s[r]||{},s[r][l]=s[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=a[t](e);if("string"==typeof i||void 0===i)return i;for(var s=0;se||t[3]&&t[3]<1?u(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function u(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function d(t,e){if(1>e||t[3]&&t[3]<1)return f(t,e);var i=Math.round(t[0]/255*100),a=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgb("+i+"%, "+a+"%, "+s+"%)"}function f(t,e){var i=Math.round(t[0]/255*100),a=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgba("+i+"%, "+a+"%, "+s+"%, "+(e||t[3]||1)+")"}function g(t,e){return 1>e||t[3]&&t[3]<1?m(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function b(t){return k[t.slice(0,3)]}function v(t,e,i){return Math.min(Math.max(e,t),i)}function x(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y=t("color-name");e.exports={getRgba:a,getHsla:s,getRgb:n,getHsl:r,getHwb:o,getAlpha:l,hexString:h,rgbString:c,rgbaString:u,percentString:d,percentaString:f,hslString:g,hslaString:m,hwbString:p,keyword:b};var k={};for(var _ in y)k[y[_]]=_},{"color-name":4}],4:[function(t,e,i){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],5:[function(t,e,i){var a=t("color-convert"),s=t("color-string"),o=function(t){if(t instanceof o)return t;if(!(this instanceof o))return new o(t);if(this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},"string"==typeof t){var e=s.getRgba(t);if(e)this.setValues("rgb",e);else if(e=s.getHsla(t))this.setValues("hsl",e);else{if(!(e=s.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}}else if("object"==typeof t){var e=t;if(void 0!==e.r||void 0!==e.red)this.setValues("rgb",e);else if(void 0!==e.l||void 0!==e.lightness)this.setValues("hsl",e);else if(void 0!==e.v||void 0!==e.value)this.setValues("hsv",e);else if(void 0!==e.w||void 0!==e.whiteness)this.setValues("hwb",e);else{if(void 0===e.c&&void 0===e.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(t));this.setValues("cmyk",e)}}};o.prototype={rgb:function(t){return this.setSpace("rgb",arguments)},hsl:function(t){return this.setSpace("hsl",arguments)},hsv:function(t){return this.setSpace("hsv",arguments)},hwb:function(t){return this.setSpace("hwb",arguments)},cmyk:function(t){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){return 1!==this.values.alpha?this.values.hwb.concat([this.values.alpha]):this.values.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values.rgb;return t.concat([this.values.alpha])},hslaArray:function(){var t=this.values.hsl;return t.concat([this.values.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return s.hexString(this.values.rgb)},rgbString:function(){return s.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return s.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return s.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return s.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return s.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return s.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return s.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){return this.values.rgb[0]<<16|this.values.rgb[1]<<8|this.values.rgb[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(299*t[0]+587*t[1]+114*t[2])/1e3;return 128>e},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;3>e;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=0>e?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){e=1-(null==e?.5:e);for(var i=2*e-1,a=this.alpha()-t.alpha(),s=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,o=1-s,n=this.rgbArray(),r=t.rgbArray(),l=0;le&&(e+=360),a=(r+h)/2,i=h==r?0:.5>=a?l/(h+r):l/(2-h-r),[e,100*i,100*a]}function s(t){var e,i,a,s=t[0],o=t[1],n=t[2],r=Math.min(s,o,n),h=Math.max(s,o,n),l=h-r;return i=0==h?0:l/h*1e3/10,h==r?e=0:s==h?e=(o-n)/l:o==h?e=2+(n-s)/l:n==h&&(e=4+(s-o)/l),e=Math.min(60*e,360),0>e&&(e+=360),a=h/255*1e3/10,[e,i,a]}function o(t){var e=t[0],i=t[1],s=t[2],o=a(t)[0],n=1/255*Math.min(e,Math.min(i,s)),s=1-1/255*Math.max(e,Math.max(i,s));return[o,100*n,100*s]}function n(t){var e,i,a,s,o=t[0]/255,n=t[1]/255,r=t[2]/255;return s=Math.min(1-o,1-n,1-r),e=(1-o-s)/(1-s)||0,i=(1-n-s)/(1-s)||0,a=(1-r-s)/(1-s)||0,[100*e,100*i,100*a,100*s]}function h(t){return X[JSON.stringify(t)]}function l(t){var e=t[0]/255,i=t[1]/255,a=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92;var s=.4124*e+.3576*i+.1805*a,o=.2126*e+.7152*i+.0722*a,n=.0193*e+.1192*i+.9505*a;return[100*s,100*o,100*n]}function c(t){var e,i,a,s=l(t),o=s[0],n=s[1],r=s[2];return o/=95.047,n/=100,r/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*n-16,i=500*(o-n),a=200*(n-r),[e,i,a]}function d(t){return z(c(t))}function u(t){var e,i,a,s,o,n=t[0]/360,r=t[1]/100,h=t[2]/100;if(0==r)return o=255*h,[o,o,o];i=.5>h?h*(1+r):h+r-h*r,e=2*h-i,s=[0,0,0];for(var l=0;3>l;l++)a=n+1/3*-(l-1),0>a&&a++,a>1&&a--,o=1>6*a?e+6*(i-e)*a:1>2*a?i:2>3*a?e+(i-e)*(2/3-a)*6:e,s[l]=255*o;return s}function f(t){var e,i,a=t[0],s=t[1]/100,o=t[2]/100;return 0===o?[0,0,0]:(o*=2,s*=1>=o?o:2-o,i=(o+s)/2,e=2*s/(o+s),[a,100*e,100*i])}function m(t){return o(u(t))}function p(t){return n(u(t))}function v(t){return h(u(t))}function x(t){var e=t[0]/60,i=t[1]/100,a=t[2]/100,s=Math.floor(e)%6,o=e-Math.floor(e),n=255*a*(1-i),r=255*a*(1-i*o),h=255*a*(1-i*(1-o)),a=255*a;switch(s){case 0:return[a,h,n];case 1:return[r,a,n];case 2:return[n,a,h];case 3:return[n,r,a];case 4:return[h,n,a];case 5:return[a,n,r]}}function y(t){var e,i,a=t[0],s=t[1]/100,o=t[2]/100;return i=(2-s)*o,e=s*o,e/=1>=i?i:2-i,e=e||0,i/=2,[a,100*e,100*i]}function k(t){return o(x(t))}function _(t){return n(x(t))}function S(t){return h(x(t))}function D(t){var e,i,a,s,o=t[0]/360,n=t[1]/100,h=t[2]/100,l=n+h;switch(l>1&&(n/=l,h/=l),e=Math.floor(6*o),i=1-h,a=6*o-e,0!=(1&e)&&(a=1-a),s=n+a*(i-n),e){default:case 6:case 0:r=i,g=s,b=n;break;case 1:r=s,g=i,b=n;break;case 2:r=n,g=i,b=s;break;case 3:r=n,g=s,b=i;break;case 4:r=s,g=n,b=i;break;case 5:r=i,g=n,b=s}return[255*r,255*g,255*b]}function w(t){return a(D(t))}function M(t){return s(D(t))}function C(t){return n(D(t))}function A(t){return h(D(t))}function I(t){var e,i,a,s=t[0]/100,o=t[1]/100,n=t[2]/100,r=t[3]/100;return e=1-Math.min(1,s*(1-r)+r),i=1-Math.min(1,o*(1-r)+r),a=1-Math.min(1,n*(1-r)+r),[255*e,255*i,255*a]}function T(t){return a(I(t))}function F(t){return s(I(t))}function P(t){return o(I(t))}function O(t){return h(I(t))}function V(t){var e,i,a,s=t[0]/100,o=t[1]/100,n=t[2]/100;return e=3.2406*s+-1.5372*o+n*-.4986,i=s*-.9689+1.8758*o+.0415*n,a=.0557*s+o*-.204+1.057*n,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e=12.92*e,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i=12.92*i,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=12.92*a,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*e,255*i,255*a]}function W(t){var e,i,a,s=t[0],o=t[1],n=t[2];return s/=95.047,o/=100,n/=108.883,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,e=116*o-16,i=500*(s-o),a=200*(o-n),[e,i,a]}function L(t){return z(W(t))}function R(t){var e,i,a,s,o=t[0],n=t[1],r=t[2];return 8>=o?(i=100*o/903.3,s=7.787*(i/100)+16/116):(i=100*Math.pow((o+16)/116,3),s=Math.pow(i/100,1/3)),e=.008856>=e/95.047?e=95.047*(n/500+s-16/116)/7.787:95.047*Math.pow(n/500+s,3),a=.008859>=a/108.883?a=108.883*(s-r/200-16/116)/7.787:108.883*Math.pow(s-r/200,3),[e,i,a]}function z(t){var e,i,a,s=t[0],o=t[1],n=t[2];return e=Math.atan2(n,o),i=360*e/2/Math.PI,0>i&&(i+=360),a=Math.sqrt(o*o+n*n),[s,a,i]}function B(t){return V(R(t))}function Y(t){var e,i,a,s=t[0],o=t[1],n=t[2];return a=n/360*2*Math.PI,e=o*Math.cos(a),i=o*Math.sin(a),[s,e,i]}function H(t){return R(Y(t))}function N(t){return B(Y(t))}function E(t){return J[t]}function U(t){return a(E(t))}function j(t){return s(E(t))}function G(t){return o(E(t))}function q(t){return n(E(t))}function Z(t){return c(E(t))}function Q(t){return l(E(t))}e.exports={rgb2hsl:a,rgb2hsv:s,rgb2hwb:o,rgb2cmyk:n,rgb2keyword:h,rgb2xyz:l,rgb2lab:c,rgb2lch:d,hsl2rgb:u,hsl2hsv:f,hsl2hwb:m,hsl2cmyk:p,hsl2keyword:v,hsv2rgb:x,hsv2hsl:y,hsv2hwb:k,hsv2cmyk:_,hsv2keyword:S,hwb2rgb:D,hwb2hsl:w,hwb2hsv:M,hwb2cmyk:C,hwb2keyword:A,cmyk2rgb:I,cmyk2hsl:T,cmyk2hsv:F,cmyk2hwb:P,cmyk2keyword:O,keyword2rgb:E,keyword2hsl:U,keyword2hsv:j,keyword2hwb:G,keyword2cmyk:q,keyword2lab:Z,keyword2xyz:Q,xyz2rgb:V,xyz2lab:W,xyz2lch:L,lab2xyz:R,lab2rgb:B,lab2lch:z,lch2lab:Y,lch2xyz:H,lch2rgb:N};var J={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},X={};for(var $ in J)X[JSON.stringify(J[$])]=$},{}],2:[function(t,e,i){var a=t("./conversions"),s=function(){return new l};for(var o in a){s[o+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),a[t](e)}}(o);var n=/(\w+)2(\w+)/.exec(o),r=n[1],h=n[2];s[r]=s[r]||{},s[r][h]=s[o]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var i=a[t](e);if("string"==typeof i||void 0===i)return i;for(var s=0;se||t[3]&&t[3]<1?d(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function d(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function u(t,e){if(1>e||t[3]&&t[3]<1)return f(t,e);var i=Math.round(t[0]/255*100),a=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgb("+i+"%, "+a+"%, "+s+"%)"}function f(t,e){var i=Math.round(t[0]/255*100),a=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgba("+i+"%, "+a+"%, "+s+"%, "+(e||t[3]||1)+")"}function g(t,e){return 1>e||t[3]&&t[3]<1?m(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function b(t){return k[t.slice(0,3)]}function v(t,e,i){return Math.min(Math.max(e,t),i)}function x(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y=t("color-name");e.exports={getRgba:a,getHsla:s,getRgb:n,getHsl:r,getHwb:o,getAlpha:h,hexString:l,rgbString:c,rgbaString:d,percentString:u,percentaString:f,hslString:g,hslaString:m,hwbString:p,keyword:b};var k={};for(var _ in y)k[y[_]]=_},{"color-name":4}],4:[function(t,e,i){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],5:[function(t,e,i){var a=t("color-convert"),s=t("color-string"),o=function(t){if(t instanceof o)return t;if(!(this instanceof o))return new o(t);if(this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},"string"==typeof t){var e=s.getRgba(t);if(e)this.setValues("rgb",e);else if(e=s.getHsla(t))this.setValues("hsl",e);else{if(!(e=s.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}}else if("object"==typeof t){var e=t;if(void 0!==e.r||void 0!==e.red)this.setValues("rgb",e);else if(void 0!==e.l||void 0!==e.lightness)this.setValues("hsl",e);else if(void 0!==e.v||void 0!==e.value)this.setValues("hsv",e);else if(void 0!==e.w||void 0!==e.whiteness)this.setValues("hwb",e);else{if(void 0===e.c&&void 0===e.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(t));this.setValues("cmyk",e)}}};o.prototype={rgb:function(t){return this.setSpace("rgb",arguments)},hsl:function(t){return this.setSpace("hsl",arguments)},hsv:function(t){return this.setSpace("hsv",arguments)},hwb:function(t){return this.setSpace("hwb",arguments)},cmyk:function(t){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){return 1!==this.values.alpha?this.values.hwb.concat([this.values.alpha]):this.values.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values.rgb;return t.concat([this.values.alpha])},hslaArray:function(){var t=this.values.hsl;return t.concat([this.values.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return s.hexString(this.values.rgb)},rgbString:function(){return s.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return s.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return s.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return s.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return s.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return s.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return s.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){return this.values.rgb[0]<<16|this.values.rgb[1]<<8|this.values.rgb[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(299*t[0]+587*t[1]+114*t[2])/1e3;return 128>e},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;3>e;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=0>e?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){e=1-(null==e?.5:e);for(var i=2*e-1,a=this.alpha()-t.alpha(),s=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,o=1-s,n=this.rgbArray(),r=t.rgbArray(),h=0;h0)for(i in Ri)a=Ri[i],s=e[a],"undefined"!=typeof s&&(t[a]=s);return t}function m(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),zi===!1&&(zi=!0,i.updateOffset(this),zi=!1)}function p(t){return t instanceof m||null!=t&&null!=t._isAMomentObject}function b(t){return 0>t?Math.ceil(t):Math.floor(t)}function v(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=b(e)),i}function x(t,e,i){var a,s=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),n=0;for(a=0;s>a;a++)(i&&t[a]!==e[a]||!i&&v(t[a])!==v(e[a]))&&n++;return n+o}function y(){}function k(t){return t?t.toLowerCase().replace("_","-"):t}function _(t){for(var e,i,a,s,o=0;o0;){if(a=D(s.slice(0,e).join("-")))return a;if(i&&i.length>=e&&x(s,i,!0)>=e-1)break;e--}o++}return null}function D(i){var a=null;if(!Bi[i]&&"undefined"!=typeof e&&e&&e.exports)try{a=Li._abbr,t("./locale/"+i),S(a)}catch(s){}return Bi[i]}function S(t,e){var i;return t&&(i="undefined"==typeof e?C(t):w(t,e),i&&(Li=i)),Li._abbr}function w(t,e){return null!==e?(e.abbr=t,Bi[t]=Bi[t]||new y,Bi[t].set(e),S(t),Bi[t]):(delete Bi[t],null)}function C(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Li;if(!s(t)){if(e=D(t))return e;t=[t]}return _(t)}function M(t,e){var i=t.toLowerCase();Yi[i]=Yi[i+"s"]=Yi[e]=t}function A(t){return"string"==typeof t?Yi[t]||Yi[t.toLowerCase()]:void 0}function I(t){var e,i,a={};for(i in t)r(t,i)&&(e=A(i),e&&(a[e]=t[i]));return a}function T(t,e){return function(a){return null!=a?(P(this,t,a),i.updateOffset(this,e),this):F(this,t)}}function F(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function P(t,e,i){return t._d["set"+(t._isUTC?"UTC":"")+e](i)}function O(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(t=A(t),"function"==typeof this[t])return this[t](e);return this}function V(t,e,i){var a=""+Math.abs(t),s=e-a.length,o=t>=0;return(o?i?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+a}function W(t,e,i,a){var s=a;"string"==typeof a&&(s=function(){return this[a]()}),t&&(Ui[t]=s),e&&(Ui[e[0]]=function(){return V(s.apply(this,arguments),e[1],e[2])}),i&&(Ui[i]=function(){return this.localeData().ordinal(s.apply(this,arguments),t)})}function L(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function R(t){var e,i,a=t.match(Ni);for(e=0,i=a.length;i>e;e++)Ui[a[e]]?a[e]=Ui[a[e]]:a[e]=L(a[e]);return function(s){var o="";for(e=0;i>e;e++)o+=a[e]instanceof Function?a[e].call(s,t):a[e];return o}}function z(t,e){return t.isValid()?(e=B(e,t.localeData()),Ei[e]=Ei[e]||R(e),Ei[e](t)):t.localeData().invalidDate()}function B(t,e){function i(t){return e.longDateFormat(t)||t}var a=5;for(Hi.lastIndex=0;a>=0&&Hi.test(t);)t=t.replace(Hi,i),Hi.lastIndex=0,a-=1;return t}function Y(t){return"function"==typeof t&&"[object Function]"===Object.prototype.toString.call(t)}function N(t,e,i){oa[t]=Y(e)?e:function(t){return t&&i?i:e}}function H(t,e){return r(oa,t)?oa[t](e._strict,e._locale):new RegExp(E(t))}function E(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,a,s){return e||i||a||s}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function U(t,e){var i,a=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(a=function(t,i){i[e]=v(t)}),i=0;ia;a++){if(s=h([2e3,a]),i&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),i||this._monthsParse[a]||(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[a]=new RegExp(o.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[a].test(t))return a;if(i&&"MMM"===e&&this._shortMonthsParse[a].test(t))return a;if(!i&&this._monthsParse[a].test(t))return a}}function X(t,e){var i;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(i=Math.min(t.date(),G(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t)}function $(t){return null!=t?(X(this,t),i.updateOffset(this,!0),this):F(this,"Month")}function K(){return G(this.year(),this.month())}function tt(t){var e,i=t._a;return i&&-2===u(t).overflow&&(e=i[la]<0||i[la]>11?la:i[ha]<1||i[ha]>G(i[ra],i[la])?ha:i[ca]<0||i[ca]>24||24===i[ca]&&(0!==i[ua]||0!==i[da]||0!==i[fa])?ca:i[ua]<0||i[ua]>59?ua:i[da]<0||i[da]>59?da:i[fa]<0||i[fa]>999?fa:-1,u(t)._overflowDayOfYear&&(ra>e||e>ha)&&(e=ha),u(t).overflow=e),t}function et(t){i.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function it(t,e){var i=!0;return l(function(){return i&&(et(t+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}function at(t,e){pa[t]||(et(e),pa[t]=!0)}function st(t){var e,i,a=t._i,s=ba.exec(a);if(s){for(u(t).iso=!0,e=0,i=va.length;i>e;e++)if(va[e][1].exec(a)){t._f=va[e][0];break}for(e=0,i=xa.length;i>e;e++)if(xa[e][1].exec(a)){t._f+=(s[6]||" ")+xa[e][0];break}a.match(ia)&&(t._f+="Z"),Dt(t)}else t._isValid=!1}function ot(t){var e=ya.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(st(t),void(t._isValid===!1&&(delete t._isValid,i.createFromInputFallback(t))))}function nt(t,e,i,a,s,o,n){var r=new Date(t,e,i,a,s,o,n);return 1970>t&&r.setFullYear(t),r}function rt(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function lt(t){return ht(t)?366:365}function ht(t){return t%4===0&&t%100!==0||t%400===0}function ct(){return ht(this.year())}function ut(t,e,i){var a,s=i-e,o=i-t.day();return o>s&&(o-=7),s-7>o&&(o+=7),a=Ft(t).add(o,"d"),{week:Math.ceil(a.dayOfYear()/7),year:a.year()}}function dt(t){return ut(t,this._week.dow,this._week.doy).week}function ft(){return this._week.dow}function gt(){return this._week.doy}function mt(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function pt(t){var e=ut(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function bt(t,e,i,a,s){var o,n=6+s-a,r=rt(t,0,1+n),l=r.getUTCDay();return s>l&&(l+=7),i=null!=i?1*i:s,o=1+n+7*(e-1)-l+i,{year:o>0?t:t-1,dayOfYear:o>0?o:lt(t-1)+o}}function vt(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 xt(t,e,i){return null!=t?t:null!=e?e:i}function yt(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function kt(t){var e,i,a,s,o=[];if(!t._d){for(a=yt(t),t._w&&null==t._a[ha]&&null==t._a[la]&&_t(t),t._dayOfYear&&(s=xt(t._a[ra],a[ra]),t._dayOfYear>lt(s)&&(u(t)._overflowDayOfYear=!0),i=rt(s,0,t._dayOfYear),t._a[la]=i.getUTCMonth(),t._a[ha]=i.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=a[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ca]&&0===t._a[ua]&&0===t._a[da]&&0===t._a[fa]&&(t._nextDay=!0,t._a[ca]=0),t._d=(t._useUTC?rt:nt).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ca]=24)}}function _t(t){var e,i,a,s,o,n,r;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,n=4,i=xt(e.GG,t._a[ra],ut(Ft(),1,4).year),a=xt(e.W,1),s=xt(e.E,1)):(o=t._locale._week.dow,n=t._locale._week.doy,i=xt(e.gg,t._a[ra],ut(Ft(),o,n).year),a=xt(e.w,1),null!=e.d?(s=e.d,o>s&&++a):s=null!=e.e?e.e+o:o),r=bt(i,a,s,n,o),t._a[ra]=r.year,t._dayOfYear=r.dayOfYear}function Dt(t){if(t._f===i.ISO_8601)return void st(t);t._a=[],u(t).empty=!0;var e,a,s,o,n,r=""+t._i,l=r.length,h=0;for(s=B(t._f,t._locale).match(Ni)||[],e=0;e0&&u(t).unusedInput.push(n),r=r.slice(r.indexOf(a)+a.length),h+=a.length),Ui[o]?(a?u(t).empty=!1:u(t).unusedTokens.push(o),q(o,a,t)):t._strict&&!a&&u(t).unusedTokens.push(o);u(t).charsLeftOver=l-h,r.length>0&&u(t).unusedInput.push(r),u(t).bigHour===!0&&t._a[ca]<=12&&t._a[ca]>0&&(u(t).bigHour=void 0),t._a[ca]=St(t._locale,t._a[ca],t._meridiem),kt(t),tt(t)}function St(t,e,i){var a;return null==i?e:null!=t.meridiemHour?t.meridiemHour(e,i):null!=t.isPM?(a=t.isPM(i),a&&12>e&&(e+=12),a||12!==e||(e=0),e):e}function wt(t){var e,i,a,s,o;if(0===t._f.length)return u(t).invalidFormat=!0,void(t._d=new Date(NaN));for(s=0;so)&&(a=o,i=e));l(t,i||e)}function Ct(t){if(!t._d){var e=I(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],kt(t)}}function Mt(t){var e=new m(tt(At(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function At(t){var e=t._i,i=t._f;return t._locale=t._locale||C(t._l),null===e||void 0===i&&""===e?f({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),p(e)?new m(tt(e)):(s(i)?wt(t):i?Dt(t):o(e)?t._d=e:It(t),t))}function It(t){var e=t._i;void 0===e?t._d=new Date:o(e)?t._d=new Date(+e):"string"==typeof e?ot(t):s(e)?(t._a=n(e.slice(0),function(t){return parseInt(t,10)}),kt(t)):"object"==typeof e?Ct(t):"number"==typeof e?t._d=new Date(e):i.createFromInputFallback(t)}function Tt(t,e,i,a,s){var o={};return"boolean"==typeof i&&(a=i,i=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=i,o._i=t,o._f=e,o._strict=a,Mt(o)}function Ft(t,e,i,a){return Tt(t,e,i,a,!1)}function Pt(t,e){var i,a;if(1===e.length&&s(e[0])&&(e=e[0]),!e.length)return Ft();for(i=e[0],a=1;at&&(t=-t,i="-"),i+V(~~(t/60),2)+e+V(~~t%60,2)})}function zt(t){var e=(t||"").match(ia)||[],i=e[e.length-1]||[],a=(i+"").match(wa)||["-",0,0],s=+(60*a[1])+v(a[2]);return"+"===a[0]?s:-s}function Bt(t,e){var a,s;return e._isUTC?(a=e.clone(),s=(p(t)||o(t)?+t:+Ft(t))-+a,a._d.setTime(+a._d+s),i.updateOffset(a,!1),a):Ft(t).local()}function Yt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Nt(t,e){var a,s=this._offset||0;return null!=t?("string"==typeof t&&(t=zt(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(a=Yt(this)),this._offset=t,this._isUTC=!0,null!=a&&this.add(a,"m"),s!==t&&(!e||this._changeInProgress?ae(this,$t(t-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?s:Yt(this)}function Ht(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Et(t){return this.utcOffset(0,t)}function Ut(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Yt(this),"m")),this}function jt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(zt(this._i)),this}function qt(t){return t=t?Ft(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Gt(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Zt(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var t={};if(g(t,this),t=At(t),t._a){var e=t._isUTC?h(t._a):Ft(t._a);this._isDSTShifted=this.isValid()&&x(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Qt(){return!this._isUTC}function Jt(){return this._isUTC}function Xt(){return this._isUTC&&0===this._offset}function $t(t,e){var i,a,s,o=t,n=null;return Lt(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(n=Ca.exec(t))?(i="-"===n[1]?-1:1,o={y:0,d:v(n[ha])*i,h:v(n[ca])*i,m:v(n[ua])*i,s:v(n[da])*i,ms:v(n[fa])*i}):(n=Ma.exec(t))?(i="-"===n[1]?-1:1,o={y:Kt(n[2],i),M:Kt(n[3],i),d:Kt(n[4],i),h:Kt(n[5],i),m:Kt(n[6],i),s:Kt(n[7],i),w:Kt(n[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(s=ee(Ft(o.from),Ft(o.to)),o={},o.ms=s.milliseconds,o.M=s.months),a=new Wt(o),Lt(t)&&r(t,"_locale")&&(a._locale=t._locale),a}function Kt(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function te(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function ee(t,e){var i;return e=Bt(e,t),t.isBefore(e)?i=te(t,e):(i=te(e,t),i.milliseconds=-i.milliseconds,i.months=-i.months),i}function ie(t,e){return function(i,a){var s,o;return null===a||isNaN(+a)||(at(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),o=i,i=a,a=o),i="string"==typeof i?+i:i,s=$t(i,a),ae(this,s,t),this}}function ae(t,e,a,s){var o=e._milliseconds,n=e._days,r=e._months;s=null==s?!0:s,o&&t._d.setTime(+t._d+o*a),n&&P(t,"Date",F(t,"Date")+n*a),r&&X(t,F(t,"Month")+r*a),s&&i.updateOffset(t,n||r)}function se(t,e){var i=t||Ft(),a=Bt(i,this).startOf("day"),s=this.diff(a,"days",!0),o=-6>s?"sameElse":-1>s?"lastWeek":0>s?"lastDay":1>s?"sameDay":2>s?"nextDay":7>s?"nextWeek":"sameElse";return this.format(e&&e[o]||this.localeData().calendar(o,this,Ft(i)))}function oe(){return new m(this)}function ne(t,e){var i;return e=A("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=p(t)?t:Ft(t),+this>+t):(i=p(t)?+t:+Ft(t),i<+this.clone().startOf(e))}function re(t,e){var i;return e=A("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=p(t)?t:Ft(t),+t>+this):(i=p(t)?+t:+Ft(t),+this.clone().endOf(e)e-o?(i=t.clone().add(s-1,"months"),a=(e-o)/(o-i)):(i=t.clone().add(s+1,"months"),a=(e-o)/(i-o)),-(s+a)}function de(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function fe(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(i=Ft([2e3,1]).day(e),a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[e]=new RegExp(a.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Ee(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ze(t,this.localeData()),this.add(t-e,"d")):e}function Ue(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function je(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function qe(t,e){W(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Ge(t,e){return e._meridiemParse}function Ze(t){return"p"===(t+"").toLowerCase().charAt(0)}function Qe(t,e,i){return t>11?i?"pm":"PM":i?"am":"AM"}function Je(t,e){e[fa]=v(1e3*("0."+t))}function Xe(){return this._isUTC?"UTC":""}function $e(){return this._isUTC?"Coordinated Universal Time":""}function Ke(t){return Ft(1e3*t)}function ti(){return Ft.apply(null,arguments).parseZone()}function ei(t,e,i){var a=this._calendar[t];return"function"==typeof a?a.call(e,i):a}function ii(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function ai(){return this._invalidDate}function si(t){return this._ordinal.replace("%d",t)}function oi(t){return t}function ni(t,e,i,a){var s=this._relativeTime[i];return"function"==typeof s?s(t,e,i,a):s.replace(/%d/i,t)}function ri(t,e){var i=this._relativeTime[t>0?"future":"past"];return"function"==typeof i?i(e):i.replace(/%s/i,e)}function li(t){var e,i;for(i in t)e=t[i],"function"==typeof e?this[i]=e:this["_"+i]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function hi(t,e,i,a){var s=C(),o=h().set(a,e);return s[i](o,t)}function ci(t,e,i,a,s){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return hi(t,e,i,s);var o,n=[];for(o=0;a>o;o++)n[o]=hi(t,o,i,s);return n}function ui(t,e){return ci(t,e,"months",12,"month")}function di(t,e){return ci(t,e,"monthsShort",12,"month")}function fi(t,e){return ci(t,e,"weekdays",7,"day")}function gi(t,e){return ci(t,e,"weekdaysShort",7,"day")}function mi(t,e){return ci(t,e,"weekdaysMin",7,"day")}function pi(){var t=this._data;return this._milliseconds=Ja(this._milliseconds),this._days=Ja(this._days),this._months=Ja(this._months),t.milliseconds=Ja(t.milliseconds),t.seconds=Ja(t.seconds),t.minutes=Ja(t.minutes),t.hours=Ja(t.hours),t.months=Ja(t.months),t.years=Ja(t.years),this}function bi(t,e,i,a){var s=$t(e,i);return t._milliseconds+=a*s._milliseconds,t._days+=a*s._days,t._months+=a*s._months,t._bubble()}function vi(t,e){return bi(this,t,e,1)}function xi(t,e){return bi(this,t,e,-1)}function yi(t){return 0>t?Math.floor(t):Math.ceil(t)}function ki(){var t,e,i,a,s,o=this._milliseconds,n=this._days,r=this._months,l=this._data;return o>=0&&n>=0&&r>=0||0>=o&&0>=n&&0>=r||(o+=864e5*yi(Di(r)+n),n=0,r=0),l.milliseconds=o%1e3,t=b(o/1e3),l.seconds=t%60,e=b(t/60),l.minutes=e%60,i=b(e/60),l.hours=i%24,n+=b(i/24),s=b(_i(n)),r+=s,n-=yi(Di(s)),a=b(r/12),r%=12,l.days=n,l.months=r,l.years=a,this}function _i(t){return 4800*t/146097}function Di(t){return 146097*t/4800}function Si(t){var e,i,a=this._milliseconds;if(t=A(t),"month"===t||"year"===t)return e=this._days+a/864e5,i=this._months+_i(e),"month"===t?i:i/12;switch(e=this._days+Math.round(Di(this._months)),t){case"week":return e/7+a/6048e5;case"day":return e+a/864e5;case"hour":return 24*e+a/36e5;case"minute":return 1440*e+a/6e4;case"second":return 86400*e+a/1e3;case"millisecond":return Math.floor(864e5*e)+a;default:throw new Error("Unknown unit "+t)}}function wi(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)}function Ci(t){return function(){return this.as(t)}}function Mi(t){return t=A(t),this[t+"s"]()}function Ai(t){return function(){return this._data[t]}}function Ii(){return b(this.days()/7)}function Ti(t,e,i,a,s){return s.relativeTime(e||1,!!i,t,a)}function Fi(t,e,i){var a=$t(t).abs(),s=ds(a.as("s")),o=ds(a.as("m")),n=ds(a.as("h")),r=ds(a.as("d")),l=ds(a.as("M")),h=ds(a.as("y")),c=s0,c[4]=i,Ti.apply(null,c)}function Pi(t,e){return void 0===fs[t]?!1:void 0===e?fs[t]:(fs[t]=e,!0)}function Oi(t){var e=this.localeData(),i=Fi(this,!t,e);return t&&(i=e.pastFuture(+this,i)),e.postformat(i)}function Vi(){var t,e,i,a=gs(this._milliseconds)/1e3,s=gs(this._days),o=gs(this._months);t=b(a/60),e=b(t/60),a%=60,t%=60,i=b(o/12),o%=12;var n=i,r=o,l=s,h=e,c=t,u=a,d=this.asSeconds();return d?(0>d?"-":"")+"P"+(n?n+"Y":"")+(r?r+"M":"")+(l?l+"D":"")+(h||c||u?"T":"")+(h?h+"H":"")+(c?c+"M":"")+(u?u+"S":""):"P0D"}var Wi,Li,Ri=i.momentProperties=[],zi=!1,Bi={},Yi={},Ni=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Hi=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ei={},Ui={},ji=/\d/,qi=/\d\d/,Gi=/\d{3}/,Zi=/\d{4}/,Qi=/[+-]?\d{6}/,Ji=/\d\d?/,Xi=/\d{1,3}/,$i=/\d{1,4}/,Ki=/[+-]?\d{1,6}/,ta=/\d+/,ea=/[+-]?\d+/,ia=/Z|[+-]\d\d:?\d\d/gi,aa=/[+-]?\d+(\.\d{1,3})?/,sa=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,oa={},na={},ra=0,la=1,ha=2,ca=3,ua=4,da=5,fa=6;W("M",["MM",2],"Mo",function(){return this.month()+1}),W("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),W("MMMM",0,0,function(t){return this.localeData().months(this,t)}),M("month","M"),N("M",Ji),N("MM",Ji,qi),N("MMM",sa),N("MMMM",sa),U(["M","MM"],function(t,e){e[la]=v(t)-1}),U(["MMM","MMMM"],function(t,e,i,a){var s=i._locale.monthsParse(t,a,i._strict);null!=s?e[la]=s:u(i).invalidMonth=t});var ga="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ma="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),pa={};i.suppressDeprecationWarnings=!1;var ba=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,va=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],xa=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ya=/^\/?Date\((\-?\d+)/i;i.createFromInputFallback=it("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),W(0,["YY",2],0,function(){return this.year()%100}),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),M("year","y"),N("Y",ea),N("YY",Ji,qi),N("YYYY",$i,Zi),N("YYYYY",Ki,Qi),N("YYYYYY",Ki,Qi),U(["YYYYY","YYYYYY"],ra),U("YYYY",function(t,e){e[ra]=2===t.length?i.parseTwoDigitYear(t):v(t)}),U("YY",function(t,e){e[ra]=i.parseTwoDigitYear(t)}),i.parseTwoDigitYear=function(t){return v(t)+(v(t)>68?1900:2e3)};var ka=T("FullYear",!1);W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),M("week","w"),M("isoWeek","W"),N("w",Ji),N("ww",Ji,qi),N("W",Ji),N("WW",Ji,qi),j(["w","ww","W","WW"],function(t,e,i,a){e[a.substr(0,1)]=v(t)});var _a={dow:0,doy:6};W("DDD",["DDDD",3],"DDDo","dayOfYear"),M("dayOfYear","DDD"),N("DDD",Xi),N("DDDD",Gi),U(["DDD","DDDD"],function(t,e,i){i._dayOfYear=v(t)}),i.ISO_8601=function(){};var Da=it("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return this>t?this:t}),Sa=it("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return t>this?this:t});Rt("Z",":"),Rt("ZZ",""),N("Z",ia),N("ZZ",ia),U(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=zt(t)});var wa=/([\+\-]|\d\d)/gi;i.updateOffset=function(){};var Ca=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Ma=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;$t.fn=Wt.prototype;var Aa=ie(1,"add"),Ia=ie(-1,"subtract");i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ta=it("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)});W(0,["gg",2],0,function(){return this.weekYear()%100}),W(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Fe("gggg","weekYear"),Fe("ggggg","weekYear"),Fe("GGGG","isoWeekYear"),Fe("GGGGG","isoWeekYear"),M("weekYear","gg"),M("isoWeekYear","GG"),N("G",ea),N("g",ea),N("GG",Ji,qi),N("gg",Ji,qi),N("GGGG",$i,Zi),N("gggg",$i,Zi),N("GGGGG",Ki,Qi),N("ggggg",Ki,Qi),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,a){e[a.substr(0,2)]=v(t)}),j(["gg","GG"],function(t,e,a,s){e[s]=i.parseTwoDigitYear(t)}),W("Q",0,0,"quarter"),M("quarter","Q"),N("Q",ji),U("Q",function(t,e){e[la]=3*(v(t)-1)}),W("D",["DD",2],"Do","date"),M("date","D"),N("D",Ji),N("DD",Ji,qi),N("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),U(["D","DD"],ha),U("Do",function(t,e){e[ha]=v(t.match(Ji)[0],10)});var Fa=T("Date",!0);W("d",0,"do","day"),W("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),W("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),W("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),M("day","d"),M("weekday","e"),M("isoWeekday","E"),N("d",Ji),N("e",Ji),N("E",Ji),N("dd",sa),N("ddd",sa),N("dddd",sa),j(["dd","ddd","dddd"],function(t,e,i){var a=i._locale.weekdaysParse(t);null!=a?e.d=a:u(i).invalidWeekday=t}),j(["d","e","E"],function(t,e,i,a){e[a]=v(t)});var Pa="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Oa="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Va="Su_Mo_Tu_We_Th_Fr_Sa".split("_");W("H",["HH",2],0,"hour"),W("h",["hh",2],0,function(){return this.hours()%12||12}),qe("a",!0),qe("A",!1),M("hour","h"),N("a",Ge),N("A",Ge),N("H",Ji),N("h",Ji),N("HH",Ji,qi),N("hh",Ji,qi),U(["H","HH"],ca),U(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),U(["h","hh"],function(t,e,i){e[ca]=v(t),u(i).bigHour=!0});var Wa=/[ap]\.?m?\.?/i,La=T("Hours",!0);W("m",["mm",2],0,"minute"),M("minute","m"),N("m",Ji),N("mm",Ji,qi),U(["m","mm"],ua);var Ra=T("Minutes",!1);W("s",["ss",2],0,"second"),M("second","s"),N("s",Ji),N("ss",Ji,qi),U(["s","ss"],da);var za=T("Seconds",!1);W("S",0,0,function(){return~~(this.millisecond()/100)}),W(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,function(){return 10*this.millisecond()}),W(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),W(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),W(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),W(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),W(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),M("millisecond","ms"),N("S",Xi,ji),N("SS",Xi,qi),N("SSS",Xi,Gi);var Ba;for(Ba="SSSS";Ba.length<=9;Ba+="S")N(Ba,ta);for(Ba="S";Ba.length<=9;Ba+="S")U(Ba,Je);var Ya=T("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var Na=m.prototype;Na.add=Aa,Na.calendar=se,Na.clone=oe,Na.diff=ce,Na.endOf=_e,Na.format=ge,Na.from=me,Na.fromNow=pe,Na.to=be,Na.toNow=ve,Na.get=O,Na.invalidAt=Te,Na.isAfter=ne,Na.isBefore=re,Na.isBetween=le,Na.isSame=he,Na.isValid=Ae,Na.lang=Ta,Na.locale=xe,Na.localeData=ye,Na.max=Sa,Na.min=Da,Na.parsingFlags=Ie,Na.set=O,Na.startOf=ke,Na.subtract=Ia,Na.toArray=Ce,Na.toObject=Me,Na.toDate=we,Na.toISOString=fe,Na.toJSON=fe,Na.toString=de,Na.unix=Se,Na.valueOf=De,Na.year=ka,Na.isLeapYear=ct,Na.weekYear=Oe,Na.isoWeekYear=Ve,Na.quarter=Na.quarters=Re,Na.month=$,Na.daysInMonth=K,Na.week=Na.weeks=mt,Na.isoWeek=Na.isoWeeks=pt,Na.weeksInYear=Le,Na.isoWeeksInYear=We,Na.date=Fa,Na.day=Na.days=Ee,Na.weekday=Ue,Na.isoWeekday=je,Na.dayOfYear=vt,Na.hour=Na.hours=La,Na.minute=Na.minutes=Ra,Na.second=Na.seconds=za,Na.millisecond=Na.milliseconds=Ya,
-Na.utcOffset=Nt,Na.utc=Et,Na.local=Ut,Na.parseZone=jt,Na.hasAlignedHourOffset=qt,Na.isDST=Gt,Na.isDSTShifted=Zt,Na.isLocal=Qt,Na.isUtcOffset=Jt,Na.isUtc=Xt,Na.isUTC=Xt,Na.zoneAbbr=Xe,Na.zoneName=$e,Na.dates=it("dates accessor is deprecated. Use date instead.",Fa),Na.months=it("months accessor is deprecated. Use month instead",$),Na.years=it("years accessor is deprecated. Use year instead",ka),Na.zone=it("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ht);var Ha=Na,Ea={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ua={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"},ja="Invalid date",qa="%d",Ga=/\d{1,2}/,Za={future:"in %s",past:"%s ago",s:"a few 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"},Qa=y.prototype;Qa._calendar=Ea,Qa.calendar=ei,Qa._longDateFormat=Ua,Qa.longDateFormat=ii,Qa._invalidDate=ja,Qa.invalidDate=ai,Qa._ordinal=qa,Qa.ordinal=si,Qa._ordinalParse=Ga,Qa.preparse=oi,Qa.postformat=oi,Qa._relativeTime=Za,Qa.relativeTime=ni,Qa.pastFuture=ri,Qa.set=li,Qa.months=Z,Qa._months=ga,Qa.monthsShort=Q,Qa._monthsShort=ma,Qa.monthsParse=J,Qa.week=dt,Qa._week=_a,Qa.firstDayOfYear=gt,Qa.firstDayOfWeek=ft,Qa.weekdays=Be,Qa._weekdays=Pa,Qa.weekdaysMin=Ne,Qa._weekdaysMin=Va,Qa.weekdaysShort=Ye,Qa._weekdaysShort=Oa,Qa.weekdaysParse=He,Qa.isPM=Ze,Qa._meridiemParse=Wa,Qa.meridiem=Qe,S("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,i=1===v(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+i}}),i.lang=it("moment.lang is deprecated. Use moment.locale instead.",S),i.langData=it("moment.langData is deprecated. Use moment.localeData instead.",C);var Ja=Math.abs,Xa=Ci("ms"),$a=Ci("s"),Ka=Ci("m"),ts=Ci("h"),es=Ci("d"),is=Ci("w"),as=Ci("M"),ss=Ci("y"),os=Ai("milliseconds"),ns=Ai("seconds"),rs=Ai("minutes"),ls=Ai("hours"),hs=Ai("days"),cs=Ai("months"),us=Ai("years"),ds=Math.round,fs={s:45,m:45,h:22,d:26,M:11},gs=Math.abs,ms=Wt.prototype;ms.abs=pi,ms.add=vi,ms.subtract=xi,ms.as=Si,ms.asMilliseconds=Xa,ms.asSeconds=$a,ms.asMinutes=Ka,ms.asHours=ts,ms.asDays=es,ms.asWeeks=is,ms.asMonths=as,ms.asYears=ss,ms.valueOf=wi,ms._bubble=ki,ms.get=Mi,ms.milliseconds=os,ms.seconds=ns,ms.minutes=rs,ms.hours=ls,ms.days=hs,ms.weeks=Ii,ms.months=cs,ms.years=us,ms.humanize=Oi,ms.toISOString=Vi,ms.toString=Vi,ms.toJSON=Vi,ms.locale=xe,ms.localeData=ye,ms.toIsoString=it("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Vi),ms.lang=Ta,W("X",0,0,"unix"),W("x",0,0,"valueOf"),N("x",ea),N("X",aa),U("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),U("x",function(t,e,i){i._d=new Date(v(t))}),i.version="2.10.6",a(Ft),i.fn=Ha,i.min=Ot,i.max=Vt,i.utc=h,i.unix=Ke,i.months=ui,i.isDate=o,i.locale=S,i.invalid=f,i.duration=$t,i.isMoment=p,i.weekdays=fi,i.parseZone=ti,i.localeData=C,i.isDuration=Lt,i.monthsShort=di,i.weekdaysMin=mi,i.defineLocale=w,i.weekdaysShort=gi,i.normalizeUnits=A,i.relativeTimeThreshold=Pi;var ps=i;return ps})},{}],7:[function(t,e,i){/*!
- * Chart.js
- * http://chartjs.org/
- * Version: 2.0.2
- *
- * Copyright 2015 Nick Downie
- * Released under the MIT license
- * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
- */
-var a=t("./core/core.js")();t("./core/core.helpers")(a),t("./core/core.element")(a),t("./core/core.animation")(a),t("./core/core.controller")(a),t("./core/core.datasetController")(a),t("./core/core.layoutService")(a),t("./core/core.legend")(a),t("./core/core.scale")(a),t("./core/core.scaleService")(a),t("./core/core.title")(a),t("./core/core.tooltip")(a),t("./controllers/controller.bar")(a),t("./controllers/controller.bubble")(a),t("./controllers/controller.doughnut")(a),t("./controllers/controller.line")(a),t("./controllers/controller.polarArea")(a),t("./controllers/controller.radar")(a),t("./scales/scale.category")(a),t("./scales/scale.linear")(a),t("./scales/scale.logarithmic")(a),t("./scales/scale.radialLinear")(a),t("./scales/scale.time")(a),t("./elements/element.arc")(a),t("./elements/element.line")(a),t("./elements/element.point")(a),t("./elements/element.rectangle")(a),t("./charts/Chart.Bar")(a),t("./charts/Chart.Bubble")(a),t("./charts/Chart.Doughnut")(a),t("./charts/Chart.Line")(a),t("./charts/Chart.PolarArea")(a),t("./charts/Chart.Radar")(a),t("./charts/Chart.Scatter")(a),window.Chart=e.exports=a},{"./charts/Chart.Bar":8,"./charts/Chart.Bubble":9,"./charts/Chart.Doughnut":10,"./charts/Chart.Line":11,"./charts/Chart.PolarArea":12,"./charts/Chart.Radar":13,"./charts/Chart.Scatter":14,"./controllers/controller.bar":15,"./controllers/controller.bubble":16,"./controllers/controller.doughnut":17,"./controllers/controller.line":18,"./controllers/controller.polarArea":19,"./controllers/controller.radar":20,"./core/core.animation":21,"./core/core.controller":22,"./core/core.datasetController":23,"./core/core.element":24,"./core/core.helpers":25,"./core/core.js":26,"./core/core.layoutService":27,"./core/core.legend":28,"./core/core.scale":29,"./core/core.scaleService":30,"./core/core.title":31,"./core/core.tooltip":32,"./elements/element.arc":33,"./elements/element.line":34,"./elements/element.point":35,"./elements/element.rectangle":36,"./scales/scale.category":37,"./scales/scale.linear":38,"./scales/scale.logarithmic":39,"./scales/scale.radialLinear":40,"./scales/scale.time":41}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={aspectRatio:1};t.Radar=function(a,s){return s.options=e.configMerge(i,s.options),s.type="radar",new t(a,s)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){var e={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{callbacks:{title:function(t,e){return""},label:function(t,e){return"("+t.xLabel+", "+t.yLabel+")"}}}};t.defaults.scatter=e,t.controllers.scatter=t.controllers.line,t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}},t.controllers.bar=t.DatasetController.extend({initialize:function(e,i){t.DatasetController.prototype.initialize.call(this,e,i),this.getDataset().bar=!0},getBarCount:function(){var t=0;return e.each(this.chart.data.datasets,function(i){e.isDatasetVisible(i)&&i.bar&&++t}),t},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Rectangle({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Rectangle({_chart:this.chart.chart,_datasetIndex:this.index,_index:e}),a=this.getBarCount();this.updateElement(i,e,!0,a),this.getDataset().metaData.splice(e,0,i)},update:function(t){var i=this.getBarCount();e.each(this.getDataset().metaData,function(e,a){this.updateElement(e,a,t,i)},this)},updateElement:function(t,i,a,s){var o,n=this.getScaleForId(this.getDataset().xAxisID),r=this.getScaleForId(this.getDataset().yAxisID);o=r.min<0&&r.max<0?r.getPixelForValue(r.max):r.min>0&&r.max>0?r.getPixelForValue(r.min):r.getPixelForValue(0),e.extend(t,{_chart:this.chart.chart,_xScale:n,_yScale:r,_datasetIndex:this.index,_index:i,_model:{x:this.calculateBarX(i,this.index),y:a?o:this.calculateBarY(i,this.index),label:this.chart.data.labels[i],datasetLabel:this.getDataset().label,base:a?o:this.calculateBarBase(this.index,i),width:this.calculateBarWidth(s),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.rectangle.backgroundColor),borderSkipped:t.custom&&t.custom.borderSkipped?t.custom.borderSkipped:this.chart.options.elements.rectangle.borderSkipped,borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.rectangle.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.rectangle.borderWidth)}}),t.pivot()},calculateBarBase:function(t,i){var a=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID)),s=0;if(a.options.stacked){var o=this.chart.data.datasets[t].data[i];if(0>o)for(var n=0;t>n;n++){var r=this.chart.data.datasets[n];e.isDatasetVisible(r)&&r.yAxisID===a.id&&r.bar&&(s+=r.data[i]<0?r.data[i]:0)}else for(var l=0;t>l;l++){var h=this.chart.data.datasets[l];e.isDatasetVisible(h)&&h.yAxisID===a.id&&h.bar&&(s+=h.data[i]>0?h.data[i]:0)}return a.getPixelForValue(s)}return s=a.getPixelForValue(a.min),a.beginAtZero||a.min<=0&&a.max>=0||a.min>=0&&a.max<=0?s=a.getPixelForValue(0,0):a.min<0&&a.max<0&&(s=a.getPixelForValue(a.max)),s},getRuler:function(){var t=this.getScaleForId(this.getDataset().xAxisID),e=(this.getScaleForId(this.getDataset().yAxisID),this.getBarCount()),i=function(){for(var e=t.getPixelForTick(1)-t.getPixelForTick(0),i=2;ia;++a)e.isDatasetVisible(this.chart.data.datasets[a])&&this.chart.data.datasets[a].bar&&++i;return i},calculateBarX:function(t,e){var i=(this.getScaleForId(this.getDataset().yAxisID),this.getScaleForId(this.getDataset().xAxisID)),a=this.getBarIndex(e),s=this.getRuler(),o=i.getPixelForValue(null,t,e,this.chart.isCombo);return o-=this.chart.isCombo?s.tickWidth/2:0,i.options.stacked?o+s.categoryWidth/2+s.categorySpacing:o+s.barWidth/2+s.categorySpacing+s.barWidth*a+s.barSpacing/2+s.barSpacing*a},calculateBarY:function(t,i){var a=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID)),s=this.getDataset().data[t];if(a.options.stacked){for(var o=0,n=0,r=0;i>r;r++){var l=this.chart.data.datasets[r];e.isDatasetVisible(l)&&l.bar&&l.yAxisID===a.id&&(l.data[t]<0?n+=l.data[t]||0:o+=l.data[t]||0)}return 0>s?a.getPixelForValue(n+s):a.getPixelForValue(o+s)}return a.getPixelForValue(s)},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){var a=this.getDataset().data[e];null===a||void 0===a||isNaN(a)||t.transition(i).draw()},this)},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,a,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,a,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.rectangle.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.rectangle.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.rectangle.borderWidth)}})}},{}],16:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.bubble={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(t,e){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",a=e.datasets[t.datasetIndex].data[t.index];return i+": ("+a.x+", "+a.y+", "+a.r+")"}}}},t.controllers.bubble=t.DatasetController.extend({addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],e.each(this.getDataset().data,function(e,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(e){this.getDataset().metaData=this.getDataset().metaData||[];var i=new t.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:e});this.updateElement(i,e,!0),this.getDataset().metaData.splice(e,0,i)},update:function(t){var i,a=this.getDataset().metaData,s=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID);i=s.min<0&&s.max<0?s.getPixelForValue(s.max):s.min>0&&s.max>0?s.getPixelForValue(s.min):s.getPixelForValue(0),e.each(a,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,i,a){var s,o=this.getScaleForId(this.getDataset().yAxisID),n=this.getScaleForId(this.getDataset().xAxisID);s=o.min<0&&o.max<0?o.getPixelForValue(o.max):o.min>0&&o.max>0?o.getPixelForValue(o.min):o.getPixelForValue(0),e.extend(t,{_chart:this.chart.chart,_xScale:n,_yScale:o,_datasetIndex:this.index,_index:i,_model:{x:a?n.getPixelForDecimal(.5):n.getPixelForValue(this.getDataset().data[i],i,this.index,this.chart.isCombo),y:a?s:o.getPixelForValue(this.getDataset().data[i],i,this.index),radius:a?0:t.custom&&t.custom.radius?t.custom.radius:this.getRadius(this.getDataset().data[i]),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.point.backgroundColor),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.point.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.point.borderWidth),hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:e.getValueAtIndexOrDefault(this.getDataset().hitRadius,i,this.chart.options.elements.point.hitRadius)}}),t._model.skip=t.custom&&t.custom.skip?t.custom.skip:isNaN(t._model.x)||isNaN(t._model.y),t.pivot()},getRadius:function(t){return t.r||this.chart.options.elements.point.radius},draw:function(t){var i=t||1;e.each(this.getDataset().metaData,function(t,e){t.transition(i),t.draw()})},setHoverStyle:function(t){var i=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.radius=t.custom&&t.custom.hoverRadius?t.custom.hoverRadius:e.getValueAtIndexOrDefault(i.hoverRadius,a,this.chart.options.elements.point.hoverRadius)+this.getRadius(this.getDataset().data[t._index]),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:e.getValueAtIndexOrDefault(i.hoverBackgroundColor,a,e.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:e.getValueAtIndexOrDefault(i.hoverBorderColor,a,e.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:e.getValueAtIndexOrDefault(i.hoverBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var i=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:this.getRadius(this.getDataset().data[t._index]),t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:e.getValueAtIndexOrDefault(this.getDataset().backgroundColor,i,this.chart.options.elements.point.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:e.getValueAtIndexOrDefault(this.getDataset().borderColor,i,this.chart.options.elements.point.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:e.getValueAtIndexOrDefault(this.getDataset().borderWidth,i,this.chart.options.elements.point.borderWidth)}})}},{}],17:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.doughnut={animation:{animateRotate:!0,animateScale:!1},aspectRatio:1,hover:{mode:"single"},legendCallback:function(t){var e=[];if(e.push('
"),e.join("")}}},t}},{}],27:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),t.boxes.push(e)},removeBox:function(t,e){t.boxes&&t.boxes.splice(t.boxes.indexOf(e),1)},update:function(t,i,a){function o(t){var e,i=t.isHorizontal();i?(e=t.update(t.options.fullWidth?p:k,y),S-=e.height):(e=t.update(v,x),k-=e.width),C.push({horizontal:i,minSize:e,box:t})}function s(t){var i=e.findNextWhere(C,function(e){return e.box===t});if(i)if(t.isHorizontal()){var a={left:w,right:D,top:0,bottom:0};t.update(t.options.fullWidth?p:k,m/2,a)}else t.update(i.minSize.width,S)}function n(t){var i=e.findNextWhere(C,function(e){return e.box===t}),a={left:0,right:0,top:M,bottom:A};i&&t.update(i.minSize.width,S,a)}function r(t){t.isHorizontal()?(t.left=t.options.fullWidth?h:w,t.right=t.options.fullWidth?i-h:w+k,t.top=P,t.bottom=P+t.height,P=t.bottom):(t.left=F,t.right=F+t.width,t.top=M,t.bottom=M+S,F=t.right)}if(t){var h=0,l=0,c=e.where(t.boxes,function(t){return"left"===t.options.position}),d=e.where(t.boxes,function(t){return"right"===t.options.position}),u=e.where(t.boxes,function(t){return"top"===t.options.position}),g=e.where(t.boxes,function(t){return"bottom"===t.options.position}),f=e.where(t.boxes,function(t){return"chartArea"===t.options.position});u.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),g.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var p=i-2*h,m=a-2*l,b=p/2,x=m/2,v=(i-b)/(c.length+d.length),y=(a-x)/(u.length+g.length),k=p,S=m,C=[];e.each(c.concat(d,u,g),o);var w=h,D=h,M=l,A=l;e.each(c.concat(d),s),e.each(c,function(t){w+=t.width}),e.each(d,function(t){D+=t.width}),e.each(u.concat(g),s),e.each(u,function(t){M+=t.height}),e.each(g,function(t){A+=t.height}),e.each(c.concat(d),n),w=h,D=h,M=l,A=l,e.each(c,function(t){w+=t.width}),e.each(d,function(t){D+=t.width}),e.each(u,function(t){M+=t.height}),e.each(g,function(t){A+=t.height});var _=a-M-A,I=i-w-D;(I!==k||_!==S)&&(e.each(c,function(t){t.height=_}),e.each(d,function(t){t.height=_}),e.each(u,function(t){t.options.fullWidth||(t.width=I)}),e.each(g,function(t){t.options.fullWidth||(t.width=I)}),S=_,k=I);var F=h,P=l;e.each(c.concat(u),r),F+=k,P+=S,e.each(d,r),e.each(g,r),t.chartArea={left:w,top:M,right:w+k,bottom:M+S},e.each(f,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(k,S)})}}}}},{}],28:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var i=e.datasetIndex,a=this.chart.getDatasetMeta(i);a.hidden=null===a.hidden?!this.chart.data.datasets[i].hidden:null,this.chart.update()},labels:{boxWidth:40,padding:10,generateLabels:function(t){var i=t.data;return e.isArray(i.datasets)?i.datasets.map(function(e,i){return{text:e.label,fillStyle:e.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,datasetIndex:i}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){e.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:e.noop,update:function(t,e,i){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this.margins=i,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeBuildLabels(),this.buildLabels(),this.afterBuildLabels(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:e.noop,beforeSetDimensions:e.noop,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.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.minSize={width:0,height:0}},afterSetDimensions:e.noop,beforeBuildLabels:e.noop,buildLabels:function(){this.legendItems=this.options.labels.generateLabels.call(this,this.chart),this.options.reverse&&this.legendItems.reverse()},afterBuildLabels:e.noop,beforeFit:e.noop,fit:function(){var i=this.ctx,a=e.getValueOrDefault(this.options.labels.fontSize,t.defaults.global.defaultFontSize),o=e.getValueOrDefault(this.options.labels.fontStyle,t.defaults.global.defaultFontStyle),s=e.getValueOrDefault(this.options.labels.fontFamily,t.defaults.global.defaultFontFamily),n=e.fontString(a,o,s);if(this.legendHitBoxes=[],this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=this.options.display?10:0,this.isHorizontal()?this.minSize.height=this.options.display?10:0:this.minSize.height=this.maxHeight,this.options.display&&this.isHorizontal()){this.lineWidths=[0];var r=this.legendItems.length?a+this.options.labels.padding:0;i.textAlign="left",i.textBaseline="top",i.font=n,e.each(this.legendItems,function(t,e){var o=this.options.labels.boxWidth+a/2+i.measureText(t.text).width;this.lineWidths[this.lineWidths.length-1]+o+this.options.labels.padding>=this.width&&(r+=a+this.options.labels.padding,this.lineWidths[this.lineWidths.length]=this.left),this.legendHitBoxes[e]={left:0,top:0,width:o,height:a},this.lineWidths[this.lineWidths.length-1]+=o+this.options.labels.padding},this),this.minSize.height+=r}this.width=this.minSize.width,this.height=this.minSize.height},afterFit:e.noop,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){if(this.options.display){var i=this.ctx,a={x:this.left+(this.width-this.lineWidths[0])/2,y:this.top+this.options.labels.padding,line:0},o=e.getValueOrDefault(this.options.labels.fontColor,t.defaults.global.defaultFontColor),s=e.getValueOrDefault(this.options.labels.fontSize,t.defaults.global.defaultFontSize),n=e.getValueOrDefault(this.options.labels.fontStyle,t.defaults.global.defaultFontStyle),r=e.getValueOrDefault(this.options.labels.fontFamily,t.defaults.global.defaultFontFamily),h=e.fontString(s,n,r);this.isHorizontal()&&(i.textAlign="left",i.textBaseline="top",i.lineWidth=.5,i.strokeStyle=o,i.fillStyle=o,i.font=h,e.each(this.legendItems,function(e,o){var n=i.measureText(e.text).width,r=this.options.labels.boxWidth+s/2+n;a.x+r>=this.width&&(a.y+=s+this.options.labels.padding,a.line++,a.x=this.left+(this.width-this.lineWidths[a.line])/2),i.save();var h=function(t,e){return void 0!==t?t:e};i.fillStyle=h(e.fillStyle,t.defaults.global.defaultColor),i.lineCap=h(e.lineCap,t.defaults.global.elements.line.borderCapStyle),i.lineDashOffset=h(e.lineDashOffset,t.defaults.global.elements.line.borderDashOffset),i.lineJoin=h(e.lineJoin,t.defaults.global.elements.line.borderJoinStyle),i.lineWidth=h(e.lineWidth,t.defaults.global.elements.line.borderWidth),i.strokeStyle=h(e.strokeStyle,t.defaults.global.defaultColor),i.setLineDash&&i.setLineDash(h(e.lineDash,t.defaults.global.elements.line.borderDash)),i.strokeRect(a.x,a.y,this.options.labels.boxWidth,s),i.fillRect(a.x,a.y,this.options.labels.boxWidth,s),i.restore(),this.legendHitBoxes[o].left=a.x,this.legendHitBoxes[o].top=a.y,i.fillText(e.text,this.options.labels.boxWidth+s/2+a.x,a.y),e.hidden&&(i.beginPath(),i.lineWidth=2,i.moveTo(this.options.labels.boxWidth+s/2+a.x,a.y+s/2),i.lineTo(this.options.labels.boxWidth+s/2+a.x+n,a.y+s/2),i.stroke()),a.x+=r+this.options.labels.padding},this))}},handleEvent:function(t){var i=e.getRelativePosition(t,this.chart.chart);if(i.x>=this.left&&i.x<=this.right&&i.y>=this.top&&i.y<=this.bottom)for(var a=0;a=o.left&&i.x<=o.left+o.width&&i.y>=o.top&&i.y<=o.top+o.height){this.options.onClick&&this.options.onClick.call(this,t,this.legendItems[a]);break}}}})}},{}],29:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.plugins=[],t.pluginService={register:function(e){-1===t.plugins.indexOf(e)&&t.plugins.push(e)},remove:function(e){var i=t.plugins.indexOf(e);-1!==i&&t.plugins.splice(i,1)},notifyPlugins:function(i,a,o){e.each(t.plugins,function(t){t[i]&&"function"==typeof t[i]&&t[i].apply(o,a)},o)}},t.PluginBase=t.Element.extend({beforeInit:e.noop,afterInit:e.noop,beforeUpdate:e.noop,afterUpdate:e.noop,beforeDraw:e.noop,afterDraw:e.noop,destroy:e.noop})}},{}],30:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.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)",offsetGridLines:!1},scaleLabel:{labelString:"",display:!1},ticks:{beginAtZero:!1,maxRotation:50,mirror:!1,padding:10,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,callback:function(t){return""+t}}},t.Scale=t.Element.extend({beforeUpdate:function(){e.callCallback(this.options.beforeUpdate,[this])},update:function(t,i,a){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=i,this.margins=e.extend({left:0,right:0,top:0,bottom:0},a),this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this.beforeBuildTicks(),this.buildTicks(),this.afterBuildTicks(),this.beforeTickToLabelConversion(),this.convertTicksToLabels(),this.afterTickToLabelConversion(),this.beforeCalculateTickRotation(),this.calculateTickRotation(),this.afterCalculateTickRotation(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:function(){e.callCallback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){e.callCallback(this.options.beforeSetDimensions,[this])},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.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0},afterSetDimensions:function(){e.callCallback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){e.callCallback(this.options.beforeDataLimits,[this])},determineDataLimits:e.noop,afterDataLimits:function(){e.callCallback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){e.callCallback(this.options.beforeBuildTicks,[this])},buildTicks:e.noop,afterBuildTicks:function(){e.callCallback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){e.callCallback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){this.ticks=this.ticks.map(function(t,e,i){return this.options.ticks.userCallback?this.options.ticks.userCallback(t,e,i):this.options.ticks.callback(t,e,i)},this)},afterTickToLabelConversion:function(){e.callCallback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){e.callCallback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),o=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(i,a,o);this.ctx.font=s;var n,r=this.ctx.measureText(this.ticks[0]).width,h=this.ctx.measureText(this.ticks[this.ticks.length-1]).width;if(this.labelRotation=0,this.paddingRight=0,this.paddingLeft=0,this.options.display&&this.isHorizontal()){this.paddingRight=h/2+3,this.paddingLeft=r/2+3,this.longestTextCache||(this.longestTextCache={});for(var l,c,d=e.longestText(this.ctx,s,this.ticks,this.longestTextCache),u=d,g=this.getPixelForTick(1)-this.getPixelForTick(0)-6;u>g&&this.labelRotationthis.yLabelWidth&&(this.paddingLeft=n+i/2),this.paddingRight=i/2,c*d>this.maxHeight){this.labelRotation--;break}this.labelRotation++,u=l*d}}this.margins&&(this.paddingLeft=Math.max(this.paddingLeft-this.margins.left,0),this.paddingRight=Math.max(this.paddingRight-this.margins.right,0))},afterCalculateTickRotation:function(){e.callCallback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){e.callCallback(this.options.beforeFit,[this])},fit:function(){this.minSize={width:0,height:0};var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),o=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),s=e.fontString(i,a,o),n=e.getValueOrDefault(this.options.scaleLabel.fontSize,t.defaults.global.defaultFontSize),r=e.getValueOrDefault(this.options.scaleLabel.fontStyle,t.defaults.global.defaultFontStyle),h=e.getValueOrDefault(this.options.scaleLabel.fontFamily,t.defaults.global.defaultFontFamily);e.fontString(n,r,h);if(this.isHorizontal()?this.minSize.width=this.isFullWidth()?this.maxWidth-this.margins.left-this.margins.right:this.maxWidth:this.minSize.width=this.options.gridLines.tickMarkLength,this.isHorizontal()?this.minSize.height=this.options.gridLines.tickMarkLength:this.minSize.height=this.maxHeight,this.options.scaleLabel.display&&(this.isHorizontal()?this.minSize.height+=1.5*n:this.minSize.width+=1.5*n),this.options.ticks.display&&this.options.display){this.longestTextCache||(this.longestTextCache={});var l=e.longestText(this.ctx,s,this.ticks,this.longestTextCache);if(this.isHorizontal()){this.longestLabelWidth=l;var c=Math.sin(e.toRadians(this.labelRotation))*this.longestLabelWidth+1.5*i;this.minSize.height=Math.min(this.maxHeight,this.minSize.height+c),this.ctx.font=s;var d=this.ctx.measureText(this.ticks[0]).width,u=this.ctx.measureText(this.ticks[this.ticks.length-1]).width,g=Math.cos(e.toRadians(this.labelRotation)),f=Math.sin(e.toRadians(this.labelRotation));this.paddingLeft=0!==this.labelRotation?g*d+3:d/2+3,this.paddingRight=0!==this.labelRotation?f*(i/2)+3:u/2+3}else{var p=this.maxWidth-this.minSize.width;this.options.ticks.mirror||(l+=this.options.ticks.padding),p>l?this.minSize.width+=l:this.minSize.width=this.maxWidth,this.paddingTop=i/2,this.paddingBottom=i/2}}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)),this.width=this.minSize.width,this.height=this.minSize.height},afterFit:function(){e.callCallback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function i(t){return null===t||"undefined"==typeof t?NaN:"number"==typeof t&&isNaN(t)?NaN:"object"==typeof t?t instanceof Date?t:i(this.isHorizontal()?t.x:t.y):t},getLabelForIndex:e.noop,getPixelForValue:e.noop,getValueForPixel:e.noop,getPixelForTick:function(t,e){if(this.isHorizontal()){var i=this.width-(this.paddingLeft+this.paddingRight),a=i/Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1),o=a*t+this.paddingLeft;e&&(o+=a/2);var s=this.left+Math.round(o);return s+=this.isFullWidth()?this.margins.left:0}var n=this.height-(this.paddingTop+this.paddingBottom);return this.top+t*(n/(this.ticks.length-1))},getPixelForDecimal:function(t){if(this.isHorizontal()){var e=this.width-(this.paddingLeft+this.paddingRight),i=e*t+this.paddingLeft,a=this.left+Math.round(i);return a+=this.isFullWidth()?this.margins.left:0}return this.top+t*this.height},draw:function(i){if(this.options.display){var a,o,s,n,r,h=0!==this.labelRotation,l=this.options.ticks.autoSkip;this.options.ticks.maxTicksLimit&&(r=this.options.ticks.maxTicksLimit);var c=e.getValueOrDefault(this.options.ticks.fontColor,t.defaults.global.defaultFontColor),d=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),u=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),g=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),f=e.fontString(d,u,g),p=this.options.gridLines.tickMarkLength,m=e.getValueOrDefault(this.options.scaleLabel.fontColor,t.defaults.global.defaultFontColor),b=e.getValueOrDefault(this.options.scaleLabel.fontSize,t.defaults.global.defaultFontSize),x=e.getValueOrDefault(this.options.scaleLabel.fontStyle,t.defaults.global.defaultFontStyle),v=e.getValueOrDefault(this.options.scaleLabel.fontFamily,t.defaults.global.defaultFontFamily),y=e.fontString(b,x,v),k=Math.cos(e.toRadians(this.labelRotation)),S=(Math.sin(e.toRadians(this.labelRotation)),this.longestLabelWidth*k);if(this.ctx.fillStyle=c,this.isHorizontal()){a=!0;var C="bottom"===this.options.position?this.top:this.bottom-p,w="bottom"===this.options.position?this.top+p:this.bottom;if(o=!1,(S/2+this.options.ticks.autoSkipPadding)*this.ticks.length>this.width-(this.paddingLeft+this.paddingRight)&&(o=1+Math.floor((S/2+this.options.ticks.autoSkipPadding)*this.ticks.length/(this.width-(this.paddingLeft+this.paddingRight)))),r&&this.ticks.length>r)for(;!o||this.ticks.length/(o||1)>r;)o||(o=1),o+=1;l||(o=!1),e.each(this.ticks,function(t,s){var n=this.ticks.length===s+1,r=o>1&&s%o>0||s%o===0&&s+o>this.ticks.length;if((!r||n)&&void 0!==t&&null!==t){var l=this.getPixelForTick(s),c=this.getPixelForTick(s,this.options.gridLines.offsetGridLines);this.options.gridLines.display&&(s===("undefined"!=typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,a=!0):a&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,a=!1),l+=e.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(l,C),this.ctx.lineTo(l,w)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(l,i.top),this.ctx.lineTo(l,i.bottom)),this.ctx.stroke()),this.options.ticks.display&&(this.ctx.save(),this.ctx.translate(c,h?this.top+12:"top"===this.options.position?this.bottom-p:this.top+p),this.ctx.rotate(-1*e.toRadians(this.labelRotation)),this.ctx.font=f,this.ctx.textAlign=h?"right":"center",this.ctx.textBaseline=h?"middle":"top"===this.options.position?"bottom":"top",this.ctx.fillText(t,0,0),this.ctx.restore())}},this),this.options.scaleLabel.display&&(this.ctx.textAlign="center",this.ctx.textBaseline="middle",this.ctx.fillStyle=m,this.ctx.font=y,s=this.left+(this.right-this.left)/2,n="bottom"===this.options.position?this.bottom-b/2:this.top+b/2,this.ctx.fillText(this.options.scaleLabel.labelString,s,n))}else{a=!0;var D="right"===this.options.position?this.left:this.right-5,M="right"===this.options.position?this.left+5:this.right;if(e.each(this.ticks,function(t,o){if(void 0!==t&&null!==t){var s=this.getPixelForTick(o);if(this.options.gridLines.display&&(o===("undefined"!=typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,a=!0):a&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,a=!1),s+=e.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(D,s),this.ctx.lineTo(M,s)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(i.left,s),this.ctx.lineTo(i.right,s)),this.ctx.stroke()),this.options.ticks.display){var n,r=this.getPixelForTick(o,this.options.gridLines.offsetGridLines);this.ctx.save(),"left"===this.options.position?this.options.ticks.mirror?(n=this.right+this.options.ticks.padding,this.ctx.textAlign="left"):(n=this.right-this.options.ticks.padding,this.ctx.textAlign="right"):this.options.ticks.mirror?(n=this.left-this.options.ticks.padding,this.ctx.textAlign="right"):(n=this.left+this.options.ticks.padding,this.ctx.textAlign="left"),this.ctx.translate(n,r),this.ctx.rotate(-1*e.toRadians(this.labelRotation)),this.ctx.font=f,this.ctx.textBaseline="middle",this.ctx.fillText(t,0,0),this.ctx.restore()}}},this),this.options.scaleLabel.display){s="left"===this.options.position?this.left+b/2:this.right-b/2,n=this.top+(this.bottom-this.top)/2;var A="left"===this.options.position?-.5*Math.PI:.5*Math.PI;this.ctx.save(),this.ctx.translate(s,n),this.ctx.rotate(A),this.ctx.textAlign="center",this.ctx.fillStyle=m,this.ctx.font=y,this.ctx.textBaseline="middle",this.ctx.fillText(this.options.scaleLabel.labelString,0,0),this.ctx.restore()}}this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color;var _=this.left,I=this.right,F=this.top,P=this.bottom;this.isHorizontal()?(F=P="top"===this.options.position?this.bottom:this.top,F+=e.aliasPixel(this.ctx.lineWidth),P+=e.aliasPixel(this.ctx.lineWidth)):(_=I="left"===this.options.position?this.right:this.left,_+=e.aliasPixel(this.ctx.lineWidth),I+=e.aliasPixel(this.ctx.lineWidth)),this.ctx.beginPath(),this.ctx.moveTo(_,F),this.ctx.lineTo(I,P),this.ctx.stroke()}}})}},{}],31:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.scaleService={constructors:{},defaults:{},registerScaleType:function(t,i,a){this.constructors[t]=i,this.defaults[t]=e.clone(a)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(i){return this.defaults.hasOwnProperty(i)?e.scaleMerge(t.defaults.scale,this.defaults[i]):{}},addScalesToLayout:function(i){e.each(i.scales,function(e){t.layoutService.addBox(i,e)})}}}},{}],32:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.title={display:!1,position:"top",fullWidth:!0,fontStyle:"bold",padding:10,text:""},t.Title=t.Element.extend({initialize:function(i){e.extend(this,i),this.options=e.configMerge(t.defaults.global.title,i.options),this.legendHitBoxes=[]},beforeUpdate:e.noop,update:function(t,e,i){return this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this.margins=i,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeBuildLabels(),this.buildLabels(),this.afterBuildLabels(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},afterUpdate:e.noop,beforeSetDimensions:e.noop,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.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.minSize={width:0,height:0}},afterSetDimensions:e.noop,beforeBuildLabels:e.noop,buildLabels:e.noop,afterBuildLabels:e.noop,beforeFit:e.noop,fit:function(){var i=(this.ctx,e.getValueOrDefault(this.options.fontSize,t.defaults.global.defaultFontSize)),a=e.getValueOrDefault(this.options.fontStyle,t.defaults.global.defaultFontStyle),o=e.getValueOrDefault(this.options.fontFamily,t.defaults.global.defaultFontFamily);e.fontString(i,a,o);this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=0,this.isHorizontal()?this.minSize.height=0:this.minSize.height=this.maxHeight,this.isHorizontal()?this.options.display&&(this.minSize.height+=i+2*this.options.padding):this.options.display&&(this.minSize.width+=i+2*this.options.padding),this.width=this.minSize.width,this.height=this.minSize.height},afterFit:e.noop,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){if(this.options.display){var i,a,o=this.ctx,s=e.getValueOrDefault(this.options.fontColor,t.defaults.global.defaultFontColor),n=e.getValueOrDefault(this.options.fontSize,t.defaults.global.defaultFontSize),r=e.getValueOrDefault(this.options.fontStyle,t.defaults.global.defaultFontStyle),h=e.getValueOrDefault(this.options.fontFamily,t.defaults.global.defaultFontFamily),l=e.fontString(n,r,h);if(o.fillStyle=s,o.font=l,this.isHorizontal())o.textAlign="center",o.textBaseline="middle",i=this.left+(this.right-this.left)/2,a=this.top+(this.bottom-this.top)/2,o.fillText(this.options.text,i,a);else{i="left"===this.options.position?this.left+n/2:this.right-n/2,a=this.top+(this.bottom-this.top)/2;var c="left"===this.options.position?-.5*Math.PI:.5*Math.PI;o.save(),o.translate(i,a),o.rotate(c),o.textAlign="center",o.textBaseline="middle",o.fillText(this.options.text,0,0),o.restore()}}}})}},{}],33:[function(t,e,i){"use strict";e.exports=function(t){function e(t,e){return e&&(i.isArray(e)?t=t.concat(e):t.push(e)),t}var i=t.helpers;t.defaults.global.tooltips={enabled:!0,custom:null,mode:"single",backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleColor:"#fff",titleAlign:"left",bodySpacing:2,bodyColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,yAlign:"center",xAlign:"center",caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",callbacks:{beforeTitle:i.noop,title:function(t,e){var i="";return t.length>0&&(t[0].xLabel?i=t[0].xLabel:e.labels.length>0&&t[0].indexthis._chart.height-t.height&&(this._model.yAlign="bottom");var e,i,a,o,s,n=this,r=(this._chartInstance.chartArea.left+this._chartInstance.chartArea.right)/2,h=(this._chartInstance.chartArea.top+this._chartInstance.chartArea.bottom)/2;"center"===this._model.yAlign?(e=function(t){return r>=t},i=function(t){return t>r}):(e=function(e){return e<=t.width/2},i=function(e){return e>=n._chart.width-t.width/2}),a=function(e){return e+t.width>n._chart.width},o=function(e){return e-t.width<0},s=function(t){return h>=t?"top":"bottom"},e(this._model.x)?(this._model.xAlign="left",a(this._model.x)&&(this._model.xAlign="center",this._model.yAlign=s(this._model.y))):i(this._model.x)&&(this._model.xAlign="right",o(this._model.x)&&(this._model.xAlign="center",this._model.yAlign=s(this._model.y)))},getBackgroundPoint:function(t,e){var i={x:t.x,y:t.y};return"right"===t.xAlign?i.x-=e.width:"center"===t.xAlign&&(i.x-=e.width/2),"top"===t.yAlign?i.y+=t.caretPadding+t.caretSize:"bottom"===t.yAlign?i.y-=e.height+t.caretPadding+t.caretSize:i.y-=e.height/2,"center"===t.yAlign?"left"===t.xAlign?i.x+=t.caretPadding+t.caretSize:"right"===t.xAlign&&(i.x-=t.caretPadding+t.caretSize):"left"===t.xAlign?i.x-=t.cornerRadius+t.caretPadding:"right"===t.xAlign&&(i.x+=t.cornerRadius+t.caretPadding),i},drawCaret:function(t,e,a,o){var s,n,r,h,l,c,d=this._view,u=this._chart.ctx;"center"===d.yAlign?("left"===d.xAlign?(s=t.x,n=s-d.caretSize,r=s):(s=t.x+e.width,n=s+d.caretSize,r=s),l=t.y+e.height/2,h=l-d.caretSize,c=l+d.caretSize):("left"===d.xAlign?(s=t.x+d.cornerRadius,n=s+d.caretSize,r=n+d.caretSize):"right"===d.xAlign?(s=t.x+e.width-d.cornerRadius,n=s-d.caretSize,r=n-d.caretSize):(n=t.x+e.width/2,s=n-d.caretSize,r=n+d.caretSize),"top"===d.yAlign?(h=t.y,l=h-d.caretSize,c=h):(h=t.y+e.height,l=h+d.caretSize,c=h));var g=i.color(d.backgroundColor);u.fillStyle=g.alpha(a*g.alpha()).rgbString(),u.beginPath(),u.moveTo(s,h),u.lineTo(n,l),u.lineTo(r,c),u.closePath(),u.fill()},drawTitle:function(t,e,a,o){if(e.title.length){a.textAlign=e._titleAlign,a.textBaseline="top";var s=i.color(e.titleColor);a.fillStyle=s.alpha(o*s.alpha()).rgbString(),a.font=i.fontString(e.titleFontSize,e._titleFontStyle,e._titleFontFamily),i.each(e.title,function(i,o){a.fillText(i,t.x,t.y),t.y+=e.titleFontSize+e.titleSpacing,o+1===e.title.length&&(t.y+=e.titleMarginBottom-e.titleSpacing)})}},drawBody:function(t,e,a,o){a.textAlign=e._bodyAlign,a.textBaseline="top";var s=i.color(e.bodyColor);a.fillStyle=s.alpha(o*s.alpha()).rgbString(),a.font=i.fontString(e.bodyFontSize,e._bodyFontStyle,e._bodyFontFamily),i.each(e.beforeBody,function(i){a.fillText(i,t.x,t.y),t.y+=e.bodyFontSize+e.bodySpacing}),i.each(e.body,function(s,n){"single"!==this._options.tooltips.mode&&(a.fillStyle=i.color(e.legendColorBackground).alpha(o).rgbaString(),a.fillRect(t.x,t.y,e.bodyFontSize,e.bodyFontSize),a.strokeStyle=i.color(e.labelColors[n].borderColor).alpha(o).rgbaString(),a.strokeRect(t.x,t.y,e.bodyFontSize,e.bodyFontSize),a.fillStyle=i.color(e.labelColors[n].backgroundColor).alpha(o).rgbaString(),a.fillRect(t.x+1,t.y+1,e.bodyFontSize-2,e.bodyFontSize-2),a.fillStyle=i.color(e.bodyColor).alpha(o).rgbaString()),a.fillText(s,t.x+("single"!==this._options.tooltips.mode?e.bodyFontSize+2:0),t.y),t.y+=e.bodyFontSize+e.bodySpacing},this),i.each(e.afterBody,function(i){a.fillText(i,t.x,t.y),t.y+=e.bodyFontSize}),t.y-=e.bodySpacing},drawFooter:function(t,e,a,o){if(e.footer.length){t.y+=e.footerMarginTop,a.textAlign=e._footerAlign,a.textBaseline="top";var s=i.color(e.footerColor);a.fillStyle=s.alpha(o*s.alpha()).rgbString(),a.font=i.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),i.each(e.footer,function(i){a.fillText(i,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing})}},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var a=e.caretPadding,o=this.getTooltipSize(e),s={x:e.x,y:e.y},n=Math.abs(e.opacity<.001)?0:e.opacity;if(this._options.tooltips.enabled){var r=i.color(e.backgroundColor);t.fillStyle=r.alpha(n*r.alpha()).rgbString(),i.drawRoundedRectangle(t,s.x,s.y,o.width,o.height,e.cornerRadius),t.fill(),this.drawCaret(s,o,n,a),s.x+=e.xPadding,s.y+=e.yPadding,this.drawTitle(s,e,t,n),this.drawBody(s,e,t,n),this.drawFooter(s,e,t,n)}}}})}},{}],34:[function(t,e,i){"use strict";e.exports=function(t,e){var i=t.helpers;t.defaults.global.elements.arc={backgroundColor:t.defaults.global.defaultColor,borderColor:"#fff",borderWidth:2},t.elements.Arc=t.Element.extend({inLabelRange:function(t){var e=this._view;return e?Math.pow(t-e.x,2)n;)n+=2*Math.PI;for(;o.angle>n;)o.angle-=2*Math.PI;for(;o.angle=s&&o.angle<=n,h=o.distance>=a.innerRadius&&o.distance<=a.outerRadius;return r&&h}return!1},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,e.startAngle,e.endAngle),t.arc(e.x,e.y,e.innerRadius,e.endAngle,e.startAngle,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}},{}],35:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.elements.line={tension:.4,backgroundColor:t.defaults.global.defaultColor,borderWidth:3,borderColor:t.defaults.global.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0},t.elements.Line=t.Element.extend({lineToNextPoint:function(t,e,i,a,o){var s=this._chart.ctx;e._view.skip?a.call(this,t,e,i):t._view.skip?o.call(this,t,e,i):0===e._view.tension?s.lineTo(e._view.x,e._view.y):s.bezierCurveTo(t._view.controlPointNextX,t._view.controlPointNextY,e._view.controlPointPreviousX,e._view.controlPointPreviousY,e._view.x,e._view.y)},draw:function(){function i(t){n._view.skip||r._view.skip?t&&s.lineTo(a._view.scaleZero.x,a._view.scaleZero.y):s.bezierCurveTo(r._view.controlPointNextX,r._view.controlPointNextY,n._view.controlPointPreviousX,n._view.controlPointPreviousY,n._view.x,n._view.y)}var a=this,o=this._view,s=this._chart.ctx,n=this._children[0],r=this._children[this._children.length-1];s.save(),this._children.length>0&&o.fill&&(s.beginPath(),e.each(this._children,function(t,i){var a=e.previousItem(this._children,i),n=e.nextItem(this._children,i);0===i?(this._loop?s.moveTo(o.scaleZero.x,o.scaleZero.y):s.moveTo(t._view.x,o.scaleZero),t._view.skip?this._loop||s.moveTo(n._view.x,this._view.scaleZero):s.lineTo(t._view.x,t._view.y)):this.lineToNextPoint(a,t,n,function(t,e,i){this._loop?s.lineTo(this._view.scaleZero.x,this._view.scaleZero.y):(s.lineTo(t._view.x,this._view.scaleZero),s.moveTo(i._view.x,this._view.scaleZero))},function(t,e){s.lineTo(e._view.x,e._view.y)})},this),this._loop?i(!0):(s.lineTo(this._children[this._children.length-1]._view.x,o.scaleZero),s.lineTo(this._children[0]._view.x,o.scaleZero)),s.fillStyle=o.backgroundColor||t.defaults.global.defaultColor,s.closePath(),s.fill()),s.lineCap=o.borderCapStyle||t.defaults.global.elements.line.borderCapStyle,s.setLineDash&&s.setLineDash(o.borderDash||t.defaults.global.elements.line.borderDash),s.lineDashOffset=o.borderDashOffset||t.defaults.global.elements.line.borderDashOffset,s.lineJoin=o.borderJoinStyle||t.defaults.global.elements.line.borderJoinStyle,s.lineWidth=o.borderWidth||t.defaults.global.elements.line.borderWidth,s.strokeStyle=o.borderColor||t.defaults.global.defaultColor,s.beginPath(),e.each(this._children,function(t,i){var a=e.previousItem(this._children,i),o=e.nextItem(this._children,i);0===i?s.moveTo(t._view.x,t._view.y):this.lineToNextPoint(a,t,o,function(t,e,i){s.moveTo(i._view.x,i._view.y)},function(t,e){s.moveTo(e._view.x,e._view.y)})},this),this._loop&&this._children.length>0&&i(),s.stroke(),s.restore()}})}},{}],36:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.elements.point={radius:3,pointStyle:"circle",backgroundColor:t.defaults.global.defaultColor,borderWidth:1,borderColor:t.defaults.global.defaultColor,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},t.elements.Point=t.Element.extend({inRange:function(t,e){var i=this._view;if(i){var a=i.hitRadius+i.radius;return Math.pow(t-i.x,2)+Math.pow(e-i.y,2)0){a.strokeStyle=i.borderColor||t.defaults.global.defaultColor,a.lineWidth=e.getValueOrDefault(i.borderWidth,t.defaults.global.elements.point.borderWidth),a.fillStyle=i.backgroundColor||t.defaults.global.defaultColor;var o,s,n=i.radius;switch(i.pointStyle){default:a.beginPath(),a.arc(i.x,i.y,n,0,2*Math.PI),a.closePath(),a.fill();break;case"triangle":a.beginPath();var r=3*n/Math.sqrt(3),h=r*Math.sqrt(3)/2;a.moveTo(i.x-r/2,i.y+h/3),a.lineTo(i.x+r/2,i.y+h/3),a.lineTo(i.x,i.y-2*h/3),a.closePath(),a.fill();break;case"rect":a.fillRect(i.x-1/Math.SQRT2*n,i.y-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),a.strokeRect(i.x-1/Math.SQRT2*n,i.y-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n);break;case"rectRot":a.translate(i.x,i.y),a.rotate(Math.PI/4),a.fillRect(-1/Math.SQRT2*n,-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),a.strokeRect(-1/Math.SQRT2*n,-1/Math.SQRT2*n,2/Math.SQRT2*n,2/Math.SQRT2*n),a.setTransform(1,0,0,1,0,0);break;case"cross":a.beginPath(),a.moveTo(i.x,i.y+n),a.lineTo(i.x,i.y-n),a.moveTo(i.x-n,i.y),a.lineTo(i.x+n,i.y),a.closePath();break;case"crossRot":a.beginPath(),o=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,a.moveTo(i.x-o,i.y-s),a.lineTo(i.x+o,i.y+s),a.moveTo(i.x-o,i.y+s),a.lineTo(i.x+o,i.y-s),a.closePath();break;case"star":a.beginPath(),a.moveTo(i.x,i.y+n),a.lineTo(i.x,i.y-n),a.moveTo(i.x-n,i.y),a.lineTo(i.x+n,i.y),o=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,a.moveTo(i.x-o,i.y-s),a.lineTo(i.x+o,i.y+s),a.moveTo(i.x-o,i.y+s),a.lineTo(i.x+o,i.y-s),a.closePath();break;case"line":a.beginPath(),a.moveTo(i.x-n,i.y),a.lineTo(i.x+n,i.y),a.closePath();break;case"dash":a.beginPath(),a.moveTo(i.x,i.y),a.lineTo(i.x+n,i.y),a.closePath()}a.stroke()}}}})}},{}],37:[function(t,e,i){"use strict";e.exports=function(t){t.helpers;t.defaults.global.elements.rectangle={backgroundColor:t.defaults.global.defaultColor,borderWidth:0,borderColor:t.defaults.global.defaultColor,borderSkipped:"bottom"},t.elements.Rectangle=t.Element.extend({draw:function(){function t(t){return h[(c+t)%4]}var e=this._chart.ctx,i=this._view,a=i.width/2,o=i.x-a,s=i.x+a,n=i.base-(i.base-i.y),r=i.borderWidth/2;i.borderWidth&&(o+=r,s-=r,n+=r),e.beginPath(),e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,e.lineWidth=i.borderWidth;var h=[[o,i.base],[o,n],[s,n],[s,i.base]],l=["bottom","left","top","right"],c=l.indexOf(i.borderSkipped,0);-1===c&&(c=0),e.moveTo.apply(e,t(0));for(var d=1;4>d;d++)e.lineTo.apply(e,t(d));e.fill(),i.borderWidth&&e.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=this._view,a=!1;return i&&(a=i.y=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.y&&e<=i.base:t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.base&&e<=i.y),a},inLabelRange:function(t){var e=this._view;return e?t>=e.x-e.width/2&&t<=e.x+e.width/2:!1},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})}},{}],38:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"bottom"},a=t.Scale.extend({determineDataLimits:function(){this.minIndex=0,this.maxIndex=this.chart.data.labels.length-1;var t;void 0!==this.options.ticks.min&&(t=e.indexOf(this.chart.data.labels,this.options.ticks.min),this.minIndex=-1!==t?t:this.minIndex),void 0!==this.options.ticks.max&&(t=e.indexOf(this.chart.data.labels,this.options.ticks.max),this.maxIndex=-1!==t?t:this.maxIndex),this.min=this.chart.data.labels[this.minIndex],this.max=this.chart.data.labels[this.maxIndex]},buildTicks:function(t){this.ticks=0===this.minIndex&&this.maxIndex===this.chart.data.labels.length-1?this.chart.data.labels:this.chart.data.labels.slice(this.minIndex,this.maxIndex+1)},getLabelForIndex:function(t,e){return this.ticks[t]},getPixelForValue:function(t,e,i,a){var o=Math.max(this.maxIndex+1-this.minIndex-(this.options.gridLines.offsetGridLines?0:1),1);if(this.isHorizontal()){var s=this.width-(this.paddingLeft+this.paddingRight),n=s/o,r=n*(e-this.minIndex)+this.paddingLeft;return this.options.gridLines.offsetGridLines&&a&&(r+=n/2),this.left+Math.round(r)}var h=this.height-(this.paddingTop+this.paddingBottom),l=h/o,c=l*(e-this.minIndex)+this.paddingTop;return this.options.gridLines.offsetGridLines&&a&&(c+=l/2),this.top+Math.round(c)},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null,e)},getValueForPixel:function(t){var e,i=Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1),a=this.isHorizontal(),o=a?this.width-(this.paddingLeft+this.paddingRight):this.height-(this.paddingTop+this.paddingBottom),s=o/i;return this.options.gridLines.offsetGridLines&&(t-=s/2),t-=a?this.paddingLeft:this.paddingTop,e=0>=t?0:Math.round(t/s)}});t.scaleService.registerScaleType("category",a,i)}},{}],39:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(t,i,a){var o=a.length>3?a[2]-a[1]:a[1]-a[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var s=e.log10(Math.abs(o)),n="";if(0!==t){var r=-1*Math.floor(s);r=Math.max(Math.min(r,20),0),n=t.toFixed(r)}else n="0";return n}}},a=t.Scale.extend({determineDataLimits:function(){if(this.min=null,this.max=null,this.options.stacked){var t={},i=!1,a=!1;e.each(this.chart.data.datasets,function(o,s){var n=this.chart.getDatasetMeta(s);void 0===t[n.type]&&(t[n.type]={positiveValues:[],negativeValues:[]});var r=t[n.type].positiveValues,h=t[n.type].negativeValues;this.chart.isDatasetVisible(s)&&(this.isHorizontal()?n.xAxisID===this.id:n.yAxisID===this.id)&&e.each(o.data,function(t,e){var o=+this.getRightValue(t);isNaN(o)||n.data[e].hidden||(r[e]=r[e]||0,h[e]=h[e]||0,this.options.relativePoints?r[e]=100:0>o?(a=!0,h[e]+=o):(i=!0,r[e]+=o))},this)},this),e.each(t,function(t){var i=t.positiveValues.concat(t.negativeValues),a=e.min(i),o=e.max(i);this.min=null===this.min?a:Math.min(this.min,a),this.max=null===this.max?o:Math.max(this.max,o)},this)}else e.each(this.chart.data.datasets,function(t,i){var a=this.chart.getDatasetMeta(i);this.chart.isDatasetVisible(i)&&(this.isHorizontal()?a.xAxisID===this.id:a.yAxisID===this.id)&&e.each(t.data,function(t,e){var i=+this.getRightValue(t);isNaN(i)||a.data[e].hidden||(null===this.min?this.min=i:ithis.max&&(this.max=i))},this)},this);if(this.options.ticks.beginAtZero){var o=e.sign(this.min),s=e.sign(this.max);0>o&&0>s?this.max=0:o>0&&s>0&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=Math.min(this.min,this.options.ticks.suggestedMin)),void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax)),this.min===this.max&&(this.min--,this.max++)},buildTicks:function(){this.ticks=[];var i;if(this.isHorizontal())i=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.width/50));else{var a=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize);i=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.height/(2*a)))}i=Math.max(2,i);var o,s=this.options.ticks.fixedStepSize&&this.options.ticks.fixedStepSize>0||this.options.ticks.stepSize&&this.options.ticks.stepSize>0;if(s)o=e.getValueOrDefault(this.options.ticks.fixedStepSize,this.options.ticks.stepSize);else{var n=e.niceNum(this.max-this.min,!1);o=e.niceNum(n/(i-1),!0)}var r=Math.floor(this.min/o)*o,h=Math.ceil(this.max/o)*o,l=(h-r)/o;l=e.almostEquals(l,Math.round(l),o/1e3)?Math.round(l):Math.ceil(l),this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:r);for(var c=1;l>c;++c)this.ticks.push(r+c*o);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:h),("left"===this.options.position||"right"===this.options.position)&&this.ticks.reverse(),this.max=e.max(this.ticks),this.min=e.min(this.ticks),this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),t.Scale.prototype.convertTicksToLabels.call(this)},getPixelForValue:function(t,e,i,a){var o,s=+this.getRightValue(t),n=this.end-this.start;if(this.isHorizontal()){var r=this.width-(this.paddingLeft+this.paddingRight);return o=this.left+r/n*(s-this.start),Math.round(o+this.paddingLeft)}var h=this.height-(this.paddingTop+this.paddingBottom);return o=this.bottom-this.paddingBottom-h/n*(s-this.start),Math.round(o)},getValueForPixel:function(t){var e;if(this.isHorizontal()){var i=this.width-(this.paddingLeft+this.paddingRight);e=(t-this.left-this.paddingLeft)/i}else{var a=this.height-(this.paddingTop+this.paddingBottom);e=(this.bottom-this.paddingBottom-t)/a}return this.start+(this.end-this.start)*e},getPixelForTick:function(t,e){return this.getPixelForValue(this.ticksAsNumbers[t],null,null,e)}});t.scaleService.registerScaleType("linear",a,i)}},{}],40:[function(t,e,i){"use strict";e.exports=function(t){var e=t.helpers,i={position:"left",ticks:{callback:function(e,i,a){var o=e/Math.pow(10,Math.floor(t.helpers.log10(e)));return 1===o||2===o||5===o||0===i||i===a.length-1?e.toExponential():""}}},a=t.Scale.extend({determineDataLimits:function(){if(this.min=null,this.max=null,this.options.stacked){var t={};e.each(this.chart.data.datasets,function(i,a){var o=this.chart.getDatasetMeta(a);this.chart.isDatasetVisible(a)&&(this.isHorizontal()?o.xAxisID===this.id:o.yAxisID===this.id)&&(void 0===t[o.type]&&(t[o.type]=[]),e.each(i.data,function(e,i){var a=t[o.type],s=+this.getRightValue(e);isNaN(s)||o.data[i].hidden||(a[i]=a[i]||0,this.options.relativePoints?a[i]=100:a[i]+=s)},this))},this),e.each(t,function(t){var i=e.min(t),a=e.max(t);this.min=null===this.min?i:Math.min(this.min,i),this.max=null===this.max?a:Math.max(this.max,a)},this)}else e.each(this.chart.data.datasets,function(t,i){var a=this.chart.getDatasetMeta(i);this.chart.isDatasetVisible(i)&&(this.isHorizontal()?a.xAxisID===this.id:a.yAxisID===this.id)&&e.each(t.data,function(t,e){var i=+this.getRightValue(t);isNaN(i)||a.data[e].hidden||(null===this.min?this.min=i:ithis.max&&(this.max=i))},this)},this);this.min=void 0!==this.options.ticks.min?this.options.ticks.min:this.min,this.max=void 0!==this.options.ticks.max?this.options.ticks.max:this.max,this.min===this.max&&(0!==this.min&&null!==this.min?(this.min=Math.pow(10,Math.floor(e.log10(this.min))-1),this.max=Math.pow(10,Math.floor(e.log10(this.max))+1)):(this.min=1,this.max=10))},buildTicks:function(){this.ticks=[];for(var t=void 0!==this.options.ticks.min?this.options.ticks.min:Math.pow(10,Math.floor(e.log10(this.min)));tthis.max&&(this.max=i))},this)}},this),this.options.ticks.beginAtZero){var t=e.sign(this.min),i=e.sign(this.max);0>t&&0>i?this.max=0:t>0&&i>0&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=Math.min(this.min,this.options.ticks.suggestedMin)),void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax)),this.min===this.max&&(this.min--,this.max++)},buildTicks:function(){this.ticks=[];var i=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),a=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*i)));a=Math.max(2,a);var o=e.niceNum(this.max-this.min,!1),s=e.niceNum(o/(a-1),!0),n=Math.floor(this.min/s)*s,r=Math.ceil(this.max/s)*s,h=Math.ceil((r-n)/s);this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:n);for(var l=1;h>l;++l)this.ticks.push(n+l*s);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:r),this.max=e.max(this.ticks),this.min=e.min(this.ticks),this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),this.zeroLineIndex=this.ticks.indexOf(0)},convertTicksToLabels:function(){t.Scale.prototype.convertTicksToLabels.call(this),this.pointLabels=this.chart.data.labels.map(this.options.pointLabels.callback,this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var i,a,o,s,n,r,h,l,c,d,u,g,f=e.getValueOrDefault(this.options.pointLabels.fontSize,t.defaults.global.defaultFontSize),p=e.getValueOrDefault(this.options.pointLabels.fontStyle,t.defaults.global.defaultFontStyle),m=e.getValueOrDefault(this.options.pointLabels.fontFamily,t.defaults.global.defaultFontFamily),b=e.fontString(f,p,m),x=e.min([this.height/2-f-5,this.width/2]),v=this.width,y=0;for(this.ctx.font=b,a=0;av&&(v=i.x+s,n=a),i.x-sv&&(v=i.x+o,n=a):a>this.getValueCount()/2&&i.x-o0||this.options.reverse){var s=this.getDistanceFromCenterForValue(this.ticks[o]),n=this.yCenter-s;if(this.options.gridLines.display)if(i.strokeStyle=this.options.gridLines.color,i.lineWidth=this.options.gridLines.lineWidth,this.options.lineArc)i.beginPath(),i.arc(this.xCenter,this.yCenter,s,0,2*Math.PI),i.closePath(),i.stroke();else{i.beginPath();for(var r=0;r=0;a--){if(this.options.angleLines.display){var o=this.getPointPosition(a,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max));i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(o.x,o.y),i.stroke(),i.closePath()}var s=this.getPointPosition(a,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max)+5),n=e.getValueOrDefault(this.options.pointLabels.fontColor,t.defaults.global.defaultFontColor),r=e.getValueOrDefault(this.options.pointLabels.fontSize,t.defaults.global.defaultFontSize),h=e.getValueOrDefault(this.options.pointLabels.fontStyle,t.defaults.global.defaultFontStyle),l=e.getValueOrDefault(this.options.pointLabels.fontFamily,t.defaults.global.defaultFontFamily),c=e.fontString(r,h,l);i.font=c,i.fillStyle=n;var d=this.pointLabels.length,u=this.pointLabels.length/2,g=u/2,f=g>a||a>d-g,p=a===g||a===d-g;0===a?i.textAlign="center":a===u?i.textAlign="center":u>a?i.textAlign="left":i.textAlign="right",p?i.textBaseline="middle":f?i.textBaseline="bottom":i.textBaseline="top",i.fillText(this.pointLabels[a]?this.pointLabels[a]:"",s.x,s.y)}}}}});t.scaleService.registerScaleType("radialLinear",a,i)}},{}],42:[function(t,e,i){"use strict";var a=t("moment");a="function"==typeof a?a:window.moment,e.exports=function(t){var e=t.helpers,i={units:[{name:"millisecond",steps:[1,2,5,10,20,50,100,250,500]},{name:"second",steps:[1,2,5,10,30]},{name:"minute",steps:[1,2,5,10,30]},{name:"hour",steps:[1,2,3,6,12]},{name:"day",steps:[1,2,5]},{name:"week",maxStep:4},{name:"month",maxStep:3},{name:"quarter",maxStep:4},{name:"year",maxStep:!1}]},o={position:"bottom",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm:ss a",hour:"MMM D, hA",day:"ll",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1}},s=t.Scale.extend({initialize:function(){if(!a)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");
+t.Scale.prototype.initialize.call(this)},getLabelMoment:function(t,e){return this.labelMoments[t][e]},determineDataLimits:function(){this.labelMoments=[];var t=[];this.chart.data.labels&&this.chart.data.labels.length>0?(e.each(this.chart.data.labels,function(e,i){var a=this.parseTime(e);a.isValid()&&(this.options.time.round&&a.startOf(this.options.time.round),t.push(a))},this),this.firstTick=a.min.call(this,t),this.lastTick=a.max.call(this,t)):(this.firstTick=null,this.lastTick=null),e.each(this.chart.data.datasets,function(i,o){var s=[],n=this.chart.isDatasetVisible(o);"object"==typeof i.data[0]?e.each(i.data,function(t,e){var i=this.parseTime(this.getRightValue(t));i.isValid()&&(this.options.time.round&&i.startOf(this.options.time.round),s.push(i),n&&(this.firstTick=null!==this.firstTick?a.min(this.firstTick,i):i,this.lastTick=null!==this.lastTick?a.max(this.lastTick,i):i))},this):s=t,this.labelMoments.push(s)},this),this.options.time.min&&(this.firstTick=this.parseTime(this.options.time.min)),this.options.time.max&&(this.lastTick=this.parseTime(this.options.time.max)),this.firstTick=(this.firstTick||a()).clone(),this.lastTick=(this.lastTick||a()).clone()},buildTicks:function(a){this.ctx.save();var o=e.getValueOrDefault(this.options.ticks.fontSize,t.defaults.global.defaultFontSize),s=e.getValueOrDefault(this.options.ticks.fontStyle,t.defaults.global.defaultFontStyle),n=e.getValueOrDefault(this.options.ticks.fontFamily,t.defaults.global.defaultFontFamily),r=e.fontString(o,s,n);if(this.ctx.font=r,this.ticks=[],this.unitScale=1,this.scaleSizeInUnits=0,this.options.time.unit)this.tickUnit=this.options.time.unit||"day",this.displayFormat=this.options.time.displayFormats[this.tickUnit],this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,this.tickUnit,!0),this.unitScale=e.getValueOrDefault(this.options.time.unitStepSize,1);else{var h=this.isHorizontal()?this.width-(this.paddingLeft+this.paddingRight):this.height-(this.paddingTop+this.paddingBottom),l=this.tickFormatFunction(this.firstTick,0,[]),c=this.ctx.measureText(l).width,d=Math.cos(e.toRadians(this.options.ticks.maxRotation)),u=Math.sin(e.toRadians(this.options.ticks.maxRotation));c=c*d+o*u;var g=h/c;this.tickUnit="millisecond",this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,this.tickUnit,!0),this.displayFormat=this.options.time.displayFormats[this.tickUnit];for(var f=0,p=i.units[f];f=Math.ceil(this.scaleSizeInUnits/g)){this.unitScale=e.getValueOrDefault(this.options.time.unitStepSize,p.steps[m]);break}break}if(p.maxStep===!1||Math.ceil(this.scaleSizeInUnits/g)=0)break;k%this.unitScale===0&&this.ticks.push(S)}var C=this.ticks[this.ticks.length-1].diff(this.lastTick,this.tickUnit);(0!==C||0===this.scaleSizeInUnits)&&(this.options.time.max?(this.ticks.push(this.lastTick.clone()),this.scaleSizeInUnits=this.lastTick.diff(this.ticks[0],this.tickUnit,!0)):(this.ticks.push(this.lastTick.clone()),this.scaleSizeInUnits=this.lastTick.diff(this.firstTick,this.tickUnit,!0))),this.ctx.restore()},getLabelForIndex:function(t,e){var i=this.chart.data.labels&&t` | The data to plot in a line
+label | `String` | The label for the dataset which appears in the legend and tooltips
+xAxisID | `String` | The ID of the x axis to plot this dataset on
+yAxisID | `String` | The ID of the y axis to plot this dataset on
+fill | `Boolean` | If true, fill the area under the line
+lineTension | `Number` | Bezier curve tension of the line. Set to 0 to draw straightlines. *Note* This was renamed from 'tension' but the old name still works.
+backgroundColor | `Color` | The fill color under the line. See [Colors](#getting-started-colors)
+borderWidth | `Number` | The width of the line in pixels
+borderColor | `Color` | The color of the line.
+borderCapStyle | `String` | Cap style of the line. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap)
+borderDash | `Array` | Length and spacing of dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash)
+borderDashOffset | `Number` | Offset for line dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset)
+borderJoinStyle | `String` | Line joint style. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin)
+pointBorderColor | `Color or Array` | The border color for points.
+pointBackgroundColor | `Color or Array` | The fill color for points
+pointBorderWidth | `Number or Array` | The width of the point border in pixels
+pointRadius | `Number or Array` | The radius of the point shape. If set to 0, nothing is rendered.
+pointHoverRadius | `Number or Array` | The radius of the point when hovered
+pointHitRadius | `Number or Array` | The pixel size of the non-displayed point that reacts to mouse events
+pointHoverBackgroundColor | `Color or Array` | Point background color when hovered
+pointHoverBorderColor | `Color or Array` | Point border color when hovered
+pointHoverBorderWidth | `Number or Array` | Border width of point when hovered
+pointStyle | `String or Array` | The style of point. Options include 'circle', 'triangle', 'rect', 'rectRot', 'cross', 'crossRot', 'star', 'line', and 'dash'
+
+An example data object using these attributes is shown below.
```javascript
var data = {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [
{
label: "My First dataset",
-
- // Boolean - if true fill the area under the line
fill: false,
-
- // String - the color to fill the area under the line with if fill is true
- backgroundColor: "rgba(220,220,220,0.2)",
-
- // The properties below allow an array to be specified to change the value of the item at the given index
-
- // String or array - Line color
- borderColor: "rgba(220,220,220,1)",
-
- // String - cap style of the line. See https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap
+ lineTension: 0.1,
+ backgroundColor: "rgba(75,192,192,0.4)",
+ borderColor: "rgba(75,192,192,1)",
borderCapStyle: 'butt',
-
- // Array - Length and spacing of dashes. See https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash
borderDash: [],
-
- // Number - Offset for line dashes. See https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset
borderDashOffset: 0.0,
-
- // String - line join style. See https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin
borderJoinStyle: 'miter',
-
- // String or array - Point stroke color
- pointBorderColor: "rgba(220,220,220,1)",
-
- // String or array - Point fill color
+ pointBorderColor: "rgba(75,192,192,1)",
pointBackgroundColor: "#fff",
-
- // Number or array - Stroke width of point border
pointBorderWidth: 1,
-
- // Number or array - Radius of point when hovered
pointHoverRadius: 5,
-
- // String or array - point background color when hovered
- pointHoverBackgroundColor: "rgba(220,220,220,1)",
-
- // Point border color when hovered
+ pointHoverBackgroundColor: "rgba(75,192,192,1)",
pointHoverBorderColor: "rgba(220,220,220,1)",
-
- // Number or array - border width of point when hovered
pointHoverBorderWidth: 2,
-
- // Tension - bezier curve tension of the line. Set to 0 to draw straight Wlines connecting points
- tension: 0.1,
-
- // Number - the pixel size of the point shape. Can be set to 0 to not render a circle over the point
- radius: 1,
-
- // The actual data
+ pointRadius: 1,
+ pointHitRadius: 10,
data: [65, 59, 80, 81, 56, 55, 40],
-
- // String - If specified, binds the dataset to a certain y-axis. If not specified, the first y-axis is used. First id is y-axis-0
- yAxisID: "y-axis-0",
- },
- {
- label: "My Second dataset",
- fill: false,
- backgroundColor: "rgba(220,220,220,0.2)",
- borderColor: "rgba(220,220,220,1)",
- pointBorderColor: "rgba(220,220,220,1)",
- pointBackgroundColor: "#fff",
- pointBorderWidth: 1,
- pointHoverRadius: 5,
- pointHoverBackgroundColor: "rgba(220,220,220,1)",
- pointHoverBorderColor: "rgba(220,220,220,1)",
- pointHoverBorderWidth: 2,
- data: [28, 48, 40, 19, 86, 27, 90]
}
]
};
@@ -119,26 +98,26 @@ The label key on each dataset is optional, and can be used when generating a sca
These are the customisation options specific to Line charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.
-The default options for line chart are defined in `Chart.defaults.Line`.
+The default options for line chart are defined in `Chart.defaults.line`.
Name | Type | Default | Description
--- | --- | --- | ---
showLines | Boolean | true | If false, the lines between points are not drawn
stacked | Boolean | false | If true, lines stack on top of each other along the y axis.
*hover*.mode | String | "label" | Label's hover mode. "label" is used since the x axis displays data by the index in the dataset.
-elements | - | - | -
-*elements*.point | - | - | -
+elements | Object | - | -
+*elements*.point | Object | - | -
*elements.point*.radius | Number | `3` | Defines the size of the Point shape. Can be set to zero to skip rendering a point.
-scales | - | - | -
-*scales*.xAxes | Array | `[{type:"category","id":"x-axis-1"}]` | Defines all of the x axes used in the chart. See the [scale documentation](#getting-started-scales) for details on the available options.
+scales | Object | - | -
+*scales*.xAxes | Array | `[{type:"category","id":"x-axis-0"}]` | Defines all of the x axes used in the chart. See the [scale documentation](#scales) for details on the available options.
*Options for xAxes* | | |
type | String | "category" | As defined in ["Category"](#scales-category-scale).
-id | String | "x-axis-1" | Id of the axis so that data can bind to it.
+id | String | "x-axis-0" | Id of the axis so that data can bind to it.
| | |
- *scales*.yAxes | Array | `[{type:"linear","id":"y-axis-1"}]` | Defines all of the x axes used in the chart. See the [scale documentation](#getting-started-scales) for details on the available options.
+ *scales*.yAxes | Array | `[{type:"linear","id":"y-axis-0"}]` | Defines all of the y axes used in the chart. See the [scale documentation](#scales) for details on the available options.
*Options for yAxes* | | |
type | String | "linear" | As defined in ["Linear"](#scales-linear-scale).
- id | String | "y-axis-1" | Id of the axis so that data can bind to it.
+ id | String | "y-axis-0" | Id of the axis so that data can bind to it.
You can override these for your `Chart` instance by passing a member `options` into the `Line` method.
diff --git a/vendors/Chart.js/docs/03-Bar-Chart.md b/vendors/Chart.js/docs/03-Bar-Chart.md
index d59a6371..011f1e1c 100644
--- a/vendors/Chart.js/docs/03-Bar-Chart.md
+++ b/vendors/Chart.js/docs/03-Bar-Chart.md
@@ -21,7 +21,36 @@ var myBarChart = new Chart(ctx, {
});
```
+Or if you want horizontal bars.
+
+```javascript
+var myBarChart = new Chart(ctx, {
+ type: 'horizontalBar',
+ data: data,
+ options: options
+});
+```
+
### Data structure
+The following options can be included in a bar chart dataset to configure options for that specific dataset.
+
+Some properties can be specified as an array. If these are set to an array value, the first value applies to the first bar, the second value to the second bar, and so on.
+
+Property | Type | Usage
+--- | --- | ---
+data | `Array` | The data to plot as bars
+label | `String` | The label for the dataset which appears in the legend and tooltips
+xAxisID | `String` | The ID of the x axis to plot this dataset on
+yAxisID | `String` | The ID of the y axis to plot this dataset on
+backgroundColor | `Color or Array` | The fill color of the bars. See [Colors](#getting-started-colors)
+borderColor | `Color or Array` | Bar border color
+borderWidth | `Number or Array` | Border width of bar in pixels
+borderSkipped | `String or Array` | Which edge to skip drawing the border for. Options are 'bottom', 'left', 'top', and 'right'
+hoverBackgroundColor | `Color or Array` | Bar background color when hovered
+hoverBorderColor | `Color or Array` | Bar border color when hovered
+hoverBorderWidth | `Number or Array` | Border width of bar when hovered
+
+An example data object using these attributes is shown below.
```javascript
var data = {
@@ -29,79 +58,45 @@ var data = {
datasets: [
{
label: "My First dataset",
-
- // The properties below allow an array to be specified to change the value of the item at the given index
- // String or array - the bar color
- backgroundColor: "rgba(220,220,220,0.2)",
-
- // String or array - bar stroke color
- borderColor: "rgba(220,220,220,1)",
-
- // Number or array - bar border width
+ backgroundColor: "rgba(255,99,132,0.2)",
+ borderColor: "rgba(255,99,132,1)",
borderWidth: 1,
-
- // String or array - fill color when hovered
- hoverBackgroundColor: "rgba(220,220,220,0.2)",
-
- // String or array - border color when hovered
- hoverBorderColor: "rgba(220,220,220,1)",
-
- // The actual data
+ hoverBackgroundColor: "rgba(255,99,132,0.4)",
+ hoverBorderColor: "rgba(255,99,132,1)",
data: [65, 59, 80, 81, 56, 55, 40],
-
- // String - If specified, binds the dataset to a certain y-axis. If not specified, the first y-axis is used.
- yAxisID: "y-axis-0",
- },
- {
- label: "My Second dataset",
- backgroundColor: "rgba(220,220,220,0.2)",
- borderColor: "rgba(220,220,220,1)",
- borderWidth: 1,
- hoverBackgroundColor: "rgba(220,220,220,0.2)",
- hoverBorderColor: "rgba(220,220,220,1)",
- data: [28, 48, 40, 19, 86, 27, 90]
}
]
};
```
-The bar chart has the a very similar data structure to the line chart, and has an array of datasets, each with colours and an array of data. Again, colours are in CSS format.
+The bar chart has the a very similar data structure to the line chart, and has an array of datasets, each with colours and an array of data.
We have an array of labels too for display. In the example, we are showing the same data as the previous line chart example.
-The label key on each dataset is optional, and can be used when generating a scale for the chart.
-
### Chart Options
These are the customisation options specific to Bar charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.
-The default options for bar chart are defined in `Chart.defaults.Bar`.
+The default options for bar chart are defined in `Chart.defaults.bar`.
Name | Type | Default | Description
--- |:---:| --- | ---
stacked | Boolean | false |
*hover*.mode | String | "label" | Label's hover mode. "label" is used since the x axis displays data by the index in the dataset.
-scales | Array | - | -
+scales | Object | - | -
*scales*.xAxes | Array | | The bar chart officially supports only 1 x-axis but uses an array to keep the API consistent. Use a scatter chart if you need multiple x axes.
*Options for xAxes* | | |
type | String | "Category" | As defined in [Scales](#scales-category-scale).
display | Boolean | true | If true, show the scale.
-position | String | "bottom" | Position of the scale. Options are "top" and "bottom" for dataset scales.
id | String | "x-axis-1" | Id of the axis so that data can bind to it
categoryPercentage | Number | 0.8 | Percent (0-1) of the available width (the space between the gridlines for small datasets) for each data-point to use for the bars. [Read More](#bar-chart-barpercentage-vs-categorypercentage)
barPercentage | Number | 0.9 | Percent (0-1) of the available width each bar should be within the category percentage. 1.0 will take the whole category width and put the bars right next to each other. [Read More](#bar-chart-barpercentage-vs-categorypercentage)
-gridLines | Array | [See Scales](#scales) |
+gridLines | Object | [See Scales](#scales) |
*gridLines*.offsetGridLines | Boolean | true | If true, the bars for a particular data point fall between the grid lines. If false, the grid line will go right down the middle of the bars.
-scaleLabel | Array | [See Scales](#scales) |
-ticks | Array | [See Scales](#scales) |
| | |
*scales*.yAxes | Array | `[{ type: "linear" }]` |
*Options for xAxes* | | |
type | String | "linear" | As defined in [Scales](#scales-linear-scale).
display | Boolean | true | If true, show the scale.
-position | String | "left" | Position of the scale. Options are "left" and "right" for dataset scales.
id | String | "y-axis-1" | Id of the axis so that data can bind to it.
-gridLines | Array | [See Scales](#scales) |
-scaleLabel | Array | [See Scales](#scales) |
-ticks | Array | [See Scales](#scales) |
You can override these for your `Chart` instance by passing a second argument into the `Bar` method as an object with the keys you want to override.
@@ -128,9 +123,18 @@ new Chart(ctx, {
// for both x and y axes.
```
-We can also change these defaults values for each Bar type that is created, this object is available at `Chart.defaults.Bar`.
+We can also change these defaults values for each Bar type that is created, this object is available at `Chart.defaults.bar`. For horizontal bars, this object is available at `Chart.defaults.horizontalBar`.
-#### barPercentage vs categoryPercentage
+The default options for horizontal bar charts are defined in `Chart.defaults.horizontalBar` and are same as those of the bar chart, but with `xAxes` and `yAxes` swapped and the following additional options.
+
+Name | Type | Default | Description
+--- |:---:| --- | ---
+*Options for xAxes* | | |
+position | String | "bottom" |
+*Options for yAxes* | | |
+position | String | "left" |
+
+### barPercentage vs categoryPercentage
The following shows the relationship between the bar percentage option and the category percentage option.
diff --git a/vendors/Chart.js/docs/04-Radar-Chart.md b/vendors/Chart.js/docs/04-Radar-Chart.md
index 939a69e5..8eb40547 100644
--- a/vendors/Chart.js/docs/04-Radar-Chart.md
+++ b/vendors/Chart.js/docs/04-Radar-Chart.md
@@ -23,28 +23,59 @@ var myRadarChart = new Chart(ctx, {
```
### Data structure
+
+The following options can be included in a radar chart dataset to configure options for that specific dataset.
+
+All point* properties can be specified as an array. If these are set to an array value, the first value applies to the first point, the second value to the second point, and so on.
+
+Property | Type | Usage
+--- | --- | ---
+data | `Array` | The data to plot in a line
+label | `String` | The label for the dataset which appears in the legend and tooltips
+fill | `Boolean` | If true, fill the area under the line
+lineTension | `Number` | Bezier curve tension of the line. Set to 0 to draw straightlines. *Note* This was renamed from 'tension' but the old name still works.
+backgroundColor | `Color` | The fill color under the line. See [Colors](#getting-started-colors)
+borderWidth | `Number` | The width of the line in pixels
+borderColor | `Color` | The color of the line.
+borderCapStyle | `String` | Cap style of the line. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap)
+borderDash | `Array` | Length and spacing of dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash)
+borderDashOffset | `Number` | Offset for line dashes. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset)
+borderJoinStyle | `String` | Line joint style. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin)
+pointBorderColor | `Color or Array` | The border color for points.
+pointBackgroundColor | `Color or Array` | The fill color for points
+pointBorderWidth | `Number or Array` | The width of the point border in pixels
+pointRadius | `Number or Array` | The radius of the point shape. If set to 0, nothing is rendered.
+pointHoverRadius | `Number or Array` | The radius of the point when hovered
+hitRadius | `Number or Array` | The pixel size of the non-displayed point that reacts to mouse events
+pointHoverBackgroundColor | `Color or Array` | Point background color when hovered
+pointHoverBorderColor | `Color or Array` | Point border color when hovered
+pointHoverBorderWidth | `Number or Array` | Border width of point when hovered
+pointStyle | `String or Array` | The style of point. Options include 'circle', 'triangle', 'rect', 'rectRot', 'cross', 'crossRot', 'star', 'line', and 'dash'
+
+An example data object using these attributes is shown below.
+
```javascript
var data = {
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
datasets: [
{
label: "My First dataset",
- backgroundColor: "rgba(220,220,220,0.2)",
- borderColor: "rgba(220,220,220,1)",
- pointBackgroundColor: "rgba(220,220,220,1)",
+ backgroundColor: "rgba(179,181,198,0.2)",
+ borderColor: "rgba(179,181,198,1)",
+ pointBackgroundColor: "rgba(179,181,198,1)",
pointBorderColor: "#fff",
pointHoverBackgroundColor: "#fff",
- pointHoverBorderColor: "rgba(220,220,220,1)",
+ pointHoverBorderColor: "rgba(179,181,198,1)",
data: [65, 59, 90, 81, 56, 55, 40]
},
{
label: "My Second dataset",
- backgroundColor: "rgba(151,187,205,0.2)",
- borderColor: "rgba(151,187,205,1)",
- pointBackgroundColor: "rgba(151,187,205,1)",
+ backgroundColor: "rgba(255,99,132,0.2)",
+ borderColor: "rgba(255,99,132,1)",
+ pointBackgroundColor: "rgba(255,99,132,1)",
pointBorderColor: "#fff",
pointHoverBackgroundColor: "#fff",
- pointHoverBorderColor: "rgba(151,187,205,1)",
+ pointHoverBorderColor: "rgba(255,99,132,1)",
data: [28, 48, 40, 19, 96, 27, 100]
}
]
@@ -63,10 +94,10 @@ The default options for radar chart are defined in `Chart.defaults.radar`.
Name | Type | Default | Description
--- | --- | --- | ---
-scale | Array | [See Scales](#scales) and [Defaults for Radial Linear Scale](#scales-radial-linear-scale) | Options for the one scale used on the chart. Use this to style the ticks, labels, and grid lines.
+scale | Object | [See Scales](#scales) and [Defaults for Radial Linear Scale](#scales-radial-linear-scale) | Options for the one scale used on the chart. Use this to style the ticks, labels, and grid lines.
*scale*.type | String |"radialLinear" | As defined in ["Radial Linear"](#scales-radial-linear-scale).
-*elements*.line | Array | | Options for all line elements used on the chart, as defined in the global elements, duplicated here to show Radar chart specific defaults.
-*elements.line*.tension | Number | 0 | Tension exhibited by lines when calculating splineCurve. Setting to 0 creates straight lines.
+*elements*.line | Object | | Options for all line elements used on the chart, as defined in the global elements, duplicated here to show Radar chart specific defaults.
+*elements.line*.lineTension | Number | 0 | Tension exhibited by lines when calculating splineCurve. Setting to 0 creates straight lines.
You can override these for your `Chart` instance by passing a second argument into the `Radar` method as an object with the keys you want to override.
diff --git a/vendors/Chart.js/docs/05-Polar-Area-Chart.md b/vendors/Chart.js/docs/05-Polar-Area-Chart.md
index fb2a44a3..d0d4d304 100644
--- a/vendors/Chart.js/docs/05-Polar-Area-Chart.md
+++ b/vendors/Chart.js/docs/05-Polar-Area-Chart.md
@@ -23,22 +23,39 @@ new Chart(ctx, {
### Data structure
+The following options can be included in a polar area chart dataset to configure options for that specific dataset.
+
+Some properties are specified as arrays. The first value applies to the first bar, the second value to the second bar, and so on.
+
+Property | Type | Usage
+--- | --- | ---
+data | `Array` | The data to plot as bars
+label | `String` | The label for the dataset which appears in the legend and tooltips
+backgroundColor | `Array` | The fill color of the arcs. See [Colors](#getting-started-colors)
+borderColor | `Array` | Arc border color
+borderWidth | `Array` | Border width of arcs in pixels
+hoverBackgroundColor | `Array` | Arc background color when hovered
+hoverBorderColor | `Array` | Arc border color when hovered
+hoverBorderWidth | `Array` | Border width of arc when hovered
+
+An example data object using these attributes is shown below.
+
```javascript
var data = {
datasets: [{
data: [
- 10,
- 32,
- 53,
- 14,
- 22,
+ 11,
+ 16,
+ 7,
+ 3,
+ 14
],
backgroundColor: [
- "#F7464A",
- "#46BFBD",
- "#FDB45C",
- "#949FB1",
- "#4D5360",
+ "#FF6384",
+ "#4BC0C0",
+ "#FFCE56",
+ "#E7E9ED",
+ "#36A2EB"
],
label: 'My dataset' // for legend
}],
@@ -47,7 +64,7 @@ var data = {
"Green",
"Yellow",
"Grey",
- "Dark Grey"
+ "Blue"
]
};
```
@@ -59,11 +76,11 @@ These are the customisation options specific to Polar Area charts. These options
Name | Type | Default | Description
--- | --- | --- | ---
-scale | Array | [See Scales](#scales) and [Defaults for Radial Linear Scale](#getting-started-radial-linear-scale) | Options for the one scale used on the chart. Use this to style the ticks, labels, and grid.
+scale | Object | [See Scales](#scales) and [Defaults for Radial Linear Scale](#scales-radial-linear-scale) | Options for the one scale used on the chart. Use this to style the ticks, labels, and grid.
*scale*.type | String |"radialLinear" | As defined in ["Radial Linear"](#scales-radial-linear-scale).
*scale*.lineArc | Boolean | true | When true, lines are circular.
-animateRotate | Boolean |true | If true, will animate the rotation of the chart.
-animateScale | Boolean | true | If true, will animate scaling the chart.
+*animation*.animateRotate | Boolean |true | If true, will animate the rotation of the chart.
+*animation*.animateScale | Boolean | true | If true, will animate scaling the chart.
*legend*.*labels*.generateLabels | Function | `function(data) {} ` | Returns labels for each the legend
*legend*.onClick | Function | function(event, legendItem) {} ` | Handles clicking an individual legend item
legendCallback | Function | `function(chart) ` | Generates the HTML legend via calls to `generateLegend`
diff --git a/vendors/Chart.js/docs/06-Pie-Doughnut-Chart.md b/vendors/Chart.js/docs/06-Pie-Doughnut-Chart.md
index c6992800..b96816cc 100644
--- a/vendors/Chart.js/docs/06-Pie-Doughnut-Chart.md
+++ b/vendors/Chart.js/docs/06-Pie-Doughnut-Chart.md
@@ -7,7 +7,7 @@ Pie and doughnut charts are probably the most commonly used chart there are. The
They are excellent at showing the relational proportions between data.
-Pie and doughnut charts are effectively the same class in Chart.js, but have one different default value - their `percentageInnerCutout`. This equates what percentage of the inner should be cut out. This defaults to `0` for pie charts, and `50` for doughnuts.
+Pie and doughnut charts are effectively the same class in Chart.js, but have one different default value - their `cutoutPercentage`. This equates what percentage of the inner should be cut out. This defaults to `0` for pie charts, and `50` for doughnuts.
They are also registered under two aliases in the `Chart` core. Other than their different default value, and different alias, they are exactly the same.
@@ -18,21 +18,23 @@ They are also registered under two aliases in the `Chart` core. Other than their
-
+
### Example usage
```javascript
// For a pie chart
-var myPieChart = new Chart(ctx[0],{
- type:'pie',
+var myPieChart = new Chart(ctx,{
+ type: 'pie',
data: data,
options: options
});
+```
+```javascript
// And for a doughnut chart
-var myDoughnutChart = new Chart(ctx[1], {
- type:'doughnut',
+var myDoughnutChart = new Chart(ctx, {
+ type: 'doughnut',
data: data,
options: options
});
@@ -40,6 +42,19 @@ var myDoughnutChart = new Chart(ctx[1], {
### Data structure
+Property | Type | Usage
+--- | --- | ---
+data | `Array` | The data to plot as bars
+label | `String` | The label for the dataset which appears in the legend and tooltips
+backgroundColor | `Array` | The fill color of the arcs. See [Colors](#getting-started-colors)
+borderColor | `Array` | Arc border color
+borderWidth | `Array` | Border width of arcs in pixels
+hoverBackgroundColor | `Array` | Arc background color when hovered
+hoverBorderColor | `Array` | Arc border color when hovered
+hoverBorderWidth | `Array` | Border width of arc when hovered
+
+An example data object using these attributes is shown below.
+
```javascript
var data = {
labels: [
@@ -51,20 +66,20 @@ var data = {
{
data: [300, 50, 100],
backgroundColor: [
- "#F7464A",
- "#46BFBD",
- "#FDB45C"
+ "#FF6384",
+ "#36A2EB",
+ "#FFCE56"
],
hoverBackgroundColor: [
- "#FF5A5E",
- "#5AD3D1",
- "#FFC870"
+ "#FF6384",
+ "#36A2EB",
+ "#FFCE56"
]
}]
};
```
-For a pie chart, you must pass in an array of objects with a value and an optional color property. The value attribute should be a number, Chart.js will total all of the numbers and calculate the relative proportion of each. The color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.
+For a pie chart, datasets need to contain an array of data points. The data points should be a number, Chart.js will total all of the numbers and calculate the relative proportion of each. You can also add an array of background colors. The color attributes should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.
### Chart options
@@ -73,9 +88,8 @@ These are the customisation options specific to Pie & Doughnut charts. These opt
Name | Type | Default | Description
--- | --- | --- | ---
cutoutPercentage | Number | 50 - for doughnut, 0 - for pie | The percentage of the chart that is cut out of the middle.
-scale | Array | [See Scales](#scales) and [Defaults for Radial Linear Scale](#getting-started-radial-linear-scale) | Options for the one scale used on the chart. Use this to style the ticks, labels, and grid.
-*scale*.type | String |"radialLinear" | As defined in ["Radial Linear"](#scales-radial-linear-scale).
-*scale*.lineArc | Boolean | true | When true, lines are arced compared to straight when false.
+rotation | Number | -0.5 * Math.PI | Starting angle to draw arcs from
+circumference | Number | 2 * Math.PI | Sweep to allow arcs to cover
*animation*.animateRotate | Boolean |true | If true, will animate the rotation of the chart.
*animation*.animateScale | Boolean | false | If true, will animate scaling the Doughnut from the centre.
*legend*.*labels*.generateLabels | Function | `function(data) {} ` | Returns labels for each the legend
@@ -96,4 +110,4 @@ new Chart(ctx,{
// and the Doughnut chart defaults but this particular instance will have `animateScale` set to `true`.
```
-We can also change these default values for each Doughnut type that is created, this object is available at `Chart.defaults.doughnut`. Pie charts also have a clone of these defaults available to change at `Chart.defaults.pie`, with the only difference being `percentageInnerCutout` being set to 0.
\ No newline at end of file
+We can also change these default values for each Doughnut type that is created, this object is available at `Chart.defaults.doughnut`. Pie charts also have a clone of these defaults available to change at `Chart.defaults.pie`, with the only difference being `cutoutPercentage` being set to 0.
diff --git a/vendors/Chart.js/docs/07-Advanced.md b/vendors/Chart.js/docs/07-Advanced.md
index e272de08..4bedca3e 100644
--- a/vendors/Chart.js/docs/07-Advanced.md
+++ b/vendors/Chart.js/docs/07-Advanced.md
@@ -143,7 +143,7 @@ var myPieChart = new Chart(ctx, {
// Otherwise, tooltip will be an object with all tooltip properties like:
- // tooltip.caretHeight
+ // tooltip.caretSize
// tooltip.caretPadding
// tooltip.chart
// tooltip.cornerRadius
@@ -233,23 +233,27 @@ To work with Chart.js, custom scale types must implement the following interface
determineDataLimits: function() {},
// Generate tick marks. this.chart is the chart instance. The data object can be accessed as this.chart.data
- // buildTicks() should create a ticks array on the scale instance, if you intend to use any of the implementations from the base class
+ // buildTicks() should create a ticks array on the axis instance, if you intend to use any of the implementations from the base class
buildTicks: function() {},
// Get the value to show for the data at the given index of the the given dataset, ie this.chart.data.datasets[datasetIndex].data[index]
getLabelForIndex: function(index, datasetIndex) {},
- // Get the pixel (x coordinate for horizontal scale, y coordinate for vertical scales) for a given value
+ // Get the pixel (x coordinate for horizontal axis, y coordinate for vertical axis) for a given value
// @param index: index into the ticks array
// @param includeOffset: if true, get the pixel halway between the given tick and the next
getPixelForTick: function(index, includeOffset) {},
- // Get the pixel (x coordinate for horizontal scale, y coordinate for vertical scales) for a given value
+ // Get the pixel (x coordinate for horizontal axis, y coordinate for vertical axis) for a given value
// @param value : the value to get the pixel for
// @param index : index into the data array of the value
// @param datasetIndex : index of the dataset the value comes from
// @param includeOffset : if true, get the pixel halway between the given tick and the next
getPixelForValue: function(value, index, datasetIndex, includeOffset) {}
+
+ // Get the value for a given pixel (x coordinate for horizontal axis, y coordinate for vertical axis)
+ // @param pixel : pixel value
+ getValueForPixel: function(pixel) {}
}
```
@@ -366,6 +370,38 @@ The built in controller types are:
#### Bar Controller
The bar controller has a special property that you should be aware of. To correctly calculate the width of a bar, the controller must determine the number of datasets that map to bars. To do this, the bar controller attaches a property `bar` to the dataset during initialization. If you are creating a replacement or updated bar controller, you should do the same. This will ensure that charts with regular bars and your new derived bars will work seamlessly.
+### Creating Plugins
+
+Starting with v2.1.0, you can create plugins for chart.js. To register your plugin, simply call `Chart.pluginService.register` and pass your plugin in.
+Plugins will be called at the following times
+* Start of initialization
+* End of initialization
+* Start of update
+* End of update
+* Start of draw
+* End of draw
+
+Plugins should derive from Chart.PluginBase and implement the following interface
+```javascript
+{
+ beforeInit: function(chartInstance) { },
+ afterInit: function(chartInstance) { },
+
+ beforeUpdate: function(chartInstance) { },
+ afterUpdate: function(chartInstance) { },
+
+ // This is called at the start of a render. It is only called once, even if the animation will run for a number of frames. Use beforeDraw or afterDraw
+ // to do something on each animation frame
+ beforeRender: function(chartInstance) { },
+
+ // Easing is for animation
+ beforeDraw: function(chartInstance, easing) { },
+ afterDraw: function(chartInstance, easing) { }
+
+ destroy: function(chartInstance) { }
+}
+```
+
### Building Chart.js
Chart.js uses gulp to build the library into a single JavaScript file.
diff --git a/vendors/Chart.js/docs/08-Notes.md b/vendors/Chart.js/docs/08-Notes.md
index 8ba5a59d..61c9e7d0 100644
--- a/vendors/Chart.js/docs/08-Notes.md
+++ b/vendors/Chart.js/docs/08-Notes.md
@@ -2,31 +2,22 @@
title: Notes
anchor: notes
---
+### Previous versions
+
+Please note - documentation for previous versions are available on the GitHub repo.
+
+- [1.x Documentation](https://github.com/chartjs/Chart.js/tree/v1.1.1/docs)
### Browser support
-Browser support for the canvas element is available in all modern & major mobile browsers (caniuse.com/canvas).
-For IE8 & below, I would recommend using the polyfill ExplorerCanvas - available at https://code.google.com/p/explorercanvas/. It falls back to Internet explorer's format VML when canvas support is not available. Example use:
+Chart.js offers support for all browsers where canvas is supported.
-```html
-
-
-
-```
+Browser support for the canvas element is available in all modern & major mobile browsers (http://caniuse.com/#feat=canvas).
-Usually I would recommend feature detection to choose whether or not to load a polyfill, rather than IE conditional comments, however in this case, VML is a Microsoft proprietary format, so it will only work in IE.
-
-Some important points to note in my experience using ExplorerCanvas as a fallback.
-
-- Initialise charts on load rather than DOMContentReady when using the library, as sometimes a race condition will occur, and it will result in an error when trying to get the 2d context of a canvas.
-- New VML DOM elements are being created for each animation frame and there is no hardware acceleration. As a result animation is usually slow and jerky, with flashing text. It is a good idea to dynamically turn off animation based on canvas support. I recommend using the excellent Modernizr to do this.
-- When declaring fonts, the library explorercanvas requires the font name to be in single quotes inside the string. For example, instead of your scaleFontFamily property being simply "Arial", explorercanvas support, use "'Arial'" instead. Chart.js does this for default values.
### Bugs & issues
-Please report these on the GitHub page - at github.com/nnnick/Chart.js. If you could include a link to a simple jsbin or similar to demonstrate the issue, that'd be really helpful.
+Please report these on the GitHub page - at github.com/chartjs/Chart.js. If you could include a link to a simple jsbin or similar to demonstrate the issue, that'd be really helpful.
### Contributing
@@ -39,4 +30,4 @@ New contributions to the library are welcome, just a couple of guidelines:
- Consider whether your changes are useful for all users, or if creating a Chart.js extension would be more appropriate.
### License
-Chart.js is open source and available under the MIT license.
\ No newline at end of file
+Chart.js is open source and available under the MIT license.
diff --git a/vendors/Chart.js/gulpfile.js b/vendors/Chart.js/gulpfile.js
index 5b64a192..a2315eec 100644
--- a/vendors/Chart.js/gulpfile.js
+++ b/vendors/Chart.js/gulpfile.js
@@ -7,6 +7,7 @@ var gulp = require('gulp'),
connect = require('gulp-connect'),
replace = require('gulp-replace'),
htmlv = require('gulp-html-validator'),
+ insert = require('gulp-insert'),
inquirer = require('inquirer'),
semver = require('semver'),
exec = require('child_process').exec,
@@ -23,13 +24,28 @@ var srcDir = './src/';
var outDir = './dist/';
var testDir = './test/';
+var header = "/*!\n\
+ * Chart.js\n\
+ * http://chartjs.org/\n\
+ * Version: {{ version }}\n\
+ *\n\
+ * Copyright 2016 Nick Downie\n\
+ * Released under the MIT license\n\
+ * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md\n\
+ */\n";
+
var preTestFiles = [
'./node_modules/moment/min/moment.min.js',
];
var testFiles = [
'./test/mockContext.js',
- './test/*.js'
+ './test/*.js',
+
+ // Disable tests which need to be rewritten based on changes introduced by
+ // the following changes: https://github.com/chartjs/Chart.js/pull/2346
+ '!./test/core.layoutService.tests.js',
+ '!./test/defaultConfig.tests.js',
];
gulp.task('build', buildTask);
@@ -54,9 +70,10 @@ gulp.task('default', ['build', 'watch']);
function buildTask() {
- var bundled = browserify('./src/Chart.js')
+ var bundled = browserify('./src/chart.js')
.bundle()
.pipe(source('Chart.bundle.js'))
+ .pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(gulp.dest(outDir))
.pipe(streamify(uglify({
@@ -65,10 +82,11 @@ function buildTask() {
.pipe(streamify(concat('Chart.bundle.min.js')))
.pipe(gulp.dest(outDir));
- var nonBundled = browserify('./src/Chart.js')
+ var nonBundled = browserify('./src/chart.js')
.ignore('moment')
.bundle()
.pipe(source('Chart.js'))
+ .pipe(insert.prepend(header))
.pipe(streamify(replace('{{ version }}', package.version)))
.pipe(gulp.dest(outDir))
.pipe(streamify(uglify({
diff --git a/vendors/Chart.js/package.json b/vendors/Chart.js/package.json
index c8830d93..c905b2f0 100644
--- a/vendors/Chart.js/package.json
+++ b/vendors/Chart.js/package.json
@@ -2,11 +2,12 @@
"name": "chart.js",
"homepage": "http://www.chartjs.org",
"description": "Simple HTML5 charts using the canvas element.",
- "version": "2.0.2",
+ "version": "2.1.0",
+ "license": "MIT",
"main": "src/chart.js",
"repository": {
"type": "git",
- "url": "https://github.com/nnnick/Chart.js.git"
+ "url": "https://github.com/chartjs/Chart.js.git"
},
"devDependencies": {
"browserify": "^13.0.0",
@@ -16,6 +17,7 @@
"gulp-concat": "~2.1.x",
"gulp-connect": "~2.0.5",
"gulp-html-validator": "^0.0.2",
+ "gulp-insert": "~0.5.0",
"gulp-jshint": "~1.5.1",
"gulp-karma": "0.0.4",
"gulp-replace": "^0.4.0",
diff --git a/vendors/Chart.js/samples/bar-horizontal.html b/vendors/Chart.js/samples/bar-horizontal.html
new file mode 100644
index 00000000..ae7bdad4
--- /dev/null
+++ b/vendors/Chart.js/samples/bar-horizontal.html
@@ -0,0 +1,143 @@
+
+
+
+
+ Horizontal Bar Chart
+
+
+
+
+
+
+
"}},Ib=5,Jb=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];return Ua.agenda={"class":Fb,defaults:{allDaySlot:!0,allDayText:"all-day",slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},Ua.agendaDay={type:"agenda",duration:{days:1}},Ua.agendaWeek={type:"agenda",duration:{weeks:1}},Ta});
\ No newline at end of file
+!function(a){"function"==typeof define&&define.amd?define(["jquery","moment"],a):"object"==typeof exports?// Node/CommonJS
+module.exports=a(require("jquery"),require("moment")):a(jQuery,moment)}(function(a,b){
+// Merges an array of option objects into a single object
+function c(a){return U(a,Va)}
+// Given options specified for the calendar's constructor, massages any legacy options into a non-legacy form.
+// Converts View-Option-Hashes into the View-Specific-Options format.
+function d(b){var c,d={views:b.views||{}};
+// iterate through all option override properties (except `views`)
+return a.each(b,function(b,e){"views"!=b&&(
+// could the value be a legacy View-Option-Hash?
+a.isPlainObject(e)&&!/(time|duration|interval)$/i.test(b)&&-1==a.inArray(b,Va)?(c=null,a.each(e,function(a,e){/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(a)?(d.views[a]||(d.views[a]={}),d.views[a][b]=e):(c||(c={}),c[a]=e)}),c&&(d[b]=c)):d[b]=e)}),d}/* FullCalendar-specific DOM Utilities
+----------------------------------------------------------------------------------------------------------------------*/
+// Given the scrollbar widths of some other container, create borders/margins on rowEls in order to match the left
+// and right space that was offset by the scrollbars. A 1-pixel border first, then margin beyond that.
+function e(a,b){b.left&&a.css({"border-left-width":1,"margin-left":b.left-1}),b.right&&a.css({"border-right-width":1,"margin-right":b.right-1})}
+// Undoes compensateScroll and restores all borders/margins
+function f(a){a.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}
+// Make the mouse cursor express that an event is not allowed in the current area
+function g(){a("body").addClass("fc-not-allowed")}
+// Returns the mouse cursor to its original look
+function h(){a("body").removeClass("fc-not-allowed")}
+// Given a total available height to fill, have `els` (essentially child rows) expand to accomodate.
+// By default, all elements that are shorter than the recommended height are expanded uniformly, not considering
+// any other els that are already too tall. if `shouldRedistribute` is on, it considers these tall rows and
+// reduces the available height.
+function i(b,c,d){
+// *FLOORING NOTE*: we floor in certain places because zoom can give inaccurate floating-point dimensions,
+// and it is better to be shorter than taller, to avoid creating unnecessary scrollbars.
+var e=Math.floor(c/b.length),f=Math.floor(c-e*(b.length-1)),g=[],h=[],i=[],k=0;j(b),// give all elements their natural height
+// find elements that are below the recommended height (expandable).
+// important to query for heights in a single first pass (to avoid reflow oscillation).
+b.each(function(c,d){var j=c===b.length-1?f:e,l=a(d).outerHeight(!0);j>l?(g.push(d),h.push(l),i.push(a(d).height())):
+// this element stretches past recommended height (non-expandable). mark the space as occupied.
+k+=l}),
+// readjust the recommended height to only consider the height available to non-maxed-out rows.
+d&&(c-=k,e=Math.floor(c/g.length),f=Math.floor(c-e*(g.length-1))),
+// assign heights to all expandable elements
+a(g).each(function(b,c){var d=b===g.length-1?f:e,j=h[b],k=i[b],l=d-(j-k);// subtract the margin/padding
+d>j&&// we check this again because redistribution might have changed things
+a(c).height(l)})}
+// Undoes distrubuteHeight, restoring all els to their natural height
+function j(a){a.height("")}
+// Given `els`, a jQuery set of
cells, find the cell with the largest natural width and set the widths of all the
+// cells to be that width.
+// PREREQUISITE: if you want a cell to take up width, it needs to have a single inner element w/ display:inline
+function k(b){var c=0;// sometimes not accurate of width the text needs to stay on one line. insurance
+return b.find("> span").each(function(b,d){var e=a(d).outerWidth();e>c&&(c=e)}),c++,b.width(c),c}
+// Given one element that resides inside another,
+// Subtracts the height of the inner element from the outer element.
+function l(a,b){var c,d=a.add(b);// undo hack
+// effin' IE8/9/10/11 sometimes returns 0 for dimensions. this weird hack was the only thing that worked
+// grab the dimensions
+return d.css({position:"relative",// cause a reflow, which will force fresh dimension recalculation
+left:-1}),c=a.outerHeight()-b.outerHeight(),d.css({position:"",left:""}),c}
+// borrowed from https://github.com/jquery/jquery-ui/blob/1.11.0/ui/core.js#L51
+function m(b){var c=b.css("position"),d=b.parents().filter(function(){var b=a(this);return/(auto|scroll)/.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return"fixed"!==c&&d.length?d:a(b[0].ownerDocument||document)}
+// Queries the outer bounding area of a jQuery element.
+// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).
+// Origin is optional.
+function n(a,b){var c=a.offset(),d=c.left-(b?b.left:0),e=c.top-(b?b.top:0);return{left:d,right:d+a.outerWidth(),top:e,bottom:e+a.outerHeight()}}
+// Queries the area within the margin/border/scrollbars of a jQuery element. Does not go within the padding.
+// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).
+// Origin is optional.
+// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.
+function o(a,b){var c=a.offset(),d=q(a),e=c.left+t(a,"border-left-width")+d.left-(b?b.left:0),f=c.top+t(a,"border-top-width")+d.top-(b?b.top:0);return{left:e,right:e+a[0].clientWidth,// clientWidth includes padding but NOT scrollbars
+top:f,bottom:f+a[0].clientHeight}}
+// Queries the area within the margin/border/padding of a jQuery element. Assumed not to have scrollbars.
+// Returns a rectangle with absolute coordinates: left, right (exclusive), top, bottom (exclusive).
+// Origin is optional.
+function p(a,b){var c=a.offset(),d=c.left+t(a,"border-left-width")+t(a,"padding-left")-(b?b.left:0),e=c.top+t(a,"border-top-width")+t(a,"padding-top")-(b?b.top:0);return{left:d,right:d+a.width(),top:e,bottom:e+a.height()}}
+// Returns the computed left/right/top/bottom scrollbar widths for the given jQuery element.
+// NOTE: should use clientLeft/clientTop, but very unreliable cross-browser.
+function q(a){var b=a.innerWidth()-a[0].clientWidth,c={left:0,right:0,top:0,bottom:a.innerHeight()-a[0].clientHeight};// is the scrollbar on the left side?
+return r()&&"rtl"==a.css("direction")?c.left=b:c.right=b,c}function r(){// responsible for caching the computation
+return null===Wa&&(Wa=s()),Wa}function s(){// creates an offscreen test element, then removes it
+var b=a("
").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),c=b.children(),d=c.offset().left>b.offset().left;// is the inner div shifted to accommodate a left scrollbar?
+return b.remove(),d}
+// Retrieves a jQuery element's computed CSS value as a floating-point number.
+// If the queried value is non-numeric (ex: IE can return "medium" for border width), will just return zero.
+function t(a,b){return parseFloat(a.css(b))||0}
+// Returns a boolean whether this was a left mouse click and no ctrl key (which means right click on Mac)
+function u(a){return 1==a.which&&!a.ctrlKey}function v(a){if(void 0!==a.pageX)return a.pageX;var b=a.originalEvent.touches;return b?b[0].pageX:void 0}function w(a){if(void 0!==a.pageY)return a.pageY;var b=a.originalEvent.touches;return b?b[0].pageY:void 0}function x(a){return/^touch/.test(a.type)}function y(a){a.addClass("fc-unselectable").on("selectstart",z)}
+// Stops a mouse/touch event from doing it's native browser action
+function z(a){a.preventDefault()}
+// Returns a new rectangle that is the intersection of the two rectangles. If they don't intersect, returns false
+function A(a,b){var c={left:Math.max(a.left,b.left),right:Math.min(a.right,b.right),top:Math.max(a.top,b.top),bottom:Math.min(a.bottom,b.bottom)};return c.lefti&&j>g?(g>=i?(c=g.clone(),e=!0):(c=i.clone(),e=!1),j>=h?(d=h.clone(),f=!0):(d=j.clone(),f=!1),{start:c,end:d,isStart:e,isEnd:f}):void 0}
+// Diffs the two moments into a Duration where full-days are recorded first, then the remaining time.
+// Moments will have their timezones normalized.
+function J(a,c){return b.duration({days:a.clone().stripTime().diff(c.clone().stripTime(),"days"),ms:a.time()-c.time()})}
+// Diffs the two moments via their start-of-day (regardless of timezone). Produces whole-day durations.
+function K(a,c){return b.duration({days:a.clone().stripTime().diff(c.clone().stripTime(),"days")})}
+// Diffs two moments, producing a duration, made of a whole-unit-increment of the given unit. Uses rounding.
+function L(a,c,d){// returnFloat=true
+return b.duration(Math.round(a.diff(c,d,!0)),d)}
+// Computes the unit name of the largest whole-unit period of time.
+// For example, 48 hours will be "days" whereas 49 hours will be "hours".
+// Accepts start/end, a range object, or an original duration object.
+function M(a,b){var c,d,e;for(c=0;c=1&&fa(e)));c++);return d}
+// Computes the number of units (like "hours") in the given range.
+// Range can be a {start,end} object, separate start/end args, or a Duration.
+// Results are based on Moment's .as() and .diff() methods, so results can depend on internal handling
+// of month-diffing logic (which tends to vary from version to version).
+function N(a,c,d){return null!=d?d.diff(c,a,!0):b.isDuration(c)?c.as(a):c.end.diff(c.start,a,!0)}
+// Intelligently divides a range (specified by a start/end params) by a duration
+function O(a,b,c){var d;return R(c)?(b-a)/c:(d=c.asMonths(),Math.abs(d)>=1&&fa(d)?b.diff(a,"months",!0)/d:b.diff(a,"days",!0)/c.asDays())}
+// Intelligently divides one duration by another
+function P(a,b){var c,d;return R(a)||R(b)?a/b:(c=a.asMonths(),d=b.asMonths(),Math.abs(c)>=1&&fa(c)&&Math.abs(d)>=1&&fa(d)?c/d:a.asDays()/b.asDays())}
+// Intelligently multiplies a duration by a number
+function Q(a,c){var d;return R(a)?b.duration(a*c):(d=a.asMonths(),Math.abs(d)>=1&&fa(d)?b.duration({months:d*c}):b.duration({days:a.asDays()*c}))}
+// Returns a boolean about whether the given duration has any time parts (hours/minutes/seconds/ms)
+function R(a){return Boolean(a.hours()||a.minutes()||a.seconds()||a.milliseconds())}function S(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}
+// Returns a boolean about whether the given input is a time string, like "06:40:00" or "06:00"
+function T(a){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(a)}
+// Merges an array of objects into a single object.
+// The second argument allows for an array of property names who's object values will be merged together.
+function U(a,b){var c,d,e,f,g,h,i={};if(b)for(c=0;c=0;f--)if(g=a[f][d],"object"==typeof g)e.unshift(g);else if(void 0!==g){i[d]=g;// if there were no objects, this value will be used
+break}
+// if the trailing values were objects, use the merged value
+e.length&&(i[d]=U(e))}
+// copy values into the destination, going from last to first
+for(c=a.length-1;c>=0;c--){h=a[c];for(d in h)d in i||(// if already assigned by previous props or complex props, don't reassign
+i[d]=h[d])}return i}
+// Create an object that has the given prototype. Just like Object.create
+function V(a){var b=function(){};return b.prototype=a,new b}function W(a,b){for(var c in a)Y(a,c)&&(b[c]=a[c])}
+// Copies over certain methods with the same names as Object.prototype methods. Overcomes an IE<=8 bug:
+// https://developer.mozilla.org/en-US/docs/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug
+function X(a,b){var c,d,e=["constructor","toString","valueOf"];for(c=0;c/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g," ")}function ba(a){return a.replace(/&.*?;/g,"")}
+// Given a hash of CSS properties, returns a string of CSS.
+// Uses property names as-is (no camel-case conversion). Will not make statements for null/undefined values.
+function ca(b){var c=[];return a.each(b,function(a,b){null!=b&&c.push(a+":"+b)}),c.join(";")}function da(a){return a.charAt(0).toUpperCase()+a.slice(1)}function ea(a,b){// for .sort()
+return a-b}function fa(a){return a%1===0}
+// Returns a method bound to the given object context.
+// Just like one of the jQuery.proxy signatures, but without the undesired behavior of treating the same method with
+// different contexts as identical when binding/unbinding events.
+function ga(a,b){var c=a[b];return function(){return c.apply(a,arguments)}}
+// Returns a function, that, as long as it continues to be invoked, will not
+// be triggered. The function will be called after it stops being called for
+// N milliseconds. If `immediate` is passed, trigger the function on the
+// leading edge, instead of the trailing.
+// https://github.com/jashkenas/underscore/blob/1.6.0/underscore.js#L714
+function ha(a,b,c){var d,e,f,g,h,i=function(){var j=+new Date-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=+new Date;var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}}
+// Builds an enhanced moment from args. When given an existing moment, it clones. When given a
+// native Date, or called with no arguments (the current time), the resulting moment will be local.
+// Anything else needs to be "parsed" (a string or an array), and will be affected by:
+// parseAsUTC - if there is no zone information, should we parse the input in UTC?
+// parseZone - if there is zone information, should we force the zone of the moment?
+function ia(c,d,e){var f,g,h,i,j=c[0],k=1==c.length&&"string"==typeof j;// flag for extended functionality
+// clone it
+// "parsing" is required
+// accept strings like '2014-05', but convert to the first of the month
+// for when we pass it on to moment's constructor
+// no time part?
+// arrays have no timezone information, so assume ambiguous zone
+// otherwise, probably a string with a format
+// let's record the inputted zone somehow
+return b.isMoment(j)?(i=b.apply(null,c),ka(j,i)):S(j)||void 0===j?i=b.apply(null,c):(f=!1,g=!1,k?bb.test(j)?(j+="-01",c=[j],f=!0,g=!0):(h=cb.exec(j))&&(f=!h[5],g=!0):a.isArray(j)&&(g=!0),i=d||f?b.utc.apply(b,c):b.apply(null,c),f?(i._ambigTime=!0,i._ambigZone=!0):e&&(g?i._ambigZone=!0:k&&(i.utcOffset?i.utcOffset(j):i.zone(j)))),i._fullCalendar=!0,i}
+// Misc Internals
+// -------------------------------------------------------------------------------------------------
+// given an array of moment-like inputs, return a parallel array w/ moments similarly ambiguated.
+// for example, of one moment has ambig time, but not others, all moments will have their time stripped.
+// set `preserveTime` to `true` to keep times, but only normalize zone ambiguity.
+// returns the original moments if no modifications are necessary.
+function ja(a,c){var d,e,f=!1,g=!1,h=a.length,i=[];
+// parse inputs into real moments and query their ambig flags
+for(d=0;h>d;d++)e=a[d],b.isMoment(e)||(e=Ta.moment.parseZone(e)),f=f||e._ambigTime,g=g||e._ambigZone,i.push(e);
+// strip each moment down to lowest common ambiguity
+// use clones to avoid modifying the original moments
+for(d=0;h>d;d++)e=i[d],c||!f||e._ambigTime?g&&!e._ambigZone&&(i[d]=e.clone().stripZone()):i[d]=e.clone().stripTime();return i}
+// Transfers all the flags related to ambiguous time/zone from the `src` moment to the `dest` moment
+// TODO: look into moment.momentProperties for this.
+function ka(a,b){a._ambigTime?b._ambigTime=!0:b._ambigTime&&(b._ambigTime=!1),a._ambigZone?b._ambigZone=!0:b._ambigZone&&(b._ambigZone=!1)}
+// Sets the year/month/date/etc values of the moment from the given array.
+// Inefficient because it calls each individual setter.
+function la(a,b){a.year(b[0]||0).month(b[1]||0).date(b[2]||0).hours(b[3]||0).minutes(b[4]||0).seconds(b[5]||0).milliseconds(b[6]||0)}
+// Single Date Formatting
+// -------------------------------------------------------------------------------------------------
+// call this if you want Moment's original format method to be used
+function ma(a,b){return eb.format.call(a,b)}
+// Formats `date` with a Moment formatting string, but allow our non-zero areas and
+// additional token.
+function na(a,b){return oa(a,ta(b))}function oa(a,b){var c,d="";for(c=0;c "MMMM D YYYY"
+// BTW, this is not important for `formatDate` because it is impossible to put custom tokens
+// or non-zero areas in Moment's localized format strings.
+return a=Ta.moment.parseZone(a),b=Ta.moment.parseZone(b),f=(a.localeData||a.lang).call(a),c=f.longDateFormat(c)||c,d=d||" - ",ra(a,b,ta(c),d,e)}// expose
+function ra(a,b,c,d,e){var f,g,h,i,j=a.clone().stripZone(),k=b.clone().stripZone(),l="",m="",n="",o="",p="";
+// Start at the leftmost side of the formatting string and continue until you hit a token
+// that is not the same between dates.
+for(g=0;gg&&(f=sa(a,b,j,k,c[h]),f!==!1);h--)m=f+m;
+// The area in the middle is different for both of the dates.
+// Collect them distinctly so we can jam them together later.
+for(i=g;h>=i;i++)n+=pa(a,c[i]),o+=pa(b,c[i]);return(n||o)&&(p=e?o+d+n:n+d+o),l+p+m}
+// TODO: week maybe?
+// Given a formatting chunk, and given that both dates are similar in the regard the
+// formatting chunk is concerned, format date1 against `chunk`. Otherwise, return `false`.
+function sa(a,b,c,d,e){var f,g;return"string"==typeof e?e:(f=e.token)&&(g=gb[f.charAt(0)],g&&c.isSame(d,g))?ma(a,f):!1}function ta(a){return a in hb?hb[a]:hb[a]=ua(a)}
+// Break the formatting string into an array of chunks
+function ua(a){for(var b,c=[],d=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;b=d.exec(a);)b[1]?// a literal string inside [ ... ]
+c.push(b[1]):b[2]?// non-zero formatting inside ( ... )
+c.push({maybe:ua(b[2])}):b[3]?// a formatting token
+c.push({token:b[3]}):b[5]&&// an unenclosed literal string
+c.push(b[5]);return c}// export
+// Class that all other classes will inherit from
+function va(){}function wa(a,b){var c;
+// ensure a constructor for the subclass, forwarding all arguments to the super-constructor if it doesn't exist
+// build the base prototype for the subclass, which is an new object chained to the superclass's prototype
+// copy each member variable/method onto the the subclass's prototype
+// hack for IE8
+// copy over all class variables/methods to the subclass, such as `extend` and `mixin`
+return Y(b,"constructor")&&(c=b.constructor),"function"!=typeof c&&(c=b.constructor=function(){a.apply(this,arguments)}),c.prototype=V(a.prototype),W(b,c.prototype),X(b,c.prototype),W(a,c),c}function xa(a,b){W(b,a.prototype)}
+// Returns `true` if the hits are identically equal. `false` otherwise. Must be from the same component.
+// Two null values will be considered equal, as two "out of the component" states are the same.
+function ya(a,b){return a||b?a&&b?a.component===b.component&&za(a,b)&&za(b,a):!1:!0}
+// Returns true if all of subHit's non-standard properties are within superHit
+function za(a,b){for(var c in a)if(!/^(component|left|right|top|bottom)$/.test(c)&&a[c]!==b[c])return!1;return!0}/* Utilities
+----------------------------------------------------------------------------------------------------------------------*/
+function Aa(a){// returns true if background OR inverse-background
+var b=Ca(a);return"background"===b||"inverse-background"===b}// export
+function Ba(a){return"inverse-background"===Ca(a)}function Ca(a){return _((a.source||{}).rendering,a.rendering)}function Da(a){var b,c,d={};for(b=0;b=a.leftCol)return!0;return!1}
+// A cmp function for determining the leftmost event
+function Ha(a,b){return a.leftCol-b.leftCol}
+// Builds an array of segments "levels". The first level will be the leftmost tier of segments if the calendar is
+// left-to-right, or the rightmost if the calendar is right-to-left. Assumes the segments are already ordered by date.
+function Ia(a){var b,c,d,e=[];for(b=0;bb.top&&a.top").prependTo(c),R=N.header=new Qa(N,O),S=R.render(),S&&c.prepend(S),i(O.defaultView),O.handleWindowResize&&(Y=ha(m,O.windowResizeDelay),a(window).resize(Y))}function g(){W&&W.removeElement(),R.removeElement(),T.remove(),c.removeClass("fc fc-touch fc-cursor fc-ltr fc-rtl fc-unthemed ui-widget"),Y&&a(window).unbind("resize",Y)}function h(){return c.is(":visible")}
+// View Rendering
+// -----------------------------------------------------------------------------------
+// Renders a view because of a date change, view-type change, or for the first time.
+// If not given a viewType, keep the current view but render different dates.
+function i(b){ca++,
+// if viewType is changing, remove the old view's rendering
+W&&b&&W.type!==b&&(R.deactivateButton(W.type),H(),// prevent a scroll jump when view element is removed
+W.removeElement(),W=N.view=null),
+// if viewType changed, or the view was never created, create a fresh view
+!W&&b&&(W=N.view=ba[b]||(ba[b]=N.instantiateView(b)),W.setElement(a("").appendTo(T)),R.activateButton(b)),W&&(Z=W.massageCurrentDate(Z),W.displaying&&Z.isWithin(W.intervalStart,W.intervalEnd)||h()&&(W.display(Z),I(),u(),v(),q())),I(),// undo any lone freezeContentHeight calls
+ca--}function j(a){// isResize=true. will poll getSuggestedViewHeight() and isHeightAuto()
+return h()?(a&&l(),ca++,W.updateSize(!0),ca--,!0):void 0}function k(){h()&&l()}function l(){// assumes elementVisible
+X="number"==typeof O.contentHeight?O.contentHeight:"number"==typeof O.height?O.height-(S?S.outerHeight(!0):0):Math.round(T.width()/Math.max(O.aspectRatio,.5))}function m(a){!ca&&a.target===window&&W.start&&j(!0)&&W.trigger("windowResize",aa)}/* Event Fetching/Rendering
+ -----------------------------------------------------------------------------*/
+// TODO: going forward, most of this stuff should be directly handled by the view
+function n(){// can be called as an API method
+p(),// so that events are cleared before user starts waiting for AJAX
+r()}function o(){// destroys old events if previously rendered
+h()&&(H(),W.displayEvents(da),I())}function p(){H(),W.clearEvents(),I()}function q(){!O.lazyFetching||$(W.start,W.end)?r():o()}function r(){_(W.start,W.end)}
+// called when event data arrives
+function s(a){da=a,o()}
+// called when a single event's data has been changed
+function t(){o()}/* Header Updating
+ -----------------------------------------------------------------------------*/
+function u(){R.updateTitle(W.title)}function v(){var a=N.getNow();a.isWithin(W.intervalStart,W.intervalEnd)?R.disableButton("today"):R.enableButton("today")}/* Selection
+ -----------------------------------------------------------------------------*/
+// this public method receives start/end dates in any format, with any timezone
+function w(a,b){W.select(N.buildSelectSpan.apply(N,arguments))}function x(){// safe to be called before renderView
+W&&W.unselect()}/* Date
+ -----------------------------------------------------------------------------*/
+function y(){Z=W.computePrevDate(Z),i()}function z(){Z=W.computeNextDate(Z),i()}function A(){Z.add(-1,"years"),i()}function B(){Z.add(1,"years"),i()}function C(){Z=N.getNow(),i()}function D(a){Z=N.moment(a).stripZone(),i()}function E(a){Z.add(b.duration(a)),i()}
+// Forces navigation to a view for the given date.
+// `viewType` can be a specific view name or a generic one like "week" or "day".
+function F(a,b){var c;b=b||"day",c=N.getViewSpec(b)||N.getUnitViewSpec(b),Z=a.clone(),i(c?c.type:null)}
+// for external API
+function G(){return N.applyTimezone(Z)}function H(){T.css({width:"100%",height:T.height(),overflow:"hidden"})}function I(){T.css({width:"",height:"",overflow:""})}/* Misc
+ -----------------------------------------------------------------------------*/
+function J(){return N}function K(){return W}function L(a,b){return void 0===b?O[a]:void("height"!=a&&"contentHeight"!=a&&"aspectRatio"!=a||(O[a]=b,j(!0)))}function M(a,b){// overrides the Emitter's trigger method :(
+var c=Array.prototype.slice.call(arguments,2);return b=b||aa,this.triggerWith(a,b,c),O[a]?O[a].apply(b,c):void 0}var N=this;N.initOptions(d||{});var O=this.options;
+// Exports
+// -----------------------------------------------------------------------------------
+N.render=e,N.destroy=g,N.refetchEvents=n,N.reportEvents=s,N.reportEventChange=t,N.rerenderEvents=o,// `renderEvents` serves as a rerender. an API method
+N.changeView=i,// `renderView` will switch to another view
+N.select=w,N.unselect=x,N.prev=y,N.next=z,N.prevYear=A,N.nextYear=B,N.today=C,N.gotoDate=D,N.incrementDate=E,N.zoomTo=F,N.getDate=G,N.getCalendar=J,N.getView=K,N.option=L,N.trigger=M;
+// Language-data Internals
+// -----------------------------------------------------------------------------------
+// Apply overrides to the current language's data
+var P=V(// make a cheap copy
+Pa(O.lang));if(O.monthNames&&(P._months=O.monthNames),O.monthNamesShort&&(P._monthsShort=O.monthNamesShort),O.dayNames&&(P._weekdays=O.dayNames),O.dayNamesShort&&(P._weekdaysShort=O.dayNamesShort),null!=O.firstDay){var Q=V(P._week);// _week: { dow: # }
+Q.dow=O.firstDay,P._week=Q}
+// assign a normalized value, to be used by our .week() moment extension
+P._fullCalendar_weekCalc=function(a){return"function"==typeof a?a:"local"===a?a:"iso"===a||"ISO"===a?"ISO":void 0}(O.weekNumberCalculation),
+// Calendar-specific Date Utilities
+// -----------------------------------------------------------------------------------
+N.defaultAllDayEventDuration=b.duration(O.defaultAllDayEventDuration),N.defaultTimedEventDuration=b.duration(O.defaultTimedEventDuration),
+// Builds a moment using the settings of the current calendar: timezone and language.
+// Accepts anything the vanilla moment() constructor accepts.
+N.moment=function(){var a;
+// Force the moment to be local, because FC.moment doesn't guarantee it.
+// don't give ambiguously-timed moments a local zone
+// moment 2.8 and above
+// pre-moment-2.8
+return"local"===O.timezone?(a=Ta.moment.apply(null,arguments),a.hasTime()&&a.local()):a="UTC"===O.timezone?Ta.moment.utc.apply(null,arguments):Ta.moment.parseZone.apply(null,arguments),"_locale"in a?a._locale=P:a._lang=P,a},
+// Returns a boolean about whether or not the calendar knows how to calculate
+// the timezone offset of arbitrary dates in the current timezone.
+N.getIsAmbigTimezone=function(){return"local"!==O.timezone&&"UTC"!==O.timezone},
+// Returns a copy of the given date in the current timezone. Has no effect on dates without times.
+N.applyTimezone=function(a){if(!a.hasTime())return a.clone();var b,c=N.moment(a.toArray()),d=a.time()-c.time();
+// Safari sometimes has problems with this coersion when near DST. Adjust if necessary. (bug #2396)
+// is the time result different than expected?
+// add milliseconds
+// does it match perfectly now?
+return d&&(b=c.clone().add(d),a.time()-b.time()===0&&(c=b)),c},
+// Returns a moment for the current date, as defined by the client's computer or from the `now` option.
+// Will return an moment with an ambiguous timezone.
+N.getNow=function(){var a=O.now;return"function"==typeof a&&(a=a()),N.moment(a).stripZone()},
+// Get an event's normalized end date. If not present, calculate it from the defaults.
+N.getEventEnd=function(a){return a.end?a.end.clone():N.getDefaultEventEnd(a.allDay,a.start)},
+// Given an event's allDay status and start date, return what its fallback end date should be.
+// TODO: rename to computeDefaultEventEnd
+N.getDefaultEventEnd=function(a,b){var c=b.clone();return a?c.stripTime().add(N.defaultAllDayEventDuration):c.add(N.defaultTimedEventDuration),N.getIsAmbigTimezone()&&c.stripZone(),c},
+// Produces a human-readable string for the given duration.
+// Side-effect: changes the locale of the given duration.
+N.humanizeDuration=function(a){return(a.locale||a.lang).call(a,O.lang).humanize()},
+// Imports
+// -----------------------------------------------------------------------------------
+Ra.call(N,O);var R,S,T,U,W,X,Y,Z,$=N.isFetchNeeded,_=N.fetchEvents,aa=c[0],ba={},ca=0,da=[];// unzoned
+// Main Rendering
+// -----------------------------------------------------------------------------------
+// compute the initial ambig-timezone date
+Z=null!=O.defaultDate?N.moment(O.defaultDate).stripZone():N.getNow(),N.getSuggestedViewHeight=function(){return void 0===X&&k(),X},N.isHeightAuto=function(){return"auto"===O.contentHeight||"auto"===O.height},N.freezeContentHeight=H,N.unfreezeContentHeight=I,N.initialize()}function Oa(b){a.each(zb,function(a,c){null==b[a]&&(b[a]=c(b))})}
+// Returns moment's internal locale data. If doesn't exist, returns English.
+// Works with moment-pre-2.8
+function Pa(a){var c=b.localeData||b.langData;return c.call(b,a)||c.call(b,"en")}/* Top toolbar area with buttons and title
+----------------------------------------------------------------------------------------------------------------------*/
+// TODO: rename all header-related things to "toolbar"
+function Qa(b,c){function d(){var b=c.header;return n=c.theme?"ui":"fc",b?o=a("").append(f("left")).append(f("right")).append(f("center")).append(''):void 0}function e(){o.remove(),o=a()}function f(d){var e=a(''),f=c.header[d];return f&&a.each(f.split(" "),function(d){var f,g=a(),h=!0;a.each(this.split(","),function(d,e){var f,i,j,k,l,m,o,q,r,s;// the element
+"title"==e?(g=g.add(a("
"},/* Generic
+ ------------------------------------------------------------------------------------------------------------------*/
+// Generates the default HTML intro for any row. User classes should override
+renderIntroHtml:function(){},
+// TODO: a generic method for dealing with
, RTL, intro
+// when increment internalApiVersion
+// wrapTr (scheduler)
+/* Utils
+ ------------------------------------------------------------------------------------------------------------------*/
+// Applies the generic "intro" and "outro" HTML to the given cells.
+// Intro means the leftmost cell when the calendar is LTR and the rightmost cell when RTL. Vice-versa for outro.
+bookendCells:function(a){var b=this.renderIntroHtml();b&&(this.isRTL?a.append(b):a.prepend(b))}},rb=Ta.DayGrid=pb.extend(qb,{numbersVisible:!1,// should render a row for day/week numbers? set by outside view. TODO: make internal
+bottomCoordPadding:0,// hack for extending the hit area for the last row of the coordinate grid
+rowEls:null,// set of fake row elements
+cellEls:null,// set of whole-day elements comprising the row's background
+helperEls:null,// set of cell skeleton elements for rendering the mock event "helper"
+rowCoordCache:null,colCoordCache:null,
+// Renders the rows and columns into the component's `this.el`, which should already be assigned.
+// isRigid determins whether the individual rows should ignore the contents and be a constant height.
+// Relies on the view's colCnt and rowCnt. In the future, this component should probably be self-sufficient.
+renderDates:function(a){var b,c,d=this.view,e=this.rowCnt,f=this.colCnt,g="";for(b=0;e>b;b++)g+=this.renderDayRowHtml(b,a);
+// trigger dayRender with each cell's element
+for(this.el.html(g),this.rowEls=this.el.find(".fc-row"),this.cellEls=this.el.find(".fc-day"),this.rowCoordCache=new lb({els:this.rowEls,isVertical:!0}),this.colCoordCache=new lb({els:this.cellEls.slice(0,this.colCnt),// only the first row
+isHorizontal:!0}),b=0;e>b;b++)for(c=0;f>c;c++)d.trigger("dayRender",null,this.getCellDate(b,c),this.getCellEl(b,c))},unrenderDates:function(){this.removeSegPopover()},renderBusinessHours:function(){var a=this.view.calendar.getBusinessHoursEvents(!0),b=this.eventsToSegs(a);this.renderFill("businessHours",b,"bgevent")},
+// Generates the HTML for a single row, which is a div that wraps a table.
+// `row` is the row number.
+renderDayRowHtml:function(a,b){var c=this.view,d=["fc-row","fc-week",c.widgetContentClass];return b&&d.push("fc-rigid"),'
"},renderNumberIntroHtml:function(a){return this.renderIntroHtml()},renderNumberCellsHtml:function(a){var b,c,d=[];for(b=0;bs of the "number" row in the DayGrid's content skeleton.
+// The number row will only exist if either day numbers or week numbers are turned on.
+renderNumberCellHtml:function(a){var b;return this.view.dayNumbersVisible?(b=this.getDayClasses(a),b.unshift("fc-day-number"),'
'+a.date()+"
"):"
"},/* Options
+ ------------------------------------------------------------------------------------------------------------------*/
+// Computes a default event time formatting string if `timeFormat` is not explicitly defined
+computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},
+// Computes a default `displayEventEnd` value if one is not expliclty defined
+computeDisplayEventEnd:function(){return 1==this.colCnt},/* Dates
+ ------------------------------------------------------------------------------------------------------------------*/
+rangeUpdated:function(){this.updateDayTable()},
+// Slices up the given span (unzoned start/end with other misc data) into an array of segments
+spanToSegs:function(a){var b,c,d=this.sliceRangeByRow(a);for(b=0;b
');g=c&&c.row===b?c.el.position().top:h.find(".fc-content-skeleton tbody").position().top,i.css("top",g).find("table").append(d[b].tbodyEl),h.append(i),e.push(i[0])}),this.helperEls=a(e)},
+// Unrenders any visual indication of a mock helper event
+unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},/* Fill System (highlight, background events, business hours)
+ ------------------------------------------------------------------------------------------------------------------*/
+fillSegTag:"td",// override the default tag name
+// Renders a set of rectangles over the given segments of days.
+// Only returns segments that successfully rendered.
+renderFill:function(b,c,d){var e,f,g,h=[];// assignes `.el` to each seg. returns successfully rendered segs
+for(c=this.renderFillSegEls(b,c),e=0;e
'),this.bookendCells(f),e}});/* Event-rendering methods for the DayGrid class
+----------------------------------------------------------------------------------------------------------------------*/
+rb.mixin({rowStructs:null,// an array of objects, each holding information about a row's foreground event-rendering
+// Unrenders all events currently rendered on the grid
+unrenderEvents:function(){this.removeSegPopover(),// removes the "more.." events popover
+pb.prototype.unrenderEvents.apply(this,arguments)},
+// Retrieves all rendered segment objects currently rendered on the grid
+getEventSegs:function(){return pb.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},
+// Renders the given background event segments onto the grid
+renderBgSegs:function(b){
+// don't render timed background events
+var c=a.grep(b,function(a){return a.event.allDay});return pb.prototype.renderBgSegs.call(this,c)},
+// Renders the given foreground event segments onto the grid
+renderFgSegs:function(b){var c;
+// render an `.el` on each seg
+// returns a subset of the segs. segs that were actually rendered
+// append to each row's content skeleton
+return b=this.renderFgSegEls(b),c=this.rowStructs=this.renderSegRows(b),this.rowEls.each(function(b,d){a(d).find(".fc-content-skeleton > table").append(c[b].tbodyEl)}),b},
+// Unrenders all currently rendered foreground event segments
+unrenderFgSegs:function(){for(var a,b=this.rowStructs||[];a=b.pop();)a.tbodyEl.remove();this.rowStructs=null},
+// Uses the given events array to generate elements that should be appended to each row's content skeleton.
+// Returns an array of rowStruct objects (see the bottom of `renderSegRow`).
+// PRECONDITION: each segment shoud already have a rendered and assigned `.el`
+renderSegRows:function(a){var b,c,d=[];// group into nested arrays
+// iterate each row of segment groupings
+for(b=this.groupSegRows(a),c=0;c'+aa(c)+"")),d=''+(aa(f.title||"")||" ")+"",'
"+(h?'':"")+(i?'':"")+""},
+// Given a row # and an array of segments all in the same row, render a element, a skeleton that contains
+// the segments. Returns object with a bunch of internal data about how the render was calculated.
+// NOTE: modifies rowSegs
+renderSegRow:function(b,c){
+// populates empty cells from the current column (`col`) to `endCol`
+function d(b){for(;b>g;)k=(r[e-1]||[])[g],k?k.attr("rowspan",parseInt(k.attr("rowspan")||1,10)+1):(k=a("
"),h.append(k)),q[e][g]=k,r[e][g]=k,g++}var e,f,g,h,i,j,k,l=this.colCnt,m=this.buildSegLevels(c),n=Math.max(1,m.length),o=a(""),p=[],q=[],r=[];for(e=0;n>e;e++){
+// levelCnt might be 1 even though there are no actual levels. protect against this.
+// this single empty row is useful for styling.
+if(f=m[e],g=0,h=a("
"),p.push([]),q.push([]),r.push([]),f)for(i=0;i').append(j.el),j.leftCol!=j.rightCol?k.attr("colspan",j.rightCol-j.leftCol+1):// a single-column segment
+r[e][g]=k;g<=j.rightCol;)q[e][g]=k,p[e][g]=j,g++;h.append(k)}d(l),// finish off the row
+this.bookendCells(h),o.append(h)}return{// a "rowStruct"
+row:b,// the row number
+tbodyEl:o,cellMatrix:q,segMatrix:p,segLevels:m,segs:c}},
+// Stacks a flat array of segments, which are all assumed to be in the same row, into subarrays of vertical levels.
+// NOTE: modifies segs
+buildSegLevels:function(a){var b,c,d,e=[];for(
+// Give preference to elements with certain criteria, so they have
+// a chance to be closer to the top.
+this.sortEventSegs(a),b=0;b at a time and stop when we find one out of bounds
+for(d=0;d td > :first-child").each(c),e.position().top+f>h)return d;return!1},
+// Limits the given grid row to the maximum number of levels and injects "more" links if necessary.
+// `row` is the row number.
+// `levelLimit` is a number for the maximum (inclusive) number of levels allowed.
+limitRow:function(b,c){
+// Iterates through empty level cells and places "more" links inside if need be
+function d(d){// goes from current `col` to `endCol`
+for(;d>w;)j=t.getCellSegs(b,w,c),j.length&&(m=f[c-1][w],s=t.renderMoreLink(b,w,j),r=a("").append(s),m.append(r),v.push(r[0])),w++}var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t=this,u=this.rowStructs[b],v=[],w=0;if(c&&c for each column the segment occupies. will be one for each colspan
+for(m=f[c-1][i.leftCol],n=m.attr("rowspan")||1,o=[],p=0;p').attr("rowspan",n),j=l[p],s=this.renderMoreLink(b,i.leftCol+p,[i].concat(j)),r=a("").append(s),q.append(r),o.push(q[0]),v.push(q[0]);m.addClass("fc-limited").after(a(o)),// hide original
and inject replacements
+g.push(m[0])}}d(this.colCnt),// finish off the level
+u.moreEls=a(v),// for easy undoing later
+u.limitedEls=a(g)}},
+// Reveals all levels and removes all "more"-related elements for a grid's row.
+// `row` is a row number.
+unlimitRow:function(a){var b=this.rowStructs[a];b.moreEls&&(b.moreEls.remove(),b.moreEls=null),b.limitedEls&&(b.limitedEls.removeClass("fc-limited"),b.limitedEls=null)},
+// Renders an element that represents hidden event element for a cell.
+// Responsible for attaching click handler as well.
+renderMoreLink:function(b,c,d){var e=this,f=this.view;return a('').text(this.getMoreLinkText(d.length)).on("click",function(g){var h=f.opt("eventLimitClick"),i=e.getCellDate(b,c),j=a(this),k=e.getCellEl(b,c),l=e.getCellSegs(b,c),m=e.resliceDaySegs(l,i),n=e.resliceDaySegs(d,i);"function"==typeof h&&(
+// the returned value can be an atomic option
+h=f.trigger("eventLimitClick",null,{date:i,dayEl:k,moreEl:j,segs:m,hiddenSegs:n},g)),"popover"===h?e.showSegPopover(b,c,j,m):"string"==typeof h&&// a view name
+f.calendar.zoomTo(i,h)})},
+// Reveals the popover that displays all events within a cell
+showSegPopover:function(a,b,c,d){var e,f,g=this,h=this.view,i=c.parent();e=1==this.rowCnt?h.el:this.rowEls.eq(a),f={className:"fc-more-popover",content:this.renderSegPopoverContent(a,b,d),parentEl:this.el,top:e.offset().top,autoHide:!0,viewportConstrain:h.opt("popoverViewportConstrain"),hide:function(){g.segPopover.removeElement(),g.segPopover=null,g.popoverSegs=null}},this.isRTL?f.right=i.offset().left+i.outerWidth()+1:f.left=i.offset().left-1,this.segPopover=new kb(f),this.segPopover.show()},
+// Builds the inner DOM contents of the segment popover
+renderSegPopoverContent:function(b,c,d){var e,f=this.view,g=f.opt("theme"),h=this.getCellDate(b,c).format(f.opt("dayPopoverFormat")),i=a('
"},
+// Generates the HTML for the horizontal "slats" that run width-wise. Has a time axis on a side. Depends on RTL.
+renderSlatRowHtml:function(){
+// Calculate the time for each slot
+for(var a,c,d,e=this.view,f=this.isRTL,g="",h=b.duration(+this.minTime);h"+(c?""+aa(a.format(this.labelFormat))+"":"")+"
",g+='
"+(f?"":d)+'
'+(f?d:"")+"
",h.add(this.slotDuration);return g},/* Options
+ ------------------------------------------------------------------------------------------------------------------*/
+// Parses various options into properties of this object
+processOptions:function(){var c,d=this.view,e=d.opt("slotDuration"),f=d.opt("snapDuration");e=b.duration(e),f=f?b.duration(f):e,this.slotDuration=e,this.snapDuration=f,this.snapsPerSlot=e/f,this.minResizeDuration=f,this.minTime=b.duration(d.opt("minTime")),this.maxTime=b.duration(d.opt("maxTime")),c=d.opt("slotLabelFormat"),a.isArray(c)&&(c=c[c.length-1]),this.labelFormat=c||d.opt("axisFormat")||d.opt("smallTimeFormat"),c=d.opt("slotLabelInterval"),this.labelInterval=c?b.duration(c):this.computeLabelInterval(e)},
+// Computes an automatic value for slotLabelInterval
+computeLabelInterval:function(a){var c,d,e;
+// find the smallest stock label interval that results in more than one slots-per-label
+for(c=Jb.length-1;c>=0;c--)if(d=b.duration(Jb[c]),e=P(d,a),fa(e)&&e>1)return d;return b.duration(a)},
+// Computes a default event time formatting string if `timeFormat` is not explicitly defined
+computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},
+// Computes a default `displayEventEnd` value if one is not expliclty defined
+computeDisplayEventEnd:function(){return!0},/* Hit System
+ ------------------------------------------------------------------------------------------------------------------*/
+prepareHits:function(){this.colCoordCache.build(),this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(a,b){var c=this.snapsPerSlot,d=this.colCoordCache,e=this.slatCoordCache,f=d.getHorizontalIndex(a),g=e.getVerticalIndex(b);if(null!=f&&null!=g){var h=e.getTopOffset(g),i=e.getHeight(g),j=(b-h)/i,k=Math.floor(j*c),l=g*c+k,m=h+k/c*i,n=h+(k+1)/c*i;return{col:f,snap:l,component:this,// needed unfortunately :(
+left:d.getLeftOffset(f),right:d.getRightOffset(f),top:m,bottom:n}}},getHitSpan:function(a){var b,c=this.getCellDate(0,a.col),d=this.computeSnapTime(a.snap);return c.time(d),b=c.clone().add(this.snapDuration),{start:c,end:b}},getHitEl:function(a){return this.colEls.eq(a.col)},/* Dates
+ ------------------------------------------------------------------------------------------------------------------*/
+rangeUpdated:function(){this.updateDayTable()},
+// Given a row number of the grid, representing a "snap", returns a time (Duration) from its start-of-day
+computeSnapTime:function(a){return b.duration(this.minTime+this.snapDuration*a)},
+// Slices up the given span (unzoned start/end with other misc data) into an array of segments
+spanToSegs:function(a){var b,c=this.sliceRangeByTimes(a);for(b=0;b').css("top",e).appendTo(this.colContainerEls.eq(d[c].col))[0]);
+// render an arrow over the axis
+d.length>0&&// is the current time in view?
+f.push(a('').css("top",e).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=a(f)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},/* Selection
+ ------------------------------------------------------------------------------------------------------------------*/
+// Renders a visual indication of a selection. Overrides the default, which was to simply render a highlight.
+renderSelection:function(a){this.view.opt("selectHelper")?// this setting signals that a mock helper event should be rendered
+// normally acceps an eventLocation, span has a start/end, which is good enough
+this.renderEventLocationHelper(a):this.renderHighlight(a)},
+// Unrenders any visual indication of a selection
+unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},/* Highlight
+ ------------------------------------------------------------------------------------------------------------------*/
+renderHighlight:function(a){this.renderHighlightSegs(this.spanToSegs(a))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});/* Methods for rendering SEGMENTS, pieces of content that live on the view
+ ( this file is no longer just for events )
+----------------------------------------------------------------------------------------------------------------------*/
+sb.mixin({colContainerEls:null,// containers for each column
+// inner-containers for each column where different types of segs live
+fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,
+// arrays of different types of displayed segments
+fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,
+// Renders the DOM that the view's content will live in
+renderContentSkeleton:function(){var b,c,d="";for(b=0;b
';c=a('
'+d+"
"),this.colContainerEls=c.find(".fc-content-col"),this.helperContainerEls=c.find(".fc-helper-container"),this.fgContainerEls=c.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=c.find(".fc-bgevent-container"),this.highlightContainerEls=c.find(".fc-highlight-container"),this.businessContainerEls=c.find(".fc-business-container"),this.bookendCells(c.find("tr")),this.el.append(c)},/* Foreground Events
+ ------------------------------------------------------------------------------------------------------------------*/
+renderFgSegs:function(a){return a=this.renderFgSegsIntoContainers(a,this.fgContainerEls),this.fgSegs=a,a},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},/* Foreground Helper Events
+ ------------------------------------------------------------------------------------------------------------------*/
+renderHelperSegs:function(b,c){var d,e,f,g=[];
+// Try to make the segment that is in the same row as sourceSeg look the same
+for(b=this.renderFgSegsIntoContainers(b,this.helperContainerEls),d=0;d' :
+ ''
+ ) +
+ */
+return k.unshift("fc-time-grid-event","fc-v-event"),f.isMultiDayEvent(g)?(a.isStart||a.isEnd)&&(c=this.getEventTimeText(a),d=this.getEventTimeText(a,"LT"),e=this.getEventTimeText(a,null,!1)):(c=this.getEventTimeText(g),d=this.getEventTimeText(g,"LT"),e=this.getEventTimeText(g,null,!1)),'
'+(j?'':"")+""},/* Seg Position Utils
+ ------------------------------------------------------------------------------------------------------------------*/
+// Refreshes the CSS top/bottom coordinates for each segment element.
+// Works when called after initial render, after a window resize/zoom for example.
+updateSegVerticals:function(a){this.computeSegVerticals(a),this.assignSegVerticals(a)},
+// For each segment in an array, computes and assigns its top and bottom properties
+computeSegVerticals:function(a){var b,c;for(b=0;b1?"ll":"LL"},
+// Utility for formatting a range. Accepts a range object, formatting string, and optional separator.
+// Displays all-day ranges naturally, with an inclusive end. Takes the current isRTL into account.
+// The timezones of the dates within `range` will be respected.
+formatRange:function(a,b,c){var d=a.end;// all-day?
+return d.hasTime()||(d=d.clone().subtract(1)),qa(a.start,d,b,c,this.opt("isRTL"))},/* Rendering
+ ------------------------------------------------------------------------------------------------------------------*/
+// Sets the container element that the view should render inside of.
+// Does other DOM-related initializations.
+setElement:function(a){this.el=a,this.bindGlobalHandlers()},
+// Removes the view's container element from the DOM, clearing any content beforehand.
+// Undoes any other DOM-related attachments.
+removeElement:function(){this.clear(),// clears all content
+// clean up the skeleton
+this.isSkeletonRendered&&(this.unrenderSkeleton(),this.isSkeletonRendered=!1),this.unbindGlobalHandlers(),this.el.remove()},
+// Does everything necessary to display the view centered around the given unzoned date.
+// Does every type of rendering EXCEPT rendering events.
+// Is asychronous and returns a promise.
+display:function(b){var c=this,d=null;return this.displaying&&(d=this.queryScroll()),this.calendar.freezeContentHeight(),this.clear().then(function(){// clear the content first (async)
+return c.displaying=a.when(c.displayView(b)).then(function(){c.forceScroll(c.computeInitialScroll(d)),c.calendar.unfreezeContentHeight(),c.triggerRender()})})},
+// Does everything necessary to clear the content of the view.
+// Clears dates and events. Does not clear the skeleton.
+// Is asychronous and returns a promise.
+clear:function(){var b=this,c=this.displaying;return c?c.then(function(){// wait for the display to finish
+return b.displaying=null,b.clearEvents(),b.clearView()}):a.when()},
+// Displays the view's non-event content, such as date-related content or anything required by events.
+// Renders the view's non-content skeleton if necessary.
+// Can be asynchronous and return a promise.
+displayView:function(a){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0),a&&this.setDate(a),this.render&&this.render(),this.renderDates(),this.updateSize(),this.renderBusinessHours(),// might need coordinates, so should go after updateSize()
+this.startNowIndicator()},
+// Unrenders the view content that was rendered in displayView.
+// Can be asynchronous and return a promise.
+clearView:function(){this.unselect(),this.stopNowIndicator(),this.triggerUnrender(),this.unrenderBusinessHours(),this.unrenderDates(),this.destroy&&this.destroy()},
+// Renders the basic structure of the view before any content is rendered
+renderSkeleton:function(){},
+// Unrenders the basic structure of the view
+unrenderSkeleton:function(){},
+// Renders the view's date-related content.
+// Assumes setRange has already been called and the skeleton has already been rendered.
+renderDates:function(){},
+// Unrenders the view's date-related content
+unrenderDates:function(){},
+// Signals that the view's content has been rendered
+triggerRender:function(){this.trigger("viewRender",this,this,this.el)},
+// Signals that the view's content is about to be unrendered
+triggerUnrender:function(){this.trigger("viewDestroy",this,this,this.el)},
+// Binds DOM handlers to elements that reside outside the view container, such as the document
+bindGlobalHandlers:function(){this.listenTo(a(document),"mousedown",this.handleDocumentMousedown),this.listenTo(a(document),"touchstart",this.handleDocumentTouchStart),this.listenTo(a(document),"touchend",this.handleDocumentTouchEnd)},
+// Unbinds DOM handlers from elements that reside outside the view container
+unbindGlobalHandlers:function(){this.stopListeningTo(a(document))},
+// Initializes internal variables related to theming
+initThemingProps:function(){var a=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=a+"-widget-header",this.widgetContentClass=a+"-widget-content",this.highlightStateClass=a+"-state-highlight"},/* Business Hours
+ ------------------------------------------------------------------------------------------------------------------*/
+// Renders business-hours onto the view. Assumes updateSize has already been called.
+renderBusinessHours:function(){},
+// Unrenders previously-rendered business-hours
+unrenderBusinessHours:function(){},/* Now Indicator
+ ------------------------------------------------------------------------------------------------------------------*/
+// Immediately render the current time indicator and begins re-rendering it at an interval,
+// which is defined by this.getNowIndicatorUnit().
+// TODO: somehow do this for the current whole day's background too
+startNowIndicator:function(){var a,c,d,e=this;// ms wait value
+this.opt("nowIndicator")&&(a=this.getNowIndicatorUnit(),a&&(c=ga(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,d=this.initialNowDate.clone().startOf(a).add(1,a)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){e.nowIndicatorTimeoutID=null,c(),d=+b.duration(1,a),d=Math.max(100,d),e.nowIndicatorIntervalID=setInterval(c,d)},d)))},
+// rerenders the now indicator, computing the new current time from the amount of time that has passed
+// since the initial getNow call.
+updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},
+// Immediately unrenders the view's current time indicator and stops any re-rendering timers.
+// Won't cause side effects if indicator isn't rendered.
+stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},
+// Returns a string unit, like 'second' or 'minute' that defined how often the current time indicator
+// should be refreshed. If something falsy is returned, no time indicator is rendered at all.
+getNowIndicatorUnit:function(){},
+// Renders a current time indicator at the given datetime
+renderNowIndicator:function(a){},
+// Undoes the rendering actions from renderNowIndicator
+unrenderNowIndicator:function(){},/* Dimensions
+ ------------------------------------------------------------------------------------------------------------------*/
+// Refreshes anything dependant upon sizing of the container element of the grid
+updateSize:function(a){var b;a&&(b=this.queryScroll()),this.updateHeight(a),this.updateWidth(a),this.updateNowIndicator(),a&&this.setScroll(b)},
+// Refreshes the horizontal dimensions of the calendar
+updateWidth:function(a){},
+// Refreshes the vertical dimensions of the calendar
+updateHeight:function(a){var b=this.calendar;// we poll the calendar for height information
+this.setHeight(b.getSuggestedViewHeight(),b.isHeightAuto())},
+// Updates the vertical dimensions of the calendar to the specified height.
+// if `isAuto` is set to true, height becomes merely a suggestion and the view should use its "natural" height.
+setHeight:function(a,b){},/* Scroller
+ ------------------------------------------------------------------------------------------------------------------*/
+// Computes the initial pre-configured scroll state prior to allowing the user to change it.
+// Given the scroll state from the previous rendering. If first time rendering, given null.
+computeInitialScroll:function(a){return 0},
+// Retrieves the view's current natural scroll state. Can return an arbitrary format.
+queryScroll:function(){},
+// Sets the view's scroll state. Will accept the same format computeInitialScroll and queryScroll produce.
+setScroll:function(a){},
+// Sets the scroll state, making sure to overcome any predefined scroll value the browser has in mind
+forceScroll:function(a){var b=this;this.setScroll(a),setTimeout(function(){b.setScroll(a)},0)},/* Event Elements / Segments
+ ------------------------------------------------------------------------------------------------------------------*/
+// Does everything necessary to display the given events onto the current view
+displayEvents:function(a){var b=this.queryScroll();this.clearEvents(),this.renderEvents(a),this.isEventsRendered=!0,this.setScroll(b),this.triggerEventRender()},
+// Does everything necessary to clear the view's currently-rendered events
+clearEvents:function(){var a;this.isEventsRendered&&(a=this.queryScroll(),this.triggerEventUnrender(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.setScroll(a),this.isEventsRendered=!1)},
+// Renders the events onto the view.
+renderEvents:function(a){},
+// Removes event elements from the view.
+unrenderEvents:function(){},
+// Signals that all events have been rendered
+triggerEventRender:function(){this.renderedEventSegEach(function(a){this.trigger("eventAfterRender",a.event,a.event,a.el)}),this.trigger("eventAfterAllRender")},
+// Signals that all event elements are about to be removed
+triggerEventUnrender:function(){this.renderedEventSegEach(function(a){this.trigger("eventDestroy",a.event,a.event,a.el)})},
+// Given an event and the default element used for rendering, returns the element that should actually be used.
+// Basically runs events and elements through the eventRender hook.
+resolveEventEl:function(b,c){var d=this.trigger("eventRender",b,b,c);// means don't render at all
+return d===!1?c=null:d&&d!==!0&&(c=a(d)),c},
+// Hides all rendered event segments linked to the given event
+showEvent:function(a){this.renderedEventSegEach(function(a){a.el.css("visibility","")},a)},
+// Shows all rendered event segments linked to the given event
+hideEvent:function(a){this.renderedEventSegEach(function(a){a.el.css("visibility","hidden")},a)},
+// Iterates through event segments that have been rendered (have an el). Goes through all by default.
+// If the optional `event` argument is specified, only iterates through segments linked to that event.
+// The `this` value of the callback function will be the view.
+renderedEventSegEach:function(a,b){var c,d=this.getEventSegs();for(c=0;cb;b++)(d[b]=-1!==a.inArray(b,c))||e++;if(!e)throw"invalid hiddenDays";this.isHiddenDayHash=d},
+// Is the current day hidden?
+// `day` is a day-of-week index (0-6), or a Moment
+isHiddenDay:function(a){return b.isMoment(a)&&(a=a.day()),this.isHiddenDayHash[a]},
+// Incrementing the current day until it is no longer a hidden day, returning a copy.
+// If the initial value of `date` is not a hidden day, don't do anything.
+// Pass `isExclusive` as `true` if you are dealing with an end date.
+// `inc` defaults to `1` (increment one day forward each time)
+skipHiddenDays:function(a,b,c){var d=a.clone();for(b=b||1;this.isHiddenDayHash[(d.day()+(c?b:0)+7)%7];)d.add(b,"days");return d},
+// Returns the date range of the full days the given range visually appears to occupy.
+// Returns a new range object.
+computeDayRange:function(a){var b,c=a.start.clone().stripTime(),d=a.end,e=null;// the beginning of the day the range exclusively ends
+// # of milliseconds into `endDay`
+// If the end time is actually inclusively part of the next day and is equal to or
+// beyond the next day threshold, adjust the end to be the exclusive end of `endDay`.
+// Otherwise, leaving it as inclusive will cause it to exclude `endDay`.
+// If no end was specified, or if it is within `startDay` but not past nextDayThreshold,
+// assign the default duration of one day.
+return d&&(e=d.clone().stripTime(),b=+d.time(),b&&b>=this.nextDayThreshold&&e.add(1,"days")),(!d||c>=e)&&(e=c.clone().add(1,"days")),{start:c,end:e}},
+// Does the given event visually appear to occupy more than one day?
+isMultiDayEvent:function(a){var b=this.computeDayRange(a);// event is range-ish
+return b.end.diff(b.start,"days")>1}}),ub=Ta.Scroller=va.extend({el:null,// the guaranteed outer element
+scrollEl:null,// the element with the scrollbars
+overflowX:null,overflowY:null,constructor:function(a){a=a||{},this.overflowX=a.overflowX||a.overflow||"auto",this.overflowY=a.overflowY||a.overflow||"auto"},render:function(){this.el=this.renderEl(),this.applyOverflow()},renderEl:function(){return this.scrollEl=a('')},
+// sets to natural height, unlocks overflow
+clear:function(){this.setHeight("auto"),this.applyOverflow()},destroy:function(){this.el.remove()},
+// Overflow
+// -----------------------------------------------------------------------------------------------------------------
+applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},
+// Causes any 'auto' overflow values to resolves to 'scroll' or 'hidden'.
+// Useful for preserving scrollbar widths regardless of future resizes.
+// Can pass in scrollbarWidths for optimization.
+lockOverflow:function(a){var b=this.overflowX,c=this.overflowY;a=a||this.getScrollbarWidths(),"auto"===b&&(b=a.top||a.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===c&&(c=a.left||a.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":b,"overflow-y":c})},
+// Getters / Setters
+// -----------------------------------------------------------------------------------------------------------------
+setHeight:function(a){this.scrollEl.height(a)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(a){this.scrollEl.scrollTop(a)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return q(this.scrollEl)}}),vb=Ta.Calendar=va.extend({dirDefaults:null,// option defaults related to LTR or RTL
+langDefaults:null,// option defaults related to current locale
+overrides:null,// option overrides given to the fullCalendar constructor
+options:null,// all defaults combined with overrides
+viewSpecCache:null,// cache of view definitions
+view:null,// current View object
+header:null,loadingLevel:0,// number of simultaneous loading tasks
+isTouch:!1,
+// a lot of this class' OOP logic is scoped within this constructor function,
+// but in the future, write individual methods on the prototype.
+constructor:Na,
+// Subclasses can override this for initialization logic after the constructor has been called
+initialize:function(){},
+// Initializes `this.options` and other important options-related objects
+initOptions:function(a){var b,e,f,g;a=d(a),b=a.lang,e=wb[b],e||(b=vb.defaults.lang,e=wb[b]||{}),f=_(a.isRTL,e.isRTL,vb.defaults.isRTL),g=f?vb.rtlDefaults:{},this.dirDefaults=g,this.langDefaults=e,this.overrides=a,this.options=c([vb.defaults,g,e,a]),Oa(this.options),this.isTouch=null!=this.options.isTouch?this.options.isTouch:Ta.isTouch,this.viewSpecCache={}},
+// Gets information about how to create a view. Will use a cache.
+getViewSpec:function(a){var b=this.viewSpecCache;return b[a]||(b[a]=this.buildViewSpec(a))},
+// Given a duration singular unit, like "week" or "day", finds a matching view spec.
+// Preference is given to views that have corresponding buttons.
+getUnitViewSpec:function(b){var c,d,e;if(-1!=a.inArray(b,Ya))for(c=this.header.getViewsWithButtons(),a.each(Ta.views,function(a){c.push(a)}),d=0;d "September 2014"
+monthYearFormat:function(a){return a.showMonthAfterYear?"YYYY["+a.yearSuffix+"] MMMM":"MMMM YYYY["+a.yearSuffix+"]"}},yb={
+// Produces format strings like "ddd M/D" -> "Fri 9/15"
+dayOfMonthFormat:function(a,b){var c=a.longDateFormat("l");// for the format like "M/D/YYYY"
+// strip the year off the edge, as well as other misc non-whitespace chars
+return c=c.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),b.isRTL?c+=" ddd":c="ddd "+c,c},
+// Produces format strings like "h:mma" -> "6:00pm"
+mediumTimeFormat:function(a){// can't be called `timeFormat` because collides with option
+return a.longDateFormat("LT").replace(/\s*a$/i,"a")},
+// Produces format strings like "h(:mm)a" -> "6pm" / "6:30pm"
+smallTimeFormat:function(a){return a.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},
+// Produces format strings like "h(:mm)t" -> "6p" / "6:30p"
+extraSmallTimeFormat:function(a){return a.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},
+// Produces format strings like "ha" / "H" -> "6pm" / "18"
+hourFormat:function(a){return a.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},
+// Produces format strings like "h:mm" -> "6:30" (with no AM/PM)
+noMeridiemTimeFormat:function(a){return a.longDateFormat("LT").replace(/\s*a$/i,"")}},zb={
+// Produces format strings for results like "Mo 16"
+smallDayDateFormat:function(a){return a.isRTL?"D dd":"dd D"},
+// Produces format strings for results like "Wk 5"
+weekFormat:function(a){return a.isRTL?"w[ "+a.weekNumberTitle+"]":"["+a.weekNumberTitle+" ]w"},
+// Produces format strings for results like "Wk5"
+smallWeekFormat:function(a){return a.isRTL?"w["+a.weekNumberTitle+"]":"["+a.weekNumberTitle+"]w"}};
+// Initialize English by forcing computation of moment-derived options.
+// Also, sets it as the default.
+Ta.lang("en",vb.englishDefaults),Ta.sourceNormalizers=[],Ta.sourceFetchers=[];var Ab={dataType:"json",cache:!1},Bb=1;
+// Returns a list of events that the given event should be compared against when being considered for a move to
+// the specified span. Attached to the Calendar's prototype because EventManager is a mixin for a Calendar.
+vb.prototype.getPeerEvents=function(a,b){var c,d,e=this.getEventCache(),f=[];for(c=0;c1,// TODO: make grid responsible
+this.weekNumbersVisible=this.opt("weekNumbers"),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.weekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var b=this.scroller.el.addClass("fc-day-grid-container"),c=a('').appendTo(b);this.el.find(".fc-body > tr > td").append(b),this.dayGrid.setElement(c),this.dayGrid.renderDates(this.hasRigidRows())},
+// render the day-of-week headers
+renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml()),this.headRowEl=this.headContainerEl.find(".fc-row")},
+// Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,
+// always completely kill the dayGrid's rendering.
+unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement(),this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},
+// Builds the HTML skeleton for the view.
+// The day-grid component will render inside of a container defined by this HTML.
+renderSkeletonHtml:function(){return'
'},
+// Generates an HTML attribute string for setting the width of the week number column, if it is known
+weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},
+// Determines whether each row should have a constant height
+hasRigidRows:function(){var a=this.opt("eventLimit");return a&&"number"!=typeof a},/* Dimensions
+ ------------------------------------------------------------------------------------------------------------------*/
+// Refreshes the horizontal dimensions of the view
+updateWidth:function(){this.weekNumbersVisible&&(
+// Make sure all week number cells running down the side have the same width.
+// Record the width for cells created later.
+this.weekNumberWidth=k(this.el.find(".fc-week-number")))},
+// Adjusts the vertical dimensions of the view to the specified values
+setHeight:function(a,b){var c,d,g=this.opt("eventLimit");
+// reset all heights to be natural
+this.scroller.clear(),f(this.headRowEl),this.dayGrid.removeSegPopover(),// kill the "more" popover if displayed
+// is the event limit a constant level number?
+g&&"number"==typeof g&&this.dayGrid.limitRows(g),c=this.computeScrollerHeight(a),this.setGridHeight(c,b),g&&"number"!=typeof g&&this.dayGrid.limitRows(g),b||(this.scroller.setHeight(c),d=this.scroller.getScrollbarWidths(),(d.left||d.right)&&(e(this.headRowEl,d),c=this.computeScrollerHeight(a),this.scroller.setHeight(c)),this.scroller.lockOverflow(d))},
+// given a desired total height of the view, returns what the height of the scroller should be
+computeScrollerHeight:function(a){return a-l(this.el,this.scroller.el)},
+// Sets the height of just the DayGrid component in this view
+setGridHeight:function(a,b){b?j(this.dayGrid.rowEls):i(this.dayGrid.rowEls,a,!0)},/* Scroll
+ ------------------------------------------------------------------------------------------------------------------*/
+queryScroll:function(){return this.scroller.getScrollTop()},setScroll:function(a){this.scroller.setScrollTop(a)},/* Hit Areas
+ ------------------------------------------------------------------------------------------------------------------*/
+// forward all hit-related method calls to dayGrid
+prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(a,b){return this.dayGrid.queryHit(a,b)},getHitSpan:function(a){return this.dayGrid.getHitSpan(a)},getHitEl:function(a){return this.dayGrid.getHitEl(a)},/* Events
+ ------------------------------------------------------------------------------------------------------------------*/
+// Renders the given events onto the view and populates the segments array
+renderEvents:function(a){this.dayGrid.renderEvents(a),this.updateHeight()},
+// Retrieves all segment objects that are rendered in the view
+getEventSegs:function(){return this.dayGrid.getEventSegs()},
+// Unrenders all event elements and clears internal segment data
+unrenderEvents:function(){this.dayGrid.unrenderEvents()},/* Dragging (for both events and external elements)
+ ------------------------------------------------------------------------------------------------------------------*/
+// A returned value of `true` signals that a mock "helper" event has been rendered.
+renderDrag:function(a,b){return this.dayGrid.renderDrag(a,b)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},/* Selection
+ ------------------------------------------------------------------------------------------------------------------*/
+// Renders a visual indication of a selection
+renderSelection:function(a){this.dayGrid.renderSelection(a)},
+// Unrenders a visual indications of a selection
+unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),Db={
+// Generates the HTML that will go before the day-of week header cells
+renderHeadIntroHtml:function(){var a=this.view;// needed for matchCellWidths
+return a.weekNumbersVisible?'
"+aa(a.opt("weekNumberTitle"))+"
":""},
+// Generates the HTML that will go before content-skeleton cells that display the day/week numbers
+renderNumberIntroHtml:function(a){var b=this.view;// needed for matchCellWidths
+return b.weekNumbersVisible?'
"+this.getCellDate(a,0).format("w")+"
":""},
+// Generates the HTML that goes before the day bg cells for each day-row
+renderBgIntroHtml:function(){var a=this.view;return a.weekNumbersVisible?'
":""},
+// Generates the HTML that goes before every other type of row generated by DayGrid.
+// Affects helper-skeleton and highlight-skeleton rows.
+renderIntroHtml:function(){var a=this.view;return a.weekNumbersVisible?'
":""}},Eb=Ta.MonthView=Cb.extend({
+// Produces information about what range to display
+computeRange:function(a){var b,c=Cb.prototype.computeRange.call(this,a);
+// ensure 6 weeks
+// could be partial weeks due to hiddenDays
+return this.isFixedWeeks()&&(b=Math.ceil(c.end.diff(c.start,"weeks",!0)),c.end.add(6-b,"weeks")),c},
+// Overrides the default BasicView behavior to have special multi-week auto-height logic
+setGridHeight:function(a,b){b=b||"variable"===this.opt("weekMode"),b&&(a*=this.rowCnt/6),i(this.dayGrid.rowEls,a,!b)},isFixedWeeks:function(){var a=this.opt("weekMode");// LEGACY: weekMode is deprecated
+// LEGACY: weekMode is deprecated
+return a?"fixed"===a:this.opt("fixedWeekCount")}});Ua.basic={"class":Cb},Ua.basicDay={type:"basic",duration:{days:1}},Ua.basicWeek={type:"basic",duration:{weeks:1}},Ua.month={"class":Eb,duration:{months:1},// important for prev/next
+defaults:{fixedWeekCount:!0}};/* An abstract class for all agenda-related views. Displays one more columns with time slots running vertically.
+----------------------------------------------------------------------------------------------------------------------*/
+// Is a manager for the TimeGrid subcomponent and possibly the DayGrid subcomponent (if allDaySlot is on).
+// Responsible for managing width/height.
+var Fb=Ta.AgendaView=tb.extend({scroller:null,timeGridClass:sb,// class used to instantiate the timeGrid. subclasses can override
+timeGrid:null,// the main time-grid subcomponent of this view
+dayGridClass:rb,// class used to instantiate the dayGrid. subclasses can override
+dayGrid:null,// the "all-day" subcomponent. if all-day is turned off, this will be null
+axisWidth:null,// the width of the time axis running down the side
+headContainerEl:null,// div that hold's the timeGrid's rendered date header
+noScrollRowEls:null,// set of fake row elements that must compensate when scroller has scrollbars
+// when the time-grid isn't tall enough to occupy the given height, we render an underneath
+bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(// should we display the "all-day" area?
+this.dayGrid=this.instantiateDayGrid()),this.scroller=new ub({overflowX:"hidden",overflowY:"auto"})},
+// Instantiates the TimeGrid object this view needs. Draws from this.timeGridClass
+instantiateTimeGrid:function(){var a=this.timeGridClass.extend(Gb);return new a(this)},
+// Instantiates the DayGrid object this view might need. Draws from this.dayGridClass
+instantiateDayGrid:function(){var a=this.dayGridClass.extend(Hb);return new a(this)},/* Rendering
+ ------------------------------------------------------------------------------------------------------------------*/
+// Sets the display range and computes all necessary dates
+setRange:function(a){tb.prototype.setRange.call(this,a),// call the super-method
+this.timeGrid.setRange(a),this.dayGrid&&this.dayGrid.setRange(a)},
+// Renders the view into `this.el`, which has already been assigned
+renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var b=this.scroller.el.addClass("fc-time-grid-container"),c=a('').appendTo(b);this.el.find(".fc-body > tr > td").append(b),this.timeGrid.setElement(c),this.timeGrid.renderDates(),
+// the that sometimes displays under the time-grid
+this.bottomRuleEl=a('').appendTo(this.timeGrid.el),// inject it into the time-grid
+this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),
+// have the day-grid extend it's coordinate area over the dividing the two grids
+this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},
+// render the day-of-week headers
+renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},
+// Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,
+// always completely kill each grid's rendering.
+unrenderDates:function(){this.timeGrid.unrenderDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement()),this.scroller.destroy()},
+// Builds the HTML skeleton for the view.
+// The day-grid and time-grid components will render inside containers defined by this HTML.
+renderSkeletonHtml:function(){return'
'+(this.dayGrid?'':"")+"
"},
+// Generates an HTML attribute string for setting the width of the axis, if it is known
+axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},/* Business Hours
+ ------------------------------------------------------------------------------------------------------------------*/
+renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours(),this.dayGrid&&this.dayGrid.unrenderBusinessHours()},/* Now Indicator
+ ------------------------------------------------------------------------------------------------------------------*/
+getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(a){this.timeGrid.renderNowIndicator(a)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},/* Dimensions
+ ------------------------------------------------------------------------------------------------------------------*/
+updateSize:function(a){this.timeGrid.updateSize(a),tb.prototype.updateSize.call(this,a)},
+// Refreshes the horizontal dimensions of the view
+updateWidth:function(){
+// make all axis cells line up, and record the width so newly created axis cells will have it
+this.axisWidth=k(this.el.find(".fc-axis"))},
+// Adjusts the vertical dimensions of the view to the specified values
+setHeight:function(a,b){var c,d,g;
+// reset all dimensions back to the original state
+this.bottomRuleEl.hide(),// .show() will be called later if this is necessary
+this.scroller.clear(),// sets height to 'auto' and clears overflow
+f(this.noScrollRowEls),
+// limit number of events in the all-day area
+this.dayGrid&&(this.dayGrid.removeSegPopover(),c=this.opt("eventLimit"),c&&"number"!=typeof c&&(c=Ib),c&&this.dayGrid.limitRows(c)),b||(d=this.computeScrollerHeight(a),this.scroller.setHeight(d),g=this.scroller.getScrollbarWidths(),(g.left||g.right)&&(e(this.noScrollRowEls,g),d=this.computeScrollerHeight(a),this.scroller.setHeight(d)),this.scroller.lockOverflow(g),this.timeGrid.getTotalSlatHeight()"+aa(a)+""):'
"},
+// Generates the HTML that goes before the bg of the TimeGrid slot area. Long vertical column.
+renderBgIntroHtml:function(){var a=this.view;return'
"},
+// Generates the HTML that goes before all other types of cells.
+// Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.
+renderIntroHtml:function(){var a=this.view;return'
"}},Hb={
+// Generates the HTML that goes before the all-day cells
+renderBgIntroHtml:function(){var a=this.view;// needed for matchCellWidths
+return'
"},
+// Generates the HTML that goes before all other types of cells.
+// Affects content-skeleton, helper-skeleton, highlight-skeleton for both the time-grid and day-grid.
+renderIntroHtml:function(){var a=this.view;return'