From 82bb38e2168ba1f4786ee0f989442d55233ea57c Mon Sep 17 00:00:00 2001 From: rozetko Date: Tue, 17 Jul 2018 15:36:21 +0300 Subject: [PATCH] Update dist --- dist/img/icn-graph-panel.svg | 80 ++++ dist/module.js | 605 +++++++++++++++++++++++++++++++ dist/module.js.map | 1 + dist/partials/axes_editor.html | 72 ++++ dist/partials/tab_analytics.html | 148 ++++++++ dist/partials/tab_display.html | 135 +++++++ dist/partials/tab_legend.html | 73 ++++ dist/plugin.json | 21 ++ 8 files changed, 1135 insertions(+) create mode 100644 dist/img/icn-graph-panel.svg create mode 100644 dist/module.js create mode 100644 dist/module.js.map create mode 100644 dist/partials/axes_editor.html create mode 100644 dist/partials/tab_analytics.html create mode 100644 dist/partials/tab_display.html create mode 100644 dist/partials/tab_legend.html create mode 100644 dist/plugin.json diff --git a/dist/img/icn-graph-panel.svg b/dist/img/icn-graph-panel.svg new file mode 100644 index 0000000..a508e7d --- /dev/null +++ b/dist/img/icn-graph-panel.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dist/module.js b/dist/module.js new file mode 100644 index 0000000..843a091 --- /dev/null +++ b/dist/module.js @@ -0,0 +1,605 @@ +define(["angular","app/core/config","app/core/core","app/core/core_module","app/core/time_series2","app/core/utils/kbn","app/core/utils/ticks","app/plugins/sdk","jquery","lodash","moment"], function(__WEBPACK_EXTERNAL_MODULE_angular__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_config__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core_module__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_time_series2__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_utils_kbn__, __WEBPACK_EXTERNAL_MODULE_grafana_app_core_utils_ticks__, __WEBPACK_EXTERNAL_MODULE_grafana_app_plugins_sdk__, __WEBPACK_EXTERNAL_MODULE_jquery__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_moment__) { return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // object to store loaded and loading wasm modules +/******/ var installedWasmModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // object with all compiled WebAssembly.Modules +/******/ __webpack_require__.w = {}; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./module.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "../node_modules/charenc/charenc.js": +/*!******************************************!*\ + !*** ../node_modules/charenc/charenc.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("var charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n\n\n//# sourceURL=webpack:///../node_modules/charenc/charenc.js?"); + +/***/ }), + +/***/ "../node_modules/crypt/crypt.js": +/*!**************************************!*\ + !*** ../node_modules/crypt/crypt.js ***! + \**************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n\n\n//# sourceURL=webpack:///../node_modules/crypt/crypt.js?"); + +/***/ }), + +/***/ "../node_modules/is-buffer/index.js": +/*!******************************************!*\ + !*** ../node_modules/is-buffer/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n\n\n//# sourceURL=webpack:///../node_modules/is-buffer/index.js?"); + +/***/ }), + +/***/ "../node_modules/md5/md5.js": +/*!**********************************!*\ + !*** ../node_modules/md5/md5.js ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("(function(){\r\n var crypt = __webpack_require__(/*! crypt */ \"../node_modules/crypt/crypt.js\"),\r\n utf8 = __webpack_require__(/*! charenc */ \"../node_modules/charenc/charenc.js\").utf8,\r\n isBuffer = __webpack_require__(/*! is-buffer */ \"../node_modules/is-buffer/index.js\"),\r\n bin = __webpack_require__(/*! charenc */ \"../node_modules/charenc/charenc.js\").bin,\r\n\r\n // The core\r\n md5 = function (message, options) {\r\n // Convert to byte array\r\n if (message.constructor == String)\r\n if (options && options.encoding === 'binary')\r\n message = bin.stringToBytes(message);\r\n else\r\n message = utf8.stringToBytes(message);\r\n else if (isBuffer(message))\r\n message = Array.prototype.slice.call(message, 0);\r\n else if (!Array.isArray(message))\r\n message = message.toString();\r\n // else, assume byte array already\r\n\r\n var m = crypt.bytesToWords(message),\r\n l = message.length * 8,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n // Swap endian\r\n for (var i = 0; i < m.length; i++) {\r\n m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |\r\n ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;\r\n }\r\n\r\n // Padding\r\n m[l >>> 5] |= 0x80 << (l % 32);\r\n m[(((l + 64) >>> 9) << 4) + 14] = l;\r\n\r\n // Method shortcuts\r\n var FF = md5._ff,\r\n GG = md5._gg,\r\n HH = md5._hh,\r\n II = md5._ii;\r\n\r\n for (var i = 0; i < m.length; i += 16) {\r\n\r\n var aa = a,\r\n bb = b,\r\n cc = c,\r\n dd = d;\r\n\r\n a = FF(a, b, c, d, m[i+ 0], 7, -680876936);\r\n d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\r\n c = FF(c, d, a, b, m[i+ 2], 17, 606105819);\r\n b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\r\n a = FF(a, b, c, d, m[i+ 4], 7, -176418897);\r\n d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);\r\n c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\r\n b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\r\n a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);\r\n d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\r\n c = FF(c, d, a, b, m[i+10], 17, -42063);\r\n b = FF(b, c, d, a, m[i+11], 22, -1990404162);\r\n a = FF(a, b, c, d, m[i+12], 7, 1804603682);\r\n d = FF(d, a, b, c, m[i+13], 12, -40341101);\r\n c = FF(c, d, a, b, m[i+14], 17, -1502002290);\r\n b = FF(b, c, d, a, m[i+15], 22, 1236535329);\r\n\r\n a = GG(a, b, c, d, m[i+ 1], 5, -165796510);\r\n d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);\r\n c = GG(c, d, a, b, m[i+11], 14, 643717713);\r\n b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\r\n a = GG(a, b, c, d, m[i+ 5], 5, -701558691);\r\n d = GG(d, a, b, c, m[i+10], 9, 38016083);\r\n c = GG(c, d, a, b, m[i+15], 14, -660478335);\r\n b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\r\n a = GG(a, b, c, d, m[i+ 9], 5, 568446438);\r\n d = GG(d, a, b, c, m[i+14], 9, -1019803690);\r\n c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\r\n b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);\r\n a = GG(a, b, c, d, m[i+13], 5, -1444681467);\r\n d = GG(d, a, b, c, m[i+ 2], 9, -51403784);\r\n c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);\r\n b = GG(b, c, d, a, m[i+12], 20, -1926607734);\r\n\r\n a = HH(a, b, c, d, m[i+ 5], 4, -378558);\r\n d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\r\n c = HH(c, d, a, b, m[i+11], 16, 1839030562);\r\n b = HH(b, c, d, a, m[i+14], 23, -35309556);\r\n a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);\r\n d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);\r\n c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\r\n b = HH(b, c, d, a, m[i+10], 23, -1094730640);\r\n a = HH(a, b, c, d, m[i+13], 4, 681279174);\r\n d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\r\n c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\r\n b = HH(b, c, d, a, m[i+ 6], 23, 76029189);\r\n a = HH(a, b, c, d, m[i+ 9], 4, -640364487);\r\n d = HH(d, a, b, c, m[i+12], 11, -421815835);\r\n c = HH(c, d, a, b, m[i+15], 16, 530742520);\r\n b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\r\n\r\n a = II(a, b, c, d, m[i+ 0], 6, -198630844);\r\n d = II(d, a, b, c, m[i+ 7], 10, 1126891415);\r\n c = II(c, d, a, b, m[i+14], 15, -1416354905);\r\n b = II(b, c, d, a, m[i+ 5], 21, -57434055);\r\n a = II(a, b, c, d, m[i+12], 6, 1700485571);\r\n d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\r\n c = II(c, d, a, b, m[i+10], 15, -1051523);\r\n b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\r\n a = II(a, b, c, d, m[i+ 8], 6, 1873313359);\r\n d = II(d, a, b, c, m[i+15], 10, -30611744);\r\n c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\r\n b = II(b, c, d, a, m[i+13], 21, 1309151649);\r\n a = II(a, b, c, d, m[i+ 4], 6, -145523070);\r\n d = II(d, a, b, c, m[i+11], 10, -1120210379);\r\n c = II(c, d, a, b, m[i+ 2], 15, 718787259);\r\n b = II(b, c, d, a, m[i+ 9], 21, -343485551);\r\n\r\n a = (a + aa) >>> 0;\r\n b = (b + bb) >>> 0;\r\n c = (c + cc) >>> 0;\r\n d = (d + dd) >>> 0;\r\n }\r\n\r\n return crypt.endian([a, b, c, d]);\r\n };\r\n\r\n // Auxiliary functions\r\n md5._ff = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & c | ~b & d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._gg = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & d | c & ~d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._hh = function (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._ii = function (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n\r\n // Package private blocksize\r\n md5._blocksize = 16;\r\n md5._digestsize = 16;\r\n\r\n module.exports = function (message, options) {\r\n if (message === undefined || message === null)\r\n throw new Error('Illegal argument ' + message);\r\n\r\n var digestbytes = crypt.wordsToBytes(md5(message, options));\r\n return options && options.asBytes ? digestbytes :\r\n options && options.asString ? bin.bytesToString(digestbytes) :\r\n crypt.bytesToHex(digestbytes);\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///../node_modules/md5/md5.js?"); + +/***/ }), + +/***/ "../node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js": +/*!***********************************************************************!*\ + !*** ../node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/*!\n * perfect-scrollbar v1.3.0\n * (c) 2017 Hyunje Jun\n * @license MIT\n */\nfunction get(element) {\n return getComputedStyle(element);\n}\n\nfunction set(element, obj) {\n for (var key in obj) {\n var val = obj[key];\n if (typeof val === 'number') {\n val = val + \"px\";\n }\n element.style[key] = val;\n }\n return element;\n}\n\nfunction div(className) {\n var div = document.createElement('div');\n div.className = className;\n return div;\n}\n\nvar elMatches =\n typeof Element !== 'undefined' &&\n (Element.prototype.matches ||\n Element.prototype.webkitMatchesSelector ||\n Element.prototype.msMatchesSelector);\n\nfunction matches(element, query) {\n if (!elMatches) {\n throw new Error('No element matching method supported');\n }\n\n return elMatches.call(element, query);\n}\n\nfunction remove(element) {\n if (element.remove) {\n element.remove();\n } else {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n }\n}\n\nfunction queryChildren(element, selector) {\n return Array.prototype.filter.call(element.children, function (child) { return matches(child, selector); }\n );\n}\n\nvar cls = {\n main: 'ps',\n element: {\n thumb: function (x) { return (\"ps__thumb-\" + x); },\n rail: function (x) { return (\"ps__rail-\" + x); },\n consuming: 'ps__child--consume',\n },\n state: {\n focus: 'ps--focus',\n active: function (x) { return (\"ps--active-\" + x); },\n scrolling: function (x) { return (\"ps--scrolling-\" + x); },\n },\n};\n\n/*\n * Helper methods\n */\nvar scrollingClassTimeout = { x: null, y: null };\n\nfunction addScrollingClass(i, x) {\n var classList = i.element.classList;\n var className = cls.state.scrolling(x);\n\n if (classList.contains(className)) {\n clearTimeout(scrollingClassTimeout[x]);\n } else {\n classList.add(className);\n }\n}\n\nfunction removeScrollingClass(i, x) {\n scrollingClassTimeout[x] = setTimeout(\n function () { return i.isAlive && i.element.classList.remove(cls.state.scrolling(x)); },\n i.settings.scrollingThreshold\n );\n}\n\nfunction setScrollingClassInstantly(i, x) {\n addScrollingClass(i, x);\n removeScrollingClass(i, x);\n}\n\nvar EventElement = function EventElement(element) {\n this.element = element;\n this.handlers = {};\n};\n\nvar prototypeAccessors = { isEmpty: { configurable: true } };\n\nEventElement.prototype.bind = function bind (eventName, handler) {\n if (typeof this.handlers[eventName] === 'undefined') {\n this.handlers[eventName] = [];\n }\n this.handlers[eventName].push(handler);\n this.element.addEventListener(eventName, handler, false);\n};\n\nEventElement.prototype.unbind = function unbind (eventName, target) {\n var this$1 = this;\n\n this.handlers[eventName] = this.handlers[eventName].filter(function (handler) {\n if (target && handler !== target) {\n return true;\n }\n this$1.element.removeEventListener(eventName, handler, false);\n return false;\n });\n};\n\nEventElement.prototype.unbindAll = function unbindAll () {\n var this$1 = this;\n\n for (var name in this$1.handlers) {\n this$1.unbind(name);\n }\n};\n\nprototypeAccessors.isEmpty.get = function () {\n var this$1 = this;\n\n return Object.keys(this.handlers).every(\n function (key) { return this$1.handlers[key].length === 0; }\n );\n};\n\nObject.defineProperties( EventElement.prototype, prototypeAccessors );\n\nvar EventManager = function EventManager() {\n this.eventElements = [];\n};\n\nEventManager.prototype.eventElement = function eventElement (element) {\n var ee = this.eventElements.filter(function (ee) { return ee.element === element; })[0];\n if (!ee) {\n ee = new EventElement(element);\n this.eventElements.push(ee);\n }\n return ee;\n};\n\nEventManager.prototype.bind = function bind (element, eventName, handler) {\n this.eventElement(element).bind(eventName, handler);\n};\n\nEventManager.prototype.unbind = function unbind (element, eventName, handler) {\n var ee = this.eventElement(element);\n ee.unbind(eventName, handler);\n\n if (ee.isEmpty) {\n // remove\n this.eventElements.splice(this.eventElements.indexOf(ee), 1);\n }\n};\n\nEventManager.prototype.unbindAll = function unbindAll () {\n this.eventElements.forEach(function (e) { return e.unbindAll(); });\n this.eventElements = [];\n};\n\nEventManager.prototype.once = function once (element, eventName, handler) {\n var ee = this.eventElement(element);\n var onceHandler = function (evt) {\n ee.unbind(eventName, onceHandler);\n handler(evt);\n };\n ee.bind(eventName, onceHandler);\n};\n\nfunction createEvent(name) {\n if (typeof window.CustomEvent === 'function') {\n return new CustomEvent(name);\n } else {\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(name, false, false, undefined);\n return evt;\n }\n}\n\nvar processScrollDiff = function(\n i,\n axis,\n diff,\n useScrollingClass,\n forceFireReachEvent\n) {\n if ( useScrollingClass === void 0 ) useScrollingClass = true;\n if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;\n\n var fields;\n if (axis === 'top') {\n fields = [\n 'contentHeight',\n 'containerHeight',\n 'scrollTop',\n 'y',\n 'up',\n 'down' ];\n } else if (axis === 'left') {\n fields = [\n 'contentWidth',\n 'containerWidth',\n 'scrollLeft',\n 'x',\n 'left',\n 'right' ];\n } else {\n throw new Error('A proper axis should be provided');\n }\n\n processScrollDiff$1(i, diff, fields, useScrollingClass, forceFireReachEvent);\n};\n\nfunction processScrollDiff$1(\n i,\n diff,\n ref,\n useScrollingClass,\n forceFireReachEvent\n) {\n var contentHeight = ref[0];\n var containerHeight = ref[1];\n var scrollTop = ref[2];\n var y = ref[3];\n var up = ref[4];\n var down = ref[5];\n if ( useScrollingClass === void 0 ) useScrollingClass = true;\n if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;\n\n var element = i.element;\n\n // reset reach\n i.reach[y] = null;\n\n // 1 for subpixel rounding\n if (element[scrollTop] < 1) {\n i.reach[y] = 'start';\n }\n\n // 1 for subpixel rounding\n if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {\n i.reach[y] = 'end';\n }\n\n if (diff) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + y)));\n\n if (diff < 0) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + up)));\n } else if (diff > 0) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + down)));\n }\n\n if (useScrollingClass) {\n setScrollingClassInstantly(i, y);\n }\n }\n\n if (i.reach[y] && (diff || forceFireReachEvent)) {\n element.dispatchEvent(createEvent((\"ps-\" + y + \"-reach-\" + (i.reach[y]))));\n }\n}\n\nfunction toInt(x) {\n return parseInt(x, 10) || 0;\n}\n\nfunction isEditable(el) {\n return (\n matches(el, 'input,[contenteditable]') ||\n matches(el, 'select,[contenteditable]') ||\n matches(el, 'textarea,[contenteditable]') ||\n matches(el, 'button,[contenteditable]')\n );\n}\n\nfunction outerWidth(element) {\n var styles = get(element);\n return (\n toInt(styles.width) +\n toInt(styles.paddingLeft) +\n toInt(styles.paddingRight) +\n toInt(styles.borderLeftWidth) +\n toInt(styles.borderRightWidth)\n );\n}\n\nvar env = {\n isWebKit:\n typeof document !== 'undefined' &&\n 'WebkitAppearance' in document.documentElement.style,\n supportsTouch:\n typeof window !== 'undefined' &&\n ('ontouchstart' in window ||\n (window.DocumentTouch && document instanceof window.DocumentTouch)),\n supportsIePointer:\n typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,\n isChrome:\n typeof navigator !== 'undefined' &&\n /Chrome/i.test(navigator && navigator.userAgent),\n};\n\nvar updateGeometry = function(i) {\n var element = i.element;\n\n i.containerWidth = element.clientWidth;\n i.containerHeight = element.clientHeight;\n i.contentWidth = element.scrollWidth;\n i.contentHeight = element.scrollHeight;\n\n if (!element.contains(i.scrollbarXRail)) {\n // clean up and append\n queryChildren(element, cls.element.rail('x')).forEach(function (el) { return remove(el); }\n );\n element.appendChild(i.scrollbarXRail);\n }\n if (!element.contains(i.scrollbarYRail)) {\n // clean up and append\n queryChildren(element, cls.element.rail('y')).forEach(function (el) { return remove(el); }\n );\n element.appendChild(i.scrollbarYRail);\n }\n\n if (\n !i.settings.suppressScrollX &&\n i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth\n ) {\n i.scrollbarXActive = true;\n i.railXWidth = i.containerWidth - i.railXMarginWidth;\n i.railXRatio = i.containerWidth / i.railXWidth;\n i.scrollbarXWidth = getThumbSize(\n i,\n toInt(i.railXWidth * i.containerWidth / i.contentWidth)\n );\n i.scrollbarXLeft = toInt(\n (i.negativeScrollAdjustment + element.scrollLeft) *\n (i.railXWidth - i.scrollbarXWidth) /\n (i.contentWidth - i.containerWidth)\n );\n } else {\n i.scrollbarXActive = false;\n }\n\n if (\n !i.settings.suppressScrollY &&\n i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight\n ) {\n i.scrollbarYActive = true;\n i.railYHeight = i.containerHeight - i.railYMarginHeight;\n i.railYRatio = i.containerHeight / i.railYHeight;\n i.scrollbarYHeight = getThumbSize(\n i,\n toInt(i.railYHeight * i.containerHeight / i.contentHeight)\n );\n i.scrollbarYTop = toInt(\n element.scrollTop *\n (i.railYHeight - i.scrollbarYHeight) /\n (i.contentHeight - i.containerHeight)\n );\n } else {\n i.scrollbarYActive = false;\n }\n\n if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {\n i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;\n }\n if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {\n i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;\n }\n\n updateCss(element, i);\n\n if (i.scrollbarXActive) {\n element.classList.add(cls.state.active('x'));\n } else {\n element.classList.remove(cls.state.active('x'));\n i.scrollbarXWidth = 0;\n i.scrollbarXLeft = 0;\n element.scrollLeft = 0;\n }\n if (i.scrollbarYActive) {\n element.classList.add(cls.state.active('y'));\n } else {\n element.classList.remove(cls.state.active('y'));\n i.scrollbarYHeight = 0;\n i.scrollbarYTop = 0;\n element.scrollTop = 0;\n }\n};\n\nfunction getThumbSize(i, thumbSize) {\n if (i.settings.minScrollbarLength) {\n thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);\n }\n if (i.settings.maxScrollbarLength) {\n thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);\n }\n return thumbSize;\n}\n\nfunction updateCss(element, i) {\n var xRailOffset = { width: i.railXWidth };\n if (i.isRtl) {\n xRailOffset.left =\n i.negativeScrollAdjustment +\n element.scrollLeft +\n i.containerWidth -\n i.contentWidth;\n } else {\n xRailOffset.left = element.scrollLeft;\n }\n if (i.isScrollbarXUsingBottom) {\n xRailOffset.bottom = i.scrollbarXBottom - element.scrollTop;\n } else {\n xRailOffset.top = i.scrollbarXTop + element.scrollTop;\n }\n set(i.scrollbarXRail, xRailOffset);\n\n var yRailOffset = { top: element.scrollTop, height: i.railYHeight };\n if (i.isScrollbarYUsingRight) {\n if (i.isRtl) {\n yRailOffset.right =\n i.contentWidth -\n (i.negativeScrollAdjustment + element.scrollLeft) -\n i.scrollbarYRight -\n i.scrollbarYOuterWidth;\n } else {\n yRailOffset.right = i.scrollbarYRight - element.scrollLeft;\n }\n } else {\n if (i.isRtl) {\n yRailOffset.left =\n i.negativeScrollAdjustment +\n element.scrollLeft +\n i.containerWidth * 2 -\n i.contentWidth -\n i.scrollbarYLeft -\n i.scrollbarYOuterWidth;\n } else {\n yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;\n }\n }\n set(i.scrollbarYRail, yRailOffset);\n\n set(i.scrollbarX, {\n left: i.scrollbarXLeft,\n width: i.scrollbarXWidth - i.railBorderXWidth,\n });\n set(i.scrollbarY, {\n top: i.scrollbarYTop,\n height: i.scrollbarYHeight - i.railBorderYWidth,\n });\n}\n\nvar clickRail = function(i) {\n i.event.bind(i.scrollbarY, 'mousedown', function (e) { return e.stopPropagation(); });\n i.event.bind(i.scrollbarYRail, 'mousedown', function (e) {\n var positionTop =\n e.pageY -\n window.pageYOffset -\n i.scrollbarYRail.getBoundingClientRect().top;\n var direction = positionTop > i.scrollbarYTop ? 1 : -1;\n\n i.element.scrollTop += direction * i.containerHeight;\n updateGeometry(i);\n\n e.stopPropagation();\n });\n\n i.event.bind(i.scrollbarX, 'mousedown', function (e) { return e.stopPropagation(); });\n i.event.bind(i.scrollbarXRail, 'mousedown', function (e) {\n var positionLeft =\n e.pageX -\n window.pageXOffset -\n i.scrollbarXRail.getBoundingClientRect().left;\n var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;\n\n i.element.scrollLeft += direction * i.containerWidth;\n updateGeometry(i);\n\n e.stopPropagation();\n });\n};\n\nvar dragThumb = function(i) {\n bindMouseScrollHandler(i, [\n 'containerWidth',\n 'contentWidth',\n 'pageX',\n 'railXWidth',\n 'scrollbarX',\n 'scrollbarXWidth',\n 'scrollLeft',\n 'x' ]);\n bindMouseScrollHandler(i, [\n 'containerHeight',\n 'contentHeight',\n 'pageY',\n 'railYHeight',\n 'scrollbarY',\n 'scrollbarYHeight',\n 'scrollTop',\n 'y' ]);\n};\n\nfunction bindMouseScrollHandler(\n i,\n ref\n) {\n var containerHeight = ref[0];\n var contentHeight = ref[1];\n var pageY = ref[2];\n var railYHeight = ref[3];\n var scrollbarY = ref[4];\n var scrollbarYHeight = ref[5];\n var scrollTop = ref[6];\n var y = ref[7];\n\n var element = i.element;\n\n var startingScrollTop = null;\n var startingMousePageY = null;\n var scrollBy = null;\n\n function mouseMoveHandler(e) {\n element[scrollTop] =\n startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);\n addScrollingClass(i, y);\n updateGeometry(i);\n\n e.stopPropagation();\n e.preventDefault();\n }\n\n function mouseUpHandler() {\n removeScrollingClass(i, y);\n i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);\n }\n\n i.event.bind(i[scrollbarY], 'mousedown', function (e) {\n startingScrollTop = element[scrollTop];\n startingMousePageY = e[pageY];\n scrollBy =\n (i[contentHeight] - i[containerHeight]) /\n (i[railYHeight] - i[scrollbarYHeight]);\n\n i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);\n i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);\n\n e.stopPropagation();\n e.preventDefault();\n });\n}\n\nvar keyboard = function(i) {\n var element = i.element;\n\n var elementHovered = function () { return matches(element, ':hover'); };\n var scrollbarFocused = function () { return matches(i.scrollbarX, ':focus') || matches(i.scrollbarY, ':focus'); };\n\n function shouldPreventDefault(deltaX, deltaY) {\n var scrollTop = element.scrollTop;\n if (deltaX === 0) {\n if (!i.scrollbarYActive) {\n return false;\n }\n if (\n (scrollTop === 0 && deltaY > 0) ||\n (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)\n ) {\n return !i.settings.wheelPropagation;\n }\n }\n\n var scrollLeft = element.scrollLeft;\n if (deltaY === 0) {\n if (!i.scrollbarXActive) {\n return false;\n }\n if (\n (scrollLeft === 0 && deltaX < 0) ||\n (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)\n ) {\n return !i.settings.wheelPropagation;\n }\n }\n return true;\n }\n\n i.event.bind(i.ownerDocument, 'keydown', function (e) {\n if (\n (e.isDefaultPrevented && e.isDefaultPrevented()) ||\n e.defaultPrevented\n ) {\n return;\n }\n\n if (!elementHovered() && !scrollbarFocused()) {\n return;\n }\n\n var activeElement = document.activeElement\n ? document.activeElement\n : i.ownerDocument.activeElement;\n if (activeElement) {\n if (activeElement.tagName === 'IFRAME') {\n activeElement = activeElement.contentDocument.activeElement;\n } else {\n // go deeper if element is a webcomponent\n while (activeElement.shadowRoot) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n }\n if (isEditable(activeElement)) {\n return;\n }\n }\n\n var deltaX = 0;\n var deltaY = 0;\n\n switch (e.which) {\n case 37: // left\n if (e.metaKey) {\n deltaX = -i.contentWidth;\n } else if (e.altKey) {\n deltaX = -i.containerWidth;\n } else {\n deltaX = -30;\n }\n break;\n case 38: // up\n if (e.metaKey) {\n deltaY = i.contentHeight;\n } else if (e.altKey) {\n deltaY = i.containerHeight;\n } else {\n deltaY = 30;\n }\n break;\n case 39: // right\n if (e.metaKey) {\n deltaX = i.contentWidth;\n } else if (e.altKey) {\n deltaX = i.containerWidth;\n } else {\n deltaX = 30;\n }\n break;\n case 40: // down\n if (e.metaKey) {\n deltaY = -i.contentHeight;\n } else if (e.altKey) {\n deltaY = -i.containerHeight;\n } else {\n deltaY = -30;\n }\n break;\n case 32: // space bar\n if (e.shiftKey) {\n deltaY = i.containerHeight;\n } else {\n deltaY = -i.containerHeight;\n }\n break;\n case 33: // page up\n deltaY = i.containerHeight;\n break;\n case 34: // page down\n deltaY = -i.containerHeight;\n break;\n case 36: // home\n deltaY = i.contentHeight;\n break;\n case 35: // end\n deltaY = -i.contentHeight;\n break;\n default:\n return;\n }\n\n if (i.settings.suppressScrollX && deltaX !== 0) {\n return;\n }\n if (i.settings.suppressScrollY && deltaY !== 0) {\n return;\n }\n\n element.scrollTop -= deltaY;\n element.scrollLeft += deltaX;\n updateGeometry(i);\n\n if (shouldPreventDefault(deltaX, deltaY)) {\n e.preventDefault();\n }\n });\n};\n\nvar wheel = function(i) {\n var element = i.element;\n\n function shouldPreventDefault(deltaX, deltaY) {\n var isTop = element.scrollTop === 0;\n var isBottom =\n element.scrollTop + element.offsetHeight === element.scrollHeight;\n var isLeft = element.scrollLeft === 0;\n var isRight =\n element.scrollLeft + element.offsetWidth === element.offsetWidth;\n\n var hitsBound;\n\n // pick axis with primary direction\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n hitsBound = isTop || isBottom;\n } else {\n hitsBound = isLeft || isRight;\n }\n\n return hitsBound ? !i.settings.wheelPropagation : true;\n }\n\n function getDeltaFromEvent(e) {\n var deltaX = e.deltaX;\n var deltaY = -1 * e.deltaY;\n\n if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {\n // OS X Safari\n deltaX = -1 * e.wheelDeltaX / 6;\n deltaY = e.wheelDeltaY / 6;\n }\n\n if (e.deltaMode && e.deltaMode === 1) {\n // Firefox in deltaMode 1: Line scrolling\n deltaX *= 10;\n deltaY *= 10;\n }\n\n if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {\n // IE in some mouse drivers\n deltaX = 0;\n deltaY = e.wheelDelta;\n }\n\n if (e.shiftKey) {\n // reverse axis with shift key\n return [-deltaY, -deltaX];\n }\n return [deltaX, deltaY];\n }\n\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\n // FIXME: this is a workaround for \\n \\n \\n \\n\\n
\\n \\n
\\n \\n
\\n
\\n\\n \\n\\n
\\n \\n \\n \\n \\n
\\n\\n \\n\\n
\\n \\n \\n \\n \\n
\\n\\n
\\n \\n
\\n \\n\\n
\\n \\n
\\n \\n\\n\";\ngrafana_app_core_core_module__WEBPACK_IMPORTED_MODULE_0___default.a.directive('hasticGraphThresholdForm', function () {\n return {\n restrict: 'E',\n template: template,\n controller: ThresholdFormCtrl,\n bindToController: true,\n controllerAs: 'ctrl',\n scope: {\n panelCtrl: '=',\n },\n };\n});\n\n\n//# sourceURL=webpack:///./thresholds_form.ts?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.crosshair.js": +/*!**********************************************!*\ + !*** ./vendor/flot/jquery.flot.crosshair.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/* Flot plugin for showing crosshairs when the mouse hovers over the plot.\n\nCopyright (c) 2007-2014 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nThe plugin supports these options:\n\n\tcrosshair: {\n\t\tmode: null or \"x\" or \"y\" or \"xy\"\n\t\tcolor: color\n\t\tlineWidth: number\n\t}\n\nSet the mode to one of \"x\", \"y\" or \"xy\". The \"x\" mode enables a vertical\ncrosshair that lets you trace the values on the x axis, \"y\" enables a\nhorizontal crosshair and \"xy\" enables them both. \"color\" is the color of the\ncrosshair (default is \"rgba(170, 0, 0, 0.80)\"), \"lineWidth\" is the width of\nthe drawn lines (default is 1).\n\nThe plugin also adds four public methods:\n\n - setCrosshair( pos )\n\n Set the position of the crosshair. Note that this is cleared if the user\n moves the mouse. \"pos\" is in coordinates of the plot and should be on the\n form { x: xpos, y: ypos } (you can use x2/x3/... if you're using multiple\n axes), which is coincidentally the same format as what you get from a\n \"plothover\" event. If \"pos\" is null, the crosshair is cleared.\n\n - clearCrosshair()\n\n Clear the crosshair.\n\n - lockCrosshair(pos)\n\n Cause the crosshair to lock to the current location, no longer updating if\n the user moves the mouse. Optionally supply a position (passed on to\n setCrosshair()) to move it to.\n\n Example usage:\n\n\tvar myFlot = $.plot( $(\"#graph\"), ..., { crosshair: { mode: \"x\" } } };\n\t$(\"#graph\").bind( \"plothover\", function ( evt, position, item ) {\n\t\tif ( item ) {\n\t\t\t// Lock the crosshair to the data point being hovered\n\t\t\tmyFlot.lockCrosshair({\n\t\t\t\tx: item.datapoint[ 0 ],\n\t\t\t\ty: item.datapoint[ 1 ]\n\t\t\t});\n\t\t} else {\n\t\t\t// Return normal crosshair operation\n\t\t\tmyFlot.unlockCrosshair();\n\t\t}\n\t});\n\n - unlockCrosshair()\n\n Free the crosshair to move again after locking it.\n*/\n\n(function ($) {\n var options = {\n crosshair: {\n mode: null, // one of null, \"x\", \"y\" or \"xy\",\n color: \"rgba(170, 0, 0, 0.80)\",\n lineWidth: 1\n }\n };\n \n function init(plot) {\n // position of crosshair in pixels\n var crosshair = { x: -1, y: -1, locked: false };\n\n plot.setCrosshair = function setCrosshair(pos) {\n if (!pos)\n crosshair.x = -1;\n else {\n var o = plot.p2c(pos);\n crosshair.x = Math.max(0, Math.min(o.left, plot.width()));\n crosshair.y = Math.max(0, Math.min(o.top, plot.height()));\n }\n \n plot.triggerRedrawOverlay();\n };\n \n plot.clearCrosshair = plot.setCrosshair; // passes null for pos\n \n plot.lockCrosshair = function lockCrosshair(pos) {\n if (pos)\n plot.setCrosshair(pos);\n crosshair.locked = true;\n };\n\n plot.unlockCrosshair = function unlockCrosshair() {\n crosshair.locked = false;\n };\n\n function onMouseOut(e) {\n if (crosshair.locked)\n return;\n\n if (crosshair.x != -1) {\n crosshair.x = -1;\n plot.triggerRedrawOverlay();\n }\n }\n\n function onMouseMove(e) {\n if (crosshair.locked)\n return;\n \n if (plot.getSelection && plot.getSelection()) {\n crosshair.x = -1; // hide the crosshair while selecting\n return;\n }\n \n var offset = plot.offset();\n crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));\n crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));\n plot.triggerRedrawOverlay();\n }\n \n plot.hooks.bindEvents.push(function (plot, eventHolder) {\n if (!plot.getOptions().crosshair.mode)\n return;\n\n eventHolder.mouseout(onMouseOut);\n eventHolder.mousemove(onMouseMove);\n });\n\n plot.hooks.drawOverlay.push(function (plot, ctx) {\n var c = plot.getOptions().crosshair;\n if (!c.mode)\n return;\n\n var plotOffset = plot.getPlotOffset();\n \n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n if (crosshair.x != -1) {\n var adj = plot.getOptions().crosshair.lineWidth % 2 ? 0.5 : 0;\n\n ctx.strokeStyle = c.color;\n ctx.lineWidth = c.lineWidth;\n ctx.lineJoin = \"round\";\n\n ctx.beginPath();\n if (c.mode.indexOf(\"x\") != -1) {\n var drawX = Math.floor(crosshair.x) + adj;\n ctx.moveTo(drawX, 0);\n ctx.lineTo(drawX, plot.height());\n }\n if (c.mode.indexOf(\"y\") != -1) {\n var drawY = Math.floor(crosshair.y) + adj;\n ctx.moveTo(0, drawY);\n ctx.lineTo(plot.width(), drawY);\n }\n ctx.stroke();\n }\n ctx.restore();\n });\n\n plot.hooks.shutdown.push(function (plot, eventHolder) {\n eventHolder.unbind(\"mouseout\", onMouseOut);\n eventHolder.unbind(\"mousemove\", onMouseMove);\n });\n }\n \n $.plot.plugins.push({\n init: init,\n options: options,\n name: 'crosshair',\n version: '1.0'\n });\n})(jQuery);\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.crosshair.js?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.dashes.js": +/*!*******************************************!*\ + !*** ./vendor/flot/jquery.flot.dashes.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/*\n * jQuery.flot.dashes\n *\n * options = {\n * series: {\n * dashes: {\n *\n * // show\n * // default: false\n * // Whether to show dashes for the series.\n * show: ,\n *\n * // lineWidth\n * // default: 2\n * // The width of the dashed line in pixels.\n * lineWidth: ,\n *\n * // dashLength\n * // default: 10\n * // Controls the length of the individual dashes and the amount of\n * // space between them.\n * // If this is a number, the dashes and spaces will have that length.\n * // If this is an array, it is read as [ dashLength, spaceLength ]\n * dashLength: or \n * }\n * }\n * }\n */\n(function($){\n\n function init(plot) {\n\n plot.hooks.processDatapoints.push(function(plot, series, datapoints) {\n\n if (!series.dashes.show) return;\n\n plot.hooks.draw.push(function(plot, ctx) {\n\n var plotOffset = plot.getPlotOffset(),\n axisx = series.xaxis,\n axisy = series.yaxis;\n\n function plotDashes(xoffset, yoffset) {\n\n var points = datapoints.points,\n ps = datapoints.pointsize,\n prevx = null,\n prevy = null,\n dashRemainder = 0,\n dashOn = true,\n dashOnLength,\n dashOffLength;\n\n if (series.dashes.dashLength[0]) {\n dashOnLength = series.dashes.dashLength[0];\n if (series.dashes.dashLength[1]) {\n dashOffLength = series.dashes.dashLength[1];\n } else {\n dashOffLength = dashOnLength;\n }\n } else {\n dashOffLength = dashOnLength = series.dashes.dashLength;\n }\n\n ctx.beginPath();\n\n for (var i = ps; i < points.length; i += ps) {\n\n var x1 = points[i - ps],\n y1 = points[i - ps + 1],\n x2 = points[i],\n y2 = points[i + 1];\n\n if (x1 == null || x2 == null) continue;\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min) {\n if (y2 < axisy.min) continue; // line segment is outside\n // compute new intersection point\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n } else if (y2 <= y1 && y2 < axisy.min) {\n if (y1 < axisy.min) continue;\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max) {\n if (y2 > axisy.max) continue;\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n } else if (y2 >= y1 && y2 > axisy.max) {\n if (y1 > axisy.max) continue;\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min) continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n } else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min) continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max) continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n } else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max) continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (x1 != prevx || y1 != prevy) {\n ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);\n }\n\n var ax1 = axisx.p2c(x1) + xoffset,\n ay1 = axisy.p2c(y1) + yoffset,\n ax2 = axisx.p2c(x2) + xoffset,\n ay2 = axisy.p2c(y2) + yoffset,\n dashOffset;\n\n function lineSegmentOffset(segmentLength) {\n\n var c = Math.sqrt(Math.pow(ax2 - ax1, 2) + Math.pow(ay2 - ay1, 2));\n\n if (c <= segmentLength) {\n return {\n deltaX: ax2 - ax1,\n deltaY: ay2 - ay1,\n distance: c,\n remainder: segmentLength - c\n }\n } else {\n var xsign = ax2 > ax1 ? 1 : -1,\n ysign = ay2 > ay1 ? 1 : -1;\n return {\n deltaX: xsign * Math.sqrt(Math.pow(segmentLength, 2) / (1 + Math.pow((ay2 - ay1)/(ax2 - ax1), 2))),\n deltaY: ysign * Math.sqrt(Math.pow(segmentLength, 2) - Math.pow(segmentLength, 2) / (1 + Math.pow((ay2 - ay1)/(ax2 - ax1), 2))),\n distance: segmentLength,\n remainder: 0\n };\n }\n }\n //-end lineSegmentOffset\n\n do {\n\n dashOffset = lineSegmentOffset(\n dashRemainder > 0 ? dashRemainder :\n dashOn ? dashOnLength : dashOffLength);\n\n if (dashOffset.deltaX != 0 || dashOffset.deltaY != 0) {\n if (dashOn) {\n ctx.lineTo(ax1 + dashOffset.deltaX, ay1 + dashOffset.deltaY);\n } else {\n ctx.moveTo(ax1 + dashOffset.deltaX, ay1 + dashOffset.deltaY);\n }\n }\n\n dashOn = !dashOn;\n dashRemainder = dashOffset.remainder;\n ax1 += dashOffset.deltaX;\n ay1 += dashOffset.deltaY;\n\n } while (dashOffset.distance > 0);\n\n prevx = x2;\n prevy = y2;\n }\n\n ctx.stroke();\n }\n //-end plotDashes\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n ctx.lineJoin = 'round';\n\n var lw = series.dashes.lineWidth,\n sw = series.shadowSize;\n\n // FIXME: consider another form of shadow when filling is turned on\n if (lw > 0 && sw > 0) {\n // draw shadow as a thick and thin line with transparency\n ctx.lineWidth = sw;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n // position shadow at angle from the mid of line\n var angle = Math.PI/18;\n plotDashes(Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2));\n ctx.lineWidth = sw/2;\n plotDashes(Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4));\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n\n if (lw > 0) {\n plotDashes(0, 0);\n }\n\n ctx.restore();\n\n });\n //-end draw hook\n\n });\n //-end processDatapoints hook\n\n }\n //-end init\n\n $.plot.plugins.push({\n init: init,\n options: {\n series: {\n dashes: {\n show: false,\n lineWidth: 2,\n dashLength: 10\n }\n }\n },\n name: 'dashes',\n version: '0.1'\n });\n\n})(jQuery)\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.dashes.js?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.events.js": +/*!*******************************************!*\ + !*** ./vendor/flot/jquery.flot.events.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [\n __webpack_require__(/*! jquery */ \"jquery\"),\n __webpack_require__(/*! lodash */ \"lodash\"),\n __webpack_require__(/*! angular */ \"angular\"),\n __webpack_require__(/*! tether-drop */ \"../node_modules/tether-drop/dist/js/drop.js\"),\n], __WEBPACK_AMD_DEFINE_RESULT__ = (function ($, _, angular, Drop) {\n 'use strict';\n\n function createAnnotationToolip(element, event, plot) {\n var injector = angular.element(document).injector();\n var content = document.createElement('div');\n content.innerHTML = '';\n\n injector.invoke([\"$compile\", \"$rootScope\", function($compile, $rootScope) {\n var eventManager = plot.getOptions().events.manager;\n var tmpScope = $rootScope.$new(true);\n tmpScope.event = event;\n tmpScope.onEdit = function() {\n eventManager.editEvent(event);\n };\n\n $compile(content)(tmpScope);\n tmpScope.$digest();\n tmpScope.$destroy();\n\n var drop = new Drop({\n target: element[0],\n content: content,\n position: \"bottom center\",\n classes: 'drop-popover drop-popover--annotation',\n openOn: 'hover',\n hoverCloseDelay: 200,\n tetherOptions: {\n constraints: [{to: 'window', pin: true, attachment: \"both\"}]\n }\n });\n\n drop.open();\n\n drop.on('close', function() {\n setTimeout(function() {\n drop.destroy();\n });\n });\n }]);\n }\n\n var markerElementToAttachTo = null;\n\n function createEditPopover(element, event, plot) {\n var eventManager = plot.getOptions().events.manager;\n if (eventManager.editorOpen) {\n // update marker element to attach to (needed in case of legend on the right\n // when there is a double render pass and the inital marker element is removed)\n markerElementToAttachTo = element;\n return;\n }\n\n // mark as openend\n eventManager.editorOpened();\n // set marker elment to attache to\n markerElementToAttachTo = element;\n\n // wait for element to be attached and positioned\n setTimeout(function() {\n\n var injector = angular.element(document).injector();\n var content = document.createElement('div');\n content.innerHTML = '';\n\n injector.invoke([\"$compile\", \"$rootScope\", function($compile, $rootScope) {\n var scope = $rootScope.$new(true);\n var drop;\n\n scope.event = event;\n scope.panelCtrl = eventManager.panelCtrl;\n scope.close = function() {\n drop.close();\n };\n\n $compile(content)(scope);\n scope.$digest();\n\n drop = new Drop({\n target: markerElementToAttachTo[0],\n content: content,\n position: \"bottom center\",\n classes: 'drop-popover drop-popover--form',\n openOn: 'click',\n tetherOptions: {\n constraints: [{to: 'window', pin: true, attachment: \"both\"}]\n }\n });\n\n drop.open();\n eventManager.editorOpened();\n\n drop.on('close', function() {\n // need timeout here in order call drop.destroy\n setTimeout(function() {\n eventManager.editorClosed();\n scope.$destroy();\n drop.destroy();\n });\n });\n }]);\n\n }, 100);\n }\n\n /*\n * jquery.flot.events\n *\n * description: Flot plugin for adding events/markers to the plot\n * version: 0.2.5\n * authors:\n * Alexander Wunschik \n * Joel Oughton \n * Nicolas Joseph \n *\n * website: https://github.com/mojoaxel/flot-events\n *\n * released under MIT License and GPLv2+\n */\n\n /**\n * A class that allows for the drawing an remove of some object\n */\n var DrawableEvent = function(object, drawFunc, clearFunc, moveFunc, left, top, width, height) {\n var _object = object;\n var\t_drawFunc = drawFunc;\n var\t_clearFunc = clearFunc;\n var\t_moveFunc = moveFunc;\n var\t_position = { left: left, top: top };\n var\t_width = width;\n var\t_height = height;\n\n this.width = function() { return _width; };\n this.height = function() { return _height; };\n this.position = function() { return _position; };\n this.draw = function() { _drawFunc(_object); };\n this.clear = function() { _clearFunc(_object); };\n this.getObject = function() { return _object; };\n this.moveTo = function(position) {\n _position = position;\n _moveFunc(_object, _position);\n };\n };\n\n /**\n * Event class that stores options (eventType, min, max, title, description) and the object to draw.\n */\n var VisualEvent = function(options, drawableEvent) {\n var _parent;\n var _options = options;\n var _drawableEvent = drawableEvent;\n var _hidden = false;\n\n this.visual = function() { return _drawableEvent; };\n this.getOptions = function() { return _options; };\n this.getParent = function() { return _parent; };\n this.isHidden = function() { return _hidden; };\n this.hide = function() { _hidden = true; };\n this.unhide = function() { _hidden = false; };\n };\n\n /**\n * A Class that handles the event-markers inside the given plot\n */\n var EventMarkers = function(plot) {\n var _events = [];\n\n this._types = [];\n this._plot = plot;\n this.eventsEnabled = false;\n\n this.getEvents = function() {\n return _events;\n };\n\n this.setTypes = function(types) {\n return this._types = types;\n };\n\n /**\n * create internal objects for the given events\n */\n this.setupEvents = function(events) {\n var that = this;\n var parts = _.partition(events, 'isRegion');\n var regions = parts[0];\n events = parts[1];\n\n $.each(events, function(index, event) {\n var ve = new VisualEvent(event, that._buildDiv(event));\n _events.push(ve);\n });\n\n $.each(regions, function (index, event) {\n var vre = new VisualEvent(event, that._buildRegDiv(event));\n _events.push(vre);\n });\n\n _events.sort(function(a, b) {\n var ao = a.getOptions(), bo = b.getOptions();\n if (ao.min > bo.min) { return 1; }\n if (ao.min < bo.min) { return -1; }\n return 0;\n });\n };\n\n /**\n * draw the events to the plot\n */\n this.drawEvents = function() {\n var that = this;\n // var o = this._plot.getPlotOffset();\n\n $.each(_events, function(index, event) {\n // check event is inside the graph range\n if (that._insidePlot(event.getOptions().min) && !event.isHidden()) {\n event.visual().draw();\n } else {\n event.visual().getObject().hide();\n }\n });\n };\n\n /**\n * update the position of the event-markers (e.g. after scrolling or zooming)\n */\n this.updateEvents = function() {\n var that = this;\n var o = this._plot.getPlotOffset(), left, top;\n var xaxis = this._plot.getXAxes()[this._plot.getOptions().events.xaxis - 1];\n\n $.each(_events, function(index, event) {\n top = o.top + that._plot.height() - event.visual().height();\n left = xaxis.p2c(event.getOptions().min) + o.left - event.visual().width() / 2;\n event.visual().moveTo({ top: top, left: left });\n });\n };\n\n /**\n * remove all events from the plot\n */\n this._clearEvents = function() {\n $.each(_events, function(index, val) {\n val.visual().clear();\n });\n _events = [];\n };\n\n /**\n * create a DOM element for the given event\n */\n this._buildDiv = function(event) {\n var that = this;\n\n var container = this._plot.getPlaceholder();\n var o = this._plot.getPlotOffset();\n var axes = this._plot.getAxes();\n var xaxis = this._plot.getXAxes()[this._plot.getOptions().events.xaxis - 1];\n var yaxis, top, left, color, markerSize, markerShow, lineStyle, lineWidth;\n var markerTooltip;\n\n // determine the y axis used\n if (axes.yaxis && axes.yaxis.used) { yaxis = axes.yaxis; }\n if (axes.yaxis2 && axes.yaxis2.used) { yaxis = axes.yaxis2; }\n\n // map the eventType to a types object\n var eventTypeId = event.eventType;\n\n if (this._types === null || !this._types[eventTypeId] || !this._types[eventTypeId].color) {\n color = '#666';\n } else {\n color = this._types[eventTypeId].color;\n }\n\n if (this._types === null || !this._types[eventTypeId] || !this._types[eventTypeId].markerSize) {\n markerSize = 8; //default marker size\n } else {\n markerSize = this._types[eventTypeId].markerSize;\n }\n\n if (this._types === null || !this._types[eventTypeId] || this._types[eventTypeId].markerShow === undefined) {\n markerShow = true;\n } else {\n markerShow = this._types[eventTypeId].markerShow;\n }\n\n if (this._types === null || !this._types[eventTypeId] || this._types[eventTypeId].markerTooltip === undefined) {\n markerTooltip = true;\n } else {\n markerTooltip = this._types[eventTypeId].markerTooltip;\n }\n\n if (this._types == null || !this._types[eventTypeId] || !this._types[eventTypeId].lineStyle) {\n lineStyle = 'dashed'; //default line style\n } else {\n lineStyle = this._types[eventTypeId].lineStyle.toLowerCase();\n }\n\n if (this._types == null || !this._types[eventTypeId] || this._types[eventTypeId].lineWidth === undefined) {\n lineWidth = 1; //default line width\n } else {\n lineWidth = this._types[eventTypeId].lineWidth;\n }\n\n var topOffset = xaxis.options.eventSectionHeight || 0;\n topOffset = topOffset / 3;\n\n top = o.top + this._plot.height() + topOffset;\n left = xaxis.p2c(event.min) + o.left;\n\n var line = $('
').css({\n \"position\": \"absolute\",\n \"opacity\": 0.8,\n \"left\": left + 'px',\n \"top\": 8,\n \"width\": lineWidth + \"px\",\n \"height\": this._plot.height() + topOffset * 0.8,\n \"border-left-width\": lineWidth + \"px\",\n \"border-left-style\": lineStyle,\n \"border-left-color\": color,\n \"color\": color\n })\n .appendTo(container);\n\n if (markerShow) {\n var marker = $('
').css({\n \"position\": \"absolute\",\n \"left\": (-markerSize - Math.round(lineWidth / 2)) + \"px\",\n \"font-size\": 0,\n \"line-height\": 0,\n \"width\": 0,\n \"height\": 0,\n \"border-left\": markerSize+\"px solid transparent\",\n \"border-right\": markerSize+\"px solid transparent\"\n });\n\n marker.appendTo(line);\n\n if (this._types[eventTypeId] && this._types[eventTypeId].position && this._types[eventTypeId].position.toUpperCase() === 'BOTTOM') {\n marker.css({\n \"top\": top-markerSize-8 +\"px\",\n \"border-top\": \"none\",\n \"border-bottom\": markerSize+\"px solid \" + color\n });\n } else {\n marker.css({\n \"top\": \"0px\",\n \"border-top\": markerSize+\"px solid \" + color,\n \"border-bottom\": \"none\"\n });\n }\n\n marker.data({\n \"event\": event\n });\n\n var mouseenter = function() {\n createAnnotationToolip(marker, $(this).data(\"event\"), that._plot);\n };\n\n if (event.editModel) {\n createEditPopover(marker, event.editModel, that._plot);\n }\n\n var mouseleave = function() {\n that._plot.clearSelection();\n };\n\n if (markerTooltip) {\n marker.css({ \"cursor\": \"help\" });\n marker.hover(mouseenter, mouseleave);\n }\n }\n\n var drawableEvent = new DrawableEvent(\n line,\n function drawFunc(obj) { obj.show(); },\n function(obj) { obj.remove(); },\n function(obj, position) {\n obj.css({\n top: position.top,\n left: position.left\n });\n },\n left,\n top,\n line.width(),\n line.height()\n );\n\n return drawableEvent;\n };\n\n /**\n * create a DOM element for the given region\n */\n this._buildRegDiv = function (event) {\n var that = this;\n\n var container = this._plot.getPlaceholder();\n var o = this._plot.getPlotOffset();\n var axes = this._plot.getAxes();\n var xaxis = this._plot.getXAxes()[this._plot.getOptions().events.xaxis - 1];\n var yaxis, top, left, lineWidth, regionWidth, lineStyle, color, markerTooltip;\n\n // determine the y axis used\n if (axes.yaxis && axes.yaxis.used) { yaxis = axes.yaxis; }\n if (axes.yaxis2 && axes.yaxis2.used) { yaxis = axes.yaxis2; }\n\n // map the eventType to a types object\n var eventTypeId = event.eventType;\n\n if (this._types === null || !this._types[eventTypeId] || !this._types[eventTypeId].color) {\n color = '#666';\n } else {\n color = this._types[eventTypeId].color;\n }\n\n if (this._types === null || !this._types[eventTypeId] || this._types[eventTypeId].markerTooltip === undefined) {\n markerTooltip = true;\n } else {\n markerTooltip = this._types[eventTypeId].markerTooltip;\n }\n\n if (this._types == null || !this._types[eventTypeId] || this._types[eventTypeId].lineWidth === undefined) {\n lineWidth = 1; //default line width\n } else {\n lineWidth = this._types[eventTypeId].lineWidth;\n }\n\n if (this._types == null || !this._types[eventTypeId] || !this._types[eventTypeId].lineStyle) {\n lineStyle = 'dashed'; //default line style\n } else {\n lineStyle = this._types[eventTypeId].lineStyle.toLowerCase();\n }\n\n var topOffset = 2;\n top = o.top + this._plot.height() + topOffset;\n\n var timeFrom = Math.min(event.min, event.timeEnd);\n var timeTo = Math.max(event.min, event.timeEnd);\n left = xaxis.p2c(timeFrom) + o.left;\n var right = xaxis.p2c(timeTo) + o.left;\n regionWidth = right - left;\n\n _.each([left, right], function(position) {\n var line = $('
').css({\n \"position\": \"absolute\",\n \"opacity\": 0.8,\n \"left\": position + 'px',\n \"top\": 8,\n \"width\": lineWidth + \"px\",\n \"height\": that._plot.height() + topOffset,\n \"border-left-width\": lineWidth + \"px\",\n \"border-left-style\": lineStyle,\n \"border-left-color\": color,\n \"color\": color\n });\n line.appendTo(container);\n });\n\n var region = $('
').css({\n \"position\": \"absolute\",\n \"opacity\": 0.5,\n \"left\": left + 'px',\n \"top\": top,\n \"width\": Math.round(regionWidth + lineWidth) + \"px\",\n \"height\": \"0.5rem\",\n \"border-left-color\": color,\n \"color\": color,\n \"background-color\": color\n });\n region.appendTo(container);\n\n region.data({\n \"event\": event\n });\n\n var mouseenter = function () {\n createAnnotationToolip(region, $(this).data(\"event\"), that._plot);\n };\n\n if (event.editModel) {\n createEditPopover(region, event.editModel, that._plot);\n }\n\n var mouseleave = function () {\n that._plot.clearSelection();\n };\n\n if (markerTooltip) {\n region.css({ \"cursor\": \"help\" });\n region.hover(mouseenter, mouseleave);\n }\n\n var drawableEvent = new DrawableEvent(\n region,\n function drawFunc(obj) { obj.show(); },\n function (obj) { obj.remove(); },\n function (obj, position) {\n obj.css({\n top: position.top,\n left: position.left\n });\n },\n left,\n top,\n region.width(),\n region.height()\n );\n\n return drawableEvent;\n };\n\n /**\n * check if the event is inside visible range\n */\n this._insidePlot = function(x) {\n var xaxis = this._plot.getXAxes()[this._plot.getOptions().events.xaxis - 1];\n var xc = xaxis.p2c(x);\n return xc > 0 && xc < xaxis.p2c(xaxis.max);\n };\n };\n\n /**\n * initialize the plugin for the given plot\n */\n function init(plot) {\n /*jshint validthis:true */\n var that = this;\n var eventMarkers = new EventMarkers(plot);\n\n plot.getEvents = function() {\n return eventMarkers._events;\n };\n\n plot.hideEvents = function() {\n $.each(eventMarkers._events, function(index, event) {\n event.visual().getObject().hide();\n });\n };\n\n plot.showEvents = function() {\n plot.hideEvents();\n $.each(eventMarkers._events, function(index, event) {\n event.hide();\n });\n\n that.eventMarkers.drawEvents();\n };\n\n // change events on an existing plot\n plot.setEvents = function(events) {\n if (eventMarkers.eventsEnabled) {\n eventMarkers.setupEvents(events);\n }\n };\n\n plot.hooks.processOptions.push(function(plot, options) {\n // enable the plugin\n if (options.events.data != null) {\n eventMarkers.eventsEnabled = true;\n }\n });\n\n plot.hooks.draw.push(function(plot) {\n var options = plot.getOptions();\n\n if (eventMarkers.eventsEnabled) {\n // check for first run\n if (eventMarkers.getEvents().length < 1) {\n eventMarkers.setTypes(options.events.types);\n eventMarkers.setupEvents(options.events.data);\n } else {\n eventMarkers.updateEvents();\n }\n }\n\n eventMarkers.drawEvents();\n });\n }\n\n var defaultOptions = {\n events: {\n data: null,\n types: null,\n xaxis: 1,\n position: 'BOTTOM'\n }\n };\n\n $.plot.plugins.push({\n init: init,\n options: defaultOptions,\n name: \"events\",\n version: \"0.2.5\"\n });\n}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.events.js?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.fillbelow.js": +/*!**********************************************!*\ + !*** ./vendor/flot/jquery.flot.fillbelow.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function($) {\n \"use strict\";\n\n var options = {\n series: {\n fillBelowTo: null\n }\n };\n\n function init(plot) {\n function findBelowSeries( series, allseries ) {\n\n var i;\n\n for ( i = 0; i < allseries.length; ++i ) {\n if ( allseries[ i ].id === series.fillBelowTo ) {\n return allseries[ i ];\n }\n }\n\n return null;\n }\n\n /* top and bottom doesn't actually matter for this, we're just using it to help make this easier to think about */\n /* this is a vector cross product operation */\n function segmentIntersection(top_left_x, top_left_y, top_right_x, top_right_y, bottom_left_x, bottom_left_y, bottom_right_x, bottom_right_y) {\n var top_delta_x, top_delta_y, bottom_delta_x, bottom_delta_y,\n s, t;\n\n top_delta_x = top_right_x - top_left_x;\n top_delta_y = top_right_y - top_left_y;\n bottom_delta_x = bottom_right_x - bottom_left_x;\n bottom_delta_y = bottom_right_y - bottom_left_y;\n\n s = (\n (-top_delta_y * (top_left_x - bottom_left_x)) + (top_delta_x * (top_left_y - bottom_left_y))\n ) / (\n -bottom_delta_x * top_delta_y + top_delta_x * bottom_delta_y\n );\n\n t = (\n (bottom_delta_x * (top_left_y - bottom_left_y)) - (bottom_delta_y * (top_left_x - bottom_left_x))\n ) / (\n -bottom_delta_x * top_delta_y + top_delta_x * bottom_delta_y\n );\n\n // Collision detected\n if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {\n return [\n top_left_x + (t * top_delta_x), // X\n top_left_y + (t * top_delta_y) // Y\n ];\n }\n\n // No collision\n return null;\n }\n\n function plotDifferenceArea(plot, ctx, series) {\n if ( series.fillBelowTo === null ) {\n return;\n }\n\n var otherseries,\n\n ps,\n points,\n\n otherps,\n otherpoints,\n\n plotOffset,\n fillStyle;\n\n function openPolygon(x, y) {\n ctx.beginPath();\n ctx.moveTo(\n series.xaxis.p2c(x) + plotOffset.left,\n series.yaxis.p2c(y) + plotOffset.top\n );\n\n }\n\n function closePolygon() {\n ctx.closePath();\n ctx.fill();\n }\n\n function validateInput() {\n if (points.length/ps !== otherpoints.length/otherps) {\n console.error(\"Refusing to graph inconsistent number of points\");\n return false;\n }\n\n var i;\n for (i = 0; i < (points.length / ps); i++) {\n if (\n points[i * ps] !== null &&\n otherpoints[i * otherps] !== null &&\n points[i * ps] !== otherpoints[i * otherps]\n ) {\n console.error(\"Refusing to graph points without matching value\");\n return false;\n }\n }\n\n return true;\n }\n\n function findNextStart(start_i, end_i) {\n console.assert(end_i > start_i, \"expects the end index to be greater than the start index\");\n\n var start = (\n start_i === 0 ||\n points[start_i - 1] === null ||\n otherpoints[start_i - 1] === null\n ),\n equal = false,\n i,\n intersect;\n\n for (i = start_i; i < end_i; i++) {\n // Take note of null points\n if (\n points[(i * ps) + 1] === null ||\n otherpoints[(i * ps) + 1] === null\n ) {\n equal = false;\n start = true;\n }\n\n // Take note of equal points\n else if (points[(i * ps) + 1] === otherpoints[(i * otherps) + 1]) {\n equal = true;\n start = false;\n }\n\n\n else if (points[(i * ps) + 1] > otherpoints[(i * otherps) + 1]) {\n // If we begin above the desired point\n if (start) {\n openPolygon(points[i * ps], points[(i * ps) + 1]);\n }\n\n // If an equal point preceeds this, start the polygon at that equal point\n else if (equal) {\n openPolygon(points[(i - 1) * ps], points[((i - 1) * ps) + 1]);\n }\n\n // Otherwise, find the intersection point, and start it there\n else {\n intersect = intersectionPoint(i);\n openPolygon(intersect[0], intersect[1]);\n }\n\n topTraversal(i, end_i);\n return;\n }\n\n // If we go below equal, equal at any preceeding point is irrelevant\n else {\n start = false;\n equal = false;\n }\n }\n }\n\n function intersectionPoint(right_i) {\n console.assert(right_i > 0, \"expects the second point in the series line segment\");\n\n var i, intersect;\n\n for (i = 1; i < (otherpoints.length/otherps); i++) {\n intersect = segmentIntersection(\n points[(right_i - 1) * ps], points[((right_i - 1) * ps) + 1],\n points[right_i * ps], points[(right_i * ps) + 1],\n\n otherpoints[(i - 1) * otherps], otherpoints[((i - 1) * otherps) + 1],\n otherpoints[i * otherps], otherpoints[(i * otherps) + 1]\n );\n\n if (intersect !== null) {\n return intersect;\n }\n }\n\n console.error(\"intersectionPoint() should only be called when an intersection happens\");\n }\n\n function bottomTraversal(start_i, end_i) {\n console.assert(start_i >= end_i, \"the start should be the rightmost point, and the end should be the leftmost (excluding the equal or intersecting point)\");\n\n var i;\n\n for (i = start_i; i >= end_i; i--) {\n ctx.lineTo(\n otherseries.xaxis.p2c(otherpoints[i * otherps]) + plotOffset.left,\n otherseries.yaxis.p2c(otherpoints[(i * otherps) + 1]) + plotOffset.top\n );\n }\n\n closePolygon();\n }\n\n function topTraversal(start_i, end_i) {\n console.assert(start_i <= end_i, \"the start should be the rightmost point, and the end should be the leftmost (excluding the equal or intersecting point)\");\n\n var i,\n intersect;\n\n for (i = start_i; i < end_i; i++) {\n if (points[(i * ps) + 1] === null && i > start_i) {\n bottomTraversal(i - 1, start_i);\n findNextStart(i, end_i);\n return;\n }\n\n else if (points[(i * ps) + 1] === otherpoints[(i * otherps) + 1]) {\n bottomTraversal(i, start_i);\n findNextStart(i, end_i);\n return;\n }\n\n else if (points[(i * ps) + 1] < otherpoints[(i * otherps) + 1]) {\n intersect = intersectionPoint(i);\n ctx.lineTo(\n series.xaxis.p2c(intersect[0]) + plotOffset.left,\n series.yaxis.p2c(intersect[1]) + plotOffset.top\n );\n bottomTraversal(i, start_i);\n findNextStart(i, end_i);\n return;\n\n }\n\n else {\n ctx.lineTo(\n series.xaxis.p2c(points[i * ps]) + plotOffset.left,\n series.yaxis.p2c(points[(i * ps) + 1]) + plotOffset.top\n );\n }\n }\n\n bottomTraversal(end_i, start_i);\n }\n\n\n // Begin processing\n\n otherseries = findBelowSeries( series, plot.getData() );\n\n if ( !otherseries ) {\n return;\n }\n\n ps = series.datapoints.pointsize;\n points = series.datapoints.points;\n otherps = otherseries.datapoints.pointsize;\n otherpoints = otherseries.datapoints.points;\n plotOffset = plot.getPlotOffset();\n\n if (!validateInput()) {\n return;\n }\n\n\n // Flot's getFillStyle() should probably be exposed somewhere\n fillStyle = $.color.parse(series.color);\n fillStyle.a = 0.4;\n fillStyle.normalize();\n ctx.fillStyle = fillStyle.toString();\n\n\n // Begin recursive bi-directional traversal\n findNextStart(0, points.length/ps);\n }\n\n plot.hooks.drawSeries.push(plotDifferenceArea);\n }\n\n $.plot.plugins.push({\n init: init,\n options: options,\n name: \"fillbelow\",\n version: \"0.1.0\"\n });\n\n})(jQuery);\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.fillbelow.js?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.js": +/*!************************************!*\ + !*** ./vendor/flot/jquery.flot.js ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/* Javascript plotting library for jQuery, version 0.8.3.\n\nCopyright (c) 2007-2014 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\n*/\n\n// first an inline dependency, jquery.colorhelpers.js, we inline it here\n// for convenience\n\n/* Plugin for jQuery for working with colors.\n *\n * Version 1.1.\n *\n * Inspiration from jQuery color animation plugin by John Resig.\n *\n * Released under the MIT license by Ole Laursen, October 2009.\n *\n * Examples:\n *\n * $.color.parse(\"#fff\").scale('rgb', 0.25).add('a', -0.5).toString()\n * var c = $.color.extract($(\"#mydiv\"), 'background-color');\n * console.log(c.r, c.g, c.b, c.a);\n * $.color.make(100, 50, 25, 0.4).toString() // returns \"rgba(100,50,25,0.4)\"\n *\n * Note that .scale() and .add() return the same modified object\n * instead of making a new one.\n *\n * V. 1.1: Fix error handling so e.g. parsing an empty string does\n * produce a color rather than just crashing.\n */\n(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i=1){return\"rgb(\"+[o.r,o.g,o.b].join(\",\")+\")\"}else{return\"rgba(\"+[o.r,o.g,o.b,o.a].join(\",\")+\")\"}};o.normalize=function(){function clamp(min,value,max){return valuemax?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=\"\"&&c!=\"transparent\")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),\"body\"));if(c==\"rgba(0, 0, 0, 0)\")c=\"transparent\";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name==\"transparent\")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],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],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);\n\n// the actual Flot code\n(function($) {\n\n\t// Cache the prototype hasOwnProperty for faster access\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n // A shim to provide 'detach' to jQuery versions prior to 1.4. Using a DOM\n // operation produces the same effect as detach, i.e. removing the element\n // without touching its jQuery data.\n\n // Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.\n\n if (!$.fn.detach) {\n $.fn.detach = function() {\n return this.each(function() {\n if (this.parentNode) {\n this.parentNode.removeChild( this );\n }\n });\n };\n }\n\n\t///////////////////////////////////////////////////////////////////////////\n\t// The Canvas object is a wrapper around an HTML5 tag.\n\t//\n\t// @constructor\n\t// @param {string} cls List of classes to apply to the canvas.\n\t// @param {element} container Element onto which to append the canvas.\n\t//\n\t// Requiring a container is a little iffy, but unfortunately canvas\n\t// operations don't work unless the canvas is attached to the DOM.\n\n\tfunction Canvas(cls, container) {\n\n\t\tvar element = container.children(\".\" + cls)[0];\n\n\t\tif (element == null) {\n\n\t\t\telement = document.createElement(\"canvas\");\n\t\t\telement.className = cls;\n\n\t\t\t$(element).css({ direction: \"ltr\", position: \"absolute\", left: 0, top: 0 })\n\t\t\t\t.appendTo(container);\n\n\t\t\t// If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas\n\n\t\t\tif (!element.getContext) {\n\t\t\t\tif (window.G_vmlCanvasManager) {\n\t\t\t\t\telement = window.G_vmlCanvasManager.initElement(element);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element = element;\n\n\t\tvar context = this.context = element.getContext(\"2d\");\n\n\t\t// Determine the screen's ratio of physical to device-independent\n\t\t// pixels. This is the ratio between the canvas width that the browser\n\t\t// advertises and the number of pixels actually present in that space.\n\n\t\t// The iPhone 4, for example, has a device-independent width of 320px,\n\t\t// but its screen is actually 640px wide. It therefore has a pixel\n\t\t// ratio of 2, while most normal devices have a ratio of 1.\n\n\t\tvar devicePixelRatio = window.devicePixelRatio || 1,\n\t\t\tbackingStoreRatio =\n\t\t\t\tcontext.webkitBackingStorePixelRatio ||\n\t\t\t\tcontext.mozBackingStorePixelRatio ||\n\t\t\t\tcontext.msBackingStorePixelRatio ||\n\t\t\t\tcontext.oBackingStorePixelRatio ||\n\t\t\t\tcontext.backingStorePixelRatio || 1;\n\n\t\tthis.pixelRatio = devicePixelRatio / backingStoreRatio;\n\n\t\t// Size the canvas to match the internal dimensions of its container\n\n\t\tthis.resize(container.width(), container.height());\n\n\t\t// Collection of HTML div layers for text overlaid onto the canvas\n\n\t\tthis.textContainer = null;\n\t\tthis.text = {};\n\n\t\t// Cache of text fragments and metrics, so we can avoid expensively\n\t\t// re-calculating them when the plot is re-rendered in a loop.\n\n\t\tthis._textCache = {};\n\t\tthis._textSizeCache = window.flotTextSizeCache = window.flotTextSizeCache || {};\n\t}\n\n\t// Resizes the canvas to the given dimensions.\n\t//\n\t// @param {number} width New width of the canvas, in pixels.\n\t// @param {number} width New height of the canvas, in pixels.\n\n\tCanvas.prototype.resize = function(width, height) {\n\n\t\tif (width <= 0 || height <= 0) {\n\t\t\tthrow new Error(\"Invalid dimensions for plot, width = \" + width + \", height = \" + height);\n\t\t}\n\n\t\tvar element = this.element,\n\t\t\tcontext = this.context,\n\t\t\tpixelRatio = this.pixelRatio;\n\n\t\t// Resize the canvas, increasing its density based on the display's\n\t\t// pixel ratio; basically giving it more pixels without increasing the\n\t\t// size of its element, to take advantage of the fact that retina\n\t\t// displays have that many more pixels in the same advertised space.\n\n\t\t// Resizing should reset the state (excanvas seems to be buggy though)\n\n\t\tif (this.width != width) {\n\t\t\telement.width = width * pixelRatio;\n\t\t\telement.style.width = width + \"px\";\n\t\t\tthis.width = width;\n\t\t}\n\n\t\tif (this.height != height) {\n\t\t\telement.height = height * pixelRatio;\n\t\t\telement.style.height = height + \"px\";\n\t\t\tthis.height = height;\n\t\t}\n\n\t\t// Save the context, so we can reset in case we get replotted. The\n\t\t// restore ensure that we're really back at the initial state, and\n\t\t// should be safe even if we haven't saved the initial state yet.\n\n\t\tcontext.restore();\n\t\tcontext.save();\n\n\t\t// Scale the coordinate space to match the display density; so even though we\n\t\t// may have twice as many pixels, we still want lines and other drawing to\n\t\t// appear at the same size; the extra pixels will just make them crisper.\n\n\t\tcontext.scale(pixelRatio, pixelRatio);\n\t};\n\n\t// Clears the entire canvas area, not including any overlaid HTML text\n\n\tCanvas.prototype.clear = function() {\n\t\tthis.context.clearRect(0, 0, this.width, this.height);\n\t};\n\n\t// Finishes rendering the canvas, including managing the text overlay.\n\n\tCanvas.prototype.render = function() {\n\n\t\tvar cache = this._textCache;\n\n\t\t// For each text layer, add elements marked as active that haven't\n\t\t// already been rendered, and remove those that are no longer active.\n\n\t\tfor (var layerKey in cache) {\n\t\t\tif (hasOwnProperty.call(cache, layerKey)) {\n\n\t\t\t\tvar layer = this.getTextLayer(layerKey),\n\t\t\t\t\tlayerCache = cache[layerKey];\n\n\t\t\t\tlayer.hide();\n\n\t\t\t\tfor (var styleKey in layerCache) {\n\t\t\t\t\tif (hasOwnProperty.call(layerCache, styleKey)) {\n\t\t\t\t\t\tvar styleCache = layerCache[styleKey];\n\t\t\t\t\t\tfor (var key in styleCache) {\n\t\t\t\t\t\t\tif (hasOwnProperty.call(styleCache, key)) {\n\n\t\t\t\t\t\t\t\tvar positions = styleCache[key].positions;\n\n\t\t\t\t\t\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\t\t\t\t\t\tif (position.active) {\n\t\t\t\t\t\t\t\t\t\tif (!position.rendered) {\n\t\t\t\t\t\t\t\t\t\t\tlayer.append(position.element);\n\t\t\t\t\t\t\t\t\t\t\tposition.rendered = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tpositions.splice(i--, 1);\n\t\t\t\t\t\t\t\t\t\tif (position.rendered) {\n\t\t\t\t\t\t\t\t\t\t\tposition.element.detach();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (positions.length == 0) {\n\t\t\t\t\t\t\t\t\tdelete styleCache[key];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlayer.show();\n\t\t\t}\n\t\t}\n\t};\n\n\t// Creates (if necessary) and returns the text overlay container.\n\t//\n\t// @param {string} classes String of space-separated CSS classes used to\n\t// uniquely identify the text layer.\n\t// @return {object} The jQuery-wrapped text-layer div.\n\n\tCanvas.prototype.getTextLayer = function(classes) {\n\n\t\tvar layer = this.text[classes];\n\n\t\t// Create the text layer if it doesn't exist\n\n\t\tif (layer == null) {\n\n\t\t\t// Create the text layer container, if it doesn't exist\n\n\t\t\tif (this.textContainer == null) {\n\t\t\t\tthis.textContainer = $(\"
\")\n\t\t\t\t\t.css({\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t\tright: 0,\n\t\t\t\t\t\t'font-size': \"smaller\",\n\t\t\t\t\t\tcolor: \"#545454\"\n\t\t\t\t\t})\n\t\t\t\t\t.insertAfter(this.element);\n\t\t\t}\n\n\t\t\tlayer = this.text[classes] = $(\"
\")\n\t\t\t\t.addClass(classes)\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tbottom: 0,\n\t\t\t\t\tright: 0\n\t\t\t\t})\n\t\t\t\t.appendTo(this.textContainer);\n\t\t}\n\n\t\treturn layer;\n\t};\n\n\t// Creates (if necessary) and returns a text info object.\n\t//\n\t// The object looks like this:\n\t//\n\t// {\n\t// width: Width of the text's wrapper div.\n\t// height: Height of the text's wrapper div.\n\t// element: The jQuery-wrapped HTML div containing the text.\n\t// positions: Array of positions at which this text is drawn.\n\t// }\n\t//\n\t// The positions array contains objects that look like this:\n\t//\n\t// {\n\t// active: Flag indicating whether the text should be visible.\n\t// rendered: Flag indicating whether the text is currently visible.\n\t// element: The jQuery-wrapped HTML div containing the text.\n\t// x: X coordinate at which to draw the text.\n\t// y: Y coordinate at which to draw the text.\n\t// }\n\t//\n\t// Each position after the first receives a clone of the original element.\n\t//\n\t// The idea is that that the width, height, and general 'identity' of the\n\t// text is constant no matter where it is placed; the placements are a\n\t// secondary property.\n\t//\n\t// Canvas maintains a cache of recently-used text info objects; getTextInfo\n\t// either returns the cached element or creates a new entry.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {string} text Text string to retrieve info for.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which to rotate the text, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\t// @param {number=} width Maximum width of the text before it wraps.\n\t// @return {object} a text info object.\n\n\tCanvas.prototype.getTextInfo = function(layer, text, font, angle, width) {\n\n\t\tvar textStyle, layerCache, styleCache, info;\n\n\t\t// Cast the value to a string, in case we were given a number or such\n\n\t\ttext = \"\" + text;\n\n\t\t// If the font is a font-spec object, generate a CSS font definition\n\n\t\tif (typeof font === \"object\") {\n\t\t\ttextStyle = font.style + \" \" + font.variant + \" \" + font.weight + \" \" + font.size + \"px/\" + font.lineHeight + \"px \" + font.family;\n\t\t} else {\n\t\t\ttextStyle = font;\n\t\t}\n\n\t\t// Retrieve (or create) the cache for the text's layer and styles\n\n\t\tlayerCache = this._textCache[layer];\n\n\t\tif (layerCache == null) {\n\t\t\tlayerCache = this._textCache[layer] = {};\n\t\t}\n\n\t\tstyleCache = layerCache[textStyle];\n\n\t\tif (styleCache == null) {\n\t\t\tstyleCache = layerCache[textStyle] = {};\n\t\t}\n\n\t\tinfo = styleCache[text];\n\n\t\t// If we can't find a matching element in our cache, create a new one\n\n\t\tif (info == null) {\n\n\t\t\tvar element = $(\"
\").html(text)\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t'max-width': width,\n\t\t\t\t\ttop: -9999\n\t\t\t\t})\n\t\t\t\t.appendTo(this.getTextLayer(layer));\n\n\t\t\tif (typeof font === \"object\") {\n\t\t\t\telement.css({\n\t\t\t\t\tfont: textStyle,\n\t\t\t\t\tcolor: font.color\n\t\t\t\t});\n\t\t\t} else if (typeof font === \"string\") {\n\t\t\t\telement.addClass(font);\n\t\t\t}\n\n info = styleCache[text] = { element: element, positions: [] };\n\n var size = this._textSizeCache[text];\n\t\t\tif (size) {\n info.width = size.width;\n info.height = size.height;\n\t\t\t} else {\n info.width = element.outerWidth(true);\n info.height = element.outerHeight(true);\n this._textSizeCache[text] = { width: info.width, height: info.height };\n\t\t\t}\n\t\t\telement.detach();\n\t\t}\n\n\t\treturn info;\n\t};\n\n\t// Adds a text string to the canvas text overlay.\n\t//\n\t// The text isn't drawn immediately; it is marked as rendering, which will\n\t// result in its addition to the canvas on the next render pass.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {number} x X coordinate at which to draw the text.\n\t// @param {number} y Y coordinate at which to draw the text.\n\t// @param {string} text Text string to draw.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which to rotate the text, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\t// @param {number=} width Maximum width of the text before it wraps.\n\t// @param {string=} halign Horizontal alignment of the text; either \"left\",\n\t// \"center\" or \"right\".\n\t// @param {string=} valign Vertical alignment of the text; either \"top\",\n\t// \"middle\" or \"bottom\".\n\n\tCanvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {\n\n\t\tvar info = this.getTextInfo(layer, text, font, angle, width),\n\t\t\tpositions = info.positions;\n\n\t\t// Tweak the div's position to match the text's alignment\n\n\t\tif (halign == \"center\") {\n\t\t\tx -= info.width / 2;\n\t\t} else if (halign == \"right\") {\n\t\t\tx -= info.width;\n\t\t}\n\n\t\tif (valign == \"middle\") {\n\t\t\ty -= info.height / 2;\n\t\t} else if (valign == \"bottom\") {\n\t\t\ty -= info.height;\n\t\t}\n\n\t\t// Determine whether this text already exists at this position.\n\t\t// If so, mark it for inclusion in the next render pass.\n\n\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\tif (position.x == x && position.y == y) {\n\t\t\t\tposition.active = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// If the text doesn't exist at this position, create a new entry\n\n\t\t// For the very first position we'll re-use the original element,\n\t\t// while for subsequent ones we'll clone it.\n\n\t\tposition = {\n\t\t\tactive: true,\n\t\t\trendered: false,\n\t\t\telement: positions.length ? info.element.clone() : info.element,\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\n\t\tpositions.push(position);\n\n\t\t// Move the element to its final position within the container\n\n\t\tposition.element.css({\n\t\t\ttop: Math.round(y),\n\t\t\tleft: Math.round(x),\n\t\t\t'text-align': halign\t// In case the text wraps\n\t\t});\n\t};\n\n\t// Removes one or more text strings from the canvas text overlay.\n\t//\n\t// If no parameters are given, all text within the layer is removed.\n\t//\n\t// Note that the text is not immediately removed; it is simply marked as\n\t// inactive, which will result in its removal on the next render pass.\n\t// This avoids the performance penalty for 'clear and redraw' behavior,\n\t// where we potentially get rid of all text on a layer, but will likely\n\t// add back most or all of it later, as when redrawing axes, for example.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {number=} x X coordinate of the text.\n\t// @param {number=} y Y coordinate of the text.\n\t// @param {string=} text Text string to remove.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which the text is rotated, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\n\tCanvas.prototype.removeText = function(layer, x, y, text, font, angle) {\n\t\tif (text == null) {\n\t\t\tvar layerCache = this._textCache[layer];\n\t\t\tif (layerCache != null) {\n\t\t\t\tfor (var styleKey in layerCache) {\n\t\t\t\t\tif (hasOwnProperty.call(layerCache, styleKey)) {\n\t\t\t\t\t\tvar styleCache = layerCache[styleKey];\n\t\t\t\t\t\tfor (var key in styleCache) {\n\t\t\t\t\t\t\tif (hasOwnProperty.call(styleCache, key)) {\n\t\t\t\t\t\t\t\tvar positions = styleCache[key].positions;\n\t\t\t\t\t\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\t\t\t\t\t\tposition.active = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tvar positions = this.getTextInfo(layer, text, font, angle).positions;\n\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\tif (position.x == x && position.y == y) {\n\t\t\t\t\tposition.active = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t///////////////////////////////////////////////////////////////////////////\n\t// The top-level container for the entire plot.\n\n function Plot(placeholder, data_, options_, plugins) {\n // data is on the form:\n // [ series1, series2 ... ]\n // where series is either just the data as [ [x1, y1], [x2, y2], ... ]\n // or { data: [ [x1, y1], [x2, y2], ... ], label: \"some label\", ... }\n\n var series = [],\n options = {\n // the color theme used for graphs\n colors: [\"#edc240\", \"#afd8f8\", \"#cb4b4b\", \"#4da74d\", \"#9440ed\"],\n legend: {\n show: true,\n noColumns: 1, // number of colums in legend table\n labelFormatter: null, // fn: string -> string\n labelBoxBorderColor: \"#ccc\", // border color for the little label boxes\n container: null, // container (as jQuery object) to put legend in, null means default on top of graph\n position: \"ne\", // position of default legend container within plot\n margin: 5, // distance from grid edge to default legend container within plot\n backgroundColor: null, // null means auto-detect\n backgroundOpacity: 0.85, // set to 0 to avoid background\n sorted: null // default to no legend sorting\n },\n xaxis: {\n show: null, // null = auto-detect, true = always, false = never\n position: \"bottom\", // or \"top\"\n mode: null, // null or \"time\"\n font: null, // null (derived from CSS in placeholder) or object like { size: 11, lineHeight: 13, style: \"italic\", weight: \"bold\", family: \"sans-serif\", variant: \"small-caps\" }\n color: null, // base color, labels, ticks\n tickColor: null, // possibly different color of ticks, e.g. \"rgba(0,0,0,0.15)\"\n transform: null, // null or f: number -> number to transform axis\n inverseTransform: null, // if transform is set, this should be the inverse function\n min: null, // min. value to show, null means set automatically\n max: null, // max. value to show, null means set automatically\n autoscaleMargin: null, // margin in % to add if auto-setting min/max\n ticks: null, // either [1, 3] or [[1, \"a\"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks\n tickFormatter: null, // fn: number -> string\n labelWidth: null, // size of tick labels in pixels\n labelHeight: null,\n reserveSpace: null, // whether to reserve space even if axis isn't shown\n tickLength: null, // size in pixels of ticks, or \"full\" for whole line\n alignTicksWithAxis: null, // axis number or null for no sync\n tickDecimals: null, // no. of decimals, null means auto\n tickSize: null, // number or [number, \"unit\"]\n minTickSize: null // number or [number, \"unit\"]\n },\n yaxis: {\n autoscaleMargin: 0.02,\n position: \"left\" // or \"right\"\n },\n xaxes: [],\n yaxes: [],\n series: {\n points: {\n show: false,\n radius: 3,\n lineWidth: 2, // in pixels\n fill: true,\n fillColor: \"#ffffff\",\n symbol: \"circle\" // or callback\n },\n lines: {\n // we don't put in show: false so we can see\n // whether lines were actively disabled\n lineWidth: 2, // in pixels\n fill: false,\n fillColor: null,\n steps: false\n // Omit 'zero', so we can later default its value to\n // match that of the 'fill' option.\n },\n bars: {\n show: false,\n lineWidth: 2, // in pixels\n barWidth: 1, // in units of the x axis\n fill: true,\n fillColor: null,\n align: \"left\", // \"left\", \"right\", or \"center\"\n horizontal: false,\n zero: true\n },\n shadowSize: 3,\n highlightColor: null\n },\n grid: {\n show: true,\n aboveData: false,\n color: \"#545454\", // primary color used for outline and labels\n backgroundColor: null, // null for transparent, else color\n borderColor: null, // set if different from the grid color\n tickColor: null, // color for the ticks, e.g. \"rgba(0,0,0,0.15)\"\n margin: 0, // distance from the canvas edge to the grid\n labelMargin: 5, // in pixels\n eventSectionHeight: 0, // space for event section\n axisMargin: 8, // in pixels\n borderWidth: 2, // in pixels\n minBorderMargin: null, // in pixels, null means taken from points radius\n markings: null, // array of ranges or fn: axes -> array of ranges\n markingsColor: \"#f4f4f4\",\n markingsLineWidth: 2,\n // interactive stuff\n clickable: false,\n hoverable: false,\n autoHighlight: true, // highlight in case mouse is near\n mouseActiveRadius: 10 // how far the mouse can be away to activate an item\n },\n interaction: {\n redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow\n },\n hooks: {}\n },\n surface = null, // the canvas for the plot itself\n overlay = null, // canvas for interactive stuff on top of plot\n eventHolder = null, // jQuery object that events should be bound to\n ctx = null, octx = null,\n xaxes = [], yaxes = [],\n plotOffset = { left: 0, right: 0, top: 0, bottom: 0},\n plotWidth = 0, plotHeight = 0,\n hooks = {\n processOptions: [],\n processRawData: [],\n processDatapoints: [],\n processOffset: [],\n drawBackground: [],\n drawSeries: [],\n draw: [],\n bindEvents: [],\n drawOverlay: [],\n shutdown: []\n },\n plot = this;\n\n // public functions\n plot.setData = setData;\n plot.setupGrid = setupGrid;\n plot.draw = draw;\n plot.getPlaceholder = function() { return placeholder; };\n plot.getCanvas = function() { return surface.element; };\n plot.getPlotOffset = function() { return plotOffset; };\n plot.width = function () { return plotWidth; };\n plot.height = function () { return plotHeight; };\n plot.offset = function () {\n var o = eventHolder.offset();\n o.left += plotOffset.left;\n o.top += plotOffset.top;\n return o;\n };\n plot.getData = function () { return series; };\n plot.getAxes = function () {\n var res = {}, i;\n $.each(xaxes.concat(yaxes), function (_, axis) {\n if (axis)\n res[axis.direction + (axis.n != 1 ? axis.n : \"\") + \"axis\"] = axis;\n });\n return res;\n };\n plot.getXAxes = function () { return xaxes; };\n plot.getYAxes = function () { return yaxes; };\n plot.c2p = canvasToAxisCoords;\n plot.p2c = axisToCanvasCoords;\n plot.getOptions = function () { return options; };\n plot.highlight = highlight;\n plot.unhighlight = unhighlight;\n plot.triggerRedrawOverlay = triggerRedrawOverlay;\n plot.pointOffset = function(point) {\n return {\n left: parseInt(xaxes[axisNumber(point, \"x\") - 1].p2c(+point.x) + plotOffset.left, 10),\n top: parseInt(yaxes[axisNumber(point, \"y\") - 1].p2c(+point.y) + plotOffset.top, 10)\n };\n };\n plot.shutdown = shutdown;\n plot.destroy = function () {\n shutdown();\n placeholder.removeData(\"plot\").empty();\n\n series = [];\n options = null;\n surface = null;\n overlay = null;\n eventHolder = null;\n ctx = null;\n octx = null;\n xaxes = [];\n yaxes = [];\n hooks = null;\n highlights = [];\n plot = null;\n };\n plot.resize = function () {\n \tvar width = placeholder.width(),\n \t\theight = placeholder.height();\n surface.resize(width, height);\n overlay.resize(width, height);\n };\n\n // public attributes\n plot.hooks = hooks;\n\n // initialize\n initPlugins(plot);\n parseOptions(options_);\n setupCanvases();\n setData(data_);\n setupGrid();\n draw();\n bindEvents();\n\n\n function executeHooks(hook, args) {\n args = [plot].concat(args);\n for (var i = 0; i < hook.length; ++i)\n hook[i].apply(this, args);\n }\n\n function initPlugins() {\n\n // References to key classes, allowing plugins to modify them\n\n var classes = {\n Canvas: Canvas\n };\n\n for (var i = 0; i < plugins.length; ++i) {\n var p = plugins[i];\n p.init(plot, classes);\n if (p.options)\n $.extend(true, options, p.options);\n }\n }\n\n function parseOptions(opts) {\n\n $.extend(true, options, opts);\n\n // $.extend merges arrays, rather than replacing them. When less\n // colors are provided than the size of the default palette, we\n // end up with those colors plus the remaining defaults, which is\n // not expected behavior; avoid it by replacing them here.\n\n if (opts && opts.colors) {\n \toptions.colors = opts.colors;\n }\n\n if (options.xaxis.color == null)\n options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n if (options.yaxis.color == null)\n options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n\n if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility\n options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color;\n if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility\n options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color;\n\n if (options.grid.borderColor == null)\n options.grid.borderColor = options.grid.color;\n if (options.grid.tickColor == null)\n options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n\n // Fill in defaults for axis options, including any unspecified\n // font-spec fields, if a font-spec was provided.\n\n // If no x/y axis options were provided, create one of each anyway,\n // since the rest of the code assumes that they exist.\n\n var i, axisOptions, axisCount,\n fontSize = placeholder.css(\"font-size\"),\n fontSizeDefault = fontSize ? +fontSize.replace(\"px\", \"\") : 13,\n fontDefaults = {\n style: placeholder.css(\"font-style\"),\n size: Math.round(0.8 * fontSizeDefault),\n variant: placeholder.css(\"font-variant\"),\n weight: placeholder.css(\"font-weight\"),\n family: placeholder.css(\"font-family\")\n };\n\n axisCount = options.xaxes.length || 1;\n for (i = 0; i < axisCount; ++i) {\n\n axisOptions = options.xaxes[i];\n if (axisOptions && !axisOptions.tickColor) {\n axisOptions.tickColor = axisOptions.color;\n }\n\n axisOptions = $.extend(true, {}, options.xaxis, axisOptions);\n options.xaxes[i] = axisOptions;\n\n if (axisOptions.font) {\n axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);\n if (!axisOptions.font.color) {\n axisOptions.font.color = axisOptions.color;\n }\n if (!axisOptions.font.lineHeight) {\n axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);\n }\n }\n }\n\n axisCount = options.yaxes.length || 1;\n for (i = 0; i < axisCount; ++i) {\n\n axisOptions = options.yaxes[i];\n if (axisOptions && !axisOptions.tickColor) {\n axisOptions.tickColor = axisOptions.color;\n }\n\n axisOptions = $.extend(true, {}, options.yaxis, axisOptions);\n options.yaxes[i] = axisOptions;\n\n if (axisOptions.font) {\n axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);\n if (!axisOptions.font.color) {\n axisOptions.font.color = axisOptions.color;\n }\n if (!axisOptions.font.lineHeight) {\n axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);\n }\n }\n }\n\n // backwards compatibility, to be removed in future\n if (options.xaxis.noTicks && options.xaxis.ticks == null)\n options.xaxis.ticks = options.xaxis.noTicks;\n if (options.yaxis.noTicks && options.yaxis.ticks == null)\n options.yaxis.ticks = options.yaxis.noTicks;\n if (options.x2axis) {\n options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);\n options.xaxes[1].position = \"top\";\n // Override the inherit to allow the axis to auto-scale\n if (options.x2axis.min == null) {\n options.xaxes[1].min = null;\n }\n if (options.x2axis.max == null) {\n options.xaxes[1].max = null;\n }\n }\n if (options.y2axis) {\n options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);\n options.yaxes[1].position = \"right\";\n // Override the inherit to allow the axis to auto-scale\n if (options.y2axis.min == null) {\n options.yaxes[1].min = null;\n }\n if (options.y2axis.max == null) {\n options.yaxes[1].max = null;\n }\n }\n if (options.grid.coloredAreas)\n options.grid.markings = options.grid.coloredAreas;\n if (options.grid.coloredAreasColor)\n options.grid.markingsColor = options.grid.coloredAreasColor;\n if (options.lines)\n $.extend(true, options.series.lines, options.lines);\n if (options.points)\n $.extend(true, options.series.points, options.points);\n if (options.bars)\n $.extend(true, options.series.bars, options.bars);\n if (options.shadowSize != null)\n options.series.shadowSize = options.shadowSize;\n if (options.highlightColor != null)\n options.series.highlightColor = options.highlightColor;\n\n // save options on axes for future reference\n for (i = 0; i < options.xaxes.length; ++i)\n getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];\n for (i = 0; i < options.yaxes.length; ++i)\n getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];\n\n // add hooks from options\n for (var n in hooks)\n if (options.hooks[n] && options.hooks[n].length)\n hooks[n] = hooks[n].concat(options.hooks[n]);\n\n executeHooks(hooks.processOptions, [options]);\n }\n\n function setData(d) {\n series = parseData(d);\n fillInSeriesOptions();\n processData();\n }\n\n function parseData(d) {\n var res = [];\n for (var i = 0; i < d.length; ++i) {\n var s = $.extend(true, {}, options.series);\n\n if (d[i].data != null) {\n s.data = d[i].data; // move the data instead of deep-copy\n delete d[i].data;\n\n $.extend(true, s, d[i]);\n\n d[i].data = s.data;\n }\n else\n s.data = d[i];\n res.push(s);\n }\n\n return res;\n }\n\n function axisNumber(obj, coord) {\n var a = obj[coord + \"axis\"];\n if (typeof a == \"object\") // if we got a real axis, extract number\n a = a.n;\n if (typeof a != \"number\")\n a = 1; // default to first axis\n return a;\n }\n\n function allAxes() {\n // return flat array without annoying null entries\n return $.grep(xaxes.concat(yaxes), function (a) { return a; });\n }\n\n function canvasToAxisCoords(pos) {\n // return an object with x/y corresponding to all used axes\n var res = {}, i, axis;\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used)\n res[\"x\" + axis.n] = axis.c2p(pos.left);\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used)\n res[\"y\" + axis.n] = axis.c2p(pos.top);\n }\n\n if (res.x1 !== undefined)\n res.x = res.x1;\n if (res.y1 !== undefined)\n res.y = res.y1;\n\n return res;\n }\n\n function axisToCanvasCoords(pos) {\n // get canvas coords from the first pair of x/y found in pos\n var res = {}, i, axis, key;\n\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used) {\n key = \"x\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"x\";\n\n if (pos[key] != null) {\n res.left = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used) {\n key = \"y\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"y\";\n\n if (pos[key] != null) {\n res.top = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n return res;\n }\n\n function getOrCreateAxis(axes, number) {\n if (!axes[number - 1])\n axes[number - 1] = {\n n: number, // save the number for future reference\n direction: axes == xaxes ? \"x\" : \"y\",\n options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)\n };\n\n return axes[number - 1];\n }\n\n function fillInSeriesOptions() {\n\n var neededColors = series.length, maxIndex = -1, i;\n\n // Subtract the number of series that already have fixed colors or\n // color indexes from the number that we still need to generate.\n\n for (i = 0; i < series.length; ++i) {\n var sc = series[i].color;\n if (sc != null) {\n neededColors--;\n if (typeof sc == \"number\" && sc > maxIndex) {\n maxIndex = sc;\n }\n }\n }\n\n // If any of the series have fixed color indexes, then we need to\n // generate at least as many colors as the highest index.\n\n if (neededColors <= maxIndex) {\n neededColors = maxIndex + 1;\n }\n\n // Generate all the colors, using first the option colors and then\n // variations on those colors once they're exhausted.\n\n var c, colors = [], colorPool = options.colors,\n colorPoolSize = colorPool.length, variation = 0;\n\n for (i = 0; i < neededColors; i++) {\n\n c = $.color.parse(colorPool[i % colorPoolSize] || \"#666\");\n\n // Each time we exhaust the colors in the pool we adjust\n // a scaling factor used to produce more variations on\n // those colors. The factor alternates negative/positive\n // to produce lighter/darker colors.\n\n // Reset the variation after every few cycles, or else\n // it will end up producing only white or black colors.\n\n if (i % colorPoolSize == 0 && i) {\n if (variation >= 0) {\n if (variation < 0.5) {\n variation = -variation - 0.2;\n } else variation = 0;\n } else variation = -variation;\n }\n\n colors[i] = c.scale('rgb', 1 + variation);\n }\n\n // Finalize the series options, filling in their colors\n\n var colori = 0, s;\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n // assign colors\n if (s.color == null) {\n s.color = colors[colori].toString();\n ++colori;\n }\n else if (typeof s.color == \"number\")\n s.color = colors[s.color].toString();\n\n // turn on lines automatically in case nothing is set\n if (s.lines.show == null) {\n var v, show = true;\n for (v in s)\n if (s[v] && s[v].show) {\n show = false;\n break;\n }\n if (show)\n s.lines.show = true;\n }\n\n // If nothing was provided for lines.zero, default it to match\n // lines.fill, since areas by default should extend to zero.\n\n if (s.lines.zero == null) {\n s.lines.zero = !!s.lines.fill;\n }\n\n // setup axes\n s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, \"x\"));\n s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, \"y\"));\n }\n }\n\n function processData() {\n var topSentry = Number.POSITIVE_INFINITY,\n bottomSentry = Number.NEGATIVE_INFINITY,\n fakeInfinity = Number.MAX_VALUE,\n i, j, k, m, length,\n s, points, ps, x, y, axis, val, f, p,\n data, format;\n\n function updateAxis(axis, min, max) {\n if (min < axis.datamin && min != -fakeInfinity)\n axis.datamin = min;\n if (max > axis.datamax && max != fakeInfinity)\n axis.datamax = max;\n }\n\n $.each(allAxes(), function (_, axis) {\n // init axis\n axis.datamin = topSentry;\n axis.datamax = bottomSentry;\n axis.used = false;\n });\n\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n s.datapoints = { points: [] };\n\n executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);\n }\n\n // first pass: clean and copy data\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n data = s.data;\n format = s.datapoints.format;\n\n if (!format) {\n format = [];\n // find out how to copy\n format.push({ x: true, number: true, required: true });\n format.push({ y: true, number: true, required: true });\n\n if (s.bars.show || (s.lines.show && s.lines.fill)) {\n var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));\n format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });\n if (s.bars.horizontal) {\n delete format[format.length - 1].y;\n format[format.length - 1].x = true;\n }\n }\n\n s.datapoints.format = format;\n }\n\n if (s.datapoints.pointsize != null)\n continue; // already filled in\n\n s.datapoints.pointsize = format.length;\n\n ps = s.datapoints.pointsize;\n points = s.datapoints.points;\n\n var insertSteps = s.lines.show && s.lines.steps;\n s.xaxis.used = s.yaxis.used = true;\n\n for (j = k = 0; j < data.length; ++j, k += ps) {\n p = data[j];\n\n var nullify = p == null;\n if (!nullify) {\n for (m = 0; m < ps; ++m) {\n val = p[m];\n f = format[m];\n\n if (f) {\n if (f.number && val != null) {\n val = +val; // convert to number\n if (isNaN(val))\n val = null;\n else if (val == Infinity)\n val = fakeInfinity;\n else if (val == -Infinity)\n val = -fakeInfinity;\n }\n\n if (val == null) {\n if (f.required)\n nullify = true;\n\n if (f.defaultValue != null)\n val = f.defaultValue;\n }\n }\n\n points[k + m] = val;\n }\n }\n\n if (nullify) {\n for (m = 0; m < ps; ++m) {\n val = points[k + m];\n if (val != null) {\n f = format[m];\n // extract min/max info\n if (f.autoscale !== false) {\n if (f.x) {\n updateAxis(s.xaxis, val, val);\n }\n if (f.y) {\n updateAxis(s.yaxis, val, val);\n }\n }\n }\n points[k + m] = null;\n }\n }\n\n if (insertSteps && k > 0 && (!nullify || points[k - ps] != null)) {\n // copy the point to make room for a middle point\n for (m = 0; m < ps; ++m)\n points[k + ps + m] = points[k + m];\n\n // middle point has same y\n points[k + 1] = points[k - ps + 1] || 0;\n\n // if series has null values, let's give the last !null value a nice step\n if(nullify)\n \tpoints[k] = p[0];\n\n // we've added a point, better reflect that\n k += ps;\n }\n }\n }\n\n // give the hooks a chance to run\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n points = s.datapoints.points;\n ps = s.datapoints.pointsize;\n\n // grafana\n if (s.transform === 'negative-Y') {\n for (j = 0; j < points.length; j += ps) {\n if (points[j] == null)\n continue;\n\n val = points[j + 1];\n points[j + 1] = -val;\n }\n }\n\n executeHooks(hooks.processDatapoints, [ s, s.datapoints]);\n }\n\n // second pass: find datamax/datamin for auto-scaling\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n points = s.datapoints.points;\n ps = s.datapoints.pointsize;\n format = s.datapoints.format;\n\n var xmin = topSentry, ymin = topSentry,\n xmax = bottomSentry, ymax = bottomSentry;\n\n for (j = 0; j < points.length; j += ps) {\n if (points[j] == null)\n continue;\n\n for (m = 0; m < ps; ++m) {\n val = points[j + m];\n f = format[m];\n if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)\n continue;\n\n if (f.x) {\n if (val < xmin)\n xmin = val;\n if (val > xmax)\n xmax = val;\n }\n if (f.y) {\n if (val < ymin)\n ymin = val;\n if (val > ymax)\n ymax = val;\n }\n }\n }\n\n if (s.bars.show) {\n // make sure we got room for the bar on the dancing floor\n var delta;\n\n switch (s.bars.align) {\n case \"left\":\n delta = 0;\n break;\n case \"right\":\n delta = -s.bars.barWidth;\n break;\n default:\n delta = -s.bars.barWidth / 2;\n }\n\n if (s.bars.horizontal) {\n ymin += delta;\n ymax += delta + s.bars.barWidth;\n }\n else {\n xmin += delta;\n xmax += delta + s.bars.barWidth;\n }\n }\n\n updateAxis(s.xaxis, xmin, xmax);\n updateAxis(s.yaxis, ymin, ymax);\n }\n\n $.each(allAxes(), function (_, axis) {\n if (axis.datamin == topSentry)\n axis.datamin = null;\n if (axis.datamax == bottomSentry)\n axis.datamax = null;\n });\n }\n\n function setupCanvases() {\n // Make sure the placeholder is clear of everything except canvases\n // from a previous plot in this container that we'll try to re-use.\n\n placeholder.find(\".flot-temp-elem\").remove();\n\n if (placeholder.css(\"position\") == 'static')\n placeholder.css(\"position\", \"relative\"); // for positioning labels and overlay\n\n surface = new Canvas(\"flot-base\", placeholder);\n overlay = new Canvas(\"flot-overlay\", placeholder); // overlay canvas for interactive features\n\n ctx = surface.context;\n octx = overlay.context;\n\n // define which element we're listening for events on\n eventHolder = $(overlay.element).unbind();\n\n // If we're re-using a plot object, shut down the old one\n\n var existing = placeholder.data(\"plot\");\n\n if (existing) {\n existing.shutdown();\n overlay.clear();\n }\n\n // save in case we get replotted\n placeholder.data(\"plot\", plot);\n }\n\n function bindEvents() {\n // bind events\n if (options.grid.hoverable) {\n eventHolder.mousemove(onMouseMove);\n\n // Use bind, rather than .mouseleave, because we officially\n // still support jQuery 1.2.6, which doesn't define a shortcut\n // for mouseenter or mouseleave. This was a bug/oversight that\n // was fixed somewhere around 1.3.x. We can return to using\n // .mouseleave when we drop support for 1.2.6.\n\n eventHolder.bind(\"mouseleave\", onMouseLeave);\n }\n\n if (options.grid.clickable)\n eventHolder.click(onClick);\n\n executeHooks(hooks.bindEvents, [eventHolder]);\n }\n\n function shutdown() {\n if (redrawTimeout)\n clearTimeout(redrawTimeout);\n\n eventHolder.unbind(\"mousemove\", onMouseMove);\n eventHolder.unbind(\"mouseleave\", onMouseLeave);\n eventHolder.unbind(\"click\", onClick);\n\n executeHooks(hooks.shutdown, [eventHolder]);\n }\n\n function setTransformationHelpers(axis) {\n // set helper functions on the axis, assumes plot area\n // has been computed already\n\n function identity(x) { return x; }\n\n var s, m, t = axis.options.transform || identity,\n it = axis.options.inverseTransform;\n\n // precompute how much the axis is scaling a point\n // in canvas space\n if (axis.direction == \"x\") {\n s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));\n m = Math.min(t(axis.max), t(axis.min));\n }\n else {\n s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));\n s = -s;\n m = Math.max(t(axis.max), t(axis.min));\n }\n\n // data point to canvas coordinate\n if (t == identity) // slight optimization\n axis.p2c = function (p) { return (p - m) * s; };\n else\n axis.p2c = function (p) { return (t(p) - m) * s; };\n // canvas coordinate to data point\n if (!it)\n axis.c2p = function (c) { return m + c / s; };\n else\n axis.c2p = function (c) { return it(m + c / s); };\n }\n\n function measureTickLabels(axis) {\n\n var opts = axis.options,\n ticks = axis.ticks || [],\n labelWidth = opts.labelWidth || 0,\n labelHeight = opts.labelHeight || 0,\n maxWidth = labelWidth || (axis.direction == \"x\" ? Math.floor(surface.width / (ticks.length || 1)) : null),\n legacyStyles = axis.direction + \"Axis \" + axis.direction + axis.n + \"Axis\",\n layer = \"flot-\" + axis.direction + \"-axis flot-\" + axis.direction + axis.n + \"-axis \" + legacyStyles,\n font = opts.font || \"flot-tick-label tickLabel\";\n\n for (var i = 0; i < ticks.length; ++i) {\n\n var t = ticks[i];\n\n if (!t.label)\n continue;\n\n var info = surface.getTextInfo(layer, t.label, font, null, maxWidth);\n\n /// Grafana fix, add +1 to label width\n labelWidth = Math.max(labelWidth, info.width + 1);\n labelHeight = Math.max(labelHeight, info.height);\n }\n\n axis.labelWidth = opts.labelWidth || labelWidth;\n axis.labelHeight = opts.labelHeight || labelHeight;\n }\n\n function allocateAxisBoxFirstPhase(axis) {\n // find the bounding box of the axis by looking at label\n // widths/heights and ticks, make room by diminishing the\n // plotOffset; this first phase only looks at one\n // dimension per axis, the other dimension depends on the\n // other axes so will have to wait\n\n var lw = axis.labelWidth,\n lh = axis.labelHeight,\n pos = axis.options.position,\n isXAxis = axis.direction === \"x\",\n tickLength = axis.options.tickLength,\n axisMargin = options.grid.axisMargin,\n padding = options.grid.labelMargin,\n eventSectionPadding = options.grid.eventSectionHeight,\n innermost = true,\n outermost = true,\n first = true,\n found = false;\n\n // Determine the axis's position in its direction and on its side\n\n $.each(isXAxis ? xaxes : yaxes, function(i, a) {\n if (a && (a.show || a.reserveSpace)) {\n if (a === axis) {\n found = true;\n } else if (a.options.position === pos) {\n if (found) {\n outermost = false;\n } else {\n innermost = false;\n }\n }\n if (!found) {\n first = false;\n }\n }\n });\n\n // The outermost axis on each side has no margin\n\n if (outermost) {\n axisMargin = 0;\n }\n\n // The ticks for the first axis in each direction stretch across\n\n if (tickLength == null) {\n tickLength = first ? \"full\" : 5;\n }\n\n if (!isNaN(+tickLength))\n padding += +tickLength;\n\n if (isXAxis) {\n // Add space for event section\n lh += padding;\n lh += eventSectionPadding;\n\n if (pos == \"bottom\") {\n plotOffset.bottom += lh + axisMargin;\n axis.box = { top: surface.height - plotOffset.bottom, height: lh };\n }\n else {\n axis.box = { top: plotOffset.top + axisMargin, height: lh };\n plotOffset.top += lh + axisMargin;\n }\n }\n else {\n lw += padding;\n\n if (pos == \"left\") {\n axis.box = { left: plotOffset.left + axisMargin, width: lw };\n plotOffset.left += lw + axisMargin;\n }\n else {\n plotOffset.right += lw + axisMargin;\n axis.box = { left: surface.width - plotOffset.right, width: lw };\n }\n }\n\n // save for future reference\n axis.position = pos;\n axis.tickLength = tickLength;\n axis.box.padding = padding;\n axis.box.eventSectionPadding = eventSectionPadding;\n axis.innermost = innermost;\n }\n\n function allocateAxisBoxSecondPhase(axis) {\n // now that all axis boxes have been placed in one\n // dimension, we can set the remaining dimension coordinates\n if (axis.direction == \"x\") {\n axis.box.left = plotOffset.left - axis.labelWidth / 2;\n axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth;\n }\n else {\n axis.box.top = plotOffset.top - axis.labelHeight / 2;\n axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight;\n }\n }\n\n function adjustLayoutForThingsStickingOut() {\n // possibly adjust plot offset to ensure everything stays\n // inside the canvas and isn't clipped off\n\n var minMargin = options.grid.minBorderMargin,\n axis, i;\n\n // check stuff from the plot (FIXME: this should just read\n // a value from the series, otherwise it's impossible to\n // customize)\n if (minMargin == null) {\n minMargin = 0;\n for (i = 0; i < series.length; ++i)\n minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));\n }\n\n var margins = {\n left: minMargin,\n right: minMargin,\n top: minMargin,\n bottom: minMargin\n };\n\n // check axis labels, note we don't check the actual\n // labels but instead use the overall width/height to not\n // jump as much around with replots\n $.each(allAxes(), function (_, axis) {\n if (axis.reserveSpace && axis.ticks && axis.ticks.length) {\n if (axis.direction === \"x\") {\n margins.left = Math.max(margins.left, axis.labelWidth / 2);\n margins.right = Math.max(margins.right, axis.labelWidth / 2);\n } else {\n margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);\n margins.top = Math.max(margins.top, axis.labelHeight / 2);\n }\n }\n });\n\n plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left));\n plotOffset.right = Math.ceil(Math.max(margins.right, plotOffset.right));\n plotOffset.top = Math.ceil(Math.max(margins.top, plotOffset.top));\n plotOffset.bottom = Math.ceil(Math.max(margins.bottom, plotOffset.bottom));\n }\n\n function setupGrid() {\n var i, axes = allAxes(), showGrid = options.grid.show;\n\n // Initialize the plot's offset from the edge of the canvas\n\n for (var a in plotOffset) {\n var margin = options.grid.margin || 0;\n plotOffset[a] = typeof margin == \"number\" ? margin : margin[a] || 0;\n }\n\n executeHooks(hooks.processOffset, [plotOffset]);\n\n // If the grid is visible, add its border width to the offset\n\n for (var a in plotOffset) {\n if(typeof(options.grid.borderWidth) == \"object\") {\n plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;\n }\n else {\n plotOffset[a] += showGrid ? options.grid.borderWidth : 0;\n }\n }\n\n $.each(axes, function (_, axis) {\n var axisOpts = axis.options;\n axis.show = axisOpts.show == null ? axis.used : axisOpts.show;\n axis.reserveSpace = axisOpts.reserveSpace == null ? axis.show : axisOpts.reserveSpace;\n setRange(axis);\n });\n\n if (showGrid) {\n\n var allocatedAxes = $.grep(axes, function (axis) {\n return axis.show || axis.reserveSpace;\n });\n\n $.each(allocatedAxes, function (_, axis) {\n // make the ticks\n setupTickGeneration(axis);\n setTicks(axis);\n snapRangeToTicks(axis, axis.ticks);\n // find labelWidth/Height for axis\n measureTickLabels(axis);\n });\n\n // with all dimensions calculated, we can compute the\n // axis bounding boxes, start from the outside\n // (reverse order)\n for (i = allocatedAxes.length - 1; i >= 0; --i)\n allocateAxisBoxFirstPhase(allocatedAxes[i]);\n\n // make sure we've got enough space for things that\n // might stick out\n adjustLayoutForThingsStickingOut();\n\n $.each(allocatedAxes, function (_, axis) {\n allocateAxisBoxSecondPhase(axis);\n });\n }\n\n plotWidth = surface.width - plotOffset.left - plotOffset.right;\n plotHeight = surface.height - plotOffset.bottom - plotOffset.top;\n\n // now we got the proper plot dimensions, we can compute the scaling\n $.each(axes, function (_, axis) {\n setTransformationHelpers(axis);\n });\n\n if (showGrid) {\n drawAxisLabels();\n }\n\n insertLegend();\n }\n\n function setRange(axis) {\n var opts = axis.options,\n min = +(opts.min != null ? opts.min : axis.datamin),\n max = +(opts.max != null ? opts.max : axis.datamax),\n delta = max - min;\n\n if (delta == 0.0) {\n // Grafana fix: wide Y min and max using increased wideFactor\n // when all series values are the same\n var wideFactor = 0.25;\n var widen = Math.abs(max == 0 ? 1 : max * wideFactor);\n\n if (opts.min == null) {\n min -= widen;\n }\n // always widen max if we couldn't widen min to ensure we\n // don't fall into min == max which doesn't work\n if (opts.max == null || opts.min != null) {\n max += widen;\n }\n }\n else {\n // consider autoscaling\n var margin = opts.autoscaleMargin;\n if (margin != null) {\n if (opts.min == null) {\n min -= delta * margin;\n // make sure we don't go below zero if all values\n // are positive\n if (min < 0 && axis.datamin != null && axis.datamin >= 0)\n min = 0;\n }\n if (opts.max == null) {\n max += delta * margin;\n if (max > 0 && axis.datamax != null && axis.datamax <= 0)\n max = 0;\n }\n }\n }\n axis.min = min;\n axis.max = max;\n }\n\n function setupTickGeneration(axis) {\n var opts = axis.options;\n\n // estimate number of ticks\n var noTicks;\n if (typeof opts.ticks == \"number\" && opts.ticks > 0)\n noTicks = opts.ticks;\n else\n // heuristic based on the model a*sqrt(x) fitted to\n // some data points that seemed reasonable\n noTicks = 0.3 * Math.sqrt(axis.direction == \"x\" ? surface.width : surface.height);\n\n var delta = (axis.max - axis.min) / noTicks,\n dec = -Math.floor(Math.log(delta) / Math.LN10),\n maxDec = opts.tickDecimals;\n\n if (maxDec != null && dec > maxDec) {\n dec = maxDec;\n }\n\n var magn = Math.pow(10, -dec),\n norm = delta / magn, // norm is between 1.0 and 10.0\n size;\n\n if (norm < 1.5) {\n size = 1;\n } else if (norm < 3) {\n size = 2;\n // special case for 2.5, requires an extra decimal\n if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {\n size = 2.5;\n ++dec;\n }\n } else if (norm < 7.5) {\n size = 5;\n } else {\n size = 10;\n }\n\n size *= magn;\n\n if (opts.minTickSize != null && size < opts.minTickSize) {\n size = opts.minTickSize;\n }\n\n axis.delta = delta;\n axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);\n axis.tickSize = opts.tickSize || size;\n // grafana addition\n axis.scaledDecimals = axis.tickDecimals - Math.floor(Math.log(axis.tickSize) / Math.LN10);\n\n // Time mode was moved to a plug-in in 0.8, and since so many people use it\n // we'll add an especially friendly reminder to make sure they included it.\n\n if (opts.mode == \"time\" && !axis.tickGenerator) {\n throw new Error(\"Time mode requires the flot.time plugin.\");\n }\n\n // Flot supports base-10 axes; any other mode else is handled by a plug-in,\n // like flot.time.js.\n\n if (!axis.tickGenerator) {\n\n axis.tickGenerator = function (axis) {\n\n var ticks = [],\n start = floorInBase(axis.min, axis.tickSize),\n i = 0,\n v = Number.NaN,\n prev;\n\n do {\n prev = v;\n v = start + i * axis.tickSize;\n ticks.push(v);\n ++i;\n } while (v < axis.max && v != prev);\n return ticks;\n };\n\n\t\t\t\taxis.tickFormatter = function (value, axis) {\n\n\t\t\t\t\tvar factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;\n\t\t\t\t\tvar formatted = \"\" + Math.round(value * factor) / factor;\n\n\t\t\t\t\t// If tickDecimals was specified, ensure that we have exactly that\n\t\t\t\t\t// much precision; otherwise default to the value's own precision.\n\n\t\t\t\t\tif (axis.tickDecimals != null) {\n\t\t\t\t\t\tvar decimal = formatted.indexOf(\".\");\n\t\t\t\t\t\tvar precision = decimal == -1 ? 0 : formatted.length - decimal - 1;\n\t\t\t\t\t\tif (precision < axis.tickDecimals) {\n\t\t\t\t\t\t\treturn (precision ? formatted : formatted + \".\") + (\"\" + factor).substr(1, axis.tickDecimals - precision);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n return formatted;\n };\n }\n\n if ($.isFunction(opts.tickFormatter))\n axis.tickFormatter = function (v, axis) { return \"\" + opts.tickFormatter(v, axis); };\n\n if (opts.alignTicksWithAxis != null) {\n var otherAxis = (axis.direction == \"x\" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];\n if (otherAxis && otherAxis.used && otherAxis != axis) {\n // consider snapping min/max to outermost nice ticks\n var niceTicks = axis.tickGenerator(axis);\n if (niceTicks.length > 0) {\n if (opts.min == null)\n axis.min = Math.min(axis.min, niceTicks[0]);\n if (opts.max == null && niceTicks.length > 1)\n axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);\n }\n\n axis.tickGenerator = function (axis) {\n // copy ticks, scaled to this axis\n var ticks = [], v, i;\n for (i = 0; i < otherAxis.ticks.length; ++i) {\n v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);\n v = axis.min + v * (axis.max - axis.min);\n ticks.push(v);\n }\n return ticks;\n };\n\n // we might need an extra decimal since forced\n // ticks don't necessarily fit naturally\n if (!axis.mode && opts.tickDecimals == null) {\n var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),\n ts = axis.tickGenerator(axis);\n\n // only proceed if the tick interval rounded\n // with an extra decimal doesn't give us a\n // zero at end\n if (!(ts.length > 1 && /\\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))\n axis.tickDecimals = extraDec;\n }\n }\n }\n }\n\n function setTicks(axis) {\n var oticks = axis.options.ticks, ticks = [];\n if (oticks == null || (typeof oticks == \"number\" && oticks > 0))\n ticks = axis.tickGenerator(axis);\n else if (oticks) {\n if ($.isFunction(oticks))\n // generate the ticks\n ticks = oticks(axis);\n else\n ticks = oticks;\n }\n\n // clean up/labelify the supplied ticks, copy them over\n var i, v;\n axis.ticks = [];\n for (i = 0; i < ticks.length; ++i) {\n var label = null;\n var t = ticks[i];\n if (typeof t == \"object\") {\n v = +t[0];\n if (t.length > 1)\n label = t[1];\n }\n else\n v = +t;\n if (label == null)\n label = axis.tickFormatter(v, axis);\n if (!isNaN(v))\n axis.ticks.push({ v: v, label: label });\n }\n }\n\n function snapRangeToTicks(axis, ticks) {\n if (axis.options.autoscaleMargin && ticks.length > 0) {\n // snap to ticks\n if (axis.options.min == null)\n axis.min = Math.min(axis.min, ticks[0].v);\n if (axis.options.max == null && ticks.length > 1)\n axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);\n }\n }\n\n function draw() {\n\n surface.clear();\n\n executeHooks(hooks.drawBackground, [ctx]);\n\n var grid = options.grid;\n\n // draw background, if any\n if (grid.show && grid.backgroundColor)\n drawBackground();\n\n if (grid.show && !grid.aboveData) {\n drawGrid();\n }\n\n for (var i = 0; i < series.length; ++i) {\n executeHooks(hooks.drawSeries, [ctx, series[i]]);\n drawSeries(series[i]);\n }\n\n executeHooks(hooks.draw, [ctx]);\n\n if (grid.show && grid.aboveData) {\n drawGrid();\n }\n\n surface.render();\n\n // A draw implies that either the axes or data have changed, so we\n // should probably update the overlay highlights as well.\n\n triggerRedrawOverlay();\n }\n\n function extractRange(ranges, coord) {\n var axis, from, to, key, axes = allAxes();\n\n for (var i = 0; i < axes.length; ++i) {\n axis = axes[i];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? xaxes[0] : yaxes[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }\n\n function drawBackground() {\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, \"rgba(255, 255, 255, 0)\");\n ctx.fillRect(0, 0, plotWidth, plotHeight);\n ctx.restore();\n }\n\n function drawGrid() {\n var i, axes, bw, bc;\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // draw markings\n var markings = options.grid.markings;\n if (markings) {\n if ($.isFunction(markings)) {\n axes = plot.getAxes();\n // xmin etc. is backwards compatibility, to be\n // removed in the future\n axes.xmin = axes.xaxis.min;\n axes.xmax = axes.xaxis.max;\n axes.ymin = axes.yaxis.min;\n axes.ymax = axes.yaxis.max;\n\n markings = markings(axes);\n }\n\n for (i = 0; i < markings.length; ++i) {\n var m = markings[i],\n xrange = extractRange(m, \"x\"),\n yrange = extractRange(m, \"y\");\n\n // fill in missing\n if (xrange.from == null)\n xrange.from = xrange.axis.min;\n if (xrange.to == null)\n xrange.to = xrange.axis.max;\n if (yrange.from == null)\n yrange.from = yrange.axis.min;\n if (yrange.to == null)\n yrange.to = yrange.axis.max;\n\n // clip\n if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||\n yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)\n continue;\n\n xrange.from = Math.max(xrange.from, xrange.axis.min);\n xrange.to = Math.min(xrange.to, xrange.axis.max);\n yrange.from = Math.max(yrange.from, yrange.axis.min);\n yrange.to = Math.min(yrange.to, yrange.axis.max);\n\n var xequal = xrange.from === xrange.to,\n yequal = yrange.from === yrange.to;\n\n if (xequal && yequal) {\n continue;\n }\n\n // then draw\n xrange.from = Math.floor(xrange.axis.p2c(xrange.from));\n xrange.to = Math.floor(xrange.axis.p2c(xrange.to));\n yrange.from = Math.floor(yrange.axis.p2c(yrange.from));\n yrange.to = Math.floor(yrange.axis.p2c(yrange.to));\n\n if (xequal || yequal) {\n var lineWidth = m.lineWidth || options.grid.markingsLineWidth,\n subPixel = lineWidth % 2 ? 0.5 : 0;\n ctx.beginPath();\n ctx.strokeStyle = m.color || options.grid.markingsColor;\n ctx.lineWidth = lineWidth;\n if (xequal) {\n ctx.moveTo(xrange.to + subPixel, yrange.from);\n ctx.lineTo(xrange.to + subPixel, yrange.to);\n } else {\n ctx.moveTo(xrange.from, yrange.to + subPixel);\n ctx.lineTo(xrange.to, yrange.to + subPixel);\n }\n ctx.stroke();\n } else {\n ctx.fillStyle = m.color || options.grid.markingsColor;\n ctx.fillRect(xrange.from, yrange.to,\n xrange.to - xrange.from,\n yrange.from - yrange.to);\n }\n }\n }\n\n // draw the ticks\n axes = allAxes();\n bw = options.grid.borderWidth;\n\n for (var j = 0; j < axes.length; ++j) {\n var axis = axes[j], box = axis.box,\n t = axis.tickLength, x, y, xoff, yoff;\n if (!axis.show || axis.ticks.length == 0)\n continue;\n\n ctx.lineWidth = 1;\n\n // find the edges\n if (axis.direction == \"x\") {\n x = 0;\n if (t == \"full\")\n y = (axis.position == \"top\" ? 0 : plotHeight);\n else\n y = box.top - plotOffset.top + (axis.position == \"top\" ? box.height : 0);\n }\n else {\n y = 0;\n if (t == \"full\")\n x = (axis.position == \"left\" ? 0 : plotWidth);\n else\n x = box.left - plotOffset.left + (axis.position == \"left\" ? box.width : 0);\n }\n\n // draw tick bar\n if (!axis.innermost) {\n ctx.strokeStyle = axis.options.color;\n ctx.beginPath();\n xoff = yoff = 0;\n if (axis.direction == \"x\")\n xoff = plotWidth + 1;\n else\n yoff = plotHeight + 1;\n\n if (ctx.lineWidth == 1) {\n if (axis.direction == \"x\") {\n y = Math.floor(y) + 0.5;\n } else {\n x = Math.floor(x) + 0.5;\n }\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n ctx.stroke();\n }\n\n // draw ticks\n\n ctx.strokeStyle = axis.options.tickColor;\n\n ctx.beginPath();\n for (i = 0; i < axis.ticks.length; ++i) {\n var v = axis.ticks[i].v;\n\n xoff = yoff = 0;\n\n if (isNaN(v) || v < axis.min || v > axis.max\n // skip those lying on the axes if we got a border\n || (t == \"full\"\n && ((typeof bw == \"object\" && bw[axis.position] > 0) || bw > 0)\n && (v == axis.min || v == axis.max)))\n continue;\n\n if (axis.direction == \"x\") {\n x = axis.p2c(v);\n yoff = t == \"full\" ? -plotHeight : t;\n\n if (axis.position == \"top\")\n yoff = -yoff;\n }\n else {\n y = axis.p2c(v);\n xoff = t == \"full\" ? -plotWidth : t;\n\n if (axis.position == \"left\")\n xoff = -xoff;\n }\n\n if (ctx.lineWidth == 1) {\n if (axis.direction == \"x\")\n x = Math.floor(x) + 0.5;\n else\n y = Math.floor(y) + 0.5;\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n }\n\n ctx.stroke();\n }\n\n\n // draw border\n if (bw) {\n // If either borderWidth or borderColor is an object, then draw the border\n // line by line instead of as one rectangle\n bc = options.grid.borderColor;\n if(typeof bw == \"object\" || typeof bc == \"object\") {\n if (typeof bw !== \"object\") {\n bw = {top: bw, right: bw, bottom: bw, left: bw};\n }\n if (typeof bc !== \"object\") {\n bc = {top: bc, right: bc, bottom: bc, left: bc};\n }\n\n if (bw.top > 0) {\n ctx.strokeStyle = bc.top;\n ctx.lineWidth = bw.top;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left, 0 - bw.top/2);\n ctx.lineTo(plotWidth, 0 - bw.top/2);\n ctx.stroke();\n }\n\n if (bw.right > 0) {\n ctx.strokeStyle = bc.right;\n ctx.lineWidth = bw.right;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);\n ctx.lineTo(plotWidth + bw.right / 2, plotHeight);\n ctx.stroke();\n }\n\n if (bw.bottom > 0) {\n ctx.strokeStyle = bc.bottom;\n ctx.lineWidth = bw.bottom;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);\n ctx.lineTo(0, plotHeight + bw.bottom / 2);\n ctx.stroke();\n }\n\n if (bw.left > 0) {\n ctx.strokeStyle = bc.left;\n ctx.lineWidth = bw.left;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);\n ctx.lineTo(0- bw.left/2, 0);\n ctx.stroke();\n }\n }\n else {\n ctx.lineWidth = bw;\n ctx.strokeStyle = options.grid.borderColor;\n ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);\n }\n }\n\n ctx.restore();\n }\n\n function drawAxisLabels() {\n\n $.each(allAxes(), function (_, axis) {\n var box = axis.box,\n legacyStyles = axis.direction + \"Axis \" + axis.direction + axis.n + \"Axis\",\n layer = \"flot-\" + axis.direction + \"-axis flot-\" + axis.direction + axis.n + \"-axis \" + legacyStyles,\n font = axis.options.font || \"flot-tick-label tickLabel\",\n tick, x, y, halign, valign;\n\n // Remove text before checking for axis.show and ticks.length;\n // otherwise plugins, like flot-tickrotor, that draw their own\n // tick labels will end up with both theirs and the defaults.\n\n surface.removeText(layer);\n\n if (!axis.show || axis.ticks.length == 0)\n return;\n\n for (var i = 0; i < axis.ticks.length; ++i) {\n\n tick = axis.ticks[i];\n if (!tick.label || tick.v < axis.min || tick.v > axis.max)\n continue;\n\n if (axis.direction == \"x\") {\n halign = \"center\";\n x = plotOffset.left + axis.p2c(tick.v);\n if (axis.position == \"bottom\") {\n y = box.top + box.padding + box.eventSectionPadding;\n } else {\n y = box.top + box.height - box.padding;\n valign = \"bottom\";\n }\n } else {\n valign = \"middle\";\n y = plotOffset.top + axis.p2c(tick.v);\n if (axis.position == \"left\") {\n x = box.left + box.width - box.padding;\n halign = \"right\";\n } else {\n x = box.left + box.padding;\n }\n }\n\n surface.addText(layer, x, y, tick.label, font, null, null, halign, valign);\n }\n });\n }\n\n function drawSeries(series) {\n if (series.lines.show)\n drawSeriesLines(series);\n if (series.bars.show)\n drawSeriesBars(series);\n if (series.points.show)\n drawSeriesPoints(series);\n }\n\n function drawSeriesLines(series) {\n function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n prevx = null, prevy = null;\n\n ctx.beginPath();\n for (var i = ps; i < points.length; i += ps) {\n var x1 = points[i - ps], y1 = points[i - ps + 1],\n x2 = points[i], y2 = points[i + 1];\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min) {\n if (y2 < axisy.min)\n continue; // line segment is outside\n // compute new intersection point\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min) {\n if (y1 < axisy.min)\n continue;\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max) {\n if (y2 > axisy.max)\n continue;\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max) {\n if (y1 > axisy.max)\n continue;\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (x1 != prevx || y1 != prevy)\n ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);\n\n prevx = x2;\n prevy = y2;\n ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);\n }\n ctx.stroke();\n }\n\n function plotLineArea(datapoints, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n bottom = Math.min(Math.max(0, axisy.min), axisy.max),\n i = 0, top, areaOpen = false,\n ypos = 1, segmentStart = 0, segmentEnd = 0;\n\n // we process each segment in two turns, first forward\n // direction to sketch out top, then once we hit the\n // end we go backwards to sketch the bottom\n while (true) {\n if (ps > 0 && i > points.length + ps)\n break;\n\n i += ps; // ps is negative if going backwards\n\n var x1 = points[i - ps],\n y1 = points[i - ps + ypos],\n x2 = points[i], y2 = points[i + ypos];\n\n if (areaOpen) {\n if (ps > 0 && x1 != null && x2 == null) {\n // at turning point\n segmentEnd = i;\n ps = -ps;\n ypos = 2;\n continue;\n }\n\n if (ps < 0 && i == segmentStart + ps) {\n // done with the reverse sweep\n ctx.fill();\n areaOpen = false;\n ps = -ps;\n ypos = 1;\n i = segmentStart = segmentEnd + ps;\n continue;\n }\n }\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip x values\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (!areaOpen) {\n // open area\n ctx.beginPath();\n ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));\n areaOpen = true;\n }\n\n // now first check the case where both is outside\n if (y1 >= axisy.max && y2 >= axisy.max) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));\n continue;\n }\n else if (y1 <= axisy.min && y2 <= axisy.min) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));\n continue;\n }\n\n // else it's a bit more complicated, there might\n // be a flat maxed out rectangle first, then a\n // triangular cutout or reverse; to find these\n // keep track of the current x values\n var x1old = x1, x2old = x2;\n\n // clip the y values, without shortcutting, we\n // go through all cases in turn\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // if the x value was changed we got a rectangle\n // to fill\n if (x1 != x1old) {\n ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));\n // it goes to (x1, y1), but we fill that below\n }\n\n // fill triangular section, this sometimes result\n // in redundant points if (x1, y1) hasn't changed\n // from previous line to, but we just ignore that\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n\n // fill the other rectangle if it's there\n if (x2 != x2old) {\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));\n }\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n ctx.lineJoin = \"round\";\n\n var lw = series.lines.lineWidth,\n sw = series.shadowSize;\n // FIXME: consider another form of shadow when filling is turned on\n if (lw > 0 && sw > 0) {\n // draw shadow as a thick and thin line with transparency\n ctx.lineWidth = sw;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n // position shadow at angle from the mid of line\n var angle = Math.PI/18;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);\n ctx.lineWidth = sw/2;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n plotLineArea(series.datapoints, series.xaxis, series.yaxis);\n }\n\n if (lw > 0)\n plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function drawSeriesPoints(series) {\n function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n var x = points[i], y = points[i + 1];\n if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n continue;\n\n ctx.beginPath();\n x = axisx.p2c(x);\n y = axisy.p2c(y) + offset;\n if (symbol == \"circle\")\n ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);\n else\n symbol(ctx, x, y, radius, shadow);\n ctx.closePath();\n\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n ctx.fill();\n }\n ctx.stroke();\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n var lw = series.points.lineWidth,\n sw = series.shadowSize,\n radius = series.points.radius,\n symbol = series.points.symbol;\n\n // If the user sets the line width to 0, we change it to a very\n // small value. A line width of 0 seems to force the default of 1.\n // Doing the conditional here allows the shadow setting to still be\n // optional even with a lineWidth of 0.\n\n if( lw == 0 )\n lw = 0.0001;\n\n if (lw > 0 && sw > 0) {\n // draw shadow in two steps\n var w = sw / 2;\n ctx.lineWidth = w;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n plotPoints(series.datapoints, radius, null, w + w/2, true,\n series.xaxis, series.yaxis, symbol);\n\n ctx.strokeStyle = \"rgba(0,0,0,0.2)\";\n plotPoints(series.datapoints, radius, null, w/2, true,\n series.xaxis, series.yaxis, symbol);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n plotPoints(series.datapoints, radius,\n getFillStyle(series.points, series.color), 0, false,\n series.xaxis, series.yaxis, symbol);\n ctx.restore();\n }\n\n function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {\n var left, right, bottom, top,\n drawLeft, drawRight, drawTop, drawBottom,\n tmp;\n\n // in horizontal mode, we start the bar from the left\n // instead of from the bottom so it appears to be\n // horizontal rather than vertical\n if (horizontal) {\n drawBottom = drawRight = drawTop = true;\n drawLeft = false;\n left = b;\n right = x;\n top = y + barLeft;\n bottom = y + barRight;\n\n // account for negative bars\n if (right < left) {\n tmp = right;\n right = left;\n left = tmp;\n drawLeft = true;\n drawRight = false;\n }\n }\n else {\n drawLeft = drawRight = drawTop = true;\n drawBottom = false;\n left = x + barLeft;\n right = x + barRight;\n bottom = b;\n top = y;\n\n // account for negative bars\n if (top < bottom) {\n tmp = top;\n top = bottom;\n bottom = tmp;\n drawBottom = true;\n drawTop = false;\n }\n }\n\n // clip\n if (right < axisx.min || left > axisx.max ||\n top < axisy.min || bottom > axisy.max)\n return;\n\n if (left < axisx.min) {\n left = axisx.min;\n drawLeft = false;\n }\n\n if (right > axisx.max) {\n right = axisx.max;\n drawRight = false;\n }\n\n if (bottom < axisy.min) {\n bottom = axisy.min;\n drawBottom = false;\n }\n\n if (top > axisy.max) {\n top = axisy.max;\n drawTop = false;\n }\n\n left = axisx.p2c(left);\n bottom = axisy.p2c(bottom);\n right = axisx.p2c(right);\n top = axisy.p2c(top);\n\n // fill the bar\n if (fillStyleCallback) {\n c.fillStyle = fillStyleCallback(bottom, top);\n c.fillRect(left, top, right - left, bottom - top)\n }\n\n // draw outline\n if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {\n c.beginPath();\n\n // FIXME: inline moveTo is buggy with excanvas\n c.moveTo(left, bottom);\n if (drawLeft)\n c.lineTo(left, top);\n else\n c.moveTo(left, top);\n if (drawTop)\n c.lineTo(right, top);\n else\n c.moveTo(right, top);\n if (drawRight)\n c.lineTo(right, bottom);\n else\n c.moveTo(right, bottom);\n if (drawBottom)\n c.lineTo(left, bottom);\n else\n c.moveTo(left, bottom);\n c.stroke();\n }\n }\n\n function drawSeriesBars(series) {\n function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n if (points[i] == null)\n continue;\n drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // FIXME: figure out a way to add shadows (for instance along the right edge)\n ctx.lineWidth = series.bars.lineWidth;\n ctx.strokeStyle = series.color;\n\n var barLeft;\n\n switch (series.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -series.bars.barWidth;\n break;\n default:\n barLeft = -series.bars.barWidth / 2;\n }\n\n var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;\n plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, fillStyleCallback, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function getFillStyle(filloptions, seriesColor, bottom, top) {\n var fill = filloptions.fill;\n if (!fill)\n return null;\n\n if (filloptions.fillColor)\n return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);\n\n var c = $.color.parse(seriesColor);\n c.a = typeof fill == \"number\" ? fill : 0.4;\n c.normalize();\n return c.toString();\n }\n\n function insertLegend() {\n\n if (options.legend.container != null) {\n $(options.legend.container).html(\"\");\n } else {\n placeholder.find(\".legend\").remove();\n }\n\n if (!options.legend.show) {\n return;\n }\n\n var fragments = [], entries = [], rowStarted = false,\n lf = options.legend.labelFormatter, s, label;\n\n // Build a list of legend entries, with each having a label and a color\n\n for (var i = 0; i < series.length; ++i) {\n s = series[i];\n if (s.label) {\n label = lf ? lf(s.label, s) : s.label;\n if (label) {\n entries.push({\n label: label,\n color: s.color\n });\n }\n }\n }\n\n // Sort the legend using either the default or a custom comparator\n\n if (options.legend.sorted) {\n if ($.isFunction(options.legend.sorted)) {\n entries.sort(options.legend.sorted);\n } else if (options.legend.sorted == \"reverse\") {\n \tentries.reverse();\n } else {\n var ascending = options.legend.sorted != \"descending\";\n entries.sort(function(a, b) {\n return a.label == b.label ? 0 : (\n (a.label < b.label) != ascending ? 1 : -1 // Logical XOR\n );\n });\n }\n }\n\n // Generate markup for the list of entries, in their final order\n\n for (var i = 0; i < entries.length; ++i) {\n\n var entry = entries[i];\n\n if (i % options.legend.noColumns == 0) {\n if (rowStarted)\n fragments.push('');\n fragments.push('');\n rowStarted = true;\n }\n\n fragments.push(\n '
' +\n '' + entry.label + ''\n );\n }\n\n if (rowStarted)\n fragments.push('');\n\n if (fragments.length == 0)\n return;\n\n var table = '' + fragments.join(\"\") + '
';\n if (options.legend.container != null)\n $(options.legend.container).html(table);\n else {\n var pos = \"\",\n p = options.legend.position,\n m = options.legend.margin;\n if (m[0] == null)\n m = [m, m];\n if (p.charAt(0) == \"n\")\n pos += 'top:' + (m[1] + plotOffset.top) + 'px;';\n else if (p.charAt(0) == \"s\")\n pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';\n if (p.charAt(1) == \"e\")\n pos += 'right:' + (m[0] + plotOffset.right) + 'px;';\n else if (p.charAt(1) == \"w\")\n pos += 'left:' + (m[0] + plotOffset.left) + 'px;';\n var legend = $('
' + table.replace('style=\"', 'style=\"position:absolute;' + pos +';') + '
').appendTo(placeholder);\n if (options.legend.backgroundOpacity != 0.0) {\n // put in the transparent background\n // separately to avoid blended labels and\n // label boxes\n var c = options.legend.backgroundColor;\n if (c == null) {\n c = options.grid.backgroundColor;\n if (c && typeof c == \"string\")\n c = $.color.parse(c);\n else\n c = $.color.extract(legend, 'background-color');\n c.a = 1;\n c = c.toString();\n }\n var div = legend.children();\n $('
').prependTo(legend).css('opacity', options.legend.backgroundOpacity);\n }\n }\n }\n\n\n // interactive features\n\n var highlights = [],\n redrawTimeout = null;\n\n // returns the data item the mouse is over, or null if none is found\n function findNearbyItem(mouseX, mouseY, seriesFilter) {\n var maxDistance = options.grid.mouseActiveRadius,\n smallestDistance = maxDistance * maxDistance + 1,\n item = null, foundPoint = false, i, j, ps;\n\n for (i = series.length - 1; i >= 0; --i) {\n if (!seriesFilter(series[i]))\n continue;\n\n var s = series[i],\n axisx = s.xaxis,\n axisy = s.yaxis,\n points = s.datapoints.points,\n mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster\n my = axisy.c2p(mouseY),\n maxx = maxDistance / axisx.scale,\n maxy = maxDistance / axisy.scale;\n\n ps = s.datapoints.pointsize;\n // with inverse transforms, we can't use the maxx/maxy\n // optimization, sadly\n if (axisx.options.inverseTransform)\n maxx = Number.MAX_VALUE;\n if (axisy.options.inverseTransform)\n maxy = Number.MAX_VALUE;\n\n if (s.lines.show || s.points.show) {\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1];\n if (x == null)\n continue;\n\n // For points and lines, the cursor must be within a\n // certain distance to the data point\n if (x - mx > maxx || x - mx < -maxx ||\n y - my > maxy || y - my < -maxy)\n continue;\n\n // We have to calculate distances in pixels, not in\n // data units, because the scales of the axes may be different\n var dx = Math.abs(axisx.p2c(x) - mouseX),\n dy = Math.abs(axisy.p2c(y) - mouseY),\n dist = dx * dx + dy * dy; // we save the sqrt\n\n // use <= to ensure last point takes precedence\n // (last generally means on top of)\n if (dist < smallestDistance) {\n smallestDistance = dist;\n item = [i, j / ps];\n }\n }\n }\n\n if (s.bars.show && !item) { // no other point can be nearby\n\n var barLeft, barRight;\n\n switch (s.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -s.bars.barWidth;\n break;\n default:\n barLeft = -s.bars.barWidth / 2;\n }\n\n barRight = barLeft + s.bars.barWidth;\n\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1], b = points[j + 2];\n if (x == null)\n continue;\n\n // for a bar graph, the cursor must be inside the bar\n if (series[i].bars.horizontal ?\n (mx <= Math.max(b, x) && mx >= Math.min(b, x) &&\n my >= y + barLeft && my <= y + barRight) :\n (mx >= x + barLeft && mx <= x + barRight &&\n my >= Math.min(b, y) && my <= Math.max(b, y)))\n item = [i, j / ps];\n }\n }\n }\n\n if (item) {\n i = item[0];\n j = item[1];\n ps = series[i].datapoints.pointsize;\n\n return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),\n dataIndex: j,\n series: series[i],\n seriesIndex: i };\n }\n\n return null;\n }\n\n function onMouseMove(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return s[\"hoverable\"] != false; });\n }\n\n function onMouseLeave(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return false; });\n }\n\n function onClick(e) {\n if (plot.isSelecting) {\n return;\n }\n\n triggerClickHoverEvent(\"plotclick\", e, function (s) { return s[\"clickable\"] != false; });\n }\n\n // trigger click or hover event (they send the same parameters\n // so we share their code)\n function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n // Add ctrlKey and metaKey to event\n pos.ctrlKey = event.ctrlKey;\n pos.metaKey = event.metaKey;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }\n\n function triggerRedrawOverlay() {\n var t = options.interaction.redrawOverlayInterval;\n if (t == -1) { // skip event queue\n drawOverlay();\n return;\n }\n\n if (!redrawTimeout)\n redrawTimeout = setTimeout(drawOverlay, t);\n }\n\n function drawOverlay() {\n redrawTimeout = null;\n\n // draw highlights\n octx.save();\n overlay.clear();\n octx.translate(plotOffset.left, plotOffset.top);\n\n var i, hi;\n for (i = 0; i < highlights.length; ++i) {\n hi = highlights[i];\n\n if (hi.series.bars.show)\n drawBarHighlight(hi.series, hi.point);\n else\n drawPointHighlight(hi.series, hi.point);\n }\n octx.restore();\n\n executeHooks(hooks.drawOverlay, [octx]);\n }\n\n function highlight(s, point, auto) {\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\") {\n var ps = s.datapoints.pointsize;\n point = s.datapoints.points.slice(ps * point, ps * (point + 1));\n }\n\n var i = indexOfHighlight(s, point);\n if (i == -1) {\n highlights.push({ series: s, point: point, auto: auto });\n\n triggerRedrawOverlay();\n }\n else if (!auto)\n highlights[i].auto = false;\n }\n\n function unhighlight(s, point) {\n if (s == null && point == null) {\n highlights = [];\n triggerRedrawOverlay();\n return;\n }\n\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\") {\n var ps = s.datapoints.pointsize;\n point = s.datapoints.points.slice(ps * point, ps * (point + 1));\n }\n\n var i = indexOfHighlight(s, point);\n if (i != -1) {\n highlights.splice(i, 1);\n\n triggerRedrawOverlay();\n }\n }\n\n function indexOfHighlight(s, p) {\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.series == s && h.point[0] == p[0]\n && h.point[1] == p[1])\n return i;\n }\n return -1;\n }\n\n function drawPointHighlight(series, point) {\n var x = point[0], y = point[1],\n axisx = series.xaxis, axisy = series.yaxis,\n highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();\n\n if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n return;\n\n var pointRadius = series.points.radius + series.points.lineWidth / 2;\n octx.lineWidth = pointRadius;\n octx.strokeStyle = highlightColor;\n var radius = 1.5 * pointRadius;\n x = axisx.p2c(x);\n y = axisy.p2c(y);\n\n octx.beginPath();\n if (series.points.symbol == \"circle\")\n octx.arc(x, y, radius, 0, 2 * Math.PI, false);\n else\n series.points.symbol(octx, x, y, radius, false);\n octx.closePath();\n octx.stroke();\n }\n\n function drawBarHighlight(series, point) {\n var highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),\n fillStyle = highlightColor,\n barLeft;\n\n switch (series.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -series.bars.barWidth;\n break;\n default:\n barLeft = -series.bars.barWidth / 2;\n }\n\n octx.lineWidth = series.bars.lineWidth;\n octx.strokeStyle = highlightColor;\n\n drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,\n function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);\n }\n\n function getColorOrGradient(spec, bottom, top, defaultColor) {\n if (typeof spec == \"string\")\n return spec;\n else {\n // assume this is a gradient spec; IE currently only\n // supports a simple vertical gradient properly, so that's\n // what we support too\n var gradient = ctx.createLinearGradient(0, top, 0, bottom);\n\n for (var i = 0, l = spec.colors.length; i < l; ++i) {\n var c = spec.colors[i];\n if (typeof c != \"string\") {\n var co = $.color.parse(defaultColor);\n if (c.brightness != null)\n co = co.scale('rgb', c.brightness);\n if (c.opacity != null)\n co.a *= c.opacity;\n c = co.toString();\n }\n gradient.addColorStop(i / (l - 1), c);\n }\n\n return gradient;\n }\n }\n }\n\n // Add the plot function to the top level of the jQuery object\n\n $.plot = function(placeholder, data, options) {\n //var t0 = new Date();\n var plot = new Plot($(placeholder), data, options, $.plot.plugins);\n //(window.console ? console.log : alert)(\"time used (msecs): \" + ((new Date()).getTime() - t0.getTime()));\n return plot;\n };\n\n $.plot.version = \"0.8.3\";\n\n $.plot.plugins = [];\n\n // Also add the plot function as a chainable property\n\n $.fn.plot = function(data, options) {\n return this.each(function() {\n $.plot(this, data, options);\n });\n };\n\n // round to nearby lower multiple of base\n function floorInBase(n, base) {\n return base * Math.floor(n / base);\n }\n\n})(jQuery);\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.js?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.selection.js": +/*!**********************************************!*\ + !*** ./vendor/flot/jquery.flot.selection.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/* Flot plugin for selecting regions of a plot.\n\nCopyright (c) 2007-2013 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nThe plugin supports these options:\n\nselection: {\n\tmode: null or \"x\" or \"y\" or \"xy\",\n\tcolor: color,\n\tshape: \"round\" or \"miter\" or \"bevel\",\n\tminSize: number of pixels\n}\n\nSelection support is enabled by setting the mode to one of \"x\", \"y\" or \"xy\".\nIn \"x\" mode, the user will only be able to specify the x range, similarly for\n\"y\" mode. For \"xy\", the selection becomes a rectangle where both ranges can be\nspecified. \"color\" is color of the selection (if you need to change the color\nlater on, you can get to it with plot.getOptions().selection.color). \"shape\"\nis the shape of the corners of the selection.\n\n\"minSize\" is the minimum size a selection can be in pixels. This value can\nbe customized to determine the smallest size a selection can be and still\nhave the selection rectangle be displayed. When customizing this value, the\nfact that it refers to pixels, not axis units must be taken into account.\nThus, for example, if there is a bar graph in time mode with BarWidth set to 1\nminute, setting \"minSize\" to 1 will not make the minimum selection size 1\nminute, but rather 1 pixel. Note also that setting \"minSize\" to 0 will prevent\n\"plotunselected\" events from being fired when the user clicks the mouse without\ndragging.\n\nWhen selection support is enabled, a \"plotselected\" event will be emitted on\nthe DOM element you passed into the plot function. The event handler gets a\nparameter with the ranges selected on the axes, like this:\n\n\tplaceholder.bind( \"plotselected\", function( event, ranges ) {\n\t\talert(\"You selected \" + ranges.xaxis.from + \" to \" + ranges.xaxis.to)\n\t\t// similar for yaxis - with multiple axes, the extra ones are in\n\t\t// x2axis, x3axis, ...\n\t});\n\nThe \"plotselected\" event is only fired when the user has finished making the\nselection. A \"plotselecting\" event is fired during the process with the same\nparameters as the \"plotselected\" event, in case you want to know what's\nhappening while it's happening,\n\nA \"plotunselected\" event with no arguments is emitted when the user clicks the\nmouse to remove the selection. As stated above, setting \"minSize\" to 0 will\ndestroy this behavior.\n\nThe plugin allso adds the following methods to the plot object:\n\n- setSelection( ranges, preventEvent )\n\n Set the selection rectangle. The passed in ranges is on the same form as\n returned in the \"plotselected\" event. If the selection mode is \"x\", you\n should put in either an xaxis range, if the mode is \"y\" you need to put in\n an yaxis range and both xaxis and yaxis if the selection mode is \"xy\", like\n this:\n\n\tsetSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } });\n\n setSelection will trigger the \"plotselected\" event when called. If you don't\n want that to happen, e.g. if you're inside a \"plotselected\" handler, pass\n true as the second parameter. If you are using multiple axes, you can\n specify the ranges on any of those, e.g. as x2axis/x3axis/... instead of\n xaxis, the plugin picks the first one it sees.\n\n- clearSelection( preventEvent )\n\n Clear the selection rectangle. Pass in true to avoid getting a\n \"plotunselected\" event.\n\n- getSelection()\n\n Returns the current selection in the same format as the \"plotselected\"\n event. If there's currently no selection, the function returns null.\n\n*/\n\n(function ($) {\n function init(plot) {\n var selection = {\n first: { x: -1, y: -1}, second: { x: -1, y: -1},\n show: false,\n active: false\n };\n\n // FIXME: The drag handling implemented here should be\n // abstracted out, there's some similar code from a library in\n // the navigation plugin, this should be massaged a bit to fit\n // the Flot cases here better and reused. Doing this would\n // make this plugin much slimmer.\n var savedhandlers = {};\n\n var mouseUpHandler = null;\n\n function onMouseMove(e) {\n if (selection.active) {\n updateSelection(e);\n\n plot.getPlaceholder().trigger(\"plotselecting\", [ getSelection() ]);\n }\n }\n\n function onMouseDown(e) {\n if (e.which != 1) // only accept left-click\n return;\n\n // cancel out any text selections\n document.body.focus();\n\n // prevent text selection and drag in old-school browsers\n if (document.onselectstart !== undefined && savedhandlers.onselectstart == null) {\n savedhandlers.onselectstart = document.onselectstart;\n document.onselectstart = function () { return false; };\n }\n if (document.ondrag !== undefined && savedhandlers.ondrag == null) {\n savedhandlers.ondrag = document.ondrag;\n document.ondrag = function () { return false; };\n }\n\n setSelectionPos(selection.first, e);\n\n selection.active = true;\n\n // this is a bit silly, but we have to use a closure to be\n // able to whack the same handler again\n mouseUpHandler = function (e) { onMouseUp(e); };\n\n $(document).one(\"mouseup\", mouseUpHandler);\n }\n\n function onMouseUp(e) {\n mouseUpHandler = null;\n\n // revert drag stuff for old-school browsers\n if (document.onselectstart !== undefined)\n document.onselectstart = savedhandlers.onselectstart;\n if (document.ondrag !== undefined)\n document.ondrag = savedhandlers.ondrag;\n\n // no more dragging\n selection.active = false;\n updateSelection(e);\n\n if (selectionIsSane())\n triggerSelectedEvent(e);\n else {\n // this counts as a clear\n plot.getPlaceholder().trigger(\"plotunselected\", [ ]);\n plot.getPlaceholder().trigger(\"plotselecting\", [ null ]);\n }\n\n setTimeout(function() {\n plot.isSelecting = false;\n }, 10);\n\n return false;\n }\n\n function getSelection() {\n if (!selectionIsSane())\n return null;\n\n if (!selection.show) return null;\n\n var r = {}, c1 = selection.first, c2 = selection.second;\n var axes = plot.getAxes();\n // look if no axis is used\n var noAxisInUse = true;\n $.each(axes, function (name, axis) {\n if (axis.used) {\n anyUsed = false;\n }\n })\n\n $.each(axes, function (name, axis) {\n if (axis.used || noAxisInUse) {\n var p1 = axis.c2p(c1[axis.direction]), p2 = axis.c2p(c2[axis.direction]);\n r[name] = { from: Math.min(p1, p2), to: Math.max(p1, p2) };\n }\n });\n return r;\n }\n\n function triggerSelectedEvent(event) {\n var r = getSelection();\n\n // Add ctrlKey and metaKey to event\n r.ctrlKey = event.ctrlKey;\n r.metaKey = event.metaKey;\n\n plot.getPlaceholder().trigger(\"plotselected\", [ r ]);\n\n // backwards-compat stuff, to be removed in future\n if (r.xaxis && r.yaxis)\n plot.getPlaceholder().trigger(\"selected\", [ { x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to } ]);\n }\n\n function clamp(min, value, max) {\n return value < min ? min: (value > max ? max: value);\n }\n\n function setSelectionPos(pos, e) {\n var o = plot.getOptions();\n var offset = plot.getPlaceholder().offset();\n var plotOffset = plot.getPlotOffset();\n pos.x = clamp(0, e.pageX - offset.left - plotOffset.left, plot.width());\n pos.y = clamp(0, e.pageY - offset.top - plotOffset.top, plot.height());\n\n if (o.selection.mode == \"y\")\n pos.x = pos == selection.first ? 0 : plot.width();\n\n if (o.selection.mode == \"x\")\n pos.y = pos == selection.first ? 0 : plot.height();\n }\n\n function updateSelection(pos) {\n if (pos.pageX == null)\n return;\n\n setSelectionPos(selection.second, pos);\n if (selectionIsSane()) {\n plot.isSelecting = true;\n selection.show = true;\n plot.triggerRedrawOverlay();\n }\n else\n clearSelection(true);\n }\n\n function clearSelection(preventEvent) {\n if (selection.show) {\n selection.show = false;\n plot.triggerRedrawOverlay();\n if (!preventEvent)\n plot.getPlaceholder().trigger(\"plotunselected\", [ ]);\n }\n }\n\n // function taken from markings support in Flot\n function extractRange(ranges, coord) {\n var axis, from, to, key, axes = plot.getAxes();\n\n for (var k in axes) {\n axis = axes[k];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? plot.getXAxes()[0] : plot.getYAxes()[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }\n\n function setSelection(ranges, preventEvent) {\n var axis, range, o = plot.getOptions();\n\n if (o.selection.mode == \"y\") {\n selection.first.x = 0;\n selection.second.x = plot.width();\n }\n else {\n range = extractRange(ranges, \"x\");\n\n selection.first.x = range.axis.p2c(range.from);\n selection.second.x = range.axis.p2c(range.to);\n }\n\n if (o.selection.mode == \"x\") {\n selection.first.y = 0;\n selection.second.y = plot.height();\n }\n else {\n range = extractRange(ranges, \"y\");\n\n selection.first.y = range.axis.p2c(range.from);\n selection.second.y = range.axis.p2c(range.to);\n }\n\n selection.show = true;\n plot.triggerRedrawOverlay();\n if (!preventEvent && selectionIsSane())\n triggerSelectedEvent();\n }\n\n function selectionIsSane() {\n var minSize = plot.getOptions().selection.minSize;\n return Math.abs(selection.second.x - selection.first.x) >= minSize &&\n Math.abs(selection.second.y - selection.first.y) >= minSize;\n }\n\n plot.clearSelection = clearSelection;\n plot.setSelection = setSelection;\n plot.getSelection = getSelection;\n\n plot.hooks.bindEvents.push(function(plot, eventHolder) {\n var o = plot.getOptions();\n if (o.selection.mode != null) {\n eventHolder.mousemove(onMouseMove);\n eventHolder.mousedown(onMouseDown);\n }\n });\n\n\n plot.hooks.drawOverlay.push(function (plot, ctx) {\n // draw selection\n if (selection.show && selectionIsSane()) {\n var plotOffset = plot.getPlotOffset();\n var o = plot.getOptions();\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n var c = $.color.parse(o.selection.color);\n\n ctx.strokeStyle = c.scale('a', o.selection.strokeAlpha).toString();\n ctx.lineWidth = 1;\n ctx.lineJoin = o.selection.shape;\n ctx.fillStyle = c.scale('a', o.selection.fillAlpha).toString();\n\n var x = Math.min(selection.first.x, selection.second.x) + 0.5,\n y = Math.min(selection.first.y, selection.second.y) + 0.5,\n w = Math.abs(selection.second.x - selection.first.x) - 1,\n h = Math.abs(selection.second.y - selection.first.y) - 1;\n\n ctx.fillRect(x, y, w, h);\n ctx.strokeRect(x, y, w, h);\n\n ctx.restore();\n }\n });\n\n plot.hooks.shutdown.push(function (plot, eventHolder) {\n eventHolder.unbind(\"mousemove\", onMouseMove);\n eventHolder.unbind(\"mousedown\", onMouseDown);\n\n if (mouseUpHandler)\n $(document).unbind(\"mouseup\", mouseUpHandler);\n });\n\n }\n\n $.plot.plugins.push({\n init: init,\n options: {\n selection: {\n mode: null, // one of null, \"x\", \"y\" or \"xy\"\n color: \"#e8cfac\",\n shape: \"round\", // one of \"round\", \"miter\", or \"bevel\"\n minSize: 5, // minimum number of pixels\n strokeAlpha: 0.8,\n fillAlpha: 0.4,\n }\n },\n name: 'selection',\n version: '1.1'\n });\n})(jQuery);\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.selection.js?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.stack.js": +/*!******************************************!*\ + !*** ./vendor/flot/jquery.flot.stack.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/* Flot plugin for stacking data sets rather than overlyaing them.\n\nCopyright (c) 2007-2014 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nThe plugin assumes the data is sorted on x (or y if stacking horizontally).\nFor line charts, it is assumed that if a line has an undefined gap (from a\nnull point), then the line above it should have the same gap - insert zeros\ninstead of \"null\" if you want another behaviour. This also holds for the start\nand end of the chart. Note that stacking a mix of positive and negative values\nin most instances doesn't make sense (so it looks weird).\n\nTwo or more series are stacked when their \"stack\" attribute is set to the same\nkey (which can be any number or string or just \"true\"). To specify the default\nstack, you can set the stack option like this:\n\n series: {\n stack: null/false, true, or a key (number/string)\n }\n\nYou can also specify it for a single series, like this:\n\n $.plot( $(\"#placeholder\"), [{\n data: [ ... ],\n stack: true\n }])\n\nThe stacking order is determined by the order of the data series in the array\n(later series end up on top of the previous).\n\nInternally, the plugin modifies the datapoints in each series, adding an\noffset to the y value. For line series, extra data points are inserted through\ninterpolation. If there's a second y value, it's also adjusted (e.g for bar\ncharts or filled areas).\n\n*/\n\n(function ($) {\n var options = {\n series: { stack: null } // or number/string\n };\n\n function init(plot) {\n function findMatchingSeries(s, allseries) {\n var res = null;\n for (var i = 0; i < allseries.length; ++i) {\n if (s == allseries[i])\n break;\n\n if (allseries[i].stack == s.stack)\n res = allseries[i];\n }\n\n return res;\n }\n\n function stackData(plot, s, datapoints) {\n if (s.stack == null || s.stack === false)\n return;\n\n var other = findMatchingSeries(s, plot.getData());\n if (!other)\n return;\n\n var ps = datapoints.pointsize,\n points = datapoints.points,\n otherps = other.datapoints.pointsize,\n otherpoints = other.datapoints.points,\n newpoints = [],\n px, py, intery, qx, qy, bottom,\n withlines = s.lines.show,\n horizontal = s.bars.horizontal,\n withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),\n withsteps = withlines && s.lines.steps,\n keyOffset = horizontal ? 1 : 0,\n accumulateOffset = horizontal ? 0 : 1,\n i = 0, j = 0, l, m;\n\n while (true) {\n if (i >= points.length && j >= otherpoints.length)\n break;\n\n l = newpoints.length;\n\n if (i < points.length && points[i] == null) {\n // copy gaps\n for (m = 0; m < ps; ++m)\n newpoints.push(points[i + m]);\n i += ps;\n }\n else if (i >= points.length) {\n // take the remaining points from the previous series\n for (m = 0; m < ps; ++m)\n newpoints.push(otherpoints[j + m]);\n if (withbottom)\n newpoints[l + 2] = otherpoints[j + accumulateOffset];\n j += otherps;\n }\n else if (j >= otherpoints.length) {\n // take the remaining points from the current series\n for (m = 0; m < ps; ++m)\n newpoints.push(points[i + m]);\n i += ps;\n }\n else if (j < otherpoints.length && otherpoints[j] == null) {\n // ignore point\n j += otherps;\n }\n else {\n // cases where we actually got two points\n px = points[i + keyOffset];\n py = points[i + accumulateOffset];\n qx = otherpoints[j + keyOffset];\n qy = otherpoints[j + accumulateOffset];\n bottom = 0;\n\n if (px == qx) {\n for (m = 0; m < ps; ++m)\n newpoints.push(points[i + m]);\n\n newpoints[l + accumulateOffset] += qy;\n bottom = qy;\n\n i += ps;\n j += otherps;\n }\n else if (px > qx) {\n // take the point from the previous series so that next series will correctly stack\n if (i == 0) {\n for (m = 0; m < ps; ++m)\n newpoints.push(otherpoints[j + m]);\n bottom = qy;\n }\n // we got past point below, might need to\n // insert interpolated extra point\n if (i > 0 && points[i - ps] != null) {\n intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px);\n newpoints.push(qx);\n newpoints.push(intery + qy);\n for (m = 2; m < ps; ++m)\n newpoints.push(points[i + m]);\n bottom = qy;\n }\n\n j += otherps;\n }\n else { // px < qx\n for (m = 0; m < ps; ++m)\n newpoints.push(points[i + m]);\n\n // we might be able to interpolate a point below,\n // this can give us a better y\n if (j > 0 && otherpoints[j - otherps] != null)\n bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);\n\n newpoints[l + accumulateOffset] += bottom;\n\n i += ps;\n }\n\n fromgap = false;\n\n if (l != newpoints.length && withbottom)\n newpoints[l + 2] = bottom;\n }\n\n // maintain the line steps invariant\n if (withsteps && l != newpoints.length && l > 0\n && newpoints[l] != null\n && newpoints[l] != newpoints[l - ps]\n && newpoints[l + 1] != newpoints[l - ps + 1]) {\n for (m = 0; m < ps; ++m)\n newpoints[l + ps + m] = newpoints[l + m];\n newpoints[l + 1] = newpoints[l - ps + 1];\n }\n }\n\n datapoints.points = newpoints;\n }\n\n plot.hooks.processDatapoints.push(stackData);\n }\n\n $.plot.plugins.push({\n init: init,\n options: options,\n name: 'stack',\n version: '1.2'\n });\n})(jQuery);\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.stack.js?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.stackpercent.js": +/*!*************************************************!*\ + !*** ./vendor/flot/jquery.flot.stackpercent.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("(function ($) {\n var options = {\n series: {\n stackpercent: null\n } // or number/string\n };\n\n function init(plot) {\n\n // will be built up dynamically as a hash from x-value, or y-value if horizontal\n var stackBases = {};\n var processed = false;\n var stackSums = {};\n\n //set percentage for stacked chart\n function processRawData(plot, series, data, datapoints) {\n if (!processed) {\n processed = true;\n stackSums = getStackSums(plot.getData());\n }\n\t\t\tif (series.stackpercent == true) {\n\t\t\t\tvar num = data.length;\n\t\t\t\tseries.percents = [];\n\t\t\t\tvar key_idx = 0;\n\t\t\t\tvar value_idx = 1;\n\t\t\t\tif (series.bars && series.bars.horizontal && series.bars.horizontal === true) {\n\t\t\t\t\tkey_idx = 1;\n\t\t\t\t\tvalue_idx = 0;\n\t\t\t\t}\n\t\t\t\tfor (var j = 0; j < num; j++) {\n\t\t\t\t\tvar sum = stackSums[data[j][key_idx] + \"\"];\n\t\t\t\t\tif (sum > 0) {\n\t\t\t\t\t\tseries.percents.push(data[j][value_idx] * 100 / sum);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tseries.percents.push(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\n\n //calculate summary\n function getStackSums(_data) {\n var data_len = _data.length;\n var sums = {};\n if (data_len > 0) {\n //caculate summary\n for (var i = 0; i < data_len; i++) {\n if (_data[i].stackpercent) {\n\t\t\t\t\t\tvar key_idx = 0;\n\t\t\t\t\t\tvar value_idx = 1;\n\t\t\t\t\t\tif (_data[i].bars && _data[i].bars.horizontal && _data[i].bars.horizontal === true) {\n\t\t\t\t\t\t\tkey_idx = 1;\n\t\t\t\t\t\t\tvalue_idx = 0;\n\t\t\t\t\t\t}\n var num = _data[i].data.length;\n for (var j = 0; j < num; j++) {\n var value = 0;\n if (_data[i].data[j][1] != null) {\n value = _data[i].data[j][value_idx];\n }\n if (sums[_data[i].data[j][key_idx] + \"\"]) {\n sums[_data[i].data[j][key_idx] + \"\"] += value;\n } else {\n sums[_data[i].data[j][key_idx] + \"\"] = value;\n }\n\n }\n }\n }\n }\n return sums;\n }\n\n function stackData(plot, s, datapoints) {\n if (!s.stackpercent) return;\n if (!processed) {\n stackSums = getStackSums(plot.getData());\n }\n var newPoints = [];\n\n\n\t\t\tvar key_idx = 0;\n\t\t\tvar value_idx = 1;\n\t\t\tif (s.bars && s.bars.horizontal && s.bars.horizontal === true) {\n\t\t\t\tkey_idx = 1;\n\t\t\t\tvalue_idx = 0;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < datapoints.points.length; i += 3) {\n\t\t\t\t// note that the values need to be turned into absolute y-values.\n\t\t\t\t// in other words, if you were to stack (x, y1), (x, y2), and (x, y3),\n\t\t\t\t// (each from different series, which is where stackBases comes in),\n\t\t\t\t// you'd want the new points to be (x, y1, 0), (x, y1+y2, y1), (x, y1+y2+y3, y1+y2)\n\t\t\t\t// generally, (x, thisValue + (base up to this point), + (base up to this point))\n\t\t\t\tif (!stackBases[datapoints.points[i + key_idx]]) {\n\t\t\t\t\tstackBases[datapoints.points[i + key_idx]] = 0;\n\t\t\t\t}\n\t\t\t\tnewPoints[i + key_idx] = datapoints.points[i + key_idx];\n\t\t\t\tnewPoints[i + value_idx] = datapoints.points[i + value_idx] + stackBases[datapoints.points[i + key_idx]];\n\t\t\t\tnewPoints[i + 2] = stackBases[datapoints.points[i + key_idx]];\n\t\t\t\tstackBases[datapoints.points[i + key_idx]] += datapoints.points[i + value_idx];\n\t\t\t\t// change points to percentage values\n\t\t\t\t// you may need to set yaxis:{ max = 100 }\n\t\t\t\tif ( stackSums[newPoints[i+key_idx]+\"\"] > 0 ){\n\t\t\t\t\tnewPoints[i + value_idx] = newPoints[i + value_idx] * 100 / stackSums[newPoints[i + key_idx] + \"\"];\n\t\t\t\t\tnewPoints[i + 2] = newPoints[i + 2] * 100 / stackSums[newPoints[i + key_idx] + \"\"];\n\t\t\t\t} else {\n\t\t\t\t\tnewPoints[i + value_idx] = 0;\n\t\t\t\t\tnewPoints[i + 2] = 0;\n\t\t\t\t}\n\t\t\t}\n\n datapoints.points = newPoints;\n }\n\n\t\tplot.hooks.processRawData.push(processRawData);\n plot.hooks.processDatapoints.push(stackData);\n }\n\n $.plot.plugins.push({\n init: init,\n options: options,\n name: 'stackpercent',\n version: '0.1'\n });\n})(jQuery);\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.stackpercent.js?"); + +/***/ }), + +/***/ "./vendor/flot/jquery.flot.time.js": +/*!*****************************************!*\ + !*** ./vendor/flot/jquery.flot.time.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("/* Pretty handling of time axes.\n\nCopyright (c) 2007-2013 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nSet axis.mode to \"time\" to enable. See the section \"Time series data\" in\nAPI.txt for details.\n\n*/\n\n(function($) {\n\n\tvar options = {\n\t\txaxis: {\n\t\t\ttimezone: null,\t\t// \"browser\" for local to the client or timezone for timezone-js\n\t\t\ttimeformat: null,\t// format string to use\n\t\t\ttwelveHourClock: false,\t// 12 or 24 time in time mode\n\t\t\tmonthNames: null\t// list of names of months\n\t\t}\n\t};\n\n\t// round to nearby lower multiple of base\n\n\tfunction floorInBase(n, base) {\n\t\treturn base * Math.floor(n / base);\n\t}\n\n\t// Returns a string with the date d formatted according to fmt.\n\t// A subset of the Open Group's strftime format is supported.\n\n\tfunction formatDate(d, fmt, monthNames, dayNames) {\n\n\t\tif (typeof d.strftime == \"function\") {\n\t\t\treturn d.strftime(fmt);\n\t\t}\n\n\t\tvar leftPad = function(n, pad) {\n\t\t\tn = \"\" + n;\n\t\t\tpad = \"\" + (pad == null ? \"0\" : pad);\n\t\t\treturn n.length == 1 ? pad + n : n;\n\t\t};\n\n\t\tvar r = [];\n\t\tvar escape = false;\n\t\tvar hours = d.getHours();\n\t\tvar isAM = hours < 12;\n\n\t\tif (monthNames == null) {\n\t\t\tmonthNames = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\t\t}\n\n\t\tif (dayNames == null) {\n\t\t\tdayNames = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\t\t}\n\n\t\tvar hours12;\n\n\t\tif (hours > 12) {\n\t\t\thours12 = hours - 12;\n\t\t} else if (hours == 0) {\n\t\t\thours12 = 12;\n\t\t} else {\n\t\t\thours12 = hours;\n\t\t}\n\n\t\tfor (var i = 0; i < fmt.length; ++i) {\n\n\t\t\tvar c = fmt.charAt(i);\n\n\t\t\tif (escape) {\n\t\t\t\tswitch (c) {\n\t\t\t\t\tcase 'a': c = \"\" + dayNames[d.getDay()]; break;\n\t\t\t\t\tcase 'b': c = \"\" + monthNames[d.getMonth()]; break;\n\t\t\t\t\tcase 'd': c = leftPad(d.getDate(), \"\"); break;\n\t\t\t\t\tcase 'e': c = leftPad(d.getDate(), \" \"); break;\n\t\t\t\t\tcase 'h':\t// For back-compat with 0.7; remove in 1.0\n\t\t\t\t\tcase 'H': c = leftPad(hours); break;\n\t\t\t\t\tcase 'I': c = leftPad(hours12); break;\n\t\t\t\t\tcase 'l': c = leftPad(hours12, \" \"); break;\n\t\t\t\t\tcase 'm': c = leftPad(d.getMonth() + 1, \"\"); break;\n\t\t\t\t\tcase 'M': c = leftPad(d.getMinutes()); break;\n\t\t\t\t\t// quarters not in Open Group's strftime specification\n\t\t\t\t\tcase 'q':\n\t\t\t\t\t\tc = \"\" + (Math.floor(d.getMonth() / 3) + 1); break;\n\t\t\t\t\tcase 'S': c = leftPad(d.getSeconds()); break;\n\t\t\t\t\tcase 'y': c = leftPad(d.getFullYear() % 100); break;\n\t\t\t\t\tcase 'Y': c = \"\" + d.getFullYear(); break;\n\t\t\t\t\tcase 'p': c = (isAM) ? (\"\" + \"am\") : (\"\" + \"pm\"); break;\n\t\t\t\t\tcase 'P': c = (isAM) ? (\"\" + \"AM\") : (\"\" + \"PM\"); break;\n\t\t\t\t\tcase 'w': c = \"\" + d.getDay(); break;\n\t\t\t\t}\n\t\t\t\tr.push(c);\n\t\t\t\tescape = false;\n\t\t\t} else {\n\t\t\t\tif (c == \"%\") {\n\t\t\t\t\tescape = true;\n\t\t\t\t} else {\n\t\t\t\t\tr.push(c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn r.join(\"\");\n\t}\n\n\t// To have a consistent view of time-based data independent of which time\n\t// zone the client happens to be in we need a date-like object independent\n\t// of time zones. This is done through a wrapper that only calls the UTC\n\t// versions of the accessor methods.\n\n\tfunction makeUtcWrapper(d) {\n\n\t\tfunction addProxyMethod(sourceObj, sourceMethod, targetObj, targetMethod) {\n\t\t\tsourceObj[sourceMethod] = function() {\n\t\t\t\treturn targetObj[targetMethod].apply(targetObj, arguments);\n\t\t\t};\n\t\t};\n\n\t\tvar utc = {\n\t\t\tdate: d\n\t\t};\n\n\t\t// support strftime, if found\n\n\t\tif (d.strftime != undefined) {\n\t\t\taddProxyMethod(utc, \"strftime\", d, \"strftime\");\n\t\t}\n\n\t\taddProxyMethod(utc, \"getTime\", d, \"getTime\");\n\t\taddProxyMethod(utc, \"setTime\", d, \"setTime\");\n\n\t\tvar props = [\"Date\", \"Day\", \"FullYear\", \"Hours\", \"Milliseconds\", \"Minutes\", \"Month\", \"Seconds\"];\n\n\t\tfor (var p = 0; p < props.length; p++) {\n\t\t\taddProxyMethod(utc, \"get\" + props[p], d, \"getUTC\" + props[p]);\n\t\t\taddProxyMethod(utc, \"set\" + props[p], d, \"setUTC\" + props[p]);\n\t\t}\n\n\t\treturn utc;\n\t};\n\n\t// select time zone strategy. This returns a date-like object tied to the\n\t// desired timezone\n\n\tfunction dateGenerator(ts, opts) {\n\t\tif (opts.timezone == \"browser\") {\n\t\t\treturn new Date(ts);\n\t\t} else if (!opts.timezone || opts.timezone == \"utc\") {\n\t\t\treturn makeUtcWrapper(new Date(ts));\n\t\t} else if (typeof timezoneJS != \"undefined\" && typeof timezoneJS.Date != \"undefined\") {\n\t\t\tvar d = new timezoneJS.Date();\n\t\t\t// timezone-js is fickle, so be sure to set the time zone before\n\t\t\t// setting the time.\n\t\t\td.setTimezone(opts.timezone);\n\t\t\td.setTime(ts);\n\t\t\treturn d;\n\t\t} else {\n\t\t\treturn makeUtcWrapper(new Date(ts));\n\t\t}\n\t}\n\n\t// map of app. size of time units in milliseconds\n\n\tvar timeUnitSize = {\n\t\t\"second\": 1000,\n\t\t\"minute\": 60 * 1000,\n\t\t\"hour\": 60 * 60 * 1000,\n\t\t\"day\": 24 * 60 * 60 * 1000,\n\t\t\"month\": 30 * 24 * 60 * 60 * 1000,\n\t\t\"quarter\": 3 * 30 * 24 * 60 * 60 * 1000,\n\t\t\"year\": 365.2425 * 24 * 60 * 60 * 1000\n\t};\n\n\t// the allowed tick sizes, after 1 year we use\n\t// an integer algorithm\n\n\tvar baseSpec = [\n\t\t[1, \"second\"], [2, \"second\"], [5, \"second\"], [10, \"second\"],\n\t\t[30, \"second\"],\n\t\t[1, \"minute\"], [2, \"minute\"], [5, \"minute\"], [10, \"minute\"],\n\t\t[30, \"minute\"],\n\t\t[1, \"hour\"], [2, \"hour\"], [4, \"hour\"],\n\t\t[8, \"hour\"], [12, \"hour\"],\n\t\t[1, \"day\"], [2, \"day\"], [3, \"day\"],\n\t\t[0.25, \"month\"], [0.5, \"month\"], [1, \"month\"],\n\t\t[2, \"month\"]\n\t];\n\n\t// we don't know which variant(s) we'll need yet, but generating both is\n\t// cheap\n\n\tvar specMonths = baseSpec.concat([[3, \"month\"], [6, \"month\"],\n\t\t[1, \"year\"]]);\n\tvar specQuarters = baseSpec.concat([[1, \"quarter\"], [2, \"quarter\"],\n\t\t[1, \"year\"]]);\n\n\tfunction init(plot) {\n\t\tplot.hooks.processOptions.push(function (plot, options) {\n\t\t\t$.each(plot.getAxes(), function(axisName, axis) {\n\n\t\t\t\tvar opts = axis.options;\n\n\t\t\t\tif (opts.mode == \"time\") {\n\t\t\t\t\taxis.tickGenerator = function(axis) {\n\n\t\t\t\t\t\tvar ticks = [];\n\t\t\t\t\t\tvar d = dateGenerator(axis.min, opts);\n\t\t\t\t\t\tvar minSize = 0;\n\n\t\t\t\t\t\t// make quarter use a possibility if quarters are\n\t\t\t\t\t\t// mentioned in either of these options\n\n\t\t\t\t\t\tvar spec = (opts.tickSize && opts.tickSize[1] ===\n\t\t\t\t\t\t\t\"quarter\") ||\n\t\t\t\t\t\t\t(opts.minTickSize && opts.minTickSize[1] ===\n\t\t\t\t\t\t\t\"quarter\") ? specQuarters : specMonths;\n\n\t\t\t\t\t\tif (opts.minTickSize != null) {\n\t\t\t\t\t\t\tif (typeof opts.tickSize == \"number\") {\n\t\t\t\t\t\t\t\tminSize = opts.tickSize;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tminSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (var i = 0; i < spec.length - 1; ++i) {\n\t\t\t\t\t\t\tif (axis.delta < (spec[i][0] * timeUnitSize[spec[i][1]]\n\t\t\t\t\t\t\t\t\t\t\t + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2\n\t\t\t\t\t\t\t\t&& spec[i][0] * timeUnitSize[spec[i][1]] >= minSize) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar size = spec[i][0];\n\t\t\t\t\t\tvar unit = spec[i][1];\n\n\t\t\t\t\t\t// special-case the possibility of several years\n\n\t\t\t\t\t\tif (unit == \"year\") {\n\n\t\t\t\t\t\t\t// if given a minTickSize in years, just use it,\n\t\t\t\t\t\t\t// ensuring that it's an integer\n\n\t\t\t\t\t\t\tif (opts.minTickSize != null && opts.minTickSize[1] == \"year\") {\n\t\t\t\t\t\t\t\tsize = Math.floor(opts.minTickSize[0]);\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tvar magn = Math.pow(10, Math.floor(Math.log(axis.delta / timeUnitSize.year) / Math.LN10));\n\t\t\t\t\t\t\t\tvar norm = (axis.delta / timeUnitSize.year) / magn;\n\n\t\t\t\t\t\t\t\tif (norm < 1.5) {\n\t\t\t\t\t\t\t\t\tsize = 1;\n\t\t\t\t\t\t\t\t} else if (norm < 3) {\n\t\t\t\t\t\t\t\t\tsize = 2;\n\t\t\t\t\t\t\t\t} else if (norm < 7.5) {\n\t\t\t\t\t\t\t\t\tsize = 5;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsize = 10;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsize *= magn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// minimum size for years is 1\n\n\t\t\t\t\t\t\tif (size < 1) {\n\t\t\t\t\t\t\t\tsize = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taxis.tickSize = opts.tickSize || [size, unit];\n\t\t\t\t\t\tvar tickSize = axis.tickSize[0];\n\t\t\t\t\t\tunit = axis.tickSize[1];\n\n\t\t\t\t\t\tvar step = tickSize * timeUnitSize[unit];\n\n\t\t\t\t\t\tif (unit == \"second\") {\n\t\t\t\t\t\t\td.setSeconds(floorInBase(d.getSeconds(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"minute\") {\n\t\t\t\t\t\t\td.setMinutes(floorInBase(d.getMinutes(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"hour\") {\n\t\t\t\t\t\t\td.setHours(floorInBase(d.getHours(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"month\") {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"quarter\") {\n\t\t\t\t\t\t\td.setMonth(3 * floorInBase(d.getMonth() / 3,\n\t\t\t\t\t\t\t\ttickSize));\n\t\t\t\t\t\t} else if (unit == \"year\") {\n\t\t\t\t\t\t\td.setFullYear(floorInBase(d.getFullYear(), tickSize));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// reset smaller components\n\n\t\t\t\t\t\td.setMilliseconds(0);\n\n\t\t\t\t\t\tif (step >= timeUnitSize.minute) {\n\t\t\t\t\t\t\td.setSeconds(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.hour) {\n\t\t\t\t\t\t\td.setMinutes(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.day) {\n\t\t\t\t\t\t\td.setHours(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.day * 4) {\n\t\t\t\t\t\t\td.setDate(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.month * 2) {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), 3));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.quarter * 2) {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), 6));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.year) {\n\t\t\t\t\t\t\td.setMonth(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar carry = 0;\n\t\t\t\t\t\tvar v = Number.NaN;\n\t\t\t\t\t\tvar prev;\n\n\t\t\t\t\t\tdo {\n\n\t\t\t\t\t\t\tprev = v;\n\t\t\t\t\t\t\tv = d.getTime();\n\t\t\t\t\t\t\tticks.push(v);\n\n\t\t\t\t\t\t\tif (unit == \"month\" || unit == \"quarter\") {\n\t\t\t\t\t\t\t\tif (tickSize < 1) {\n\n\t\t\t\t\t\t\t\t\t// a bit complicated - we'll divide the\n\t\t\t\t\t\t\t\t\t// month/quarter up but we need to take\n\t\t\t\t\t\t\t\t\t// care of fractions so we don't end up in\n\t\t\t\t\t\t\t\t\t// the middle of a day\n\n\t\t\t\t\t\t\t\t\td.setDate(1);\n\t\t\t\t\t\t\t\t\tvar start = d.getTime();\n\t\t\t\t\t\t\t\t\td.setMonth(d.getMonth() +\n\t\t\t\t\t\t\t\t\t\t(unit == \"quarter\" ? 3 : 1));\n\t\t\t\t\t\t\t\t\tvar end = d.getTime();\n\t\t\t\t\t\t\t\t\td.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize);\n\t\t\t\t\t\t\t\t\tcarry = d.getHours();\n\t\t\t\t\t\t\t\t\td.setHours(0);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\td.setMonth(d.getMonth() +\n\t\t\t\t\t\t\t\t\t\ttickSize * (unit == \"quarter\" ? 3 : 1));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (unit == \"year\") {\n\t\t\t\t\t\t\t\td.setFullYear(d.getFullYear() + tickSize);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\td.setTime(v + step);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (v < axis.max && v != prev);\n\n\t\t\t\t\t\treturn ticks;\n\t\t\t\t\t};\n\n\t\t\t\t\taxis.tickFormatter = function (v, axis) {\n\n\t\t\t\t\t\tvar d = dateGenerator(v, axis.options);\n\n\t\t\t\t\t\t// first check global format\n\n\t\t\t\t\t\tif (opts.timeformat != null) {\n\t\t\t\t\t\t\treturn formatDate(d, opts.timeformat, opts.monthNames, opts.dayNames);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// possibly use quarters if quarters are mentioned in\n\t\t\t\t\t\t// any of these places\n\n\t\t\t\t\t\tvar useQuarters = (axis.options.tickSize &&\n\t\t\t\t\t\t\t\taxis.options.tickSize[1] == \"quarter\") ||\n\t\t\t\t\t\t\t(axis.options.minTickSize &&\n\t\t\t\t\t\t\t\taxis.options.minTickSize[1] == \"quarter\");\n\n\t\t\t\t\t\tvar t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];\n\t\t\t\t\t\tvar span = axis.max - axis.min;\n\t\t\t\t\t\tvar suffix = (opts.twelveHourClock) ? \" %p\" : \"\";\n\t\t\t\t\t\tvar hourCode = (opts.twelveHourClock) ? \"%I\" : \"%H\";\n\t\t\t\t\t\tvar fmt;\n\n\t\t\t\t\t\tif (t < timeUnitSize.minute) {\n\t\t\t\t\t\t\tfmt = hourCode + \":%M:%S\" + suffix;\n\t\t\t\t\t\t} else if (t < timeUnitSize.day) {\n\t\t\t\t\t\t\tif (span < 2 * timeUnitSize.day) {\n\t\t\t\t\t\t\t\tfmt = hourCode + \":%M\" + suffix;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"%b %d \" + hourCode + \":%M\" + suffix;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (t < timeUnitSize.month) {\n\t\t\t\t\t\t\tfmt = \"%b %d\";\n\t\t\t\t\t\t} else if ((useQuarters && t < timeUnitSize.quarter) ||\n\t\t\t\t\t\t\t(!useQuarters && t < timeUnitSize.year)) {\n\t\t\t\t\t\t\tif (span < timeUnitSize.year) {\n\t\t\t\t\t\t\t\tfmt = \"%b\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"%b %Y\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (useQuarters && t < timeUnitSize.year) {\n\t\t\t\t\t\t\tif (span < timeUnitSize.year) {\n\t\t\t\t\t\t\t\tfmt = \"Q%q\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"Q%q %Y\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfmt = \"%Y\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar rt = formatDate(d, fmt, opts.monthNames, opts.dayNames);\n\n\t\t\t\t\t\treturn rt;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t$.plot.plugins.push({\n\t\tinit: init,\n\t\toptions: options,\n\t\tname: 'time',\n\t\tversion: '1.0'\n\t});\n\n\t// Time-axis support used to be in Flot core, which exposed the\n\t// formatDate function on the plot object. Various plugins depend\n\t// on the function, so we need to re-expose it here.\n\n\t$.plot.formatDate = formatDate;\n\n})(jQuery);\n\n\n//# sourceURL=webpack:///./vendor/flot/jquery.flot.time.js?"); + +/***/ }), + +/***/ "angular": +/*!**************************!*\ + !*** external "angular" ***! + \**************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_angular__;\n\n//# sourceURL=webpack:///external_%22angular%22?"); + +/***/ }), + +/***/ "grafana/app/core/config": +/*!**********************************!*\ + !*** external "app/core/config" ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_config__;\n\n//# sourceURL=webpack:///external_%22app/core/config%22?"); + +/***/ }), + +/***/ "grafana/app/core/core": +/*!********************************!*\ + !*** external "app/core/core" ***! + \********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core__;\n\n//# sourceURL=webpack:///external_%22app/core/core%22?"); + +/***/ }), + +/***/ "grafana/app/core/core_module": +/*!***************************************!*\ + !*** external "app/core/core_module" ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core_module__;\n\n//# sourceURL=webpack:///external_%22app/core/core_module%22?"); + +/***/ }), + +/***/ "grafana/app/core/time_series2": +/*!****************************************!*\ + !*** external "app/core/time_series2" ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_time_series2__;\n\n//# sourceURL=webpack:///external_%22app/core/time_series2%22?"); + +/***/ }), + +/***/ "grafana/app/core/utils/kbn": +/*!*************************************!*\ + !*** external "app/core/utils/kbn" ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_utils_kbn__;\n\n//# sourceURL=webpack:///external_%22app/core/utils/kbn%22?"); + +/***/ }), + +/***/ "grafana/app/core/utils/ticks": +/*!***************************************!*\ + !*** external "app/core/utils/ticks" ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_utils_ticks__;\n\n//# sourceURL=webpack:///external_%22app/core/utils/ticks%22?"); + +/***/ }), + +/***/ "grafana/app/plugins/sdk": +/*!**********************************!*\ + !*** external "app/plugins/sdk" ***! + \**********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_plugins_sdk__;\n\n//# sourceURL=webpack:///external_%22app/plugins/sdk%22?"); + +/***/ }), + +/***/ "jquery": +/*!*************************!*\ + !*** external "jquery" ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;\n\n//# sourceURL=webpack:///external_%22jquery%22?"); + +/***/ }), + +/***/ "lodash": +/*!*************************!*\ + !*** external "lodash" ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_lodash__;\n\n//# sourceURL=webpack:///external_%22lodash%22?"); + +/***/ }), + +/***/ "moment": +/*!*************************!*\ + !*** external "moment" ***! + \*************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports = __WEBPACK_EXTERNAL_MODULE_moment__;\n\n//# sourceURL=webpack:///external_%22moment%22?"); + +/***/ }) + +/******/ })});; \ No newline at end of file diff --git a/dist/module.js.map b/dist/module.js.map new file mode 100644 index 0000000..194f437 --- /dev/null +++ b/dist/module.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../node_modules/charenc/charenc.js","webpack:///../node_modules/crypt/crypt.js","webpack:///../node_modules/is-buffer/index.js","webpack:///../node_modules/md5/md5.js","webpack:///../node_modules/perfect-scrollbar/dist/perfect-scrollbar.esm.js","webpack:///../node_modules/tether-drop/dist/js/drop.js","webpack:///../node_modules/tether/dist/js/tether.js","webpack:///../node_modules/tinycolor2/tinycolor.js","webpack:///./axes_editor.ts","webpack:///./colors.ts","webpack:///./controllers/analytic_controller.ts","webpack:///./data_processor.ts","webpack:///./graph_legend.ts","webpack:///./graph_renderer.ts","webpack:///./graph_tooltip.ts","webpack:///./histogram.ts","webpack:///./models/analytic_unit.ts","webpack:///./models/metric.ts","webpack:///./models/segment.ts","webpack:///./models/segment_array.ts","webpack:///./module.ts","webpack:///./series_overrides_ctrl.ts","webpack:///./services/analytic_service.ts","webpack:///./template.ts","webpack:///./threshold_manager.ts","webpack:///./thresholds_form.ts","webpack:///./vendor/flot/jquery.flot.crosshair.js","webpack:///./vendor/flot/jquery.flot.dashes.js","webpack:///./vendor/flot/jquery.flot.events.js","webpack:///./vendor/flot/jquery.flot.fillbelow.js","webpack:///./vendor/flot/jquery.flot.js","webpack:///./vendor/flot/jquery.flot.selection.js","webpack:///./vendor/flot/jquery.flot.stack.js","webpack:///./vendor/flot/jquery.flot.stackpercent.js","webpack:///./vendor/flot/jquery.flot.time.js","webpack:///external \"angular\"","webpack:///external \"app/core/config\"","webpack:///external \"app/core/core\"","webpack:///external \"app/core/core_module\"","webpack:///external \"app/core/time_series2\"","webpack:///external \"app/core/utils/kbn\"","webpack:///external \"app/core/utils/ticks\"","webpack:///external \"app/plugins/sdk\"","webpack:///external \"jquery\"","webpack:///external \"lodash\"","webpack:///external \"moment\""],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;AAGA;AACA;;;;;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,KAAK;;AAEL;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AChCA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,cAAc;AACnC;AACA;AACA,KAAK;;AAEL;AACA;AACA,0BAA0B,OAAO;AACjC;AACA;AACA,KAAK;;AAEL;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA;AACA,KAAK;;AAEL;AACA;AACA,iCAAiC,uBAAuB;AACxD;AACA;AACA,KAAK;;AAEL;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,iCAAiC,gBAAgB;AACjD;AACA;AACA,KAAK;;AAEL;AACA;AACA,kCAAkC,kBAAkB;AACpD;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;AC/FD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mBAAmB,cAAc;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;;;;;;AC/JD;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA,yEAAyE,iCAAiC;AAC1G;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,2BAA2B,EAAE;AACtD,wBAAwB,0BAA0B,EAAE;AACpD;AACA,GAAG;AACH;AACA;AACA,0BAA0B,4BAA4B,EAAE;AACxD,6BAA6B,+BAA+B,EAAE;AAC9D,GAAG;AACH;;AAEA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wEAAwE,EAAE;AAC3F;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0BAA0B,WAAW,qBAAqB;;AAE1D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,0CAA0C;AAC9D;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,oDAAoD,+BAA+B,EAAE;AACrF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA2C,sBAAsB,EAAE;AACnE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,yEAAyE,mBAAmB;AAC5F;AACA;AACA;AACA;AACA;AACA,yEAAyE,mBAAmB;AAC5F;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA,wDAAwD,4BAA4B,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;;AAEH,wDAAwD,4BAA4B,EAAE;AACtF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA,oCAAoC,mCAAmC;AACvE,sCAAsC,2EAA2E;;AAEjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B;;AAE3B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAE;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,+CAA+C;AAC1E,0BAA0B,kDAAkD;;AAE5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,4BAA4B,mBAAmB;AAC/C;AACA;AACA,4BAA4B,cAAc;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,yDAAyD,sCAAsC,EAAE;;AAEjG,yCAAyC;AACzC,2CAA2C;AAC3C,wDAAwD,2BAA2B,EAAE;AACrF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,mBAAmB;AAC/C,4BAA4B,mBAAmB;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,kBAAkB;AAC9C,4BAA4B,kBAAkB;;AAE9C;;AAEA;AACA;;AAEA,4BAA4B,cAAc;AAC1C,4BAA4B,cAAc;AAC1C;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAC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A;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,wEAAwE;;AAExE;AACA,mEAAmE,aAAa;AAChF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,0BAA0B;;AAE/C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,mDAAmD;AACnF;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C;AAC5C;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yBAAyB,wBAAwB;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA,uBAAuB,8BAA8B;AACrD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA,CAAC;AACD;;AAEA,CAAC;;;;;;;;;;;;AC/iBD;;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA,GAAG,QAIH;AACA,CAAC;;AAED;;AAEA,iCAAiC,2CAA2C,gBAAgB,kBAAkB,OAAO,2BAA2B,wDAAwD,gCAAgC,uDAAuD,2DAA2D,EAAE,EAAE,yDAAyD,qEAAqE,6DAA6D,oBAAoB,GAAG,EAAE;;AAEljB,iDAAiD,0CAA0C,0DAA0D,EAAE;;AAEvJ;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA,oBAAoB;AACpB;AACA;;AAEA;AACA,oEAAoE;;AAEpE;;AAEA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yCAAyC;AAC1E;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA,0FAA0F,aAAa;AACvG;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,mCAAmC,iCAAiC,eAAe,eAAe,gBAAgB,oBAAoB,MAAM,0CAA0C,+BAA+B,aAAa,qBAAqB,mCAAmC,EAAE,EAAE,cAAc,WAAW,UAAU,EAAE,UAAU,MAAM,yCAAyC,EAAE,UAA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EA,UAAU;AACV;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,UAAU;AACV;;AAEA;AACA,aAAa;;AAEb,oEAAoE,aAAa;AACjF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,UAAU;AACV;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP,yBAAyB;AACzB;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA,oEAAoE,+BAA+B;AACnG;;AAEA,kDAAkD,+BAA+B;AACjF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,+BAA+B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,WAAW;;AAEX;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA,yBAAyB,yBAAyB;AAClD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,WAAW;;AAEX;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA,oBAAoB,wBAAwB;AAC5C;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,GAAG;;AAEH;AACA,CAAC;;AAED;;AAEA;;AAEA;AACA;;AAEA;;AAEA,mCAAmC,iCAAiC,eAAe,eAAe,gBAAgB,oBAAoB,MAAM,0CAA0C,+BAA+B,aAAa,qBAAqB,mCAAmC,EAAE,EAAE,cAAc,WAAW,UAAU,EAAE,UAAU,MAAM,yCAAyC,EAAE,UAAU,kBAAkB,EAAE,EAAE,aAAa,EAAE,2BAA2B,0BAA0B,YAAY,EAAE,2CAA2C,8BAA8B,EAAE,OAAO,6EAA6E,EAAE,GAAG,EAAE;;AAEtpB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;;AAEA,+BAA+B;AAC/B,+BAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL,YAAY;AACZ;AACA,CAAC;AACD;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,CAAC;AACD;;AAEA;;AAEA,mCAAmC,iCAAiC,eAAe,eAAe,gBAAgB,oBAAoB,MAAM,0CAA0C,+BAA+B,aAAa,qBAAqB,mCAAmC,EAAE,EAAE,cAAc,WAAW,UAAU,EAAE,UAAU,MAAM,yCAAyC,EAAE,UAAU,kBAAkB,EAAE,EAAE,aAAa,EAAE,2BAA2B,0BAA0B,YAAY,EAAE,2CAA2C,8BAA8B,EAAE,OAAO,6EAA6E,EAAE,GAAG,EAAE;;AAEtpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,6CAA6C,uBAAuB;AACpE;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA,YAAY;AACZ;AACA,CAAC;AACD;;AAEA,CAAC;;;;;;;;;;;;ACpxDD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,8BAA8B;AACpD,sBAAsB,8BAA8B;AACpD,sBAAsB,8BAA8B;;AAEpD;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,mBAAmB,OAAO;AACzD,+BAA+B,mBAAmB,OAAO;AACzD,+BAA+B,mBAAmB,OAAO;AACzD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,wCAAwC;AACxC,wCAAwC;AACxC;;AAEA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA,sDAAsD;AACtD,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,yCAAyC;AAC5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,yCAAyC;AAC5D,mBAAmB,yCAAyC;AAC5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,wCAAwC;AAC3D;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2DAA2D,wBAAwB;;AAEnF;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,8EAA8E,4BAA4B,gBAAgB;AAC1H,8EAA8E,2BAA2B,gBAAgB;AACzH,qDAAqD,oDAAoD,gBAAgB;AACzH,qDAAqD,oDAAoD,gBAAgB;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA,KAAK,kBAAkB,YAAY,kBAAkB;AACrD;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4BAA4B,YAAY;;AAExC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE;AACjE,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE;AACjE,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE;AACjF,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE;AACjF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,UAAU,OAAO,UAAU,OAAO,SAAS;AACnF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2CAA2C;AAC3C;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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ACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;;;;;;;;;;;AC/KD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,WAAW;AACX;AACA;;AAEA;;AAEA,0BAA0B,mBAAmB;;AAE7C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,OAAO;AACP;;AAEA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH,CAAC;;;;;;;;;;;;gEC3OD;AACA;AACA;AACA;AACA;AACA,oCACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,4CAA4C;AACrE;AACA,OAAO;;AAEP;;AAEA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4CAA4C;AACvE;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,OAAO;;AAEP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA,6BAA6B,eAAe;AAC5C,8BAA8B,gBAAgB;AAC9C,gCAAgC,kBAAkB;AAClD,4BAA4B,oBAAoB;AAChD,6BAA6B,qBAAqB;AAClD,iCAAiC,gBAAgB;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,uBAAuB;AACrD,kCAAkC,iBAAiB;AACnD,iCAAiC,gBAAgB;AACjD,gCAAgC,gBAAgB;AAChD,4BAA4B,gBAAgB;AAC5C,8BAA8B,iBAAiB;AAC/C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,8BAA8B,UAAU;AACxC,8BAA8B,WAAW;AACzC;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,oBAAoB;AAC9D,4CAA4C,qBAAqB;;AAEjE;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,uBAAuB;AACvB,OAAO;AACP;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,6BAA6B;AAC7B,OAAO;AACP;AACA;;AAEA;AACA,sBAAsB;AACtB,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sBAAsB,mBAAmB;AACzC;AACA;AACA;;AAEA;AACA;AACA,gCAAgC,YAAY,EAAE;AAC9C,uBAAuB,cAAc,EAAE;AACvC;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,oBAAoB;AAC9D,4CAA4C,qBAAqB;;AAEjE;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA,sBAAsB;AACtB,OAAO;AACP;AACA;;AAEA;AACA,6BAA6B;AAC7B,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;;AAEA;AACA;AACA,gCAAgC,YAAY,EAAE;AAC9C,wBAAwB,cAAc,EAAE;AACxC;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AAAA;;;;;;;;;;;;AC3lBD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,0BAA0B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC,WAAW;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,2BAA2B,kCAAkC;AAC7D;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA,iCAAiC,YAAY;AAC7C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,iCAAiC,WAAW;AAC5C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;;AAEA;;AAEA;AACA;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AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;;AAEnB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,6DAA6D;AAC7D;AACA,6BAA6B;;AAE7B;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY,OAAO;AACnB;AACA,aAAa,OAAO;;AAEpB;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,gEAAgE;AAChE;AACA;AACA,YAAY,OAAO;AACnB;AACA,YAAY,OAAO;AACnB,YAAY,iBAAiB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA,YAAY,QAAQ;AACpB,aAAa,OAAO;;AAEpB;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,qCAAqC;AACrC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,YAAY,OAAO;AACnB;AACA,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,OAAO;AACnB,YAAY,iBAAiB;AAC7B;AACA,YAAY,QAAQ;AACpB;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ,yCAAyC;AAC7D;AACA,YAAY,QAAQ,uCAAuC;AAC3D;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA,2BAA2B,yBAAyB;AACpD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,iBAAiB;AAC7B;AACA,YAAY,QAAQ;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,4BAA4B,yBAAyB;AACrD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,0FAA0F;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,sBAAsB,sCAAsC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA,0CAA0C,oBAAoB;AAC9D,qCAAqC,wBAAwB;AAC7D,yCAAyC,mBAAmB;AAC5D,kCAAkC,kBAAkB;AACpD,mCAAmC,mBAAmB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,eAAe;AACnD;AACA,wBAAwB;AACxB;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,qCAAqC,cAAc;AACnD,qCAAqC,cAAc;AACnD;AACA;AACA,uCAAuC,gBAAgB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA,2BAA2B,iBAAiB;AAC5C;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,qCAAqC;;AAErC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,eAAe;;AAEtC;AACA;AACA;AACA;;AAEA,+CAA+C;AAC/C;;AAEA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,eAAe;;AAEtC;AACA;AACA;AACA;;AAEA,+CAA+C;AAC/C;;AAEA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,0BAA0B;AACjD;AACA,uBAAuB,0BAA0B;AACjD;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2BAA2B,cAAc;AACzC,yCAAyC;;AAEzC;AACA,uCAAuC;AACvC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;;AAEA;AACA;AACA,6DAA6D,UAAU,EAAE;AACzE;;AAEA;AACA;AACA,wBAAwB;AACxB,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;;AAEA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,wBAAwB;;AAExB,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,uBAAuB,kBAAkB;;AAEzC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,yBAAyB;AACzB,qBAAqB;AACrB;;AAEA;AACA;;AAEA;;AAEA;AACA,uBAAuB,mBAAmB;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb,uBAAuB,mBAAmB;AAC1C;AACA,gCAAgC;;AAEhC;AACA;;AAEA;AACA,uBAAuB,mBAAmB;AAC1C;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,wCAAwC;AACzE,iCAAiC,wCAAwC;;AAEzE;AACA;AACA,qCAAqC,gFAAgF;AACrH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6BAA6B;;AAE7B;;AAEA;AACA;;AAEA;AACA;;AAEA,+BAA+B,iBAAiB;AAChD;;AAEA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;;AAEA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;;AAEA;AACA;AACA,6BAA6B,mBAAmB;AAChD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB,mBAAmB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;;AAEA,2BAA2B,mBAAmB;AAC9C;AACA;;AAEA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,wDAAwD;;AAExD;AACA,8DAA8D;;AAE9D;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,UAAU;;AAE5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,oBAAoB;AAC7D;AACA,yCAAyC,uBAAuB;AAChE;AACA;AACA,yCAAyC,kBAAkB;AAC3D;AACA,yCAAyC,sBAAsB;AAC/D;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,kBAAkB;;AAE7C;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC;AAChC;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2BAA2B,mBAAmB;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;;AAEA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA,kDAAkD,QAAQ;AAC1D;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,0CAA0C;AAC1C;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,uBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yDAAyD,yCAAyC;;AAElG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mCAAmC,4BAA4B;AAC/D;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,qBAAqB;AAC1D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,2BAA2B,qBAAqB;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B,iBAAiB;AAC5C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,2BAA2B,uBAAuB;AAClD;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,+BAA+B,uBAAuB;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,gCAAgC,mBAAmB;AACnD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA4B;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oDAAoD;AACpD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,mBAAmB;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+BAA+B,mBAAmB;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+EAA+E,6DAA6D,EAAE;AAC9I;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,2BAA2B,mBAAmB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;;AAEA,2BAA2B,oBAAoB;;AAE/C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wHAAwH,mCAAmC,SAAS,qCAAqC;AACzM;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE;AAClE;AACA,wEAAwE;AACxE;AACA,sEAAsE;AACtE;AACA,oEAAoE;AACpE,2GAA2G,WAAW;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,4BAA4B,8BAA8B,qCAAqC;AACpJ;AACA;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,uCAAuC,QAAQ;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,mBAAmB;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qDAAqD;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2CAA2C;;AAE3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,+BAA+B,mBAAmB;AAClD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,wBAAwB;AACxB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,qDAAqD,gCAAgC,EAAE;AACvF;;AAEA;AACA;AACA;AACA,qDAAqD,cAAc,EAAE;AACrE;;AAEA;AACA;AACA;AACA;;AAEA,+DAA+D,gCAAgC,EAAE;AACjG;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,8BAA8B;;AAEpE;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,uBAAuB;AAC9C;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,sCAAsC;;AAEvE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iCAAiC,kBAAkB,EAAE;AACrD;;AAEA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA;;AAEA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA,CAAC;;;;;;;;;;;;AC7nGD;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe,SAAS,kBAAkB,UAAU,mBAAmB,EAAE;;AAEzE;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,wBAAwB,cAAc,WAAW,cAAc;AAC/D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE;AACA;AACA;AACA,+CAA+C,cAAc;AAC7D;;AAEA;;AAEA;;AAEA;AACA;AACA,2CAA2C,cAAc;;AAEzD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA,+BAA+B;AAC/B;AACA,aAAa;AACb;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,6DAA6D,qEAAqE;AAClI;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;;AAGT;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL,CAAC;;;;;;;;;;;;AC3XD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,iBAAiB,cAAc;AAC/B;;AAEA;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,QAAQ;AAC/C;AACA;AACA;;AAEA;AACA;AACA,0BAA0B;AAC1B,mCAAmC,QAAQ;AAC3C;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;;;;;;;;;;;AC7LD;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,8BAA8B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;;;;;;;;;;;;AC7HD;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA,iBAAiB,gBAAgB;;AAEjC;;AAEA;AACA;AACA,6CAA6C;AAC7C,iDAAiD;AACjD,4CAA4C;AAC5C,6CAA6C;AAC7C,2CAA2C;AAC3C,kCAAkC;AAClC,oCAAoC;AACpC,yCAAyC;AACzC,iDAAiD;AACjD,2CAA2C;AAC3C;AACA;AACA,kDAAkD;AAClD,2CAA2C;AAC3C,kDAAkD;AAClD,wCAAwC;AACxC,sDAAsD;AACtD,sDAAsD;AACtD,mCAAmC;AACnC;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA,iBAAiB,kBAAkB;AACnC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;;AAER;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA,OAAO;;AAEP;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,OAAO;AACP;AACA;AACA,QAAQ;AACR;AACA;AACA,OAAO;AACP;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;;AAEA,CAAC;;;;;;;;;;;;AC9aD,qD;;;;;;;;;;;ACAA,qE;;;;;;;;;;;ACAA,mE;;;;;;;;;;;ACAA,0E;;;;;;;;;;;ACAA,2E;;;;;;;;;;;ACAA,wE;;;;;;;;;;;ACAA,0E;;;;;;;;;;;ACAA,qE;;;;;;;;;;;ACAA,oD;;;;;;;;;;;ACAA,oD;;;;;;;;;;;ACAA,oD","file":"module.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading wasm modules\n \tvar installedWasmModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// object with all compiled WebAssembly.Modules\n \t__webpack_require__.w = {};\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./module.ts\");\n","var charenc = {\n // UTF-8 encoding\n utf8: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));\n }\n },\n\n // Binary encoding\n bin: {\n // Convert a string to a byte array\n stringToBytes: function(str) {\n for (var bytes = [], i = 0; i < str.length; i++)\n bytes.push(str.charCodeAt(i) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a string\n bytesToString: function(bytes) {\n for (var str = [], i = 0; i < bytes.length; i++)\n str.push(String.fromCharCode(bytes[i]));\n return str.join('');\n }\n }\n};\n\nmodule.exports = charenc;\n","(function() {\n var base64map\n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',\n\n crypt = {\n // Bit-wise rotation left\n rotl: function(n, b) {\n return (n << b) | (n >>> (32 - b));\n },\n\n // Bit-wise rotation right\n rotr: function(n, b) {\n return (n << (32 - b)) | (n >>> b);\n },\n\n // Swap big-endian to little-endian and vice versa\n endian: function(n) {\n // If number given, swap endian\n if (n.constructor == Number) {\n return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;\n }\n\n // Else, assume array and swap all items\n for (var i = 0; i < n.length; i++)\n n[i] = crypt.endian(n[i]);\n return n;\n },\n\n // Generate an array of any length of random bytes\n randomBytes: function(n) {\n for (var bytes = []; n > 0; n--)\n bytes.push(Math.floor(Math.random() * 256));\n return bytes;\n },\n\n // Convert a byte array to big-endian 32-bit words\n bytesToWords: function(bytes) {\n for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)\n words[b >>> 5] |= bytes[i] << (24 - b % 32);\n return words;\n },\n\n // Convert big-endian 32-bit words to a byte array\n wordsToBytes: function(words) {\n for (var bytes = [], b = 0; b < words.length * 32; b += 8)\n bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);\n return bytes;\n },\n\n // Convert a byte array to a hex string\n bytesToHex: function(bytes) {\n for (var hex = [], i = 0; i < bytes.length; i++) {\n hex.push((bytes[i] >>> 4).toString(16));\n hex.push((bytes[i] & 0xF).toString(16));\n }\n return hex.join('');\n },\n\n // Convert a hex string to a byte array\n hexToBytes: function(hex) {\n for (var bytes = [], c = 0; c < hex.length; c += 2)\n bytes.push(parseInt(hex.substr(c, 2), 16));\n return bytes;\n },\n\n // Convert a byte array to a base-64 string\n bytesToBase64: function(bytes) {\n for (var base64 = [], i = 0; i < bytes.length; i += 3) {\n var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];\n for (var j = 0; j < 4; j++)\n if (i * 8 + j * 6 <= bytes.length * 8)\n base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));\n else\n base64.push('=');\n }\n return base64.join('');\n },\n\n // Convert a base-64 string to a byte array\n base64ToBytes: function(base64) {\n // Remove non-base-64 characters\n base64 = base64.replace(/[^A-Z0-9+\\/]/ig, '');\n\n for (var bytes = [], i = 0, imod4 = 0; i < base64.length;\n imod4 = ++i % 4) {\n if (imod4 == 0) continue;\n bytes.push(((base64map.indexOf(base64.charAt(i - 1))\n & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))\n | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));\n }\n return bytes;\n }\n };\n\n module.exports = crypt;\n})();\n","/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)\n}\n\nfunction isBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))\n}\n","(function(){\r\n var crypt = require('crypt'),\r\n utf8 = require('charenc').utf8,\r\n isBuffer = require('is-buffer'),\r\n bin = require('charenc').bin,\r\n\r\n // The core\r\n md5 = function (message, options) {\r\n // Convert to byte array\r\n if (message.constructor == String)\r\n if (options && options.encoding === 'binary')\r\n message = bin.stringToBytes(message);\r\n else\r\n message = utf8.stringToBytes(message);\r\n else if (isBuffer(message))\r\n message = Array.prototype.slice.call(message, 0);\r\n else if (!Array.isArray(message))\r\n message = message.toString();\r\n // else, assume byte array already\r\n\r\n var m = crypt.bytesToWords(message),\r\n l = message.length * 8,\r\n a = 1732584193,\r\n b = -271733879,\r\n c = -1732584194,\r\n d = 271733878;\r\n\r\n // Swap endian\r\n for (var i = 0; i < m.length; i++) {\r\n m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |\r\n ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;\r\n }\r\n\r\n // Padding\r\n m[l >>> 5] |= 0x80 << (l % 32);\r\n m[(((l + 64) >>> 9) << 4) + 14] = l;\r\n\r\n // Method shortcuts\r\n var FF = md5._ff,\r\n GG = md5._gg,\r\n HH = md5._hh,\r\n II = md5._ii;\r\n\r\n for (var i = 0; i < m.length; i += 16) {\r\n\r\n var aa = a,\r\n bb = b,\r\n cc = c,\r\n dd = d;\r\n\r\n a = FF(a, b, c, d, m[i+ 0], 7, -680876936);\r\n d = FF(d, a, b, c, m[i+ 1], 12, -389564586);\r\n c = FF(c, d, a, b, m[i+ 2], 17, 606105819);\r\n b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);\r\n a = FF(a, b, c, d, m[i+ 4], 7, -176418897);\r\n d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);\r\n c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);\r\n b = FF(b, c, d, a, m[i+ 7], 22, -45705983);\r\n a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);\r\n d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);\r\n c = FF(c, d, a, b, m[i+10], 17, -42063);\r\n b = FF(b, c, d, a, m[i+11], 22, -1990404162);\r\n a = FF(a, b, c, d, m[i+12], 7, 1804603682);\r\n d = FF(d, a, b, c, m[i+13], 12, -40341101);\r\n c = FF(c, d, a, b, m[i+14], 17, -1502002290);\r\n b = FF(b, c, d, a, m[i+15], 22, 1236535329);\r\n\r\n a = GG(a, b, c, d, m[i+ 1], 5, -165796510);\r\n d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);\r\n c = GG(c, d, a, b, m[i+11], 14, 643717713);\r\n b = GG(b, c, d, a, m[i+ 0], 20, -373897302);\r\n a = GG(a, b, c, d, m[i+ 5], 5, -701558691);\r\n d = GG(d, a, b, c, m[i+10], 9, 38016083);\r\n c = GG(c, d, a, b, m[i+15], 14, -660478335);\r\n b = GG(b, c, d, a, m[i+ 4], 20, -405537848);\r\n a = GG(a, b, c, d, m[i+ 9], 5, 568446438);\r\n d = GG(d, a, b, c, m[i+14], 9, -1019803690);\r\n c = GG(c, d, a, b, m[i+ 3], 14, -187363961);\r\n b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);\r\n a = GG(a, b, c, d, m[i+13], 5, -1444681467);\r\n d = GG(d, a, b, c, m[i+ 2], 9, -51403784);\r\n c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);\r\n b = GG(b, c, d, a, m[i+12], 20, -1926607734);\r\n\r\n a = HH(a, b, c, d, m[i+ 5], 4, -378558);\r\n d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);\r\n c = HH(c, d, a, b, m[i+11], 16, 1839030562);\r\n b = HH(b, c, d, a, m[i+14], 23, -35309556);\r\n a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);\r\n d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);\r\n c = HH(c, d, a, b, m[i+ 7], 16, -155497632);\r\n b = HH(b, c, d, a, m[i+10], 23, -1094730640);\r\n a = HH(a, b, c, d, m[i+13], 4, 681279174);\r\n d = HH(d, a, b, c, m[i+ 0], 11, -358537222);\r\n c = HH(c, d, a, b, m[i+ 3], 16, -722521979);\r\n b = HH(b, c, d, a, m[i+ 6], 23, 76029189);\r\n a = HH(a, b, c, d, m[i+ 9], 4, -640364487);\r\n d = HH(d, a, b, c, m[i+12], 11, -421815835);\r\n c = HH(c, d, a, b, m[i+15], 16, 530742520);\r\n b = HH(b, c, d, a, m[i+ 2], 23, -995338651);\r\n\r\n a = II(a, b, c, d, m[i+ 0], 6, -198630844);\r\n d = II(d, a, b, c, m[i+ 7], 10, 1126891415);\r\n c = II(c, d, a, b, m[i+14], 15, -1416354905);\r\n b = II(b, c, d, a, m[i+ 5], 21, -57434055);\r\n a = II(a, b, c, d, m[i+12], 6, 1700485571);\r\n d = II(d, a, b, c, m[i+ 3], 10, -1894986606);\r\n c = II(c, d, a, b, m[i+10], 15, -1051523);\r\n b = II(b, c, d, a, m[i+ 1], 21, -2054922799);\r\n a = II(a, b, c, d, m[i+ 8], 6, 1873313359);\r\n d = II(d, a, b, c, m[i+15], 10, -30611744);\r\n c = II(c, d, a, b, m[i+ 6], 15, -1560198380);\r\n b = II(b, c, d, a, m[i+13], 21, 1309151649);\r\n a = II(a, b, c, d, m[i+ 4], 6, -145523070);\r\n d = II(d, a, b, c, m[i+11], 10, -1120210379);\r\n c = II(c, d, a, b, m[i+ 2], 15, 718787259);\r\n b = II(b, c, d, a, m[i+ 9], 21, -343485551);\r\n\r\n a = (a + aa) >>> 0;\r\n b = (b + bb) >>> 0;\r\n c = (c + cc) >>> 0;\r\n d = (d + dd) >>> 0;\r\n }\r\n\r\n return crypt.endian([a, b, c, d]);\r\n };\r\n\r\n // Auxiliary functions\r\n md5._ff = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & c | ~b & d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._gg = function (a, b, c, d, x, s, t) {\r\n var n = a + (b & d | c & ~d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._hh = function (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n md5._ii = function (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n };\r\n\r\n // Package private blocksize\r\n md5._blocksize = 16;\r\n md5._digestsize = 16;\r\n\r\n module.exports = function (message, options) {\r\n if (message === undefined || message === null)\r\n throw new Error('Illegal argument ' + message);\r\n\r\n var digestbytes = crypt.wordsToBytes(md5(message, options));\r\n return options && options.asBytes ? digestbytes :\r\n options && options.asString ? bin.bytesToString(digestbytes) :\r\n crypt.bytesToHex(digestbytes);\r\n };\r\n\r\n})();\r\n","/*!\n * perfect-scrollbar v1.3.0\n * (c) 2017 Hyunje Jun\n * @license MIT\n */\nfunction get(element) {\n return getComputedStyle(element);\n}\n\nfunction set(element, obj) {\n for (var key in obj) {\n var val = obj[key];\n if (typeof val === 'number') {\n val = val + \"px\";\n }\n element.style[key] = val;\n }\n return element;\n}\n\nfunction div(className) {\n var div = document.createElement('div');\n div.className = className;\n return div;\n}\n\nvar elMatches =\n typeof Element !== 'undefined' &&\n (Element.prototype.matches ||\n Element.prototype.webkitMatchesSelector ||\n Element.prototype.msMatchesSelector);\n\nfunction matches(element, query) {\n if (!elMatches) {\n throw new Error('No element matching method supported');\n }\n\n return elMatches.call(element, query);\n}\n\nfunction remove(element) {\n if (element.remove) {\n element.remove();\n } else {\n if (element.parentNode) {\n element.parentNode.removeChild(element);\n }\n }\n}\n\nfunction queryChildren(element, selector) {\n return Array.prototype.filter.call(element.children, function (child) { return matches(child, selector); }\n );\n}\n\nvar cls = {\n main: 'ps',\n element: {\n thumb: function (x) { return (\"ps__thumb-\" + x); },\n rail: function (x) { return (\"ps__rail-\" + x); },\n consuming: 'ps__child--consume',\n },\n state: {\n focus: 'ps--focus',\n active: function (x) { return (\"ps--active-\" + x); },\n scrolling: function (x) { return (\"ps--scrolling-\" + x); },\n },\n};\n\n/*\n * Helper methods\n */\nvar scrollingClassTimeout = { x: null, y: null };\n\nfunction addScrollingClass(i, x) {\n var classList = i.element.classList;\n var className = cls.state.scrolling(x);\n\n if (classList.contains(className)) {\n clearTimeout(scrollingClassTimeout[x]);\n } else {\n classList.add(className);\n }\n}\n\nfunction removeScrollingClass(i, x) {\n scrollingClassTimeout[x] = setTimeout(\n function () { return i.isAlive && i.element.classList.remove(cls.state.scrolling(x)); },\n i.settings.scrollingThreshold\n );\n}\n\nfunction setScrollingClassInstantly(i, x) {\n addScrollingClass(i, x);\n removeScrollingClass(i, x);\n}\n\nvar EventElement = function EventElement(element) {\n this.element = element;\n this.handlers = {};\n};\n\nvar prototypeAccessors = { isEmpty: { configurable: true } };\n\nEventElement.prototype.bind = function bind (eventName, handler) {\n if (typeof this.handlers[eventName] === 'undefined') {\n this.handlers[eventName] = [];\n }\n this.handlers[eventName].push(handler);\n this.element.addEventListener(eventName, handler, false);\n};\n\nEventElement.prototype.unbind = function unbind (eventName, target) {\n var this$1 = this;\n\n this.handlers[eventName] = this.handlers[eventName].filter(function (handler) {\n if (target && handler !== target) {\n return true;\n }\n this$1.element.removeEventListener(eventName, handler, false);\n return false;\n });\n};\n\nEventElement.prototype.unbindAll = function unbindAll () {\n var this$1 = this;\n\n for (var name in this$1.handlers) {\n this$1.unbind(name);\n }\n};\n\nprototypeAccessors.isEmpty.get = function () {\n var this$1 = this;\n\n return Object.keys(this.handlers).every(\n function (key) { return this$1.handlers[key].length === 0; }\n );\n};\n\nObject.defineProperties( EventElement.prototype, prototypeAccessors );\n\nvar EventManager = function EventManager() {\n this.eventElements = [];\n};\n\nEventManager.prototype.eventElement = function eventElement (element) {\n var ee = this.eventElements.filter(function (ee) { return ee.element === element; })[0];\n if (!ee) {\n ee = new EventElement(element);\n this.eventElements.push(ee);\n }\n return ee;\n};\n\nEventManager.prototype.bind = function bind (element, eventName, handler) {\n this.eventElement(element).bind(eventName, handler);\n};\n\nEventManager.prototype.unbind = function unbind (element, eventName, handler) {\n var ee = this.eventElement(element);\n ee.unbind(eventName, handler);\n\n if (ee.isEmpty) {\n // remove\n this.eventElements.splice(this.eventElements.indexOf(ee), 1);\n }\n};\n\nEventManager.prototype.unbindAll = function unbindAll () {\n this.eventElements.forEach(function (e) { return e.unbindAll(); });\n this.eventElements = [];\n};\n\nEventManager.prototype.once = function once (element, eventName, handler) {\n var ee = this.eventElement(element);\n var onceHandler = function (evt) {\n ee.unbind(eventName, onceHandler);\n handler(evt);\n };\n ee.bind(eventName, onceHandler);\n};\n\nfunction createEvent(name) {\n if (typeof window.CustomEvent === 'function') {\n return new CustomEvent(name);\n } else {\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(name, false, false, undefined);\n return evt;\n }\n}\n\nvar processScrollDiff = function(\n i,\n axis,\n diff,\n useScrollingClass,\n forceFireReachEvent\n) {\n if ( useScrollingClass === void 0 ) useScrollingClass = true;\n if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;\n\n var fields;\n if (axis === 'top') {\n fields = [\n 'contentHeight',\n 'containerHeight',\n 'scrollTop',\n 'y',\n 'up',\n 'down' ];\n } else if (axis === 'left') {\n fields = [\n 'contentWidth',\n 'containerWidth',\n 'scrollLeft',\n 'x',\n 'left',\n 'right' ];\n } else {\n throw new Error('A proper axis should be provided');\n }\n\n processScrollDiff$1(i, diff, fields, useScrollingClass, forceFireReachEvent);\n};\n\nfunction processScrollDiff$1(\n i,\n diff,\n ref,\n useScrollingClass,\n forceFireReachEvent\n) {\n var contentHeight = ref[0];\n var containerHeight = ref[1];\n var scrollTop = ref[2];\n var y = ref[3];\n var up = ref[4];\n var down = ref[5];\n if ( useScrollingClass === void 0 ) useScrollingClass = true;\n if ( forceFireReachEvent === void 0 ) forceFireReachEvent = false;\n\n var element = i.element;\n\n // reset reach\n i.reach[y] = null;\n\n // 1 for subpixel rounding\n if (element[scrollTop] < 1) {\n i.reach[y] = 'start';\n }\n\n // 1 for subpixel rounding\n if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {\n i.reach[y] = 'end';\n }\n\n if (diff) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + y)));\n\n if (diff < 0) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + up)));\n } else if (diff > 0) {\n element.dispatchEvent(createEvent((\"ps-scroll-\" + down)));\n }\n\n if (useScrollingClass) {\n setScrollingClassInstantly(i, y);\n }\n }\n\n if (i.reach[y] && (diff || forceFireReachEvent)) {\n element.dispatchEvent(createEvent((\"ps-\" + y + \"-reach-\" + (i.reach[y]))));\n }\n}\n\nfunction toInt(x) {\n return parseInt(x, 10) || 0;\n}\n\nfunction isEditable(el) {\n return (\n matches(el, 'input,[contenteditable]') ||\n matches(el, 'select,[contenteditable]') ||\n matches(el, 'textarea,[contenteditable]') ||\n matches(el, 'button,[contenteditable]')\n );\n}\n\nfunction outerWidth(element) {\n var styles = get(element);\n return (\n toInt(styles.width) +\n toInt(styles.paddingLeft) +\n toInt(styles.paddingRight) +\n toInt(styles.borderLeftWidth) +\n toInt(styles.borderRightWidth)\n );\n}\n\nvar env = {\n isWebKit:\n typeof document !== 'undefined' &&\n 'WebkitAppearance' in document.documentElement.style,\n supportsTouch:\n typeof window !== 'undefined' &&\n ('ontouchstart' in window ||\n (window.DocumentTouch && document instanceof window.DocumentTouch)),\n supportsIePointer:\n typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,\n isChrome:\n typeof navigator !== 'undefined' &&\n /Chrome/i.test(navigator && navigator.userAgent),\n};\n\nvar updateGeometry = function(i) {\n var element = i.element;\n\n i.containerWidth = element.clientWidth;\n i.containerHeight = element.clientHeight;\n i.contentWidth = element.scrollWidth;\n i.contentHeight = element.scrollHeight;\n\n if (!element.contains(i.scrollbarXRail)) {\n // clean up and append\n queryChildren(element, cls.element.rail('x')).forEach(function (el) { return remove(el); }\n );\n element.appendChild(i.scrollbarXRail);\n }\n if (!element.contains(i.scrollbarYRail)) {\n // clean up and append\n queryChildren(element, cls.element.rail('y')).forEach(function (el) { return remove(el); }\n );\n element.appendChild(i.scrollbarYRail);\n }\n\n if (\n !i.settings.suppressScrollX &&\n i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth\n ) {\n i.scrollbarXActive = true;\n i.railXWidth = i.containerWidth - i.railXMarginWidth;\n i.railXRatio = i.containerWidth / i.railXWidth;\n i.scrollbarXWidth = getThumbSize(\n i,\n toInt(i.railXWidth * i.containerWidth / i.contentWidth)\n );\n i.scrollbarXLeft = toInt(\n (i.negativeScrollAdjustment + element.scrollLeft) *\n (i.railXWidth - i.scrollbarXWidth) /\n (i.contentWidth - i.containerWidth)\n );\n } else {\n i.scrollbarXActive = false;\n }\n\n if (\n !i.settings.suppressScrollY &&\n i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight\n ) {\n i.scrollbarYActive = true;\n i.railYHeight = i.containerHeight - i.railYMarginHeight;\n i.railYRatio = i.containerHeight / i.railYHeight;\n i.scrollbarYHeight = getThumbSize(\n i,\n toInt(i.railYHeight * i.containerHeight / i.contentHeight)\n );\n i.scrollbarYTop = toInt(\n element.scrollTop *\n (i.railYHeight - i.scrollbarYHeight) /\n (i.contentHeight - i.containerHeight)\n );\n } else {\n i.scrollbarYActive = false;\n }\n\n if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {\n i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;\n }\n if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {\n i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;\n }\n\n updateCss(element, i);\n\n if (i.scrollbarXActive) {\n element.classList.add(cls.state.active('x'));\n } else {\n element.classList.remove(cls.state.active('x'));\n i.scrollbarXWidth = 0;\n i.scrollbarXLeft = 0;\n element.scrollLeft = 0;\n }\n if (i.scrollbarYActive) {\n element.classList.add(cls.state.active('y'));\n } else {\n element.classList.remove(cls.state.active('y'));\n i.scrollbarYHeight = 0;\n i.scrollbarYTop = 0;\n element.scrollTop = 0;\n }\n};\n\nfunction getThumbSize(i, thumbSize) {\n if (i.settings.minScrollbarLength) {\n thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);\n }\n if (i.settings.maxScrollbarLength) {\n thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);\n }\n return thumbSize;\n}\n\nfunction updateCss(element, i) {\n var xRailOffset = { width: i.railXWidth };\n if (i.isRtl) {\n xRailOffset.left =\n i.negativeScrollAdjustment +\n element.scrollLeft +\n i.containerWidth -\n i.contentWidth;\n } else {\n xRailOffset.left = element.scrollLeft;\n }\n if (i.isScrollbarXUsingBottom) {\n xRailOffset.bottom = i.scrollbarXBottom - element.scrollTop;\n } else {\n xRailOffset.top = i.scrollbarXTop + element.scrollTop;\n }\n set(i.scrollbarXRail, xRailOffset);\n\n var yRailOffset = { top: element.scrollTop, height: i.railYHeight };\n if (i.isScrollbarYUsingRight) {\n if (i.isRtl) {\n yRailOffset.right =\n i.contentWidth -\n (i.negativeScrollAdjustment + element.scrollLeft) -\n i.scrollbarYRight -\n i.scrollbarYOuterWidth;\n } else {\n yRailOffset.right = i.scrollbarYRight - element.scrollLeft;\n }\n } else {\n if (i.isRtl) {\n yRailOffset.left =\n i.negativeScrollAdjustment +\n element.scrollLeft +\n i.containerWidth * 2 -\n i.contentWidth -\n i.scrollbarYLeft -\n i.scrollbarYOuterWidth;\n } else {\n yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;\n }\n }\n set(i.scrollbarYRail, yRailOffset);\n\n set(i.scrollbarX, {\n left: i.scrollbarXLeft,\n width: i.scrollbarXWidth - i.railBorderXWidth,\n });\n set(i.scrollbarY, {\n top: i.scrollbarYTop,\n height: i.scrollbarYHeight - i.railBorderYWidth,\n });\n}\n\nvar clickRail = function(i) {\n i.event.bind(i.scrollbarY, 'mousedown', function (e) { return e.stopPropagation(); });\n i.event.bind(i.scrollbarYRail, 'mousedown', function (e) {\n var positionTop =\n e.pageY -\n window.pageYOffset -\n i.scrollbarYRail.getBoundingClientRect().top;\n var direction = positionTop > i.scrollbarYTop ? 1 : -1;\n\n i.element.scrollTop += direction * i.containerHeight;\n updateGeometry(i);\n\n e.stopPropagation();\n });\n\n i.event.bind(i.scrollbarX, 'mousedown', function (e) { return e.stopPropagation(); });\n i.event.bind(i.scrollbarXRail, 'mousedown', function (e) {\n var positionLeft =\n e.pageX -\n window.pageXOffset -\n i.scrollbarXRail.getBoundingClientRect().left;\n var direction = positionLeft > i.scrollbarXLeft ? 1 : -1;\n\n i.element.scrollLeft += direction * i.containerWidth;\n updateGeometry(i);\n\n e.stopPropagation();\n });\n};\n\nvar dragThumb = function(i) {\n bindMouseScrollHandler(i, [\n 'containerWidth',\n 'contentWidth',\n 'pageX',\n 'railXWidth',\n 'scrollbarX',\n 'scrollbarXWidth',\n 'scrollLeft',\n 'x' ]);\n bindMouseScrollHandler(i, [\n 'containerHeight',\n 'contentHeight',\n 'pageY',\n 'railYHeight',\n 'scrollbarY',\n 'scrollbarYHeight',\n 'scrollTop',\n 'y' ]);\n};\n\nfunction bindMouseScrollHandler(\n i,\n ref\n) {\n var containerHeight = ref[0];\n var contentHeight = ref[1];\n var pageY = ref[2];\n var railYHeight = ref[3];\n var scrollbarY = ref[4];\n var scrollbarYHeight = ref[5];\n var scrollTop = ref[6];\n var y = ref[7];\n\n var element = i.element;\n\n var startingScrollTop = null;\n var startingMousePageY = null;\n var scrollBy = null;\n\n function mouseMoveHandler(e) {\n element[scrollTop] =\n startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);\n addScrollingClass(i, y);\n updateGeometry(i);\n\n e.stopPropagation();\n e.preventDefault();\n }\n\n function mouseUpHandler() {\n removeScrollingClass(i, y);\n i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);\n }\n\n i.event.bind(i[scrollbarY], 'mousedown', function (e) {\n startingScrollTop = element[scrollTop];\n startingMousePageY = e[pageY];\n scrollBy =\n (i[contentHeight] - i[containerHeight]) /\n (i[railYHeight] - i[scrollbarYHeight]);\n\n i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);\n i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);\n\n e.stopPropagation();\n e.preventDefault();\n });\n}\n\nvar keyboard = function(i) {\n var element = i.element;\n\n var elementHovered = function () { return matches(element, ':hover'); };\n var scrollbarFocused = function () { return matches(i.scrollbarX, ':focus') || matches(i.scrollbarY, ':focus'); };\n\n function shouldPreventDefault(deltaX, deltaY) {\n var scrollTop = element.scrollTop;\n if (deltaX === 0) {\n if (!i.scrollbarYActive) {\n return false;\n }\n if (\n (scrollTop === 0 && deltaY > 0) ||\n (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)\n ) {\n return !i.settings.wheelPropagation;\n }\n }\n\n var scrollLeft = element.scrollLeft;\n if (deltaY === 0) {\n if (!i.scrollbarXActive) {\n return false;\n }\n if (\n (scrollLeft === 0 && deltaX < 0) ||\n (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)\n ) {\n return !i.settings.wheelPropagation;\n }\n }\n return true;\n }\n\n i.event.bind(i.ownerDocument, 'keydown', function (e) {\n if (\n (e.isDefaultPrevented && e.isDefaultPrevented()) ||\n e.defaultPrevented\n ) {\n return;\n }\n\n if (!elementHovered() && !scrollbarFocused()) {\n return;\n }\n\n var activeElement = document.activeElement\n ? document.activeElement\n : i.ownerDocument.activeElement;\n if (activeElement) {\n if (activeElement.tagName === 'IFRAME') {\n activeElement = activeElement.contentDocument.activeElement;\n } else {\n // go deeper if element is a webcomponent\n while (activeElement.shadowRoot) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n }\n if (isEditable(activeElement)) {\n return;\n }\n }\n\n var deltaX = 0;\n var deltaY = 0;\n\n switch (e.which) {\n case 37: // left\n if (e.metaKey) {\n deltaX = -i.contentWidth;\n } else if (e.altKey) {\n deltaX = -i.containerWidth;\n } else {\n deltaX = -30;\n }\n break;\n case 38: // up\n if (e.metaKey) {\n deltaY = i.contentHeight;\n } else if (e.altKey) {\n deltaY = i.containerHeight;\n } else {\n deltaY = 30;\n }\n break;\n case 39: // right\n if (e.metaKey) {\n deltaX = i.contentWidth;\n } else if (e.altKey) {\n deltaX = i.containerWidth;\n } else {\n deltaX = 30;\n }\n break;\n case 40: // down\n if (e.metaKey) {\n deltaY = -i.contentHeight;\n } else if (e.altKey) {\n deltaY = -i.containerHeight;\n } else {\n deltaY = -30;\n }\n break;\n case 32: // space bar\n if (e.shiftKey) {\n deltaY = i.containerHeight;\n } else {\n deltaY = -i.containerHeight;\n }\n break;\n case 33: // page up\n deltaY = i.containerHeight;\n break;\n case 34: // page down\n deltaY = -i.containerHeight;\n break;\n case 36: // home\n deltaY = i.contentHeight;\n break;\n case 35: // end\n deltaY = -i.contentHeight;\n break;\n default:\n return;\n }\n\n if (i.settings.suppressScrollX && deltaX !== 0) {\n return;\n }\n if (i.settings.suppressScrollY && deltaY !== 0) {\n return;\n }\n\n element.scrollTop -= deltaY;\n element.scrollLeft += deltaX;\n updateGeometry(i);\n\n if (shouldPreventDefault(deltaX, deltaY)) {\n e.preventDefault();\n }\n });\n};\n\nvar wheel = function(i) {\n var element = i.element;\n\n function shouldPreventDefault(deltaX, deltaY) {\n var isTop = element.scrollTop === 0;\n var isBottom =\n element.scrollTop + element.offsetHeight === element.scrollHeight;\n var isLeft = element.scrollLeft === 0;\n var isRight =\n element.scrollLeft + element.offsetWidth === element.offsetWidth;\n\n var hitsBound;\n\n // pick axis with primary direction\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n hitsBound = isTop || isBottom;\n } else {\n hitsBound = isLeft || isRight;\n }\n\n return hitsBound ? !i.settings.wheelPropagation : true;\n }\n\n function getDeltaFromEvent(e) {\n var deltaX = e.deltaX;\n var deltaY = -1 * e.deltaY;\n\n if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {\n // OS X Safari\n deltaX = -1 * e.wheelDeltaX / 6;\n deltaY = e.wheelDeltaY / 6;\n }\n\n if (e.deltaMode && e.deltaMode === 1) {\n // Firefox in deltaMode 1: Line scrolling\n deltaX *= 10;\n deltaY *= 10;\n }\n\n if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {\n // IE in some mouse drivers\n deltaX = 0;\n deltaY = e.wheelDelta;\n }\n\n if (e.shiftKey) {\n // reverse axis with shift key\n return [-deltaY, -deltaX];\n }\n return [deltaX, deltaY];\n }\n\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\n // FIXME: this is a workaround for \n \n \n \n\n
\n \n
\n \n
\n
\n\n \n\n
\n \n \n \n \n
\n\n \n\n
\n \n \n \n \n
\n\n
\n \n
\n \n\n
\n \n
\n \n\n`;\n\ncoreModule.directive('hasticGraphThresholdForm', function() {\n return {\n restrict: 'E',\n template: template,\n controller: ThresholdFormCtrl,\n bindToController: true,\n controllerAs: 'ctrl',\n scope: {\n panelCtrl: '=',\n },\n };\n});\n","/* Flot plugin for showing crosshairs when the mouse hovers over the plot.\n\nCopyright (c) 2007-2014 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nThe plugin supports these options:\n\n\tcrosshair: {\n\t\tmode: null or \"x\" or \"y\" or \"xy\"\n\t\tcolor: color\n\t\tlineWidth: number\n\t}\n\nSet the mode to one of \"x\", \"y\" or \"xy\". The \"x\" mode enables a vertical\ncrosshair that lets you trace the values on the x axis, \"y\" enables a\nhorizontal crosshair and \"xy\" enables them both. \"color\" is the color of the\ncrosshair (default is \"rgba(170, 0, 0, 0.80)\"), \"lineWidth\" is the width of\nthe drawn lines (default is 1).\n\nThe plugin also adds four public methods:\n\n - setCrosshair( pos )\n\n Set the position of the crosshair. Note that this is cleared if the user\n moves the mouse. \"pos\" is in coordinates of the plot and should be on the\n form { x: xpos, y: ypos } (you can use x2/x3/... if you're using multiple\n axes), which is coincidentally the same format as what you get from a\n \"plothover\" event. If \"pos\" is null, the crosshair is cleared.\n\n - clearCrosshair()\n\n Clear the crosshair.\n\n - lockCrosshair(pos)\n\n Cause the crosshair to lock to the current location, no longer updating if\n the user moves the mouse. Optionally supply a position (passed on to\n setCrosshair()) to move it to.\n\n Example usage:\n\n\tvar myFlot = $.plot( $(\"#graph\"), ..., { crosshair: { mode: \"x\" } } };\n\t$(\"#graph\").bind( \"plothover\", function ( evt, position, item ) {\n\t\tif ( item ) {\n\t\t\t// Lock the crosshair to the data point being hovered\n\t\t\tmyFlot.lockCrosshair({\n\t\t\t\tx: item.datapoint[ 0 ],\n\t\t\t\ty: item.datapoint[ 1 ]\n\t\t\t});\n\t\t} else {\n\t\t\t// Return normal crosshair operation\n\t\t\tmyFlot.unlockCrosshair();\n\t\t}\n\t});\n\n - unlockCrosshair()\n\n Free the crosshair to move again after locking it.\n*/\n\n(function ($) {\n var options = {\n crosshair: {\n mode: null, // one of null, \"x\", \"y\" or \"xy\",\n color: \"rgba(170, 0, 0, 0.80)\",\n lineWidth: 1\n }\n };\n \n function init(plot) {\n // position of crosshair in pixels\n var crosshair = { x: -1, y: -1, locked: false };\n\n plot.setCrosshair = function setCrosshair(pos) {\n if (!pos)\n crosshair.x = -1;\n else {\n var o = plot.p2c(pos);\n crosshair.x = Math.max(0, Math.min(o.left, plot.width()));\n crosshair.y = Math.max(0, Math.min(o.top, plot.height()));\n }\n \n plot.triggerRedrawOverlay();\n };\n \n plot.clearCrosshair = plot.setCrosshair; // passes null for pos\n \n plot.lockCrosshair = function lockCrosshair(pos) {\n if (pos)\n plot.setCrosshair(pos);\n crosshair.locked = true;\n };\n\n plot.unlockCrosshair = function unlockCrosshair() {\n crosshair.locked = false;\n };\n\n function onMouseOut(e) {\n if (crosshair.locked)\n return;\n\n if (crosshair.x != -1) {\n crosshair.x = -1;\n plot.triggerRedrawOverlay();\n }\n }\n\n function onMouseMove(e) {\n if (crosshair.locked)\n return;\n \n if (plot.getSelection && plot.getSelection()) {\n crosshair.x = -1; // hide the crosshair while selecting\n return;\n }\n \n var offset = plot.offset();\n crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));\n crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));\n plot.triggerRedrawOverlay();\n }\n \n plot.hooks.bindEvents.push(function (plot, eventHolder) {\n if (!plot.getOptions().crosshair.mode)\n return;\n\n eventHolder.mouseout(onMouseOut);\n eventHolder.mousemove(onMouseMove);\n });\n\n plot.hooks.drawOverlay.push(function (plot, ctx) {\n var c = plot.getOptions().crosshair;\n if (!c.mode)\n return;\n\n var plotOffset = plot.getPlotOffset();\n \n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n if (crosshair.x != -1) {\n var adj = plot.getOptions().crosshair.lineWidth % 2 ? 0.5 : 0;\n\n ctx.strokeStyle = c.color;\n ctx.lineWidth = c.lineWidth;\n ctx.lineJoin = \"round\";\n\n ctx.beginPath();\n if (c.mode.indexOf(\"x\") != -1) {\n var drawX = Math.floor(crosshair.x) + adj;\n ctx.moveTo(drawX, 0);\n ctx.lineTo(drawX, plot.height());\n }\n if (c.mode.indexOf(\"y\") != -1) {\n var drawY = Math.floor(crosshair.y) + adj;\n ctx.moveTo(0, drawY);\n ctx.lineTo(plot.width(), drawY);\n }\n ctx.stroke();\n }\n ctx.restore();\n });\n\n plot.hooks.shutdown.push(function (plot, eventHolder) {\n eventHolder.unbind(\"mouseout\", onMouseOut);\n eventHolder.unbind(\"mousemove\", onMouseMove);\n });\n }\n \n $.plot.plugins.push({\n init: init,\n options: options,\n name: 'crosshair',\n version: '1.0'\n });\n})(jQuery);\n","/*\n * jQuery.flot.dashes\n *\n * options = {\n * series: {\n * dashes: {\n *\n * // show\n * // default: false\n * // Whether to show dashes for the series.\n * show: ,\n *\n * // lineWidth\n * // default: 2\n * // The width of the dashed line in pixels.\n * lineWidth: ,\n *\n * // dashLength\n * // default: 10\n * // Controls the length of the individual dashes and the amount of\n * // space between them.\n * // If this is a number, the dashes and spaces will have that length.\n * // If this is an array, it is read as [ dashLength, spaceLength ]\n * dashLength: or \n * }\n * }\n * }\n */\n(function($){\n\n function init(plot) {\n\n plot.hooks.processDatapoints.push(function(plot, series, datapoints) {\n\n if (!series.dashes.show) return;\n\n plot.hooks.draw.push(function(plot, ctx) {\n\n var plotOffset = plot.getPlotOffset(),\n axisx = series.xaxis,\n axisy = series.yaxis;\n\n function plotDashes(xoffset, yoffset) {\n\n var points = datapoints.points,\n ps = datapoints.pointsize,\n prevx = null,\n prevy = null,\n dashRemainder = 0,\n dashOn = true,\n dashOnLength,\n dashOffLength;\n\n if (series.dashes.dashLength[0]) {\n dashOnLength = series.dashes.dashLength[0];\n if (series.dashes.dashLength[1]) {\n dashOffLength = series.dashes.dashLength[1];\n } else {\n dashOffLength = dashOnLength;\n }\n } else {\n dashOffLength = dashOnLength = series.dashes.dashLength;\n }\n\n ctx.beginPath();\n\n for (var i = ps; i < points.length; i += ps) {\n\n var x1 = points[i - ps],\n y1 = points[i - ps + 1],\n x2 = points[i],\n y2 = points[i + 1];\n\n if (x1 == null || x2 == null) continue;\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min) {\n if (y2 < axisy.min) continue; // line segment is outside\n // compute new intersection point\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n } else if (y2 <= y1 && y2 < axisy.min) {\n if (y1 < axisy.min) continue;\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max) {\n if (y2 > axisy.max) continue;\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n } else if (y2 >= y1 && y2 > axisy.max) {\n if (y1 > axisy.max) continue;\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min) continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n } else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min) continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max) continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n } else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max) continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (x1 != prevx || y1 != prevy) {\n ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);\n }\n\n var ax1 = axisx.p2c(x1) + xoffset,\n ay1 = axisy.p2c(y1) + yoffset,\n ax2 = axisx.p2c(x2) + xoffset,\n ay2 = axisy.p2c(y2) + yoffset,\n dashOffset;\n\n function lineSegmentOffset(segmentLength) {\n\n var c = Math.sqrt(Math.pow(ax2 - ax1, 2) + Math.pow(ay2 - ay1, 2));\n\n if (c <= segmentLength) {\n return {\n deltaX: ax2 - ax1,\n deltaY: ay2 - ay1,\n distance: c,\n remainder: segmentLength - c\n }\n } else {\n var xsign = ax2 > ax1 ? 1 : -1,\n ysign = ay2 > ay1 ? 1 : -1;\n return {\n deltaX: xsign * Math.sqrt(Math.pow(segmentLength, 2) / (1 + Math.pow((ay2 - ay1)/(ax2 - ax1), 2))),\n deltaY: ysign * Math.sqrt(Math.pow(segmentLength, 2) - Math.pow(segmentLength, 2) / (1 + Math.pow((ay2 - ay1)/(ax2 - ax1), 2))),\n distance: segmentLength,\n remainder: 0\n };\n }\n }\n //-end lineSegmentOffset\n\n do {\n\n dashOffset = lineSegmentOffset(\n dashRemainder > 0 ? dashRemainder :\n dashOn ? dashOnLength : dashOffLength);\n\n if (dashOffset.deltaX != 0 || dashOffset.deltaY != 0) {\n if (dashOn) {\n ctx.lineTo(ax1 + dashOffset.deltaX, ay1 + dashOffset.deltaY);\n } else {\n ctx.moveTo(ax1 + dashOffset.deltaX, ay1 + dashOffset.deltaY);\n }\n }\n\n dashOn = !dashOn;\n dashRemainder = dashOffset.remainder;\n ax1 += dashOffset.deltaX;\n ay1 += dashOffset.deltaY;\n\n } while (dashOffset.distance > 0);\n\n prevx = x2;\n prevy = y2;\n }\n\n ctx.stroke();\n }\n //-end plotDashes\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n ctx.lineJoin = 'round';\n\n var lw = series.dashes.lineWidth,\n sw = series.shadowSize;\n\n // FIXME: consider another form of shadow when filling is turned on\n if (lw > 0 && sw > 0) {\n // draw shadow as a thick and thin line with transparency\n ctx.lineWidth = sw;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n // position shadow at angle from the mid of line\n var angle = Math.PI/18;\n plotDashes(Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2));\n ctx.lineWidth = sw/2;\n plotDashes(Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4));\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n\n if (lw > 0) {\n plotDashes(0, 0);\n }\n\n ctx.restore();\n\n });\n //-end draw hook\n\n });\n //-end processDatapoints hook\n\n }\n //-end init\n\n $.plot.plugins.push({\n init: init,\n options: {\n series: {\n dashes: {\n show: false,\n lineWidth: 2,\n dashLength: 10\n }\n }\n },\n name: 'dashes',\n version: '0.1'\n });\n\n})(jQuery)\n","define([\n 'jquery',\n 'lodash',\n 'angular',\n 'tether-drop',\n],\nfunction ($, _, angular, Drop) {\n 'use strict';\n\n function createAnnotationToolip(element, event, plot) {\n var injector = angular.element(document).injector();\n var content = document.createElement('div');\n content.innerHTML = '';\n\n injector.invoke([\"$compile\", \"$rootScope\", function($compile, $rootScope) {\n var eventManager = plot.getOptions().events.manager;\n var tmpScope = $rootScope.$new(true);\n tmpScope.event = event;\n tmpScope.onEdit = function() {\n eventManager.editEvent(event);\n };\n\n $compile(content)(tmpScope);\n tmpScope.$digest();\n tmpScope.$destroy();\n\n var drop = new Drop({\n target: element[0],\n content: content,\n position: \"bottom center\",\n classes: 'drop-popover drop-popover--annotation',\n openOn: 'hover',\n hoverCloseDelay: 200,\n tetherOptions: {\n constraints: [{to: 'window', pin: true, attachment: \"both\"}]\n }\n });\n\n drop.open();\n\n drop.on('close', function() {\n setTimeout(function() {\n drop.destroy();\n });\n });\n }]);\n }\n\n var markerElementToAttachTo = null;\n\n function createEditPopover(element, event, plot) {\n var eventManager = plot.getOptions().events.manager;\n if (eventManager.editorOpen) {\n // update marker element to attach to (needed in case of legend on the right\n // when there is a double render pass and the inital marker element is removed)\n markerElementToAttachTo = element;\n return;\n }\n\n // mark as openend\n eventManager.editorOpened();\n // set marker elment to attache to\n markerElementToAttachTo = element;\n\n // wait for element to be attached and positioned\n setTimeout(function() {\n\n var injector = angular.element(document).injector();\n var content = document.createElement('div');\n content.innerHTML = '';\n\n injector.invoke([\"$compile\", \"$rootScope\", function($compile, $rootScope) {\n var scope = $rootScope.$new(true);\n var drop;\n\n scope.event = event;\n scope.panelCtrl = eventManager.panelCtrl;\n scope.close = function() {\n drop.close();\n };\n\n $compile(content)(scope);\n scope.$digest();\n\n drop = new Drop({\n target: markerElementToAttachTo[0],\n content: content,\n position: \"bottom center\",\n classes: 'drop-popover drop-popover--form',\n openOn: 'click',\n tetherOptions: {\n constraints: [{to: 'window', pin: true, attachment: \"both\"}]\n }\n });\n\n drop.open();\n eventManager.editorOpened();\n\n drop.on('close', function() {\n // need timeout here in order call drop.destroy\n setTimeout(function() {\n eventManager.editorClosed();\n scope.$destroy();\n drop.destroy();\n });\n });\n }]);\n\n }, 100);\n }\n\n /*\n * jquery.flot.events\n *\n * description: Flot plugin for adding events/markers to the plot\n * version: 0.2.5\n * authors:\n * Alexander Wunschik \n * Joel Oughton \n * Nicolas Joseph \n *\n * website: https://github.com/mojoaxel/flot-events\n *\n * released under MIT License and GPLv2+\n */\n\n /**\n * A class that allows for the drawing an remove of some object\n */\n var DrawableEvent = function(object, drawFunc, clearFunc, moveFunc, left, top, width, height) {\n var _object = object;\n var\t_drawFunc = drawFunc;\n var\t_clearFunc = clearFunc;\n var\t_moveFunc = moveFunc;\n var\t_position = { left: left, top: top };\n var\t_width = width;\n var\t_height = height;\n\n this.width = function() { return _width; };\n this.height = function() { return _height; };\n this.position = function() { return _position; };\n this.draw = function() { _drawFunc(_object); };\n this.clear = function() { _clearFunc(_object); };\n this.getObject = function() { return _object; };\n this.moveTo = function(position) {\n _position = position;\n _moveFunc(_object, _position);\n };\n };\n\n /**\n * Event class that stores options (eventType, min, max, title, description) and the object to draw.\n */\n var VisualEvent = function(options, drawableEvent) {\n var _parent;\n var _options = options;\n var _drawableEvent = drawableEvent;\n var _hidden = false;\n\n this.visual = function() { return _drawableEvent; };\n this.getOptions = function() { return _options; };\n this.getParent = function() { return _parent; };\n this.isHidden = function() { return _hidden; };\n this.hide = function() { _hidden = true; };\n this.unhide = function() { _hidden = false; };\n };\n\n /**\n * A Class that handles the event-markers inside the given plot\n */\n var EventMarkers = function(plot) {\n var _events = [];\n\n this._types = [];\n this._plot = plot;\n this.eventsEnabled = false;\n\n this.getEvents = function() {\n return _events;\n };\n\n this.setTypes = function(types) {\n return this._types = types;\n };\n\n /**\n * create internal objects for the given events\n */\n this.setupEvents = function(events) {\n var that = this;\n var parts = _.partition(events, 'isRegion');\n var regions = parts[0];\n events = parts[1];\n\n $.each(events, function(index, event) {\n var ve = new VisualEvent(event, that._buildDiv(event));\n _events.push(ve);\n });\n\n $.each(regions, function (index, event) {\n var vre = new VisualEvent(event, that._buildRegDiv(event));\n _events.push(vre);\n });\n\n _events.sort(function(a, b) {\n var ao = a.getOptions(), bo = b.getOptions();\n if (ao.min > bo.min) { return 1; }\n if (ao.min < bo.min) { return -1; }\n return 0;\n });\n };\n\n /**\n * draw the events to the plot\n */\n this.drawEvents = function() {\n var that = this;\n // var o = this._plot.getPlotOffset();\n\n $.each(_events, function(index, event) {\n // check event is inside the graph range\n if (that._insidePlot(event.getOptions().min) && !event.isHidden()) {\n event.visual().draw();\n } else {\n event.visual().getObject().hide();\n }\n });\n };\n\n /**\n * update the position of the event-markers (e.g. after scrolling or zooming)\n */\n this.updateEvents = function() {\n var that = this;\n var o = this._plot.getPlotOffset(), left, top;\n var xaxis = this._plot.getXAxes()[this._plot.getOptions().events.xaxis - 1];\n\n $.each(_events, function(index, event) {\n top = o.top + that._plot.height() - event.visual().height();\n left = xaxis.p2c(event.getOptions().min) + o.left - event.visual().width() / 2;\n event.visual().moveTo({ top: top, left: left });\n });\n };\n\n /**\n * remove all events from the plot\n */\n this._clearEvents = function() {\n $.each(_events, function(index, val) {\n val.visual().clear();\n });\n _events = [];\n };\n\n /**\n * create a DOM element for the given event\n */\n this._buildDiv = function(event) {\n var that = this;\n\n var container = this._plot.getPlaceholder();\n var o = this._plot.getPlotOffset();\n var axes = this._plot.getAxes();\n var xaxis = this._plot.getXAxes()[this._plot.getOptions().events.xaxis - 1];\n var yaxis, top, left, color, markerSize, markerShow, lineStyle, lineWidth;\n var markerTooltip;\n\n // determine the y axis used\n if (axes.yaxis && axes.yaxis.used) { yaxis = axes.yaxis; }\n if (axes.yaxis2 && axes.yaxis2.used) { yaxis = axes.yaxis2; }\n\n // map the eventType to a types object\n var eventTypeId = event.eventType;\n\n if (this._types === null || !this._types[eventTypeId] || !this._types[eventTypeId].color) {\n color = '#666';\n } else {\n color = this._types[eventTypeId].color;\n }\n\n if (this._types === null || !this._types[eventTypeId] || !this._types[eventTypeId].markerSize) {\n markerSize = 8; //default marker size\n } else {\n markerSize = this._types[eventTypeId].markerSize;\n }\n\n if (this._types === null || !this._types[eventTypeId] || this._types[eventTypeId].markerShow === undefined) {\n markerShow = true;\n } else {\n markerShow = this._types[eventTypeId].markerShow;\n }\n\n if (this._types === null || !this._types[eventTypeId] || this._types[eventTypeId].markerTooltip === undefined) {\n markerTooltip = true;\n } else {\n markerTooltip = this._types[eventTypeId].markerTooltip;\n }\n\n if (this._types == null || !this._types[eventTypeId] || !this._types[eventTypeId].lineStyle) {\n lineStyle = 'dashed'; //default line style\n } else {\n lineStyle = this._types[eventTypeId].lineStyle.toLowerCase();\n }\n\n if (this._types == null || !this._types[eventTypeId] || this._types[eventTypeId].lineWidth === undefined) {\n lineWidth = 1; //default line width\n } else {\n lineWidth = this._types[eventTypeId].lineWidth;\n }\n\n var topOffset = xaxis.options.eventSectionHeight || 0;\n topOffset = topOffset / 3;\n\n top = o.top + this._plot.height() + topOffset;\n left = xaxis.p2c(event.min) + o.left;\n\n var line = $('
').css({\n \"position\": \"absolute\",\n \"opacity\": 0.8,\n \"left\": left + 'px',\n \"top\": 8,\n \"width\": lineWidth + \"px\",\n \"height\": this._plot.height() + topOffset * 0.8,\n \"border-left-width\": lineWidth + \"px\",\n \"border-left-style\": lineStyle,\n \"border-left-color\": color,\n \"color\": color\n })\n .appendTo(container);\n\n if (markerShow) {\n var marker = $('
').css({\n \"position\": \"absolute\",\n \"left\": (-markerSize - Math.round(lineWidth / 2)) + \"px\",\n \"font-size\": 0,\n \"line-height\": 0,\n \"width\": 0,\n \"height\": 0,\n \"border-left\": markerSize+\"px solid transparent\",\n \"border-right\": markerSize+\"px solid transparent\"\n });\n\n marker.appendTo(line);\n\n if (this._types[eventTypeId] && this._types[eventTypeId].position && this._types[eventTypeId].position.toUpperCase() === 'BOTTOM') {\n marker.css({\n \"top\": top-markerSize-8 +\"px\",\n \"border-top\": \"none\",\n \"border-bottom\": markerSize+\"px solid \" + color\n });\n } else {\n marker.css({\n \"top\": \"0px\",\n \"border-top\": markerSize+\"px solid \" + color,\n \"border-bottom\": \"none\"\n });\n }\n\n marker.data({\n \"event\": event\n });\n\n var mouseenter = function() {\n createAnnotationToolip(marker, $(this).data(\"event\"), that._plot);\n };\n\n if (event.editModel) {\n createEditPopover(marker, event.editModel, that._plot);\n }\n\n var mouseleave = function() {\n that._plot.clearSelection();\n };\n\n if (markerTooltip) {\n marker.css({ \"cursor\": \"help\" });\n marker.hover(mouseenter, mouseleave);\n }\n }\n\n var drawableEvent = new DrawableEvent(\n line,\n function drawFunc(obj) { obj.show(); },\n function(obj) { obj.remove(); },\n function(obj, position) {\n obj.css({\n top: position.top,\n left: position.left\n });\n },\n left,\n top,\n line.width(),\n line.height()\n );\n\n return drawableEvent;\n };\n\n /**\n * create a DOM element for the given region\n */\n this._buildRegDiv = function (event) {\n var that = this;\n\n var container = this._plot.getPlaceholder();\n var o = this._plot.getPlotOffset();\n var axes = this._plot.getAxes();\n var xaxis = this._plot.getXAxes()[this._plot.getOptions().events.xaxis - 1];\n var yaxis, top, left, lineWidth, regionWidth, lineStyle, color, markerTooltip;\n\n // determine the y axis used\n if (axes.yaxis && axes.yaxis.used) { yaxis = axes.yaxis; }\n if (axes.yaxis2 && axes.yaxis2.used) { yaxis = axes.yaxis2; }\n\n // map the eventType to a types object\n var eventTypeId = event.eventType;\n\n if (this._types === null || !this._types[eventTypeId] || !this._types[eventTypeId].color) {\n color = '#666';\n } else {\n color = this._types[eventTypeId].color;\n }\n\n if (this._types === null || !this._types[eventTypeId] || this._types[eventTypeId].markerTooltip === undefined) {\n markerTooltip = true;\n } else {\n markerTooltip = this._types[eventTypeId].markerTooltip;\n }\n\n if (this._types == null || !this._types[eventTypeId] || this._types[eventTypeId].lineWidth === undefined) {\n lineWidth = 1; //default line width\n } else {\n lineWidth = this._types[eventTypeId].lineWidth;\n }\n\n if (this._types == null || !this._types[eventTypeId] || !this._types[eventTypeId].lineStyle) {\n lineStyle = 'dashed'; //default line style\n } else {\n lineStyle = this._types[eventTypeId].lineStyle.toLowerCase();\n }\n\n var topOffset = 2;\n top = o.top + this._plot.height() + topOffset;\n\n var timeFrom = Math.min(event.min, event.timeEnd);\n var timeTo = Math.max(event.min, event.timeEnd);\n left = xaxis.p2c(timeFrom) + o.left;\n var right = xaxis.p2c(timeTo) + o.left;\n regionWidth = right - left;\n\n _.each([left, right], function(position) {\n var line = $('
').css({\n \"position\": \"absolute\",\n \"opacity\": 0.8,\n \"left\": position + 'px',\n \"top\": 8,\n \"width\": lineWidth + \"px\",\n \"height\": that._plot.height() + topOffset,\n \"border-left-width\": lineWidth + \"px\",\n \"border-left-style\": lineStyle,\n \"border-left-color\": color,\n \"color\": color\n });\n line.appendTo(container);\n });\n\n var region = $('
').css({\n \"position\": \"absolute\",\n \"opacity\": 0.5,\n \"left\": left + 'px',\n \"top\": top,\n \"width\": Math.round(regionWidth + lineWidth) + \"px\",\n \"height\": \"0.5rem\",\n \"border-left-color\": color,\n \"color\": color,\n \"background-color\": color\n });\n region.appendTo(container);\n\n region.data({\n \"event\": event\n });\n\n var mouseenter = function () {\n createAnnotationToolip(region, $(this).data(\"event\"), that._plot);\n };\n\n if (event.editModel) {\n createEditPopover(region, event.editModel, that._plot);\n }\n\n var mouseleave = function () {\n that._plot.clearSelection();\n };\n\n if (markerTooltip) {\n region.css({ \"cursor\": \"help\" });\n region.hover(mouseenter, mouseleave);\n }\n\n var drawableEvent = new DrawableEvent(\n region,\n function drawFunc(obj) { obj.show(); },\n function (obj) { obj.remove(); },\n function (obj, position) {\n obj.css({\n top: position.top,\n left: position.left\n });\n },\n left,\n top,\n region.width(),\n region.height()\n );\n\n return drawableEvent;\n };\n\n /**\n * check if the event is inside visible range\n */\n this._insidePlot = function(x) {\n var xaxis = this._plot.getXAxes()[this._plot.getOptions().events.xaxis - 1];\n var xc = xaxis.p2c(x);\n return xc > 0 && xc < xaxis.p2c(xaxis.max);\n };\n };\n\n /**\n * initialize the plugin for the given plot\n */\n function init(plot) {\n /*jshint validthis:true */\n var that = this;\n var eventMarkers = new EventMarkers(plot);\n\n plot.getEvents = function() {\n return eventMarkers._events;\n };\n\n plot.hideEvents = function() {\n $.each(eventMarkers._events, function(index, event) {\n event.visual().getObject().hide();\n });\n };\n\n plot.showEvents = function() {\n plot.hideEvents();\n $.each(eventMarkers._events, function(index, event) {\n event.hide();\n });\n\n that.eventMarkers.drawEvents();\n };\n\n // change events on an existing plot\n plot.setEvents = function(events) {\n if (eventMarkers.eventsEnabled) {\n eventMarkers.setupEvents(events);\n }\n };\n\n plot.hooks.processOptions.push(function(plot, options) {\n // enable the plugin\n if (options.events.data != null) {\n eventMarkers.eventsEnabled = true;\n }\n });\n\n plot.hooks.draw.push(function(plot) {\n var options = plot.getOptions();\n\n if (eventMarkers.eventsEnabled) {\n // check for first run\n if (eventMarkers.getEvents().length < 1) {\n eventMarkers.setTypes(options.events.types);\n eventMarkers.setupEvents(options.events.data);\n } else {\n eventMarkers.updateEvents();\n }\n }\n\n eventMarkers.drawEvents();\n });\n }\n\n var defaultOptions = {\n events: {\n data: null,\n types: null,\n xaxis: 1,\n position: 'BOTTOM'\n }\n };\n\n $.plot.plugins.push({\n init: init,\n options: defaultOptions,\n name: \"events\",\n version: \"0.2.5\"\n });\n});\n","(function($) {\n \"use strict\";\n\n var options = {\n series: {\n fillBelowTo: null\n }\n };\n\n function init(plot) {\n function findBelowSeries( series, allseries ) {\n\n var i;\n\n for ( i = 0; i < allseries.length; ++i ) {\n if ( allseries[ i ].id === series.fillBelowTo ) {\n return allseries[ i ];\n }\n }\n\n return null;\n }\n\n /* top and bottom doesn't actually matter for this, we're just using it to help make this easier to think about */\n /* this is a vector cross product operation */\n function segmentIntersection(top_left_x, top_left_y, top_right_x, top_right_y, bottom_left_x, bottom_left_y, bottom_right_x, bottom_right_y) {\n var top_delta_x, top_delta_y, bottom_delta_x, bottom_delta_y,\n s, t;\n\n top_delta_x = top_right_x - top_left_x;\n top_delta_y = top_right_y - top_left_y;\n bottom_delta_x = bottom_right_x - bottom_left_x;\n bottom_delta_y = bottom_right_y - bottom_left_y;\n\n s = (\n (-top_delta_y * (top_left_x - bottom_left_x)) + (top_delta_x * (top_left_y - bottom_left_y))\n ) / (\n -bottom_delta_x * top_delta_y + top_delta_x * bottom_delta_y\n );\n\n t = (\n (bottom_delta_x * (top_left_y - bottom_left_y)) - (bottom_delta_y * (top_left_x - bottom_left_x))\n ) / (\n -bottom_delta_x * top_delta_y + top_delta_x * bottom_delta_y\n );\n\n // Collision detected\n if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {\n return [\n top_left_x + (t * top_delta_x), // X\n top_left_y + (t * top_delta_y) // Y\n ];\n }\n\n // No collision\n return null;\n }\n\n function plotDifferenceArea(plot, ctx, series) {\n if ( series.fillBelowTo === null ) {\n return;\n }\n\n var otherseries,\n\n ps,\n points,\n\n otherps,\n otherpoints,\n\n plotOffset,\n fillStyle;\n\n function openPolygon(x, y) {\n ctx.beginPath();\n ctx.moveTo(\n series.xaxis.p2c(x) + plotOffset.left,\n series.yaxis.p2c(y) + plotOffset.top\n );\n\n }\n\n function closePolygon() {\n ctx.closePath();\n ctx.fill();\n }\n\n function validateInput() {\n if (points.length/ps !== otherpoints.length/otherps) {\n console.error(\"Refusing to graph inconsistent number of points\");\n return false;\n }\n\n var i;\n for (i = 0; i < (points.length / ps); i++) {\n if (\n points[i * ps] !== null &&\n otherpoints[i * otherps] !== null &&\n points[i * ps] !== otherpoints[i * otherps]\n ) {\n console.error(\"Refusing to graph points without matching value\");\n return false;\n }\n }\n\n return true;\n }\n\n function findNextStart(start_i, end_i) {\n console.assert(end_i > start_i, \"expects the end index to be greater than the start index\");\n\n var start = (\n start_i === 0 ||\n points[start_i - 1] === null ||\n otherpoints[start_i - 1] === null\n ),\n equal = false,\n i,\n intersect;\n\n for (i = start_i; i < end_i; i++) {\n // Take note of null points\n if (\n points[(i * ps) + 1] === null ||\n otherpoints[(i * ps) + 1] === null\n ) {\n equal = false;\n start = true;\n }\n\n // Take note of equal points\n else if (points[(i * ps) + 1] === otherpoints[(i * otherps) + 1]) {\n equal = true;\n start = false;\n }\n\n\n else if (points[(i * ps) + 1] > otherpoints[(i * otherps) + 1]) {\n // If we begin above the desired point\n if (start) {\n openPolygon(points[i * ps], points[(i * ps) + 1]);\n }\n\n // If an equal point preceeds this, start the polygon at that equal point\n else if (equal) {\n openPolygon(points[(i - 1) * ps], points[((i - 1) * ps) + 1]);\n }\n\n // Otherwise, find the intersection point, and start it there\n else {\n intersect = intersectionPoint(i);\n openPolygon(intersect[0], intersect[1]);\n }\n\n topTraversal(i, end_i);\n return;\n }\n\n // If we go below equal, equal at any preceeding point is irrelevant\n else {\n start = false;\n equal = false;\n }\n }\n }\n\n function intersectionPoint(right_i) {\n console.assert(right_i > 0, \"expects the second point in the series line segment\");\n\n var i, intersect;\n\n for (i = 1; i < (otherpoints.length/otherps); i++) {\n intersect = segmentIntersection(\n points[(right_i - 1) * ps], points[((right_i - 1) * ps) + 1],\n points[right_i * ps], points[(right_i * ps) + 1],\n\n otherpoints[(i - 1) * otherps], otherpoints[((i - 1) * otherps) + 1],\n otherpoints[i * otherps], otherpoints[(i * otherps) + 1]\n );\n\n if (intersect !== null) {\n return intersect;\n }\n }\n\n console.error(\"intersectionPoint() should only be called when an intersection happens\");\n }\n\n function bottomTraversal(start_i, end_i) {\n console.assert(start_i >= end_i, \"the start should be the rightmost point, and the end should be the leftmost (excluding the equal or intersecting point)\");\n\n var i;\n\n for (i = start_i; i >= end_i; i--) {\n ctx.lineTo(\n otherseries.xaxis.p2c(otherpoints[i * otherps]) + plotOffset.left,\n otherseries.yaxis.p2c(otherpoints[(i * otherps) + 1]) + plotOffset.top\n );\n }\n\n closePolygon();\n }\n\n function topTraversal(start_i, end_i) {\n console.assert(start_i <= end_i, \"the start should be the rightmost point, and the end should be the leftmost (excluding the equal or intersecting point)\");\n\n var i,\n intersect;\n\n for (i = start_i; i < end_i; i++) {\n if (points[(i * ps) + 1] === null && i > start_i) {\n bottomTraversal(i - 1, start_i);\n findNextStart(i, end_i);\n return;\n }\n\n else if (points[(i * ps) + 1] === otherpoints[(i * otherps) + 1]) {\n bottomTraversal(i, start_i);\n findNextStart(i, end_i);\n return;\n }\n\n else if (points[(i * ps) + 1] < otherpoints[(i * otherps) + 1]) {\n intersect = intersectionPoint(i);\n ctx.lineTo(\n series.xaxis.p2c(intersect[0]) + plotOffset.left,\n series.yaxis.p2c(intersect[1]) + plotOffset.top\n );\n bottomTraversal(i, start_i);\n findNextStart(i, end_i);\n return;\n\n }\n\n else {\n ctx.lineTo(\n series.xaxis.p2c(points[i * ps]) + plotOffset.left,\n series.yaxis.p2c(points[(i * ps) + 1]) + plotOffset.top\n );\n }\n }\n\n bottomTraversal(end_i, start_i);\n }\n\n\n // Begin processing\n\n otherseries = findBelowSeries( series, plot.getData() );\n\n if ( !otherseries ) {\n return;\n }\n\n ps = series.datapoints.pointsize;\n points = series.datapoints.points;\n otherps = otherseries.datapoints.pointsize;\n otherpoints = otherseries.datapoints.points;\n plotOffset = plot.getPlotOffset();\n\n if (!validateInput()) {\n return;\n }\n\n\n // Flot's getFillStyle() should probably be exposed somewhere\n fillStyle = $.color.parse(series.color);\n fillStyle.a = 0.4;\n fillStyle.normalize();\n ctx.fillStyle = fillStyle.toString();\n\n\n // Begin recursive bi-directional traversal\n findNextStart(0, points.length/ps);\n }\n\n plot.hooks.drawSeries.push(plotDifferenceArea);\n }\n\n $.plot.plugins.push({\n init: init,\n options: options,\n name: \"fillbelow\",\n version: \"0.1.0\"\n });\n\n})(jQuery);\n","/* Javascript plotting library for jQuery, version 0.8.3.\n\nCopyright (c) 2007-2014 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\n*/\n\n// first an inline dependency, jquery.colorhelpers.js, we inline it here\n// for convenience\n\n/* Plugin for jQuery for working with colors.\n *\n * Version 1.1.\n *\n * Inspiration from jQuery color animation plugin by John Resig.\n *\n * Released under the MIT license by Ole Laursen, October 2009.\n *\n * Examples:\n *\n * $.color.parse(\"#fff\").scale('rgb', 0.25).add('a', -0.5).toString()\n * var c = $.color.extract($(\"#mydiv\"), 'background-color');\n * console.log(c.r, c.g, c.b, c.a);\n * $.color.make(100, 50, 25, 0.4).toString() // returns \"rgba(100,50,25,0.4)\"\n *\n * Note that .scale() and .add() return the same modified object\n * instead of making a new one.\n *\n * V. 1.1: Fix error handling so e.g. parsing an empty string does\n * produce a color rather than just crashing.\n */\n(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i=1){return\"rgb(\"+[o.r,o.g,o.b].join(\",\")+\")\"}else{return\"rgba(\"+[o.r,o.g,o.b,o.a].join(\",\")+\")\"}};o.normalize=function(){function clamp(min,value,max){return valuemax?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=\"\"&&c!=\"transparent\")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),\"body\"));if(c==\"rgba(0, 0, 0, 0)\")c=\"transparent\";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\s*\\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name==\"transparent\")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],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],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);\n\n// the actual Flot code\n(function($) {\n\n\t// Cache the prototype hasOwnProperty for faster access\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n // A shim to provide 'detach' to jQuery versions prior to 1.4. Using a DOM\n // operation produces the same effect as detach, i.e. removing the element\n // without touching its jQuery data.\n\n // Do not merge this into Flot 0.9, since it requires jQuery 1.4.4+.\n\n if (!$.fn.detach) {\n $.fn.detach = function() {\n return this.each(function() {\n if (this.parentNode) {\n this.parentNode.removeChild( this );\n }\n });\n };\n }\n\n\t///////////////////////////////////////////////////////////////////////////\n\t// The Canvas object is a wrapper around an HTML5 tag.\n\t//\n\t// @constructor\n\t// @param {string} cls List of classes to apply to the canvas.\n\t// @param {element} container Element onto which to append the canvas.\n\t//\n\t// Requiring a container is a little iffy, but unfortunately canvas\n\t// operations don't work unless the canvas is attached to the DOM.\n\n\tfunction Canvas(cls, container) {\n\n\t\tvar element = container.children(\".\" + cls)[0];\n\n\t\tif (element == null) {\n\n\t\t\telement = document.createElement(\"canvas\");\n\t\t\telement.className = cls;\n\n\t\t\t$(element).css({ direction: \"ltr\", position: \"absolute\", left: 0, top: 0 })\n\t\t\t\t.appendTo(container);\n\n\t\t\t// If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas\n\n\t\t\tif (!element.getContext) {\n\t\t\t\tif (window.G_vmlCanvasManager) {\n\t\t\t\t\telement = window.G_vmlCanvasManager.initElement(element);\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element = element;\n\n\t\tvar context = this.context = element.getContext(\"2d\");\n\n\t\t// Determine the screen's ratio of physical to device-independent\n\t\t// pixels. This is the ratio between the canvas width that the browser\n\t\t// advertises and the number of pixels actually present in that space.\n\n\t\t// The iPhone 4, for example, has a device-independent width of 320px,\n\t\t// but its screen is actually 640px wide. It therefore has a pixel\n\t\t// ratio of 2, while most normal devices have a ratio of 1.\n\n\t\tvar devicePixelRatio = window.devicePixelRatio || 1,\n\t\t\tbackingStoreRatio =\n\t\t\t\tcontext.webkitBackingStorePixelRatio ||\n\t\t\t\tcontext.mozBackingStorePixelRatio ||\n\t\t\t\tcontext.msBackingStorePixelRatio ||\n\t\t\t\tcontext.oBackingStorePixelRatio ||\n\t\t\t\tcontext.backingStorePixelRatio || 1;\n\n\t\tthis.pixelRatio = devicePixelRatio / backingStoreRatio;\n\n\t\t// Size the canvas to match the internal dimensions of its container\n\n\t\tthis.resize(container.width(), container.height());\n\n\t\t// Collection of HTML div layers for text overlaid onto the canvas\n\n\t\tthis.textContainer = null;\n\t\tthis.text = {};\n\n\t\t// Cache of text fragments and metrics, so we can avoid expensively\n\t\t// re-calculating them when the plot is re-rendered in a loop.\n\n\t\tthis._textCache = {};\n\t\tthis._textSizeCache = window.flotTextSizeCache = window.flotTextSizeCache || {};\n\t}\n\n\t// Resizes the canvas to the given dimensions.\n\t//\n\t// @param {number} width New width of the canvas, in pixels.\n\t// @param {number} width New height of the canvas, in pixels.\n\n\tCanvas.prototype.resize = function(width, height) {\n\n\t\tif (width <= 0 || height <= 0) {\n\t\t\tthrow new Error(\"Invalid dimensions for plot, width = \" + width + \", height = \" + height);\n\t\t}\n\n\t\tvar element = this.element,\n\t\t\tcontext = this.context,\n\t\t\tpixelRatio = this.pixelRatio;\n\n\t\t// Resize the canvas, increasing its density based on the display's\n\t\t// pixel ratio; basically giving it more pixels without increasing the\n\t\t// size of its element, to take advantage of the fact that retina\n\t\t// displays have that many more pixels in the same advertised space.\n\n\t\t// Resizing should reset the state (excanvas seems to be buggy though)\n\n\t\tif (this.width != width) {\n\t\t\telement.width = width * pixelRatio;\n\t\t\telement.style.width = width + \"px\";\n\t\t\tthis.width = width;\n\t\t}\n\n\t\tif (this.height != height) {\n\t\t\telement.height = height * pixelRatio;\n\t\t\telement.style.height = height + \"px\";\n\t\t\tthis.height = height;\n\t\t}\n\n\t\t// Save the context, so we can reset in case we get replotted. The\n\t\t// restore ensure that we're really back at the initial state, and\n\t\t// should be safe even if we haven't saved the initial state yet.\n\n\t\tcontext.restore();\n\t\tcontext.save();\n\n\t\t// Scale the coordinate space to match the display density; so even though we\n\t\t// may have twice as many pixels, we still want lines and other drawing to\n\t\t// appear at the same size; the extra pixels will just make them crisper.\n\n\t\tcontext.scale(pixelRatio, pixelRatio);\n\t};\n\n\t// Clears the entire canvas area, not including any overlaid HTML text\n\n\tCanvas.prototype.clear = function() {\n\t\tthis.context.clearRect(0, 0, this.width, this.height);\n\t};\n\n\t// Finishes rendering the canvas, including managing the text overlay.\n\n\tCanvas.prototype.render = function() {\n\n\t\tvar cache = this._textCache;\n\n\t\t// For each text layer, add elements marked as active that haven't\n\t\t// already been rendered, and remove those that are no longer active.\n\n\t\tfor (var layerKey in cache) {\n\t\t\tif (hasOwnProperty.call(cache, layerKey)) {\n\n\t\t\t\tvar layer = this.getTextLayer(layerKey),\n\t\t\t\t\tlayerCache = cache[layerKey];\n\n\t\t\t\tlayer.hide();\n\n\t\t\t\tfor (var styleKey in layerCache) {\n\t\t\t\t\tif (hasOwnProperty.call(layerCache, styleKey)) {\n\t\t\t\t\t\tvar styleCache = layerCache[styleKey];\n\t\t\t\t\t\tfor (var key in styleCache) {\n\t\t\t\t\t\t\tif (hasOwnProperty.call(styleCache, key)) {\n\n\t\t\t\t\t\t\t\tvar positions = styleCache[key].positions;\n\n\t\t\t\t\t\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\t\t\t\t\t\tif (position.active) {\n\t\t\t\t\t\t\t\t\t\tif (!position.rendered) {\n\t\t\t\t\t\t\t\t\t\t\tlayer.append(position.element);\n\t\t\t\t\t\t\t\t\t\t\tposition.rendered = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tpositions.splice(i--, 1);\n\t\t\t\t\t\t\t\t\t\tif (position.rendered) {\n\t\t\t\t\t\t\t\t\t\t\tposition.element.detach();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (positions.length == 0) {\n\t\t\t\t\t\t\t\t\tdelete styleCache[key];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlayer.show();\n\t\t\t}\n\t\t}\n\t};\n\n\t// Creates (if necessary) and returns the text overlay container.\n\t//\n\t// @param {string} classes String of space-separated CSS classes used to\n\t// uniquely identify the text layer.\n\t// @return {object} The jQuery-wrapped text-layer div.\n\n\tCanvas.prototype.getTextLayer = function(classes) {\n\n\t\tvar layer = this.text[classes];\n\n\t\t// Create the text layer if it doesn't exist\n\n\t\tif (layer == null) {\n\n\t\t\t// Create the text layer container, if it doesn't exist\n\n\t\t\tif (this.textContainer == null) {\n\t\t\t\tthis.textContainer = $(\"
\")\n\t\t\t\t\t.css({\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t\tright: 0,\n\t\t\t\t\t\t'font-size': \"smaller\",\n\t\t\t\t\t\tcolor: \"#545454\"\n\t\t\t\t\t})\n\t\t\t\t\t.insertAfter(this.element);\n\t\t\t}\n\n\t\t\tlayer = this.text[classes] = $(\"
\")\n\t\t\t\t.addClass(classes)\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tbottom: 0,\n\t\t\t\t\tright: 0\n\t\t\t\t})\n\t\t\t\t.appendTo(this.textContainer);\n\t\t}\n\n\t\treturn layer;\n\t};\n\n\t// Creates (if necessary) and returns a text info object.\n\t//\n\t// The object looks like this:\n\t//\n\t// {\n\t// width: Width of the text's wrapper div.\n\t// height: Height of the text's wrapper div.\n\t// element: The jQuery-wrapped HTML div containing the text.\n\t// positions: Array of positions at which this text is drawn.\n\t// }\n\t//\n\t// The positions array contains objects that look like this:\n\t//\n\t// {\n\t// active: Flag indicating whether the text should be visible.\n\t// rendered: Flag indicating whether the text is currently visible.\n\t// element: The jQuery-wrapped HTML div containing the text.\n\t// x: X coordinate at which to draw the text.\n\t// y: Y coordinate at which to draw the text.\n\t// }\n\t//\n\t// Each position after the first receives a clone of the original element.\n\t//\n\t// The idea is that that the width, height, and general 'identity' of the\n\t// text is constant no matter where it is placed; the placements are a\n\t// secondary property.\n\t//\n\t// Canvas maintains a cache of recently-used text info objects; getTextInfo\n\t// either returns the cached element or creates a new entry.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {string} text Text string to retrieve info for.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which to rotate the text, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\t// @param {number=} width Maximum width of the text before it wraps.\n\t// @return {object} a text info object.\n\n\tCanvas.prototype.getTextInfo = function(layer, text, font, angle, width) {\n\n\t\tvar textStyle, layerCache, styleCache, info;\n\n\t\t// Cast the value to a string, in case we were given a number or such\n\n\t\ttext = \"\" + text;\n\n\t\t// If the font is a font-spec object, generate a CSS font definition\n\n\t\tif (typeof font === \"object\") {\n\t\t\ttextStyle = font.style + \" \" + font.variant + \" \" + font.weight + \" \" + font.size + \"px/\" + font.lineHeight + \"px \" + font.family;\n\t\t} else {\n\t\t\ttextStyle = font;\n\t\t}\n\n\t\t// Retrieve (or create) the cache for the text's layer and styles\n\n\t\tlayerCache = this._textCache[layer];\n\n\t\tif (layerCache == null) {\n\t\t\tlayerCache = this._textCache[layer] = {};\n\t\t}\n\n\t\tstyleCache = layerCache[textStyle];\n\n\t\tif (styleCache == null) {\n\t\t\tstyleCache = layerCache[textStyle] = {};\n\t\t}\n\n\t\tinfo = styleCache[text];\n\n\t\t// If we can't find a matching element in our cache, create a new one\n\n\t\tif (info == null) {\n\n\t\t\tvar element = $(\"
\").html(text)\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t'max-width': width,\n\t\t\t\t\ttop: -9999\n\t\t\t\t})\n\t\t\t\t.appendTo(this.getTextLayer(layer));\n\n\t\t\tif (typeof font === \"object\") {\n\t\t\t\telement.css({\n\t\t\t\t\tfont: textStyle,\n\t\t\t\t\tcolor: font.color\n\t\t\t\t});\n\t\t\t} else if (typeof font === \"string\") {\n\t\t\t\telement.addClass(font);\n\t\t\t}\n\n info = styleCache[text] = { element: element, positions: [] };\n\n var size = this._textSizeCache[text];\n\t\t\tif (size) {\n info.width = size.width;\n info.height = size.height;\n\t\t\t} else {\n info.width = element.outerWidth(true);\n info.height = element.outerHeight(true);\n this._textSizeCache[text] = { width: info.width, height: info.height };\n\t\t\t}\n\t\t\telement.detach();\n\t\t}\n\n\t\treturn info;\n\t};\n\n\t// Adds a text string to the canvas text overlay.\n\t//\n\t// The text isn't drawn immediately; it is marked as rendering, which will\n\t// result in its addition to the canvas on the next render pass.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {number} x X coordinate at which to draw the text.\n\t// @param {number} y Y coordinate at which to draw the text.\n\t// @param {string} text Text string to draw.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which to rotate the text, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\t// @param {number=} width Maximum width of the text before it wraps.\n\t// @param {string=} halign Horizontal alignment of the text; either \"left\",\n\t// \"center\" or \"right\".\n\t// @param {string=} valign Vertical alignment of the text; either \"top\",\n\t// \"middle\" or \"bottom\".\n\n\tCanvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) {\n\n\t\tvar info = this.getTextInfo(layer, text, font, angle, width),\n\t\t\tpositions = info.positions;\n\n\t\t// Tweak the div's position to match the text's alignment\n\n\t\tif (halign == \"center\") {\n\t\t\tx -= info.width / 2;\n\t\t} else if (halign == \"right\") {\n\t\t\tx -= info.width;\n\t\t}\n\n\t\tif (valign == \"middle\") {\n\t\t\ty -= info.height / 2;\n\t\t} else if (valign == \"bottom\") {\n\t\t\ty -= info.height;\n\t\t}\n\n\t\t// Determine whether this text already exists at this position.\n\t\t// If so, mark it for inclusion in the next render pass.\n\n\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\tif (position.x == x && position.y == y) {\n\t\t\t\tposition.active = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// If the text doesn't exist at this position, create a new entry\n\n\t\t// For the very first position we'll re-use the original element,\n\t\t// while for subsequent ones we'll clone it.\n\n\t\tposition = {\n\t\t\tactive: true,\n\t\t\trendered: false,\n\t\t\telement: positions.length ? info.element.clone() : info.element,\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\n\t\tpositions.push(position);\n\n\t\t// Move the element to its final position within the container\n\n\t\tposition.element.css({\n\t\t\ttop: Math.round(y),\n\t\t\tleft: Math.round(x),\n\t\t\t'text-align': halign\t// In case the text wraps\n\t\t});\n\t};\n\n\t// Removes one or more text strings from the canvas text overlay.\n\t//\n\t// If no parameters are given, all text within the layer is removed.\n\t//\n\t// Note that the text is not immediately removed; it is simply marked as\n\t// inactive, which will result in its removal on the next render pass.\n\t// This avoids the performance penalty for 'clear and redraw' behavior,\n\t// where we potentially get rid of all text on a layer, but will likely\n\t// add back most or all of it later, as when redrawing axes, for example.\n\t//\n\t// @param {string} layer A string of space-separated CSS classes uniquely\n\t// identifying the layer containing this text.\n\t// @param {number=} x X coordinate of the text.\n\t// @param {number=} y Y coordinate of the text.\n\t// @param {string=} text Text string to remove.\n\t// @param {(string|object)=} font Either a string of space-separated CSS\n\t// classes or a font-spec object, defining the text's font and style.\n\t// @param {number=} angle Angle at which the text is rotated, in degrees.\n\t// Angle is currently unused, it will be implemented in the future.\n\n\tCanvas.prototype.removeText = function(layer, x, y, text, font, angle) {\n\t\tif (text == null) {\n\t\t\tvar layerCache = this._textCache[layer];\n\t\t\tif (layerCache != null) {\n\t\t\t\tfor (var styleKey in layerCache) {\n\t\t\t\t\tif (hasOwnProperty.call(layerCache, styleKey)) {\n\t\t\t\t\t\tvar styleCache = layerCache[styleKey];\n\t\t\t\t\t\tfor (var key in styleCache) {\n\t\t\t\t\t\t\tif (hasOwnProperty.call(styleCache, key)) {\n\t\t\t\t\t\t\t\tvar positions = styleCache[key].positions;\n\t\t\t\t\t\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\t\t\t\t\t\tposition.active = false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tvar positions = this.getTextInfo(layer, text, font, angle).positions;\n\t\t\tfor (var i = 0, position; position = positions[i]; i++) {\n\t\t\t\tif (position.x == x && position.y == y) {\n\t\t\t\t\tposition.active = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\t///////////////////////////////////////////////////////////////////////////\n\t// The top-level container for the entire plot.\n\n function Plot(placeholder, data_, options_, plugins) {\n // data is on the form:\n // [ series1, series2 ... ]\n // where series is either just the data as [ [x1, y1], [x2, y2], ... ]\n // or { data: [ [x1, y1], [x2, y2], ... ], label: \"some label\", ... }\n\n var series = [],\n options = {\n // the color theme used for graphs\n colors: [\"#edc240\", \"#afd8f8\", \"#cb4b4b\", \"#4da74d\", \"#9440ed\"],\n legend: {\n show: true,\n noColumns: 1, // number of colums in legend table\n labelFormatter: null, // fn: string -> string\n labelBoxBorderColor: \"#ccc\", // border color for the little label boxes\n container: null, // container (as jQuery object) to put legend in, null means default on top of graph\n position: \"ne\", // position of default legend container within plot\n margin: 5, // distance from grid edge to default legend container within plot\n backgroundColor: null, // null means auto-detect\n backgroundOpacity: 0.85, // set to 0 to avoid background\n sorted: null // default to no legend sorting\n },\n xaxis: {\n show: null, // null = auto-detect, true = always, false = never\n position: \"bottom\", // or \"top\"\n mode: null, // null or \"time\"\n font: null, // null (derived from CSS in placeholder) or object like { size: 11, lineHeight: 13, style: \"italic\", weight: \"bold\", family: \"sans-serif\", variant: \"small-caps\" }\n color: null, // base color, labels, ticks\n tickColor: null, // possibly different color of ticks, e.g. \"rgba(0,0,0,0.15)\"\n transform: null, // null or f: number -> number to transform axis\n inverseTransform: null, // if transform is set, this should be the inverse function\n min: null, // min. value to show, null means set automatically\n max: null, // max. value to show, null means set automatically\n autoscaleMargin: null, // margin in % to add if auto-setting min/max\n ticks: null, // either [1, 3] or [[1, \"a\"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks\n tickFormatter: null, // fn: number -> string\n labelWidth: null, // size of tick labels in pixels\n labelHeight: null,\n reserveSpace: null, // whether to reserve space even if axis isn't shown\n tickLength: null, // size in pixels of ticks, or \"full\" for whole line\n alignTicksWithAxis: null, // axis number or null for no sync\n tickDecimals: null, // no. of decimals, null means auto\n tickSize: null, // number or [number, \"unit\"]\n minTickSize: null // number or [number, \"unit\"]\n },\n yaxis: {\n autoscaleMargin: 0.02,\n position: \"left\" // or \"right\"\n },\n xaxes: [],\n yaxes: [],\n series: {\n points: {\n show: false,\n radius: 3,\n lineWidth: 2, // in pixels\n fill: true,\n fillColor: \"#ffffff\",\n symbol: \"circle\" // or callback\n },\n lines: {\n // we don't put in show: false so we can see\n // whether lines were actively disabled\n lineWidth: 2, // in pixels\n fill: false,\n fillColor: null,\n steps: false\n // Omit 'zero', so we can later default its value to\n // match that of the 'fill' option.\n },\n bars: {\n show: false,\n lineWidth: 2, // in pixels\n barWidth: 1, // in units of the x axis\n fill: true,\n fillColor: null,\n align: \"left\", // \"left\", \"right\", or \"center\"\n horizontal: false,\n zero: true\n },\n shadowSize: 3,\n highlightColor: null\n },\n grid: {\n show: true,\n aboveData: false,\n color: \"#545454\", // primary color used for outline and labels\n backgroundColor: null, // null for transparent, else color\n borderColor: null, // set if different from the grid color\n tickColor: null, // color for the ticks, e.g. \"rgba(0,0,0,0.15)\"\n margin: 0, // distance from the canvas edge to the grid\n labelMargin: 5, // in pixels\n eventSectionHeight: 0, // space for event section\n axisMargin: 8, // in pixels\n borderWidth: 2, // in pixels\n minBorderMargin: null, // in pixels, null means taken from points radius\n markings: null, // array of ranges or fn: axes -> array of ranges\n markingsColor: \"#f4f4f4\",\n markingsLineWidth: 2,\n // interactive stuff\n clickable: false,\n hoverable: false,\n autoHighlight: true, // highlight in case mouse is near\n mouseActiveRadius: 10 // how far the mouse can be away to activate an item\n },\n interaction: {\n redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow\n },\n hooks: {}\n },\n surface = null, // the canvas for the plot itself\n overlay = null, // canvas for interactive stuff on top of plot\n eventHolder = null, // jQuery object that events should be bound to\n ctx = null, octx = null,\n xaxes = [], yaxes = [],\n plotOffset = { left: 0, right: 0, top: 0, bottom: 0},\n plotWidth = 0, plotHeight = 0,\n hooks = {\n processOptions: [],\n processRawData: [],\n processDatapoints: [],\n processOffset: [],\n drawBackground: [],\n drawSeries: [],\n draw: [],\n bindEvents: [],\n drawOverlay: [],\n shutdown: []\n },\n plot = this;\n\n // public functions\n plot.setData = setData;\n plot.setupGrid = setupGrid;\n plot.draw = draw;\n plot.getPlaceholder = function() { return placeholder; };\n plot.getCanvas = function() { return surface.element; };\n plot.getPlotOffset = function() { return plotOffset; };\n plot.width = function () { return plotWidth; };\n plot.height = function () { return plotHeight; };\n plot.offset = function () {\n var o = eventHolder.offset();\n o.left += plotOffset.left;\n o.top += plotOffset.top;\n return o;\n };\n plot.getData = function () { return series; };\n plot.getAxes = function () {\n var res = {}, i;\n $.each(xaxes.concat(yaxes), function (_, axis) {\n if (axis)\n res[axis.direction + (axis.n != 1 ? axis.n : \"\") + \"axis\"] = axis;\n });\n return res;\n };\n plot.getXAxes = function () { return xaxes; };\n plot.getYAxes = function () { return yaxes; };\n plot.c2p = canvasToAxisCoords;\n plot.p2c = axisToCanvasCoords;\n plot.getOptions = function () { return options; };\n plot.highlight = highlight;\n plot.unhighlight = unhighlight;\n plot.triggerRedrawOverlay = triggerRedrawOverlay;\n plot.pointOffset = function(point) {\n return {\n left: parseInt(xaxes[axisNumber(point, \"x\") - 1].p2c(+point.x) + plotOffset.left, 10),\n top: parseInt(yaxes[axisNumber(point, \"y\") - 1].p2c(+point.y) + plotOffset.top, 10)\n };\n };\n plot.shutdown = shutdown;\n plot.destroy = function () {\n shutdown();\n placeholder.removeData(\"plot\").empty();\n\n series = [];\n options = null;\n surface = null;\n overlay = null;\n eventHolder = null;\n ctx = null;\n octx = null;\n xaxes = [];\n yaxes = [];\n hooks = null;\n highlights = [];\n plot = null;\n };\n plot.resize = function () {\n \tvar width = placeholder.width(),\n \t\theight = placeholder.height();\n surface.resize(width, height);\n overlay.resize(width, height);\n };\n\n // public attributes\n plot.hooks = hooks;\n\n // initialize\n initPlugins(plot);\n parseOptions(options_);\n setupCanvases();\n setData(data_);\n setupGrid();\n draw();\n bindEvents();\n\n\n function executeHooks(hook, args) {\n args = [plot].concat(args);\n for (var i = 0; i < hook.length; ++i)\n hook[i].apply(this, args);\n }\n\n function initPlugins() {\n\n // References to key classes, allowing plugins to modify them\n\n var classes = {\n Canvas: Canvas\n };\n\n for (var i = 0; i < plugins.length; ++i) {\n var p = plugins[i];\n p.init(plot, classes);\n if (p.options)\n $.extend(true, options, p.options);\n }\n }\n\n function parseOptions(opts) {\n\n $.extend(true, options, opts);\n\n // $.extend merges arrays, rather than replacing them. When less\n // colors are provided than the size of the default palette, we\n // end up with those colors plus the remaining defaults, which is\n // not expected behavior; avoid it by replacing them here.\n\n if (opts && opts.colors) {\n \toptions.colors = opts.colors;\n }\n\n if (options.xaxis.color == null)\n options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n if (options.yaxis.color == null)\n options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n\n if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility\n options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color;\n if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility\n options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color;\n\n if (options.grid.borderColor == null)\n options.grid.borderColor = options.grid.color;\n if (options.grid.tickColor == null)\n options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString();\n\n // Fill in defaults for axis options, including any unspecified\n // font-spec fields, if a font-spec was provided.\n\n // If no x/y axis options were provided, create one of each anyway,\n // since the rest of the code assumes that they exist.\n\n var i, axisOptions, axisCount,\n fontSize = placeholder.css(\"font-size\"),\n fontSizeDefault = fontSize ? +fontSize.replace(\"px\", \"\") : 13,\n fontDefaults = {\n style: placeholder.css(\"font-style\"),\n size: Math.round(0.8 * fontSizeDefault),\n variant: placeholder.css(\"font-variant\"),\n weight: placeholder.css(\"font-weight\"),\n family: placeholder.css(\"font-family\")\n };\n\n axisCount = options.xaxes.length || 1;\n for (i = 0; i < axisCount; ++i) {\n\n axisOptions = options.xaxes[i];\n if (axisOptions && !axisOptions.tickColor) {\n axisOptions.tickColor = axisOptions.color;\n }\n\n axisOptions = $.extend(true, {}, options.xaxis, axisOptions);\n options.xaxes[i] = axisOptions;\n\n if (axisOptions.font) {\n axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);\n if (!axisOptions.font.color) {\n axisOptions.font.color = axisOptions.color;\n }\n if (!axisOptions.font.lineHeight) {\n axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);\n }\n }\n }\n\n axisCount = options.yaxes.length || 1;\n for (i = 0; i < axisCount; ++i) {\n\n axisOptions = options.yaxes[i];\n if (axisOptions && !axisOptions.tickColor) {\n axisOptions.tickColor = axisOptions.color;\n }\n\n axisOptions = $.extend(true, {}, options.yaxis, axisOptions);\n options.yaxes[i] = axisOptions;\n\n if (axisOptions.font) {\n axisOptions.font = $.extend({}, fontDefaults, axisOptions.font);\n if (!axisOptions.font.color) {\n axisOptions.font.color = axisOptions.color;\n }\n if (!axisOptions.font.lineHeight) {\n axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15);\n }\n }\n }\n\n // backwards compatibility, to be removed in future\n if (options.xaxis.noTicks && options.xaxis.ticks == null)\n options.xaxis.ticks = options.xaxis.noTicks;\n if (options.yaxis.noTicks && options.yaxis.ticks == null)\n options.yaxis.ticks = options.yaxis.noTicks;\n if (options.x2axis) {\n options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis);\n options.xaxes[1].position = \"top\";\n // Override the inherit to allow the axis to auto-scale\n if (options.x2axis.min == null) {\n options.xaxes[1].min = null;\n }\n if (options.x2axis.max == null) {\n options.xaxes[1].max = null;\n }\n }\n if (options.y2axis) {\n options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis);\n options.yaxes[1].position = \"right\";\n // Override the inherit to allow the axis to auto-scale\n if (options.y2axis.min == null) {\n options.yaxes[1].min = null;\n }\n if (options.y2axis.max == null) {\n options.yaxes[1].max = null;\n }\n }\n if (options.grid.coloredAreas)\n options.grid.markings = options.grid.coloredAreas;\n if (options.grid.coloredAreasColor)\n options.grid.markingsColor = options.grid.coloredAreasColor;\n if (options.lines)\n $.extend(true, options.series.lines, options.lines);\n if (options.points)\n $.extend(true, options.series.points, options.points);\n if (options.bars)\n $.extend(true, options.series.bars, options.bars);\n if (options.shadowSize != null)\n options.series.shadowSize = options.shadowSize;\n if (options.highlightColor != null)\n options.series.highlightColor = options.highlightColor;\n\n // save options on axes for future reference\n for (i = 0; i < options.xaxes.length; ++i)\n getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i];\n for (i = 0; i < options.yaxes.length; ++i)\n getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i];\n\n // add hooks from options\n for (var n in hooks)\n if (options.hooks[n] && options.hooks[n].length)\n hooks[n] = hooks[n].concat(options.hooks[n]);\n\n executeHooks(hooks.processOptions, [options]);\n }\n\n function setData(d) {\n series = parseData(d);\n fillInSeriesOptions();\n processData();\n }\n\n function parseData(d) {\n var res = [];\n for (var i = 0; i < d.length; ++i) {\n var s = $.extend(true, {}, options.series);\n\n if (d[i].data != null) {\n s.data = d[i].data; // move the data instead of deep-copy\n delete d[i].data;\n\n $.extend(true, s, d[i]);\n\n d[i].data = s.data;\n }\n else\n s.data = d[i];\n res.push(s);\n }\n\n return res;\n }\n\n function axisNumber(obj, coord) {\n var a = obj[coord + \"axis\"];\n if (typeof a == \"object\") // if we got a real axis, extract number\n a = a.n;\n if (typeof a != \"number\")\n a = 1; // default to first axis\n return a;\n }\n\n function allAxes() {\n // return flat array without annoying null entries\n return $.grep(xaxes.concat(yaxes), function (a) { return a; });\n }\n\n function canvasToAxisCoords(pos) {\n // return an object with x/y corresponding to all used axes\n var res = {}, i, axis;\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used)\n res[\"x\" + axis.n] = axis.c2p(pos.left);\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used)\n res[\"y\" + axis.n] = axis.c2p(pos.top);\n }\n\n if (res.x1 !== undefined)\n res.x = res.x1;\n if (res.y1 !== undefined)\n res.y = res.y1;\n\n return res;\n }\n\n function axisToCanvasCoords(pos) {\n // get canvas coords from the first pair of x/y found in pos\n var res = {}, i, axis, key;\n\n for (i = 0; i < xaxes.length; ++i) {\n axis = xaxes[i];\n if (axis && axis.used) {\n key = \"x\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"x\";\n\n if (pos[key] != null) {\n res.left = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n for (i = 0; i < yaxes.length; ++i) {\n axis = yaxes[i];\n if (axis && axis.used) {\n key = \"y\" + axis.n;\n if (pos[key] == null && axis.n == 1)\n key = \"y\";\n\n if (pos[key] != null) {\n res.top = axis.p2c(pos[key]);\n break;\n }\n }\n }\n\n return res;\n }\n\n function getOrCreateAxis(axes, number) {\n if (!axes[number - 1])\n axes[number - 1] = {\n n: number, // save the number for future reference\n direction: axes == xaxes ? \"x\" : \"y\",\n options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis)\n };\n\n return axes[number - 1];\n }\n\n function fillInSeriesOptions() {\n\n var neededColors = series.length, maxIndex = -1, i;\n\n // Subtract the number of series that already have fixed colors or\n // color indexes from the number that we still need to generate.\n\n for (i = 0; i < series.length; ++i) {\n var sc = series[i].color;\n if (sc != null) {\n neededColors--;\n if (typeof sc == \"number\" && sc > maxIndex) {\n maxIndex = sc;\n }\n }\n }\n\n // If any of the series have fixed color indexes, then we need to\n // generate at least as many colors as the highest index.\n\n if (neededColors <= maxIndex) {\n neededColors = maxIndex + 1;\n }\n\n // Generate all the colors, using first the option colors and then\n // variations on those colors once they're exhausted.\n\n var c, colors = [], colorPool = options.colors,\n colorPoolSize = colorPool.length, variation = 0;\n\n for (i = 0; i < neededColors; i++) {\n\n c = $.color.parse(colorPool[i % colorPoolSize] || \"#666\");\n\n // Each time we exhaust the colors in the pool we adjust\n // a scaling factor used to produce more variations on\n // those colors. The factor alternates negative/positive\n // to produce lighter/darker colors.\n\n // Reset the variation after every few cycles, or else\n // it will end up producing only white or black colors.\n\n if (i % colorPoolSize == 0 && i) {\n if (variation >= 0) {\n if (variation < 0.5) {\n variation = -variation - 0.2;\n } else variation = 0;\n } else variation = -variation;\n }\n\n colors[i] = c.scale('rgb', 1 + variation);\n }\n\n // Finalize the series options, filling in their colors\n\n var colori = 0, s;\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n // assign colors\n if (s.color == null) {\n s.color = colors[colori].toString();\n ++colori;\n }\n else if (typeof s.color == \"number\")\n s.color = colors[s.color].toString();\n\n // turn on lines automatically in case nothing is set\n if (s.lines.show == null) {\n var v, show = true;\n for (v in s)\n if (s[v] && s[v].show) {\n show = false;\n break;\n }\n if (show)\n s.lines.show = true;\n }\n\n // If nothing was provided for lines.zero, default it to match\n // lines.fill, since areas by default should extend to zero.\n\n if (s.lines.zero == null) {\n s.lines.zero = !!s.lines.fill;\n }\n\n // setup axes\n s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, \"x\"));\n s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, \"y\"));\n }\n }\n\n function processData() {\n var topSentry = Number.POSITIVE_INFINITY,\n bottomSentry = Number.NEGATIVE_INFINITY,\n fakeInfinity = Number.MAX_VALUE,\n i, j, k, m, length,\n s, points, ps, x, y, axis, val, f, p,\n data, format;\n\n function updateAxis(axis, min, max) {\n if (min < axis.datamin && min != -fakeInfinity)\n axis.datamin = min;\n if (max > axis.datamax && max != fakeInfinity)\n axis.datamax = max;\n }\n\n $.each(allAxes(), function (_, axis) {\n // init axis\n axis.datamin = topSentry;\n axis.datamax = bottomSentry;\n axis.used = false;\n });\n\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n s.datapoints = { points: [] };\n\n executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]);\n }\n\n // first pass: clean and copy data\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n\n data = s.data;\n format = s.datapoints.format;\n\n if (!format) {\n format = [];\n // find out how to copy\n format.push({ x: true, number: true, required: true });\n format.push({ y: true, number: true, required: true });\n\n if (s.bars.show || (s.lines.show && s.lines.fill)) {\n var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));\n format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });\n if (s.bars.horizontal) {\n delete format[format.length - 1].y;\n format[format.length - 1].x = true;\n }\n }\n\n s.datapoints.format = format;\n }\n\n if (s.datapoints.pointsize != null)\n continue; // already filled in\n\n s.datapoints.pointsize = format.length;\n\n ps = s.datapoints.pointsize;\n points = s.datapoints.points;\n\n var insertSteps = s.lines.show && s.lines.steps;\n s.xaxis.used = s.yaxis.used = true;\n\n for (j = k = 0; j < data.length; ++j, k += ps) {\n p = data[j];\n\n var nullify = p == null;\n if (!nullify) {\n for (m = 0; m < ps; ++m) {\n val = p[m];\n f = format[m];\n\n if (f) {\n if (f.number && val != null) {\n val = +val; // convert to number\n if (isNaN(val))\n val = null;\n else if (val == Infinity)\n val = fakeInfinity;\n else if (val == -Infinity)\n val = -fakeInfinity;\n }\n\n if (val == null) {\n if (f.required)\n nullify = true;\n\n if (f.defaultValue != null)\n val = f.defaultValue;\n }\n }\n\n points[k + m] = val;\n }\n }\n\n if (nullify) {\n for (m = 0; m < ps; ++m) {\n val = points[k + m];\n if (val != null) {\n f = format[m];\n // extract min/max info\n if (f.autoscale !== false) {\n if (f.x) {\n updateAxis(s.xaxis, val, val);\n }\n if (f.y) {\n updateAxis(s.yaxis, val, val);\n }\n }\n }\n points[k + m] = null;\n }\n }\n\n if (insertSteps && k > 0 && (!nullify || points[k - ps] != null)) {\n // copy the point to make room for a middle point\n for (m = 0; m < ps; ++m)\n points[k + ps + m] = points[k + m];\n\n // middle point has same y\n points[k + 1] = points[k - ps + 1] || 0;\n\n // if series has null values, let's give the last !null value a nice step\n if(nullify)\n \tpoints[k] = p[0];\n\n // we've added a point, better reflect that\n k += ps;\n }\n }\n }\n\n // give the hooks a chance to run\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n points = s.datapoints.points;\n ps = s.datapoints.pointsize;\n\n // grafana\n if (s.transform === 'negative-Y') {\n for (j = 0; j < points.length; j += ps) {\n if (points[j] == null)\n continue;\n\n val = points[j + 1];\n points[j + 1] = -val;\n }\n }\n\n executeHooks(hooks.processDatapoints, [ s, s.datapoints]);\n }\n\n // second pass: find datamax/datamin for auto-scaling\n for (i = 0; i < series.length; ++i) {\n s = series[i];\n points = s.datapoints.points;\n ps = s.datapoints.pointsize;\n format = s.datapoints.format;\n\n var xmin = topSentry, ymin = topSentry,\n xmax = bottomSentry, ymax = bottomSentry;\n\n for (j = 0; j < points.length; j += ps) {\n if (points[j] == null)\n continue;\n\n for (m = 0; m < ps; ++m) {\n val = points[j + m];\n f = format[m];\n if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity)\n continue;\n\n if (f.x) {\n if (val < xmin)\n xmin = val;\n if (val > xmax)\n xmax = val;\n }\n if (f.y) {\n if (val < ymin)\n ymin = val;\n if (val > ymax)\n ymax = val;\n }\n }\n }\n\n if (s.bars.show) {\n // make sure we got room for the bar on the dancing floor\n var delta;\n\n switch (s.bars.align) {\n case \"left\":\n delta = 0;\n break;\n case \"right\":\n delta = -s.bars.barWidth;\n break;\n default:\n delta = -s.bars.barWidth / 2;\n }\n\n if (s.bars.horizontal) {\n ymin += delta;\n ymax += delta + s.bars.barWidth;\n }\n else {\n xmin += delta;\n xmax += delta + s.bars.barWidth;\n }\n }\n\n updateAxis(s.xaxis, xmin, xmax);\n updateAxis(s.yaxis, ymin, ymax);\n }\n\n $.each(allAxes(), function (_, axis) {\n if (axis.datamin == topSentry)\n axis.datamin = null;\n if (axis.datamax == bottomSentry)\n axis.datamax = null;\n });\n }\n\n function setupCanvases() {\n // Make sure the placeholder is clear of everything except canvases\n // from a previous plot in this container that we'll try to re-use.\n\n placeholder.find(\".flot-temp-elem\").remove();\n\n if (placeholder.css(\"position\") == 'static')\n placeholder.css(\"position\", \"relative\"); // for positioning labels and overlay\n\n surface = new Canvas(\"flot-base\", placeholder);\n overlay = new Canvas(\"flot-overlay\", placeholder); // overlay canvas for interactive features\n\n ctx = surface.context;\n octx = overlay.context;\n\n // define which element we're listening for events on\n eventHolder = $(overlay.element).unbind();\n\n // If we're re-using a plot object, shut down the old one\n\n var existing = placeholder.data(\"plot\");\n\n if (existing) {\n existing.shutdown();\n overlay.clear();\n }\n\n // save in case we get replotted\n placeholder.data(\"plot\", plot);\n }\n\n function bindEvents() {\n // bind events\n if (options.grid.hoverable) {\n eventHolder.mousemove(onMouseMove);\n\n // Use bind, rather than .mouseleave, because we officially\n // still support jQuery 1.2.6, which doesn't define a shortcut\n // for mouseenter or mouseleave. This was a bug/oversight that\n // was fixed somewhere around 1.3.x. We can return to using\n // .mouseleave when we drop support for 1.2.6.\n\n eventHolder.bind(\"mouseleave\", onMouseLeave);\n }\n\n if (options.grid.clickable)\n eventHolder.click(onClick);\n\n executeHooks(hooks.bindEvents, [eventHolder]);\n }\n\n function shutdown() {\n if (redrawTimeout)\n clearTimeout(redrawTimeout);\n\n eventHolder.unbind(\"mousemove\", onMouseMove);\n eventHolder.unbind(\"mouseleave\", onMouseLeave);\n eventHolder.unbind(\"click\", onClick);\n\n executeHooks(hooks.shutdown, [eventHolder]);\n }\n\n function setTransformationHelpers(axis) {\n // set helper functions on the axis, assumes plot area\n // has been computed already\n\n function identity(x) { return x; }\n\n var s, m, t = axis.options.transform || identity,\n it = axis.options.inverseTransform;\n\n // precompute how much the axis is scaling a point\n // in canvas space\n if (axis.direction == \"x\") {\n s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min));\n m = Math.min(t(axis.max), t(axis.min));\n }\n else {\n s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min));\n s = -s;\n m = Math.max(t(axis.max), t(axis.min));\n }\n\n // data point to canvas coordinate\n if (t == identity) // slight optimization\n axis.p2c = function (p) { return (p - m) * s; };\n else\n axis.p2c = function (p) { return (t(p) - m) * s; };\n // canvas coordinate to data point\n if (!it)\n axis.c2p = function (c) { return m + c / s; };\n else\n axis.c2p = function (c) { return it(m + c / s); };\n }\n\n function measureTickLabels(axis) {\n\n var opts = axis.options,\n ticks = axis.ticks || [],\n labelWidth = opts.labelWidth || 0,\n labelHeight = opts.labelHeight || 0,\n maxWidth = labelWidth || (axis.direction == \"x\" ? Math.floor(surface.width / (ticks.length || 1)) : null),\n legacyStyles = axis.direction + \"Axis \" + axis.direction + axis.n + \"Axis\",\n layer = \"flot-\" + axis.direction + \"-axis flot-\" + axis.direction + axis.n + \"-axis \" + legacyStyles,\n font = opts.font || \"flot-tick-label tickLabel\";\n\n for (var i = 0; i < ticks.length; ++i) {\n\n var t = ticks[i];\n\n if (!t.label)\n continue;\n\n var info = surface.getTextInfo(layer, t.label, font, null, maxWidth);\n\n /// Grafana fix, add +1 to label width\n labelWidth = Math.max(labelWidth, info.width + 1);\n labelHeight = Math.max(labelHeight, info.height);\n }\n\n axis.labelWidth = opts.labelWidth || labelWidth;\n axis.labelHeight = opts.labelHeight || labelHeight;\n }\n\n function allocateAxisBoxFirstPhase(axis) {\n // find the bounding box of the axis by looking at label\n // widths/heights and ticks, make room by diminishing the\n // plotOffset; this first phase only looks at one\n // dimension per axis, the other dimension depends on the\n // other axes so will have to wait\n\n var lw = axis.labelWidth,\n lh = axis.labelHeight,\n pos = axis.options.position,\n isXAxis = axis.direction === \"x\",\n tickLength = axis.options.tickLength,\n axisMargin = options.grid.axisMargin,\n padding = options.grid.labelMargin,\n eventSectionPadding = options.grid.eventSectionHeight,\n innermost = true,\n outermost = true,\n first = true,\n found = false;\n\n // Determine the axis's position in its direction and on its side\n\n $.each(isXAxis ? xaxes : yaxes, function(i, a) {\n if (a && (a.show || a.reserveSpace)) {\n if (a === axis) {\n found = true;\n } else if (a.options.position === pos) {\n if (found) {\n outermost = false;\n } else {\n innermost = false;\n }\n }\n if (!found) {\n first = false;\n }\n }\n });\n\n // The outermost axis on each side has no margin\n\n if (outermost) {\n axisMargin = 0;\n }\n\n // The ticks for the first axis in each direction stretch across\n\n if (tickLength == null) {\n tickLength = first ? \"full\" : 5;\n }\n\n if (!isNaN(+tickLength))\n padding += +tickLength;\n\n if (isXAxis) {\n // Add space for event section\n lh += padding;\n lh += eventSectionPadding;\n\n if (pos == \"bottom\") {\n plotOffset.bottom += lh + axisMargin;\n axis.box = { top: surface.height - plotOffset.bottom, height: lh };\n }\n else {\n axis.box = { top: plotOffset.top + axisMargin, height: lh };\n plotOffset.top += lh + axisMargin;\n }\n }\n else {\n lw += padding;\n\n if (pos == \"left\") {\n axis.box = { left: plotOffset.left + axisMargin, width: lw };\n plotOffset.left += lw + axisMargin;\n }\n else {\n plotOffset.right += lw + axisMargin;\n axis.box = { left: surface.width - plotOffset.right, width: lw };\n }\n }\n\n // save for future reference\n axis.position = pos;\n axis.tickLength = tickLength;\n axis.box.padding = padding;\n axis.box.eventSectionPadding = eventSectionPadding;\n axis.innermost = innermost;\n }\n\n function allocateAxisBoxSecondPhase(axis) {\n // now that all axis boxes have been placed in one\n // dimension, we can set the remaining dimension coordinates\n if (axis.direction == \"x\") {\n axis.box.left = plotOffset.left - axis.labelWidth / 2;\n axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth;\n }\n else {\n axis.box.top = plotOffset.top - axis.labelHeight / 2;\n axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight;\n }\n }\n\n function adjustLayoutForThingsStickingOut() {\n // possibly adjust plot offset to ensure everything stays\n // inside the canvas and isn't clipped off\n\n var minMargin = options.grid.minBorderMargin,\n axis, i;\n\n // check stuff from the plot (FIXME: this should just read\n // a value from the series, otherwise it's impossible to\n // customize)\n if (minMargin == null) {\n minMargin = 0;\n for (i = 0; i < series.length; ++i)\n minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2));\n }\n\n var margins = {\n left: minMargin,\n right: minMargin,\n top: minMargin,\n bottom: minMargin\n };\n\n // check axis labels, note we don't check the actual\n // labels but instead use the overall width/height to not\n // jump as much around with replots\n $.each(allAxes(), function (_, axis) {\n if (axis.reserveSpace && axis.ticks && axis.ticks.length) {\n if (axis.direction === \"x\") {\n margins.left = Math.max(margins.left, axis.labelWidth / 2);\n margins.right = Math.max(margins.right, axis.labelWidth / 2);\n } else {\n margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2);\n margins.top = Math.max(margins.top, axis.labelHeight / 2);\n }\n }\n });\n\n plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left));\n plotOffset.right = Math.ceil(Math.max(margins.right, plotOffset.right));\n plotOffset.top = Math.ceil(Math.max(margins.top, plotOffset.top));\n plotOffset.bottom = Math.ceil(Math.max(margins.bottom, plotOffset.bottom));\n }\n\n function setupGrid() {\n var i, axes = allAxes(), showGrid = options.grid.show;\n\n // Initialize the plot's offset from the edge of the canvas\n\n for (var a in plotOffset) {\n var margin = options.grid.margin || 0;\n plotOffset[a] = typeof margin == \"number\" ? margin : margin[a] || 0;\n }\n\n executeHooks(hooks.processOffset, [plotOffset]);\n\n // If the grid is visible, add its border width to the offset\n\n for (var a in plotOffset) {\n if(typeof(options.grid.borderWidth) == \"object\") {\n plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0;\n }\n else {\n plotOffset[a] += showGrid ? options.grid.borderWidth : 0;\n }\n }\n\n $.each(axes, function (_, axis) {\n var axisOpts = axis.options;\n axis.show = axisOpts.show == null ? axis.used : axisOpts.show;\n axis.reserveSpace = axisOpts.reserveSpace == null ? axis.show : axisOpts.reserveSpace;\n setRange(axis);\n });\n\n if (showGrid) {\n\n var allocatedAxes = $.grep(axes, function (axis) {\n return axis.show || axis.reserveSpace;\n });\n\n $.each(allocatedAxes, function (_, axis) {\n // make the ticks\n setupTickGeneration(axis);\n setTicks(axis);\n snapRangeToTicks(axis, axis.ticks);\n // find labelWidth/Height for axis\n measureTickLabels(axis);\n });\n\n // with all dimensions calculated, we can compute the\n // axis bounding boxes, start from the outside\n // (reverse order)\n for (i = allocatedAxes.length - 1; i >= 0; --i)\n allocateAxisBoxFirstPhase(allocatedAxes[i]);\n\n // make sure we've got enough space for things that\n // might stick out\n adjustLayoutForThingsStickingOut();\n\n $.each(allocatedAxes, function (_, axis) {\n allocateAxisBoxSecondPhase(axis);\n });\n }\n\n plotWidth = surface.width - plotOffset.left - plotOffset.right;\n plotHeight = surface.height - plotOffset.bottom - plotOffset.top;\n\n // now we got the proper plot dimensions, we can compute the scaling\n $.each(axes, function (_, axis) {\n setTransformationHelpers(axis);\n });\n\n if (showGrid) {\n drawAxisLabels();\n }\n\n insertLegend();\n }\n\n function setRange(axis) {\n var opts = axis.options,\n min = +(opts.min != null ? opts.min : axis.datamin),\n max = +(opts.max != null ? opts.max : axis.datamax),\n delta = max - min;\n\n if (delta == 0.0) {\n // Grafana fix: wide Y min and max using increased wideFactor\n // when all series values are the same\n var wideFactor = 0.25;\n var widen = Math.abs(max == 0 ? 1 : max * wideFactor);\n\n if (opts.min == null) {\n min -= widen;\n }\n // always widen max if we couldn't widen min to ensure we\n // don't fall into min == max which doesn't work\n if (opts.max == null || opts.min != null) {\n max += widen;\n }\n }\n else {\n // consider autoscaling\n var margin = opts.autoscaleMargin;\n if (margin != null) {\n if (opts.min == null) {\n min -= delta * margin;\n // make sure we don't go below zero if all values\n // are positive\n if (min < 0 && axis.datamin != null && axis.datamin >= 0)\n min = 0;\n }\n if (opts.max == null) {\n max += delta * margin;\n if (max > 0 && axis.datamax != null && axis.datamax <= 0)\n max = 0;\n }\n }\n }\n axis.min = min;\n axis.max = max;\n }\n\n function setupTickGeneration(axis) {\n var opts = axis.options;\n\n // estimate number of ticks\n var noTicks;\n if (typeof opts.ticks == \"number\" && opts.ticks > 0)\n noTicks = opts.ticks;\n else\n // heuristic based on the model a*sqrt(x) fitted to\n // some data points that seemed reasonable\n noTicks = 0.3 * Math.sqrt(axis.direction == \"x\" ? surface.width : surface.height);\n\n var delta = (axis.max - axis.min) / noTicks,\n dec = -Math.floor(Math.log(delta) / Math.LN10),\n maxDec = opts.tickDecimals;\n\n if (maxDec != null && dec > maxDec) {\n dec = maxDec;\n }\n\n var magn = Math.pow(10, -dec),\n norm = delta / magn, // norm is between 1.0 and 10.0\n size;\n\n if (norm < 1.5) {\n size = 1;\n } else if (norm < 3) {\n size = 2;\n // special case for 2.5, requires an extra decimal\n if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) {\n size = 2.5;\n ++dec;\n }\n } else if (norm < 7.5) {\n size = 5;\n } else {\n size = 10;\n }\n\n size *= magn;\n\n if (opts.minTickSize != null && size < opts.minTickSize) {\n size = opts.minTickSize;\n }\n\n axis.delta = delta;\n axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec);\n axis.tickSize = opts.tickSize || size;\n // grafana addition\n axis.scaledDecimals = axis.tickDecimals - Math.floor(Math.log(axis.tickSize) / Math.LN10);\n\n // Time mode was moved to a plug-in in 0.8, and since so many people use it\n // we'll add an especially friendly reminder to make sure they included it.\n\n if (opts.mode == \"time\" && !axis.tickGenerator) {\n throw new Error(\"Time mode requires the flot.time plugin.\");\n }\n\n // Flot supports base-10 axes; any other mode else is handled by a plug-in,\n // like flot.time.js.\n\n if (!axis.tickGenerator) {\n\n axis.tickGenerator = function (axis) {\n\n var ticks = [],\n start = floorInBase(axis.min, axis.tickSize),\n i = 0,\n v = Number.NaN,\n prev;\n\n do {\n prev = v;\n v = start + i * axis.tickSize;\n ticks.push(v);\n ++i;\n } while (v < axis.max && v != prev);\n return ticks;\n };\n\n\t\t\t\taxis.tickFormatter = function (value, axis) {\n\n\t\t\t\t\tvar factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1;\n\t\t\t\t\tvar formatted = \"\" + Math.round(value * factor) / factor;\n\n\t\t\t\t\t// If tickDecimals was specified, ensure that we have exactly that\n\t\t\t\t\t// much precision; otherwise default to the value's own precision.\n\n\t\t\t\t\tif (axis.tickDecimals != null) {\n\t\t\t\t\t\tvar decimal = formatted.indexOf(\".\");\n\t\t\t\t\t\tvar precision = decimal == -1 ? 0 : formatted.length - decimal - 1;\n\t\t\t\t\t\tif (precision < axis.tickDecimals) {\n\t\t\t\t\t\t\treturn (precision ? formatted : formatted + \".\") + (\"\" + factor).substr(1, axis.tickDecimals - precision);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n return formatted;\n };\n }\n\n if ($.isFunction(opts.tickFormatter))\n axis.tickFormatter = function (v, axis) { return \"\" + opts.tickFormatter(v, axis); };\n\n if (opts.alignTicksWithAxis != null) {\n var otherAxis = (axis.direction == \"x\" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1];\n if (otherAxis && otherAxis.used && otherAxis != axis) {\n // consider snapping min/max to outermost nice ticks\n var niceTicks = axis.tickGenerator(axis);\n if (niceTicks.length > 0) {\n if (opts.min == null)\n axis.min = Math.min(axis.min, niceTicks[0]);\n if (opts.max == null && niceTicks.length > 1)\n axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]);\n }\n\n axis.tickGenerator = function (axis) {\n // copy ticks, scaled to this axis\n var ticks = [], v, i;\n for (i = 0; i < otherAxis.ticks.length; ++i) {\n v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min);\n v = axis.min + v * (axis.max - axis.min);\n ticks.push(v);\n }\n return ticks;\n };\n\n // we might need an extra decimal since forced\n // ticks don't necessarily fit naturally\n if (!axis.mode && opts.tickDecimals == null) {\n var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1),\n ts = axis.tickGenerator(axis);\n\n // only proceed if the tick interval rounded\n // with an extra decimal doesn't give us a\n // zero at end\n if (!(ts.length > 1 && /\\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec))))\n axis.tickDecimals = extraDec;\n }\n }\n }\n }\n\n function setTicks(axis) {\n var oticks = axis.options.ticks, ticks = [];\n if (oticks == null || (typeof oticks == \"number\" && oticks > 0))\n ticks = axis.tickGenerator(axis);\n else if (oticks) {\n if ($.isFunction(oticks))\n // generate the ticks\n ticks = oticks(axis);\n else\n ticks = oticks;\n }\n\n // clean up/labelify the supplied ticks, copy them over\n var i, v;\n axis.ticks = [];\n for (i = 0; i < ticks.length; ++i) {\n var label = null;\n var t = ticks[i];\n if (typeof t == \"object\") {\n v = +t[0];\n if (t.length > 1)\n label = t[1];\n }\n else\n v = +t;\n if (label == null)\n label = axis.tickFormatter(v, axis);\n if (!isNaN(v))\n axis.ticks.push({ v: v, label: label });\n }\n }\n\n function snapRangeToTicks(axis, ticks) {\n if (axis.options.autoscaleMargin && ticks.length > 0) {\n // snap to ticks\n if (axis.options.min == null)\n axis.min = Math.min(axis.min, ticks[0].v);\n if (axis.options.max == null && ticks.length > 1)\n axis.max = Math.max(axis.max, ticks[ticks.length - 1].v);\n }\n }\n\n function draw() {\n\n surface.clear();\n\n executeHooks(hooks.drawBackground, [ctx]);\n\n var grid = options.grid;\n\n // draw background, if any\n if (grid.show && grid.backgroundColor)\n drawBackground();\n\n if (grid.show && !grid.aboveData) {\n drawGrid();\n }\n\n for (var i = 0; i < series.length; ++i) {\n executeHooks(hooks.drawSeries, [ctx, series[i]]);\n drawSeries(series[i]);\n }\n\n executeHooks(hooks.draw, [ctx]);\n\n if (grid.show && grid.aboveData) {\n drawGrid();\n }\n\n surface.render();\n\n // A draw implies that either the axes or data have changed, so we\n // should probably update the overlay highlights as well.\n\n triggerRedrawOverlay();\n }\n\n function extractRange(ranges, coord) {\n var axis, from, to, key, axes = allAxes();\n\n for (var i = 0; i < axes.length; ++i) {\n axis = axes[i];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? xaxes[0] : yaxes[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }\n\n function drawBackground() {\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, \"rgba(255, 255, 255, 0)\");\n ctx.fillRect(0, 0, plotWidth, plotHeight);\n ctx.restore();\n }\n\n function drawGrid() {\n var i, axes, bw, bc;\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // draw markings\n var markings = options.grid.markings;\n if (markings) {\n if ($.isFunction(markings)) {\n axes = plot.getAxes();\n // xmin etc. is backwards compatibility, to be\n // removed in the future\n axes.xmin = axes.xaxis.min;\n axes.xmax = axes.xaxis.max;\n axes.ymin = axes.yaxis.min;\n axes.ymax = axes.yaxis.max;\n\n markings = markings(axes);\n }\n\n for (i = 0; i < markings.length; ++i) {\n var m = markings[i],\n xrange = extractRange(m, \"x\"),\n yrange = extractRange(m, \"y\");\n\n // fill in missing\n if (xrange.from == null)\n xrange.from = xrange.axis.min;\n if (xrange.to == null)\n xrange.to = xrange.axis.max;\n if (yrange.from == null)\n yrange.from = yrange.axis.min;\n if (yrange.to == null)\n yrange.to = yrange.axis.max;\n\n // clip\n if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max ||\n yrange.to < yrange.axis.min || yrange.from > yrange.axis.max)\n continue;\n\n xrange.from = Math.max(xrange.from, xrange.axis.min);\n xrange.to = Math.min(xrange.to, xrange.axis.max);\n yrange.from = Math.max(yrange.from, yrange.axis.min);\n yrange.to = Math.min(yrange.to, yrange.axis.max);\n\n var xequal = xrange.from === xrange.to,\n yequal = yrange.from === yrange.to;\n\n if (xequal && yequal) {\n continue;\n }\n\n // then draw\n xrange.from = Math.floor(xrange.axis.p2c(xrange.from));\n xrange.to = Math.floor(xrange.axis.p2c(xrange.to));\n yrange.from = Math.floor(yrange.axis.p2c(yrange.from));\n yrange.to = Math.floor(yrange.axis.p2c(yrange.to));\n\n if (xequal || yequal) {\n var lineWidth = m.lineWidth || options.grid.markingsLineWidth,\n subPixel = lineWidth % 2 ? 0.5 : 0;\n ctx.beginPath();\n ctx.strokeStyle = m.color || options.grid.markingsColor;\n ctx.lineWidth = lineWidth;\n if (xequal) {\n ctx.moveTo(xrange.to + subPixel, yrange.from);\n ctx.lineTo(xrange.to + subPixel, yrange.to);\n } else {\n ctx.moveTo(xrange.from, yrange.to + subPixel);\n ctx.lineTo(xrange.to, yrange.to + subPixel);\n }\n ctx.stroke();\n } else {\n ctx.fillStyle = m.color || options.grid.markingsColor;\n ctx.fillRect(xrange.from, yrange.to,\n xrange.to - xrange.from,\n yrange.from - yrange.to);\n }\n }\n }\n\n // draw the ticks\n axes = allAxes();\n bw = options.grid.borderWidth;\n\n for (var j = 0; j < axes.length; ++j) {\n var axis = axes[j], box = axis.box,\n t = axis.tickLength, x, y, xoff, yoff;\n if (!axis.show || axis.ticks.length == 0)\n continue;\n\n ctx.lineWidth = 1;\n\n // find the edges\n if (axis.direction == \"x\") {\n x = 0;\n if (t == \"full\")\n y = (axis.position == \"top\" ? 0 : plotHeight);\n else\n y = box.top - plotOffset.top + (axis.position == \"top\" ? box.height : 0);\n }\n else {\n y = 0;\n if (t == \"full\")\n x = (axis.position == \"left\" ? 0 : plotWidth);\n else\n x = box.left - plotOffset.left + (axis.position == \"left\" ? box.width : 0);\n }\n\n // draw tick bar\n if (!axis.innermost) {\n ctx.strokeStyle = axis.options.color;\n ctx.beginPath();\n xoff = yoff = 0;\n if (axis.direction == \"x\")\n xoff = plotWidth + 1;\n else\n yoff = plotHeight + 1;\n\n if (ctx.lineWidth == 1) {\n if (axis.direction == \"x\") {\n y = Math.floor(y) + 0.5;\n } else {\n x = Math.floor(x) + 0.5;\n }\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n ctx.stroke();\n }\n\n // draw ticks\n\n ctx.strokeStyle = axis.options.tickColor;\n\n ctx.beginPath();\n for (i = 0; i < axis.ticks.length; ++i) {\n var v = axis.ticks[i].v;\n\n xoff = yoff = 0;\n\n if (isNaN(v) || v < axis.min || v > axis.max\n // skip those lying on the axes if we got a border\n || (t == \"full\"\n && ((typeof bw == \"object\" && bw[axis.position] > 0) || bw > 0)\n && (v == axis.min || v == axis.max)))\n continue;\n\n if (axis.direction == \"x\") {\n x = axis.p2c(v);\n yoff = t == \"full\" ? -plotHeight : t;\n\n if (axis.position == \"top\")\n yoff = -yoff;\n }\n else {\n y = axis.p2c(v);\n xoff = t == \"full\" ? -plotWidth : t;\n\n if (axis.position == \"left\")\n xoff = -xoff;\n }\n\n if (ctx.lineWidth == 1) {\n if (axis.direction == \"x\")\n x = Math.floor(x) + 0.5;\n else\n y = Math.floor(y) + 0.5;\n }\n\n ctx.moveTo(x, y);\n ctx.lineTo(x + xoff, y + yoff);\n }\n\n ctx.stroke();\n }\n\n\n // draw border\n if (bw) {\n // If either borderWidth or borderColor is an object, then draw the border\n // line by line instead of as one rectangle\n bc = options.grid.borderColor;\n if(typeof bw == \"object\" || typeof bc == \"object\") {\n if (typeof bw !== \"object\") {\n bw = {top: bw, right: bw, bottom: bw, left: bw};\n }\n if (typeof bc !== \"object\") {\n bc = {top: bc, right: bc, bottom: bc, left: bc};\n }\n\n if (bw.top > 0) {\n ctx.strokeStyle = bc.top;\n ctx.lineWidth = bw.top;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left, 0 - bw.top/2);\n ctx.lineTo(plotWidth, 0 - bw.top/2);\n ctx.stroke();\n }\n\n if (bw.right > 0) {\n ctx.strokeStyle = bc.right;\n ctx.lineWidth = bw.right;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top);\n ctx.lineTo(plotWidth + bw.right / 2, plotHeight);\n ctx.stroke();\n }\n\n if (bw.bottom > 0) {\n ctx.strokeStyle = bc.bottom;\n ctx.lineWidth = bw.bottom;\n ctx.beginPath();\n ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2);\n ctx.lineTo(0, plotHeight + bw.bottom / 2);\n ctx.stroke();\n }\n\n if (bw.left > 0) {\n ctx.strokeStyle = bc.left;\n ctx.lineWidth = bw.left;\n ctx.beginPath();\n ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom);\n ctx.lineTo(0- bw.left/2, 0);\n ctx.stroke();\n }\n }\n else {\n ctx.lineWidth = bw;\n ctx.strokeStyle = options.grid.borderColor;\n ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw);\n }\n }\n\n ctx.restore();\n }\n\n function drawAxisLabels() {\n\n $.each(allAxes(), function (_, axis) {\n var box = axis.box,\n legacyStyles = axis.direction + \"Axis \" + axis.direction + axis.n + \"Axis\",\n layer = \"flot-\" + axis.direction + \"-axis flot-\" + axis.direction + axis.n + \"-axis \" + legacyStyles,\n font = axis.options.font || \"flot-tick-label tickLabel\",\n tick, x, y, halign, valign;\n\n // Remove text before checking for axis.show and ticks.length;\n // otherwise plugins, like flot-tickrotor, that draw their own\n // tick labels will end up with both theirs and the defaults.\n\n surface.removeText(layer);\n\n if (!axis.show || axis.ticks.length == 0)\n return;\n\n for (var i = 0; i < axis.ticks.length; ++i) {\n\n tick = axis.ticks[i];\n if (!tick.label || tick.v < axis.min || tick.v > axis.max)\n continue;\n\n if (axis.direction == \"x\") {\n halign = \"center\";\n x = plotOffset.left + axis.p2c(tick.v);\n if (axis.position == \"bottom\") {\n y = box.top + box.padding + box.eventSectionPadding;\n } else {\n y = box.top + box.height - box.padding;\n valign = \"bottom\";\n }\n } else {\n valign = \"middle\";\n y = plotOffset.top + axis.p2c(tick.v);\n if (axis.position == \"left\") {\n x = box.left + box.width - box.padding;\n halign = \"right\";\n } else {\n x = box.left + box.padding;\n }\n }\n\n surface.addText(layer, x, y, tick.label, font, null, null, halign, valign);\n }\n });\n }\n\n function drawSeries(series) {\n if (series.lines.show)\n drawSeriesLines(series);\n if (series.bars.show)\n drawSeriesBars(series);\n if (series.points.show)\n drawSeriesPoints(series);\n }\n\n function drawSeriesLines(series) {\n function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n prevx = null, prevy = null;\n\n ctx.beginPath();\n for (var i = ps; i < points.length; i += ps) {\n var x1 = points[i - ps], y1 = points[i - ps + 1],\n x2 = points[i], y2 = points[i + 1];\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min) {\n if (y2 < axisy.min)\n continue; // line segment is outside\n // compute new intersection point\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min) {\n if (y1 < axisy.min)\n continue;\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max) {\n if (y2 > axisy.max)\n continue;\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max) {\n if (y1 > axisy.max)\n continue;\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (x1 != prevx || y1 != prevy)\n ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset);\n\n prevx = x2;\n prevy = y2;\n ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset);\n }\n ctx.stroke();\n }\n\n function plotLineArea(datapoints, axisx, axisy) {\n var points = datapoints.points,\n ps = datapoints.pointsize,\n bottom = Math.min(Math.max(0, axisy.min), axisy.max),\n i = 0, top, areaOpen = false,\n ypos = 1, segmentStart = 0, segmentEnd = 0;\n\n // we process each segment in two turns, first forward\n // direction to sketch out top, then once we hit the\n // end we go backwards to sketch the bottom\n while (true) {\n if (ps > 0 && i > points.length + ps)\n break;\n\n i += ps; // ps is negative if going backwards\n\n var x1 = points[i - ps],\n y1 = points[i - ps + ypos],\n x2 = points[i], y2 = points[i + ypos];\n\n if (areaOpen) {\n if (ps > 0 && x1 != null && x2 == null) {\n // at turning point\n segmentEnd = i;\n ps = -ps;\n ypos = 2;\n continue;\n }\n\n if (ps < 0 && i == segmentStart + ps) {\n // done with the reverse sweep\n ctx.fill();\n areaOpen = false;\n ps = -ps;\n ypos = 1;\n i = segmentStart = segmentEnd + ps;\n continue;\n }\n }\n\n if (x1 == null || x2 == null)\n continue;\n\n // clip x values\n\n // clip with xmin\n if (x1 <= x2 && x1 < axisx.min) {\n if (x2 < axisx.min)\n continue;\n y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.min;\n }\n else if (x2 <= x1 && x2 < axisx.min) {\n if (x1 < axisx.min)\n continue;\n y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.min;\n }\n\n // clip with xmax\n if (x1 >= x2 && x1 > axisx.max) {\n if (x2 > axisx.max)\n continue;\n y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x1 = axisx.max;\n }\n else if (x2 >= x1 && x2 > axisx.max) {\n if (x1 > axisx.max)\n continue;\n y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1;\n x2 = axisx.max;\n }\n\n if (!areaOpen) {\n // open area\n ctx.beginPath();\n ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom));\n areaOpen = true;\n }\n\n // now first check the case where both is outside\n if (y1 >= axisy.max && y2 >= axisy.max) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max));\n continue;\n }\n else if (y1 <= axisy.min && y2 <= axisy.min) {\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min));\n continue;\n }\n\n // else it's a bit more complicated, there might\n // be a flat maxed out rectangle first, then a\n // triangular cutout or reverse; to find these\n // keep track of the current x values\n var x1old = x1, x2old = x2;\n\n // clip the y values, without shortcutting, we\n // go through all cases in turn\n\n // clip with ymin\n if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) {\n x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.min;\n }\n else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) {\n x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.min;\n }\n\n // clip with ymax\n if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) {\n x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y1 = axisy.max;\n }\n else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) {\n x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1;\n y2 = axisy.max;\n }\n\n // if the x value was changed we got a rectangle\n // to fill\n if (x1 != x1old) {\n ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1));\n // it goes to (x1, y1), but we fill that below\n }\n\n // fill triangular section, this sometimes result\n // in redundant points if (x1, y1) hasn't changed\n // from previous line to, but we just ignore that\n ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1));\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n\n // fill the other rectangle if it's there\n if (x2 != x2old) {\n ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2));\n ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2));\n }\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n ctx.lineJoin = \"round\";\n\n var lw = series.lines.lineWidth,\n sw = series.shadowSize;\n // FIXME: consider another form of shadow when filling is turned on\n if (lw > 0 && sw > 0) {\n // draw shadow as a thick and thin line with transparency\n ctx.lineWidth = sw;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n // position shadow at angle from the mid of line\n var angle = Math.PI/18;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis);\n ctx.lineWidth = sw/2;\n plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n plotLineArea(series.datapoints, series.xaxis, series.yaxis);\n }\n\n if (lw > 0)\n plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function drawSeriesPoints(series) {\n function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n var x = points[i], y = points[i + 1];\n if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n continue;\n\n ctx.beginPath();\n x = axisx.p2c(x);\n y = axisy.p2c(y) + offset;\n if (symbol == \"circle\")\n ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);\n else\n symbol(ctx, x, y, radius, shadow);\n ctx.closePath();\n\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n ctx.fill();\n }\n ctx.stroke();\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n var lw = series.points.lineWidth,\n sw = series.shadowSize,\n radius = series.points.radius,\n symbol = series.points.symbol;\n\n // If the user sets the line width to 0, we change it to a very\n // small value. A line width of 0 seems to force the default of 1.\n // Doing the conditional here allows the shadow setting to still be\n // optional even with a lineWidth of 0.\n\n if( lw == 0 )\n lw = 0.0001;\n\n if (lw > 0 && sw > 0) {\n // draw shadow in two steps\n var w = sw / 2;\n ctx.lineWidth = w;\n ctx.strokeStyle = \"rgba(0,0,0,0.1)\";\n plotPoints(series.datapoints, radius, null, w + w/2, true,\n series.xaxis, series.yaxis, symbol);\n\n ctx.strokeStyle = \"rgba(0,0,0,0.2)\";\n plotPoints(series.datapoints, radius, null, w/2, true,\n series.xaxis, series.yaxis, symbol);\n }\n\n ctx.lineWidth = lw;\n ctx.strokeStyle = series.color;\n plotPoints(series.datapoints, radius,\n getFillStyle(series.points, series.color), 0, false,\n series.xaxis, series.yaxis, symbol);\n ctx.restore();\n }\n\n function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) {\n var left, right, bottom, top,\n drawLeft, drawRight, drawTop, drawBottom,\n tmp;\n\n // in horizontal mode, we start the bar from the left\n // instead of from the bottom so it appears to be\n // horizontal rather than vertical\n if (horizontal) {\n drawBottom = drawRight = drawTop = true;\n drawLeft = false;\n left = b;\n right = x;\n top = y + barLeft;\n bottom = y + barRight;\n\n // account for negative bars\n if (right < left) {\n tmp = right;\n right = left;\n left = tmp;\n drawLeft = true;\n drawRight = false;\n }\n }\n else {\n drawLeft = drawRight = drawTop = true;\n drawBottom = false;\n left = x + barLeft;\n right = x + barRight;\n bottom = b;\n top = y;\n\n // account for negative bars\n if (top < bottom) {\n tmp = top;\n top = bottom;\n bottom = tmp;\n drawBottom = true;\n drawTop = false;\n }\n }\n\n // clip\n if (right < axisx.min || left > axisx.max ||\n top < axisy.min || bottom > axisy.max)\n return;\n\n if (left < axisx.min) {\n left = axisx.min;\n drawLeft = false;\n }\n\n if (right > axisx.max) {\n right = axisx.max;\n drawRight = false;\n }\n\n if (bottom < axisy.min) {\n bottom = axisy.min;\n drawBottom = false;\n }\n\n if (top > axisy.max) {\n top = axisy.max;\n drawTop = false;\n }\n\n left = axisx.p2c(left);\n bottom = axisy.p2c(bottom);\n right = axisx.p2c(right);\n top = axisy.p2c(top);\n\n // fill the bar\n if (fillStyleCallback) {\n c.fillStyle = fillStyleCallback(bottom, top);\n c.fillRect(left, top, right - left, bottom - top)\n }\n\n // draw outline\n if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) {\n c.beginPath();\n\n // FIXME: inline moveTo is buggy with excanvas\n c.moveTo(left, bottom);\n if (drawLeft)\n c.lineTo(left, top);\n else\n c.moveTo(left, top);\n if (drawTop)\n c.lineTo(right, top);\n else\n c.moveTo(right, top);\n if (drawRight)\n c.lineTo(right, bottom);\n else\n c.moveTo(right, bottom);\n if (drawBottom)\n c.lineTo(left, bottom);\n else\n c.moveTo(left, bottom);\n c.stroke();\n }\n }\n\n function drawSeriesBars(series) {\n function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) {\n var points = datapoints.points, ps = datapoints.pointsize;\n\n for (var i = 0; i < points.length; i += ps) {\n if (points[i] == null)\n continue;\n drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);\n }\n }\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n // FIXME: figure out a way to add shadows (for instance along the right edge)\n ctx.lineWidth = series.bars.lineWidth;\n ctx.strokeStyle = series.color;\n\n var barLeft;\n\n switch (series.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -series.bars.barWidth;\n break;\n default:\n barLeft = -series.bars.barWidth / 2;\n }\n\n var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null;\n plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, fillStyleCallback, series.xaxis, series.yaxis);\n ctx.restore();\n }\n\n function getFillStyle(filloptions, seriesColor, bottom, top) {\n var fill = filloptions.fill;\n if (!fill)\n return null;\n\n if (filloptions.fillColor)\n return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor);\n\n var c = $.color.parse(seriesColor);\n c.a = typeof fill == \"number\" ? fill : 0.4;\n c.normalize();\n return c.toString();\n }\n\n function insertLegend() {\n\n if (options.legend.container != null) {\n $(options.legend.container).html(\"\");\n } else {\n placeholder.find(\".legend\").remove();\n }\n\n if (!options.legend.show) {\n return;\n }\n\n var fragments = [], entries = [], rowStarted = false,\n lf = options.legend.labelFormatter, s, label;\n\n // Build a list of legend entries, with each having a label and a color\n\n for (var i = 0; i < series.length; ++i) {\n s = series[i];\n if (s.label) {\n label = lf ? lf(s.label, s) : s.label;\n if (label) {\n entries.push({\n label: label,\n color: s.color\n });\n }\n }\n }\n\n // Sort the legend using either the default or a custom comparator\n\n if (options.legend.sorted) {\n if ($.isFunction(options.legend.sorted)) {\n entries.sort(options.legend.sorted);\n } else if (options.legend.sorted == \"reverse\") {\n \tentries.reverse();\n } else {\n var ascending = options.legend.sorted != \"descending\";\n entries.sort(function(a, b) {\n return a.label == b.label ? 0 : (\n (a.label < b.label) != ascending ? 1 : -1 // Logical XOR\n );\n });\n }\n }\n\n // Generate markup for the list of entries, in their final order\n\n for (var i = 0; i < entries.length; ++i) {\n\n var entry = entries[i];\n\n if (i % options.legend.noColumns == 0) {\n if (rowStarted)\n fragments.push('');\n fragments.push('');\n rowStarted = true;\n }\n\n fragments.push(\n '
' +\n '' + entry.label + ''\n );\n }\n\n if (rowStarted)\n fragments.push('');\n\n if (fragments.length == 0)\n return;\n\n var table = '' + fragments.join(\"\") + '
';\n if (options.legend.container != null)\n $(options.legend.container).html(table);\n else {\n var pos = \"\",\n p = options.legend.position,\n m = options.legend.margin;\n if (m[0] == null)\n m = [m, m];\n if (p.charAt(0) == \"n\")\n pos += 'top:' + (m[1] + plotOffset.top) + 'px;';\n else if (p.charAt(0) == \"s\")\n pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;';\n if (p.charAt(1) == \"e\")\n pos += 'right:' + (m[0] + plotOffset.right) + 'px;';\n else if (p.charAt(1) == \"w\")\n pos += 'left:' + (m[0] + plotOffset.left) + 'px;';\n var legend = $('
' + table.replace('style=\"', 'style=\"position:absolute;' + pos +';') + '
').appendTo(placeholder);\n if (options.legend.backgroundOpacity != 0.0) {\n // put in the transparent background\n // separately to avoid blended labels and\n // label boxes\n var c = options.legend.backgroundColor;\n if (c == null) {\n c = options.grid.backgroundColor;\n if (c && typeof c == \"string\")\n c = $.color.parse(c);\n else\n c = $.color.extract(legend, 'background-color');\n c.a = 1;\n c = c.toString();\n }\n var div = legend.children();\n $('
').prependTo(legend).css('opacity', options.legend.backgroundOpacity);\n }\n }\n }\n\n\n // interactive features\n\n var highlights = [],\n redrawTimeout = null;\n\n // returns the data item the mouse is over, or null if none is found\n function findNearbyItem(mouseX, mouseY, seriesFilter) {\n var maxDistance = options.grid.mouseActiveRadius,\n smallestDistance = maxDistance * maxDistance + 1,\n item = null, foundPoint = false, i, j, ps;\n\n for (i = series.length - 1; i >= 0; --i) {\n if (!seriesFilter(series[i]))\n continue;\n\n var s = series[i],\n axisx = s.xaxis,\n axisy = s.yaxis,\n points = s.datapoints.points,\n mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster\n my = axisy.c2p(mouseY),\n maxx = maxDistance / axisx.scale,\n maxy = maxDistance / axisy.scale;\n\n ps = s.datapoints.pointsize;\n // with inverse transforms, we can't use the maxx/maxy\n // optimization, sadly\n if (axisx.options.inverseTransform)\n maxx = Number.MAX_VALUE;\n if (axisy.options.inverseTransform)\n maxy = Number.MAX_VALUE;\n\n if (s.lines.show || s.points.show) {\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1];\n if (x == null)\n continue;\n\n // For points and lines, the cursor must be within a\n // certain distance to the data point\n if (x - mx > maxx || x - mx < -maxx ||\n y - my > maxy || y - my < -maxy)\n continue;\n\n // We have to calculate distances in pixels, not in\n // data units, because the scales of the axes may be different\n var dx = Math.abs(axisx.p2c(x) - mouseX),\n dy = Math.abs(axisy.p2c(y) - mouseY),\n dist = dx * dx + dy * dy; // we save the sqrt\n\n // use <= to ensure last point takes precedence\n // (last generally means on top of)\n if (dist < smallestDistance) {\n smallestDistance = dist;\n item = [i, j / ps];\n }\n }\n }\n\n if (s.bars.show && !item) { // no other point can be nearby\n\n var barLeft, barRight;\n\n switch (s.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -s.bars.barWidth;\n break;\n default:\n barLeft = -s.bars.barWidth / 2;\n }\n\n barRight = barLeft + s.bars.barWidth;\n\n for (j = 0; j < points.length; j += ps) {\n var x = points[j], y = points[j + 1], b = points[j + 2];\n if (x == null)\n continue;\n\n // for a bar graph, the cursor must be inside the bar\n if (series[i].bars.horizontal ?\n (mx <= Math.max(b, x) && mx >= Math.min(b, x) &&\n my >= y + barLeft && my <= y + barRight) :\n (mx >= x + barLeft && mx <= x + barRight &&\n my >= Math.min(b, y) && my <= Math.max(b, y)))\n item = [i, j / ps];\n }\n }\n }\n\n if (item) {\n i = item[0];\n j = item[1];\n ps = series[i].datapoints.pointsize;\n\n return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),\n dataIndex: j,\n series: series[i],\n seriesIndex: i };\n }\n\n return null;\n }\n\n function onMouseMove(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return s[\"hoverable\"] != false; });\n }\n\n function onMouseLeave(e) {\n if (options.grid.hoverable)\n triggerClickHoverEvent(\"plothover\", e,\n function (s) { return false; });\n }\n\n function onClick(e) {\n if (plot.isSelecting) {\n return;\n }\n\n triggerClickHoverEvent(\"plotclick\", e, function (s) { return s[\"clickable\"] != false; });\n }\n\n // trigger click or hover event (they send the same parameters\n // so we share their code)\n function triggerClickHoverEvent(eventname, event, seriesFilter) {\n var offset = eventHolder.offset(),\n canvasX = event.pageX - offset.left - plotOffset.left,\n canvasY = event.pageY - offset.top - plotOffset.top,\n pos = canvasToAxisCoords({ left: canvasX, top: canvasY });\n\n pos.pageX = event.pageX;\n pos.pageY = event.pageY;\n\n // Add ctrlKey and metaKey to event\n pos.ctrlKey = event.ctrlKey;\n pos.metaKey = event.metaKey;\n\n var item = findNearbyItem(canvasX, canvasY, seriesFilter);\n\n if (item) {\n // fill in mouse pos for any listeners out there\n item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10);\n item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10);\n }\n\n if (options.grid.autoHighlight) {\n // clear auto-highlights\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.auto == eventname &&\n !(item && h.series == item.series &&\n h.point[0] == item.datapoint[0] &&\n h.point[1] == item.datapoint[1]))\n unhighlight(h.series, h.point);\n }\n\n if (item)\n highlight(item.series, item.datapoint, eventname);\n }\n\n placeholder.trigger(eventname, [ pos, item ]);\n }\n\n function triggerRedrawOverlay() {\n var t = options.interaction.redrawOverlayInterval;\n if (t == -1) { // skip event queue\n drawOverlay();\n return;\n }\n\n if (!redrawTimeout)\n redrawTimeout = setTimeout(drawOverlay, t);\n }\n\n function drawOverlay() {\n redrawTimeout = null;\n\n // draw highlights\n octx.save();\n overlay.clear();\n octx.translate(plotOffset.left, plotOffset.top);\n\n var i, hi;\n for (i = 0; i < highlights.length; ++i) {\n hi = highlights[i];\n\n if (hi.series.bars.show)\n drawBarHighlight(hi.series, hi.point);\n else\n drawPointHighlight(hi.series, hi.point);\n }\n octx.restore();\n\n executeHooks(hooks.drawOverlay, [octx]);\n }\n\n function highlight(s, point, auto) {\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\") {\n var ps = s.datapoints.pointsize;\n point = s.datapoints.points.slice(ps * point, ps * (point + 1));\n }\n\n var i = indexOfHighlight(s, point);\n if (i == -1) {\n highlights.push({ series: s, point: point, auto: auto });\n\n triggerRedrawOverlay();\n }\n else if (!auto)\n highlights[i].auto = false;\n }\n\n function unhighlight(s, point) {\n if (s == null && point == null) {\n highlights = [];\n triggerRedrawOverlay();\n return;\n }\n\n if (typeof s == \"number\")\n s = series[s];\n\n if (typeof point == \"number\") {\n var ps = s.datapoints.pointsize;\n point = s.datapoints.points.slice(ps * point, ps * (point + 1));\n }\n\n var i = indexOfHighlight(s, point);\n if (i != -1) {\n highlights.splice(i, 1);\n\n triggerRedrawOverlay();\n }\n }\n\n function indexOfHighlight(s, p) {\n for (var i = 0; i < highlights.length; ++i) {\n var h = highlights[i];\n if (h.series == s && h.point[0] == p[0]\n && h.point[1] == p[1])\n return i;\n }\n return -1;\n }\n\n function drawPointHighlight(series, point) {\n var x = point[0], y = point[1],\n axisx = series.xaxis, axisy = series.yaxis,\n highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString();\n\n if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max)\n return;\n\n var pointRadius = series.points.radius + series.points.lineWidth / 2;\n octx.lineWidth = pointRadius;\n octx.strokeStyle = highlightColor;\n var radius = 1.5 * pointRadius;\n x = axisx.p2c(x);\n y = axisy.p2c(y);\n\n octx.beginPath();\n if (series.points.symbol == \"circle\")\n octx.arc(x, y, radius, 0, 2 * Math.PI, false);\n else\n series.points.symbol(octx, x, y, radius, false);\n octx.closePath();\n octx.stroke();\n }\n\n function drawBarHighlight(series, point) {\n var highlightColor = (typeof series.highlightColor === \"string\") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(),\n fillStyle = highlightColor,\n barLeft;\n\n switch (series.bars.align) {\n case \"left\":\n barLeft = 0;\n break;\n case \"right\":\n barLeft = -series.bars.barWidth;\n break;\n default:\n barLeft = -series.bars.barWidth / 2;\n }\n\n octx.lineWidth = series.bars.lineWidth;\n octx.strokeStyle = highlightColor;\n\n drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth,\n function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth);\n }\n\n function getColorOrGradient(spec, bottom, top, defaultColor) {\n if (typeof spec == \"string\")\n return spec;\n else {\n // assume this is a gradient spec; IE currently only\n // supports a simple vertical gradient properly, so that's\n // what we support too\n var gradient = ctx.createLinearGradient(0, top, 0, bottom);\n\n for (var i = 0, l = spec.colors.length; i < l; ++i) {\n var c = spec.colors[i];\n if (typeof c != \"string\") {\n var co = $.color.parse(defaultColor);\n if (c.brightness != null)\n co = co.scale('rgb', c.brightness);\n if (c.opacity != null)\n co.a *= c.opacity;\n c = co.toString();\n }\n gradient.addColorStop(i / (l - 1), c);\n }\n\n return gradient;\n }\n }\n }\n\n // Add the plot function to the top level of the jQuery object\n\n $.plot = function(placeholder, data, options) {\n //var t0 = new Date();\n var plot = new Plot($(placeholder), data, options, $.plot.plugins);\n //(window.console ? console.log : alert)(\"time used (msecs): \" + ((new Date()).getTime() - t0.getTime()));\n return plot;\n };\n\n $.plot.version = \"0.8.3\";\n\n $.plot.plugins = [];\n\n // Also add the plot function as a chainable property\n\n $.fn.plot = function(data, options) {\n return this.each(function() {\n $.plot(this, data, options);\n });\n };\n\n // round to nearby lower multiple of base\n function floorInBase(n, base) {\n return base * Math.floor(n / base);\n }\n\n})(jQuery);\n","/* Flot plugin for selecting regions of a plot.\n\nCopyright (c) 2007-2013 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nThe plugin supports these options:\n\nselection: {\n\tmode: null or \"x\" or \"y\" or \"xy\",\n\tcolor: color,\n\tshape: \"round\" or \"miter\" or \"bevel\",\n\tminSize: number of pixels\n}\n\nSelection support is enabled by setting the mode to one of \"x\", \"y\" or \"xy\".\nIn \"x\" mode, the user will only be able to specify the x range, similarly for\n\"y\" mode. For \"xy\", the selection becomes a rectangle where both ranges can be\nspecified. \"color\" is color of the selection (if you need to change the color\nlater on, you can get to it with plot.getOptions().selection.color). \"shape\"\nis the shape of the corners of the selection.\n\n\"minSize\" is the minimum size a selection can be in pixels. This value can\nbe customized to determine the smallest size a selection can be and still\nhave the selection rectangle be displayed. When customizing this value, the\nfact that it refers to pixels, not axis units must be taken into account.\nThus, for example, if there is a bar graph in time mode with BarWidth set to 1\nminute, setting \"minSize\" to 1 will not make the minimum selection size 1\nminute, but rather 1 pixel. Note also that setting \"minSize\" to 0 will prevent\n\"plotunselected\" events from being fired when the user clicks the mouse without\ndragging.\n\nWhen selection support is enabled, a \"plotselected\" event will be emitted on\nthe DOM element you passed into the plot function. The event handler gets a\nparameter with the ranges selected on the axes, like this:\n\n\tplaceholder.bind( \"plotselected\", function( event, ranges ) {\n\t\talert(\"You selected \" + ranges.xaxis.from + \" to \" + ranges.xaxis.to)\n\t\t// similar for yaxis - with multiple axes, the extra ones are in\n\t\t// x2axis, x3axis, ...\n\t});\n\nThe \"plotselected\" event is only fired when the user has finished making the\nselection. A \"plotselecting\" event is fired during the process with the same\nparameters as the \"plotselected\" event, in case you want to know what's\nhappening while it's happening,\n\nA \"plotunselected\" event with no arguments is emitted when the user clicks the\nmouse to remove the selection. As stated above, setting \"minSize\" to 0 will\ndestroy this behavior.\n\nThe plugin allso adds the following methods to the plot object:\n\n- setSelection( ranges, preventEvent )\n\n Set the selection rectangle. The passed in ranges is on the same form as\n returned in the \"plotselected\" event. If the selection mode is \"x\", you\n should put in either an xaxis range, if the mode is \"y\" you need to put in\n an yaxis range and both xaxis and yaxis if the selection mode is \"xy\", like\n this:\n\n\tsetSelection({ xaxis: { from: 0, to: 10 }, yaxis: { from: 40, to: 60 } });\n\n setSelection will trigger the \"plotselected\" event when called. If you don't\n want that to happen, e.g. if you're inside a \"plotselected\" handler, pass\n true as the second parameter. If you are using multiple axes, you can\n specify the ranges on any of those, e.g. as x2axis/x3axis/... instead of\n xaxis, the plugin picks the first one it sees.\n\n- clearSelection( preventEvent )\n\n Clear the selection rectangle. Pass in true to avoid getting a\n \"plotunselected\" event.\n\n- getSelection()\n\n Returns the current selection in the same format as the \"plotselected\"\n event. If there's currently no selection, the function returns null.\n\n*/\n\n(function ($) {\n function init(plot) {\n var selection = {\n first: { x: -1, y: -1}, second: { x: -1, y: -1},\n show: false,\n active: false\n };\n\n // FIXME: The drag handling implemented here should be\n // abstracted out, there's some similar code from a library in\n // the navigation plugin, this should be massaged a bit to fit\n // the Flot cases here better and reused. Doing this would\n // make this plugin much slimmer.\n var savedhandlers = {};\n\n var mouseUpHandler = null;\n\n function onMouseMove(e) {\n if (selection.active) {\n updateSelection(e);\n\n plot.getPlaceholder().trigger(\"plotselecting\", [ getSelection() ]);\n }\n }\n\n function onMouseDown(e) {\n if (e.which != 1) // only accept left-click\n return;\n\n // cancel out any text selections\n document.body.focus();\n\n // prevent text selection and drag in old-school browsers\n if (document.onselectstart !== undefined && savedhandlers.onselectstart == null) {\n savedhandlers.onselectstart = document.onselectstart;\n document.onselectstart = function () { return false; };\n }\n if (document.ondrag !== undefined && savedhandlers.ondrag == null) {\n savedhandlers.ondrag = document.ondrag;\n document.ondrag = function () { return false; };\n }\n\n setSelectionPos(selection.first, e);\n\n selection.active = true;\n\n // this is a bit silly, but we have to use a closure to be\n // able to whack the same handler again\n mouseUpHandler = function (e) { onMouseUp(e); };\n\n $(document).one(\"mouseup\", mouseUpHandler);\n }\n\n function onMouseUp(e) {\n mouseUpHandler = null;\n\n // revert drag stuff for old-school browsers\n if (document.onselectstart !== undefined)\n document.onselectstart = savedhandlers.onselectstart;\n if (document.ondrag !== undefined)\n document.ondrag = savedhandlers.ondrag;\n\n // no more dragging\n selection.active = false;\n updateSelection(e);\n\n if (selectionIsSane())\n triggerSelectedEvent(e);\n else {\n // this counts as a clear\n plot.getPlaceholder().trigger(\"plotunselected\", [ ]);\n plot.getPlaceholder().trigger(\"plotselecting\", [ null ]);\n }\n\n setTimeout(function() {\n plot.isSelecting = false;\n }, 10);\n\n return false;\n }\n\n function getSelection() {\n if (!selectionIsSane())\n return null;\n\n if (!selection.show) return null;\n\n var r = {}, c1 = selection.first, c2 = selection.second;\n var axes = plot.getAxes();\n // look if no axis is used\n var noAxisInUse = true;\n $.each(axes, function (name, axis) {\n if (axis.used) {\n anyUsed = false;\n }\n })\n\n $.each(axes, function (name, axis) {\n if (axis.used || noAxisInUse) {\n var p1 = axis.c2p(c1[axis.direction]), p2 = axis.c2p(c2[axis.direction]);\n r[name] = { from: Math.min(p1, p2), to: Math.max(p1, p2) };\n }\n });\n return r;\n }\n\n function triggerSelectedEvent(event) {\n var r = getSelection();\n\n // Add ctrlKey and metaKey to event\n r.ctrlKey = event.ctrlKey;\n r.metaKey = event.metaKey;\n\n plot.getPlaceholder().trigger(\"plotselected\", [ r ]);\n\n // backwards-compat stuff, to be removed in future\n if (r.xaxis && r.yaxis)\n plot.getPlaceholder().trigger(\"selected\", [ { x1: r.xaxis.from, y1: r.yaxis.from, x2: r.xaxis.to, y2: r.yaxis.to } ]);\n }\n\n function clamp(min, value, max) {\n return value < min ? min: (value > max ? max: value);\n }\n\n function setSelectionPos(pos, e) {\n var o = plot.getOptions();\n var offset = plot.getPlaceholder().offset();\n var plotOffset = plot.getPlotOffset();\n pos.x = clamp(0, e.pageX - offset.left - plotOffset.left, plot.width());\n pos.y = clamp(0, e.pageY - offset.top - plotOffset.top, plot.height());\n\n if (o.selection.mode == \"y\")\n pos.x = pos == selection.first ? 0 : plot.width();\n\n if (o.selection.mode == \"x\")\n pos.y = pos == selection.first ? 0 : plot.height();\n }\n\n function updateSelection(pos) {\n if (pos.pageX == null)\n return;\n\n setSelectionPos(selection.second, pos);\n if (selectionIsSane()) {\n plot.isSelecting = true;\n selection.show = true;\n plot.triggerRedrawOverlay();\n }\n else\n clearSelection(true);\n }\n\n function clearSelection(preventEvent) {\n if (selection.show) {\n selection.show = false;\n plot.triggerRedrawOverlay();\n if (!preventEvent)\n plot.getPlaceholder().trigger(\"plotunselected\", [ ]);\n }\n }\n\n // function taken from markings support in Flot\n function extractRange(ranges, coord) {\n var axis, from, to, key, axes = plot.getAxes();\n\n for (var k in axes) {\n axis = axes[k];\n if (axis.direction == coord) {\n key = coord + axis.n + \"axis\";\n if (!ranges[key] && axis.n == 1)\n key = coord + \"axis\"; // support x1axis as xaxis\n if (ranges[key]) {\n from = ranges[key].from;\n to = ranges[key].to;\n break;\n }\n }\n }\n\n // backwards-compat stuff - to be removed in future\n if (!ranges[key]) {\n axis = coord == \"x\" ? plot.getXAxes()[0] : plot.getYAxes()[0];\n from = ranges[coord + \"1\"];\n to = ranges[coord + \"2\"];\n }\n\n // auto-reverse as an added bonus\n if (from != null && to != null && from > to) {\n var tmp = from;\n from = to;\n to = tmp;\n }\n\n return { from: from, to: to, axis: axis };\n }\n\n function setSelection(ranges, preventEvent) {\n var axis, range, o = plot.getOptions();\n\n if (o.selection.mode == \"y\") {\n selection.first.x = 0;\n selection.second.x = plot.width();\n }\n else {\n range = extractRange(ranges, \"x\");\n\n selection.first.x = range.axis.p2c(range.from);\n selection.second.x = range.axis.p2c(range.to);\n }\n\n if (o.selection.mode == \"x\") {\n selection.first.y = 0;\n selection.second.y = plot.height();\n }\n else {\n range = extractRange(ranges, \"y\");\n\n selection.first.y = range.axis.p2c(range.from);\n selection.second.y = range.axis.p2c(range.to);\n }\n\n selection.show = true;\n plot.triggerRedrawOverlay();\n if (!preventEvent && selectionIsSane())\n triggerSelectedEvent();\n }\n\n function selectionIsSane() {\n var minSize = plot.getOptions().selection.minSize;\n return Math.abs(selection.second.x - selection.first.x) >= minSize &&\n Math.abs(selection.second.y - selection.first.y) >= minSize;\n }\n\n plot.clearSelection = clearSelection;\n plot.setSelection = setSelection;\n plot.getSelection = getSelection;\n\n plot.hooks.bindEvents.push(function(plot, eventHolder) {\n var o = plot.getOptions();\n if (o.selection.mode != null) {\n eventHolder.mousemove(onMouseMove);\n eventHolder.mousedown(onMouseDown);\n }\n });\n\n\n plot.hooks.drawOverlay.push(function (plot, ctx) {\n // draw selection\n if (selection.show && selectionIsSane()) {\n var plotOffset = plot.getPlotOffset();\n var o = plot.getOptions();\n\n ctx.save();\n ctx.translate(plotOffset.left, plotOffset.top);\n\n var c = $.color.parse(o.selection.color);\n\n ctx.strokeStyle = c.scale('a', o.selection.strokeAlpha).toString();\n ctx.lineWidth = 1;\n ctx.lineJoin = o.selection.shape;\n ctx.fillStyle = c.scale('a', o.selection.fillAlpha).toString();\n\n var x = Math.min(selection.first.x, selection.second.x) + 0.5,\n y = Math.min(selection.first.y, selection.second.y) + 0.5,\n w = Math.abs(selection.second.x - selection.first.x) - 1,\n h = Math.abs(selection.second.y - selection.first.y) - 1;\n\n ctx.fillRect(x, y, w, h);\n ctx.strokeRect(x, y, w, h);\n\n ctx.restore();\n }\n });\n\n plot.hooks.shutdown.push(function (plot, eventHolder) {\n eventHolder.unbind(\"mousemove\", onMouseMove);\n eventHolder.unbind(\"mousedown\", onMouseDown);\n\n if (mouseUpHandler)\n $(document).unbind(\"mouseup\", mouseUpHandler);\n });\n\n }\n\n $.plot.plugins.push({\n init: init,\n options: {\n selection: {\n mode: null, // one of null, \"x\", \"y\" or \"xy\"\n color: \"#e8cfac\",\n shape: \"round\", // one of \"round\", \"miter\", or \"bevel\"\n minSize: 5, // minimum number of pixels\n strokeAlpha: 0.8,\n fillAlpha: 0.4,\n }\n },\n name: 'selection',\n version: '1.1'\n });\n})(jQuery);\n","/* Flot plugin for stacking data sets rather than overlyaing them.\n\nCopyright (c) 2007-2014 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nThe plugin assumes the data is sorted on x (or y if stacking horizontally).\nFor line charts, it is assumed that if a line has an undefined gap (from a\nnull point), then the line above it should have the same gap - insert zeros\ninstead of \"null\" if you want another behaviour. This also holds for the start\nand end of the chart. Note that stacking a mix of positive and negative values\nin most instances doesn't make sense (so it looks weird).\n\nTwo or more series are stacked when their \"stack\" attribute is set to the same\nkey (which can be any number or string or just \"true\"). To specify the default\nstack, you can set the stack option like this:\n\n series: {\n stack: null/false, true, or a key (number/string)\n }\n\nYou can also specify it for a single series, like this:\n\n $.plot( $(\"#placeholder\"), [{\n data: [ ... ],\n stack: true\n }])\n\nThe stacking order is determined by the order of the data series in the array\n(later series end up on top of the previous).\n\nInternally, the plugin modifies the datapoints in each series, adding an\noffset to the y value. For line series, extra data points are inserted through\ninterpolation. If there's a second y value, it's also adjusted (e.g for bar\ncharts or filled areas).\n\n*/\n\n(function ($) {\n var options = {\n series: { stack: null } // or number/string\n };\n\n function init(plot) {\n function findMatchingSeries(s, allseries) {\n var res = null;\n for (var i = 0; i < allseries.length; ++i) {\n if (s == allseries[i])\n break;\n\n if (allseries[i].stack == s.stack)\n res = allseries[i];\n }\n\n return res;\n }\n\n function stackData(plot, s, datapoints) {\n if (s.stack == null || s.stack === false)\n return;\n\n var other = findMatchingSeries(s, plot.getData());\n if (!other)\n return;\n\n var ps = datapoints.pointsize,\n points = datapoints.points,\n otherps = other.datapoints.pointsize,\n otherpoints = other.datapoints.points,\n newpoints = [],\n px, py, intery, qx, qy, bottom,\n withlines = s.lines.show,\n horizontal = s.bars.horizontal,\n withbottom = ps > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y),\n withsteps = withlines && s.lines.steps,\n keyOffset = horizontal ? 1 : 0,\n accumulateOffset = horizontal ? 0 : 1,\n i = 0, j = 0, l, m;\n\n while (true) {\n if (i >= points.length && j >= otherpoints.length)\n break;\n\n l = newpoints.length;\n\n if (i < points.length && points[i] == null) {\n // copy gaps\n for (m = 0; m < ps; ++m)\n newpoints.push(points[i + m]);\n i += ps;\n }\n else if (i >= points.length) {\n // take the remaining points from the previous series\n for (m = 0; m < ps; ++m)\n newpoints.push(otherpoints[j + m]);\n if (withbottom)\n newpoints[l + 2] = otherpoints[j + accumulateOffset];\n j += otherps;\n }\n else if (j >= otherpoints.length) {\n // take the remaining points from the current series\n for (m = 0; m < ps; ++m)\n newpoints.push(points[i + m]);\n i += ps;\n }\n else if (j < otherpoints.length && otherpoints[j] == null) {\n // ignore point\n j += otherps;\n }\n else {\n // cases where we actually got two points\n px = points[i + keyOffset];\n py = points[i + accumulateOffset];\n qx = otherpoints[j + keyOffset];\n qy = otherpoints[j + accumulateOffset];\n bottom = 0;\n\n if (px == qx) {\n for (m = 0; m < ps; ++m)\n newpoints.push(points[i + m]);\n\n newpoints[l + accumulateOffset] += qy;\n bottom = qy;\n\n i += ps;\n j += otherps;\n }\n else if (px > qx) {\n // take the point from the previous series so that next series will correctly stack\n if (i == 0) {\n for (m = 0; m < ps; ++m)\n newpoints.push(otherpoints[j + m]);\n bottom = qy;\n }\n // we got past point below, might need to\n // insert interpolated extra point\n if (i > 0 && points[i - ps] != null) {\n intery = py + (points[i - ps + accumulateOffset] - py) * (qx - px) / (points[i - ps + keyOffset] - px);\n newpoints.push(qx);\n newpoints.push(intery + qy);\n for (m = 2; m < ps; ++m)\n newpoints.push(points[i + m]);\n bottom = qy;\n }\n\n j += otherps;\n }\n else { // px < qx\n for (m = 0; m < ps; ++m)\n newpoints.push(points[i + m]);\n\n // we might be able to interpolate a point below,\n // this can give us a better y\n if (j > 0 && otherpoints[j - otherps] != null)\n bottom = qy + (otherpoints[j - otherps + accumulateOffset] - qy) * (px - qx) / (otherpoints[j - otherps + keyOffset] - qx);\n\n newpoints[l + accumulateOffset] += bottom;\n\n i += ps;\n }\n\n fromgap = false;\n\n if (l != newpoints.length && withbottom)\n newpoints[l + 2] = bottom;\n }\n\n // maintain the line steps invariant\n if (withsteps && l != newpoints.length && l > 0\n && newpoints[l] != null\n && newpoints[l] != newpoints[l - ps]\n && newpoints[l + 1] != newpoints[l - ps + 1]) {\n for (m = 0; m < ps; ++m)\n newpoints[l + ps + m] = newpoints[l + m];\n newpoints[l + 1] = newpoints[l - ps + 1];\n }\n }\n\n datapoints.points = newpoints;\n }\n\n plot.hooks.processDatapoints.push(stackData);\n }\n\n $.plot.plugins.push({\n init: init,\n options: options,\n name: 'stack',\n version: '1.2'\n });\n})(jQuery);\n","(function ($) {\n var options = {\n series: {\n stackpercent: null\n } // or number/string\n };\n\n function init(plot) {\n\n // will be built up dynamically as a hash from x-value, or y-value if horizontal\n var stackBases = {};\n var processed = false;\n var stackSums = {};\n\n //set percentage for stacked chart\n function processRawData(plot, series, data, datapoints) {\n if (!processed) {\n processed = true;\n stackSums = getStackSums(plot.getData());\n }\n\t\t\tif (series.stackpercent == true) {\n\t\t\t\tvar num = data.length;\n\t\t\t\tseries.percents = [];\n\t\t\t\tvar key_idx = 0;\n\t\t\t\tvar value_idx = 1;\n\t\t\t\tif (series.bars && series.bars.horizontal && series.bars.horizontal === true) {\n\t\t\t\t\tkey_idx = 1;\n\t\t\t\t\tvalue_idx = 0;\n\t\t\t\t}\n\t\t\t\tfor (var j = 0; j < num; j++) {\n\t\t\t\t\tvar sum = stackSums[data[j][key_idx] + \"\"];\n\t\t\t\t\tif (sum > 0) {\n\t\t\t\t\t\tseries.percents.push(data[j][value_idx] * 100 / sum);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tseries.percents.push(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n }\n\n //calculate summary\n function getStackSums(_data) {\n var data_len = _data.length;\n var sums = {};\n if (data_len > 0) {\n //caculate summary\n for (var i = 0; i < data_len; i++) {\n if (_data[i].stackpercent) {\n\t\t\t\t\t\tvar key_idx = 0;\n\t\t\t\t\t\tvar value_idx = 1;\n\t\t\t\t\t\tif (_data[i].bars && _data[i].bars.horizontal && _data[i].bars.horizontal === true) {\n\t\t\t\t\t\t\tkey_idx = 1;\n\t\t\t\t\t\t\tvalue_idx = 0;\n\t\t\t\t\t\t}\n var num = _data[i].data.length;\n for (var j = 0; j < num; j++) {\n var value = 0;\n if (_data[i].data[j][1] != null) {\n value = _data[i].data[j][value_idx];\n }\n if (sums[_data[i].data[j][key_idx] + \"\"]) {\n sums[_data[i].data[j][key_idx] + \"\"] += value;\n } else {\n sums[_data[i].data[j][key_idx] + \"\"] = value;\n }\n\n }\n }\n }\n }\n return sums;\n }\n\n function stackData(plot, s, datapoints) {\n if (!s.stackpercent) return;\n if (!processed) {\n stackSums = getStackSums(plot.getData());\n }\n var newPoints = [];\n\n\n\t\t\tvar key_idx = 0;\n\t\t\tvar value_idx = 1;\n\t\t\tif (s.bars && s.bars.horizontal && s.bars.horizontal === true) {\n\t\t\t\tkey_idx = 1;\n\t\t\t\tvalue_idx = 0;\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < datapoints.points.length; i += 3) {\n\t\t\t\t// note that the values need to be turned into absolute y-values.\n\t\t\t\t// in other words, if you were to stack (x, y1), (x, y2), and (x, y3),\n\t\t\t\t// (each from different series, which is where stackBases comes in),\n\t\t\t\t// you'd want the new points to be (x, y1, 0), (x, y1+y2, y1), (x, y1+y2+y3, y1+y2)\n\t\t\t\t// generally, (x, thisValue + (base up to this point), + (base up to this point))\n\t\t\t\tif (!stackBases[datapoints.points[i + key_idx]]) {\n\t\t\t\t\tstackBases[datapoints.points[i + key_idx]] = 0;\n\t\t\t\t}\n\t\t\t\tnewPoints[i + key_idx] = datapoints.points[i + key_idx];\n\t\t\t\tnewPoints[i + value_idx] = datapoints.points[i + value_idx] + stackBases[datapoints.points[i + key_idx]];\n\t\t\t\tnewPoints[i + 2] = stackBases[datapoints.points[i + key_idx]];\n\t\t\t\tstackBases[datapoints.points[i + key_idx]] += datapoints.points[i + value_idx];\n\t\t\t\t// change points to percentage values\n\t\t\t\t// you may need to set yaxis:{ max = 100 }\n\t\t\t\tif ( stackSums[newPoints[i+key_idx]+\"\"] > 0 ){\n\t\t\t\t\tnewPoints[i + value_idx] = newPoints[i + value_idx] * 100 / stackSums[newPoints[i + key_idx] + \"\"];\n\t\t\t\t\tnewPoints[i + 2] = newPoints[i + 2] * 100 / stackSums[newPoints[i + key_idx] + \"\"];\n\t\t\t\t} else {\n\t\t\t\t\tnewPoints[i + value_idx] = 0;\n\t\t\t\t\tnewPoints[i + 2] = 0;\n\t\t\t\t}\n\t\t\t}\n\n datapoints.points = newPoints;\n }\n\n\t\tplot.hooks.processRawData.push(processRawData);\n plot.hooks.processDatapoints.push(stackData);\n }\n\n $.plot.plugins.push({\n init: init,\n options: options,\n name: 'stackpercent',\n version: '0.1'\n });\n})(jQuery);\n","/* Pretty handling of time axes.\n\nCopyright (c) 2007-2013 IOLA and Ole Laursen.\nLicensed under the MIT license.\n\nSet axis.mode to \"time\" to enable. See the section \"Time series data\" in\nAPI.txt for details.\n\n*/\n\n(function($) {\n\n\tvar options = {\n\t\txaxis: {\n\t\t\ttimezone: null,\t\t// \"browser\" for local to the client or timezone for timezone-js\n\t\t\ttimeformat: null,\t// format string to use\n\t\t\ttwelveHourClock: false,\t// 12 or 24 time in time mode\n\t\t\tmonthNames: null\t// list of names of months\n\t\t}\n\t};\n\n\t// round to nearby lower multiple of base\n\n\tfunction floorInBase(n, base) {\n\t\treturn base * Math.floor(n / base);\n\t}\n\n\t// Returns a string with the date d formatted according to fmt.\n\t// A subset of the Open Group's strftime format is supported.\n\n\tfunction formatDate(d, fmt, monthNames, dayNames) {\n\n\t\tif (typeof d.strftime == \"function\") {\n\t\t\treturn d.strftime(fmt);\n\t\t}\n\n\t\tvar leftPad = function(n, pad) {\n\t\t\tn = \"\" + n;\n\t\t\tpad = \"\" + (pad == null ? \"0\" : pad);\n\t\t\treturn n.length == 1 ? pad + n : n;\n\t\t};\n\n\t\tvar r = [];\n\t\tvar escape = false;\n\t\tvar hours = d.getHours();\n\t\tvar isAM = hours < 12;\n\n\t\tif (monthNames == null) {\n\t\t\tmonthNames = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n\t\t}\n\n\t\tif (dayNames == null) {\n\t\t\tdayNames = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\n\t\t}\n\n\t\tvar hours12;\n\n\t\tif (hours > 12) {\n\t\t\thours12 = hours - 12;\n\t\t} else if (hours == 0) {\n\t\t\thours12 = 12;\n\t\t} else {\n\t\t\thours12 = hours;\n\t\t}\n\n\t\tfor (var i = 0; i < fmt.length; ++i) {\n\n\t\t\tvar c = fmt.charAt(i);\n\n\t\t\tif (escape) {\n\t\t\t\tswitch (c) {\n\t\t\t\t\tcase 'a': c = \"\" + dayNames[d.getDay()]; break;\n\t\t\t\t\tcase 'b': c = \"\" + monthNames[d.getMonth()]; break;\n\t\t\t\t\tcase 'd': c = leftPad(d.getDate(), \"\"); break;\n\t\t\t\t\tcase 'e': c = leftPad(d.getDate(), \" \"); break;\n\t\t\t\t\tcase 'h':\t// For back-compat with 0.7; remove in 1.0\n\t\t\t\t\tcase 'H': c = leftPad(hours); break;\n\t\t\t\t\tcase 'I': c = leftPad(hours12); break;\n\t\t\t\t\tcase 'l': c = leftPad(hours12, \" \"); break;\n\t\t\t\t\tcase 'm': c = leftPad(d.getMonth() + 1, \"\"); break;\n\t\t\t\t\tcase 'M': c = leftPad(d.getMinutes()); break;\n\t\t\t\t\t// quarters not in Open Group's strftime specification\n\t\t\t\t\tcase 'q':\n\t\t\t\t\t\tc = \"\" + (Math.floor(d.getMonth() / 3) + 1); break;\n\t\t\t\t\tcase 'S': c = leftPad(d.getSeconds()); break;\n\t\t\t\t\tcase 'y': c = leftPad(d.getFullYear() % 100); break;\n\t\t\t\t\tcase 'Y': c = \"\" + d.getFullYear(); break;\n\t\t\t\t\tcase 'p': c = (isAM) ? (\"\" + \"am\") : (\"\" + \"pm\"); break;\n\t\t\t\t\tcase 'P': c = (isAM) ? (\"\" + \"AM\") : (\"\" + \"PM\"); break;\n\t\t\t\t\tcase 'w': c = \"\" + d.getDay(); break;\n\t\t\t\t}\n\t\t\t\tr.push(c);\n\t\t\t\tescape = false;\n\t\t\t} else {\n\t\t\t\tif (c == \"%\") {\n\t\t\t\t\tescape = true;\n\t\t\t\t} else {\n\t\t\t\t\tr.push(c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn r.join(\"\");\n\t}\n\n\t// To have a consistent view of time-based data independent of which time\n\t// zone the client happens to be in we need a date-like object independent\n\t// of time zones. This is done through a wrapper that only calls the UTC\n\t// versions of the accessor methods.\n\n\tfunction makeUtcWrapper(d) {\n\n\t\tfunction addProxyMethod(sourceObj, sourceMethod, targetObj, targetMethod) {\n\t\t\tsourceObj[sourceMethod] = function() {\n\t\t\t\treturn targetObj[targetMethod].apply(targetObj, arguments);\n\t\t\t};\n\t\t};\n\n\t\tvar utc = {\n\t\t\tdate: d\n\t\t};\n\n\t\t// support strftime, if found\n\n\t\tif (d.strftime != undefined) {\n\t\t\taddProxyMethod(utc, \"strftime\", d, \"strftime\");\n\t\t}\n\n\t\taddProxyMethod(utc, \"getTime\", d, \"getTime\");\n\t\taddProxyMethod(utc, \"setTime\", d, \"setTime\");\n\n\t\tvar props = [\"Date\", \"Day\", \"FullYear\", \"Hours\", \"Milliseconds\", \"Minutes\", \"Month\", \"Seconds\"];\n\n\t\tfor (var p = 0; p < props.length; p++) {\n\t\t\taddProxyMethod(utc, \"get\" + props[p], d, \"getUTC\" + props[p]);\n\t\t\taddProxyMethod(utc, \"set\" + props[p], d, \"setUTC\" + props[p]);\n\t\t}\n\n\t\treturn utc;\n\t};\n\n\t// select time zone strategy. This returns a date-like object tied to the\n\t// desired timezone\n\n\tfunction dateGenerator(ts, opts) {\n\t\tif (opts.timezone == \"browser\") {\n\t\t\treturn new Date(ts);\n\t\t} else if (!opts.timezone || opts.timezone == \"utc\") {\n\t\t\treturn makeUtcWrapper(new Date(ts));\n\t\t} else if (typeof timezoneJS != \"undefined\" && typeof timezoneJS.Date != \"undefined\") {\n\t\t\tvar d = new timezoneJS.Date();\n\t\t\t// timezone-js is fickle, so be sure to set the time zone before\n\t\t\t// setting the time.\n\t\t\td.setTimezone(opts.timezone);\n\t\t\td.setTime(ts);\n\t\t\treturn d;\n\t\t} else {\n\t\t\treturn makeUtcWrapper(new Date(ts));\n\t\t}\n\t}\n\n\t// map of app. size of time units in milliseconds\n\n\tvar timeUnitSize = {\n\t\t\"second\": 1000,\n\t\t\"minute\": 60 * 1000,\n\t\t\"hour\": 60 * 60 * 1000,\n\t\t\"day\": 24 * 60 * 60 * 1000,\n\t\t\"month\": 30 * 24 * 60 * 60 * 1000,\n\t\t\"quarter\": 3 * 30 * 24 * 60 * 60 * 1000,\n\t\t\"year\": 365.2425 * 24 * 60 * 60 * 1000\n\t};\n\n\t// the allowed tick sizes, after 1 year we use\n\t// an integer algorithm\n\n\tvar baseSpec = [\n\t\t[1, \"second\"], [2, \"second\"], [5, \"second\"], [10, \"second\"],\n\t\t[30, \"second\"],\n\t\t[1, \"minute\"], [2, \"minute\"], [5, \"minute\"], [10, \"minute\"],\n\t\t[30, \"minute\"],\n\t\t[1, \"hour\"], [2, \"hour\"], [4, \"hour\"],\n\t\t[8, \"hour\"], [12, \"hour\"],\n\t\t[1, \"day\"], [2, \"day\"], [3, \"day\"],\n\t\t[0.25, \"month\"], [0.5, \"month\"], [1, \"month\"],\n\t\t[2, \"month\"]\n\t];\n\n\t// we don't know which variant(s) we'll need yet, but generating both is\n\t// cheap\n\n\tvar specMonths = baseSpec.concat([[3, \"month\"], [6, \"month\"],\n\t\t[1, \"year\"]]);\n\tvar specQuarters = baseSpec.concat([[1, \"quarter\"], [2, \"quarter\"],\n\t\t[1, \"year\"]]);\n\n\tfunction init(plot) {\n\t\tplot.hooks.processOptions.push(function (plot, options) {\n\t\t\t$.each(plot.getAxes(), function(axisName, axis) {\n\n\t\t\t\tvar opts = axis.options;\n\n\t\t\t\tif (opts.mode == \"time\") {\n\t\t\t\t\taxis.tickGenerator = function(axis) {\n\n\t\t\t\t\t\tvar ticks = [];\n\t\t\t\t\t\tvar d = dateGenerator(axis.min, opts);\n\t\t\t\t\t\tvar minSize = 0;\n\n\t\t\t\t\t\t// make quarter use a possibility if quarters are\n\t\t\t\t\t\t// mentioned in either of these options\n\n\t\t\t\t\t\tvar spec = (opts.tickSize && opts.tickSize[1] ===\n\t\t\t\t\t\t\t\"quarter\") ||\n\t\t\t\t\t\t\t(opts.minTickSize && opts.minTickSize[1] ===\n\t\t\t\t\t\t\t\"quarter\") ? specQuarters : specMonths;\n\n\t\t\t\t\t\tif (opts.minTickSize != null) {\n\t\t\t\t\t\t\tif (typeof opts.tickSize == \"number\") {\n\t\t\t\t\t\t\t\tminSize = opts.tickSize;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tminSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (var i = 0; i < spec.length - 1; ++i) {\n\t\t\t\t\t\t\tif (axis.delta < (spec[i][0] * timeUnitSize[spec[i][1]]\n\t\t\t\t\t\t\t\t\t\t\t + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2\n\t\t\t\t\t\t\t\t&& spec[i][0] * timeUnitSize[spec[i][1]] >= minSize) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar size = spec[i][0];\n\t\t\t\t\t\tvar unit = spec[i][1];\n\n\t\t\t\t\t\t// special-case the possibility of several years\n\n\t\t\t\t\t\tif (unit == \"year\") {\n\n\t\t\t\t\t\t\t// if given a minTickSize in years, just use it,\n\t\t\t\t\t\t\t// ensuring that it's an integer\n\n\t\t\t\t\t\t\tif (opts.minTickSize != null && opts.minTickSize[1] == \"year\") {\n\t\t\t\t\t\t\t\tsize = Math.floor(opts.minTickSize[0]);\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\tvar magn = Math.pow(10, Math.floor(Math.log(axis.delta / timeUnitSize.year) / Math.LN10));\n\t\t\t\t\t\t\t\tvar norm = (axis.delta / timeUnitSize.year) / magn;\n\n\t\t\t\t\t\t\t\tif (norm < 1.5) {\n\t\t\t\t\t\t\t\t\tsize = 1;\n\t\t\t\t\t\t\t\t} else if (norm < 3) {\n\t\t\t\t\t\t\t\t\tsize = 2;\n\t\t\t\t\t\t\t\t} else if (norm < 7.5) {\n\t\t\t\t\t\t\t\t\tsize = 5;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsize = 10;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsize *= magn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// minimum size for years is 1\n\n\t\t\t\t\t\t\tif (size < 1) {\n\t\t\t\t\t\t\t\tsize = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taxis.tickSize = opts.tickSize || [size, unit];\n\t\t\t\t\t\tvar tickSize = axis.tickSize[0];\n\t\t\t\t\t\tunit = axis.tickSize[1];\n\n\t\t\t\t\t\tvar step = tickSize * timeUnitSize[unit];\n\n\t\t\t\t\t\tif (unit == \"second\") {\n\t\t\t\t\t\t\td.setSeconds(floorInBase(d.getSeconds(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"minute\") {\n\t\t\t\t\t\t\td.setMinutes(floorInBase(d.getMinutes(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"hour\") {\n\t\t\t\t\t\t\td.setHours(floorInBase(d.getHours(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"month\") {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), tickSize));\n\t\t\t\t\t\t} else if (unit == \"quarter\") {\n\t\t\t\t\t\t\td.setMonth(3 * floorInBase(d.getMonth() / 3,\n\t\t\t\t\t\t\t\ttickSize));\n\t\t\t\t\t\t} else if (unit == \"year\") {\n\t\t\t\t\t\t\td.setFullYear(floorInBase(d.getFullYear(), tickSize));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// reset smaller components\n\n\t\t\t\t\t\td.setMilliseconds(0);\n\n\t\t\t\t\t\tif (step >= timeUnitSize.minute) {\n\t\t\t\t\t\t\td.setSeconds(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.hour) {\n\t\t\t\t\t\t\td.setMinutes(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.day) {\n\t\t\t\t\t\t\td.setHours(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.day * 4) {\n\t\t\t\t\t\t\td.setDate(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.month * 2) {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), 3));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.quarter * 2) {\n\t\t\t\t\t\t\td.setMonth(floorInBase(d.getMonth(), 6));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (step >= timeUnitSize.year) {\n\t\t\t\t\t\t\td.setMonth(0);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar carry = 0;\n\t\t\t\t\t\tvar v = Number.NaN;\n\t\t\t\t\t\tvar prev;\n\n\t\t\t\t\t\tdo {\n\n\t\t\t\t\t\t\tprev = v;\n\t\t\t\t\t\t\tv = d.getTime();\n\t\t\t\t\t\t\tticks.push(v);\n\n\t\t\t\t\t\t\tif (unit == \"month\" || unit == \"quarter\") {\n\t\t\t\t\t\t\t\tif (tickSize < 1) {\n\n\t\t\t\t\t\t\t\t\t// a bit complicated - we'll divide the\n\t\t\t\t\t\t\t\t\t// month/quarter up but we need to take\n\t\t\t\t\t\t\t\t\t// care of fractions so we don't end up in\n\t\t\t\t\t\t\t\t\t// the middle of a day\n\n\t\t\t\t\t\t\t\t\td.setDate(1);\n\t\t\t\t\t\t\t\t\tvar start = d.getTime();\n\t\t\t\t\t\t\t\t\td.setMonth(d.getMonth() +\n\t\t\t\t\t\t\t\t\t\t(unit == \"quarter\" ? 3 : 1));\n\t\t\t\t\t\t\t\t\tvar end = d.getTime();\n\t\t\t\t\t\t\t\t\td.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize);\n\t\t\t\t\t\t\t\t\tcarry = d.getHours();\n\t\t\t\t\t\t\t\t\td.setHours(0);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\td.setMonth(d.getMonth() +\n\t\t\t\t\t\t\t\t\t\ttickSize * (unit == \"quarter\" ? 3 : 1));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (unit == \"year\") {\n\t\t\t\t\t\t\t\td.setFullYear(d.getFullYear() + tickSize);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\td.setTime(v + step);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (v < axis.max && v != prev);\n\n\t\t\t\t\t\treturn ticks;\n\t\t\t\t\t};\n\n\t\t\t\t\taxis.tickFormatter = function (v, axis) {\n\n\t\t\t\t\t\tvar d = dateGenerator(v, axis.options);\n\n\t\t\t\t\t\t// first check global format\n\n\t\t\t\t\t\tif (opts.timeformat != null) {\n\t\t\t\t\t\t\treturn formatDate(d, opts.timeformat, opts.monthNames, opts.dayNames);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// possibly use quarters if quarters are mentioned in\n\t\t\t\t\t\t// any of these places\n\n\t\t\t\t\t\tvar useQuarters = (axis.options.tickSize &&\n\t\t\t\t\t\t\t\taxis.options.tickSize[1] == \"quarter\") ||\n\t\t\t\t\t\t\t(axis.options.minTickSize &&\n\t\t\t\t\t\t\t\taxis.options.minTickSize[1] == \"quarter\");\n\n\t\t\t\t\t\tvar t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];\n\t\t\t\t\t\tvar span = axis.max - axis.min;\n\t\t\t\t\t\tvar suffix = (opts.twelveHourClock) ? \" %p\" : \"\";\n\t\t\t\t\t\tvar hourCode = (opts.twelveHourClock) ? \"%I\" : \"%H\";\n\t\t\t\t\t\tvar fmt;\n\n\t\t\t\t\t\tif (t < timeUnitSize.minute) {\n\t\t\t\t\t\t\tfmt = hourCode + \":%M:%S\" + suffix;\n\t\t\t\t\t\t} else if (t < timeUnitSize.day) {\n\t\t\t\t\t\t\tif (span < 2 * timeUnitSize.day) {\n\t\t\t\t\t\t\t\tfmt = hourCode + \":%M\" + suffix;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"%b %d \" + hourCode + \":%M\" + suffix;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (t < timeUnitSize.month) {\n\t\t\t\t\t\t\tfmt = \"%b %d\";\n\t\t\t\t\t\t} else if ((useQuarters && t < timeUnitSize.quarter) ||\n\t\t\t\t\t\t\t(!useQuarters && t < timeUnitSize.year)) {\n\t\t\t\t\t\t\tif (span < timeUnitSize.year) {\n\t\t\t\t\t\t\t\tfmt = \"%b\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"%b %Y\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (useQuarters && t < timeUnitSize.year) {\n\t\t\t\t\t\t\tif (span < timeUnitSize.year) {\n\t\t\t\t\t\t\t\tfmt = \"Q%q\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfmt = \"Q%q %Y\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfmt = \"%Y\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar rt = formatDate(d, fmt, opts.monthNames, opts.dayNames);\n\n\t\t\t\t\t\treturn rt;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t$.plot.plugins.push({\n\t\tinit: init,\n\t\toptions: options,\n\t\tname: 'time',\n\t\tversion: '1.0'\n\t});\n\n\t// Time-axis support used to be in Flot core, which exposed the\n\t// formatDate function on the plot object. Various plugins depend\n\t// on the function, so we need to re-expose it here.\n\n\t$.plot.formatDate = formatDate;\n\n})(jQuery);\n","module.exports = __WEBPACK_EXTERNAL_MODULE_angular__;","module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_config__;","module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_core_module__;","module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_time_series2__;","module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_utils_kbn__;","module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_core_utils_ticks__;","module.exports = __WEBPACK_EXTERNAL_MODULE_grafana_app_plugins_sdk__;","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;","module.exports = __WEBPACK_EXTERNAL_MODULE_lodash__;","module.exports = __WEBPACK_EXTERNAL_MODULE_moment__;"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/partials/axes_editor.html b/dist/partials/axes_editor.html new file mode 100644 index 0000000..b992cfb --- /dev/null +++ b/dist/partials/axes_editor.html @@ -0,0 +1,72 @@ +
+
+ +
Left Y
+
Right Y
+ + + +
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+ + +
+
+ + +
+
+
+ + +
+ +
+ + +
+
+
+ +
+
X-Axis
+ + +
+ +
+ +
+
+ + +
+ + +
+ + +
+ + +
+ +
+ +
diff --git a/dist/partials/tab_analytics.html b/dist/partials/tab_analytics.html new file mode 100644 index 0000000..1d2e508 --- /dev/null +++ b/dist/partials/tab_analytics.html @@ -0,0 +1,148 @@ +
Analytic Units
+
+
+ + + + + +
+ + + +
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
+
+
Hover tooltip
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
Stacking & Null value
+ + + + +
+ +
+ +
+
+
+
+ +
+
+
Series specific overrides Regex match example: /server[0-3]/i
+
+
+ +
+
+ +
+
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+
+
+ + +
+ +
+ +
+ +
diff --git a/dist/partials/tab_legend.html b/dist/partials/tab_legend.html new file mode 100644 index 0000000..82e1335 --- /dev/null +++ b/dist/partials/tab_legend.html @@ -0,0 +1,73 @@ +
+
+
Options
+ + + + + + +
+ + +
+
+ +
+
Values
+ +
+ + + + + +
+ +
+ + + + + +
+ +
+ + + +
+ + +
+
+
+ +
+
Hide series
+ + + + +
+
diff --git a/dist/plugin.json b/dist/plugin.json new file mode 100644 index 0000000..ceeb1c9 --- /dev/null +++ b/dist/plugin.json @@ -0,0 +1,21 @@ +{ + "type": "panel", + "name": "Hastic Graph", + "id": "hastic-graph-panel", + + "info": { + "author": { + "name": "Hastic.Core Team", + "url": "https://github.com/hastic/hastic-grafana-graph-panel" + }, + "logos": { + "small": "img/icn-graph-panel.svg", + "large": "img/icn-graph-panel.svg" + } + }, + + "dependencies": { + "grafanaVersion": "5.1.x" + } +} +