caboose-cms 0.6.24 → 0.6.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTc3M2E4ZDkyYWJiY2VkYWI1NmRiOWFiZjE1ZTk4ZWNiZGUzMjE1Yg==
4
+ OWJiZDZkYjY1NWY2Y2NmZWFiMjNiOThjZTk0ZjFlZTNjYzllYTVkMA==
5
5
  data.tar.gz: !binary |-
6
- NWRmZTY2OTM1OGJkZDMwNmJlNzI3YzI0NTNhOGFiMmYwMDdlOTg0Mw==
6
+ MzRhMGY0MWZlNjViZWFkNGNlYTMwZDdkNDAwMThhMjcxNzFjMzNlOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzhmOTFjNmFiNDhmYTYxMjkyY2FlNTAxODNlYTEyZTkwZmRiZmMzNjE5OGVj
10
- NGU4MTRkNWU3MTlmNzA4YzkyYmIyYTk2YjJjZjQxMWNiY2NmMjY4MTJiMzI4
11
- NmU5YmNlNTQ4ZTQ2NGNhNTA0NmRiNzgzZjc0MjM5MDEyODMyOGI=
9
+ OGRiNjdiNmMwZTk5Zjc2MDg1MmY0N2M5ZTZkZTE3NGFmMGI4ZGZhMGE5ODAx
10
+ ZTEzMjE3NGYzYTBkMTFhMWJhZTIxYjQ0N2IxMDQ4YWEwYTdlYjJhYzhhNmFk
11
+ NmI5MjQxMzY0NmRhN2M3Y2JhYzQ5YWZmNmZiYTQyNjQxODFhM2Y=
12
12
  data.tar.gz: !binary |-
13
- YmRlZTllMDM4ZGM4Y2YwOGJiM2JlNjU1MjA4MTAwNTZjYzg4MDg1NDJkOWNk
14
- ZGZhMGJjYmNkYWJjOWIxMmVhMGEzZWU3ZWU0ZmY2Y2U3YzEzMmUwYmIxNjA3
15
- ZjdhOGE1M2U2NDgwNjZhNjZiOTRhNmY3MjE2ZDlmNDRmYjlmNzE=
13
+ NTk1NzQ0ZDYwNjhjMWUyZDBhOTYxMDBiODc0ODY4ZWI1MzVjMDJjNjY3MDZh
14
+ ZjdmZDRiYjUyMWI4NWZjZThlZGZjOTQ0ZmU4MmMxODNjNGE2ODk2M2Y4N2Zk
15
+ NWJkZDU2ZGZhM2JlODFiMWViNzdlYzU2ZDU4MjZkZDEyNmZlMDc=
@@ -15,9 +15,8 @@ MediaController.prototype = {
15
15
  uploader: false,
16
16
  refresh_unprocessed_images: true,
17
17
  allow_edit: false,
18
- feather_editor: false,
19
- media_ids: [],
20
- processing_media_ids: [],
18
+ feather_editor: false,
19
+ last_upload_processed: false,
21
20
 
22
21
  init: function(params) {
23
22
  var that = this;
@@ -139,25 +138,27 @@ MediaController.prototype = {
139
138
  that.cat = resp;
140
139
  that.cat_id = that.cat.id;
141
140
  that.selected_media = [];
142
- //that.print_media();
141
+ that.print_media();
142
+ }
143
+ });
144
+ },
145
+
146
+ check_processing_status: function()
147
+ {
148
+ var that = this;
149
+ if (!that.last_upload_processed)
150
+ that.last_upload_processed = new Date();
143
151
 
144
- var mids = [];
145
- var pmids = [];
146
- if (that.cat.media.length > 0)
147
- {
148
- $.each(that.cat.media, function(i, m) {
149
- mids.push(m.id);
150
- if (m.media_type == 'image' && m.processed == false)
151
- pmids.push(m.id);
152
- });
153
- }
154
- if (mids.join(',') != that.media_ids.join(',') || pmids.join(',') != that.processing_media_ids.join(','))
155
- that.print_media();
156
- else if (pmids.length > 0)
157
- setTimeout(function() { that.refresh_media(); }, 2000);
158
-
159
- that.media_ids = mids;
160
- that.processing_media_ids = pmids;
152
+ $.ajax({
153
+ url: '/admin/media/last-upload-processed',
154
+ type: 'get',
155
+ success: function(resp) {
156
+ var d = Date.parse(resp['last_upload_processed']);
157
+ if (d > that.last_upload_processed)
158
+ that.refresh_media();
159
+ else
160
+ setTimeout(function() { that.check_processing_status(); }, 2000);
161
+ that.last_upload_processed = d;
161
162
  }
162
163
  });
163
164
  },
