").text(row.label);
- content = content.prop('outerHTML');
- _ref = row.y;
- for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
- y = _ref[j];
- if (this.options.labels[j] === false) {
- continue;
- }
- content += "
\n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y, j)) + "\n
";
- }
- if (typeof this.options.hoverCallback === 'function') {
- content = this.options.hoverCallback(index, this.options, content, row.src);
- }
- return [content, row._x, row._ymax];
- };
-
- Line.prototype.generatePaths = function() {
- var coords, i, r, smooth;
- return this.paths = (function() {
- var _i, _ref, _ref1, _results;
- _results = [];
- for (i = _i = 0, _ref = this.options.ykeys.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
- smooth = typeof this.options.smooth === "boolean" ? this.options.smooth : (_ref1 = this.options.ykeys[i], __indexOf.call(this.options.smooth, _ref1) >= 0);
- coords = (function() {
- var _j, _len, _ref2, _results1;
- _ref2 = this.data;
- _results1 = [];
- for (_j = 0, _len = _ref2.length; _j < _len; _j++) {
- r = _ref2[_j];
- if (r._y[i] !== void 0) {
- _results1.push({
- x: r._x,
- y: r._y[i]
- });
- }
- }
- return _results1;
- }).call(this);
- if (coords.length > 1) {
- _results.push(Morris.Line.createPath(coords, smooth, this.bottom));
- } else {
- _results.push(null);
- }
- }
- return _results;
- }).call(this);
- };
-
- Line.prototype.draw = function() {
- var _ref;
- if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
- this.drawXAxis();
- }
- this.drawSeries();
- if (this.options.hideHover === false) {
- return this.displayHoverForRow(this.data.length - 1);
- }
- };
-
- Line.prototype.drawXAxis = function() {
- var drawLabel, l, labels, prevAngleMargin, prevLabelMargin, row, ypos, _i, _len, _results,
- _this = this;
- ypos = this.bottom + this.options.padding / 2;
- prevLabelMargin = null;
- prevAngleMargin = null;
- drawLabel = function(labelText, xpos) {
- var label, labelBox, margin, offset, textBox;
- label = _this.drawXAxisLabel(_this.transX(xpos), ypos, labelText);
- textBox = label.getBBox();
- label.transform("r" + (-_this.options.xLabelAngle));
- labelBox = label.getBBox();
- label.transform("t0," + (labelBox.height / 2) + "...");
- if (_this.options.xLabelAngle !== 0) {
- offset = -0.5 * textBox.width * Math.cos(_this.options.xLabelAngle * Math.PI / 180.0);
- label.transform("t" + offset + ",0...");
- }
- labelBox = label.getBBox();
- if (((prevLabelMargin == null) || prevLabelMargin >= labelBox.x + labelBox.width || (prevAngleMargin != null) && prevAngleMargin >= labelBox.x) && labelBox.x >= 0 && (labelBox.x + labelBox.width) < _this.el.width()) {
- if (_this.options.xLabelAngle !== 0) {
- margin = 1.25 * _this.options.gridTextSize / Math.sin(_this.options.xLabelAngle * Math.PI / 180.0);
- prevAngleMargin = labelBox.x - margin;
- }
- return prevLabelMargin = labelBox.x - _this.options.xLabelMargin;
- } else {
- return label.remove();
- }
- };
- if (this.options.parseTime) {
- if (this.data.length === 1 && this.options.xLabels === 'auto') {
- labels = [[this.data[0].label, this.data[0].x]];
- } else {
- labels = Morris.labelSeries(this.xmin, this.xmax, this.width, this.options.xLabels, this.options.xLabelFormat);
- }
- } else {
- labels = (function() {
- var _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- _results.push([row.label, row.x]);
- }
- return _results;
- }).call(this);
- }
- labels.reverse();
- _results = [];
- for (_i = 0, _len = labels.length; _i < _len; _i++) {
- l = labels[_i];
- _results.push(drawLabel(l[0], l[1]));
- }
- return _results;
- };
-
- Line.prototype.drawSeries = function() {
- var i, _i, _j, _ref, _ref1, _results;
- this.seriesPoints = [];
- for (i = _i = _ref = this.options.ykeys.length - 1; _ref <= 0 ? _i <= 0 : _i >= 0; i = _ref <= 0 ? ++_i : --_i) {
- if (this.hasToShow(i)) {
- if (this.options.trendLine !== false && this.options.trendLine === true || this.options.trendLine[i] === true) {
- this._drawTrendLine(i);
- }
- this._drawLineFor(i);
- }
- }
- _results = [];
- for (i = _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; i = _ref1 <= 0 ? ++_j : --_j) {
- if (this.hasToShow(i)) {
- _results.push(this._drawPointFor(i));
- } else {
- _results.push(void 0);
- }
- }
- return _results;
- };
-
- Line.prototype._drawPointFor = function(index) {
- var circle, row, _i, _len, _ref, _results;
- this.seriesPoints[index] = [];
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- circle = null;
- if (row._y[index] != null) {
- circle = this.drawLinePoint(row._x, row._y[index], this.colorFor(row, index, 'point'), index);
- }
- _results.push(this.seriesPoints[index].push(circle));
- }
- return _results;
- };
-
- Line.prototype._drawLineFor = function(index) {
- var path;
- path = this.paths[index];
- if (path !== null) {
- return this.drawLinePath(path, this.colorFor(null, index, 'line'), index);
- }
- };
-
- Line.prototype._drawTrendLine = function(index) {
- var a, b, data, datapoints, path, sum_x, sum_xx, sum_xy, sum_y, val, x, y, _i, _len, _ref;
- sum_x = 0;
- sum_y = 0;
- sum_xx = 0;
- sum_xy = 0;
- datapoints = 0;
- _ref = this.data;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- val = _ref[_i];
- x = val.x;
- y = val.y[index];
- if (y === void 0) {
- continue;
- }
- datapoints += 1;
- sum_x += x;
- sum_y += y;
- sum_xx += x * x;
- sum_xy += x * y;
- }
- a = (datapoints * sum_xy - sum_x * sum_y) / (datapoints * sum_xx - sum_x * sum_x);
- b = (sum_y / datapoints) - ((a * sum_x) / datapoints);
- data = [{}, {}];
- data[0].x = this.transX(this.data[0].x);
- data[0].y = this.transY(this.data[0].x * a + b);
- data[1].x = this.transX(this.data[this.data.length - 1].x);
- data[1].y = this.transY(this.data[this.data.length - 1].x * a + b);
- path = Morris.Line.createPath(data, false, this.bottom);
- return path = this.raphael.path(path).attr('stroke', this.colorFor(null, index, 'trendLine')).attr('stroke-width', this.options.trendLineWidth);
- };
-
- Line.createPath = function(coords, smooth, bottom) {
- var coord, g, grads, i, ix, lg, path, prevCoord, x1, x2, y1, y2, _i, _len;
- path = "";
- if (smooth) {
- grads = Morris.Line.gradients(coords);
- }
- prevCoord = {
- y: null
- };
- for (i = _i = 0, _len = coords.length; _i < _len; i = ++_i) {
- coord = coords[i];
- if (coord.y != null) {
- if (prevCoord.y != null) {
- if (smooth) {
- g = grads[i];
- lg = grads[i - 1];
- ix = (coord.x - prevCoord.x) / 4;
- x1 = prevCoord.x + ix;
- y1 = Math.min(bottom, prevCoord.y + ix * lg);
- x2 = coord.x - ix;
- y2 = Math.min(bottom, coord.y - ix * g);
- path += "C" + x1 + "," + y1 + "," + x2 + "," + y2 + "," + coord.x + "," + coord.y;
- } else {
- path += "L" + coord.x + "," + coord.y;
- }
- } else {
- if (!smooth || (grads[i] != null)) {
- path += "M" + coord.x + "," + coord.y;
- }
- }
- }
- prevCoord = coord;
- }
- return path;
- };
-
- Line.gradients = function(coords) {
- var coord, grad, i, nextCoord, prevCoord, _i, _len, _results;
- grad = function(a, b) {
- return (a.y - b.y) / (a.x - b.x);
- };
- _results = [];
- for (i = _i = 0, _len = coords.length; _i < _len; i = ++_i) {
- coord = coords[i];
- if (coord.y != null) {
- nextCoord = coords[i + 1] || {
- y: null
- };
- prevCoord = coords[i - 1] || {
- y: null
- };
- if ((prevCoord.y != null) && (nextCoord.y != null)) {
- _results.push(grad(prevCoord, nextCoord));
- } else if (prevCoord.y != null) {
- _results.push(grad(prevCoord, coord));
- } else if (nextCoord.y != null) {
- _results.push(grad(coord, nextCoord));
- } else {
- _results.push(null);
- }
- } else {
- _results.push(null);
- }
- }
- return _results;
- };
-
- Line.prototype.hilight = function(index) {
- var i, _i, _j, _ref, _ref1;
- if (this.prevHilight !== null && this.prevHilight !== index) {
- for (i = _i = 0, _ref = this.seriesPoints.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
- if (this.seriesPoints[i][this.prevHilight]) {
- this.seriesPoints[i][this.prevHilight].animate(this.pointShrinkSeries(i));
- }
- }
- }
- if (index !== null && this.prevHilight !== index) {
- for (i = _j = 0, _ref1 = this.seriesPoints.length - 1; 0 <= _ref1 ? _j <= _ref1 : _j >= _ref1; i = 0 <= _ref1 ? ++_j : --_j) {
- if (this.seriesPoints[i][index]) {
- this.seriesPoints[i][index].animate(this.pointGrowSeries(i));
- }
- }
- }
- return this.prevHilight = index;
- };
-
- Line.prototype.colorFor = function(row, sidx, type) {
- if (typeof this.options.lineColors === 'function') {
- return this.options.lineColors.call(this, row, sidx, type);
- } else if (type === 'point') {
- return this.options.pointFillColors[sidx % this.options.pointFillColors.length] || this.options.lineColors[sidx % this.options.lineColors.length];
- } else if (type === 'line') {
- return this.options.lineColors[sidx % this.options.lineColors.length];
- } else {
- return this.options.trendLineColors[sidx % this.options.trendLineColors.length];
- }
- };
-
- Line.prototype.drawXAxisLabel = function(xPos, yPos, text) {
- return this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
- };
-
- Line.prototype.drawLinePath = function(path, lineColor, lineIndex) {
- return this.raphael.path(path).attr('stroke', lineColor).attr('stroke-width', this.lineWidthForSeries(lineIndex));
- };
-
- Line.prototype.drawLinePoint = function(xPos, yPos, pointColor, lineIndex) {
- return this.raphael.circle(xPos, yPos, this.pointSizeForSeries(lineIndex)).attr('fill', pointColor).attr('stroke-width', this.pointStrokeWidthForSeries(lineIndex)).attr('stroke', this.pointStrokeColorForSeries(lineIndex));
- };
-
- Line.prototype.pointStrokeWidthForSeries = function(index) {
- return this.options.pointStrokeWidths[index % this.options.pointStrokeWidths.length];
- };
-
- Line.prototype.pointStrokeColorForSeries = function(index) {
- return this.options.pointStrokeColors[index % this.options.pointStrokeColors.length];
- };
-
- Line.prototype.lineWidthForSeries = function(index) {
- if (this.options.lineWidth instanceof Array) {
- return this.options.lineWidth[index % this.options.lineWidth.length];
- } else {
- return this.options.lineWidth;
- }
- };
-
- Line.prototype.pointSizeForSeries = function(index) {
- if (this.options.pointSize instanceof Array) {
- return this.options.pointSize[index % this.options.pointSize.length];
- } else {
- return this.options.pointSize;
- }
- };
-
- Line.prototype.pointGrowSeries = function(index) {
- if (this.pointSizeForSeries(index) === 0) {
- return;
- }
- return Raphael.animation({
- r: this.pointSizeForSeries(index) + 3
- }, 25, 'linear');
- };
-
- Line.prototype.pointShrinkSeries = function(index) {
- return Raphael.animation({
- r: this.pointSizeForSeries(index)
- }, 25, 'linear');
- };
-
- return Line;
-
- })(Morris.Grid);
-
- Morris.labelSeries = function(dmin, dmax, pxwidth, specName, xLabelFormat) {
- var d, d0, ddensity, name, ret, s, spec, t, _i, _len, _ref;
- ddensity = 200 * (dmax - dmin) / pxwidth;
- d0 = new Date(dmin);
- spec = Morris.LABEL_SPECS[specName];
- if (spec === void 0) {
- _ref = Morris.AUTO_LABEL_ORDER;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- name = _ref[_i];
- s = Morris.LABEL_SPECS[name];
- if (ddensity >= s.span) {
- spec = s;
- break;
- }
- }
- }
- if (spec === void 0) {
- spec = Morris.LABEL_SPECS["second"];
- }
- if (xLabelFormat) {
- spec = $.extend({}, spec, {
- fmt: xLabelFormat
- });
- }
- d = spec.start(d0);
- ret = [];
- while ((t = d.getTime()) <= dmax) {
- if (t >= dmin) {
- ret.push([spec.fmt(d), t]);
- }
- spec.incr(d);
- }
- return ret;
- };
-
- minutesSpecHelper = function(interval) {
- return {
- span: interval * 60 * 1000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours());
- },
- fmt: function(d) {
- return "" + (Morris.pad2(d.getHours())) + ":" + (Morris.pad2(d.getMinutes()));
- },
- incr: function(d) {
- return d.setUTCMinutes(d.getUTCMinutes() + interval);
- }
- };
- };
-
- secondsSpecHelper = function(interval) {
- return {
- span: interval * 1000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes());
- },
- fmt: function(d) {
- return "" + (Morris.pad2(d.getHours())) + ":" + (Morris.pad2(d.getMinutes())) + ":" + (Morris.pad2(d.getSeconds()));
- },
- incr: function(d) {
- return d.setUTCSeconds(d.getUTCSeconds() + interval);
- }
- };
- };
-
- Morris.LABEL_SPECS = {
- "decade": {
- span: 172800000000,
- start: function(d) {
- return new Date(d.getFullYear() - d.getFullYear() % 10, 0, 1);
- },
- fmt: function(d) {
- return "" + (d.getFullYear());
- },
- incr: function(d) {
- return d.setFullYear(d.getFullYear() + 10);
- }
- },
- "year": {
- span: 17280000000,
- start: function(d) {
- return new Date(d.getFullYear(), 0, 1);
- },
- fmt: function(d) {
- return "" + (d.getFullYear());
- },
- incr: function(d) {
- return d.setFullYear(d.getFullYear() + 1);
- }
- },
- "month": {
- span: 2419200000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), 1);
- },
- fmt: function(d) {
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1));
- },
- incr: function(d) {
- return d.setMonth(d.getMonth() + 1);
- }
- },
- "week": {
- span: 604800000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), d.getDate());
- },
- fmt: function(d) {
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)) + "-" + (Morris.pad2(d.getDate()));
- },
- incr: function(d) {
- return d.setDate(d.getDate() + 7);
- }
- },
- "day": {
- span: 86400000,
- start: function(d) {
- return new Date(d.getFullYear(), d.getMonth(), d.getDate());
- },
- fmt: function(d) {
- return "" + (d.getFullYear()) + "-" + (Morris.pad2(d.getMonth() + 1)) + "-" + (Morris.pad2(d.getDate()));
- },
- incr: function(d) {
- return d.setDate(d.getDate() + 1);
- }
- },
- "hour": minutesSpecHelper(60),
- "30min": minutesSpecHelper(30),
- "15min": minutesSpecHelper(15),
- "10min": minutesSpecHelper(10),
- "5min": minutesSpecHelper(5),
- "minute": minutesSpecHelper(1),
- "30sec": secondsSpecHelper(30),
- "15sec": secondsSpecHelper(15),
- "10sec": secondsSpecHelper(10),
- "5sec": secondsSpecHelper(5),
- "second": secondsSpecHelper(1)
- };
-
- Morris.AUTO_LABEL_ORDER = ["decade", "year", "month", "week", "day", "hour", "30min", "15min", "10min", "5min", "minute", "30sec", "15sec", "10sec", "5sec", "second"];
-
- Morris.Area = (function(_super) {
- var areaDefaults;
-
- __extends(Area, _super);
-
- areaDefaults = {
- fillOpacity: 'auto',
- behaveLikeLine: false
- };
-
- function Area(options) {
- var areaOptions;
- if (!(this instanceof Morris.Area)) {
- return new Morris.Area(options);
- }
- areaOptions = $.extend({}, areaDefaults, options);
- this.cumulative = !areaOptions.behaveLikeLine;
- if (areaOptions.fillOpacity === 'auto') {
- areaOptions.fillOpacity = areaOptions.behaveLikeLine ? .8 : 1;
- }
- Area.__super__.constructor.call(this, areaOptions);
- }
-
- Area.prototype.calcPoints = function() {
- var row, total, y, _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- row._x = this.transX(row.x);
- total = 0;
- row._y = (function() {
- var _j, _len1, _ref1, _results1;
- _ref1 = row.y;
- _results1 = [];
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- y = _ref1[_j];
- if (this.options.behaveLikeLine) {
- _results1.push(this.transY(y));
- } else {
- total += y || 0;
- _results1.push(this.transY(total));
- }
- }
- return _results1;
- }).call(this);
- _results.push(row._ymax = Math.max.apply(Math, row._y));
- }
- return _results;
- };
-
- Area.prototype.drawSeries = function() {
- var i, range, _i, _j, _k, _len, _ref, _ref1, _results, _results1, _results2;
- this.seriesPoints = [];
- if (this.options.behaveLikeLine) {
- range = (function() {
- _results = [];
- for (var _i = 0, _ref = this.options.ykeys.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; 0 <= _ref ? _i++ : _i--){ _results.push(_i); }
- return _results;
- }).apply(this);
- } else {
- range = (function() {
- _results1 = [];
- for (var _j = _ref1 = this.options.ykeys.length - 1; _ref1 <= 0 ? _j <= 0 : _j >= 0; _ref1 <= 0 ? _j++ : _j--){ _results1.push(_j); }
- return _results1;
- }).apply(this);
- }
- _results2 = [];
- for (_k = 0, _len = range.length; _k < _len; _k++) {
- i = range[_k];
- this._drawFillFor(i);
- this._drawLineFor(i);
- _results2.push(this._drawPointFor(i));
- }
- return _results2;
- };
-
- Area.prototype._drawFillFor = function(index) {
- var path;
- path = this.paths[index];
- if (path !== null) {
- path = path + ("L" + (this.transX(this.xmax)) + "," + this.bottom + "L" + (this.transX(this.xmin)) + "," + this.bottom + "Z");
- return this.drawFilledPath(path, this.fillForSeries(index));
- }
- };
-
- Area.prototype.fillForSeries = function(i) {
- var color;
- color = Raphael.rgb2hsl(this.colorFor(this.data[i], i, 'line'));
- return Raphael.hsl(color.h, this.options.behaveLikeLine ? color.s * 0.9 : color.s * 0.75, Math.min(0.98, this.options.behaveLikeLine ? color.l * 1.2 : color.l * 1.25));
- };
-
- Area.prototype.drawFilledPath = function(path, fill) {
- return this.raphael.path(path).attr('fill', fill).attr('fill-opacity', this.options.fillOpacity).attr('stroke', 'none');
- };
-
- return Area;
-
- })(Morris.Line);
-
- Morris.Bar = (function(_super) {
- __extends(Bar, _super);
-
- function Bar(options) {
- this.onHoverOut = __bind(this.onHoverOut, this);
- this.onHoverMove = __bind(this.onHoverMove, this);
- this.onGridClick = __bind(this.onGridClick, this);
- if (!(this instanceof Morris.Bar)) {
- return new Morris.Bar(options);
- }
- Bar.__super__.constructor.call(this, $.extend({}, options, {
- parseTime: false
- }));
- }
-
- Bar.prototype.init = function() {
- this.cumulative = this.options.stacked;
- if (this.options.hideHover !== 'always') {
- this.hover = new Morris.Hover({
- parent: this.el
- });
- this.on('hovermove', this.onHoverMove);
- this.on('hoverout', this.onHoverOut);
- return this.on('gridclick', this.onGridClick);
- }
- };
-
- Bar.prototype.defaults = {
- barSizeRatio: 0.75,
- barGap: 3,
- barColors: ['#0b62a4', '#7a92a3', '#4da74d', '#afd8f8', '#edc240', '#cb4b4b', '#9440ed'],
- barOpacity: 1.0,
- barRadius: [0, 0, 0, 0],
- xLabelMargin: 50,
- horizontal: false,
- shown: true
- };
-
- Bar.prototype.calc = function() {
- var _ref;
- this.calcBars();
- if (this.options.hideHover === false) {
- return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(this.data.length - 1));
- }
- };
-
- Bar.prototype.calcBars = function() {
- var idx, row, y, _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (idx = _i = 0, _len = _ref.length; _i < _len; idx = ++_i) {
- row = _ref[idx];
- row._x = this.xStart + this.xSize * (idx + 0.5) / this.data.length;
- _results.push(row._y = (function() {
- var _j, _len1, _ref1, _results1;
- _ref1 = row.y;
- _results1 = [];
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- y = _ref1[_j];
- if (y != null) {
- _results1.push(this.transY(y));
- } else {
- _results1.push(null);
- }
- }
- return _results1;
- }).call(this));
- }
- return _results;
- };
-
- Bar.prototype.draw = function() {
- var _ref;
- if ((_ref = this.options.axes) === true || _ref === 'both' || _ref === 'x') {
- this.drawXAxis();
- }
- return this.drawSeries();
- };
-
- Bar.prototype.drawXAxis = function() {
- var angle, basePos, i, label, labelBox, margin, maxSize, offset, prevAngleMargin, prevLabelMargin, row, size, startPos, textBox, _i, _ref, _results;
- if (!this.options.horizontal) {
- basePos = this.getXAxisLabelY();
- } else {
- basePos = this.getYAxisLabelX();
- }
- prevLabelMargin = null;
- prevAngleMargin = null;
- _results = [];
- for (i = _i = 0, _ref = this.data.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
- row = this.data[this.data.length - 1 - i];
- if (!this.options.horizontal) {
- label = this.drawXAxisLabel(row._x, basePos, row.label);
- } else {
- label = this.drawYAxisLabel(basePos, row._x - 0.5 * this.options.gridTextSize, row.label);
- }
- if (!this.options.horizontal) {
- angle = this.options.xLabelAngle;
- } else {
- angle = 0;
- }
- textBox = label.getBBox();
- label.transform("r" + (-angle));
- labelBox = label.getBBox();
- label.transform("t0," + (labelBox.height / 2) + "...");
- if (angle !== 0) {
- offset = -0.5 * textBox.width * Math.cos(angle * Math.PI / 180.0);
- label.transform("t" + offset + ",0...");
- }
- if (!this.options.horizontal) {
- startPos = labelBox.x;
- size = labelBox.width;
- maxSize = this.el.width();
- } else {
- startPos = labelBox.y;
- size = labelBox.height;
- maxSize = this.el.height();
- }
- if (((prevLabelMargin == null) || prevLabelMargin >= startPos + size || (prevAngleMargin != null) && prevAngleMargin >= startPos) && startPos >= 0 && (startPos + size) < maxSize) {
- if (angle !== 0) {
- margin = 1.25 * this.options.gridTextSize / Math.sin(angle * Math.PI / 180.0);
- prevAngleMargin = startPos - margin;
- }
- if (!this.options.horizontal) {
- _results.push(prevLabelMargin = startPos - this.options.xLabelMargin);
- } else {
- _results.push(prevLabelMargin = startPos);
- }
- } else {
- _results.push(label.remove());
- }
- }
- return _results;
- };
-
- Bar.prototype.getXAxisLabelY = function() {
- return this.bottom + (this.options.xAxisLabelTopPadding || this.options.padding / 2);
- };
-
- Bar.prototype.drawSeries = function() {
- var barWidth, bottom, groupWidth, i, idx, lastTop, left, leftPadding, numBars, row, sidx, size, spaceLeft, top, ypos, zeroPos, _i, _ref;
- groupWidth = this.xSize / this.options.data.length;
- if (this.options.stacked) {
- numBars = 1;
- } else {
- numBars = 0;
- for (i = _i = 0, _ref = this.options.ykeys.length - 1; 0 <= _ref ? _i <= _ref : _i >= _ref; i = 0 <= _ref ? ++_i : --_i) {
- if (this.hasToShow(i)) {
- numBars += 1;
- }
- }
- }
- barWidth = (groupWidth * this.options.barSizeRatio - this.options.barGap * (numBars - 1)) / numBars;
- if (this.options.barSize) {
- barWidth = Math.min(barWidth, this.options.barSize);
- }
- spaceLeft = groupWidth - barWidth * numBars - this.options.barGap * (numBars - 1);
- leftPadding = spaceLeft / 2;
- zeroPos = this.ymin <= 0 && this.ymax >= 0 ? this.transY(0) : null;
- return this.bars = (function() {
- var _j, _len, _ref1, _results;
- _ref1 = this.data;
- _results = [];
- for (idx = _j = 0, _len = _ref1.length; _j < _len; idx = ++_j) {
- row = _ref1[idx];
- lastTop = 0;
- _results.push((function() {
- var _k, _len1, _ref2, _results1;
- _ref2 = row._y;
- _results1 = [];
- for (sidx = _k = 0, _len1 = _ref2.length; _k < _len1; sidx = ++_k) {
- ypos = _ref2[sidx];
- if (!this.hasToShow(sidx)) {
- continue;
- }
- if (ypos !== null) {
- if (zeroPos) {
- top = Math.min(ypos, zeroPos);
- bottom = Math.max(ypos, zeroPos);
- } else {
- top = ypos;
- bottom = this.bottom;
- }
- left = this.xStart + idx * groupWidth + leftPadding;
- if (!this.options.stacked) {
- left += sidx * (barWidth + this.options.barGap);
- }
- size = bottom - top;
- if (this.options.verticalGridCondition && this.options.verticalGridCondition(row.x)) {
- if (!this.options.horizontal) {
- this.drawBar(this.xStart + idx * groupWidth, this.yEnd, groupWidth, this.ySize, this.options.verticalGridColor, this.options.verticalGridOpacity, this.options.barRadius);
- } else {
- this.drawBar(this.yStart, this.xStart + idx * groupWidth, this.ySize, groupWidth, this.options.verticalGridColor, this.options.verticalGridOpacity, this.options.barRadius);
- }
- }
- if (this.options.stacked) {
- top -= lastTop;
- }
- if (!this.options.horizontal) {
- this.drawBar(left, top, barWidth, size, this.colorFor(row, sidx, 'bar'), this.options.barOpacity, this.options.barRadius);
- _results1.push(lastTop += size);
- } else {
- this.drawBar(top, left, size, barWidth, this.colorFor(row, sidx, 'bar'), this.options.barOpacity, this.options.barRadius);
- _results1.push(lastTop -= size);
- }
- } else {
- _results1.push(null);
- }
- }
- return _results1;
- }).call(this));
- }
- return _results;
- }).call(this);
- };
-
- Bar.prototype.colorFor = function(row, sidx, type) {
- var r, s;
- if (typeof this.options.barColors === 'function') {
- r = {
- x: row.x,
- y: row.y[sidx],
- label: row.label
- };
- s = {
- index: sidx,
- key: this.options.ykeys[sidx],
- label: this.options.labels[sidx]
- };
- return this.options.barColors.call(this, r, s, type);
- } else {
- return this.options.barColors[sidx % this.options.barColors.length];
- }
- };
-
- Bar.prototype.hitTest = function(x, y) {
- var pos;
- if (this.data.length === 0) {
- return null;
- }
- if (!this.options.horizontal) {
- pos = x;
- } else {
- pos = y;
- }
- pos = Math.max(Math.min(pos, this.xEnd), this.xStart);
- return Math.min(this.data.length - 1, Math.floor((pos - this.xStart) / (this.xSize / this.data.length)));
- };
-
- Bar.prototype.onGridClick = function(x, y) {
- var index;
- index = this.hitTest(x, y);
- return this.fire('click', index, this.data[index].src, x, y);
- };
-
- Bar.prototype.onHoverMove = function(x, y) {
- var index, _ref;
- index = this.hitTest(x, y);
- return (_ref = this.hover).update.apply(_ref, this.hoverContentForRow(index));
- };
-
- Bar.prototype.onHoverOut = function() {
- if (this.options.hideHover !== false) {
- return this.hover.hide();
- }
- };
-
- Bar.prototype.hoverContentForRow = function(index) {
- var content, j, row, x, y, _i, _len, _ref;
- row = this.data[index];
- content = $("
").text(row.label);
- content = content.prop('outerHTML');
- _ref = row.y;
- for (j = _i = 0, _len = _ref.length; _i < _len; j = ++_i) {
- y = _ref[j];
- if (this.options.labels[j] === false) {
- continue;
- }
- content += "
\n " + this.options.labels[j] + ":\n " + (this.yLabelFormat(y, j)) + "\n
";
- }
- if (typeof this.options.hoverCallback === 'function') {
- content = this.options.hoverCallback(index, this.options, content, row.src);
- }
- if (!this.options.horizontal) {
- x = this.left + (index + 0.5) * this.width / this.data.length;
- return [content, x];
- } else {
- x = this.left + 0.5 * this.width;
- y = this.top + (index + 0.5) * this.height / this.data.length;
- return [content, x, y, true];
- }
- };
-
- Bar.prototype.drawXAxisLabel = function(xPos, yPos, text) {
- var label;
- return label = this.raphael.text(xPos, yPos, text).attr('font-size', this.options.gridTextSize).attr('font-family', this.options.gridTextFamily).attr('font-weight', this.options.gridTextWeight).attr('fill', this.options.gridTextColor);
- };
-
- Bar.prototype.drawBar = function(xPos, yPos, width, height, barColor, opacity, radiusArray) {
- var maxRadius, path;
- maxRadius = Math.max.apply(Math, radiusArray);
- if (maxRadius === 0 || maxRadius > height) {
- path = this.raphael.rect(xPos, yPos, width, height);
- } else {
- path = this.raphael.path(this.roundedRect(xPos, yPos, width, height, radiusArray));
- }
- return path.attr('fill', barColor).attr('fill-opacity', opacity).attr('stroke', 'none');
- };
-
- Bar.prototype.roundedRect = function(x, y, w, h, r) {
- if (r == null) {
- r = [0, 0, 0, 0];
- }
- return ["M", x, r[0] + y, "Q", x, y, x + r[0], y, "L", x + w - r[1], y, "Q", x + w, y, x + w, y + r[1], "L", x + w, y + h - r[2], "Q", x + w, y + h, x + w - r[2], y + h, "L", x + r[3], y + h, "Q", x, y + h, x, y + h - r[3], "Z"];
- };
-
- return Bar;
-
- })(Morris.Grid);
-
- Morris.Donut = (function(_super) {
- __extends(Donut, _super);
-
- Donut.prototype.defaults = {
- colors: ['#0B62A4', '#3980B5', '#679DC6', '#95BBD7', '#B0CCE1', '#095791', '#095085', '#083E67', '#052C48', '#042135'],
- backgroundColor: '#FFFFFF',
- labelColor: '#000000',
- formatter: Morris.commas,
- resize: false
- };
-
- function Donut(options) {
- this.resizeHandler = __bind(this.resizeHandler, this);
- this.select = __bind(this.select, this);
- this.click = __bind(this.click, this);
- var _this = this;
- if (!(this instanceof Morris.Donut)) {
- return new Morris.Donut(options);
- }
- this.options = $.extend({}, this.defaults, options);
- if (typeof options.element === 'string') {
- this.el = $(document.getElementById(options.element));
- } else {
- this.el = $(options.element);
- }
- if (this.el === null || this.el.length === 0) {
- throw new Error("Graph placeholder not found.");
- }
- if (options.data === void 0 || options.data.length === 0) {
- return;
- }
- this.raphael = new Raphael(this.el[0]);
- if (this.options.resize) {
- $(window).bind('resize', function(evt) {
- if (_this.timeoutId != null) {
- window.clearTimeout(_this.timeoutId);
- }
- return _this.timeoutId = window.setTimeout(_this.resizeHandler, 100);
- });
- }
- this.setData(options.data);
- }
-
- Donut.prototype.redraw = function() {
- var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
- this.raphael.clear();
- cx = this.el.width() / 2;
- cy = this.el.height() / 2;
- w = (Math.min(cx, cy) - 10) / 3;
- total = 0;
- _ref = this.values;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- value = _ref[_i];
- total += value;
- }
- min = 5 / (2 * w);
- C = 1.9999 * Math.PI - min * this.data.length;
- last = 0;
- idx = 0;
- this.segments = [];
- _ref1 = this.values;
- for (i = _j = 0, _len1 = _ref1.length; _j < _len1; i = ++_j) {
- value = _ref1[i];
- next = last + min + C * (value / total);
- seg = new Morris.DonutSegment(cx, cy, w * 2, w, last, next, this.data[i].color || this.options.colors[idx % this.options.colors.length], this.options.backgroundColor, idx, this.raphael);
- seg.render();
- this.segments.push(seg);
- seg.on('hover', this.select);
- seg.on('click', this.click);
- last = next;
- idx += 1;
- }
- this.text1 = this.drawEmptyDonutLabel(cx, cy - 10, this.options.labelColor, 15, 800);
- this.text2 = this.drawEmptyDonutLabel(cx, cy + 10, this.options.labelColor, 14);
- max_value = Math.max.apply(Math, this.values);
- idx = 0;
- _ref2 = this.values;
- _results = [];
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
- value = _ref2[_k];
- if (value === max_value) {
- this.select(idx);
- break;
- }
- _results.push(idx += 1);
- }
- return _results;
- };
-
- Donut.prototype.setData = function(data) {
- var row;
- this.data = data;
- this.values = (function() {
- var _i, _len, _ref, _results;
- _ref = this.data;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- row = _ref[_i];
- _results.push(parseFloat(row.value));
- }
- return _results;
- }).call(this);
- return this.redraw();
- };
-
- Donut.prototype.click = function(idx) {
- return this.fire('click', idx, this.data[idx]);
- };
-
- Donut.prototype.select = function(idx) {
- var row, s, segment, _i, _len, _ref;
- _ref = this.segments;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- s = _ref[_i];
- s.deselect();
- }
- segment = this.segments[idx];
- segment.select();
- row = this.data[idx];
- return this.setLabels(row.label, this.options.formatter(row.value, row));
- };
-
- Donut.prototype.setLabels = function(label1, label2) {
- var inner, maxHeightBottom, maxHeightTop, maxWidth, text1bbox, text1scale, text2bbox, text2scale;
- inner = (Math.min(this.el.width() / 2, this.el.height() / 2) - 10) * 2 / 3;
- maxWidth = 1.8 * inner;
- maxHeightTop = inner / 2;
- maxHeightBottom = inner / 3;
- this.text1.attr({
- text: label1,
- transform: ''
- });
- text1bbox = this.text1.getBBox();
- text1scale = Math.min(maxWidth / text1bbox.width, maxHeightTop / text1bbox.height);
- this.text1.attr({
- transform: "S" + text1scale + "," + text1scale + "," + (text1bbox.x + text1bbox.width / 2) + "," + (text1bbox.y + text1bbox.height)
- });
- this.text2.attr({
- text: label2,
- transform: ''
- });
- text2bbox = this.text2.getBBox();
- text2scale = Math.min(maxWidth / text2bbox.width, maxHeightBottom / text2bbox.height);
- return this.text2.attr({
- transform: "S" + text2scale + "," + text2scale + "," + (text2bbox.x + text2bbox.width / 2) + "," + text2bbox.y
- });
- };
-
- Donut.prototype.drawEmptyDonutLabel = function(xPos, yPos, color, fontSize, fontWeight) {
- var text;
- text = this.raphael.text(xPos, yPos, '').attr('font-size', fontSize).attr('fill', color);
- if (fontWeight != null) {
- text.attr('font-weight', fontWeight);
- }
- return text;
- };
-
- Donut.prototype.resizeHandler = function() {
- this.timeoutId = null;
- this.raphael.setSize(this.el.width(), this.el.height());
- return this.redraw();
- };
-
- return Donut;
-
- })(Morris.EventEmitter);
-
- Morris.DonutSegment = (function(_super) {
- __extends(DonutSegment, _super);
-
- function DonutSegment(cx, cy, inner, outer, p0, p1, color, backgroundColor, index, raphael) {
- this.cx = cx;
- this.cy = cy;
- this.inner = inner;
- this.outer = outer;
- this.color = color;
- this.backgroundColor = backgroundColor;
- this.index = index;
- this.raphael = raphael;
- this.deselect = __bind(this.deselect, this);
- this.select = __bind(this.select, this);
- this.sin_p0 = Math.sin(p0);
- this.cos_p0 = Math.cos(p0);
- this.sin_p1 = Math.sin(p1);
- this.cos_p1 = Math.cos(p1);
- this.is_long = (p1 - p0) > Math.PI ? 1 : 0;
- this.path = this.calcSegment(this.inner + 3, this.inner + this.outer - 5);
- this.selectedPath = this.calcSegment(this.inner + 3, this.inner + this.outer);
- this.hilight = this.calcArc(this.inner);
- }
-
- DonutSegment.prototype.calcArcPoints = function(r) {
- return [this.cx + r * this.sin_p0, this.cy + r * this.cos_p0, this.cx + r * this.sin_p1, this.cy + r * this.cos_p1];
- };
-
- DonutSegment.prototype.calcSegment = function(r1, r2) {
- var ix0, ix1, iy0, iy1, ox0, ox1, oy0, oy1, _ref, _ref1;
- _ref = this.calcArcPoints(r1), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
- _ref1 = this.calcArcPoints(r2), ox0 = _ref1[0], oy0 = _ref1[1], ox1 = _ref1[2], oy1 = _ref1[3];
- return ("M" + ix0 + "," + iy0) + ("A" + r1 + "," + r1 + ",0," + this.is_long + ",0," + ix1 + "," + iy1) + ("L" + ox1 + "," + oy1) + ("A" + r2 + "," + r2 + ",0," + this.is_long + ",1," + ox0 + "," + oy0) + "Z";
- };
-
- DonutSegment.prototype.calcArc = function(r) {
- var ix0, ix1, iy0, iy1, _ref;
- _ref = this.calcArcPoints(r), ix0 = _ref[0], iy0 = _ref[1], ix1 = _ref[2], iy1 = _ref[3];
- return ("M" + ix0 + "," + iy0) + ("A" + r + "," + r + ",0," + this.is_long + ",0," + ix1 + "," + iy1);
- };
-
- DonutSegment.prototype.render = function() {
- var _this = this;
- this.arc = this.drawDonutArc(this.hilight, this.color);
- return this.seg = this.drawDonutSegment(this.path, this.color, this.backgroundColor, function() {
- return _this.fire('hover', _this.index);
- }, function() {
- return _this.fire('click', _this.index);
- });
- };
-
- DonutSegment.prototype.drawDonutArc = function(path, color) {
- return this.raphael.path(path).attr({
- stroke: color,
- 'stroke-width': 2,
- opacity: 0
- });
- };
-
- DonutSegment.prototype.drawDonutSegment = function(path, fillColor, strokeColor, hoverFunction, clickFunction) {
- return this.raphael.path(path).attr({
- fill: fillColor,
- stroke: strokeColor,
- 'stroke-width': 2
- }).hover(hoverFunction).click(clickFunction);
- };
-
- DonutSegment.prototype.select = function() {
- if (!this.selected) {
- this.seg.animate({
- path: this.selectedPath
- }, 150, '<>');
- this.arc.animate({
- opacity: 1
- }, 150, '<>');
- return this.selected = true;
- }
- };
-
- DonutSegment.prototype.deselect = function() {
- if (this.selected) {
- this.seg.animate({
- path: this.path
- }, 150, '<>');
- this.arc.animate({
- opacity: 0
- }, 150, '<>');
- return this.selected = false;
- }
- };
-
- return DonutSegment;
-
- })(Morris.EventEmitter);
-
-}).call(this);
diff --git a/assets/vendor/charts/morris-bundle/morrisjs.html b/assets/vendor/charts/morris-bundle/morrisjs.html
deleted file mode 100644
index c00b7d5..0000000
--- a/assets/vendor/charts/morris-bundle/morrisjs.html
+++ /dev/null
@@ -1,384 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
Page not found - Jitu Chauhan
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Error 404: Page not found
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
It looks like nothing was found at this location. Maybe try one of the links below or a search?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/assets/vendor/charts/morris-bundle/raphael.min.js b/assets/vendor/charts/morris-bundle/raphael.min.js
deleted file mode 100644
index a901777..0000000
--- a/assets/vendor/charts/morris-bundle/raphael.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Raphael=e():t.Raphael=e()}(window,function(){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=4)}([function(t,e,r){var i,n;i=[r(3)],void 0===(n=function(t){function e(i){if(e.is(i,"function"))return r?i():t.on("raphael.DOMload",i);if(e.is(i,T))return e._engine.create[c](e,i.splice(0,3+e.is(i[0],A))).add(i);var n=Array.prototype.slice.call(arguments,0);if(e.is(n[n.length-1],"function")){var a=n.pop();return r?a.call(e._engine.create[c](e,n)):t.on("raphael.DOMload",function(){a.call(e._engine.create[c](e,n))})}return e._engine.create[c](e,arguments)}e.version="2.2.0",e.eve=t;var r,i,n=/[, ]+/,a={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},s=/\{(\d+)\}/g,o="hasOwnProperty",l={doc:document,win:window},h={was:Object.prototype[o].call(l.win,"Raphael"),is:l.win.Raphael},u=function(){this.ca=this.customAttributes={}},c="apply",f="concat",p="ontouchstart"in l.win||l.win.DocumentTouch&&l.doc instanceof DocumentTouch,d="",g=" ",x=String,v="split",y="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[v](g),m={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},b=x.prototype.toLowerCase,_=Math,w=_.max,k=_.min,B=_.abs,C=_.pow,S=_.PI,A="number",T="array",M=Object.prototype.toString,E=(e._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),N={NaN:1,Infinity:1,"-Infinity":1},L=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,P=_.round,z=parseFloat,F=parseInt,R=x.prototype.toUpperCase,j=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},I=e._availableAnimAttrs={blur:A,"clip-rect":"csv",cx:A,cy:A,fill:"colour","fill-opacity":A,"font-size":A,height:A,opacity:A,path:"path",r:A,rx:A,ry:A,stroke:"colour","stroke-opacity":A,"stroke-width":A,transform:"transform",width:A,x:A,y:A},D=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,q={hs:1,rg:1},O=/,?([achlmqrstvxz]),?/gi,V=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Y=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,W=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,G=(e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),H=function(t,e){return z(t)-z(e)},X=function(t){return t},U=e._rectPath=function(t,e,r,i,n){return n?[["M",t+n,e],["l",r-2*n,0],["a",n,n,0,0,1,n,n],["l",0,i-2*n],["a",n,n,0,0,1,-n,n],["l",2*n-r,0],["a",n,n,0,0,1,-n,-n],["l",0,2*n-i],["a",n,n,0,0,1,n,-n],["z"]]:[["M",t,e],["l",r,0],["l",0,i],["l",-r,0],["z"]]},$=function(t,e,r,i){return null==i&&(i=r),[["M",t,e],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]]},Z=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return $(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return $(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return U(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return U(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return U(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return U(e.x,e.y,e.width,e.height)}},Q=e.mapPath=function(t,e){if(!e)return t;var r,i,n,a,s,o,l;for(n=0,s=(t=At(t)).length;n
',(J=K.firstChild).style.behavior="url(#default#VML)",!J||"object"!=typeof J.adj)return e.type=d;K=null}function tt(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var r in t)t[o](r)&&(e[r]=tt(t[r]));return e}e.svg=!(e.vml="VML"==e.type),e._Paper=u,e.fn=i=u.prototype=e.prototype,e._id=0,e.is=function(t,e){return"finite"==(e=b.call(e))?!N[o](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||M.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,r,i,n,a,s){if(null==a){var o=t-i,l=r-n;return o||l?(180+180*_.atan2(-l,-o)/S+360)%360:0}return e.angle(t,r,a,s)-e.angle(i,n,a,s)},e.rad=function(t){return t%360*S/180},e.deg=function(t){return Math.round(180*t/S%360*1e3)/1e3},e.snapTo=function(t,r,i){if(i=e.is(i,"finite")?i:10,e.is(t,T)){for(var n=t.length;n--;)if(B(t[n]-r)<=i)return t[n]}else{var a=r%(t=+t);if(a
t-i)return r-a+t}return r};var et,rt;e.createUUID=(et=/[xy]/g,rt=function(t){var e=16*_.random()|0;return("x"==t?e:3&e|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(et,rt).toUpperCase()});e.setWindow=function(r){t("raphael.setWindow",e,l.win,r),l.win=r,l.doc=l.win.document,e._engine.initWin&&e._engine.initWin(l.win)};var it=function(t){if(e.vml){var r,i=/^\s+|\s+$/g;try{var n=new ActiveXObject("htmlfile");n.write(""),n.close(),r=n.body}catch(t){r=createPopup().document.body}var a=r.createTextRange();it=ht(function(t){try{r.style.color=x(t).replace(i,d);var e=a.queryCommandValue("ForeColor");return"#"+("000000"+(e=(255&e)<<16|65280&e|(16711680&e)>>>16).toString(16)).slice(-6)}catch(t){return"none"}})}else{var s=l.doc.createElement("i");s.title="Raphaël Colour Picker",s.style.display="none",l.doc.body.appendChild(s),it=ht(function(t){return s.style.color=t,l.doc.defaultView.getComputedStyle(s,d).getPropertyValue("color")})}return it(t)},nt=function(){return"hsb("+[this.h,this.s,this.b]+")"},at=function(){return"hsl("+[this.h,this.s,this.l]+")"},st=function(){return this.hex},ot=function(t,r,i){if(null==r&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,r=t.g,t=t.r),null==r&&e.is(t,"string")){var n=e.getRGB(t);t=n.r,r=n.g,i=n.b}return(t>1||r>1||i>1)&&(t/=255,r/=255,i/=255),[t,r,i]},lt=function(t,r,i,n){var a={r:t*=255,g:r*=255,b:i*=255,hex:e.rgb(t,r,i),toString:st};return e.is(n,"finite")&&(a.opacity=n),a};function ht(t,e,r){return function i(){var n=Array.prototype.slice.call(arguments,0),a=n.join("␀"),s=i.cache=i.cache||{},l=i.count=i.count||[];return s[o](a)?(function(t,e){for(var r=0,i=t.length;r=1e3&&delete s[l.shift()],l.push(a),s[a]=t[c](e,n),r?r(s[a]):s[a])}}e.color=function(t){var r;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(r=e.hsb2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(r=e.hsl2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(r=e.rgb2hsl(t),t.h=r.h,t.s=r.s,t.l=r.l,r=e.rgb2hsb(t),t.v=r.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=st,t},e.hsb2rgb=function(t,e,r,i){var n,a,s,o,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,i=t.o,t=t.h),o=(l=r*e)*(1-B((t=(t*=360)%360/60)%2-1)),n=a=s=r-l,lt(n+=[l,o,0,0,o,l][t=~~t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],i)},e.hsl2rgb=function(t,e,r,i){var n,a,s,o,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),t=(t*=360)%360/60,o=(l=2*e*(r<.5?r:1-r))*(1-B(t%2-1)),n=a=s=r-l/2,lt(n+=[l,o,0,0,o,l][t=~~t],a+=[o,l,l,o,0,0][t],s+=[0,0,o,l,l,o][t],i)},e.rgb2hsb=function(t,e,r){var i,n;return t=(r=ot(t,e,r))[0],e=r[1],r=r[2],{h:((0==(n=(i=w(t,e,r))-k(t,e,r))?null:i==t?(e-r)/n:i==e?(r-t)/n+2:(t-e)/n+4)+360)%6*60/360,s:0==n?0:n/i,b:i,toString:nt}},e.rgb2hsl=function(t,e,r){var i,n,a,s;return t=(r=ot(t,e,r))[0],e=r[1],r=r[2],i=((n=w(t,e,r))+(a=k(t,e,r)))/2,{h:((0==(s=n-a)?null:n==t?(e-r)/s:n==e?(r-t)/s+2:(t-e)/s+4)+360)%6*60/360,s:0==s?0:i<.5?s/(2*i):s/(2-2*i),l:i,toString:at}},e._path2string=function(){return this.join(",").replace(O,"$1")};e._preload=function(t,e){var r=l.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,l.doc.body.removeChild(this)},r.onerror=function(){l.doc.body.removeChild(this)},l.doc.body.appendChild(r),r.src=t};function ut(){return this.hex}function ct(t,e){for(var r=[],i=0,n=t.length;n-2*!e>i;i+=2){var a=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?n-4==i?a[3]={x:+t[0],y:+t[1]}:n-2==i&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[n-2],y:+t[n-1]}:n-4==i?a[3]=a[2]:i||(a[0]={x:+t[i],y:+t[i+1]}),r.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return r}e.getRGB=ht(function(t){if(!t||(t=x(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ut};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:ut};!q[o](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=it(t));var r,i,n,a,s,l,h=t.match(E);return h?(h[2]&&(n=F(h[2].substring(5),16),i=F(h[2].substring(3,5),16),r=F(h[2].substring(1,3),16)),h[3]&&(n=F((s=h[3].charAt(3))+s,16),i=F((s=h[3].charAt(2))+s,16),r=F((s=h[3].charAt(1))+s,16)),h[4]&&(l=h[4][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),"rgba"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100)),h[5]?(l=h[5][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(r/=360),"hsba"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsb2rgb(r,i,n,a)):h[6]?(l=h[6][v](D),r=z(l[0]),"%"==l[0].slice(-1)&&(r*=2.55),i=z(l[1]),"%"==l[1].slice(-1)&&(i*=2.55),n=z(l[2]),"%"==l[2].slice(-1)&&(n*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(r/=360),"hsla"==h[1].toLowerCase().slice(0,4)&&(a=z(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsl2rgb(r,i,n,a)):((h={r:r,g:i,b:n,toString:ut}).hex="#"+(16777216|n|i<<8|r<<16).toString(16).slice(1),e.is(a,"finite")&&(h.opacity=a),h)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ut}},e),e.hsb=ht(function(t,r,i){return e.hsb2rgb(t,r,i).hex}),e.hsl=ht(function(t,r,i){return e.hsl2rgb(t,r,i).hex}),e.rgb=ht(function(t,e,r){function i(t){return t+.5|0}return"#"+(16777216|i(r)|i(e)<<8|i(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var r=ft(t);if(r.arr)return mt(r.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return e.is(t,T)&&e.is(t[0],T)&&(n=mt(t)),n.length||x(t).replace(V,function(t,e,r){var a=[],s=e.toLowerCase();if(r.replace(W,function(t,e){e&&a.push(+e)}),"m"==s&&a.length>2&&(n.push([e][f](a.splice(0,2))),s="l",e="m"==e?"l":"L"),"r"==s)n.push([e][f](a));else for(;a.length>=i[s]&&(n.push([e][f](a.splice(0,i[s]))),i[s]););}),n.toString=e._path2string,r.arr=mt(n),n},e.parseTransformString=ht(function(t){if(!t)return null;var r=[];return e.is(t,T)&&e.is(t[0],T)&&(r=mt(t)),r.length||x(t).replace(Y,function(t,e,i){var n=[];b.call(e);i.replace(W,function(t,e){e&&n.push(+e)}),r.push([e][f](n))}),r.toString=e._path2string,r});var ft=function(t){var e=ft.ps=ft.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var r in e)e[o](r)&&r!=t&&(e[r].sleep--,!e[r].sleep&&delete e[r])}),e[t]};function pt(t,e,r,i,n){return t*(t*(-3*e+9*r-9*i+3*n)+6*e-12*r+6*i)-3*e+3*r}function dt(t,e,r,i,n,a,s,o,l){null==l&&(l=1);for(var h=(l=l>1?1:l<0?0:l)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],c=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=h*u[p]+h,g=pt(d,t,r,n,s),x=pt(d,e,i,a,o),v=g*g+x*x;f+=c[p]*_.sqrt(v)}return h*f}function gt(t,e,r,i,n,a,s,o){if(!(w(t,r)w(n,s)||w(e,i)w(a,o))){var l=(t-r)*(a-o)-(e-i)*(n-s);if(l){var h=((t*i-e*r)*(n-s)-(t-r)*(n*o-a*s))/l,u=((t*i-e*r)*(a-o)-(e-i)*(n*o-a*s))/l,c=+h.toFixed(2),f=+u.toFixed(2);if(!(c<+k(t,r).toFixed(2)||c>+w(t,r).toFixed(2)||c<+k(n,s).toFixed(2)||c>+w(n,s).toFixed(2)||f<+k(e,i).toFixed(2)||f>+w(e,i).toFixed(2)||f<+k(a,o).toFixed(2)||f>+w(a,o).toFixed(2)))return{x:h,y:u}}}}function xt(t,r,i){var n=e.bezierBBox(t),a=e.bezierBBox(r);if(!e.isBBoxIntersect(n,a))return i?0:[];for(var s=dt.apply(0,t),o=dt.apply(0,r),l=w(~~(s/5),1),h=w(~~(o/5),1),u=[],c=[],f={},p=i?0:[],d=0;d=0&&A<=1.001&&T>=0&&T<=1.001&&(i?p++:p.push({x:S.x,y:S.y,t1:k(A,1),t2:k(T,1)}))}}return p}function vt(t,r,i){t=e._path2curve(t),r=e._path2curve(r);for(var n,a,s,o,l,h,u,c,f,p,d=i?0:[],g=0,x=t.length;gy||v=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},e.isBBoxIntersect=function(t,r){var i=e.isPointInsideBBox;return i(r,t.x,t.y)||i(r,t.x2,t.y)||i(r,t.x,t.y2)||i(r,t.x2,t.y2)||i(t,r.x,r.y)||i(t,r.x2,r.y)||i(t,r.x,r.y2)||i(t,r.x2,r.y2)||(t.xr.x||r.xt.x)&&(t.yr.y||r.yt.y)},e.pathIntersection=function(t,e){return vt(t,e)},e.pathIntersectionNumber=function(t,e){return vt(t,e,1)},e.isPointInsidePath=function(t,r,i){var n=e.pathBBox(t);return e.isPointInsideBBox(n,r,i)&&vt(t,[["M",r,i],["H",n.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var yt=e.pathBBox=function(t){var e=ft(t);if(e.bbox)return tt(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var r,i=0,n=0,a=[],s=[],o=0,l=(t=At(t)).length;o1&&(r*=m=_.sqrt(m),i*=m);var b=r*r,w=i*i,k=(a==s?-1:1)*_.sqrt(B((b*w-b*y*y-w*x*x)/(b*y*y+w*x*x))),C=k*r*y/i+(t+o)/2,A=k*-i*x/r+(e+l)/2,T=_.asin(((e-A)/i).toFixed(9)),M=_.asin(((l-A)/i).toFixed(9));T=tM&&(T-=2*S),!s&&M>T&&(M-=2*S)}var E=M-T;if(B(E)>c){var N=M,L=o,P=l;M=T+c*(s&&M>T?1:-1),o=C+r*_.cos(M),l=A+i*_.sin(M),d=Bt(o,l,r,i,n,0,s,L,P,[M,N,C,A])}E=M-T;var z=_.cos(T),F=_.sin(T),R=_.cos(M),j=_.sin(M),I=_.tan(E/4),D=4/3*r*I,q=4/3*i*I,O=[t,e],V=[t+D*F,e-q*z],Y=[o+D*j,l-q*R],W=[o,l];if(V[0]=2*O[0]-V[0],V[1]=2*O[1]-V[1],h)return[V,Y,W][f](d);for(var G=[],H=0,X=(d=[V,Y,W][f](d).join()[v](",")).length;H"1e12"&&(p=.5),B(d)>"1e12"&&(d=.5),p>0&&p<1&&(l=Ct(t,e,r,i,n,a,s,o,p),x.push(l.x),g.push(l.y)),d>0&&d<1&&(l=Ct(t,e,r,i,n,a,s,o,d),x.push(l.x),g.push(l.y)),h=a-2*i+e-(o-2*a+i),f=e-i,p=(-(u=2*(i-e)-2*(a-i))+_.sqrt(u*u-4*h*f))/2/h,d=(-u-_.sqrt(u*u-4*h*f))/2/h,B(p)>"1e12"&&(p=.5),B(d)>"1e12"&&(d=.5),p>0&&p<1&&(l=Ct(t,e,r,i,n,a,s,o,p),x.push(l.x),g.push(l.y)),d>0&&d<1&&(l=Ct(t,e,r,i,n,a,s,o,d),x.push(l.x),g.push(l.y)),{min:{x:k[c](0,x),y:k[c](0,g)},max:{x:w[c](0,x),y:w[c](0,g)}}}),At=e._path2curve=ht(function(t,e){var r=!e&&ft(t);if(!e&&r.curve)return mt(r.curve);for(var i=_t(t),n=e&&_t(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=function(t,e,r){var i,n;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][f](Bt[c](0,[e.x,e.y][f](t.slice(1))));break;case"S":"C"==r||"S"==r?(i=2*e.x-e.bx,n=2*e.y-e.by):(i=e.x,n=e.y),t=["C",i,n][f](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][f](kt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][f](kt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][f](wt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][f](wt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][f](wt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][f](wt(e.x,e.y,e.X,e.Y))}return t},l=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)u[e]="A",n&&(p[e]="A"),t.splice(e++,0,["C"][f](r.splice(0,6)));t.splice(e,1),v=w(i.length,n&&n.length||0)}},h=function(t,e,r,a,s){t&&e&&"M"==t[s][0]&&"M"!=e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[s][1],r.y=t[s][2],v=w(i.length,n&&n.length||0))},u=[],p=[],d="",g="",x=0,v=w(i.length,n&&n.length||0);x.01;)u/=2,h=dt(t,e,r,i,n,a,s,o,c+=(hn){if(r&&!f.start){if(c+=["C"+(u=Xt(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p)).start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],a)return c;f.start=c,c=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,l[5],l[6]].join(),p+=h,s=+l[5],o=+l[6];continue}if(!t&&!r)return{x:(u=Xt(s,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p)).x,y:u.y,alpha:u.alpha}}p+=h,s=+l[5],o=+l[6]}c+=l.shift()+l}return f.end=c,(u=t?p:r?f:e.findDotsAtSegment(s,o,l[0],l[1],l[2],l[3],l[4],l[5],1)).alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},$t=Ut(1),Zt=Ut(),Qt=Ut(0,1);e.getTotalLength=$t,e.getPointAtLength=Zt,e.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return Qt(t,e).end;var i=Qt(t,r,1);return e?Qt(i,e).end:i},Yt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():$t(t)},Yt.getPointAtLength=function(t){var e=this.getPath();if(e)return Zt(e,t)},Yt.getPath=function(){var t,r=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return r&&(t=r(this)),t},Yt.getSubpath=function(t,r){var i=this.getPath();if(i)return e.getSubpath(i,t,r)};var Jt=e.easing_formulas={linear:function(t){return t},"<":function(t){return C(t,1.7)},">":function(t){return C(t,.48)},"<>":function(t){var e=.48-t/1.04,r=_.sqrt(.1734+e*e),i=r-e,n=-r-e,a=C(B(i),1/3)*(i<0?-1:1)+C(B(n),1/3)*(n<0?-1:1)+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:C(2,-10*t)*_.sin(2*S*(t-.075)/.3)+1},bounce:function(t){var e=7.5625,r=2.75;return t<1/r?e*t*t:t<2/r?e*(t-=1.5/r)*t+.75:t<2.5/r?e*(t-=2.25/r)*t+.9375:e*(t-=2.625/r)*t+.984375}};Jt.easeIn=Jt["ease-in"]=Jt["<"],Jt.easeOut=Jt["ease-out"]=Jt[">"],Jt.easeInOut=Jt["ease-in-out"]=Jt["<>"],Jt["back-in"]=Jt.backIn,Jt["back-out"]=Jt.backOut;var Kt=[],te=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ee=function(){for(var r=+new Date,i=0;i1&&!n.next){for(s in d)d[o](s)&&(y[s]=n.totalOrigin[s]);n.el.attr(y),ae(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&ae(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}Kt.length&&te(ee)},re=function(t){return t>255?255:t<0?0:t};function ie(t,e,r,i,n,a){var s=3*e,o=3*(i-e)-s,l=1-s-o,h=3*r,u=3*(n-r)-h,c=1-h-u;function f(t){return((l*t+o)*t+s)*t}return function(t,e){var r=function(t,e){var r,i,n,a,h,u;for(n=t,u=0;u<8;u++){if(a=f(n)-t,B(a)i)return i;for(;ra?r=n:i=n,n=(i-r)/2+r}return n}(t,e);return((c*r+u)*r+h)*r}(t,1/(200*a))}function ne(t,e){var r=[],i={};if(this.ms=e,this.times=1,t){for(var n in t)t[o](n)&&(i[z(n)]=t[n],r.push(z(n)));r.sort(H)}this.anim=i,this.top=r[r.length-1],this.percents=r}function ae(r,i,a,s,l,h){a=z(a);var u,c,p,d,g,y,m=r.ms,b={},_={},w={};if(s)for(B=0,C=Kt.length;Bs*r.top){a=r.percents[B],g=r.percents[B-1]||0,m=m/r.top*(a-g),d=r.percents[B+1],u=r.anim[a];break}s&&i.attr(r.anim[r.percents[B]])}if(u){if(c)c.initstatus=s,c.start=new Date-c.ms*s;else{for(var S in u)if(u[o](S)&&(I[o](S)||i.paper.customAttributes[o](S)))switch(b[S]=i.attr(S),null==b[S]&&(b[S]=j[S]),_[S]=u[S],I[S]){case A:w[S]=(_[S]-b[S])/m;break;case"colour":b[S]=e.getRGB(b[S]);var T=e.getRGB(_[S]);w[S]={r:(T.r-b[S].r)/m,g:(T.g-b[S].g)/m,b:(T.b-b[S].b)/m};break;case"path":var M=At(b[S],_[S]),E=M[1];for(b[S]=M[0],w[S]=[],B=0,C=b[S].length;Bh&&(h=c)}!t[h+="%"].callback&&(t[h].callback=n)}return new ne(t,r)},Yt.animate=function(t,r,i,n){if(this.removed)return n&&n.call(this),this;var a=t instanceof ne?t:e.animation(t,r,i,n);return ae(a,this,a.percents[0],null,this.attr()),this},Yt.setTime=function(t,e){return t&&null!=e&&this.status(t,k(e,t.ms)/t.ms),this},Yt.status=function(t,e){var r,i,n=[],a=0;if(null!=e)return ae(t,this,-1,k(e,1)),this;for(r=Kt.length;a"));var U=H.getBoundingClientRect();A.W=g.w=(U.right-U.left)/100,A.H=g.h=(U.bottom-U.top)/100,A.X=g.x,A.Y=g.y+A.H/2,("x"in l||"y"in l)&&(A.path.v=t.format("m{0},{1}l{2},{1}",a(g.x*y),a(g.y*y),a(g.x*y)+1));for(var $=["x","y","text","font","font-family","font-weight","font-style","font-size"],Z=0,Q=$.length;Z.25&&(r=n.sqrt(.25-o(e-.5,2))*(2*(r>.5)-1)+.5),h=e+c+r),f})).split(/\s*\-\s*/),"linear"==l){var u=a.shift();if(u=-i(u),isNaN(u))return null}var p=t._parseDots(a);if(!p)return null;if(e=e.shape||e.node,p.length){e.removeChild(s),s.on=!0,s.method="none",s.color=p[0].color,s.color2=p[p.length-1].color;for(var d=[],g=0,x=p.length;g')}}catch(t){k=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),r=e.container,i=e.height,n=e.width,a=e.x,s=e.y;if(!r)throw new Error("VML container not found.");var o=new t._Paper,l=o.canvas=t._g.doc.createElement("div"),h=l.style;return a=a||0,s=s||0,n=n||512,i=i||342,o.width=n,o.height=i,n==+n&&(n+="px"),i==+i&&(i+="px"),o.coordsize=216e5+c+216e5,o.coordorigin="0 0",o.span=t._g.doc.createElement("span"),o.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(o.span),h.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",n,i),1==r?(t._g.doc.body.appendChild(l),h.left=a+"px",h.top=s+"px",h.position="absolute"):r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),o.renderfix=function(){},o},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=f,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){for(var e in t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var M=t.st;for(var E in T)T[e](E)&&!M[e](E)&&(M[E]=function(t){return function(){var e=arguments;return this.forEach(function(r){r[t].apply(r,e)})}}(E))}}.apply(e,i))||(t.exports=n)},function(t,e,r){var i,n;i=[r(0)],void 0===(n=function(t){if(!t||t.svg){var e="hasOwnProperty",r=String,i=parseFloat,n=parseInt,a=Math,s=a.max,o=a.abs,l=a.pow,h=/[, ]+/,u=t.eve,c="",f=" ",p="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},g={};t.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var x=function(i,n){if(n)for(var a in"string"==typeof i&&(i=x(i)),n)n[e](a)&&("xlink:"==a.substring(0,6)?i.setAttributeNS(p,a.substring(6),r(n[a])):i.setAttribute(a,r(n[a])));else(i=t._g.doc.createElementNS("http://www.w3.org/2000/svg",i)).style&&(i.style.webkitTapHighlightColor="rgba(0,0,0,0)");return i},v=function(e,n){var h="linear",u=e.id+n,f=.5,p=.5,d=e.node,g=e.paper,v=d.style,m=t._g.doc.getElementById(u);if(!m){if(n=(n=r(n).replace(t._radial_gradient,function(t,e,r){if(h="radial",e&&r){f=i(e);var n=2*((p=i(r))>.5)-1;l(f-.5,2)+l(p-.5,2)>.25&&(p=a.sqrt(.25-l(f-.5,2))*n+.5)&&.5!=p&&(p=p.toFixed(5)-1e-5*n)}return c})).split(/\s*\-\s*/),"linear"==h){var b=n.shift();if(b=-i(b),isNaN(b))return null;var _=[0,0,a.cos(t.rad(b)),a.sin(t.rad(b))],w=1/(s(o(_[2]),o(_[3]))||1);_[2]*=w,_[3]*=w,_[2]<0&&(_[0]=-_[2],_[2]=0),_[3]<0&&(_[1]=-_[3],_[3]=0)}var k=t._parseDots(n);if(!k)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&u!=e.gradient.id&&(g.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){m=x(h+"Gradient",{id:u}),e.gradient=m,x(m,"radial"==h?{fx:f,fy:p}:{x1:_[0],y1:_[1],x2:_[2],y2:_[3],gradientTransform:e.matrix.invert()}),g.defs.appendChild(m);for(var B=0,C=k.length;B