(function(){vare,t,n,r,i=[].slice,s={}.hasOwnProperty,o=function(e,t){functionr(){this.constructor=e}for(varnint)s.call(t,n)&&(e[n]=t[n]);returnr.prototype=t.prototype,e.prototype=newr,e.__super__=t.prototype,e},u=function(e,t){returnfunction(){returne.apply(t,arguments)}},a=[].indexOf||function(e){for(vart=0,n=this.length;t<n;t++)if(tinthis&&this[t]===e)returnt;return-1};t=window.Morris={},e=jQuery,t.EventEmitter=function(){functione(){}returne.prototype.on=function(e,t){returnthis.handlers==null&&(this.handlers={}),this.handlers[e]==null&&(this.handlers[e]=[]),this.handlers[e].push(t)},e.prototype.fire=function(){vare,t,n,r,s,o,u;n=arguments[0],e=2<=arguments.length?i.call(arguments,1):[];if(this.handlers!=null&&this.handlers[n]!=null){o=this.handlers[n],u=[];for(r=0,s=o.length;r<s;r++)t=o[r],u.push(t.apply(null,e));returnu}},e}(),t.commas=function(e){vart,n,r,i;returne!=null?(r=e<0?"-":"",t=Math.abs(e),n=Math.floor(t).toFixed(0),r+=n.replace(/(?=(?:\d{3})+$)(?!^)/g,","),i=t.toString(),i.length>n.length&&(r+=i.slice(n.length)),r):"-"},t.pad2=function(e){return(e<10?"0":"")+e},t.Grid=function(n){functionr(t){varn=this;typeoft.element=="string"?this.el=e(document.getElementById(t.element)):this.el=e(t.element);if(this.el==null||this.el.length===0)thrownewError("Graph container element not found");this.el.css("position")==="static"&&this.el.css("position","relative"),this.options=e.extend({},this.gridDefaults,this.defaults||{},t),typeofthis.options.units=="string"&&(this.options.postUnits=t.units),this.raphael=newRaphael(this.el[0]),this.elementWidth=null,this.elementHeight=null,this.dirty=!1,this.init&&this.init(),this.setData(this.options.data),this.el.bind("mousemove",function(e){vart;returnt=n.el.offset(),n.fire("hovermove",e.pageX-t.left,e.pageY-t.top)}),this.el.bind("mouseout",function(e){returnn.fire("hoverout")}),this.el.bind("touchstart touchmove touchend",function(e){vart,r;returnr=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],t=n.el.offset(),n.fire("hover",r.pageX-t.left,r.pageY-t.top),r}),this.postInit&&this.postInit()}returno(r,n),r.prototype.gridDefaults={dateFormat:null,axes:!0,grid:!0,gridLineColor:"#aaa",gridStrokeWidth:.5,gridTextColor:"#888",gridTextSize:12,hideHover:!1,yLabelFormat:null,numLines:5,padding:25,parseTime:!0,postUnits:"",preUnits:"",ymax:"auto",ymin:"auto 0",goals:[],goalStrokeWidth:1,goalLineColors:["#666633","#999966","#cc6666","#663333"],events:[],eventStrokeWidth:1,eventLineColors:["#005a04","#ccffbb","#3a5f0b","#005502"]},r.prototype.setData=function(e,n){varr,i,s,o,u,a,f,l,c,h,p,d;n==null&&(n=!0);if(e==null||e.length===0){this.data=[],this.raphael.clear(),this.hover!=null&&this.hover.hide();return}h=this.cumulative?0:null,p=this.cumulative?0:null,this.options.goals.length>0&&(u=Math.min.apply(null,this.options.goals),o=Math.max.apply(null,this.options.goals),p=p!=null?Math.min(p,u):u,h=h!=null?Math.max(h,o):o),this.data=function(){varn,r,o;o=[];for(s=n=0,r=e.length;n<r;s=++n)f=e[s],a={},a.label=f[this.options.xkey],this.options.parseTime?(a.x=t.parseDate(a.label),this.options.dateFormat?a.label=this.options.dateFormat(a.x):typeofa.label=="number"&&(a.label=(newDate(a.label)).toString())):a.x=s,l=0,a.y=function(){vare,t,n,r;n=this.options.ykeys,r=[];for(i=e=0,t=n.length;e<t;i=++e)c=n[i],d=f[c],typeofd=="string"&&(d=parseFloat(d)),d!=null&&typeofd!="number"&&(d=null),d!=null&&(this.cumulative?l+=d:h!=null?(h=Math.max(d,h),p=Math.min(d,p)):h=p=d),this.cumulative&&l!=null&&(h=Math.max(l,h),p=Math.min(l,p)),r.push(d);returnr}.call(this),o.push(a);returno}.call(this),this.options.parseTime&&(this.data=this.data.sort(function(e,t){return(e.x>t.x)-(t.x>e.x)})),this.xmin=this.data[0].x,this.xmax=this.data[this.data.length-1].x,this.events=[],this.options.parseTime&&this.options.events.length>0&&(this.events=function(){vare,n,i,s;i=this.options.events,s=[];for(e=0,n=i.length;e<n;e++)r=i[e],s.push(t.parseDate(r));returns}.call(this),this.xmax=Math.max(this.xmax,Math.max.apply(null,this.events)),this.xmin=Math.min(this.xmin,Math.min.ap