@@ -291,7 +292,10 @@ MediaController.prototype = {
291
292
  ul = $('<p/>').html("This category is empty.");
292
293
  $('#media').empty().append(ul);
293
294
  if (that.refresh_unprocessed_images == true && processing)
294
- setTimeout(function() { that.refresh_media(); }, 2000);
295
+ {
296
+ //setTimeout(function() { that.refresh_media(); }, 2000);
297
+ setTimeout(function() { that.check_processing_status(); }, 2000);
298
+ }
295
299
 
296
300
  $.each(that.cat.media, function(i, m) {
297
301
  $('li.media').draggable({
@@ -0,0 +1,39 @@
1
+ /*!
2
+ * Chart.js
3
+ * http://chartjs.org/
4
+ * Version: 2.0.0-alpha
5
+ *
6
+ * Copyright 2015 Nick Downie
7
+ * Released under the MIT license
8
+ * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
9
+ */
10
+ (function(){"use strict";var t=this,e=t.Chart,i=function(t,e){this.config=e,t.length&&t[0].getContext&&(t=t[0]),t.getContext&&(t=t.getContext("2d")),this.canvas=t.canvas,this.ctx=t;var a=function(t,e){return t["offset"+e]?t["offset"+e]:document.defaultView.getComputedStyle(t).getPropertyValue(e)},s=this.width=a(t.canvas,"Width")||t.canvas.width,o=this.height=a(t.canvas,"Height")||t.canvas.height;return t.canvas.width=s,t.canvas.height=o,s=this.width=t.canvas.width,o=this.height=t.canvas.height,this.aspectRatio=this.width/this.height,i.helpers.retinaScale(this),e?(this.controller=new i.Controller(this),this.controller):this};i.defaults={global:{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove","touchend"],hover:{onHover:null,mode:"single",animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",elements:{},legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i = 0; i < data.datasets.length; i++){%><li><span style="background-color:<%=data.datasets[i].backgroundColor%>"><%if(data.datasets[i].label){%><%=data.datasets[i].label%><%}%></span></li><%}%></ul>'}},"undefined"!=typeof amd?define(function(){return i}):"object"==typeof module&&module.exports&&(module.exports=i),t.Chart=i,i.noConflict=function(){return t.Chart=e,i}}).call(this),function(){"use strict";{var t=this,e=(t.Chart,Chart.helpers={}),i=e.each=function(t,e,i,a){var s=Array.prototype.slice.call(arguments,3);if(t)if(t.length===+t.length){var o;if(a)for(o=t.length-1;o>=0;o--)e.apply(i,[t[o],o].concat(s));else for(o=0;o<t.length;o++)e.apply(i,[t[o],o].concat(s))}else for(var n in t)e.apply(i,[t[n],n].concat(s))},a=e.clone=function(t){var s={};return i(t,function(i,o){t.hasOwnProperty(o)&&(s[o]=e.isArray(i)?i.slice(0):"object"==typeof i&&null!==i?a(i):i)}),s},s=e.extend=function(t){return i(Array.prototype.slice.call(arguments,1),function(e){i(e,function(i,a){e.hasOwnProperty(a)&&(t[a]=i)})}),t},o=(e.merge=function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift({}),s.apply(null,t)},e.configMerge=function(t){var i=a(t);return e.each(Array.prototype.slice.call(arguments,1),function(t){e.each(t,function(a,s){if(t.hasOwnProperty(s))if("scales"===s)i[s]=e.scaleMerge(i.hasOwnProperty(s)?i[s]:{},a);else if("scale"===s)i[s]=e.configMerge(i.hasOwnProperty(s)?i[s]:{},Chart.scaleService.getScaleDefaults(a.type),a);else if(i.hasOwnProperty(s)&&e.isArray(i[s])&&e.isArray(a)){var o=i[s];e.each(a,function(t,i){i<o.length?o[i]=e.configMerge(o[i],t):o.push(t)})}else i[s]=i.hasOwnProperty(s)&&"object"==typeof i[s]&&null!==i[s]&&"object"==typeof a?e.configMerge(i[s],a):a})}),i},e.scaleMerge=function(t,i){var s=a(t);return e.each(i,function(t,a){i.hasOwnProperty(a)&&("xAxes"===a||"yAxes"===a?s.hasOwnProperty(a)?e.each(t,function(t,i){i>=s[a].length||!s[a][i].type?s[a].push(e.configMerge(t.type?Chart.scaleService.getScaleDefaults(t.type):{},t)):s[a][i]=t.type!==s[a][i].type?e.configMerge(s[a][i],t.type?Chart.scaleService.getScaleDefaults(t.type):{},t):e.configMerge(s[a][i],t)}):(s[a]=[],e.each(t,function(t){s[a].push(e.configMerge(t.type?Chart.scaleService.getScaleDefaults(t.type):{},t))})):s[a]=s.hasOwnProperty(a)&&"object"==typeof s[a]&&null!==s[a]&&"object"==typeof t?e.configMerge(s[a],t):t)}),s},e.getValueAtIndexOrDefault=function(t,i,a){return t?e.isArray(t)&&i<t.length?t[i]:t:a},e.indexOf=function(t,e){if(Array.prototype.indexOf)return t.indexOf(e);for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1},e.where=function(t,i){var a=[];return e.each(t,function(t){i(t)&&a.push(t)}),a},e.findNextWhere=function(t,e,i){i||(i=-1);for(var a=i+1;a<t.length;a++){var s=t[a];if(e(s))return s}},e.findPreviousWhere=function(t,e,i){i||(i=t.length);for(var a=i-1;a>=0;a--){var s=t[a];if(e(s))return s}},e.inherits=function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},a=function(){this.constructor=i};return a.prototype=e.prototype,i.prototype=new a,i.extend=o,t&&s(i.prototype,t),i.__super__=e.prototype,i}),n=e.noop=function(){},r=(e.uid=function(){var t=0;return function(){return"chart-"+t++}}(),e.warn=function(t){window.console&&"function"==typeof window.console.warn&&console.warn(t)},e.amd="function"==typeof define&&define.amd,e.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)}),h=e.max=function(t){return Math.max.apply(Math,t)},l=e.min=function(t){return Math.min.apply(Math,t)},c=(e.sign=function(t){return Math.sign?Math.sign(t):(t=+t,0===t||isNaN(t)?t:t>0?1:-1)},e.log10=function(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10},e.cap=function(t,e,i){if(r(e)){if(t>e)return e}else if(r(i)&&i>t)return i;return t},e.getDecimalPlaces=function(t){if(t%1!==0&&r(t)){var e=t.toString();if(e.indexOf("e-")<0)return e.split(".")[1].length;if(e.indexOf(".")<0)return parseInt(e.split("e-")[1]);var i=e.split(".")[1].split("e-");return i[0].length+parseInt(i[1])}return 0},e.toRadians=function(t){return t*(Math.PI/180)},e.toDegrees=function(t){return t*(180/Math.PI)},e.getAngleFromPoint=function(t,e){var i=e.x-t.x,a=e.y-t.y,s=Math.sqrt(i*i+a*a),o=Math.atan2(a,i);return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:s}},e.aliasPixel=function(t){return t%2===0?0:.5},e.splineCurve=function(t,e,i,a){var s=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),o=Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2)),n=a*s/(s+o),r=a*o/(s+o);return{previous:{x:e.x-n*(i.x-t.x),y:e.y-n*(i.y-t.y)},next:{x:e.x+r*(i.x-t.x),y:e.y+r*(i.y-t.y)}}},e.nextItem=function(t,e,i){return i?t[e+1]||t[0]:t[e+1]||t[t.length-1]},e.previousItem=function(t,e,i){return i?t[e-1]||t[t.length-1]:t[e-1]||t[0]},e.calculateOrderOfMagnitude=function(t){return Math.floor(Math.log(t)/Math.LN10)}),u=(e.calculateScaleRange=function(t,e,i,a,s){var o=2,n=Math.floor(e/(1.5*i)),r=o>=n,u=h(t),d=l(t);u===d&&(u+=.5,d>=.5&&!a?d-=.5:u+=.5);for(var g=Math.abs(u-d),m=c(g),p=Math.ceil(u/(1*Math.pow(10,m)))*Math.pow(10,m),f=a?0:Math.floor(d/(1*Math.pow(10,m)))*Math.pow(10,m),v=p-f,b=Math.pow(10,m),x=Math.round(v/b);(x>n||n>2*x)&&!r;)if(x>n)b*=2,x=Math.round(v/b),x%1!==0&&(r=!0);else if(s&&m>=0){if(b/2%1!==0)break;b/=2,x=Math.round(v/b)}else b/=2,x=Math.round(v/b);return r&&(x=o,b=v/x),{steps:x,stepValue:b,min:f,max:f+x*b}},e.niceNum=function(t,i){var a,s=Math.floor(e.log10(t)),o=t/Math.pow(10,s);return a=i?1.5>o?1:3>o?2:7>o?5:10:1>=o?1:2>=o?2:5>=o?5:10,a*Math.pow(10,s)},e.template=function(t,e){function i(t,e){var i=/\W/.test(t)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+t.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):a[t]=a[t];return e?i(e):i}if(t instanceof Function)return t(e);var a={};return i(t,e)}),d=(e.generateLabels=function(t,e,a,s){var o=new Array(e);return t&&i(o,function(e,i){o[i]=u(t,{value:a+s*(i+1)})}),o},e.easingEffects={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-1*t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-0.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return 1*((t=t/1-1)*t*t+1)},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-1*((t=t/1-1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-0.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return 1*(t/=1)*t*t*t*t},easeOutQuint:function(t){return 1*((t=t/1-1)*t*t*t*t+1)},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return-1*Math.cos(t/1*(Math.PI/2))+1},easeOutSine:function(t){return 1*Math.sin(t/1*(Math.PI/2))},easeInOutSine:function(t){return-0.5*(Math.cos(Math.PI*t/1)-1)},easeInExpo:function(t){return 0===t?1:1*Math.pow(2,10*(t/1-1))},easeOutExpo:function(t){return 1===t?1:1*(-Math.pow(2,-10*t/1)+1)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(-Math.pow(2,-10*--t)+2)},easeInCirc:function(t){return t>=1?t:-1*(Math.sqrt(1-(t/=1)*t)-1)},easeOutCirc:function(t){return 1*Math.sqrt(1-(t=t/1-1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-0.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,a=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),a<Math.abs(1)?(a=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/a),-(a*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-e)*Math.PI/i)))},easeOutElastic:function(t){var e=1.70158,i=0,a=1;return 0===t?0:1==(t/=1)?1:(i||(i=.3),a<Math.abs(1)?(a=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin(2*(1*t-e)*Math.PI/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,a=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.3*1.5),a<Math.abs(1)?(a=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/a),1>t?-.5*a*Math.pow(2,10*(t-=1))*Math.sin(2*(1*t-e)*Math.PI/i):a*Math.pow(2,-10*(t-=1))*Math.sin(2*(1*t-e)*Math.PI/i)*.5+1)},easeInBack:function(t){var e=1.70158;return 1*(t/=1)*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return 1*((t=t/1-1)*t*((e+1)*t+e)+1)},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?.5*t*t*(((e*=1.525)+1)*t-e):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:function(t){return 1-d.easeOutBounce(1-t)},easeOutBounce:function(t){return(t/=1)<1/2.75?7.5625*t*t:2/2.75>t?1*(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1*(7.5625*(t-=2.25/2.75)*t+.9375):1*(7.5625*(t-=2.625/2.75)*t+.984375)},easeInOutBounce:function(t){return.5>t?.5*d.easeInBounce(2*t):.5*d.easeOutBounce(2*t-1)+.5}}),g=(e.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)}}(),e.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(t){return window.clearTimeout(t,1e3/60)}}(),e.getRelativePosition=function(t){var e,i,a=t.originalEvent||t,s=t.currentTarget||t.srcElement,o=s.getBoundingClientRect();return a.touches?(e=a.touches[0].clientX-o.left,i=a.touches[0].clientY-o.top):(e=a.clientX-o.left,i=a.clientY-o.top),{x:e,y:i}},e.addEvent=function(t,e,i){t.addEventListener?t.addEventListener(e,i):t.attachEvent?t.attachEvent("on"+e,i):t["on"+e]=i}),m=e.removeEvent=function(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.detachEvent?t.detachEvent("on"+e,i):t["on"+e]=n},p=(e.bindEvents=function(t,e,a){t.events||(t.events={}),i(e,function(e){t.events[e]=function(){a.apply(t,arguments)},g(t.chart.canvas,e,t.events[e])})},e.unbindEvents=function(t,e){i(e,function(e,i){m(t.chart.canvas,i,e)})},e.getMaximumWidth=function(t){var e=t.parentNode,i=parseInt(p(e,"padding-left"))+parseInt(p(e,"padding-right"));return e.clientWidth-i},e.getMaximumHeight=function(t){var e=t.parentNode,i=parseInt(p(e,"padding-bottom"))+parseInt(p(e,"padding-top"));return e.clientHeight-i},e.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)});e.getMaximumSize=e.getMaximumWidth,e.retinaScale=function(t){var e=t.ctx,i=t.canvas.width,a=t.canvas.height;window.devicePixelRatio&&(e.canvas.style.width=i+"px",e.canvas.style.height=a+"px",e.canvas.height=a*window.devicePixelRatio,e.canvas.width=i*window.devicePixelRatio,e.scale(window.devicePixelRatio,window.devicePixelRatio))},e.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},e.fontString=function(t,e,i){return e+" "+t+"px "+i},e.longestText=function(t,e,a){t.font=e;var s=0;return i(a,function(e){var i=t.measureText(e).width;s=i>s?i:s}),s},e.drawRoundedRectangle=function(t,e,i,a,s,o){t.beginPath(),t.moveTo(e+o,i),t.lineTo(e+a-o,i),t.quadraticCurveTo(e+a,i,e+a,i+o),t.lineTo(e+a,i+s-o),t.quadraticCurveTo(e+a,i+s,e+a-o,i+s),t.lineTo(e+o,i+s),t.quadraticCurveTo(e,i+s,e,i+s-o),t.lineTo(e,i+o),t.quadraticCurveTo(e,i,e+o,i),t.closePath()},e.color=function(t){return window.Color?window.Color(t):(console.log("Color.js not found!"),t)},e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(arg)}}}.call(this),function(){"use strict";var t=this,e=(t.Chart,Chart.helpers);Chart.elements={},Chart.Element=function(t){e.extend(this,t),this.initialize.apply(this,arguments)},e.extend(Chart.Element.prototype,{initialize:function(){},pivot:function(){return this._view||(this._view=e.clone(this._model)),this._start=e.clone(this._view),this},transition:function(t){return this._view||(this._view=e.clone(this._model)),this._start||this.pivot(),e.each(this._model,function(i,a){if("_"!==a[0]&&this._model.hasOwnProperty(a))if(this._view[a])if(this._model[a]===this._view[a]);else if("string"==typeof i)try{var s=e.color(this._start[a]).mix(e.color(this._model[a]),t);this._view[a]=s.rgbString()}catch(o){this._view[a]=i}else if("number"==typeof i){var n=void 0!==this._start[a]?this._start[a]:0;this._view[a]=(this._model[a]-n)*t+n}else this._view[a]=i;else this._view[a]="number"==typeof i?i*t:i||null;else;},this),1===t&&delete this._start,this},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return e.isNumber(this._model.x)&&e.isNumber(this._model.y)}}),Chart.Element.extend=e.inherits}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:function(){},onComplete:function(){}},e.Animation=e.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),e.animationService={frameDuration:17,animations:[],dropFrames:0,addAnimation:function(t,e,a,s){s||(t.animating=!0);for(var o=0;o<this.animations.length;++o)if(this.animations[o].chartInstance===t)return void(this.animations[o].animationObject=e);this.animations.push({chartInstance:t,animationObject:e}),1==this.animations.length&&i.requestAnimFrame.call(window,this.digestWrapper)},cancelAnimation:function(t){var e=i.findNextWhere(this.animations,function(e){return e.chartInstance===t});e&&(this.animations.splice(e,1),t.animating=!1)},digestWrapper:function(){e.animationService.startDigest.call(e.animationService)},startDigest:function(){var t=Date.now(),e=0;this.dropFrames>1&&(e=Math.floor(this.dropFrames),this.dropFrames=this.dropFrames%1);for(var a=0;a<this.animations.length;a++)null===this.animations[a].animationObject.currentStep&&(this.animations[a].animationObject.currentStep=0),this.animations[a].animationObject.currentStep+=1+e,this.animations[a].animationObject.currentStep>this.animations[a].animationObject.numSteps&&(this.animations[a].animationObject.currentStep=this.animations[a].animationObject.numSteps),this.animations[a].animationObject.render(this.animations[a].chartInstance,this.animations[a].animationObject),this.animations[a].animationObject.currentStep==this.animations[a].animationObject.numSteps&&(this.animations[a].chartInstance.animating=!1,this.animations.splice(a,1),a--);var s=Date.now(),o=(s-t)/this.frameDuration;this.dropFrames+=o,this.animations.length>0&&i.requestAnimFrame.call(window,this.digestWrapper)}}}.call(this),function(){"use strict";var t=this,e=(t.Chart,Chart.helpers);Chart.types={},Chart.instances={},Chart.controllers={},Chart.Controller=function(t){return this.chart=t,this.config=t.config,this.data=this.config.data,this.options=this.config.options=e.configMerge(Chart.defaults.global,Chart.defaults[this.config.type],this.config.options||{}),this.id=e.uid(),Chart.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize.call(this),this},e.extend(Chart.Controller.prototype,{initialize:function(){return this.bindEvents(),this.ensureScalesHaveIDs(),this.buildOrUpdateControllers(),this.buildScales(),this.resetElements(),this.initToolTip(),this.update(),this},clear:function(){return e.clear(this.chart),this},stop:function(){return Chart.animationService.cancelAnimation(this),this},addDataset:function(t,e){void 0!==e?this.data.datasets.splice(e,0,t):this.data.datasets.push(t),this.buildOrUpdateControllers(),t.controller.reset(),this.update()},removeDataset:function(t){this.data.datasets.splice(t,1),this.buildOrUpdateControllers(),this.update()},addData:function(t,e,i){if(e<this.data.datasets.length){void 0===i&&(i=this.data.datasets[e].data.length);for(var a=[i],s=3;s<arguments.length;++s)a.push(arguments[s]);this.data.datasets[e].data.splice(i,0,t),this.data.datasets[e].controller.addElementAndReset.apply(this.data.datasets[e].controller,a),this.update()}},removeData:function(t,e){t<this.data.datasets.length&&(this.data.datasets[t].data.splice(e,1),this.data.datasets[t].controller.removeElement(e),this.update())},resize:function(t){this.stop();var i=this.chart.canvas,a=e.getMaximumWidth(this.chart.canvas),s=this.options.maintainAspectRatio?a/this.chart.aspectRatio:e.getMaximumHeight(this.chart.canvas);return i.width=this.chart.width=a,i.height=this.chart.height=s,e.retinaScale(this.chart),t||this.update(this.options.responsiveAnimationDuration),this},ensureScalesHaveIDs:function(){var t="x-axis-",i="y-axis-";this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&e.each(this.options.scales.xAxes,function(e,i){e.id=e.id||t+i},this),this.options.scales.yAxes&&this.options.scales.yAxes.length&&e.each(this.options.scales.yAxes,function(t,e){t.id=t.id||i+e},this))},buildScales:function(){if(this.scales={},this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&e.each(this.options.scales.xAxes,function(t){var e=Chart.scaleService.getScaleConstructor(t.type),i=new e({ctx:this.chart.ctx,options:t,data:this.data,id:t.id});this.scales[i.id]=i},this),this.options.scales.yAxes&&this.options.scales.yAxes.length&&e.each(this.options.scales.yAxes,function(t){var e=Chart.scaleService.getScaleConstructor(t.type),i=new e({ctx:this.chart.ctx,options:t,data:this.data,id:t.id});this.scales[i.id]=i},this)),this.options.scale){var t=Chart.scaleService.getScaleConstructor(this.options.scale.type),i=new t({ctx:this.chart.ctx,options:this.options.scale,data:this.data,chart:this.chart});this.scale=i}Chart.scaleService.fitScalesForChart(this,this.chart.width,this.chart.height)},buildOrUpdateControllers:function(){e.each(this.data.datasets,function(t,e){var i=t.type||this.config.type;return t.controller?void t.controller.updateIndex(e):void(t.controller=new Chart.controllers[i](this,e))},this)},resetElements:function(){e.each(this.data.datasets,function(t){t.controller.reset()},this)},update:function(t,i){Chart.scaleService.fitScalesForChart(this,this.chart.width,this.chart.height),e.each(this.data.datasets,function(t){t.controller.update()},this),this.render(t,i)},render:function(t,i){if("undefined"!=typeof t&&0!==t||"undefined"==typeof t&&0!==this.options.animation.duration){var a=new Chart.Animation;a.numSteps=(t||this.options.animation.duration)/16.66,a.easing=this.options.animation.easing,a.render=function(t,i){var a=e.easingEffects[i.easing],s=i.currentStep/i.numSteps,o=a(s);t.draw(o,s,i.currentStep)},a.onAnimationProgress=this.options.onAnimationProgress,a.onAnimationComplete=this.options.onAnimationComplete,Chart.animationService.addAnimation(this,a,t,i)}else this.draw(),this.options.onAnimationComplete&&this.options.onAnimationComplete.call&&this.options.onAnimationComplete.call(this);return this},draw:function(t){var i=t||1;this.clear(),e.each(this.scales,function(t){t.draw(this.chartArea)},this),this.scale&&this.scale.draw(),e.each(this.data.datasets,function(e){e.controller.draw(t)},this),this.tooltip.transition(i).draw()},getElementAtEvent:function(t){var i=e.getRelativePosition(t),a=[];return e.each(this.data.datasets,function(t){e.each(t.metaData,function(t){return t.inRange(i.x,i.y)?(a.push(t),a):void 0},this)},this),a},getElementsAtEvent:function(t){var i=e.getRelativePosition(t),a=[];return e.each(this.data.datasets,function(t){e.each(t.metaData,function(t){t.inLabelRange(i.x,i.y)&&a.push(t)},this)},this),a},getDatasetAtEvent:function(t){for(var i=e.getRelativePosition(t),a=[],s=0;s<this.chart.data.datasets.length;s++)for(elementIndex=0;elementIndex<this.chart.data.datasets[s].metaData.length;elementIndex++)this.chart.data.datasets[s].metaData[elementIndex].inLabelRange(i.x,i.y)&&e.each(this.chart.data.datasets,datasetIterator);return a.length?a:[]},generateLegend:function(){return e.template(this.options.legendTemplate,this)},destroy:function(){this.clear(),e.unbindEvents(this,this.events);var t=this.chart.canvas;t.width=this.chart.width,t.height=this.chart.height,t.style.removeProperty?(t.style.removeProperty("width"),t.style.removeProperty("height")):(t.style.removeAttribute("width"),t.style.removeAttribute("height")),delete Chart.instances[this.id]},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},initToolTip:function(){this.tooltip=new Chart.Tooltip({_chart:this.chart,_data:this.data,_options:this.options},this)},bindEvents:function(){e.bindEvents(this,this.options.events,function(t){this.eventHandler(t)})},eventHandler:function(t){this.lastActive=this.lastActive||[],this.active="mouseout"==t.type?[]:function(){switch(this.options.hover.mode){case"single":return this.getElementAtEvent(t);case"label":return this.getElementsAtEvent(t);case"dataset":return this.getDatasetAtEvent(t);default:return t}}.call(this),this.options.hover.onHover&&this.options.hover.onHover.call(this,this.active),("mouseup"==t.type||"click"==t.type)&&this.options.onClick&&this.options.onClick.call(this,t,this.active);if(this.lastActive.length)switch(this.options.hover.mode){case"single":this.data.datasets[this.lastActive[0]._datasetIndex].controller.removeHoverStyle(this.lastActive[0],this.lastActive[0]._datasetIndex,this.lastActive[0]._index);break;case"label":for(var i=0;i<this.lastActive.length;i++)this.data.datasets[this.lastActive[i]._datasetIndex].controller.removeHoverStyle(this.lastActive[i],this.lastActive[i]._datasetIndex,this.lastActive[i]._index);break;case"dataset":}if(this.active.length&&this.options.hover.mode)switch(this.options.hover.mode){case"single":this.data.datasets[this.active[0]._datasetIndex].controller.setHoverStyle(this.active[0]);break;case"label":for(var i=0;i<this.active.length;i++)this.data.datasets[this.active[i]._datasetIndex].controller.setHoverStyle(this.active[i]);break;case"dataset":}if((this.options.tooltips.enabled||this.options.tooltips.custom)&&(this.tooltip.initialize(),this.active.length?(this.tooltip._model.opacity=1,e.extend(this.tooltip,{_active:this.active}),this.tooltip.update()):this.tooltip._model.opacity=0),this.tooltip.pivot(),!this.animating){var a;e.each(this.active,function(t,e){t!==this.lastActive[e]&&(a=!0)},this),(!this.lastActive.length&&this.active.length||this.lastActive.length&&!this.active.length||this.lastActive.length&&this.active.length&&a)&&(this.stop(),this.render(this.options.hover.animationDuration,!0))}return this.lastActive=this.active,this}})}.call(this),function(){"use strict";var t=this,e=(t.Chart,Chart.helpers);e.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){e.each(Chart.instances,function(t){t.options.responsive&&t.resize()})},16)}}())}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=i},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?this.defaults[t]:{}},fitScalesForChart:function(t,e,a){var s=e>30?5:2,o=a>30?5:2;if(t){var n=i.where(t.scales,function(t){return"left"==t.options.position}),r=i.where(t.scales,function(t){return"right"==t.options.position}),h=i.where(t.scales,function(t){return"top"==t.options.position}),l=i.where(t.scales,function(t){return"bottom"==t.options.position}),c=e/2,u=a/2;c-=2*s,u-=2*o;var d=(e-c)/(n.length+r.length),g=(a-u)/(h.length+l.length),m=[],p=function(t){var e=t.fit(d,u);m.push({horizontal:!1,minSize:e,scale:t})},f=function(t){var e=t.fit(c,g);m.push({horizontal:!0,minSize:e,scale:t})};i.each(n,p),i.each(r,p),i.each(h,f),i.each(l,f);var v=a-2*o,b=e-2*s;i.each(m,function(t){t.horizontal?v-=t.minSize.height:b-=t.minSize.width});var x=function(t){var e=i.findNextWhere(m,function(e){return e.scale===t});e&&t.fit(e.minSize.width,v)},y=function(t){var e=i.findNextWhere(m,function(e){return e.scale===t}),a={left:w,right:C,top:0,bottom:0};e&&t.fit(b,e.minSize.height,a)},w=s,C=s,D=o,_=o;i.each(n,x),i.each(r,x),i.each(n,function(t){w+=t.width}),i.each(r,function(t){C+=t.width}),i.each(h,y),i.each(l,y),i.each(h,function(t){D+=t.height}),i.each(l,function(t){_+=t.height}),i.each(n,function(t){var e=i.findNextWhere(m,function(e){return e.scale===t}),a={left:0,right:0,top:D,bottom:_};e&&t.fit(e.minSize.width,v,a)}),i.each(r,function(t){var e=i.findNextWhere(m,function(e){return e.scale===t}),a={left:0,right:0,top:D,bottom:_};e&&t.fit(e.minSize.width,v,a)});var k=s,S=o,A=function(t){t.left=k,t.right=k+t.width,t.top=D,t.bottom=D+v,k=t.right},P=function(t){t.left=w,t.right=w+b,t.top=S,t.bottom=S+t.height,S=t.bottom};i.each(n,A),i.each(h,P),k+=b,S+=v,i.each(r,A),i.each(l,P),t.chartArea={left:w,top:D,right:w+b,bottom:D+v}}}}}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.global.tooltips={enabled:!0,custom:null,backgroundColor:"rgba(0,0,0,0.8)",fontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",fontSize:10,fontStyle:"normal",fontColor:"#fff",titleFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",titleFontSize:12,titleFontStyle:"bold",titleFontColor:"#fff",yPadding:6,xPadding:6,caretSize:8,cornerRadius:6,xOffset:10,template:["<% if(label){ %>","<%=label %>: ","<% } %>","<%=value %>"].join(""),multiTemplate:["<%if (datasetLabel){ %>","<%=datasetLabel %>: ","<% } %>","<%=value %>"].join(""),multiKeyBackground:"#fff"},e.Tooltip=e.Element.extend({initialize:function(){var t=this._options;i.extend(this,{_model:{xPadding:t.tooltips.xPadding,yPadding:t.tooltips.yPadding,xOffset:t.tooltips.xOffset,textColor:t.tooltips.fontColor,_fontFamily:t.tooltips.fontFamily,_fontStyle:t.tooltips.fontStyle,fontSize:t.tooltips.fontSize,titleTextColor:t.tooltips.titleFontColor,_titleFontFamily:t.tooltips.titleFontFamily,_titleFontStyle:t.tooltips.titleFontStyle,titleFontSize:t.tooltips.titleFontSize,caretHeight:t.tooltips.caretSize,cornerRadius:t.tooltips.cornerRadius,backgroundColor:t.tooltips.backgroundColor,opacity:0,legendColorBackground:t.tooltips.multiKeyBackground}})},update:function(){var t=this._chart.ctx;switch(this._options.hover.mode){case"single":i.extend(this._model,{text:i.template(this._options.tooltips.template,{element:this._active[0],value:this._data.datasets[this._active[0]._datasetIndex].data[this._active[0]._index],label:this._data.labels?this._data.labels[this._active[0]._index]:""})});var e=this._active[0].tooltipPosition();i.extend(this._model,{x:Math.round(e.x),y:Math.round(e.y),caretPadding:e.padding});break;case"label":for(var a,s,o=[],n=[],r=this._data.datasets.length-1;r>=0&&(a=this._data.datasets[r].metaData,s=i.indexOf(a,this._active[0]),-1===s);r--);var h=function(){var t,e,a,r,h,l=[],c=[],u=[];return i.each(this._data.datasets,function(e){t=e.metaData,t[s]&&t[s].hasValue()&&l.push(t[s])},this),i.each(this._options.stacked?l.reverse():l,function(t){c.push(t._view.x),u.push(t._view.y),o.push(i.template(this._options.tooltips.multiTemplate,{element:t,datasetLabel:this._data.datasets[t._datasetIndex].label,value:this._data.datasets[t._datasetIndex].data[t._index]})),n.push({fill:t._view.backgroundColor,stroke:t._view.borderColor})},this),h=i.min(u),a=i.max(u),r=i.min(c),e=i.max(c),{x:r>this._chart.width/2?r:e,y:(h+a)/2}}.call(this,s);i.extend(this._model,{x:h.x,y:h.y,labels:o,title:this._data.labels&&this._data.labels.length?this._data.labels[this._active[0]._index]:"",legendColors:n,legendBackgroundColor:this._options.tooltips.multiKeyBackground}),this._model.height=o.length*this._model.fontSize+(o.length-1)*(this._model.fontSize/2)+2*this._model.yPadding+1.5*this._model.titleFontSize;var l=t.measureText(this._model.title).width,c=i.longestText(t,this.font,o)+this._model.fontSize+3,u=i.max([c,l]);this._model.width=u+2*this._model.xPadding;var d=this._model.height/2;this._model.y-d<0?this._model.y=d:this._model.y+d>this._chart.height&&(this._model.y=this._chart.height-d),this._model.x>this._chart.width/2?this._model.x-=this._model.xOffset+this._model.width:this._model.x+=this._model.xOffset}return this},draw:function(){var t=this._chart.ctx,e=this._view;switch(this._options.hover.mode){case"single":t.font=i.fontString(e.fontSize,e._fontStyle,e._fontFamily),e.xAlign="center",e.yAlign="above";var a=e.caretPadding||2,s=t.measureText(e.text).width+2*e.xPadding,o=e.fontSize+2*e.yPadding,n=o+e.caretHeight+a;e.x+s/2>this._chart.width?e.xAlign="left":e.x-s/2<0&&(e.xAlign="right"),e.y-n<0&&(e.yAlign="below");var r=e.x-s/2,h=e.y-n;if(t.fillStyle=i.color(e.backgroundColor).alpha(e.opacity).rgbString(),this._options.tooltips.custom&&this._options.tooltips.custom(this),!this._options.tooltips.enabled)return;switch(e.yAlign){case"above":t.beginPath(),t.moveTo(e.x,e.y-a),t.lineTo(e.x+e.caretHeight,e.y-(a+e.caretHeight)),t.lineTo(e.x-e.caretHeight,e.y-(a+e.caretHeight)),t.closePath(),t.fill();break;case"below":h=e.y+a+e.caretHeight,t.beginPath(),t.moveTo(e.x,e.y+a),t.lineTo(e.x+e.caretHeight,e.y+a+e.caretHeight),t.lineTo(e.x-e.caretHeight,e.y+a+e.caretHeight),t.closePath(),t.fill()}switch(e.xAlign){case"left":r=e.x-s+(e.cornerRadius+e.caretHeight);break;case"right":r=e.x-(e.cornerRadius+e.caretHeight)}i.drawRoundedRectangle(t,r,h,s,o,e.cornerRadius),t.fill(),t.fillStyle=i.color(e.textColor).alpha(e.opacity).rgbString(),t.textAlign="center",t.textBaseline="middle",t.fillText(e.text,r+s/2,h+o/2);break;case"label":if(this._options.tooltips.custom&&this._options.tooltips.custom(this),!this._options.tooltips.enabled)return;i.drawRoundedRectangle(t,e.x,e.y-e.height/2,e.width,e.height,e.cornerRadius),t.fillStyle=i.color(e.backgroundColor).alpha(e.opacity).rgbString(),t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=i.color(e.titleTextColor).alpha(e.opacity).rgbString(),t.font=i.fontString(e.fontSize,e._titleFontStyle,e._titleFontFamily),t.fillText(e.title,e.x+e.xPadding,this.getLineHeight(0)),t.font=i.fontString(e.fontSize,e._fontStyle,e._fontFamily),i.each(e.labels,function(a,s){t.fillStyle=i.color(e.textColor).alpha(e.opacity).rgbString(),t.fillText(a,e.x+e.xPadding+e.fontSize+3,this.getLineHeight(s+1)),t.fillStyle=i.color(e.legendColors[s].stroke).alpha(e.opacity).rgbString(),t.fillRect(e.x+e.xPadding-1,this.getLineHeight(s+1)-e.fontSize/2-1,e.fontSize+2,e.fontSize+2),t.fillStyle=i.color(e.legendColors[s].fill).alpha(e.opacity).rgbString(),t.fillRect(e.x+e.xPadding,this.getLineHeight(s+1)-e.fontSize/2,e.fontSize,e.fontSize)},this)}},getLineHeight:function(t){var e=this._view.y-this._view.height/2+this._view.yPadding,i=t-1;return 0===t?e+this._view.titleFontSize/2:e+(1.5*this._view.fontSize*i+this._view.fontSize/2)+1.5*this._view.titleFontSize}})}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.bar={hover:{mode:"label"},scales:{xAxes:[{type:"category",categorySpacing:10,spacing:1,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}},e.controllers.bar=function(t,e){this.initialize.call(this,t,e)},i.extend(e.controllers.bar.prototype,{initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){this.getDataset().xAxisID||(this.getDataset().xAxisID=this.chart.options.scales.xAxes[0].id),this.getDataset().yAxisID||(this.getDataset().yAxisID=this.chart.options.scales.yAxes[0].id)
11
+ },getDataset:function(){return this.chart.data.datasets[this.index]},getScaleForId:function(t){return this.chart.scales[t]},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],i.each(this.getDataset().data,function(t,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new e.elements.Rectangle({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(t){this.getDataset().metaData=this.getDataset().metaData||[];var i=new e.elements.Rectangle({_chart:this.chart.chart,_datasetIndex:this.index,_index:t});this.updateElement(i,t,!0),this.getDataset().metaData.splice(t,0,i)},removeElement:function(t){this.getDataset().metaData.splice(t,1)},reset:function(){this.update(!0)},update:function(t){i.each(this.getDataset().metaData,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,e,a){var s,o=this.getScaleForId(this.getDataset().xAxisID),n=this.getScaleForId(this.getDataset().yAxisID);s=n.getPixelForValue(n.min<0&&n.max<0?n.max:n.min>0&&n.max>0?n.min:0),i.extend(t,{_chart:this.chart.chart,_xScale:o,_yScale:n,_datasetIndex:this.index,_index:e,_model:{x:o.calculateBarX(this.chart.data.datasets.length,this.index,e),y:a?s:n.calculateBarY(this.index,e),label:this.chart.data.labels[e],datasetLabel:this.getDataset().label,base:n.calculateBarBase(this.index,e),width:o.calculateBarWidth(this.chart.data.datasets.length),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().backgroundColor,e,this.chart.options.elements.rectangle.backgroundColor),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().borderColor,e,this.chart.options.elements.rectangle.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().borderWidth,e,this.chart.options.elements.rectangle.borderWidth)}}),t.pivot()},draw:function(t){var e=t||1;i.each(this.getDataset().metaData,function(t){t.transition(e).draw()},this)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:i.getValueAtIndexOrDefault(e.hoverBackgroundColor,a,i.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:i.getValueAtIndexOrDefault(e.hoverBorderColor,a,i.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:i.getValueAtIndexOrDefault(e.borderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var e=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().backgroundColor,e,this.chart.options.elements.rectangle.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().borderColor,e,this.chart.options.elements.rectangle.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().borderWidth,e,this.chart.options.elements.rectangle.borderWidth)}})}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.doughnut={animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},cutoutPercentage:50},e.defaults.pie=i.clone(e.defaults.doughnut),i.extend(e.defaults.pie,{cutoutPercentage:0}),e.controllers.doughnut=e.controllers.pie=function(t,e){this.initialize.call(this,t,e)},i.extend(e.controllers.doughnut.prototype,{initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){},getDataset:function(){return this.chart.data.datasets[this.index]},getScaleForId:function(t){return this.chart.scales[t]},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],i.each(this.getDataset().data,function(t,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new e.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(t,i){this.getDataset().metaData=this.getDataset().metaData||[];var a=new e.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:t});this.getDataset().backgroundColor.splice(t,0,i),this.updateElement(a,t,!0),this.getDataset().metaData.splice(t,0,a)},removeElement:function(t){this.getDataset().metaData.splice(t,1)},reset:function(){this.update(!0)},update:function(t){this.chart.outerRadius=i.min([this.chart.chart.width,this.chart.chart.height])/2-this.chart.options.elements.arc.borderWidth/2,this.chart.innerRadius=this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.chart.data.datasets.length,this.getDataset().total=0,i.each(this.getDataset().data,function(t){this.getDataset().total+=Math.abs(t)},this),this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.index,this.innerRadius=this.outerRadius-this.chart.radiusLength,i.each(this.getDataset().metaData,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,e,a){var s={x:this.chart.chart.width/2,y:this.chart.chart.height/2,startAngle:Math.PI*-.5,circumference:this.chart.options.animation.animateRotate?0:this.calculateCircumference(this.getDataset().data[e]),outerRadius:this.chart.options.animation.animateScale?0:this.outerRadius,innerRadius:this.chart.options.animation.animateScale?0:this.innerRadius};i.extend(t,{_chart:this.chart.chart,_datasetIndex:this.index,_index:e,_model:a?s:{x:this.chart.chart.width/2,y:this.chart.chart.height/2,circumference:this.calculateCircumference(this.getDataset().data[e]),outerRadius:this.outerRadius,innerRadius:this.innerRadius,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().backgroundColor,e,this.chart.options.elements.arc.backgroundColor),hoverBackgroundColor:t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:i.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,e,this.chart.options.elements.arc.hoverBackgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().borderWidth,e,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().borderColor,e,this.chart.options.elements.arc.borderColor),label:i.getValueAtIndexOrDefault(this.getDataset().label,e,this.chart.data.labels[e])}}),a||(t._model.startAngle=0===e?Math.PI*-.5:this.getDataset().metaData[e-1]._model.endAngle,t._model.endAngle=t._model.startAngle+t._model.circumference,e<this.getDataset().data.length-1&&(this.getDataset().metaData[e+1]._model.startAngle=t._model.endAngle)),t.pivot()},draw:function(t){var e=t||1;i.each(this.getDataset().metaData,function(t){t.transition(e).draw()},this)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:i.getValueAtIndexOrDefault(e.hoverBackgroundColor,a,i.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:i.getValueAtIndexOrDefault(e.hoverBorderColor,a,i.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:i.getValueAtIndexOrDefault(e.borderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var e=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().backgroundColor,e,this.chart.options.elements.arc.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().borderColor,e,this.chart.options.elements.arc.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().borderWidth,e,this.chart.options.elements.arc.borderWidth)},calculateCircumference:function(t){return this.getDataset().total>0?1.999999*Math.PI*(t/this.getDataset().total):0}})}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.line={hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}},e.controllers.line=function(t,e){this.initialize.call(this,t,e)},i.extend(e.controllers.line.prototype,{initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){this.getDataset().xAxisID||(this.getDataset().xAxisID=this.chart.options.scales.xAxes[0].id),this.getDataset().yAxisID||(this.getDataset().yAxisID=this.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getScaleForId:function(t){return this.chart.scales[t]},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],this.getDataset().metaDataset=this.getDataset().metaDataset||new e.elements.Line({_chart:this.chart.chart,_datasetIndex:this.index,_points:this.getDataset().metaData}),i.each(this.getDataset().data,function(t,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new e.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(t){this.getDataset().metaData=this.getDataset().metaData||[];var i=new e.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:t});this.updateElement(i,t,!0),this.getDataset().metaData.splice(t,0,i),this.updateBezierControlPoints()},removeElement:function(t){this.getDataset().metaData.splice(t,1)},reset:function(){this.update(!0)},update:function(t){{var e,a=this.getDataset().metaDataset,s=this.getDataset().metaData,o=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID)}e=o.getPixelForValue(o.min<0&&o.max<0?o.max:o.min>0&&o.max>0?o.min:0),i.extend(a,{_scale:o,_datasetIndex:this.index,_children:s,_model:{tension:a.custom&&a.custom.tension?a.custom.tension:this.getDataset().tension||this.chart.options.elements.line.tension,backgroundColor:a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:this.getDataset().backgroundColor||this.chart.options.elements.line.backgroundColor,borderWidth:a.custom&&a.custom.borderWidth?a.custom.borderWidth:this.getDataset().borderWidth||this.chart.options.elements.line.borderWidth,borderColor:a.custom&&a.custom.borderColor?a.custom.borderColor:this.getDataset().borderColor||this.chart.options.elements.line.borderColor,borderCapStyle:a.custom&&a.custom.borderCapStyle?a.custom.borderCapStyle:this.getDataset().borderCapStyle||this.chart.options.elements.line.borderCapStyle,borderDash:a.custom&&a.custom.borderDash?a.custom.borderDash:this.getDataset().borderDash||this.chart.options.elements.line.borderDash,borderDashOffset:a.custom&&a.custom.borderDashOffset?a.custom.borderDashOffset:this.getDataset().borderDashOffset||this.chart.options.elements.line.borderDashOffset,borderJoinStyle:a.custom&&a.custom.borderJoinStyle?a.custom.borderJoinStyle:this.getDataset().borderJoinStyle||this.chart.options.elements.line.borderJoinStyle,fill:a.custom&&a.custom.fill?a.custom.fill:void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,skipNull:void 0!==this.getDataset().skipNull?this.getDataset().skipNull:this.chart.options.elements.line.skipNull,drawNull:void 0!==this.getDataset().drawNull?this.getDataset().drawNull:this.chart.options.elements.line.drawNull,scaleTop:o.top,scaleBottom:o.bottom,scaleZero:e}}),a.pivot(),i.each(s,function(e,i){this.updateElement(e,i,t)},this),this.updateBezierControlPoints()},updateElement:function(t,e,a){var s,o=this.getScaleForId(this.getDataset().yAxisID),n=this.getScaleForId(this.getDataset().xAxisID);s=o.getPixelForValue(o.min<0&&o.max<0?o.max:o.min>0&&o.max>0?o.min:0),i.extend(t,{_chart:this.chart.chart,_xScale:n,_yScale:o,_datasetIndex:this.index,_index:e,_model:{x:n.getPointPixelForValue(this.getDataset().data[e],e,this.index),y:a?s:o.getPointPixelForValue(this.getDataset().data[e],e,this.index),tension:t.custom&&t.custom.tension?t.custom.tension:this.chart.options.elements.line.tension,radius:t.custom&&t.custom.radius?t.custom.radius:i.getValueAtIndexOrDefault(this.getDataset().radius,e,this.chart.options.elements.point.radius),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,e,this.chart.options.elements.point.backgroundColor),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,e,this.chart.options.elements.point.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,e,this.chart.options.elements.point.borderWidth),skip:t.custom&&t.custom.skip?t.custom.skip:null===this.getDataset().data[e],hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:i.getValueAtIndexOrDefault(this.getDataset().hitRadius,e,this.chart.options.elements.point.hitRadius)}})},updateBezierControlPoints:function(){i.each(this.getDataset().metaData,function(t,e){var a=i.splineCurve(i.previousItem(this.getDataset().metaData,e)._model,t._model,i.nextItem(this.getDataset().metaData,e)._model,t._model.tension);t._model.controlPointPreviousX=a.previous.x,t._model.controlPointNextX=a.next.x,t._model.controlPointNextY=a.next.y>this.chart.chartArea.bottom?this.chart.chartArea.bottom:a.next.y<this.chart.chartArea.top?this.chart.chartArea.top:a.next.y,t._model.controlPointPreviousY=a.previous.y>this.chart.chartArea.bottom?this.chart.chartArea.bottom:a.previous.y<this.chart.chartArea.top?this.chart.chartArea.top:a.previous.y,t.pivot()},this)},draw:function(t){var e=t||1;i.each(this.getDataset().metaData,function(t){t.transition(e)},this),this.getDataset().metaDataset.transition(e).draw(),i.each(this.getDataset().metaData,function(t){t.draw()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.radius=t.custom&&t.custom.radius?t.custom.radius:i.getValueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:i.getValueAtIndexOrDefault(e.pointHoverBorderColor,a,i.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:i.getValueAtIndexOrDefault(e.pointBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var e=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:i.getValueAtIndexOrDefault(this.getDataset().radius,e,this.chart.options.elements.point.radius),t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,e,this.chart.options.elements.point.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,e,this.chart.options.elements.point.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,e,this.chart.options.elements.point.borderWidth)}})}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.polarArea={scale:{type:"radialLinear",lineArc:!0},animateRotate:!0,animateScale:!0},e.controllers.polarArea=function(t,e){this.initialize.call(this,t,e)},i.extend(e.controllers.polarArea.prototype,{initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){},getDataset:function(){return this.chart.data.datasets[this.index]},getScaleForId:function(t){return this.chart.scales[t]},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],i.each(this.getDataset().data,function(t,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new e.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:i})},this)},addElementAndReset:function(t){this.getDataset().metaData=this.getDataset().metaData||[];var i=new e.elements.Arc({_chart:this.chart.chart,_datasetIndex:this.index,_index:t});this.updateElement(i,t,!0),this.getDataset().metaData.splice(t,0,i)},removeElement:function(t){this.getDataset().metaData.splice(t,1)},reset:function(){this.update(!0)},update:function(t){e.scaleService.fitScalesForChart(this,this.chart.width,this.chart.height),this.chart.scale.calculateRange(),this.chart.scale.generateTicks(),this.chart.scale.buildYLabels(),this.chart.outerRadius=(i.min([this.chart.chart.width,this.chart.chart.height])-this.chart.options.elements.arc.borderWidth/2)/2,this.chart.innerRadius=this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.chart.data.datasets.length,this.getDataset().total=0,i.each(this.getDataset().data,function(t){this.getDataset().total+=Math.abs(t)},this),this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.index,this.innerRadius=this.outerRadius-this.chart.radiusLength,i.each(this.getDataset().metaData,function(e,i){this.updateElement(e,i,t)},this)},updateElement:function(t,e,a){var s=1/this.getDataset().data.length*2,o=-.5*Math.PI+Math.PI*s*e,n=o+s*Math.PI,r={x:this.chart.chart.width/2,y:this.chart.chart.height/2,innerRadius:0,outerRadius:this.chart.options.animateScale?0:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[e]),startAngle:this.chart.options.animateRotate?Math.PI*-.5:o,endAngle:this.chart.options.animateRotate?Math.PI*-.5:n,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().backgroundColor,e,this.chart.options.elements.arc.backgroundColor),hoverBackgroundColor:t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:i.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,e,this.chart.options.elements.arc.hoverBackgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().borderWidth,e,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().borderColor,e,this.chart.options.elements.arc.borderColor),label:i.getValueAtIndexOrDefault(this.chart.data.labels,e,this.chart.data.labels[e])};i.extend(t,{_chart:this.chart.chart,_datasetIndex:this.index,_index:e,_model:a?r:{x:this.chart.chart.width/2,y:this.chart.chart.height/2,innerRadius:0,outerRadius:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[e]),startAngle:o,endAngle:n,backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().backgroundColor,e,this.chart.options.elements.arc.backgroundColor),hoverBackgroundColor:t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:i.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,e,this.chart.options.elements.arc.hoverBackgroundColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().borderWidth,e,this.chart.options.elements.arc.borderWidth),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().borderColor,e,this.chart.options.elements.arc.borderColor),label:i.getValueAtIndexOrDefault(this.chart.data.labels,e,this.chart.data.labels[e])}}),t.pivot()},draw:function(t){var e=t||1;i.each(this.getDataset().metaData,function(t){t.transition(e).draw()},this)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:i.getValueAtIndexOrDefault(e.hoverBackgroundColor,a,i.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:i.getValueAtIndexOrDefault(e.hoverBorderColor,a,i.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:i.getValueAtIndexOrDefault(e.borderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var e=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().backgroundColor,e,this.chart.options.elements.arc.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().borderColor,e,this.chart.options.elements.arc.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().borderWidth,e,this.chart.options.elements.arc.borderWidth)},calculateCircumference:function(t){return this.getDataset().total>0?2*Math.PI*(t/this.getDataset().total):0},updateScaleRange:function(){i.extend(this.chart.scale,{size:i.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})}})}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.radar={scale:{type:"radialLinear"},elements:{line:{tension:0}}},e.controllers.radar=function(t,e){this.initialize.call(this,t,e)},i.extend(e.controllers.radar.prototype,{initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){},getDataset:function(){return this.chart.data.datasets[this.index]},getScaleForId:function(t){return this.chart.scales[t]},addElements:function(){this.getDataset().metaData=this.getDataset().metaData||[],this.getDataset().metaDataset=this.getDataset().metaDataset||new e.elements.Line({_chart:this.chart.chart,_datasetIndex:this.index,_points:this.getDataset().metaData,_loop:!0}),i.each(this.getDataset().data,function(t,i){this.getDataset().metaData[i]=this.getDataset().metaData[i]||new e.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:i,_model:{x:0,y:0}})},this)},addElementAndReset:function(t){this.getDataset().metaData=this.getDataset().metaData||[];var i=new e.elements.Point({_chart:this.chart.chart,_datasetIndex:this.index,_index:t});this.updateElement(i,t,!0),this.getDataset().metaData.splice(t,0,i),this.updateBezierControlPoints()},removeElement:function(t){this.getDataset().metaData.splice(t,1)},reset:function(){this.update(!0)},update:function(t){var e,a=(this.getDataset().metaDataset,this.getDataset().metaData),s=this.chart.scale;s.setScaleSize(),s.calculateRange(),s.generateTicks(),s.buildYLabels(),e=s.min<0&&s.max<0?s.getPointPositionForValue(0,s.max):s.min>0&&s.max>0?s.getPointPositionForValue(0,s.min):s.getPointPositionForValue(0,0),i.extend(this.getDataset().metaDataset,{_datasetIndex:this.index,_children:this.getDataset().metaData,_model:{tension:this.getDataset().tension||this.chart.options.elements.line.tension,backgroundColor:this.getDataset().backgroundColor||this.chart.options.elements.line.backgroundColor,borderWidth:this.getDataset().borderWidth||this.chart.options.elements.line.borderWidth,borderColor:this.getDataset().borderColor||this.chart.options.elements.line.borderColor,fill:void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,skipNull:void 0!==this.getDataset().skipNull?this.getDataset().skipNull:this.chart.options.elements.line.skipNull,drawNull:void 0!==this.getDataset().drawNull?this.getDataset().drawNull:this.chart.options.elements.line.drawNull,scaleTop:s.top,scaleBottom:s.bottom,scaleZero:e}}),this.getDataset().metaDataset.pivot(),i.each(a,function(e,i){this.updateElement(e,i,t)},this),this.updateBezierControlPoints()},updateElement:function(t,e,a){var s=this.chart.scale.getPointPositionForValue(e,this.getDataset().data[e]);i.extend(t,{_datasetIndex:this.index,_index:e,_model:{x:a?this.chart.scale.xCenter:s.x,y:a?this.chart.scale.yCenter:s.y,tension:t.custom&&t.custom.tension?t.custom.tension:this.chart.options.elements.line.tension,radius:t.custom&&t.custom.radius?t.custom.pointRadius:i.getValueAtIndexOrDefault(this.getDataset().pointRadius,e,this.chart.options.elements.point.radius),backgroundColor:t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,e,this.chart.options.elements.point.backgroundColor),borderColor:t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,e,this.chart.options.elements.point.borderColor),borderWidth:t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,e,this.chart.options.elements.point.borderWidth),skip:t.custom&&t.custom.skip?t.custom.skip:null===this.getDataset().data[e],hitRadius:t.custom&&t.custom.hitRadius?t.custom.hitRadius:i.getValueAtIndexOrDefault(this.getDataset().hitRadius,e,this.chart.options.elements.point.hitRadius)}})},updateBezierControlPoints:function(){i.each(this.getDataset().metaData,function(t,e){var a=i.splineCurve(i.previousItem(this.getDataset().metaData,e,!0)._model,t._model,i.nextItem(this.getDataset().metaData,e,!0)._model,t._model.tension);t._model.controlPointPreviousX=a.previous.x,t._model.controlPointNextX=a.next.x,t._model.controlPointNextY=a.next.y>this.chart.chartArea.bottom?this.chart.chartArea.bottom:a.next.y<this.chart.chartArea.top?this.chart.chartArea.top:a.next.y,t._model.controlPointPreviousY=a.previous.y>this.chart.chartArea.bottom?this.chart.chartArea.bottom:a.previous.y<this.chart.chartArea.top?this.chart.chartArea.top:a.previous.y,t.pivot()},this)},draw:function(t){var e=t||1;i.each(this.getDataset().metaData,function(t){t.transition(e)},this),this.getDataset().metaDataset.transition(e).draw(),i.each(this.getDataset().metaData,function(t){t.draw()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],a=t._index;t._model.radius=t.custom&&t.custom.radius?t.custom.radius:i.getValueAtIndexOrDefault(e.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),t._model.backgroundColor=t.custom&&t.custom.hoverBackgroundColor?t.custom.hoverBackgroundColor:i.getValueAtIndexOrDefault(e.pointHoverBackgroundColor,a,i.color(t._model.backgroundColor).saturate(.5).darken(.1).rgbString()),t._model.borderColor=t.custom&&t.custom.hoverBorderColor?t.custom.hoverBorderColor:i.getValueAtIndexOrDefault(e.pointHoverBorderColor,a,i.color(t._model.borderColor).saturate(.5).darken(.1).rgbString()),t._model.borderWidth=t.custom&&t.custom.hoverBorderWidth?t.custom.hoverBorderWidth:i.getValueAtIndexOrDefault(e.pointBorderWidth,a,t._model.borderWidth)},removeHoverStyle:function(t){var e=(this.chart.data.datasets[t._datasetIndex],t._index);t._model.radius=t.custom&&t.custom.radius?t.custom.radius:i.getValueAtIndexOrDefault(this.getDataset().radius,e,this.chart.options.elements.point.radius),t._model.backgroundColor=t.custom&&t.custom.backgroundColor?t.custom.backgroundColor:i.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,e,this.chart.options.elements.point.backgroundColor),t._model.borderColor=t.custom&&t.custom.borderColor?t.custom.borderColor:i.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,e,this.chart.options.elements.point.borderColor),t._model.borderWidth=t.custom&&t.custom.borderWidth?t.custom.borderWidth:i.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,e,this.chart.options.elements.point.borderWidth)}})}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers,a={display:!0,position:"bottom",gridLines:{show:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawOnChartArea:!0,drawTicks:!0,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",offsetGridLines:!1},labels:{show:!0,maxRotation:90,template:"<%=value%>",fontSize:12,fontStyle:"normal",fontColor:"#666",fontFamily:"Helvetica Neue"}},s=e.Element.extend({isHorizontal:function(){return"top"==this.options.position||"bottom"==this.options.position},buildLabels:function(){this.labels=[],this.options.labels.userCallback?this.data.labels.forEach(function(t,e){this.labels.push(this.options.labels.userCallback(t,e))},this):this.labels=this.data.labels},getPixelForValue:function(t,e,i,a){if(this.isHorizontal()){var s=(this.labelRotation>0,this.width-(this.paddingLeft+this.paddingRight)),o=s/Math.max(this.labels.length-(this.options.gridLines.offsetGridLines?0:1),1),n=o*e+this.paddingLeft;return this.options.gridLines.offsetGridLines&&a&&(n+=o/2),this.left+Math.round(n)}return this.top+e*(this.height/this.labels.length)},getPointPixelForValue:function(t,e,i){return this.getPixelForValue(t,e,i,!0)},calculateBaseWidth:function(){return this.getPixelForValue(null,1,0,!0)-this.getPixelForValue(null,0,0,!0)-2*this.options.categorySpacing},calculateBarWidth:function(t){var e=this.calculateBaseWidth()-(t-1)*this.options.spacing;return this.options.stacked?e:e/t},calculateBarX:function(t,e,i){var a=this.calculateBaseWidth(),s=this.getPixelForValue(null,i,e,!0)-a/2,o=this.calculateBarWidth(t);return this.options.stacked?s+o/2:s+o*e+e*this.options.spacing+o/2},calculateLabelRotation:function(t,e){var a=i.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily);this.ctx.font=a;var s,o,n=this.ctx.measureText(this.labels[0]).width,r=this.ctx.measureText(this.labels[this.labels.length-1]).width;if(this.paddingRight=r/2+3,this.paddingLeft=n/2+3,this.labelRotation=0,this.options.display){var h,l,c=i.longestText(this.ctx,a,this.labels);this.labelWidth=c;for(var u=Math.floor(this.getPixelForValue(0,1)-this.getPixelForValue(0,0))-6;this.labelWidth>u+this.paddingLeft&&this.labelRotation<=this.options.labels.maxRotation;){if(h=Math.cos(i.toRadians(this.labelRotation)),l=Math.sin(i.toRadians(this.labelRotation)),s=h*n,o=h*r,s+this.options.labels.fontSize/2>this.yLabelWidth&&(this.paddingLeft=s+this.options.labels.fontSize/2),this.paddingRight=this.options.labels.fontSize/2,l*c>t){this.labelRotation--;break}this.labelRotation++,this.labelWidth=h*c}}else this.labelWidth=0,this.paddingRight=0,this.paddingLeft=0;e&&(this.paddingLeft-=e.left,this.paddingRight-=e.right,this.paddingLeft=Math.max(this.paddingLeft,0),this.paddingRight=Math.max(this.paddingRight,0))},fit:function(t,e,a){this.isHorizontal()?this.width=t:this.height=e,this.buildLabels(),this.calculateLabelRotation(e,a);var s={width:0,height:0},o=i.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily),n=i.longestText(this.ctx,o,this.labels);if(this.isHorizontal()?s.width=t:this.options.display&&(s.width=Math.min(n+6,t)),this.isHorizontal()&&this.options.display){var r=Math.sin(i.toRadians(this.labelRotation))*n+1.5*this.options.labels.fontSize;s.height=Math.min(r,e)
12
+ }else this.options.display&&(s.height=e);return this.width=s.width,this.height=s.height,s},draw:function(t){if(this.options.display){var e;if(this.ctx.fillStyle=this.options.labels.fontColor,this.isHorizontal()){e=!0;var a="bottom"==this.options.position?this.top:this.bottom-10,s="bottom"==this.options.position?this.top+10:this.bottom,o=0!==this.labelRotation,n=!1;(this.options.labels.fontSize+4)*this.labels.length>this.width-(this.paddingLeft+this.paddingRight)&&(n=1+Math.floor((this.options.labels.fontSize+4)*this.labels.length/(this.width-(this.paddingLeft+this.paddingRight)))),i.each(this.labels,function(r,h){if(!(n>1&&h%n>0)){var l=this.getPixelForValue(r,h,null,!1),c=this.getPixelForValue(r,h,null,!0);this.options.gridLines.show&&(0===h?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,e=!0):e&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,e=!1),l+=i.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(l,a),this.ctx.lineTo(l,s)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(l,t.top),this.ctx.lineTo(l,t.bottom)),this.ctx.stroke()),this.options.labels.show&&(this.ctx.save(),this.ctx.translate(c,o?this.top+12:this.top+8),this.ctx.rotate(-1*i.toRadians(this.labelRotation)),this.ctx.font=this.font,this.ctx.textAlign=o?"right":"center",this.ctx.textBaseline=o?"middle":"top",this.ctx.fillText(r,0,0),this.ctx.restore())}},this)}else this.options.gridLines.show,this.options.labels.show}}});e.scaleService.registerScaleType("category",s,a)}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers,a={display:!0,position:"left",gridLines:{show:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawOnChartArea:!0,drawTicks:!0,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)"},reverse:!1,beginAtZero:!1,override:null,labels:{show:!0,mirror:!1,padding:10,template:"<%=value.toLocaleString()%>",fontSize:12,fontStyle:"normal",fontColor:"#666",fontFamily:"Helvetica Neue"}},s=e.Element.extend({isHorizontal:function(){return"top"==this.options.position||"bottom"==this.options.position},generateTicks:function(t,e){if(this.ticks=[],this.options.override)for(var a=0;a<=this.options.override.steps;++a){var s=this.options.override.start+a*this.options.override.stepWidth;this.ticks.push(s)}else{var o;if(o=this.isHorizontal()?Math.min(11,Math.ceil(t/50)):Math.min(11,Math.ceil(e/(2*this.options.labels.fontSize))),o=Math.max(2,o),this.options.beginAtZero){var n=i.sign(this.min),r=i.sign(this.max);0>n&&0>r?this.max=0:n>0&&r>0&&(this.min=0)}for(var h=i.niceNum(this.max-this.min,!1),l=i.niceNum(h/(o-1),!0),c=Math.floor(this.min/l)*l,u=Math.ceil(this.max/l)*l,d=c;u>=d;d+=l)this.ticks.push(d)}("left"==this.options.position||"right"==this.options.position)&&this.ticks.reverse(),this.max=i.max(this.ticks),this.min=i.min(this.ticks),this.options.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max)},buildLabels:function(){this.labels=[],i.each(this.ticks,function(t,e,a){var s;this.options.labels.userCallback?s=this.options.labels.userCallback(t,e,a):this.options.labels.template&&(s=i.template(this.options.labels.template,{value:t})),this.labels.push(s?s:"")},this)},getRightValue:function(t){return"object"==typeof t?this.isHorizontal()?t.x:t.y:t},getPixelForValue:function(t){var e,i=this.end-this.start;if(this.isHorizontal()){var a=this.width-(this.paddingLeft+this.paddingRight);e=this.left+a/i*(t-this.start),e+=this.paddingLeft}else{var s=this.height-(this.paddingTop+this.paddingBottom);e=this.bottom-s/i*(t-this.start),e+=this.paddingTop}return e},calculateRange:function(){this.min=null,this.max=null;var t=[],e=[];if(this.options.stacked){i.each(this.data.datasets,function(a){(this.isHorizontal()?a.xAxisID===this.id:a.yAxisID===this.id)&&i.each(a.data,function(i,a){var s=this.getRightValue(i);t[a]=t[a]||0,e[a]=e[a]||0,this.options.relativePoints?t[a]=100:0>s?e[a]+=s:t[a]+=s},this)},this);var a=t.concat(e);this.min=i.min(a),this.max=i.max(a)}else i.each(this.data.datasets,function(t){(this.isHorizontal()?t.xAxisID===this.id:t.yAxisID===this.id)&&i.each(t.data,function(t){var e=this.getRightValue(t);null===this.min?this.min=e:e<this.min&&(this.min=e),null===this.max?this.max=e:e>this.max&&(this.max=e)},this)},this);this.min===this.max&&(this.min--,this.max++)},getPointPixelForValue:function(t,e,i){var a=this.getRightValue(t);if(this.options.stacked){for(var s=0,o=0,n=this.data.datasets.length-1;n>i;--n)this.data.datasets[n].data[e]<0?o+=this.data.datasets[n].data[e]:s+=this.data.datasets[n].data[e];return this.getPixelForValue(0>a?o+a:s+a)}return this.getPixelForValue(a)},calculateBarBase:function(t,e){var i=0;if(this.options.stacked){var a=this.data.datasets[t].data[e];if(0>a)for(var s=0;t>s;s++)this.data.datasets[s].yAxisID===this.id&&(i+=this.data.datasets[s].data[e]<0?this.data.datasets[s].data[e]:0);else for(var o=0;t>o;o++)this.data.datasets[o].yAxisID===this.id&&(i+=this.data.datasets[o].data[e]>0?this.data.datasets[o].data[e]:0);return this.getPixelForValue(i)}return i=this.getPixelForValue(this.min),this.beginAtZero||this.min<=0&&this.max>=0||this.min>=0&&this.max<=0?(i=this.getPixelForValue(0),i+=this.options.gridLines.lineWidth):this.min<0&&this.max<0&&(i=this.getPixelForValue(this.max)),i},calculateBarY:function(t,e){var i=this.data.datasets[t].data[e];if(this.options.stacked){for(var a=0,s=0,o=0;t>o;o++)this.data.datasets[o].data[e]<0?s+=this.data.datasets[o].data[e]||0:a+=this.data.datasets[o].data[e]||0;return this.getPixelForValue(0>i?s+i:a+i)}for(var n=0,r=t;r<this.data.datasets.length;r++)n+=r===t&&i?i:i;return this.getPixelForValue(i)},fit:function(t,e,a){this.calculateRange(),this.generateTicks(t,e),this.buildLabels();var s={width:0,height:0};if(s.width=this.isHorizontal()?t:this.options.gridLines.show&&this.options.display?10:0,s.height=this.isHorizontal()?this.options.gridLines.show&&this.options.display?10:0:e,this.paddingLeft=0,this.paddingRight=0,this.paddingTop=0,this.paddingBottom=0,this.options.labels.show&&this.options.display){var o=i.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily);if(this.isHorizontal()){var n=(e-s.height,1.5*this.options.labels.fontSize);s.height=Math.min(e,s.height+n);var o=i.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily);this.ctx.font=o;var r=this.ctx.measureText(this.labels[0]).width,h=this.ctx.measureText(this.labels[this.labels.length-1]).width;this.paddingLeft=r/2,this.paddingRight=h/2}else{var l=t-s.width,c=i.longestText(this.ctx,o,this.labels);l>c?(s.width+=c,s.width+=3):s.width=t,this.paddingTop=this.options.labels.fontSize/2,this.paddingBottom=this.options.labels.fontSize/2}}return a&&(this.paddingLeft-=a.left,this.paddingTop-=a.top,this.paddingRight-=a.right,this.paddingBottom-=a.bottom,this.paddingLeft=Math.max(this.paddingLeft,0),this.paddingTop=Math.max(this.paddingTop,0),this.paddingRight=Math.max(this.paddingRight,0),this.paddingBottom=Math.max(this.paddingBottom,0)),this.width=s.width,this.height=s.height,s},draw:function(t){if(this.options.display){var e,a;if(this.ctx.fillStyle=this.options.labels.fontColor,this.isHorizontal()){if(this.options.gridLines.show){e=!0,a=void 0!==i.findNextWhere(this.ticks,function(t){return 0===t});var s="bottom"==this.options.position?this.top:this.bottom-5,o="bottom"==this.options.position?this.top+5:this.bottom;i.each(this.ticks,function(n,r){var h=this.getPixelForValue(n);0===n||!a&&0===r?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,e=!0):e&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,e=!1),h+=i.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(h,s),this.ctx.lineTo(h,o)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(h,t.top),this.ctx.lineTo(h,t.bottom)),this.ctx.stroke()},this)}if(this.options.labels.show){var n;"top"==this.options.position?(n=this.bottom-10,this.ctx.textBaseline="bottom"):(n=this.top+10,this.ctx.textBaseline="top"),this.ctx.textAlign="center",this.ctx.font=i.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily),i.each(this.labels,function(t,e){var i=this.getPixelForValue(this.ticks[e]);this.ctx.fillText(t,i,n)},this)}}else{if(this.options.gridLines.show){e=!0,a=void 0!==i.findNextWhere(this.ticks,function(t){return 0===t});var r="right"==this.options.position?this.left:this.right-5,h="right"==this.options.position?this.left+5:this.right;i.each(this.ticks,function(s,o){var n=this.getPixelForValue(s);0===s||!a&&0===o?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,e=!0):e&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,e=!1),n+=i.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(r,n),this.ctx.lineTo(h,n)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(t.left,n),this.ctx.lineTo(t.right,n)),this.ctx.stroke()},this)}if(this.options.labels.show){var l;"left"==this.options.position?this.options.labels.mirror?(l=this.right+this.options.labels.padding,this.ctx.textAlign="left"):(l=this.right-this.options.labels.padding,this.ctx.textAlign="right"):this.options.labels.mirror?(l=this.left-this.options.labels.padding,this.ctx.textAlign="right"):(l=this.left+this.options.labels.padding,this.ctx.textAlign="left"),this.ctx.textBaseline="middle",this.ctx.font=i.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily),i.each(this.labels,function(t,e){var i=this.getPixelForValue(this.ticks[e]);this.ctx.fillText(t,l,i)},this)}}}}});e.scaleService.registerScaleType("linear",s,a)}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers,a={display:!0,animate:!0,lineArc:!1,gridLines:{show:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},angleLines:{show:!0,color:"rgba(0,0,0, 0.1)",lineWidth:1},beginAtZero:!0,labels:{show:!0,template:"<%=value.toLocaleString()%>",fontSize:12,fontStyle:"normal",fontColor:"#666",fontFamily:"Helvetica Neue",showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2},pointLabels:{fontFamily:"'Arial'",fontStyle:"normal",fontSize:10,fontColor:"#666"}},s=e.Element.extend({initialize:function(){this.height=this.chart.height,this.width=this.chart.width,this.xCenter=this.chart.width/2,this.yCenter=this.chart.height/2,this.size=i.min([this.height,this.width]),this.labels=this.data.labels,this.drawingArea=this.options.display?this.size/2-(this.options.labels.fontSize/2+this.options.labels.backdropPaddingY):this.size/2},getValueCount:function(){return this.data.labels.length},update:function(){this.options.lineArc?this.drawingArea=this.options.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},calculateRange:function(){this.min=null,this.max=null,i.each(this.data.datasets,function(t){i.each(t.data,function(t){null===this.min?this.min=t:t<this.min&&(this.min=t),null===this.max?this.max=t:t>this.max&&(this.max=t)},this)},this)},generateTicks:function(){if(this.ticks=[],this.options.override)for(var t=0;t<=this.options.override.steps;++t){var e=this.options.override.start+t*this.options.override.stepWidth;this.ticks.push(e)}else{var a=Math.min(11,Math.ceil(this.drawingArea/(2*this.options.labels.fontSize)));if(a=Math.max(2,a),this.options.beginAtZero){var s=i.sign(this.min),o=i.sign(this.max);0>s&&0>o?this.max=0:s>0&&o>0&&(this.min=0)}for(var n=i.niceNum(this.max-this.min,!1),r=i.niceNum(n/(a-1),!0),h=Math.floor(this.min/r)*r,l=Math.ceil(this.max/r)*r,c=h;l>=c;c+=r)this.ticks.push(c)}("left"==this.options.position||"right"==this.options.position)&&this.ticks.reverse(),this.max=i.max(this.ticks),this.min=i.min(this.ticks)},buildYLabels:function(){this.yLabels=[],i.each(this.ticks,function(t,e,a){var s;this.options.labels.userCallback?s=this.options.labels.userCallback(t,e,a):this.options.labels.template&&(s=i.template(this.options.labels.template,{value:t})),this.yLabels.push(s?s:"")},this)},getCircumference:function(){return 2*Math.PI/this.getValueCount()},setScaleSize:function(){var t,e,a,s,o,n,r,h,l,c,u,d,g=i.min([this.height/2-this.options.pointLabels.fontSize-5,this.width/2]),m=this.width,p=0;for(this.ctx.font=i.fontString(this.options.pointLabels.fontSize,this.options.pointLabels.fontStyle,this.options.pointLabels.fontFamily),e=0;e<this.getValueCount();e++)t=this.getPointPosition(e,g),a=this.ctx.measureText(i.template(this.options.labels.template,{value:this.labels[e]})).width+5,0===e||e===this.getValueCount()/2?(s=a/2,t.x+s>m&&(m=t.x+s,o=e),t.x-s<p&&(p=t.x-s,r=e)):e<this.getValueCount()/2?t.x+a>m&&(m=t.x+a,o=e):e>this.getValueCount()/2&&t.x-a<p&&(p=t.x-a,r=e);l=p,c=Math.ceil(m-this.width),n=this.getIndexAngle(o),h=this.getIndexAngle(r),u=c/Math.sin(n+Math.PI/2),d=l/Math.sin(h+Math.PI/2),u=i.isNumber(u)?u:0,d=i.isNumber(d)?d:0,this.drawingArea=g-(d+u)/2,this.setCenterPoint(d,u)},setCenterPoint:function(t,e){var i=this.width-e-this.drawingArea,a=t+this.drawingArea;this.xCenter=(a+i)/2,this.yCenter=this.height/2},getIndexAngle:function(t){var e=2*Math.PI/this.getValueCount();return t*e-Math.PI/2},getDistanceFromCenterForValue:function(t){var e=this.drawingArea/(this.max-this.min);return(t-this.min)*e},getPointPosition:function(t,e){var i=this.getIndexAngle(t);return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},draw:function(){if(this.options.display){var t=this.ctx;if(i.each(this.yLabels,function(e,a){if(a>0){var s=this.getDistanceFromCenterForValue(this.ticks[a]),o=this.yCenter-s;if(this.options.gridLines.show)if(t.strokeStyle=this.options.gridLines.color,t.lineWidth=this.options.gridLines.lineWidth,this.options.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,s,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var n=0;n<this.getValueCount();n++){var r=this.getPointPosition(n,this.getDistanceFromCenterForValue(this.ticks[a]));0===n?t.moveTo(r.x,r.y):t.lineTo(r.x,r.y)}t.closePath(),t.stroke()}if(this.options.labels.show){if(t.font=i.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily),this.options.labels.showLabelBackdrop){var h=t.measureText(e).width;t.fillStyle=this.options.labels.backdropColor,t.fillRect(this.xCenter-h/2-this.options.labels.backdropPaddingX,o-this.fontSize/2-this.options.labels.backdropPaddingY,h+2*this.options.labels.backdropPaddingX,this.options.labels.fontSize+2*this.options.labels.backdropPaddingY)}t.textAlign="center",t.textBaseline="middle",t.fillStyle=this.options.labels.fontColor,t.fillText(e,this.xCenter,o)}}},this),!this.options.lineArc){t.lineWidth=this.options.angleLines.lineWidth,t.strokeStyle=this.options.angleLines.color;for(var e=this.getValueCount()-1;e>=0;e--){if(this.options.angleLines.show){var a=this.getPointPosition(e,this.getDistanceFromCenterForValue(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke(),t.closePath()}var s=this.getPointPosition(e,this.getDistanceFromCenterForValue(this.max)+5);t.font=i.fontString(this.options.pointLabels.fontSize,this.options.pointLabels.fontStyle,this.options.pointLabels.fontFamily),t.fillStyle=this.options.pointLabels.fontColor;var o=this.labels.length,n=this.labels.length/2,r=n/2,h=r>e||e>o-r,l=e===r||e===o-r;t.textAlign=0===e?"center":e===n?"center":n>e?"left":"right",t.textBaseline=l?"middle":h?"bottom":"top",t.fillText(this.labels[e],s.x,s.y)}}}}});e.scaleService.registerScaleType("radialLinear",s,a)}.call(this),/*!
13
+ * Chart.js
14
+ * http://chartjs.org/
15
+ * Version: 2.0.0-alpha
16
+ *
17
+ * Copyright 2015 Nick Downie
18
+ * Released under the MIT license
19
+ * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
20
+ */
21
+ function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.global.elements.arc={backgroundColor:e.defaults.global.defaultColor,borderColor:"#fff",borderWidth:2},e.elements.Arc=e.Element.extend({inLabelRange:function(t){var e=this._view;return e?Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2):!1},inRange:function(t,e){var a=this._view,s=i.getAngleFromPoint(a,{x:t,y:e}),o=a.startAngle<-.5*Math.PI?a.startAngle+2*Math.PI:a.startAngle>1.5*Math.PI?a.startAngle-2*Math.PI:a.startAngle,n=a.endAngle<-.5*Math.PI?a.endAngle+2*Math.PI:a.endAngle>1.5*Math.PI?a.endAngle-2*Math.PI:a.endAngle,r=s.angle>=o&&s.angle<=n,h=s.distance>=a.innerRadius&&s.distance<=a.outerRadius;return r&&h},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,e.startAngle,e.endAngle),t.arc(e.x,e.y,e.innerRadius,e.endAngle,e.startAngle,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})}.call(this),/*!
22
+ * Chart.js
23
+ * http://chartjs.org/
24
+ * Version: 2.0.0-alpha
25
+ *
26
+ * Copyright 2015 Nick Downie
27
+ * Released under the MIT license
28
+ * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
29
+ */
30
+ function(){"use strict";var t=this,e=t.Chart,i=e.helpers;e.defaults.global.elements.line={tension:.4,backgroundColor:e.defaults.global.defaultColor,borderWidth:3,borderColor:e.defaults.global.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",fill:!0,skipNull:!0,drawNull:!1},e.elements.Line=e.Element.extend({draw:function(){var t=this._view,a=this._chart.ctx,s=this._children[0],o=this._children[this._children.length-1];a.save(),i.each(this._children,function(e,s){var o=i.previousItem(this._children,s),n=i.nextItem(this._children,s);return 0===s?void a.moveTo(e._view.x,e._view.y):(e._view.skip&&t.skipNull&&!this._loop?(a.lineTo(o._view.x,e._view.y),a.moveTo(n._view.x,e._view.y)):o._view.skip&&t.skipNull&&!this._loop&&(a.moveTo(e._view.x,o._view.y),a.lineTo(e._view.x,e._view.y)),void(o._view.skip&&t.skipNull?a.moveTo(e._view.x,e._view.y):t.tension>0?a.bezierCurveTo(o._view.controlPointNextX,o._view.controlPointNextY,e._view.controlPointPreviousX,e._view.controlPointPreviousY,e._view.x,e._view.y):a.lineTo(e._view.x,e._view.y)))},this),this._loop&&(t.tension>0&&!s._view.skip?a.bezierCurveTo(o._view.controlPointNextX,o._view.controlPointNextY,s._view.controlPointPreviousX,s._view.controlPointPreviousY,s._view.x,s._view.y):a.lineTo(s._view.x,s._view.y)),this._children.length>0&&t.fill&&(a.lineTo(this._children[this._children.length-1]._view.x,t.scaleZero),a.lineTo(this._children[0]._view.x,t.scaleZero),a.fillStyle=t.backgroundColor||e.defaults.global.defaultColor,a.closePath(),a.fill()),a.lineCap=t.borderCapStyle||e.defaults.global.elements.line.borderCapStyle,a.setLineDash(t.borderDash||e.defaults.global.elements.line.borderDash),a.lineDashOffset=t.borderDashOffset||e.defaults.global.elements.line.borderDashOffset,a.lineJoin=t.borderJoinStyle||e.defaults.global.elements.line.borderJoinStyle,a.lineWidth=t.borderWidth||e.defaults.global.defaultColor,a.strokeStyle=t.borderColor||e.defaults.global.defaultColor,a.beginPath(),i.each(this._children,function(e,s){var o=i.previousItem(this._children,s),n=i.nextItem(this._children,s);return 0===s?void a.moveTo(e._view.x,e._view.y):e._view.skip&&t.skipNull&&!this._loop?(a.moveTo(o._view.x,e._view.y),void a.moveTo(n._view.x,e._view.y)):o._view.skip&&t.skipNull&&!this._loop?(a.moveTo(e._view.x,o._view.y),void a.moveTo(e._view.x,e._view.y)):o._view.skip&&t.skipNull?void a.moveTo(e._view.x,e._view.y):void(t.tension>0?a.bezierCurveTo(o._view.controlPointNextX,o._view.controlPointNextY,e._view.controlPointPreviousX,e._view.controlPointPreviousY,e._view.x,e._view.y):a.lineTo(e._view.x,e._view.y))},this),this._loop&&!s._view.skip&&(t.tension>0?a.bezierCurveTo(o._view.controlPointNextX,o._view.controlPointNextY,s._view.controlPointPreviousX,s._view.controlPointPreviousY,s._view.x,s._view.y):a.lineTo(s._view.x,s._view.y)),a.stroke(),a.restore()}})}.call(this),/*!
31
+ * Chart.js
32
+ * http://chartjs.org/
33
+ * Version: 2.0.0-alpha
34
+ *
35
+ * Copyright 2015 Nick Downie
36
+ * Released under the MIT license
37
+ * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
38
+ */
39
+ function(){"use strict";{var t=this,e=t.Chart;e.helpers}e.defaults.global.elements.point={radius:3,backgroundColor:e.defaults.global.defaultColor,borderWidth:1,borderColor:e.defaults.global.defaultColor,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},e.elements.Point=e.Element.extend({inRange:function(t,e){var i=this._view,a=i.hitRadius+i.radius;return Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(a,2)},inLabelRange:function(t){var e=this._view;return e?Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2):!1},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(){var t=this._view,i=this._chart.ctx;t.skip||(t.radius>0||t.borderWidth>0)&&(i.beginPath(),i.arc(t.x,t.y,t.radius||e.defaults.global.elements.point.radius,0,2*Math.PI),i.closePath(),i.strokeStyle=t.borderColor||e.defaults.global.defaultColor,i.lineWidth=t.borderWidth||e.defaults.global.elements.point.borderWidth,i.fillStyle=t.backgroundColor||e.defaults.global.defaultColor,i.fill(),i.stroke())}})}.call(this),function(){"use strict";{var t=this,e=t.Chart;e.helpers}e.defaults.global.elements.rectangle={backgroundColor:e.defaults.global.defaultColor,borderWidth:0,borderColor:e.defaults.global.defaultColor},e.elements.Rectangle=e.Element.extend({draw:function(){var t=this._chart.ctx,e=this._view,i=e.width/2,a=e.x-i,s=e.x+i,o=e.base-(e.base-e.y),n=e.borderWidth/2;e.borderWidth&&(a+=n,s-=n,o+=n),t.beginPath(),t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.moveTo(a,e.base),t.lineTo(a,o),t.lineTo(s,o),t.lineTo(s,e.base),t.fill(),e.borderWidth&&t.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=this._view;return i.y<i.base?t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.y&&e<=i.base:t>=i.x-i.width/2&&t<=i.x+i.width/2&&e>=i.base&&e<=i.y},inLabelRange:function(t){var e=this._view;return t>=e.x-e.width/2&&t<=e.x+e.width/2},tooltipPosition:function(){var t=this._view;return t.y<t.base?{x:t.x,y:t.y}:{x:t.x,y:t.base}}})}.call(this),function(){"use strict";{var t=this,e=t.Chart;e.helpers}e.Bar=function(t,i){return i.type="bar",new e(t,i)}}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers,a={legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i = 0; i < data.datasets[0].data.length; i++){%><li><span style="background-color:<%=data.datasets[0].backgroundColor[i]%>"><%if(data.labels && i < data.labels.length){%><%=data.labels[i]%><%}%></span></li><%}%></ul>'};e.Doughnut=function(t,s){return s.options=i.configMerge(a,s.options),s.type="doughnut",new e(t,s)}}.call(this),function(){"use strict";{var t=this,e=t.Chart;e.helpers}e.Line=function(t,i){return i.type="line",new e(t,i)}}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers,a={legendTemplate:'<ul class="<%=name.toLowerCase()%>-legend"><% for (var i = 0; i < data.datasets[0].data.length; i++){%><li><span style="background-color:<%=data.datasets[0].backgroundColor[i]%>"><%if(data.labels && i < data.labels.length){%><%=data.labels[i]%><%}%></span></li><%}%></ul>'};e.PolarArea=function(t,s){return s.options=i.configMerge(a,s.options),s.type="polarArea",new e(t,s)}}.call(this),function(){"use strict";{var t=this,e=t.Chart;e.helpers}e.Radar=function(t,i){return i.type="radar",new e(t,i)}}.call(this),function(){"use strict";var t=this,e=t.Chart,i=e.helpers,a={hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-1"}],yAxes:[{type:"linear",position:"left",id:"y-axis-1"}]},tooltips:{template:"(<%= value.x %>, <%= value.y %>)",multiTemplate:"<%if (datasetLabel){%><%=datasetLabel%>: <%}%>(<%= value.x %>, <%= value.y %>)"}};e.Scatter=function(t,s){return s.options=i.configMerge(a,s.options),s.type="line",new e(t,s)}}.call(this),!function t(e,i,a){function s(n,r){if(!i[n]){if(!e[n]){var h="function"==typeof require&&require;if(!r&&h)return h(n,!0);if(o)return o(n,!0);var l=new Error("Cannot find module '"+n+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[n]={exports:{}};e[n][0].call(c.exports,function(t){var i=e[n][1][t];return s(i?i:t)},c,c.exports,t,e,i,a)}return i[n].exports}for(var o="function"==typeof require&&require,n=0;n<a.length;n++)s(a[n]);return s}({1:[function(t,e){!function(){var i=t("color-convert"),a=t("color-string"),s=function(t){if(t instanceof s)return t;if(!(this instanceof s))return new s(t);if(this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},"string"==typeof t){var e=a.getRgba(t);if(e)this.setValues("rgb",e);else if(e=a.getHsla(t))this.setValues("hsl",e);else{if(!(e=a.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}}else if("object"==typeof t){var e=t;if(void 0!==e.r||void 0!==e.red)this.setValues("rgb",e);else if(void 0!==e.l||void 0!==e.lightness)this.setValues("hsl",e);else if(void 0!==e.v||void 0!==e.value)this.setValues("hsv",e);else if(void 0!==e.w||void 0!==e.whiteness)this.setValues("hwb",e);else{if(void 0===e.c&&void 0===e.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(t));this.setValues("cmyk",e)}}};s.prototype={rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){return 1!==this.values.alpha?this.values.hwb.concat([this.values.alpha]):this.values.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values.rgb;return t.concat([this.values.alpha])},hslaArray:function(){var t=this.values.hsl;return t.concat([this.values.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return a.hexString(this.values.rgb)},rgbString:function(){return a.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return a.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return a.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return a.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return a.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return a.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return a.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){return this.values.rgb[0]<<16|this.values.rgb[1]<<8|this.values.rgb[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var a=t[i]/255;e[i]=.03928>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb,e=(299*t[0]+587*t[1]+114*t[2])/1e3;return 128>e},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;3>e;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){return this.values.hsl[2]+=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},darken:function(t){return this.values.hsl[2]-=this.values.hsl[2]*t,this.setValues("hsl",this.values.hsl),this},saturate:function(t){return this.values.hsl[1]+=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},desaturate:function(t){return this.values.hsl[1]-=this.values.hsl[1]*t,this.setValues("hsl",this.values.hsl),this},whiten:function(t){return this.values.hwb[1]+=this.values.hwb[1]*t,this.setValues("hwb",this.values.hwb),this},blacken:function(t){return this.values.hwb[2]+=this.values.hwb[2]*t,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){return this.setValues("alpha",this.values.alpha-this.values.alpha*t),this},opaquer:function(t){return this.setValues("alpha",this.values.alpha+this.values.alpha*t),this},rotate:function(t){var e=this.values.hsl[0];return e=(e+t)%360,e=0>e?360+e:e,this.values.hsl[0]=e,this.setValues("hsl",this.values.hsl),this},mix:function(t,e){e=1-(null==e?.5:e);for(var i=2*e-1,a=this.alpha()-t.alpha(),s=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,o=1-s,n=this.rgbArray(),r=t.rgbArray(),h=0;h<n.length;h++)n[h]=n[h]*s+r[h]*o;this.setValues("rgb",n);var l=this.alpha()*e+t.alpha()*(1-e);return this.setValues("alpha",l),this},toJSON:function(){return this.rgb()},clone:function(){return new s(this.rgb())}},s.prototype.getValues=function(t){for(var e={},i=0;i<t.length;i++)e[t.charAt(i)]=this.values[t][i];return 1!=this.values.alpha&&(e.a=this.values.alpha),e},s.prototype.setValues=function(t,e){var a={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},s={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o=1;if("alpha"==t)o=e;else if(e.length)this.values[t]=e.slice(0,t.length),o=e[t.length];else if(void 0!==e[t.charAt(0)]){for(var n=0;n<t.length;n++)this.values[t][n]=e[t.charAt(n)];o=e.a}else if(void 0!==e[a[t][0]]){for(var r=a[t],n=0;n<t.length;n++)this.values[t][n]=e[r[n]];o=e.alpha}if(this.values.alpha=Math.max(0,Math.min(1,void 0!==o?o:this.values.alpha)),"alpha"!=t){for(var n=0;n<t.length;n++){var h=Math.max(0,Math.min(s[t][n],this.values[t][n]));this.values[t][n]=Math.round(h)}for(var l in a){l!=t&&(this.values[l]=i[t][l](this.values[t]));for(var n=0;n<l.length;n++){var h=Math.max(0,Math.min(s[l][n],this.values[l][n]));this.values[l][n]=Math.round(h)}}return!0}},s.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},s.prototype.setChannel=function(t,e,i){return void 0===i?this.values[t][e]:(this.values[t][e]=i,this.setValues(t,this.values[t]),this)},window.Color=e.exports=s}()},{"color-convert":3,"color-string":4}],2:[function(t,e){function i(t){var e,i,a,s=t[0]/255,o=t[1]/255,n=t[2]/255,r=Math.min(s,o,n),h=Math.max(s,o,n),l=h-r;return h==r?e=0:s==h?e=(o-n)/l:o==h?e=2+(n-s)/l:n==h&&(e=4+(s-o)/l),e=Math.min(60*e,360),0>e&&(e+=360),a=(r+h)/2,i=h==r?0:.5>=a?l/(h+r):l/(2-h-r),[e,100*i,100*a]}function a(t){var e,i,a,s=t[0],o=t[1],n=t[2],r=Math.min(s,o,n),h=Math.max(s,o,n),l=h-r;return i=0==h?0:l/h*1e3/10,h==r?e=0:s==h?e=(o-n)/l:o==h?e=2+(n-s)/l:n==h&&(e=4+(s-o)/l),e=Math.min(60*e,360),0>e&&(e+=360),a=h/255*1e3/10,[e,i,a]}function s(t){var e=t[0],a=t[1],s=t[2],o=i(t)[0],n=1/255*Math.min(e,Math.min(a,s)),s=1-1/255*Math.max(e,Math.max(a,s));return[o,100*n,100*s]}function o(t){var e,i,a,s,o=t[0]/255,n=t[1]/255,r=t[2]/255;return s=Math.min(1-o,1-n,1-r),e=(1-o-s)/(1-s)||0,i=(1-n-s)/(1-s)||0,a=(1-r-s)/(1-s)||0,[100*e,100*i,100*a,100*s]}function n(t){return Z[JSON.stringify(t)]}function h(t){var e=t[0]/255,i=t[1]/255,a=t[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92;var s=.4124*e+.3576*i+.1805*a,o=.2126*e+.7152*i+.0722*a,n=.0193*e+.1192*i+.9505*a;return[100*s,100*o,100*n]}function l(t){var e,i,a,s=h(t),o=s[0],n=s[1],r=s[2];return o/=95.047,n/=100,r/=108.883,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,e=116*n-16,i=500*(o-n),a=200*(n-r),[e,i,a]}function c(t){return L(l(t))}function u(t){var e,i,a,s,o,n=t[0]/360,r=t[1]/100,h=t[2]/100;if(0==r)return o=255*h,[o,o,o];i=.5>h?h*(1+r):h+r-h*r,e=2*h-i,s=[0,0,0];for(var l=0;3>l;l++)a=n+1/3*-(l-1),0>a&&a++,a>1&&a--,o=1>6*a?e+6*(i-e)*a:1>2*a?i:2>3*a?e+(i-e)*(2/3-a)*6:e,s[l]=255*o;return s}function d(t){var e,i,a=t[0],s=t[1]/100,o=t[2]/100;return o*=2,s*=1>=o?o:2-o,i=(o+s)/2,e=2*s/(o+s),[a,100*e,100*i]}function m(t){return s(u(t))}function p(t){return o(u(t))}function f(t){return n(u(t))}function v(t){var e=t[0]/60,i=t[1]/100,a=t[2]/100,s=Math.floor(e)%6,o=e-Math.floor(e),n=255*a*(1-i),r=255*a*(1-i*o),h=255*a*(1-i*(1-o)),a=255*a;switch(s){case 0:return[a,h,n];case 1:return[r,a,n];case 2:return[n,a,h];case 3:return[n,r,a];case 4:return[h,n,a];case 5:return[a,n,r]}}function x(t){var e,i,a=t[0],s=t[1]/100,o=t[2]/100;return i=(2-s)*o,e=s*o,e/=1>=i?i:2-i,e=e||0,i/=2,[a,100*e,100*i]}function y(t){return s(v(t))}function w(t){return o(v(t))}function C(t){return n(v(t))}function D(t){var e,i,a,s,o=t[0]/360,n=t[1]/100,h=t[2]/100,l=n+h;switch(l>1&&(n/=l,h/=l),e=Math.floor(6*o),i=1-h,a=6*o-e,0!=(1&e)&&(a=1-a),s=n+a*(i-n),e){default:case 6:case 0:r=i,g=s,b=n;break;case 1:r=s,g=i,b=n;break;case 2:r=n,g=i,b=s;break;case 3:r=n,g=s,b=i;break;case 4:r=s,g=n,b=i;break;case 5:r=i,g=n,b=s}return[255*r,255*g,255*b]}function _(t){return i(D(t))}function k(t){return a(D(t))}function S(t){return o(D(t))}function A(t){return n(D(t))}function P(t){var e,i,a,s=t[0]/100,o=t[1]/100,n=t[2]/100,r=t[3]/100;return e=1-Math.min(1,s*(1-r)+r),i=1-Math.min(1,o*(1-r)+r),a=1-Math.min(1,n*(1-r)+r),[255*e,255*i,255*a]}function I(t){return i(P(t))}function M(t){return a(P(t))}function R(t){return s(P(t))}function W(t){return n(P(t))}function V(t){var e,i,a,s=t[0]/100,o=t[1]/100,n=t[2]/100;return e=3.2406*s+-1.5372*o+n*-.4986,i=s*-.9689+1.8758*o+.0415*n,a=.0557*s+o*-.204+1.057*n,e=e>.0031308?1.055*Math.pow(e,1/2.4)-.055:e=12.92*e,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i=12.92*i,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=12.92*a,e=Math.min(Math.max(0,e),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*e,255*i,255*a]}function O(t){var e,i,a,s=t[0],o=t[1],n=t[2];return s/=95.047,o/=100,n/=108.883,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,n=n>.008856?Math.pow(n,1/3):7.787*n+16/116,e=116*o-16,i=500*(s-o),a=200*(o-n),[e,i,a]}function z(t){return L(O(t))}function F(t){var e,i,a,s,o=t[0],n=t[1],r=t[2];return 8>=o?(i=100*o/903.3,s=7.787*(i/100)+16/116):(i=100*Math.pow((o+16)/116,3),s=Math.pow(i/100,1/3)),e=.008856>=e/95.047?e=95.047*(n/500+s-16/116)/7.787:95.047*Math.pow(n/500+s,3),a=.008859>=a/108.883?a=108.883*(s-r/200-16/116)/7.787:108.883*Math.pow(s-r/200,3),[e,i,a]}function L(t){var e,i,a,s=t[0],o=t[1],n=t[2];return e=Math.atan2(n,o),i=360*e/2/Math.PI,0>i&&(i+=360),a=Math.sqrt(o*o+n*n),[s,a,i]}function B(t){return V(F(t))}function T(t){var e,i,a,s=t[0],o=t[1],n=t[2];return a=n/360*2*Math.PI,e=o*Math.cos(a),i=o*Math.sin(a),[s,e,i]}function E(t){return F(T(t))}function N(t){return B(T(t))}function H(t){return U[t]}function q(t){return i(H(t))}function j(t){return a(H(t))}function Y(t){return s(H(t))}function X(t){return o(H(t))}function J(t){return l(H(t))}function Q(t){return h(H(t))}e.exports={rgb2hsl:i,rgb2hsv:a,rgb2hwb:s,rgb2cmyk:o,rgb2keyword:n,rgb2xyz:h,rgb2lab:l,rgb2lch:c,hsl2rgb:u,hsl2hsv:d,hsl2hwb:m,hsl2cmyk:p,hsl2keyword:f,hsv2rgb:v,hsv2hsl:x,hsv2hwb:y,hsv2cmyk:w,hsv2keyword:C,hwb2rgb:D,hwb2hsl:_,hwb2hsv:k,hwb2cmyk:S,hwb2keyword:A,cmyk2rgb:P,cmyk2hsl:I,cmyk2hsv:M,cmyk2hwb:R,cmyk2keyword:W,keyword2rgb:H,keyword2hsl:q,keyword2hsv:j,keyword2hwb:Y,keyword2cmyk:X,keyword2lab:J,keyword2xyz:Q,xyz2rgb:V,xyz2lab:O,xyz2lch:z,lab2xyz:F,lab2rgb:B,lab2lch:L,lch2lab:T,lch2xyz:E,lch2rgb:N};var U={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Z={};for(var $ in U)Z[JSON.stringify(U[$])]=$},{}],3:[function(t,e){var i=t("./conversions"),a=function(){return new h};for(var s in i){a[s+"Raw"]=function(t){return function(e){return"number"==typeof e&&(e=Array.prototype.slice.call(arguments)),i[t](e)}}(s);var o=/(\w+)2(\w+)/.exec(s),n=o[1],r=o[2];a[n]=a[n]||{},a[n][r]=a[s]=function(t){return function(e){"number"==typeof e&&(e=Array.prototype.slice.call(arguments));var a=i[t](e);if("string"==typeof a||void 0===a)return a;for(var s=0;s<a.length;s++)a[s]=Math.round(a[s]);return a}}(s)}var h=function(){this.convs={}};h.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},h.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},h.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,s=this.convs[i];e=a[i][t](s),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(t){h.prototype[t]=function(){return this.routeSpace(t,arguments)}}),e.exports=a},{"./conversions":2}],4:[function(t,e){function i(t){if(t){var e=/^#([a-fA-F0-9]{3})$/,i=/^#([a-fA-F0-9]{6})$/,a=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,s=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,o=/(\D+)/,n=[0,0,0],r=1,h=t.match(e);if(h){h=h[1];for(var l=0;l<n.length;l++)n[l]=parseInt(h[l]+h[l],16)}else if(h=t.match(i)){h=h[1];for(var l=0;l<n.length;l++)n[l]=parseInt(h.slice(2*l,2*l+2),16)}else if(h=t.match(a)){for(var l=0;l<n.length;l++)n[l]=parseInt(h[l+1]);r=parseFloat(h[4])}else if(h=t.match(s)){for(var l=0;l<n.length;l++)n[l]=Math.round(2.55*parseFloat(h[l+1]));r=parseFloat(h[4])}else if(h=t.match(o)){if("transparent"==h[1])return[0,0,0,0];if(n=x[h[1]],!n)return}for(var l=0;l<n.length;l++)n[l]=v(n[l],0,255);return r=r||0==r?v(r,0,1):1,n[3]=r,n}}function a(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var a=parseFloat(i[4]),s=v(parseInt(i[1]),0,360),o=v(parseFloat(i[2]),0,100),n=v(parseFloat(i[3]),0,100),r=v(isNaN(a)?1:a,0,1);return[s,o,n,r]}}}function s(t){if(t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,i=t.match(e);if(i){var a=parseFloat(i[4]),s=v(parseInt(i[1]),0,360),o=v(parseFloat(i[2]),0,100),n=v(parseFloat(i[3]),0,100),r=v(isNaN(a)?1:a,0,1);return[s,o,n,r]}}}function o(t){var e=i(t);return e&&e.slice(0,3)}function n(t){var e=a(t);return e&&e.slice(0,3)}function r(t){var e=i(t);return e?e[3]:(e=a(t))?e[3]:(e=s(t))?e[3]:void 0}function h(t){return"#"+b(t[0])+b(t[1])+b(t[2])}function l(t,e){return 1>e||t[3]&&t[3]<1?c(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function c(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function u(t,e){if(1>e||t[3]&&t[3]<1)return d(t,e);var i=Math.round(t[0]/255*100),a=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgb("+i+"%, "+a+"%, "+s+"%)"}function d(t,e){var i=Math.round(t[0]/255*100),a=Math.round(t[1]/255*100),s=Math.round(t[2]/255*100);return"rgba("+i+"%, "+a+"%, "+s+"%, "+(e||t[3]||1)+")"}function g(t,e){return 1>e||t[3]&&t[3]<1?m(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function m(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function f(t){return y[t.slice(0,3)]}function v(t,e,i){return Math.min(Math.max(e,t),i)}function b(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var x=t("color-name");e.exports={getRgba:i,getHsla:a,getRgb:o,getHsl:n,getHwb:s,getAlpha:r,hexString:h,rgbString:l,rgbaString:c,percentString:u,percentaString:d,hslString:g,hslaString:m,hwbString:p,keyword:f};var y={};for(var w in x)y[x[w]]=w},{"color-name":5}],5:[function(t,e){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}]},{},[1]);
@@ -0,0 +1,137 @@
1
+ var gulp = require('gulp'),
2
+ concat = require('gulp-concat'),
3
+ uglify = require('gulp-uglify'),
4
+ util = require('gulp-util'),
5
+ jshint = require('gulp-jshint'),
6
+ size = require('gulp-size'),
7
+ connect = require('gulp-connect'),
8
+ replace = require('gulp-replace'),
9
+ htmlv = require('gulp-html-validator'),
10
+ inquirer = require('inquirer'),
11
+ semver = require('semver'),
12
+ exec = require('child_process').exec,
13
+ fs = require('fs'),
14
+ package = require('./package.json'),
15
+ bower = require('./bower.json');
16
+
17
+ var srcDir = './src/';
18
+ /*
19
+ * Usage : gulp build --types=Bar,Line,Doughnut
20
+ * Output: - A built Chart.js file with Core and types Bar, Line and Doughnut concatenated together
21
+ * - A minified version of this code, in Chart.min.js
22
+ */
23
+
24
+ gulp.task('build', function(){
25
+
26
+ // Default to all of the chart types, with Chart.Core first
27
+ var srcFiles = [FileName('Core')],
28
+ isCustom = !!(util.env.types),
29
+ outputDir = (isCustom) ? 'custom' : '.';
30
+ if (isCustom){
31
+ util.env.types.split(',').forEach(function(type){ return srcFiles.push(FileName(type));});
32
+ }
33
+ else{
34
+ // Seems gulp-concat remove duplicates - nice!
35
+ // So we can use this to sort out dependency order - aka include Core first!
36
+ srcFiles.push(srcDir+'*');
37
+ }
38
+
39
+ return gulp.src(srcFiles)
40
+ .pipe(concat('Chart.js'))
41
+ .pipe(replace('{{ version }}', package.version))
42
+ .pipe(gulp.dest(outputDir))
43
+ .pipe(uglify({preserveComments:'some'}))
44
+ .pipe(concat('Chart.min.js'))
45
+ .pipe(gulp.dest(outputDir));
46
+
47
+ function FileName(moduleName){
48
+ return srcDir+'Chart.'+moduleName+'.js';
49
+ }
50
+ });
51
+
52
+ /*
53
+ * Usage : gulp bump
54
+ * Prompts: Version increment to bump
55
+ * Output: - New version number written into package.json & bower.json
56
+ */
57
+
58
+ gulp.task('bump', function(complete){
59
+ util.log('Current version:', util.colors.cyan(package.version));
60
+ var choices = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'].map(function(versionType){
61
+ return versionType + ' (v' + semver.inc(package.version, versionType) + ')';
62
+ });
63
+ inquirer.prompt({
64
+ type: 'list',
65
+ name: 'version',
66
+ message: 'What version update would you like?',
67
+ choices: choices
68
+ }, function(res){
69
+ var increment = res.version.split(' ')[0],
70
+ newVersion = semver.inc(package.version, increment);
71
+
72
+ // Set the new versions into the bower/package object
73
+ package.version = newVersion;
74
+ bower.version = newVersion;
75
+
76
+ // Write these to their own files, then build the output
77
+ fs.writeFileSync('package.json', JSON.stringify(package, null, 2));
78
+ fs.writeFileSync('bower.json', JSON.stringify(bower, null, 2));
79
+
80
+ complete();
81
+ });
82
+ });
83
+
84
+ gulp.task('release', ['build'], function(){
85
+ exec('git tag -a v' + package.version);
86
+ });
87
+
88
+ gulp.task('jshint', function(){
89
+ return gulp.src(srcDir + '*.js')
90
+ .pipe(jshint())
91
+ .pipe(jshint.reporter('default'));
92
+ });
93
+
94
+ gulp.task('valid', function(){
95
+ return gulp.src('samples/*.html')
96
+ .pipe(htmlv());
97
+ });
98
+
99
+ gulp.task('library-size', function(){
100
+ return gulp.src('Chart.min.js')
101
+ .pipe(size({
102
+ gzip: true
103
+ }));
104
+ });
105
+
106
+ gulp.task('module-sizes', function(){
107
+ return gulp.src(srcDir + '*.js')
108
+ .pipe(uglify({preserveComments:'some'}))
109
+ .pipe(size({
110
+ showFiles: true,
111
+ gzip: true
112
+ }));
113
+ });
114
+
115
+ gulp.task('watch', function(){
116
+ gulp.watch('./src/*', ['build']);
117
+ });
118
+
119
+ gulp.task('test', ['jshint', 'valid']);
120
+
121
+ gulp.task('size', ['library-size', 'module-sizes']);
122
+
123
+ gulp.task('default', ['build', 'watch']);
124
+
125
+ gulp.task('server', function(){
126
+ connect.server({
127
+ port: 8000
128
+ });
129
+ });
130
+
131
+ // Convenience task for opening the project straight from the command line
132
+ gulp.task('_open', function(){
133
+ exec('open http://localhost:8000');
134
+ exec('subl .');
135
+ });
136
+
137
+ gulp.task('dev', ['server', 'default']);
@@ -41,7 +41,7 @@ module Caboose
41
41
  @tasks = {}
42
42
  @page_tasks = {}
43
43
  @is_real_page = false
44
- @ga_events = []
44
+ @ga_events = []
45
45
 
46
46
  #if @find_page
47
47
  @page = Page.page_with_uri(request.host_with_port, request.fullpath)
@@ -39,7 +39,8 @@ module Caboose
39
39
  params.each do |name, value|
40
40
  case name
41
41
  when 'name' then calendar.name = value
42
- when 'description' then calendar.description = value
42
+ when 'description' then calendar.description = value
43
+ when 'color' then calendar.color = value
43
44
  end
44
45
  end
45
46
 
@@ -49,6 +49,16 @@ module Caboose
49
49
  cat = id ? MediaCategory.find(id) : MediaCategory.top_category(@site.id)
50
50
  render :json => cat.api_hash
51
51
  end
52
+
53
+ # GET /admin/media/last-upload-processed
54
+ def admin_last_upload_processed
55
+ return if !user_is_allowed('media', 'view')
56
+ render :json => false and return if @site.nil?
57
+ #Setting.where(:site_id => @site.id, :name => 'last_upload_processed').destroy_all
58
+ s = Setting.where(:site_id => @site.id, :name => 'last_upload_processed').first
59
+ s = Setting.create(:site_id => @site.id, :name => 'last_upload_processed', :value => DateTime.now.utc.strftime("%FT%T%z")) if s.nil?
60
+ render :json => { :last_upload_processed => s.value }
61
+ end
52
62
 
53
63
  # GET /admin/media/new
54
64
  def admin_new
@@ -0,0 +1,63 @@
1
+ module Caboose
2
+ class OrdersController < Caboose::ApplicationController
3
+
4
+ # GET /admin/orders/summary-report
5
+ def admin_summary_report
6
+ return if !user_is_allowed('orders', 'view')
7
+
8
+ q = ["select
9
+ concat(date_part('year', date_authorized), '-', date_part('month', date_authorized), '-', date_part('day', date_authorized)),
10
+ count(*),
11
+ sum(total)
12
+ from store_orders
13
+ where site_id = ?
14
+ and (financial_status = ? or financial_status = ?)
15
+ and date_authorized >= ?
16
+ and date_authorized < ?
17
+ group by concat(date_part('year', date_authorized), '-', date_part('month', date_authorized), '-', date_part('day', date_authorized))
18
+ order by concat(date_part('year', date_authorized), '-', date_part('month', date_authorized), '-', date_part('day', date_authorized))",
19
+ @site.id, 'authorized', 'captured', @d1, @d2]
20
+ rows = ActiveRecord::Base.connection.select_rows(ActiveRecord::Base.send(:sanitize_sql_array, q))
21
+ return rows.collect { |row|
22
+ {
23
+ 'user_id' => row[0],
24
+ 'facility_id' => row[1],
25
+ 'amount' => row[2],
26
+ 'first_name' => row[3],
27
+ 'last_name' => row[4],
28
+ 'facility_name' => row[5],
29
+ 'vendor_type_name' => row[6],
30
+ 'anniversary_date' => row[7]
31
+ }
32
+ }
33
+
34
+ @pager = Caboose::PageBarGenerator.new(params, {
35
+ 'site_id' => @site.id,
36
+ 'customer_id' => '',
37
+ 'status' => Order::STATUS_PENDING,
38
+ 'shipping_method_code' => '',
39
+ 'id' => ''
40
+ }, {
41
+ 'model' => 'Caboose::Order',
42
+ 'sort' => 'id',
43
+ 'desc' => 1,
44
+ 'base_url' => '/admin/orders',
45
+ 'use_url_params' => false
46
+ })
47
+
48
+ @orders = @pager.items
49
+ @customers = Caboose::User.reorder('last_name, first_name').all
50
+
51
+ render :layout => 'caboose/admin'
52
+ end
53
+
54
+ # GET /admin/orders/new
55
+ def admin_new
56
+ return if !user_is_allowed('orders', 'add')
57
+ render :layout => 'caboose/admin'
58
+ end
59
+
60
+
61
+
62
+ end
63
+ end
@@ -209,6 +209,17 @@ module Caboose
209
209
  order.delay.send_payment_authorization_email
210
210
  render :json => { :success => true }
211
211
  end
212
+
213
+ # GET /admin/orders/summary-report
214
+ def admin_summary_report
215
+ return if !user_is_allowed('orders', 'view')
216
+
217
+ @d1 = params[:d1] ? DateTime.strptime("#{params[:d1]} 00:00:00", '%Y-%m-%d %H:%M:%S') : DateTime.strptime(DateTime.now.strftime("%Y-%m-01 00:00:00"), '%Y-%m-%d %H:%M:%S')
218
+ @d2 = params[:d2] ? DateTime.strptime("#{params[:d2]} 00:00:00", '%Y-%m-%d %H:%M:%S') : @d1 + 1.month
219
+ @rows = OrderReporter.summary_report(@site.id, @d1, @d2)
220
+
221
+ render :layout => 'caboose/admin'
222
+ end
212
223
 
213
224
  # GET /admin/orders/status-options
214
225
  def admin_status_options
@@ -30,7 +30,7 @@ module Caboose
30
30
 
31
31
  m = Media.where(:media_category_id => media_category_id, :original_name => original_name, :name => name).first
32
32
  m = Media.create(:media_category_id => media_category_id, :original_name => original_name, :name => name, :processed => false) if m.nil?
33
- m.process
33
+ m.process
34
34
 
35
35
  end
36
36
  end
@@ -2,6 +2,6 @@ module Caboose
2
2
  class Calendar < ActiveRecord::Base
3
3
  self.table_name = "calendars"
4
4
  has_many :calendar_events, :dependent => :destroy
5
- attr_accessible :id, :site_id, :name, :description
5
+ attr_accessible :id, :site_id, :name, :description, :color
6
6
  end
7
7
  end
@@ -53,14 +53,12 @@ class Caboose::Media < ActiveRecord::Base
53
53
  self.processed = true
54
54
  self.save
55
55
 
56
- # Set the downloadable file names
57
- #bucket = AWS::S3::Bucket.new(bucket)
58
- #['tiny', 'thumb', 'large'].each do |style|
59
- # obj = bucket.objects["media/#{self.id}_#{style}#{ext}"]
60
- # obj.content_disposition = 'attachment; filename="' + self.name + '"'
61
- # obj.store
62
- #end
63
-
56
+ # Remember when the last upload processing happened
57
+ s = Setting.where(:site_id => self.media_category.site_id, :name => 'last_upload_processed').first
58
+ s = Setting.create(:site_id => self.media_category.site_id, :name => 'last_upload_processed') if s.nil?
59
+ s.value = DateTime.now.utc.strftime("%FT%T%z")
60
+ s.save
61
+
64
62
  # Remove the temp file
65
63
  bucket = AWS::S3::Bucket.new(bucket)
66
64
  obj = bucket.objects[key]
@@ -0,0 +1,57 @@
1
+
2
+ module Caboose
3
+ class OrderReporter
4
+
5
+ def OrderReporter.summary_report(site_id, d1, d2)
6
+ q = ["select
7
+ concat(date_part('year', date_authorized), '-', date_part('month', date_authorized), '-', date_part('day', date_authorized)),
8
+ count(*),
9
+ sum(total)
10
+ from store_orders
11
+ where site_id = ?
12
+ and (financial_status = ? or financial_status = ?)
13
+ and date_authorized >= ?
14
+ and date_authorized < ?
15
+ group by concat(date_part('year', date_authorized), '-', date_part('month', date_authorized), '-', date_part('day', date_authorized))
16
+ order by concat(date_part('year', date_authorized), '-', date_part('month', date_authorized), '-', date_part('day', date_authorized))",
17
+ site_id, 'authorized', 'captured', d1, d2]
18
+ rows = ActiveRecord::Base.connection.select_rows(ActiveRecord::Base.send(:sanitize_sql_array, q))
19
+
20
+ days = []
21
+ rows.each do |row|
22
+ arr = row[0].split('-')
23
+ days << Caboose::StdClass.new(
24
+ :date => Date.new(arr[0].to_i, arr[1].to_i, arr[2].to_i),
25
+ :count => row[1],
26
+ :total => row[2]
27
+ )
28
+ end
29
+ days.sort_by!{ |h| h.date }
30
+
31
+ last_day = d1 - 1.day
32
+ days2 = []
33
+ days.each do |h|
34
+ while (h.date - last_day) > 1
35
+ days2 << Caboose::StdClass.new(:date => last_day + 1.day, :count => 0, :total => 0.0)
36
+ last_day = last_day + 1.day
37
+ end
38
+ days2 << h
39
+ last_day = h.date
40
+ end
41
+ days2.each do |h|
42
+ puts "#{h.date} #{h.count} #{h.total}"
43
+ end
44
+ return days2
45
+
46
+ #return rows.collect { |row|
47
+ # arr = row[0].split('-')
48
+ # Caboose::StdClass.new(
49
+ # :date => Date.new(arr[0].to_i, arr[1].to_i, arr[2].to_i),
50
+ # :count => row[1],
51
+ # :total => row[2]
52
+ # )
53
+ #}
54
+ end
55
+
56
+ end
57
+ end
@@ -52,7 +52,7 @@ module Caboose
52
52
  end
53
53
 
54
54
  def order_info(order)
55
- order_info = "Order Number: #{order.id}\n"
55
+ order_info = "Order Number: #{order.order_number}\n"
56
56
  order_info << "Order Date: #{order.date_created ? order.date_created.strftime('%d %b %Y %H:%M:%S %p') : ''}\n"
57
57
  order_info << "Status: #{order.status.capitalize}\n"
58
58
  tbl = []
@@ -209,7 +209,8 @@ class Caboose::Schema < Caboose::Utilities::Schema
209
209
  Caboose::Calendar => [
210
210
  [ :site_id , :integer ],
211
211
  [ :name , :string ],
212
- [ :description , :text ]
212
+ [ :description , :text ],
213
+ [ :color , :string ]
213
214
  ],
214
215
  Caboose::CalendarEvent => [
215
216
  [ :calendar_id , :integer ],
@@ -1,7 +1,7 @@
1
1
 
2
2
  class Caboose::Setting < ActiveRecord::Base
3
3
  self.table_name = "settings"
4
- attr_accessible :name, :value
4
+ attr_accessible :id, :site_id, :name, :value
5
5
 
6
6
  def self.value_for(name)
7
7
  s = self.where(:name => name).first
@@ -1,6 +1,7 @@
1
1
 
2
2
  <h1>Edit Calendar</h1>
3
3
  <p><div id='calendar_<%= @calendar.id %>_name' ></div></p>
4
+ <p><div id='calendar_<%= @calendar.id %>_color' ></div></p>
4
5
  <p><div id='calendar_<%= @calendar.id %>_description' ></div></p>
5
6
 
6
7
  <div id='calendar'>
@@ -68,7 +69,8 @@ $(document).ready(function() {
68
69
  authenticity_token: '<%= form_authenticity_token %>',
69
70
  attributes: [
70
71
  { name: 'name' , nice_name: 'Name' , type: 'text' , value: <%= raw Caboose.json(@calendar.name ) %>, width: 400 },
71
- { name: 'description' , nice_name: 'Description' , type: 'textarea', value: <%= raw Caboose.json(@calendar.description ) %>, width: 400, height: 100 }
72
+ { name: 'description' , nice_name: 'Description' , type: 'textarea', value: <%= raw Caboose.json(@calendar.description ) %>, width: 400, height: 100 },
73
+ { name: 'color' , nice_name: 'Color' , type: 'color', value: <%= raw Caboose.json(@calendar.color ) %>, width: 400, height: 100 }
72
74
  ]
73
75
  });
74
76
  $('#calendar td')
@@ -129,6 +131,9 @@ function delete_calendar(calendar_id, confirm)
129
131
  #calendar td ul li { margin: 0; padding: 0; list-style: none; }
130
132
  #calendar td ul li a { display: block; }
131
133
  #calendar td ul li a:hover { background: #fff; }
134
+ .calendar_<%= @calendar.id %>_color_bound_color {
135
+ width: 100px !important;
136
+ }
132
137
 
133
138
  </style>
134
139
  <% end %>
@@ -21,12 +21,14 @@
21
21
  <table class='data'>
22
22
  <tr>
23
23
  <th>Name</th>
24
- <th>Description</th>
24
+ <th>Description</th>
25
+ <th>Color</th>
25
26
  </tr>
26
27
  <% @calendars.each do |calendar| %>
27
28
  <tr onclick="window.location='/admin/calendars/<%= calendar.id %>';">
28
29
  <td><%= calendar.name %></td>
29
- <td><%= calendar.description %></td>
30
+ <td><%= calendar.description %></td>
31
+ <td><div class="swatch" style="background-color:<%= calendar.color %>"></div></td>
30
32
  </tr>
31
33
  <% end %>
32
34
  </table>
@@ -34,6 +36,20 @@
34
36
  <p>There are no calendars right now.</p>
35
37
  <% end %>
36
38
 
39
+ <% content_for :caboose_css do %>
40
+ <style>
41
+ .data tr td, .data tr th {
42
+ padding: 5px 10px !important;
43
+ }
44
+ .data .swatch {
45
+ width: 80px;
46
+ height: 22px;
47
+ margin: 0 auto;
48
+ border-radius: 5px;
49
+ }
50
+ </style>
51
+ <% end %>
52
+
37
53
  <% content_for :caboose_js do %>
38
54
  <script type='text/javascript'>
39
55
 
@@ -0,0 +1,66 @@
1
+ <h1>Order Summary Report</h1>
2
+
3
+ <form action='/admin/orders/summary-report' method='get' id='search_form'>
4
+ <p>
5
+ <input type='text' id='d1' name='d1' value='<%= @d1.strftime('%Y-%m-%d') %>' /> -
6
+ <input type='text' id='d2' name='d2' value='<%= @d2.strftime('%Y-%m-%d') %>' />
7
+ <input type='submit' value='Change Date Range' />
8
+ </p>
9
+ </form>
10
+
11
+ <div id='counts_chart'></div>
12
+ <div id='totals_chart'></div>
13
+ <p></p>
14
+
15
+ <% content_for :caboose_js do %>
16
+ <%= javascript_include_tag 'caboose/model/all' %>
17
+ <script type="text/javascript" src="https://www.google.com/jsapi"></script>
18
+ <script type='text/javascript'>
19
+
20
+ google.load('visualization', '1.1', {packages: ['corechart']});
21
+ google.setOnLoadCallback(drawChart);
22
+
23
+ function drawChart()
24
+ {
25
+ var counts = new google.visualization.DataTable();
26
+ counts.addColumn('date', 'Date');
27
+ counts.addColumn('number', 'Count');
28
+ <% @rows.each do |row| %>
29
+ counts.addRow([new Date(<%= row.date.strftime('%Y') %>, <%= row.date.strftime('%-m').to_i - 1 %>, <%= row.date.strftime('%-d') %>), <%= row.count %>]);
30
+ <% end %>
31
+
32
+ var counts_chart = new google.visualization.ColumnChart(document.getElementById('counts_chart'));
33
+ counts_chart.draw(counts, {
34
+ title: 'Daily Order Counts',
35
+ width: 1200,
36
+ height: 800,
37
+ hAxis: { label: 'Date' },
38
+ vAxis: { label: 'Count' },
39
+ trendlines: { 0: { type: 'polynomial' } }
40
+ });
41
+
42
+ var totals = new google.visualization.DataTable();
43
+ totals.addColumn('date', 'Date');
44
+ totals.addColumn('number', 'Total');
45
+ <% @rows.each do |row| %>
46
+ totals.addRow([new Date(<%= row.date.strftime('%Y') %>, <%= row.date.strftime('%-m').to_i - 1 %>, <%= row.date.strftime('%-d') %>), <%= row.total %>]);
47
+ <% end %>
48
+
49
+ var totals_chart = new google.visualization.ColumnChart(document.getElementById('totals_chart'));
50
+ totals_chart.draw(totals, {
51
+ title: 'Daily Order Totals',
52
+ width: 1200,
53
+ height: 800,
54
+ hAxis: { label: 'Date' },
55
+ vAxis: { label: 'Total' },
56
+ trendlines: { 0: { type: 'polynomial' } }
57
+ });
58
+ }
59
+
60
+ $(document).ready(function() {
61
+ $('#d1').datepicker({ dateFormat: 'yy-mm-dd' });
62
+ $('#d2').datepicker({ dateFormat: 'yy-mm-dd' });
63
+ });
64
+
65
+ </script>
66
+ <% end %>
data/config/routes.rb CHANGED
@@ -216,21 +216,22 @@ Caboose::Engine.routes.draw do
216
216
  #=============================================================================
217
217
  # Images
218
218
  #=============================================================================
219
-
220
- post "/admin/media/pre-upload" => "media#admin_pre_upload"
221
- get "/admin/media" => "media#admin_index"
222
- get "/admin/media/new" => "media#admin_new"
223
- get "/admin/media/json" => "media#admin_json"
224
- get "/admin/media/:id/process" => "media#admin_process"
225
- get "/admin/media/:id/finished" => "media#admin_process_finished"
226
- get "/admin/media/:id/description" => "media#admin_edit_description"
227
- get "/admin/media/:id" => "media#admin_edit"
228
- put "/admin/media/:id" => "media#admin_update"
229
- post "/admin/media/:id/image" => "media#admin_update_image"
230
- #post "/admin/media/edit-image" => "media#admin_edit_image"
231
- post "/admin/media" => "media#admin_add"
232
- delete "/admin/media/bulk" => "media#admin_bulk_delete"
233
- delete "/admin/media/:id" => "media#admin_delete"
219
+
220
+ get "/admin/media/last-upload-processed" => "media#admin_last_upload_processed"
221
+ post "/admin/media/pre-upload" => "media#admin_pre_upload"
222
+ get "/admin/media" => "media#admin_index"
223
+ get "/admin/media/new" => "media#admin_new"
224
+ get "/admin/media/json" => "media#admin_json"
225
+ get "/admin/media/:id/process" => "media#admin_process"
226
+ get "/admin/media/:id/finished" => "media#admin_process_finished"
227
+ get "/admin/media/:id/description" => "media#admin_edit_description"
228
+ get "/admin/media/:id" => "media#admin_edit"
229
+ put "/admin/media/:id" => "media#admin_update"
230
+ post "/admin/media/:id/image" => "media#admin_update_image"
231
+ #post "/admin/media/edit-image" => "media#admin_edit_image"
232
+ post "/admin/media" => "media#admin_add"
233
+ delete "/admin/media/bulk" => "media#admin_bulk_delete"
234
+ delete "/admin/media/:id" => "media#admin_delete"
234
235
 
235
236
 
236
237
  get "/admin/media-categories/json" => "media_categories#admin_json"
@@ -624,6 +625,7 @@ Caboose::Engine.routes.draw do
624
625
  # Orders
625
626
  #=============================================================================
626
627
 
628
+ get "/admin/orders/summary-report" => "orders#admin_summary_report"
627
629
  get "/admin/orders/weird-test" => "orders#admin_weird_test"
628
630
  get "/admin/orders" => "orders#admin_index"
629
631
  get "/admin/orders/test-info" => "orders#admin_mail_test_info"
@@ -66,6 +66,11 @@ module Caboose
66
66
  end
67
67
  return str2
68
68
  end
69
+
70
+ def Caboose.random_string(length)
71
+ o = [('a'..'z'),('A'..'Z'),('0'..'9')].map { |i| i.to_a }.flatten
72
+ return (0...length).map { o[rand(o.length)] }.join
73
+ end
69
74
 
70
75
  class Engine < ::Rails::Engine
71
76
  isolate_namespace Caboose
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.6.24'
2
+ VERSION = '0.6.25'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.24
4
+ version: 0.6.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-19 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg
@@ -473,6 +473,8 @@ files:
473
473
  - app/assets/javascripts/caboose/spectrum.js
474
474
  - app/assets/javascripts/caboose/station.js
475
475
  - app/assets/javascripts/caboose/testing.js
476
+ - app/assets/javascripts/chartjs/Chart.min.js
477
+ - app/assets/javascripts/chartjs/gulpfile.js
476
478
  - app/assets/javascripts/plupload/Moxie.swf
477
479
  - app/assets/javascripts/plupload/Moxie.xap
478
480
  - app/assets/javascripts/plupload/i18n/ar.js
@@ -633,6 +635,7 @@ files:
633
635
  - app/controllers/caboose/my_account_line_items_controller.rb
634
636
  - app/controllers/caboose/my_account_orders_controller.rb
635
637
  - app/controllers/caboose/order_packages_controller.rb
638
+ - app/controllers/caboose/order_reports_controller.rb
636
639
  - app/controllers/caboose/orders_controller.rb
637
640
  - app/controllers/caboose/page_permissions_controller.rb
638
641
  - app/controllers/caboose/pages_controller.rb
@@ -718,6 +721,7 @@ files:
718
721
  - app/models/caboose/order_package.rb
719
722
  - app/models/caboose/order_package_calculator.rb
720
723
  - app/models/caboose/order_pdf.rb
724
+ - app/models/caboose/order_reporter.rb
721
725
  - app/models/caboose/order_transaction.rb
722
726
  - app/models/caboose/page.rb
723
727
  - app/models/caboose/page_bar_generator.rb
@@ -911,6 +915,7 @@ files:
911
915
  - app/views/caboose/orders/admin_index.html.erb
912
916
  - app/views/caboose/orders/admin_new.html.erb
913
917
  - app/views/caboose/orders/admin_print.html.erb
918
+ - app/views/caboose/orders/admin_summary_report.html.erb
914
919
  - app/views/caboose/orders_mailer/customer_new_order.html.erb
915
920
  - app/views/caboose/orders_mailer/customer_payment_authorization.html.erb
916
921
  - app/views/caboose/orders_mailer/customer_status_updated.html.erb