diff --git a/public/build/dist/js/all-47747ca921.js b/public/build/dist/js/all-e705b7b737.js similarity index 98% rename from public/build/dist/js/all-47747ca921.js rename to public/build/dist/js/all-e705b7b737.js index e58000b9..86ec180d 100644 --- a/public/build/dist/js/all-47747ca921.js +++ b/public/build/dist/js/all-e705b7b737.js @@ -14,4 +14,4 @@ this._offUpEvents(),"clone"==H.pull&&(w=y.cloneNode(!0),o(w,"display","none"),b. var e=t.parentNode;return e.clientWidth},S=i.getMaximumHeight=function(t){var e=t.parentNode;return e.clientHeight},C=(i.getMaximumSize=i.getMaximumWidth,i.retinaScale=function(t){var e=t.ctx,n=t.canvas.width,i=t.canvas.height;window.devicePixelRatio&&(e.canvas.style.width=n+"px",e.canvas.style.height=i+"px",e.canvas.height=i*window.devicePixelRatio,e.canvas.width=n*window.devicePixelRatio,e.scale(window.devicePixelRatio,window.devicePixelRatio))}),H=i.clear=function(t){t.ctx.clearRect(0,0,t.width,t.height)},j=i.fontString=function(t,e,n){return e+" "+t+"px "+n},A=i.longestText=function(t,e,n){t.font=e;var i=0;return r(n,function(e){var n=t.measureText(e).width;i=n>i?n:i}),i},E=i.drawRoundedRectangle=function(t,e,n,i,r,s){t.beginPath(),t.moveTo(e+s,n),t.lineTo(e+i-s,n),t.quadraticCurveTo(e+i,n,e+i,n+s),t.lineTo(e+i,n+r-s),t.quadraticCurveTo(e+i,n+r,e+i-s,n+r),t.lineTo(e+s,n+r),t.quadraticCurveTo(e,n+r,e,n+r-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+s,n),t.closePath()};n.instances={},n.Type=function(t,e,i){this.options=e,this.chart=i,this.id=c(),n.instances[this.id]=this,e.responsive&&this.resize(),this.initialize.call(this,t)},a(n.Type.prototype,{initialize:function(){return this},clear:function(){return H(this.chart),this},stop:function(){return k(this.animationFrame),this},resize:function(t){this.stop();var e=this.chart.canvas,n=D(this.chart.canvas),i=this.options.maintainAspectRatio?n/this.chart.aspectRatio:S(this.chart.canvas);return e.width=this.chart.width=n,e.height=this.chart.height=i,C(this.chart),"function"==typeof t&&t.apply(this,Array.prototype.slice.call(arguments,1)),this},reflow:d,render:function(t){return t&&this.reflow(),this.options.animation&&!t?i.animationLoop(this.draw,this.options.animationSteps,this.options.animationEasing,this.options.onAnimationProgress,this.options.onAnimationComplete,this):(this.draw(),this.options.onAnimationComplete.call(this)),this},generateLegend:function(){return w(this.options.legendTemplate,this)},destroy:function(){this.clear(),T(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 n.instances[this.id]},showTooltip:function(t,e){"undefined"==typeof this.activeElements&&(this.activeElements=[]);var s=function(t){var e=!1;return t.length!==this.activeElements.length?e=!0:(r(t,function(t,n){t!==this.activeElements[n]&&(e=!0)},this),e)}.call(this,t);if(s||e){if(this.activeElements=t,this.draw(),this.options.customTooltips&&this.options.customTooltips(!1),t.length>0)if(this.datasets&&this.datasets.length>1){for(var a,o,u=this.datasets.length-1;u>=0&&(a=this.datasets[u].points||this.datasets[u].bars||this.datasets[u].segments,o=l(a,t[0]),-1===o);u--);var d=[],c=[],h=function(t){var e,n,r,s,a,l=[],u=[],h=[];return i.each(this.datasets,function(t){e=t.points||t.bars||t.segments,e[o]&&e[o].hasValue()&&l.push(e[o])}),i.each(l,function(t){u.push(t.x),h.push(t.y),d.push(i.template(this.options.multiTooltipTemplate,t)),c.push({fill:t._saved.fillColor||t.fillColor,stroke:t._saved.strokeColor||t.strokeColor})},this),a=_(h),r=m(h),s=_(u),n=m(u),{x:s>this.chart.width/2?s:n,y:(a+r)/2}}.call(this,o);new n.MultiTooltip({x:h.x,y:h.y,xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,xOffset:this.options.tooltipXOffset,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,titleTextColor:this.options.tooltipTitleFontColor,titleFontFamily:this.options.tooltipTitleFontFamily,titleFontStyle:this.options.tooltipTitleFontStyle,titleFontSize:this.options.tooltipTitleFontSize,cornerRadius:this.options.tooltipCornerRadius,labels:d,legendColors:c,legendColorBackground:this.options.multiTooltipKeyBackground,title:t[0].label,chart:this.chart,ctx:this.chart.ctx,custom:this.options.customTooltips}).draw()}else r(t,function(t){var e=t.tooltipPosition();new n.Tooltip({x:Math.round(e.x),y:Math.round(e.y),xPadding:this.options.tooltipXPadding,yPadding:this.options.tooltipYPadding,fillColor:this.options.tooltipFillColor,textColor:this.options.tooltipFontColor,fontFamily:this.options.tooltipFontFamily,fontStyle:this.options.tooltipFontStyle,fontSize:this.options.tooltipFontSize,caretHeight:this.options.tooltipCaretSize,cornerRadius:this.options.tooltipCornerRadius,text:w(this.options.tooltipTemplate,t),chart:this.chart,custom:this.options.customTooltips}).draw()},this);return this}},toBase64Image:function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)}}),n.Type.extend=function(t){var e=this,i=function(){return e.apply(this,arguments)};if(i.prototype=s(e.prototype),a(i.prototype,t),i.extend=n.Type.extend,t.name||e.prototype.name){var r=t.name||e.prototype.name,l=n.defaults[e.prototype.name]?s(n.defaults[e.prototype.name]):{};n.defaults[r]=a(l,t.defaults),n.types[r]=i,n.prototype[r]=function(t,e){var s=o(n.defaults.global,n.defaults[r],e||{});return new i(t,s,this)}}else h("Name not provided for this chart, so it hasn't been registered");return e},n.Element=function(t){a(this,t),this.initialize.apply(this,arguments),this.save()},a(n.Element.prototype,{initialize:function(){},restore:function(t){return t?r(t,function(t){this[t]=this._saved[t]},this):a(this,this._saved),this},save:function(){return this._saved=s(this),delete this._saved._saved,this},update:function(t){return r(t,function(t,e){this._saved[e]=this[e],this[e]=t},this),this},transition:function(t,e){return r(t,function(t,n){this[n]=(t-this._saved[n])*e+this._saved[n]},this),this},tooltipPosition:function(){return{x:this.x,y:this.y}},hasValue:function(){return f(this.value)}}),n.Element.extend=u,n.Point=n.Element.extend({display:!0,inRange:function(t,e){var n=this.hitDetectionRadius+this.radius;return Math.pow(t-this.x,2)+Math.pow(e-this.y,2)=this.startAngle&&n.angle<=this.endAngle,s=n.distance>=this.innerRadius&&n.distance<=this.outerRadius;return r&&s},tooltipPosition:function(){var t=this.startAngle+(this.endAngle-this.startAngle)/2,e=(this.outerRadius-this.innerRadius)/2+this.innerRadius;return{x:this.x+Math.cos(t)*e,y:this.y+Math.sin(t)*e}},draw:function(t){var e=this.ctx;e.beginPath(),e.arc(this.x,this.y,this.outerRadius,this.startAngle,this.endAngle),e.arc(this.x,this.y,this.innerRadius,this.endAngle,this.startAngle,!0),e.closePath(),e.strokeStyle=this.strokeColor,e.lineWidth=this.strokeWidth,e.fillStyle=this.fillColor,e.fill(),e.lineJoin="bevel",this.showStroke&&e.stroke()}}),n.Rectangle=n.Element.extend({draw:function(){var t=this.ctx,e=this.width/2,n=this.x-e,i=this.x+e,r=this.base-(this.base-this.y),s=this.strokeWidth/2;this.showStroke&&(n+=s,i-=s,r+=s),t.beginPath(),t.fillStyle=this.fillColor,t.strokeStyle=this.strokeColor,t.lineWidth=this.strokeWidth,t.moveTo(n,this.base),t.lineTo(n,r),t.lineTo(i,r),t.lineTo(i,this.base),t.fill(),this.showStroke&&t.stroke()},height:function(){return this.base-this.y},inRange:function(t,e){return t>=this.x-this.width/2&&t<=this.x+this.width/2&&e>=this.y&&e<=this.base}}),n.Tooltip=n.Element.extend({draw:function(){var t=this.chart.ctx;t.font=j(this.fontSize,this.fontStyle,this.fontFamily),this.xAlign="center",this.yAlign="above";var e=this.caretPadding=2,n=t.measureText(this.text).width+2*this.xPadding,i=this.fontSize+2*this.yPadding,r=i+this.caretHeight+e;this.x+n/2>this.chart.width?this.xAlign="left":this.x-n/2<0&&(this.xAlign="right"),this.y-r<0&&(this.yAlign="below");var s=this.x-n/2,a=this.y-r;if(t.fillStyle=this.fillColor,this.custom)this.custom(this);else{switch(this.yAlign){case"above":t.beginPath(),t.moveTo(this.x,this.y-e),t.lineTo(this.x+this.caretHeight,this.y-(e+this.caretHeight)),t.lineTo(this.x-this.caretHeight,this.y-(e+this.caretHeight)),t.closePath(),t.fill();break;case"below":a=this.y+e+this.caretHeight,t.beginPath(),t.moveTo(this.x,this.y+e),t.lineTo(this.x+this.caretHeight,this.y+e+this.caretHeight),t.lineTo(this.x-this.caretHeight,this.y+e+this.caretHeight),t.closePath(),t.fill()}switch(this.xAlign){case"left":s=this.x-n+(this.cornerRadius+this.caretHeight);break;case"right":s=this.x-(this.cornerRadius+this.caretHeight)}E(t,s,a,n,i,this.cornerRadius),t.fill(),t.fillStyle=this.textColor,t.textAlign="center",t.textBaseline="middle",t.fillText(this.text,s+n/2,a+i/2)}}}),n.MultiTooltip=n.Element.extend({initialize:function(){this.font=j(this.fontSize,this.fontStyle,this.fontFamily),this.titleFont=j(this.titleFontSize,this.titleFontStyle,this.titleFontFamily),this.height=this.labels.length*this.fontSize+(this.labels.length-1)*(this.fontSize/2)+2*this.yPadding+1.5*this.titleFontSize,this.ctx.font=this.titleFont;var t=this.ctx.measureText(this.title).width,e=A(this.ctx,this.font,this.labels)+this.fontSize+3,n=m([e,t]);this.width=n+2*this.xPadding;var i=this.height/2;this.y-i<0?this.y=i:this.y+i>this.chart.height&&(this.y=this.chart.height-i),this.x>this.chart.width/2?this.x-=this.xOffset+this.width:this.x+=this.xOffset},getLineHeight:function(t){var e=this.y-this.height/2+this.yPadding,n=t-1;return 0===t?e+this.titleFontSize/2:e+(1.5*this.fontSize*n+this.fontSize/2)+1.5*this.titleFontSize},draw:function(){if(this.custom)this.custom(this);else{E(this.ctx,this.x,this.y-this.height/2,this.width,this.height,this.cornerRadius);var t=this.ctx;t.fillStyle=this.fillColor,t.fill(),t.closePath(),t.textAlign="left",t.textBaseline="middle",t.fillStyle=this.titleTextColor,t.font=this.titleFont,t.fillText(this.title,this.x+this.xPadding,this.getLineHeight(0)),t.font=this.font,i.each(this.labels,function(e,n){t.fillStyle=this.textColor,t.fillText(e,this.x+this.xPadding+this.fontSize+3,this.getLineHeight(n+1)),t.fillStyle=this.legendColorBackground,t.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize),t.fillStyle=this.legendColors[n].fill,t.fillRect(this.x+this.xPadding,this.getLineHeight(n+1)-this.fontSize/2,this.fontSize,this.fontSize)},this)}}}),n.Scale=n.Element.extend({initialize:function(){this.fit()},buildYLabels:function(){this.yLabels=[];for(var t=g(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(w(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}));this.yLabelWidth=this.display&&this.showLabels?A(this.ctx,this.font,this.yLabels):0},addXLabel:function(t){this.xLabels.push(t),this.valuesCount++,this.fit()},removeXLabel:function(){this.xLabels.shift(),this.valuesCount--,this.fit()},fit:function(){this.startPoint=this.display?this.fontSize:0,this.endPoint=this.display?this.height-1.5*this.fontSize-5:this.height,this.startPoint+=this.padding,this.endPoint-=this.padding;var t,e=this.endPoint-this.startPoint;for(this.calculateYRange(e),this.buildYLabels(),this.calculateXLabelRotation();e>this.endPoint-this.startPoint;)e=this.endPoint-this.startPoint,t=this.yLabelWidth,this.calculateYRange(e),this.buildYLabels(),tthis.yLabelWidth+10?n/2:this.yLabelWidth+10,this.xLabelRotation=0,this.display){var r,s=A(this.ctx,this.font,this.xLabels);this.xLabelWidth=s;for(var a=Math.floor(this.calculateX(1)-this.calculateX(0))-6;this.xLabelWidth>a&&0===this.xLabelRotation||this.xLabelWidth>a&&this.xLabelRotation<=90&&this.xLabelRotation>0;)r=Math.cos(y(this.xLabelRotation)),t=r*n,e=r*i,t+this.fontSize/2>this.yLabelWidth+8&&(this.xScalePaddingLeft=t+this.fontSize/2),this.xScalePaddingRight=this.fontSize/2,this.xLabelRotation++,this.xLabelWidth=r*s;this.xLabelRotation>0&&(this.endPoint-=Math.sin(y(this.xLabelRotation))*s+3)}else this.xLabelWidth=0,this.xScalePaddingRight=this.padding,this.xScalePaddingLeft=this.padding},calculateYRange:d,drawingArea:function(){return this.startPoint-this.endPoint},calculateY:function(t){var e=this.drawingArea()/(this.min-this.max);return this.endPoint-e*(t-this.min)},calculateX:function(t){var e=(this.xLabelRotation>0,this.width-(this.xScalePaddingLeft+this.xScalePaddingRight)),n=e/Math.max(this.valuesCount-(this.offsetGridLines?0:1),1),i=n*t+this.xScalePaddingLeft;return this.offsetGridLines&&(i+=n/2),Math.round(i)},update:function(t){i.extend(this,t),this.fit()},draw:function(){var t=this.ctx,e=(this.endPoint-this.startPoint)/this.steps,n=Math.round(this.xScalePaddingLeft);this.display&&(t.fillStyle=this.textColor,t.font=this.font,r(this.yLabels,function(r,s){var a=this.endPoint-e*s,o=Math.round(a),l=this.showHorizontalLines;t.textAlign="right",t.textBaseline="middle",this.showLabels&&t.fillText(r,n-10,a),0!==s||l||(l=!0),l&&t.beginPath(),s>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),o+=i.aliasPixel(t.lineWidth),l&&(t.moveTo(n,o),t.lineTo(this.width,o),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(n-5,o),t.lineTo(n,o),t.stroke(),t.closePath()},this),r(this.xLabels,function(e,n){var i=this.calculateX(n)+v(this.lineWidth),r=this.calculateX(n-(this.offsetGridLines?.5:0))+v(this.lineWidth),s=this.xLabelRotation>0,a=this.showVerticalLines;0!==n||a||(a=!0),a&&t.beginPath(),n>0?(t.lineWidth=this.gridLineWidth,t.strokeStyle=this.gridLineColor):(t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor),a&&(t.moveTo(r,this.endPoint),t.lineTo(r,this.startPoint-3),t.stroke(),t.closePath()),t.lineWidth=this.lineWidth,t.strokeStyle=this.lineColor,t.beginPath(),t.moveTo(r,this.endPoint),t.lineTo(r,this.endPoint+5),t.stroke(),t.closePath(),t.save(),t.translate(i,s?this.endPoint+12:this.endPoint+8),t.rotate(-1*y(this.xLabelRotation)),t.font=this.font,t.textAlign=s?"right":"center",t.textBaseline=s?"middle":"top",t.fillText(e,0,0),t.restore()},this))}}),n.RadialScale=n.Element.extend({initialize:function(){this.size=_([this.height,this.width]),this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2},calculateCenterOffset:function(t){var e=this.drawingArea/(this.max-this.min);return(t-this.min)*e},update:function(){this.lineArc?this.drawingArea=this.display?this.size/2-(this.fontSize/2+this.backdropPaddingY):this.size/2:this.setScaleSize(),this.buildYLabels()},buildYLabels:function(){this.yLabels=[];for(var t=g(this.stepValue),e=0;e<=this.steps;e++)this.yLabels.push(w(this.templateString,{value:(this.min+e*this.stepValue).toFixed(t)}))},getCircumference:function(){return 2*Math.PI/this.valuesCount},setScaleSize:function(){var t,e,n,i,r,s,a,o,l,u,d,c,h=_([this.height/2-this.pointLabelFontSize-5,this.width/2]),p=this.width,m=0;for(this.ctx.font=j(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),e=0;ep&&(p=t.x+i,r=e),t.x-ip&&(p=t.x+n,r=e):e>this.valuesCount/2&&t.x-n0){var i,r=n*(this.drawingArea/this.steps),s=this.yCenter-r;if(this.lineWidth>0)if(t.strokeStyle=this.lineColor,t.lineWidth=this.lineWidth,this.lineArc)t.beginPath(),t.arc(this.xCenter,this.yCenter,r,0,2*Math.PI),t.closePath(),t.stroke();else{t.beginPath();for(var a=0;a=0;e--){if(this.angleLineWidth>0){var n=this.getPointPosition(e,this.calculateCenterOffset(this.max));t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(n.x,n.y),t.stroke(),t.closePath()}var i=this.getPointPosition(e,this.calculateCenterOffset(this.max)+5);t.font=j(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily),t.fillStyle=this.pointLabelFontColor;var s=this.labels.length,a=this.labels.length/2,o=a/2,l=o>e||e>s-o,u=e===o||e===s-o;0===e?t.textAlign="center":e===a?t.textAlign="center":a>e?t.textAlign="left":t.textAlign="right",u?t.textBaseline="middle":l?t.textBaseline="bottom":t.textBaseline="top",t.fillText(this.labels[e],i.x,i.y)}}}}}),i.addEvent(window,"resize",function(){var t;return function(){clearTimeout(t),t=setTimeout(function(){r(n.instances,function(t){t.options.responsive&&t.resize(t.render,!0)})},50)}}()),p?define(function(){return n}):"object"==typeof module&&module.exports&&(module.exports=n),t.Chart=n,n.noConflict=function(){return t.Chart=e,n}}.call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers,i={scaleBeginAtZero:!0,scaleShowGridLines:!0,scaleGridLineColor:"rgba(0,0,0,.05)",scaleGridLineWidth:1,scaleShowHorizontalLines:!0,scaleShowVerticalLines:!0,barShowStroke:!0,barStrokeWidth:2,barValueSpacing:5,barDatasetSpacing:1,legendTemplate:'
    <% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>
'};e.Type.extend({name:"Bar",defaults:i,initialize:function(t){var i=this.options;this.ScaleClass=e.Scale.extend({offsetGridLines:!0,calculateBarX:function(t,e,n){var r=this.calculateBaseWidth(),s=this.calculateX(n)-r/2,a=this.calculateBarWidth(t);return s+a*e+e*i.barDatasetSpacing+a/2},calculateBaseWidth:function(){return this.calculateX(1)-this.calculateX(0)-2*i.barValueSpacing},calculateBarWidth:function(t){var e=this.calculateBaseWidth()-(t-1)*i.barDatasetSpacing;return e/t}}),this.datasets=[],this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getBarsAtEvent(t):[];this.eachBars(function(t){t.restore(["fillColor","strokeColor"])}),n.each(e,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(e)}),this.BarClass=e.Rectangle.extend({strokeWidth:this.options.barStrokeWidth,showStroke:this.options.barShowStroke,ctx:this.chart.ctx}),n.each(t.datasets,function(e,i){var r={label:e.label||null,fillColor:e.fillColor,strokeColor:e.strokeColor,bars:[]};this.datasets.push(r),n.each(e.data,function(n,i){r.bars.push(new this.BarClass({value:n,label:t.labels[i],datasetLabel:e.label,strokeColor:e.strokeColor,fillColor:e.fillColor,highlightFill:e.highlightFill||e.fillColor,highlightStroke:e.highlightStroke||e.strokeColor}))},this)},this),this.buildScale(t.labels),this.BarClass.prototype.base=this.scale.endPoint,this.eachBars(function(t,e,i){n.extend(t,{width:this.scale.calculateBarWidth(this.datasets.length),x:this.scale.calculateBarX(this.datasets.length,i,e),y:this.scale.endPoint}),t.save()},this),this.render()},update:function(){this.scale.update(),n.each(this.activeElements,function(t){t.restore(["fillColor","strokeColor"])}),this.eachBars(function(t){t.save()}),this.render()},eachBars:function(t){n.each(this.datasets,function(e,i){n.each(e.bars,t,this,i)},this)},getBarsAtEvent:function(t){for(var e,i=[],r=n.getRelativePosition(t),s=function(t){i.push(t.bars[e])},a=0;a<% for (var i=0; i
  • <%if(segments[i].label){%><%=segments[i].label%><%}%>
  • <%}%>'};e.Type.extend({name:"Doughnut",defaults:i,initialize:function(t){this.segments=[],this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,this.SegmentArc=e.Arc.extend({ctx:this.chart.ctx,x:this.chart.width/2,y:this.chart.height/2}),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];n.each(this.segments,function(t){t.restore(["fillColor"])}),n.each(e,function(t){t.fillColor=t.highlightColor}),this.showTooltip(e)}),this.calculateTotal(t),n.each(t,function(t,e){this.addData(t,e,!0)},this),this.render()},getSegmentsAtEvent:function(t){var e=[],i=n.getRelativePosition(t);return n.each(this.segments,function(t){t.inRange(i.x,i.y)&&e.push(t)},this),e},addData:function(t,e,n){var i=e||this.segments.length;this.segments.splice(i,0,new this.SegmentArc({value:t.value,outerRadius:this.options.animateScale?0:this.outerRadius,innerRadius:this.options.animateScale?0:this.outerRadius/100*this.options.percentageInnerCutout,fillColor:t.color,highlightColor:t.highlight||t.color,showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,startAngle:1.5*Math.PI,circumference:this.options.animateRotate?0:this.calculateCircumference(t.value),label:t.label})),n||(this.reflow(),this.update())},calculateCircumference:function(t){return 2*Math.PI*(Math.abs(t)/this.total)},calculateTotal:function(t){this.total=0,n.each(t,function(t){this.total+=Math.abs(t.value)},this)},update:function(){this.calculateTotal(this.segments),n.each(this.activeElements,function(t){t.restore(["fillColor"])}),n.each(this.segments,function(t){t.save()}),this.render()},removeData:function(t){var e=n.isNumber(t)?t:this.segments.length-1;this.segments.splice(e,1),this.reflow(),this.update()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.outerRadius=(n.min([this.chart.width,this.chart.height])-this.options.segmentStrokeWidth/2)/2,n.each(this.segments,function(t){t.update({outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout})},this)},draw:function(t){var e=t?t:1;this.clear(),n.each(this.segments,function(t,n){t.transition({circumference:this.calculateCircumference(t.value),outerRadius:this.outerRadius,innerRadius:this.outerRadius/100*this.options.percentageInnerCutout},e),t.endAngle=t.startAngle+t.circumference,t.draw(),0===n&&(t.startAngle=1.5*Math.PI),n<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'};e.Type.extend({name:"Line",defaults:i,initialize:function(t){this.PointClass=e.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx,inRange:function(t){return Math.pow(t-this.x,2)0&&ethis.scale.endPoint?t.controlPoints.outer.y=this.scale.endPoint:t.controlPoints.outer.ythis.scale.endPoint?t.controlPoints.inner.y=this.scale.endPoint:t.controlPoints.inner.y0&&(i.lineTo(o[o.length-1].x,this.scale.endPoint),i.lineTo(o[0].x,this.scale.endPoint),i.fillStyle=t.fillColor,i.closePath(),i.fill()),n.each(o,function(t){t.draw()})},this)}})}.call(this),function(){"use strict";var t=this,e=t.Chart,n=e.helpers,i={scaleShowLabelBackdrop:!0,scaleBackdropColor:"rgba(255,255,255,0.75)",scaleBeginAtZero:!0,scaleBackdropPaddingY:2,scaleBackdropPaddingX:2,scaleShowLine:!0,segmentShowStroke:!0,segmentStrokeColor:"#fff",segmentStrokeWidth:2,animationSteps:100,animationEasing:"easeOutBounce",animateRotate:!0,animateScale:!1,legendTemplate:'
      <% for (var i=0; i
    • <%if(segments[i].label){%><%=segments[i].label%><%}%>
    • <%}%>
    '};e.Type.extend({name:"PolarArea",defaults:i,initialize:function(t){this.segments=[],this.SegmentArc=e.Arc.extend({showStroke:this.options.segmentShowStroke,strokeWidth:this.options.segmentStrokeWidth,strokeColor:this.options.segmentStrokeColor,ctx:this.chart.ctx,innerRadius:0,x:this.chart.width/2,y:this.chart.height/2}),this.scale=new e.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,lineArc:!0,width:this.chart.width,height:this.chart.height,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,valuesCount:t.length}),this.updateScaleRange(t),this.scale.update(),n.each(t,function(t,e){this.addData(t,e,!0)},this),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getSegmentsAtEvent(t):[];n.each(this.segments,function(t){t.restore(["fillColor"])}),n.each(e,function(t){t.fillColor=t.highlightColor}),this.showTooltip(e)}),this.render()},getSegmentsAtEvent:function(t){var e=[],i=n.getRelativePosition(t);return n.each(this.segments,function(t){t.inRange(i.x,i.y)&&e.push(t)},this),e},addData:function(t,e,n){var i=e||this.segments.length;this.segments.splice(i,0,new this.SegmentArc({fillColor:t.color,highlightColor:t.highlight||t.color,label:t.label,value:t.value,outerRadius:this.options.animateScale?0:this.scale.calculateCenterOffset(t.value),circumference:this.options.animateRotate?0:this.scale.getCircumference(),startAngle:1.5*Math.PI})),n||(this.reflow(),this.update())},removeData:function(t){var e=n.isNumber(t)?t:this.segments.length-1;this.segments.splice(e,1),this.reflow(),this.update()},calculateTotal:function(t){this.total=0,n.each(t,function(t){this.total+=t.value},this),this.scale.valuesCount=this.segments.length},updateScaleRange:function(t){var e=[];n.each(t,function(t){e.push(t.value)});var i=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(e,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,i,{size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2})},update:function(){this.calculateTotal(this.segments),n.each(this.segments,function(t){t.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.SegmentArc.prototype,{x:this.chart.width/2,y:this.chart.height/2}),this.updateScaleRange(this.segments),this.scale.update(),n.extend(this.scale,{xCenter:this.chart.width/2,yCenter:this.chart.height/2}),n.each(this.segments,function(t){t.update({outerRadius:this.scale.calculateCenterOffset(t.value)})},this)},draw:function(t){var e=t||1;this.clear(),n.each(this.segments,function(t,n){t.transition({circumference:this.scale.getCircumference(),outerRadius:this.scale.calculateCenterOffset(t.value)},e),t.endAngle=t.startAngle+t.circumference,0===n&&(t.startAngle=1.5*Math.PI),n<% for (var i=0; i
  • <%if(datasets[i].label){%><%=datasets[i].label%><%}%>
  • <%}%>'},initialize:function(t){this.PointClass=e.Point.extend({strokeWidth:this.options.pointDotStrokeWidth,radius:this.options.pointDotRadius,display:this.options.pointDot,hitDetectionRadius:this.options.pointHitDetectionRadius,ctx:this.chart.ctx}),this.datasets=[],this.buildScale(t),this.options.showTooltips&&n.bindEvents(this,this.options.tooltipEvents,function(t){var e="mouseout"!==t.type?this.getPointsAtEvent(t):[];this.eachPoints(function(t){t.restore(["fillColor","strokeColor"])}),n.each(e,function(t){t.fillColor=t.highlightFill,t.strokeColor=t.highlightStroke}),this.showTooltip(e)}),n.each(t.datasets,function(e){var i={label:e.label||null,fillColor:e.fillColor,strokeColor:e.strokeColor,pointColor:e.pointColor,pointStrokeColor:e.pointStrokeColor,points:[]};this.datasets.push(i),n.each(e.data,function(n,r){var s;this.scale.animation||(s=this.scale.getPointPosition(r,this.scale.calculateCenterOffset(n))),i.points.push(new this.PointClass({value:n,label:t.labels[r],datasetLabel:e.label,x:this.options.animation?this.scale.xCenter:s.x,y:this.options.animation?this.scale.yCenter:s.y,strokeColor:e.pointStrokeColor,fillColor:e.pointColor,highlightFill:e.pointHighlightFill||e.pointColor,highlightStroke:e.pointHighlightStroke||e.pointStrokeColor}))},this)},this),this.render()},eachPoints:function(t){n.each(this.datasets,function(e){n.each(e.points,t,this)},this)},getPointsAtEvent:function(t){var e=n.getRelativePosition(t),i=n.getAngleFromPoint({x:this.scale.xCenter,y:this.scale.yCenter},e),r=2*Math.PI/this.scale.valuesCount,s=Math.round((i.angle-1.5*Math.PI)/r),a=[];return(s>=this.scale.valuesCount||0>s)&&(s=0),i.distance<=this.scale.drawingArea&&n.each(this.datasets,function(t){a.push(t.points[s])}),a},buildScale:function(t){this.scale=new e.RadialScale({display:this.options.showScale,fontStyle:this.options.scaleFontStyle,fontSize:this.options.scaleFontSize,fontFamily:this.options.scaleFontFamily,fontColor:this.options.scaleFontColor,showLabels:this.options.scaleShowLabels,showLabelBackdrop:this.options.scaleShowLabelBackdrop,backdropColor:this.options.scaleBackdropColor,backdropPaddingY:this.options.scaleBackdropPaddingY,backdropPaddingX:this.options.scaleBackdropPaddingX,lineWidth:this.options.scaleShowLine?this.options.scaleLineWidth:0,lineColor:this.options.scaleLineColor,angleLineColor:this.options.angleLineColor,angleLineWidth:this.options.angleShowLineOut?this.options.angleLineWidth:0,pointLabelFontColor:this.options.pointLabelFontColor,pointLabelFontSize:this.options.pointLabelFontSize,pointLabelFontFamily:this.options.pointLabelFontFamily,pointLabelFontStyle:this.options.pointLabelFontStyle,height:this.chart.height,width:this.chart.width,xCenter:this.chart.width/2,yCenter:this.chart.height/2,ctx:this.chart.ctx,templateString:this.options.scaleLabel,labels:t.labels,valuesCount:t.datasets[0].data.length}),this.scale.setScaleSize(),this.updateScaleRange(t.datasets),this.scale.buildYLabels()},updateScaleRange:function(t){var e=function(){var e=[];return n.each(t,function(t){t.data?e=e.concat(t.data):n.each(t.points,function(t){e.push(t.value)})}),e}(),i=this.options.scaleOverride?{steps:this.options.scaleSteps,stepValue:this.options.scaleStepWidth,min:this.options.scaleStartValue,max:this.options.scaleStartValue+this.options.scaleSteps*this.options.scaleStepWidth}:n.calculateScaleRange(e,n.min([this.chart.width,this.chart.height])/2,this.options.scaleFontSize,this.options.scaleBeginAtZero,this.options.scaleIntegersOnly);n.extend(this.scale,i)},addData:function(t,e){this.scale.valuesCount++,n.each(t,function(t,n){var i=this.scale.getPointPosition(this.scale.valuesCount,this.scale.calculateCenterOffset(t));this.datasets[n].points.push(new this.PointClass({value:t,label:e,x:i.x,y:i.y,strokeColor:this.datasets[n].pointStrokeColor,fillColor:this.datasets[n].pointColor}))},this),this.scale.labels.push(e),this.reflow(),this.update()},removeData:function(){this.scale.valuesCount--,this.scale.labels.shift(),n.each(this.datasets,function(t){t.points.shift()},this),this.reflow(),this.update()},update:function(){this.eachPoints(function(t){t.save()}),this.reflow(),this.render()},reflow:function(){n.extend(this.scale,{width:this.chart.width,height:this.chart.height,size:n.min([this.chart.width,this.chart.height]),xCenter:this.chart.width/2,yCenter:this.chart.height/2}),this.updateScaleRange(this.datasets),this.scale.setScaleSize(),this.scale.buildYLabels()},draw:function(t){var e=t||1,i=this.chart.ctx;this.clear(),this.scale.draw(),n.each(this.datasets,function(t){n.each(t.points,function(t,n){t.hasValue()&&t.transition(this.scale.getPointPosition(n,this.scale.calculateCenterOffset(t.value)),e)},this),i.lineWidth=this.options.datasetStrokeWidth,i.strokeStyle=t.strokeColor,i.beginPath(),n.each(t.points,function(t,e){0===e?i.moveTo(t.x,t.y):i.lineTo(t.x,t.y)},this),i.closePath(),i.stroke(),i.fillStyle=t.fillColor,i.fill(),n.each(t.points,function(t){t.hasValue()&&t.draw()})},this)}})}.call(this),function(t,e,n){!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.sparkline&&t(jQuery)}(function(i){"use strict";var r,s,a,o,l,u,d,c,h,p,f,m,_,g,y,v,M,w,b,L,k,Y,x,T,D,S,C,H,j,A,E,P,W={},O=0;r=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:!1,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:!1,enableHighlight:!0,highlightLighten:1.4,tooltipSkipNull:!0,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:!1,numberFormatter:!1,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:!1,disableInteraction:!1},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:n,normalRangeMax:n,normalRangeColor:"#ccc",drawNormalOnTop:!1,chartRangeMin:n,chartRangeMax:n,chartRangeMinX:n,chartRangeMaxX:n,tooltipFormat:new a(' {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:n,nullColor:n,zeroAxis:!0,barWidth:4,barSpacing:1,chartRangeMax:n,chartRangeMin:n,chartRangeClip:!1,colorMap:n,tooltipFormat:new a(' {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new a(' {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:n,thresholdValue:0,chartRangeMax:n,chartRangeMin:n,chartRangeClip:!1,tooltipFormat:new a("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:n,tooltipFormat:new a("{{fieldkey:fields}} - {{value}}"),tooltipValueLookups:{fields:{r:"Range",p:"Performance",t:"Target"}}},pie:{offset:0,sliceColors:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],borderWidth:0,borderColor:"#000",tooltipFormat:new a(' {{value}} ({{percent.1}}%)')},box:{raw:!1,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:!0,outlierIQR:1.5,spotRadius:1.5,target:n,targetColor:"#4a2",chartRangeMax:n,chartRangeMin:n,tooltipFormat:new a("{{field:fields}}: {{value}}"),tooltipFormatFieldlistKey:"field",tooltipValueLookups:{fields:{lq:"Lower Quartile",med:"Median",uq:"Upper Quartile",lo:"Left Outlier",ro:"Right Outlier",lw:"Left Whisker",rw:"Right Whisker"}}}}},S='.jqstooltip { position: absolute;left: 0px;top: 0px;visibility: hidden;background: rgb(0, 0, 0) transparent;background-color: rgba(0,0,0,0.6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";color: white;font: 10px arial, san serif;text-align: left;white-space: nowrap;padding: 5px;border: 1px solid white;box-sizing: content-box;z-index: 10000;}.jqsfield { color: white;font: 10px arial, san serif;text-align: left;}',s=function(){var t,e;return t=function(){this.init.apply(this,arguments)},arguments.length>1?(arguments[0]?(t.prototype=i.extend(new arguments[0],arguments[arguments.length-1]),t._super=arguments[0].prototype):t.prototype=arguments[arguments.length-1],arguments.length>2&&(e=Array.prototype.slice.call(arguments,1,-1),e.unshift(t.prototype),i.extend.apply(i,e))):t.prototype=arguments[0],t.prototype.cls=t,t},i.SPFormatClass=a=s({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(t,e){this.format=t,this.fclass=e},render:function(t,e,i){var r,s,a,o,l,u=this,d=t;return this.format.replace(this.fre,function(){var t;return s=arguments[1],a=arguments[3],r=u.precre.exec(s),r?(l=r[2],s=r[1]):l=!1,o=d[s],o===n?"":a&&e&&e[a]?(t=e[a],t.get?e[a].get(o)||o:e[a][o]||o):(h(o)&&(o=i.get("numberFormatter")?i.get("numberFormatter")(o):g(o,l,i.get("numberDigitGroupCount"),i.get("numberDigitGroupSep"),i.get("numberDecimalMark"))),o)})}}),i.spformat=function(t,e){return new a(t,e)},o=function(t,e,n){return e>t?e:t>n?n:t},l=function(t,n){var i;return 2===n?(i=e.floor(t.length/2),t.length%2?t[i]:(t[i-1]+t[i])/2):t.length%2?(i=(t.length*n+n)/4,i%1?(t[e.floor(i)]+t[e.floor(i)-1])/2:t[i-1]):(i=(t.length*n+2)/4,i%1?(t[e.floor(i)]+t[e.floor(i)-1])/2:t[i-1])},u=function(t){var e;switch(t){case"undefined":t=n;break;case"null":t=null;break;case"true":t=!0;break;case"false":t=!1;break;default:e=parseFloat(t),t==e&&(t=e)}return t},d=function(t){var e,n=[];for(e=t.length;e--;)n[e]=u(t[e]);return n},c=function(t,e){var n,i,r=[];for(n=0,i=t.length;i>n;n++)t[n]!==e&&r.push(t[n]);return r},h=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=function(t,e,n,r,s){var a,o;for(t=(e===!1?parseFloat(t).toString():t.toFixed(e)).split(""),a=(a=i.inArray(".",t))<0?t.length:a,a0;o-=n)t.splice(o,0,r);return t.join("")},p=function(t,e,n){var i;for(i=e.length;i--;)if((!n||null!==e[i])&&e[i]!==t)return!1;return!0},f=function(t){var e,n=0;for(e=t.length;e--;)n+="number"==typeof t[e]?t[e]:0;return n},_=function(t){return i.isArray(t)?t:[t]},m=function(e){var n,i;if(t.createStyleSheet)try{return void(t.createStyleSheet().cssText=e)}catch(r){i=!0}n=t.createElement("style"),n.type="text/css",t.getElementsByTagName("head")[0].appendChild(n),i?t.styleSheets[t.styleSheets.length-1].cssText=e:n["string"==typeof t.body.style.WebkitAppearance?"innerText":"innerHTML"]=e},i.fn.simpledraw=function(e,r,s,a){var o,l;if(s&&(o=this.data("_jqs_vcanvas")))return o;if(i.fn.sparkline.canvas===!1)return!1;if(i.fn.sparkline.canvas===n){var u=t.createElement("canvas");if(u.getContext&&u.getContext("2d"))i.fn.sparkline.canvas=function(t,e,n,i){return new A(t,e,n,i)};else{if(!t.namespaces||t.namespaces.v)return i.fn.sparkline.canvas=!1,!1;t.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML"),i.fn.sparkline.canvas=function(t,e,n,i){return new E(t,e,n)}}}return e===n&&(e=i(this).innerWidth()),r===n&&(r=i(this).innerHeight()),o=i.fn.sparkline.canvas(e,r,this,a),l=i(this).data("_jqs_mhandler"),l&&l.registerCanvas(o),o},i.fn.cleardraw=function(){var t=this.data("_jqs_vcanvas");t&&t.reset()},i.RangeMapClass=y=s({init:function(t){var e,n,i=[];for(e in t)t.hasOwnProperty(e)&&"string"==typeof e&&e.indexOf(":")>-1&&(n=e.split(":"),n[0]=0===n[0].length?-(1/0):parseFloat(n[0]),n[1]=0===n[1].length?1/0:parseFloat(n[1]),n[2]=t[e],i.push(n));this.map=t,this.rangelist=i||!1},get:function(t){var e,i,r,s=this.rangelist;if((r=this.map[t])!==n)return r;if(s)for(e=s.length;e--;)if(i=s[e],i[0]<=t&&i[1]>=t)return i[2];return n}}),i.range_map=function(t){return new y(t)},v=s({init:function(t,e){var n=i(t);this.$el=n,this.options=e,this.currentPageX=0,this.currentPageY=0,this.el=t,this.splist=[],this.tooltip=null,this.over=!1,this.displayTooltips=!e.get("disableTooltips"),this.highlightEnabled=!e.get("disableHighlight")},registerSparkline:function(t){this.splist.push(t),this.over&&this.updateDisplay()},registerCanvas:function(t){var e=i(t.canvas);this.canvas=t,this.$canvas=e,e.mouseenter(i.proxy(this.mouseenter,this)),e.mouseleave(i.proxy(this.mouseleave,this)),e.click(i.proxy(this.mouseclick,this))},reset:function(t){this.splist=[],this.tooltip&&t&&(this.tooltip.remove(),this.tooltip=n)},mouseclick:function(t){var e=i.Event("sparklineClick");e.originalEvent=t,e.sparklines=this.splist,this.$el.trigger(e)},mouseenter:function(e){i(t.body).unbind("mousemove.jqs"),i(t.body).bind("mousemove.jqs",i.proxy(this.mousemove,this)),this.over=!0,this.currentPageX=e.pageX,this.currentPageY=e.pageY,this.currentEl=e.target,!this.tooltip&&this.displayTooltips&&(this.tooltip=new M(this.options),this.tooltip.updatePosition(e.pageX,e.pageY)),this.updateDisplay()},mouseleave:function(){i(t.body).unbind("mousemove.jqs");var e,n,r=this.splist,s=r.length,a=!1;for(this.over=!1,this.currentEl=null,this.tooltip&&(this.tooltip.remove(),this.tooltip=null),n=0;s>n;n++)e=r[n],e.clearRegionHighlight()&&(a=!0);a&&this.canvas.render()},mousemove:function(t){this.currentPageX=t.pageX,this.currentPageY=t.pageY,this.currentEl=t.target,this.tooltip&&this.tooltip.updatePosition(t.pageX,t.pageY),this.updateDisplay()},updateDisplay:function(){var t,e,n,r,s,a=this.splist,o=a.length,l=!1,u=this.$canvas.offset(),d=this.currentPageX-u.left,c=this.currentPageY-u.top;if(this.over){for(n=0;o>n;n++)e=a[n],r=e.setRegionHighlight(this.currentEl,d,c),r&&(l=!0);if(l){if(s=i.Event("sparklineRegionChange"),s.sparklines=this.splist,this.$el.trigger(s),this.tooltip){for(t="",n=0;o>n;n++)e=a[n],t+=e.getCurrentRegionTooltip();this.tooltip.setContent(t)}this.disableHighlight||this.canvas.render()}null===r&&this.mouseleave()}}}),M=s({sizeStyle:"position: static !important;display: block !important;visibility: hidden !important;float: left !important;",init:function(e){var n,r=e.get("tooltipClassname","jqstooltip"),s=this.sizeStyle;this.container=e.get("tooltipContainer")||t.body,this.tooltipOffsetX=e.get("tooltipOffsetX",10),this.tooltipOffsetY=e.get("tooltipOffsetY",12),i("#jqssizetip").remove(),i("#jqstooltip").remove(),this.sizetip=i("
    ",{id:"jqssizetip",style:s,"class":r}),this.tooltip=i("
    ",{id:"jqstooltip","class":r}).appendTo(this.container),n=this.tooltip.offset(),this.offsetLeft=n.left,this.offsetTop=n.top,this.hidden=!0,i(window).unbind("resize.jqs scroll.jqs"),i(window).bind("resize.jqs scroll.jqs",i.proxy(this.updateWindowDims,this)),this.updateWindowDims()},updateWindowDims:function(){this.scrollTop=i(window).scrollTop(),this.scrollLeft=i(window).scrollLeft(),this.scrollRight=this.scrollLeft+i(window).width(),this.updatePosition()},getSize:function(t){this.sizetip.html(t).appendTo(this.container),this.width=this.sizetip.width()+1,this.height=this.sizetip.height(),this.sizetip.remove()},setContent:function(t){return t?(this.getSize(t),this.tooltip.html(t).css({width:this.width,height:this.height,visibility:"visible"}),void(this.hidden&&(this.hidden=!1,this.updatePosition()))):(this.tooltip.css("visibility","hidden"),void(this.hidden=!0))},updatePosition:function(t,e){if(t===n){if(this.mousex===n)return;t=this.mousex-this.offsetLeft,e=this.mousey-this.offsetTop}else this.mousex=t-=this.offsetLeft,this.mousey=e-=this.offsetTop;this.height&&this.width&&!this.hidden&&(e-=this.height+this.tooltipOffsetY,t+=this.tooltipOffsetX,ethis.scrollRight&&(t=this.scrollRight-this.width),this.tooltip.css({left:t,top:e}))},remove:function(){this.tooltip.remove(),this.sizetip.remove(),this.sizetip=this.tooltip=n,i(window).unbind("resize.jqs scroll.jqs")}}),C=function(){m(S)},i(C),P=[],i.fn.sparkline=function(e,r){return this.each(function(){var s,a,o=new i.fn.sparkline.options(this,r),l=i(this);if(s=function(){var r,s,a,u,d,c,h;return"html"===e||e===n?(h=this.getAttribute(o.get("tagValuesAttribute")),(h===n||null===h)&&(h=l.html()),r=h.replace(/(^\s*\s*$)|\s+/g,"").split(",")):r=e,s="auto"===o.get("width")?r.length*o.get("defaultPixelsPerValue"):o.get("width"),"auto"===o.get("height")?o.get("composite")&&i.data(this,"_jqs_vcanvas")||(u=t.createElement("span"),u.innerHTML="a",l.html(u),a=i(u).innerHeight()||i(u).height(),i(u).remove(),u=null):a=o.get("height"),o.get("disableInteraction")?d=!1:(d=i.data(this,"_jqs_mhandler"),d?o.get("composite")||d.reset():(d=new v(this,o),i.data(this,"_jqs_mhandler",d))),o.get("composite")&&!i.data(this,"_jqs_vcanvas")?void(i.data(this,"_jqs_errnotify")||(alert("Attempted to attach a composite sparkline to an element with no existing sparkline"),i.data(this,"_jqs_errnotify",!0))):(c=new(i.fn.sparkline[o.get("type")])(this,r,o,s,a),c.render(),void(d&&d.registerSparkline(c)))},i(this).html()&&!o.get("disableHiddenCheck")&&i(this).is(":hidden")||!i(this).parents("body").length){if(!o.get("composite")&&i.data(this,"_jqs_pending"))for(a=P.length;a;a--)P[a-1][0]==this&&P.splice(a-1,1);P.push([this,s]),i.data(this,"_jqs_pending",!0)}else s.call(this)})},i.fn.sparkline.defaults=r(),i.sparkline_display_visible=function(){var t,e,n,r=[];for(e=0,n=P.length;n>e;e++)t=P[e][0],i(t).is(":visible")&&!i(t).parents().is(":hidden")?(P[e][1].call(t),i.data(P[e][0],"_jqs_pending",!1),r.push(e)):i(t).closest("html").length||i.data(t,"_jqs_pending")||(i.data(P[e][0],"_jqs_pending",!1),r.push(e));for(e=r.length;e;e--)P.splice(r[e-1],1)},i.fn.sparkline.options=s({init:function(t,e){var n,r,s,a;this.userOptions=e=e||{},this.tag=t,this.tagValCache={},r=i.fn.sparkline.defaults,s=r.common,this.tagOptionsPrefix=e.enableTagOptions&&(e.tagOptionsPrefix||s.tagOptionsPrefix),a=this.getTagSetting("type"),n=a===W?r[e.type||s.type]:r[a],this.mergedOptions=i.extend({},s,n,e)},getTagSetting:function(t){var e,i,r,s,a=this.tagOptionsPrefix;if(a===!1||a===n)return W;if(this.tagValCache.hasOwnProperty(t))e=this.tagValCache.key;else{if(e=this.tag.getAttribute(a+t),e===n||null===e)e=W;else if("["===e.substr(0,1))for(e=e.substr(1,e.length-2).split(","),i=e.length;i--;)e[i]=u(e[i].replace(/(^\s*)|(\s*$)/g,""));else if("{"===e.substr(0,1))for(r=e.substr(1,e.length-2).split(","),e={},i=r.length;i--;)s=r[i].split(":",2),e[s[0].replace(/(^\s*)|(\s*$)/g,"")]=u(s[1].replace(/(^\s*)|(\s*$)/g,""));else e=u(e);this.tagValCache.key=e}return e},get:function(t,e){var i,r=this.getTagSetting(t);return r!==W?r:(i=this.mergedOptions[t])===n?e:i}}),i.fn.sparkline._base=s({disabled:!1,init:function(t,e,r,s,a){this.el=t,this.$el=i(t),this.values=e,this.options=r,this.width=s,this.height=a,this.currentRegion=n},initTarget:function(){var t=!this.options.get("disableInteraction");(this.target=this.$el.simpledraw(this.width,this.height,this.options.get("composite"),t))?(this.canvasWidth=this.target.pixelWidth,this.canvasHeight=this.target.pixelHeight):this.disabled=!0},render:function(){return this.disabled?(this.el.innerHTML="",!1):!0},getRegion:function(t,e){},setRegionHighlight:function(t,e,i){var r,s=this.currentRegion,a=!this.options.get("disableHighlight");return e>this.canvasWidth||i>this.canvasHeight||0>e||0>i?null:(r=this.getRegion(t,e,i),s!==r?(s!==n&&a&&this.removeHighlight(),this.currentRegion=r,r!==n&&a&&this.renderHighlight(),!0):!1)},clearRegionHighlight:function(){return this.currentRegion!==n?(this.removeHighlight(),this.currentRegion=n,!0):!1},renderHighlight:function(){this.changeHighlight(!0)},removeHighlight:function(){this.changeHighlight(!1)},changeHighlight:function(t){},getCurrentRegionTooltip:function(){var t,e,r,s,o,l,u,d,c,h,p,f,m,_,g=this.options,y="",v=[];if(this.currentRegion===n)return"";if(t=this.getCurrentRegionFields(),p=g.get("tooltipFormatter"))return p(this,g,t);if(g.get("tooltipChartTitle")&&(y+='
    '+g.get("tooltipChartTitle")+"
    \n"),e=this.options.get("tooltipFormat"),!e)return"";if(i.isArray(e)||(e=[e]),i.isArray(t)||(t=[t]),u=this.options.get("tooltipFormatFieldlist"),d=this.options.get("tooltipFormatFieldlistKey"),u&&d){for(c=[],l=t.length;l--;)h=t[l][d],-1!=(_=i.inArray(h,u))&&(c[_]=t[l]);t=c}for(r=e.length,m=t.length,l=0;r>l;l++)for(f=e[l],"string"==typeof f&&(f=new a(f)),s=f.fclass||"jqsfield",_=0;m>_;_++)t[_].isNull&&g.get("tooltipSkipNull")||(i.extend(t[_],{prefix:g.get("tooltipPrefix"),suffix:g.get("tooltipSuffix")}),o=f.render(t[_],g.get("tooltipValueLookups"),g),v.push('
    '+o+"
    "));return v.length?y+v.join("\n"):""},getCurrentRegionFields:function(){},calcHighlightColor:function(t,n){var i,r,s,a,l=n.get("highlightColor"),u=n.get("highlightLighten");if(l)return l;if(u&&(i=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(t)||/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t))){for(s=[],r=4===t.length?16:1,a=0;3>a;a++)s[a]=o(e.round(parseInt(i[a+1],16)*r*u),0,255);return"rgb("+s.join(",")+")"}return t}}),w={changeHighlight:function(t){var e,n=this.currentRegion,r=this.target,s=this.regionShapes[n];s&&(e=this.renderRegion(n,t),i.isArray(e)||i.isArray(s)?(r.replaceWithShapes(s,e),this.regionShapes[n]=i.map(e,function(t){return t.id})):(r.replaceWithShape(s,e),this.regionShapes[n]=e.id))},render:function(){var t,e,n,r,s=this.values,a=this.target,o=this.regionShapes;if(this.cls._super.render.call(this)){for(n=s.length;n--;)if(t=this.renderRegion(n))if(i.isArray(t)){for(e=[],r=t.length;r--;)t[r].append(),e.push(t[r].id);o[n]=e}else t.append(),o[n]=t.id;else o[n]=null;a.render()}}},i.fn.sparkline.line=b=s(i.fn.sparkline._base,{type:"line",init:function(t,e,n,i,r){b._super.init.call(this,t,e,n,i,r),this.vertices=[],this.regionMap=[],this.xvalues=[],this.yvalues=[],this.yminmax=[],this.hightlightSpotId=null,this.lastShapeId=null,this.initTarget()},getRegion:function(t,e,i){var r,s=this.regionMap;for(r=s.length;r--;)if(null!==s[r]&&e>=s[r][0]&&e<=s[r][1])return s[r][2];return n},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:null===this.yvalues[t],x:this.xvalues[t],y:this.yvalues[t],color:this.options.get("lineColor"),fillColor:this.options.get("fillColor"),offset:t}},renderHighlight:function(){var t,e,i=this.currentRegion,r=this.target,s=this.vertices[i],a=this.options,o=a.get("spotRadius"),l=a.get("highlightSpotColor"),u=a.get("highlightLineColor");s&&(o&&l&&(t=r.drawCircle(s[0],s[1],o,n,l),this.highlightSpotId=t.id,r.insertAfterShape(this.lastShapeId,t)),u&&(e=r.drawLine(s[0],this.canvasTop,s[0],this.canvasTop+this.canvasHeight,u),this.highlightLineId=e.id,r.insertAfterShape(this.lastShapeId,e)))},removeHighlight:function(){var t=this.target;this.highlightSpotId&&(t.removeShapeId(this.highlightSpotId),this.highlightSpotId=null),this.highlightLineId&&(t.removeShapeId(this.highlightLineId),this.highlightLineId=null)},scanValues:function(){var t,n,i,r,s,a=this.values,o=a.length,l=this.xvalues,u=this.yvalues,d=this.yminmax;for(t=0;o>t;t++)n=a[t],i="string"==typeof a[t],r="object"==typeof a[t]&&a[t]instanceof Array,s=i&&a[t].split(":"),i&&2===s.length?(l.push(Number(s[0])),u.push(Number(s[1])),d.push(Number(s[1]))):r?(l.push(n[0]),u.push(n[1]),d.push(n[1])):(l.push(t),null===a[t]||"null"===a[t]?u.push(null):(u.push(Number(n)),d.push(Number(n))));this.options.get("xvalues")&&(l=this.options.get("xvalues")),this.maxy=this.maxyorg=e.max.apply(e,d),this.miny=this.minyorg=e.min.apply(e,d),this.maxx=e.max.apply(e,l),this.minx=e.min.apply(e,l),this.xvalues=l,this.yvalues=u,this.yminmax=d},processRangeOptions:function(){var t=this.options,e=t.get("normalRangeMin"),i=t.get("normalRangeMax");e!==n&&(ethis.maxy&&(this.maxy=i)),t.get("chartRangeMin")!==n&&(t.get("chartRangeClip")||t.get("chartRangeMin")this.maxy)&&(this.maxy=t.get("chartRangeMax")),t.get("chartRangeMinX")!==n&&(t.get("chartRangeClipX")||t.get("chartRangeMinX")this.maxx)&&(this.maxx=t.get("chartRangeMaxX"))},drawNormalRange:function(t,i,r,s,a){var o=this.options.get("normalRangeMin"),l=this.options.get("normalRangeMax"),u=i+e.round(r-r*((l-this.miny)/a)),d=e.round(r*(l-o)/a);this.target.drawRect(t,u,s,d,n,this.options.get("normalRangeColor")).append()},render:function(){var t,r,s,a,o,l,u,d,c,h,p,f,m,_,g,v,M,w,L,k,Y,x,T,D,S,C=this.options,H=this.target,j=this.canvasWidth,A=this.canvasHeight,E=this.vertices,P=C.get("spotRadius"),W=this.regionMap;if(b._super.render.call(this)&&(this.scanValues(),this.processRangeOptions(),T=this.xvalues,D=this.yvalues,this.yminmax.length&&!(this.yvalues.length<2))){for(a=o=0,t=this.maxx-this.minx===0?1:this.maxx-this.minx,r=this.maxy-this.miny===0?1:this.maxy-this.miny,s=this.yvalues.length-1,P&&(4*P>j||4*P>A)&&(P=0),P&&(Y=C.get("highlightSpotColor")&&!C.get("disableInteraction"),(Y||C.get("minSpotColor")||C.get("spotColor")&&D[s]===this.miny)&&(A-=e.ceil(P)),(Y||C.get("maxSpotColor")||C.get("spotColor")&&D[s]===this.maxy)&&(A-=e.ceil(P),a+=e.ceil(P)),(Y||(C.get("minSpotColor")||C.get("maxSpotColor"))&&(D[0]===this.miny||D[0]===this.maxy))&&(o+=e.ceil(P),j-=e.ceil(P)),(Y||C.get("spotColor")||C.get("minSpotColor")||C.get("maxSpotColor")&&(D[s]===this.miny||D[s]===this.maxy))&&(j-=e.ceil(P))),A--,C.get("normalRangeMin")===n||C.get("drawNormalOnTop")||this.drawNormalRange(o,a,A,j,r),u=[],d=[u],_=g=null,v=D.length,S=0;v>S;S++)c=T[S],p=T[S+1],h=D[S],f=o+e.round((c-this.minx)*(j/t)),m=v-1>S?o+e.round((p-this.minx)*(j/t)):j,g=f+(m-f)/2,W[S]=[_||0,g,S],_=g,null===h?S&&(null!==D[S-1]&&(u=[],d.push(u)),E.push(null)):(hthis.maxy&&(h=this.maxy),u.length||u.push([f,a+A]),l=[f,a+e.round(A-A*((h-this.miny)/r))],u.push(l),E.push(l));for(M=[],w=[],L=d.length,S=0;L>S;S++)u=d[S],u.length&&(C.get("fillColor")&&(u.push([u[u.length-1][0],a+A]),w.push(u.slice(0)),u.pop()),u.length>2&&(u[0]=[u[0][0],u[1][1]]),M.push(u));for(L=w.length,S=0;L>S;S++)H.drawShape(w[S],C.get("fillColor"),C.get("fillColor")).append();for(C.get("normalRangeMin")!==n&&C.get("drawNormalOnTop")&&this.drawNormalRange(o,a,A,j,r),L=M.length,S=0;L>S;S++)H.drawShape(M[S],C.get("lineColor"),n,C.get("lineWidth")).append(); if(P&&C.get("valueSpots"))for(k=C.get("valueSpots"),k.get===n&&(k=new y(k)),S=0;v>S;S++)x=k.get(D[S]),x&&H.drawCircle(o+e.round((T[S]-this.minx)*(j/t)),a+e.round(A-A*((D[S]-this.miny)/r)),P,n,x).append();P&&C.get("spotColor")&&null!==D[s]&&H.drawCircle(o+e.round((T[T.length-1]-this.minx)*(j/t)),a+e.round(A-A*((D[s]-this.miny)/r)),P,n,C.get("spotColor")).append(),this.maxy!==this.minyorg&&(P&&C.get("minSpotColor")&&(c=T[i.inArray(this.minyorg,D)],H.drawCircle(o+e.round((c-this.minx)*(j/t)),a+e.round(A-A*((this.minyorg-this.miny)/r)),P,n,C.get("minSpotColor")).append()),P&&C.get("maxSpotColor")&&(c=T[i.inArray(this.maxyorg,D)],H.drawCircle(o+e.round((c-this.minx)*(j/t)),a+e.round(A-A*((this.maxyorg-this.miny)/r)),P,n,C.get("maxSpotColor")).append())),this.lastShapeId=H.getLastShapeId(),this.canvasTop=a,H.render()}}}),i.fn.sparkline.bar=L=s(i.fn.sparkline._base,w,{type:"bar",init:function(t,r,s,a,l){var h,p,f,m,_,g,v,M,w,b,k,Y,x,T,D,S,C,H,j,A,E,P,W=parseInt(s.get("barWidth"),10),O=parseInt(s.get("barSpacing"),10),F=s.get("chartRangeMin"),R=s.get("chartRangeMax"),I=s.get("chartRangeClip"),$=1/0,z=-(1/0);for(L._super.init.call(this,t,r,s,a,l),g=0,v=r.length;v>g;g++)A=r[g],h="string"==typeof A&&A.indexOf(":")>-1,(h||i.isArray(A))&&(D=!0,h&&(A=r[g]=d(A.split(":"))),A=c(A,null),p=e.min.apply(e,A),f=e.max.apply(e,A),$>p&&($=p),f>z&&(z=f));this.stacked=D,this.regionShapes={},this.barWidth=W,this.barSpacing=O,this.totalBarWidth=W+O,this.width=a=r.length*W+(r.length-1)*O,this.initTarget(),I&&(x=F===n?-(1/0):F,T=R===n?1/0:R),_=[],m=D?[]:_;var N=[],B=[];for(g=0,v=r.length;v>g;g++)if(D)for(S=r[g],r[g]=j=[],N[g]=0,m[g]=B[g]=0,C=0,H=S.length;H>C;C++)A=j[C]=I?o(S[C],x,T):S[C],null!==A&&(A>0&&(N[g]+=A),0>$&&z>0?0>A?B[g]+=e.abs(A):m[g]+=A:m[g]+=e.abs(A-(0>A?z:$)),_.push(A));else A=I?o(r[g],x,T):r[g],A=r[g]=u(A),null!==A&&_.push(A);this.max=Y=e.max.apply(e,_),this.min=k=e.min.apply(e,_),this.stackMax=z=D?e.max.apply(e,N):Y,this.stackMin=$=D?e.min.apply(e,_):k,s.get("chartRangeMin")!==n&&(s.get("chartRangeClip")||s.get("chartRangeMin")Y)&&(Y=s.get("chartRangeMax")),this.zeroAxis=w=s.get("zeroAxis",!0),b=0>=k&&Y>=0&&w?0:0==w?k:k>0?k:Y,this.xaxisOffset=b,M=D?e.max.apply(e,m)+e.max.apply(e,B):Y-k,this.canvasHeightEf=w&&0>k?this.canvasHeight-2:this.canvasHeight-1,b>k?(P=D&&Y>=0?z:Y,E=(P-b)/M*this.canvasHeight,E!==e.ceil(E)&&(this.canvasHeightEf-=2,E=e.ceil(E))):E=this.canvasHeight,this.yoffset=E,i.isArray(s.get("colorMap"))?(this.colorMapByIndex=s.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=s.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===n&&(this.colorMapByValue=new y(this.colorMapByValue))),this.range=M},getRegion:function(t,i,r){var s=e.floor(i/this.totalBarWidth);return 0>s||s>=this.values.length?n:s},getCurrentRegionFields:function(){var t,e,n=this.currentRegion,i=_(this.values[n]),r=[];for(e=i.length;e--;)t=i[e],r.push({isNull:null===t,value:t,color:this.calcColor(e,t,n),offset:n});return r},calcColor:function(t,e,r){var s,a,o=this.colorMapByIndex,l=this.colorMapByValue,u=this.options;return s=this.stacked?u.get("stackedBarColor"):0>e?u.get("negBarColor"):u.get("barColor"),0===e&&u.get("zeroColor")!==n&&(s=u.get("zeroColor")),l&&(a=l.get(e))?s=a:o&&o.length>r&&(s=o[r]),i.isArray(s)?s[t%s.length]:s},renderRegion:function(t,r){var s,a,o,l,u,d,c,h,f,m,_=this.values[t],g=this.options,y=this.xaxisOffset,v=[],M=this.range,w=this.stacked,b=this.target,L=t*this.totalBarWidth,k=this.canvasHeightEf,Y=this.yoffset;if(_=i.isArray(_)?_:[_],c=_.length,h=_[0],l=p(null,_),m=p(y,_,!0),l)return g.get("nullColor")?(o=r?g.get("nullColor"):this.calcHighlightColor(g.get("nullColor"),g),s=Y>0?Y-1:Y,b.drawRect(L,s,this.barWidth-1,0,o,o)):n;for(u=Y,d=0;c>d;d++){if(h=_[d],w&&h===y){if(!m||f)continue;f=!0}a=M>0?e.floor(k*(e.abs(h-y)/M))+1:1,y>h||h===y&&0===Y?(s=u,u+=a):(s=Y-a,Y-=a),o=this.calcColor(d,h,t),r&&(o=this.calcHighlightColor(o,g)),v.push(b.drawRect(L,s,this.barWidth-1,a-1,o,o))}return 1===v.length?v[0]:v}}),i.fn.sparkline.tristate=k=s(i.fn.sparkline._base,w,{type:"tristate",init:function(t,e,r,s,a){var o=parseInt(r.get("barWidth"),10),l=parseInt(r.get("barSpacing"),10);k._super.init.call(this,t,e,r,s,a),this.regionShapes={},this.barWidth=o,this.barSpacing=l,this.totalBarWidth=o+l,this.values=i.map(e,Number),this.width=s=e.length*o+(e.length-1)*l,i.isArray(r.get("colorMap"))?(this.colorMapByIndex=r.get("colorMap"),this.colorMapByValue=null):(this.colorMapByIndex=null,this.colorMapByValue=r.get("colorMap"),this.colorMapByValue&&this.colorMapByValue.get===n&&(this.colorMapByValue=new y(this.colorMapByValue))),this.initTarget()},getRegion:function(t,n,i){return e.floor(n/this.totalBarWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===n,value:this.values[t],color:this.calcColor(this.values[t],t),offset:t}},calcColor:function(t,e){var n,i,r=this.values,s=this.options,a=this.colorMapByIndex,o=this.colorMapByValue;return n=o&&(i=o.get(t))?i:a&&a.length>e?a[e]:r[e]<0?s.get("negBarColor"):r[e]>0?s.get("posBarColor"):s.get("zeroBarColor")},renderRegion:function(t,n){var i,r,s,a,o,l,u=this.values,d=this.options,c=this.target;return i=c.pixelHeight,s=e.round(i/2),a=t*this.totalBarWidth,u[t]<0?(o=s,r=s-1):u[t]>0?(o=0,r=s-1):(o=s-1,r=2),l=this.calcColor(u[t],t),null!==l?(n&&(l=this.calcHighlightColor(l,d)),c.drawRect(a,o,this.barWidth-1,r-1,l,l)):void 0}}),i.fn.sparkline.discrete=Y=s(i.fn.sparkline._base,w,{type:"discrete",init:function(t,r,s,a,o){Y._super.init.call(this,t,r,s,a,o),this.regionShapes={},this.values=r=i.map(r,Number),this.min=e.min.apply(e,r),this.max=e.max.apply(e,r),this.range=this.max-this.min,this.width=a="auto"===s.get("width")?2*r.length:this.width,this.interval=e.floor(a/r.length),this.itemWidth=a/r.length,s.get("chartRangeMin")!==n&&(s.get("chartRangeClip")||s.get("chartRangeMin")this.max)&&(this.max=s.get("chartRangeMax")),this.initTarget(),this.target&&(this.lineHeight="auto"===s.get("lineHeight")?e.round(.3*this.canvasHeight):s.get("lineHeight"))},getRegion:function(t,n,i){return e.floor(n/this.itemWidth)},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===n,value:this.values[t],offset:t}},renderRegion:function(t,n){var i,r,s,a,l=this.values,u=this.options,d=this.min,c=this.max,h=this.range,p=this.interval,f=this.target,m=this.canvasHeight,_=this.lineHeight,g=m-_;return r=o(l[t],d,c),a=t*p,i=e.round(g-g*((r-d)/h)),s=u.get("thresholdColor")&&ro?o:0:r.get("base"),this.min=o,this.max=l,this.range=l-o,this.shapes={},this.valueShapes={},this.regiondata={},this.width=s="auto"===r.get("width")?"4.0em":s,this.target=this.$el.simpledraw(s,a,r.get("composite")),i.length||(this.disabled=!0),this.initTarget()},getRegion:function(t,e,i){var r=this.target.getShapeAt(t,e,i);return r!==n&&this.shapes[r]!==n?this.shapes[r]:n},getCurrentRegionFields:function(){var t=this.currentRegion;return{fieldkey:t.substr(0,1),value:this.values[t.substr(1)],region:t}},changeHighlight:function(t){var e,n=this.currentRegion,i=this.valueShapes[n];switch(delete this.shapes[i],n.substr(0,1)){case"r":e=this.renderRange(n.substr(1),t);break;case"p":e=this.renderPerformance(t);break;case"t":e=this.renderTarget(t)}this.valueShapes[n]=e.id,this.shapes[e.id]=n,this.target.replaceWithShape(i,e)},renderRange:function(t,n){var i=this.values[t],r=e.round(this.canvasWidth*((i-this.min)/this.range)),s=this.options.get("rangeColors")[t-2];return n&&(s=this.calcHighlightColor(s,this.options)),this.target.drawRect(0,0,r-1,this.canvasHeight-1,s,s)},renderPerformance:function(t){var n=this.values[1],i=e.round(this.canvasWidth*((n-this.min)/this.range)),r=this.options.get("performanceColor");return t&&(r=this.calcHighlightColor(r,this.options)),this.target.drawRect(0,e.round(.3*this.canvasHeight),i-1,e.round(.4*this.canvasHeight)-1,r,r)},renderTarget:function(t){var n=this.values[0],i=e.round(this.canvasWidth*((n-this.min)/this.range)-this.options.get("targetWidth")/2),r=e.round(.1*this.canvasHeight),s=this.canvasHeight-2*r,a=this.options.get("targetColor");return t&&(a=this.calcHighlightColor(a,this.options)),this.target.drawRect(i,r,this.options.get("targetWidth")-1,s-1,a,a)},render:function(){var t,e,n=this.values.length,i=this.target;if(x._super.render.call(this)){for(t=2;n>t;t++)e=this.renderRange(t).append(),this.shapes[e.id]="r"+t,this.valueShapes["r"+t]=e.id;null!==this.values[1]&&(e=this.renderPerformance().append(),this.shapes[e.id]="p1",this.valueShapes.p1=e.id),null!==this.values[0]&&(e=this.renderTarget().append(),this.shapes[e.id]="t0",this.valueShapes.t0=e.id),i.render()}}}),i.fn.sparkline.pie=T=s(i.fn.sparkline._base,{type:"pie",init:function(t,n,r,s,a){var o,l=0;if(T._super.init.call(this,t,n,r,s,a),this.shapes={},this.valueShapes={},this.values=n=i.map(n,Number),"auto"===r.get("width")&&(this.width=this.height),n.length>0)for(o=n.length;o--;)l+=n[o];this.total=l,this.initTarget(),this.radius=e.floor(e.min(this.canvasWidth,this.canvasHeight)/2)},getRegion:function(t,e,i){var r=this.target.getShapeAt(t,e,i);return r!==n&&this.shapes[r]!==n?this.shapes[r]:n},getCurrentRegionFields:function(){var t=this.currentRegion;return{isNull:this.values[t]===n,value:this.values[t],percent:this.values[t]/this.total*100,color:this.options.get("sliceColors")[t%this.options.get("sliceColors").length],offset:t}},changeHighlight:function(t){var e=this.currentRegion,n=this.renderSlice(e,t),i=this.valueShapes[e];delete this.shapes[i],this.target.replaceWithShape(i,n),this.valueShapes[e]=n.id,this.shapes[n.id]=e},renderSlice:function(t,i){var r,s,a,o,l,u=this.target,d=this.options,c=this.radius,h=d.get("borderWidth"),p=d.get("offset"),f=2*e.PI,m=this.values,_=this.total,g=p?2*e.PI*(p/360):0;for(o=m.length,a=0;o>a;a++){if(r=g,s=g,_>0&&(s=g+f*(m[a]/_)),t===a)return l=d.get("sliceColors")[a%d.get("sliceColors").length],i&&(l=this.calcHighlightColor(l,d)),u.drawPieSlice(c,c,c-h,r,s,n,l);g=s}},render:function(){var t,i,r=this.target,s=this.values,a=this.options,o=this.radius,l=a.get("borderWidth");if(T._super.render.call(this)){for(l&&r.drawCircle(o,o,e.floor(o-l/2),a.get("borderColor"),n,l).append(),i=s.length;i--;)s[i]&&(t=this.renderSlice(i).append(),this.valueShapes[i]=t.id,this.shapes[t.id]=i);r.render()}}}),i.fn.sparkline.box=D=s(i.fn.sparkline._base,{type:"box",init:function(t,e,n,r,s){D._super.init.call(this,t,e,n,r,s),this.values=i.map(e,Number),this.width="auto"===n.get("width")?"4.0em":r,this.initTarget(),this.values.length||(this.disabled=1)},getRegion:function(){return 1},getCurrentRegionFields:function(){var t=[{field:"lq",value:this.quartiles[0]},{field:"med",value:this.quartiles[1]},{field:"uq",value:this.quartiles[2]}];return this.loutlier!==n&&t.push({field:"lo",value:this.loutlier}),this.routlier!==n&&t.push({field:"ro",value:this.routlier}),this.lwhisker!==n&&t.push({field:"lw",value:this.lwhisker}),this.rwhisker!==n&&t.push({field:"rw",value:this.rwhisker}),t},render:function(){var t,i,r,s,a,o,u,d,c,h,p,f=this.target,m=this.values,_=m.length,g=this.options,y=this.canvasWidth,v=this.canvasHeight,M=g.get("chartRangeMin")===n?e.min.apply(e,m):g.get("chartRangeMin"),w=g.get("chartRangeMax")===n?e.max.apply(e,m):g.get("chartRangeMax"),b=0;if(D._super.render.call(this)){if(g.get("raw"))g.get("showOutliers")&&m.length>5?(i=m[0],t=m[1],s=m[2],a=m[3],o=m[4],u=m[5],d=m[6]):(t=m[0],s=m[1],a=m[2],o=m[3],u=m[4]);else if(m.sort(function(t,e){return t-e}),s=l(m,1),a=l(m,2),o=l(m,3),r=o-s,g.get("showOutliers")){for(t=u=n,c=0;_>c;c++)t===n&&m[c]>s-r*g.get("outlierIQR")&&(t=m[c]),m[c]i&&f.drawCircle((i-M)*p+b,v/2,g.get("spotRadius"),g.get("outlierLineColor"),g.get("outlierFillColor")).append(),d>u&&f.drawCircle((d-M)*p+b,v/2,g.get("spotRadius"),g.get("outlierLineColor"),g.get("outlierFillColor")).append()),f.drawRect(e.round((s-M)*p+b),e.round(.1*v),e.round((o-s)*p),e.round(.8*v),g.get("boxLineColor"),g.get("boxFillColor")).append(),f.drawLine(e.round((t-M)*p+b),e.round(v/2),e.round((s-M)*p+b),e.round(v/2),g.get("lineColor")).append(),f.drawLine(e.round((t-M)*p+b),e.round(v/4),e.round((t-M)*p+b),e.round(v-v/4),g.get("whiskerColor")).append(),f.drawLine(e.round((u-M)*p+b),e.round(v/2),e.round((o-M)*p+b),e.round(v/2),g.get("lineColor")).append(),f.drawLine(e.round((u-M)*p+b),e.round(v/4),e.round((u-M)*p+b),e.round(v-v/4),g.get("whiskerColor")).append(),f.drawLine(e.round((a-M)*p+b),e.round(.1*v),e.round((a-M)*p+b),e.round(.9*v),g.get("medianColor")).append(),g.get("target")&&(h=e.ceil(g.get("spotRadius")),f.drawLine(e.round((g.get("target")-M)*p+b),e.round(v/2-h),e.round((g.get("target")-M)*p+b),e.round(v/2+h),g.get("targetColor")).append(),f.drawLine(e.round((g.get("target")-M)*p+b-h),e.round(v/2),e.round((g.get("target")-M)*p+b+h),e.round(v/2),g.get("targetColor")).append()),f.render()}}}),H=s({init:function(t,e,n,i){this.target=t,this.id=e,this.type=n,this.args=i},append:function(){return this.target.appendShape(this),this}}),j=s({_pxregex:/(\d+)(px)?\s*$/i,init:function(t,e,n){t&&(this.width=t,this.height=e,this.target=n,this.lastShapeId=null,n[0]&&(n=n[0]),i.data(n,"_jqs_vcanvas",this))},drawLine:function(t,e,n,i,r,s){return this.drawShape([[t,e],[n,i]],r,s)},drawShape:function(t,e,n,i){return this._genShape("Shape",[t,e,n,i])},drawCircle:function(t,e,n,i,r,s){return this._genShape("Circle",[t,e,n,i,r,s])},drawPieSlice:function(t,e,n,i,r,s,a){return this._genShape("PieSlice",[t,e,n,i,r,s,a])},drawRect:function(t,e,n,i,r,s){return this._genShape("Rect",[t,e,n,i,r,s])},getElement:function(){return this.canvas},getLastShapeId:function(){return this.lastShapeId},reset:function(){alert("reset not implemented")},_insert:function(t,e){i(e).html(t)},_calculatePixelDims:function(t,e,n){var r;r=this._pxregex.exec(e),r?this.pixelHeight=r[1]:this.pixelHeight=i(n).height(),r=this._pxregex.exec(t),r?this.pixelWidth=r[1]:this.pixelWidth=i(n).width()},_genShape:function(t,e){var n=O++;return e.unshift(n),new H(this,n,t,e)},appendShape:function(t){alert("appendShape not implemented")},replaceWithShape:function(t,e){alert("replaceWithShape not implemented")},insertAfterShape:function(t,e){alert("insertAfterShape not implemented")},removeShapeId:function(t){alert("removeShapeId not implemented")},getShapeAt:function(t,e,n){alert("getShapeAt not implemented")},render:function(){alert("render not implemented")}}),A=s(j,{init:function(e,r,s,a){A._super.init.call(this,e,r,s),this.canvas=t.createElement("canvas"),s[0]&&(s=s[0]),i.data(s,"_jqs_vcanvas",this),i(this.canvas).css({display:"inline-block",width:e,height:r,verticalAlign:"top"}),this._insert(this.canvas,s),this._calculatePixelDims(e,r,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,this.interact=a,this.shapes={},this.shapeseq=[],this.currentTargetShapeId=n,i(this.canvas).css({width:this.pixelWidth,height:this.pixelHeight})},_getContext:function(t,e,i){var r=this.canvas.getContext("2d");return t!==n&&(r.strokeStyle=t),r.lineWidth=i===n?1:i,e!==n&&(r.fillStyle=e),r},reset:function(){var t=this._getContext();t.clearRect(0,0,this.pixelWidth,this.pixelHeight),this.shapes={},this.shapeseq=[],this.currentTargetShapeId=n},_drawShape:function(t,e,i,r,s){var a,o,l=this._getContext(i,r,s);for(l.beginPath(),l.moveTo(e[0][0]+.5,e[0][1]+.5),a=1,o=e.length;o>a;a++)l.lineTo(e[a][0]+.5,e[a][1]+.5);i!==n&&l.stroke(),r!==n&&l.fill(),this.targetX!==n&&this.targetY!==n&&l.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawCircle:function(t,i,r,s,a,o,l){var u=this._getContext(a,o,l);u.beginPath(),u.arc(i,r,s,0,2*e.PI,!1),this.targetX!==n&&this.targetY!==n&&u.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t),a!==n&&u.stroke(),o!==n&&u.fill()},_drawPieSlice:function(t,e,i,r,s,a,o,l){var u=this._getContext(o,l);u.beginPath(),u.moveTo(e,i),u.arc(e,i,r,s,a,!1),u.lineTo(e,i),u.closePath(),o!==n&&u.stroke(),l&&u.fill(),this.targetX!==n&&this.targetY!==n&&u.isPointInPath(this.targetX,this.targetY)&&(this.currentTargetShapeId=t)},_drawRect:function(t,e,n,i,r,s,a){return this._drawShape(t,[[e,n],[e+i,n],[e+i,n+r],[e,n+r],[e,n]],s,a)},appendShape:function(t){return this.shapes[t.id]=t,this.shapeseq.push(t.id),this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var n,i=this.shapeseq;for(this.shapes[e.id]=e,n=i.length;n--;)i[n]==t&&(i[n]=e.id);delete this.shapes[t]},replaceWithShapes:function(t,e){var n,i,r,s=this.shapeseq,a={};for(i=t.length;i--;)a[t[i]]=!0;for(i=s.length;i--;)n=s[i],a[n]&&(s.splice(i,1),delete this.shapes[n],r=i);for(i=e.length;i--;)s.splice(r,0,e[i].id),this.shapes[e[i].id]=e[i]},insertAfterShape:function(t,e){var n,i=this.shapeseq;for(n=i.length;n--;)if(i[n]===t)return i.splice(n+1,0,e.id),void(this.shapes[e.id]=e)},removeShapeId:function(t){var e,n=this.shapeseq;for(e=n.length;e--;)if(n[e]===t){n.splice(e,1);break}delete this.shapes[t]},getShapeAt:function(t,e,n){return this.targetX=e,this.targetY=n,this.render(),this.currentTargetShapeId},render:function(){var t,e,n,i=this.shapeseq,r=this.shapes,s=i.length,a=this._getContext();for(a.clearRect(0,0,this.pixelWidth,this.pixelHeight),n=0;s>n;n++)t=i[n],e=r[t],this["_draw"+e.type].apply(this,e.args);this.interact||(this.shapes={},this.shapeseq=[])}}),E=s(j,{init:function(e,n,r){var s;E._super.init.call(this,e,n,r),r[0]&&(r=r[0]),i.data(r,"_jqs_vcanvas",this),this.canvas=t.createElement("span"),i(this.canvas).css({display:"inline-block",position:"relative",overflow:"hidden",width:e,height:n,margin:"0px",padding:"0px",verticalAlign:"top"}),this._insert(this.canvas,r),this._calculatePixelDims(e,n,this.canvas),this.canvas.width=this.pixelWidth,this.canvas.height=this.pixelHeight,s='',this.canvas.insertAdjacentHTML("beforeEnd",s),this.group=i(this.canvas).children()[0],this.rendered=!1,this.prerender=""},_drawShape:function(t,e,i,r,s){var a,o,l,u,d,c,h,p=[];for(h=0,c=e.length;c>h;h++)p[h]=""+e[h][0]+","+e[h][1];return a=p.splice(0,1),s=s===n?1:s,o=i===n?' stroked="false" ':' strokeWeight="'+s+'px" strokeColor="'+i+'" ',l=r===n?' filled="false"':' fillColor="'+r+'" filled="true" ',u=p[0]===p[p.length-1]?"x ":"",d=' '},_drawCircle:function(t,e,i,r,s,a,o){var l,u,d;return e-=r,i-=r,l=s===n?' stroked="false" ':' strokeWeight="'+o+'px" strokeColor="'+s+'" ',u=a===n?' filled="false"':' fillColor="'+a+'" filled="true" ',d=''},_drawPieSlice:function(t,i,r,s,a,o,l,u){var d,c,h,p,f,m,_,g;if(a===o)return"";if(o-a===2*e.PI&&(a=0,o=2*e.PI),c=i+e.round(e.cos(a)*s),h=r+e.round(e.sin(a)*s),p=i+e.round(e.cos(o)*s),f=r+e.round(e.sin(o)*s),c===p&&h===f){if(o-a ')},_drawRect:function(t,e,n,i,r,s,a){return this._drawShape(t,[[e,n],[e,n+r],[e+i,n+r],[e+i,n],[e,n]],s,a)},reset:function(){this.group.innerHTML=""},appendShape:function(t){var e=this["_draw"+t.type].apply(this,t.args);return this.rendered?this.group.insertAdjacentHTML("beforeEnd",e):this.prerender+=e,this.lastShapeId=t.id,t.id},replaceWithShape:function(t,e){var n=i("#jqsshape"+t),r=this["_draw"+e.type].apply(this,e.args);n[0].outerHTML=r},replaceWithShapes:function(t,e){var n,r=i("#jqsshape"+t[0]),s="",a=e.length;for(n=0;a>n;n++)s+=this["_draw"+e[n].type].apply(this,e[n].args);for(r[0].outerHTML=s,n=1;n=0;)n=n.replace(" "+e+" "," ");t.className=n.replace(/^\s+|\s+$/g,"")}},l=function(t){var n=e.createElement("div");return n.appendChild(e.createTextNode(t)),n.innerHTML},u=function(t){t.style.opacity="",t.style.display="block"},d=function(t){if(t&&!t.length)return u(t);for(var e=0;e0?setTimeout(i,e):t.style.display="none"});i()},g=function(n){if("function"==typeof MouseEvent){var i=new MouseEvent("click",{view:t,bubbles:!1,cancelable:!0});n.dispatchEvent(i)}else if(e.createEvent){var r=e.createEvent("MouseEvents");r.initEvent("click",!1,!1),n.dispatchEvent(r)}else e.createEventObject?n.fireEvent("onclick"):"function"==typeof n.onclick&&n.onclick()},y=function(e){"function"==typeof e.stopPropagation?(e.stopPropagation(),e.preventDefault()):t.event&&t.event.hasOwnProperty("cancelBubble")&&(t.event.cancelBubble=!0)};r.hasClass=s,r.addClass=a,r.removeClass=o,r.escapeHtml=l,r._show=u,r.show=d,r._hide=c,r.hide=h,r.isDescendant=p,r.getTopMargin=f,r.fadeIn=m,r.fadeOut=_,r.fireClick=g,r.stopEventPropagation=y},{}],5:[function(e,i,r){Object.defineProperty(r,"__esModule",{value:!0});var s=e("./handle-dom"),a=e("./handle-swal-dom"),o=function(e,i,r){var o=e||t.event,l=o.keyCode||o.which,u=r.querySelector("button.confirm"),d=r.querySelector("button.cancel"),c=r.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(l)){for(var h=o.target||o.srcElement,p=-1,f=0;f"),l.innerHTML=t.html?t.text:a.escapeHtml(t.text||"").split("\n").join("
    "),t.text&&a.show(l),t.customClass)a.addClass(e,t.customClass),e.setAttribute("data-custom-class",t.customClass);else{var c=e.getAttribute("data-custom-class");a.removeClass(e,c),e.setAttribute("data-custom-class","")}if(a.hide(e.querySelectorAll(".sa-icon")),t.type&&!r.isIE8()){var h=function(){for(var i=!1,r=0;ri;i++)n=parseInt(t.substr(2*i,2),16),n=Math.round(Math.min(Math.max(0,n+n*e),255)).toString(16),r+=("00"+n).substr(n.length);return r};i.extend=r,i.hexToRgb=s,i.isIE8=a,i.logStr=o,i.colorLuminance=l},{}]},{},[1]),"function"==typeof define&&define.amd?define(function(){return sweetAlert}):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document),function(t){t.fn.strengthify=function(e){var n=this,i={zxcvbn:"https://cdnjs.cloudflare.com/ajax/libs/zxcvbn/2.0.2/zxcvbn.min.js"},r=t.extend(i,e);return t(".strengthify-wrapper").append('
    ').append('
    ').append('
    ').append('
    ').append('
    '),t.ajax({cache:!0,dataType:"script",url:r.zxcvbn}).done(function(){n.bind("keyup input",function(){var e=t(this).val(),n=""===e?0:1,i=zxcvbn(e),r="",s=t(".strengthify-container"),a=t(".strengthify-wrapper");switch(a.children().css("opacity",n).css("-ms-filter",'"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"'),i.score){case 0:case 1:r="password-bad";break;case 2:r="password-medium";break;case 3:case 4:r="password-good"}s.attr("class",r+" strengthify-container").css("width",25*(0===i.score?1:i.score)+"%"),""===e&&s.css("width",0)})}),n}}(jQuery),$(function(){function t(t,e){$(".block-"+t).removeClass("show").addClass("hidden"),$(".block-"+e).removeClass("hidden").addClass("show"),$(".steps .step").removeClass("active").filter(":lt("+e+")").addClass("active")}$.ajaxPrefilter(function(t,e,n){var i;return t.crossDomain||(i=$('meta[name="token"]').attr("content"),i&&n.setRequestHeader("X-CSRF-Token",i)),n}),$.ajaxSetup({beforeSend:function(t){t.setRequestHeader("Accept","application/json")},statusCode:{401:function(){window.location.href="/"},403:function(){window.location.href="/"}}}),$("form").submit(function(){var t=$(this);t.find(":submit").prop("disabled",!0)}),autosize($("textarea.autosize")),$("[data-method]").not(".disabled").append(function(){var t="\n";return t+="
    \n",t+=" \n",$(this).attr("data-token")&&(t+="\n"),t+="
    \n"}).removeAttr("href").on("click",function(){var t=$(this);t.hasClass("confirm-action")?askConfirmation(function(){t.find("form").submit()}):t.find("form").submit()}),Messenger.options={extraClasses:"messenger-fixed messenger-on-top",theme:"air"},window.Cachet={},moment.locale(Global.locale),$("abbr.timeago").each(function(){var t=$(this);t.livestamp(t.data("timeago")).tooltip()}),window.Cachet.Notifier=function(){this.notify=function(t,e,n){e="undefined"==typeof e||"error"===e?"error":e;var i={message:t,type:e,showCloseButton:!0};n=_.extend(i,n),Messenger().post(n)}},$(".sidebar-toggler").click(function(t){t.preventDefault(),$(".wrapper").toggleClass("toggled")}),$(".color-code").minicolors({control:"hue",defaultValue:$(this).val()||"",inline:!1,letterCase:"lowercase",opacity:!1,position:"bottom left",theme:"bootstrap"}),$('[data-toggle="tooltip"]').tooltip(),$("button.close").on("click",function(){$(this).parents("div.alert").addClass("hide")}),$("form[name=IncidentForm] select[name=component_id]").on("change",function(){var t=$(this).find("option:selected"),e=$("#component-status");""!==t.val()&&(e.hasClass("hidden")?e.removeClass("hidden"):e.addClass("hidden"))}),$("input[rel=datepicker]").datetimepicker({format:"DD/MM/YYYY HH:mm",minDate:new Date,sideBySide:!0,icons:{time:"ion-clock",date:"ion-android-calendar",up:"ion-ios-arrow-up",down:"ion-ios-arrow-down",previous:"ion-ios-arrow-left",next:"ion-ios-arrow-right",today:"ion-android-home",clear:"ion-trash-a"}}),$("input[rel=datepicker-any]").datetimepicker({format:"DD/MM/YYYY HH:mm",sideBySide:!0,icons:{time:"ion-clock",date:"ion-android-calendar",up:"ion-ios-arrow-up",down:"ion-ios-arrow-down",previous:"ion-ios-arrow-left",next:"ion-ios-arrow-right",today:"ion-android-home",clear:"ion-trash-a"}});var e=document.getElementById("component-list");e&&new Sortable(e,{group:"omega",handle:".drag-handle",onUpdate:function(){var t=$.map($("#component-list .striped-list-item"),function(t){return $(t).data("component-id")});$.ajax({async:!0,url:"/dashboard/api/components/order",type:"POST",data:{ids:t},success:function(){(new Cachet.Notifier).notify("Component orders updated.","success")},error:function(){(new Cachet.Notifier).notify("Component orders not updated.","error")}})}});var n=document.getElementById("component-group-list");if(n&&new Sortable(n,{group:"omega",handle:".drag-handle",onUpdate:function(){var t=$.map($("#component-group-list .striped-list-item"),function(t){return $(t).data("group-id")});$.ajax({async:!0,url:"/dashboard/api/components/groups/order",type:"POST",data:{ids:t},success:function(){(new Cachet.Notifier).notify("Component groups order has been updated.","success")},error:function(){(new Cachet.Notifier).notify("Component groups order could not be updated.","error")}})}}),$("form.component-inline").on("click","input[type=radio]",function(){var t=$(this).parents("form"),e=t.serializeObject();$.ajax({async:!0,url:"/dashboard/api/components/"+e.component_id,type:"POST",data:e,success:function(e){(new Cachet.Notifier).notify(t.data("messenger"),"success")},error:function(t,e,n){(new Cachet.Notifier).notify("Something went wrong updating the component.")}})}),$("select[name=template]").on("change",function(){var t=$(this).find("option:selected"),e=t.val();e&&$.ajax({async:!0,data:{slug:e},url:"/dashboard/api/incidents/templates",success:function(t){var e=$("form[role=form]");e.find("input[name=name]").val(t.name),e.find("textarea[name=message]").val(t.template)},error:function(){(new Cachet.Notifier).notify("There was an error finding that template.")}})}),$("#remove-banner").click(function(){$("#banner-view").remove(),$("input[name=remove_banner]").val("1")}),$(".group-name").on("click",function(){var t=$(this);t.find(".group-toggle").toggleClass("ion-ios-minus-outline").toggleClass("ion-ios-plus-outline"),t.next(".group-items").toggleClass("hide")}),$(".wizard-next").on("click",function(){var e=$("#setup-form"),n=$(this),i=n.data("currentBlock"),r=n.data("nextBlock");if(n.button("loading"),r>i){var s="/setup/step"+i;return $.post(s,e.serializeObject()).done(function(e){t(i,r)}).fail(function(t){var e=_.toArray(t.responseJSON.errors);_.each(e,function(t){(new Cachet.Notifier).notify(t)})}).always(function(){n.button("reset")}),!1}t(i,r),n.button("reset")}),$.fn.sparkline){var i=function(){$(".sparkline").each(function(){var t=$(this).data();t.valueSpots={"0:":t.spotColor},$(this).sparkline(t.data,t);var e=t.compositedata;if(e){var n=$(this).attr("data-stack-line-color"),i=$(this).attr("data-stack-fill-color"),r=$(this).attr("data-stack-spot-color"),s=$(this).attr("data-stack-spot-radius");$(this).sparkline(e,{composite:!0,lineColor:n,fillColor:i,spotColor:r,highlightSpotColor:r,spotRadius:s,valueSpots:{"0:":r}})}})};i(!1)}$(".password-strength").strengthify(),$("#update-alert").length>0&&$.ajax({async:!0,dataType:"json",url:"/dashboard/api/system/version"}).done(function(t){0==t.is_latest&&$("#update-alert").removeClass("hidden")}),$("#subscribe-modal").on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=$(this);n.find("#subscribe-modal-id").val(e.data("component-id"))}).on("hidden.bs.modal",function(t){var e=$(this);e.find("#subscribe-modal-id").val("")}),$(".modal").on("shown.bs.modal",function(){$(this).find("input[type=text]").focus()})}); \ No newline at end of file +o.addClass(i,"showSweetAlert"),o.removeClass(i,"hideSweetAlert"),t.previousActiveElement=e.activeElement;var r=i.querySelector("button.confirm");r.focus(),setTimeout(function(){o.addClass(i,"visible")},500);var s=i.getAttribute("data-timer");if("null"!==s&&""!==s){var a=n;i.timeout=setTimeout(function(){var t=(a||null)&&"true"===i.getAttribute("data-has-done-function");t?a(null):sweetAlert.close()},s)}},M=function(){var t=m(),e=_();o.removeClass(t,"show-input"),e.value=u["default"].inputValue,e.setAttribute("type",u["default"].inputType),e.setAttribute("placeholder",u["default"].inputPlaceholder),w()},w=function(t){if(t&&13===t.keyCode)return!1;var e=m(),n=e.querySelector(".sa-input-error");o.removeClass(n,"show");var i=e.querySelector(".sa-error-container");o.removeClass(i,"show")},b=function(){var t=m();t.style.marginTop=o.getTopMargin(m())};r.sweetAlertInitialize=f,r.getModal=m,r.getOverlay=g,r.getInput=_,r.setFocusStyle=y,r.openModal=v,r.resetInput=M,r.resetInputError=w,r.fixVerticalPosition=b},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(t,e,n){Object.defineProperty(n,"__esModule",{value:!0});var i='
    \n \n \n \n \n
    \n \n \n
    \n \n \n\n
    \n
    \n

    Title

    \n

    Text

    \n
    \n \n
    \n
    \n
    !
    \n

    Not valid!

    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    ';n["default"]=i,e.exports=n["default"]},{}],8:[function(t,e,i){Object.defineProperty(i,"__esModule",{value:!0});var r=t("./utils"),s=t("./handle-swal-dom"),a=t("./handle-dom"),o=["error","warning","info","success","input","prompt"],l=function(t){var e=s.getModal(),i=e.querySelector("h2"),l=e.querySelector("p"),u=e.querySelector("button.cancel"),d=e.querySelector("button.confirm");if(i.innerHTML=t.html?t.title:a.escapeHtml(t.title).split("\n").join("
    "),l.innerHTML=t.html?t.text:a.escapeHtml(t.text||"").split("\n").join("
    "),t.text&&a.show(l),t.customClass)a.addClass(e,t.customClass),e.setAttribute("data-custom-class",t.customClass);else{var c=e.getAttribute("data-custom-class");a.removeClass(e,c),e.setAttribute("data-custom-class","")}if(a.hide(e.querySelectorAll(".sa-icon")),t.type&&!r.isIE8()){var h=function(){for(var i=!1,r=0;ri;i++)n=parseInt(t.substr(2*i,2),16),n=Math.round(Math.min(Math.max(0,n+n*e),255)).toString(16),r+=("00"+n).substr(n.length);return r};i.extend=r,i.hexToRgb=s,i.isIE8=a,i.logStr=o,i.colorLuminance=l},{}]},{},[1]),"function"==typeof define&&define.amd?define(function(){return sweetAlert}):"undefined"!=typeof module&&module.exports&&(module.exports=sweetAlert)}(window,document),function(t){t.fn.strengthify=function(e){var n=this,i={zxcvbn:"https://cdnjs.cloudflare.com/ajax/libs/zxcvbn/2.0.2/zxcvbn.min.js"},r=t.extend(i,e);return t(".strengthify-wrapper").append('
    ').append('
    ').append('
    ').append('
    ').append('
    '),t.ajax({cache:!0,dataType:"script",url:r.zxcvbn}).done(function(){n.bind("keyup input",function(){var e=t(this).val(),n=""===e?0:1,i=zxcvbn(e),r="",s=t(".strengthify-container"),a=t(".strengthify-wrapper");switch(a.children().css("opacity",n).css("-ms-filter",'"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"'),i.score){case 0:case 1:r="password-bad";break;case 2:r="password-medium";break;case 3:case 4:r="password-good"}s.attr("class",r+" strengthify-container").css("width",25*(0===i.score?1:i.score)+"%"),""===e&&s.css("width",0)})}),n}}(jQuery),$(function(){function t(t,e){$(".block-"+t).removeClass("show").addClass("hidden"),$(".block-"+e).removeClass("hidden").addClass("show"),$(".steps .step").removeClass("active").filter(":lt("+e+")").addClass("active")}$.ajaxPrefilter(function(t,e,n){var i;return t.crossDomain||(i=$('meta[name="token"]').attr("content"),i&&n.setRequestHeader("X-CSRF-Token",i)),n}),$.ajaxSetup({beforeSend:function(t){t.setRequestHeader("Accept","application/json")},statusCode:{401:function(){window.location.href="/"},403:function(){window.location.href="/"}}}),$("form").submit(function(){var t=$(this);t.find(":submit").prop("disabled",!0)}),autosize($("textarea.autosize")),$("[data-method]").not(".disabled").append(function(){var t="\n";return t+="
    \n",t+="\n",t+="\n",t+="
    \n"}).removeAttr("href").on("click",function(){var t=$(this);t.hasClass("confirm-action")?askConfirmation(function(){t.find("form").submit()}):t.find("form").submit()}),Messenger.options={extraClasses:"messenger-fixed messenger-on-top",theme:"air"},window.Cachet={},moment.locale(Global.locale),$("abbr.timeago").each(function(){var t=$(this);t.livestamp(t.data("timeago")).tooltip()}),window.Cachet.Notifier=function(){this.notify=function(t,e,n){e="undefined"==typeof e||"error"===e?"error":e;var i={message:t,type:e,showCloseButton:!0};n=_.extend(i,n),Messenger().post(n)}},$(".sidebar-toggler").click(function(t){t.preventDefault(),$(".wrapper").toggleClass("toggled")}),$(".color-code").minicolors({control:"hue",defaultValue:$(this).val()||"",inline:!1,letterCase:"lowercase",opacity:!1,position:"bottom left",theme:"bootstrap"}),$('[data-toggle="tooltip"]').tooltip(),$("button.close").on("click",function(){$(this).parents("div.alert").addClass("hide")}),$("form[name=IncidentForm] select[name=component_id]").on("change",function(){var t=$(this).find("option:selected"),e=$("#component-status");""!==t.val()&&(e.hasClass("hidden")?e.removeClass("hidden"):e.addClass("hidden"))}),$("input[rel=datepicker]").datetimepicker({format:"DD/MM/YYYY HH:mm",minDate:new Date,sideBySide:!0,icons:{time:"ion-clock",date:"ion-android-calendar",up:"ion-ios-arrow-up",down:"ion-ios-arrow-down",previous:"ion-ios-arrow-left",next:"ion-ios-arrow-right",today:"ion-android-home",clear:"ion-trash-a"}}),$("input[rel=datepicker-any]").datetimepicker({format:"DD/MM/YYYY HH:mm",sideBySide:!0,icons:{time:"ion-clock",date:"ion-android-calendar",up:"ion-ios-arrow-up",down:"ion-ios-arrow-down",previous:"ion-ios-arrow-left",next:"ion-ios-arrow-right",today:"ion-android-home",clear:"ion-trash-a"}});var e=document.getElementById("component-list");e&&new Sortable(e,{group:"omega",handle:".drag-handle",onUpdate:function(){var t=$.map($("#component-list .striped-list-item"),function(t){return $(t).data("component-id")});$.ajax({async:!0,url:"/dashboard/api/components/order",type:"POST",data:{ids:t},success:function(){(new Cachet.Notifier).notify("Component orders updated.","success")},error:function(){(new Cachet.Notifier).notify("Component orders not updated.","error")}})}});var n=document.getElementById("component-group-list");if(n&&new Sortable(n,{group:"omega",handle:".drag-handle",onUpdate:function(){var t=$.map($("#component-group-list .striped-list-item"),function(t){return $(t).data("group-id")});$.ajax({async:!0,url:"/dashboard/api/components/groups/order",type:"POST",data:{ids:t},success:function(){(new Cachet.Notifier).notify("Component groups order has been updated.","success")},error:function(){(new Cachet.Notifier).notify("Component groups order could not be updated.","error")}})}}),$("form.component-inline").on("click","input[type=radio]",function(){var t=$(this).parents("form"),e=t.serializeObject();$.ajax({async:!0,url:"/dashboard/api/components/"+e.component_id,type:"POST",data:e,success:function(e){(new Cachet.Notifier).notify(t.data("messenger"),"success")},error:function(t,e,n){(new Cachet.Notifier).notify("Something went wrong updating the component.")}})}),$("select[name=template]").on("change",function(){var t=$(this).find("option:selected"),e=t.val();e&&$.ajax({async:!0,data:{slug:e},url:"/dashboard/api/incidents/templates",success:function(t){var e=$("form[role=form]");e.find("input[name=name]").val(t.name),e.find("textarea[name=message]").val(t.template)},error:function(){(new Cachet.Notifier).notify("There was an error finding that template.")}})}),$("#remove-banner").click(function(){$("#banner-view").remove(),$("input[name=remove_banner]").val("1")}),$(".group-name").on("click",function(){var t=$(this);t.find(".group-toggle").toggleClass("ion-ios-minus-outline").toggleClass("ion-ios-plus-outline"),t.next(".group-items").toggleClass("hide")}),$(".wizard-next").on("click",function(){var e=$("#setup-form"),n=$(this),i=n.data("currentBlock"),r=n.data("nextBlock");if(n.button("loading"),r>i){var s="/setup/step"+i;return $.post(s,e.serializeObject()).done(function(e){t(i,r)}).fail(function(t){var e=_.toArray(t.responseJSON.errors);_.each(e,function(t){(new Cachet.Notifier).notify(t)})}).always(function(){n.button("reset")}),!1}t(i,r),n.button("reset")}),$.fn.sparkline){var i=function(){$(".sparkline").each(function(){var t=$(this).data();t.valueSpots={"0:":t.spotColor},$(this).sparkline(t.data,t);var e=t.compositedata;if(e){var n=$(this).attr("data-stack-line-color"),i=$(this).attr("data-stack-fill-color"),r=$(this).attr("data-stack-spot-color"),s=$(this).attr("data-stack-spot-radius");$(this).sparkline(e,{composite:!0,lineColor:n,fillColor:i,spotColor:r,highlightSpotColor:r,spotRadius:s,valueSpots:{"0:":r}})}})};i(!1)}$(".password-strength").strengthify(),$("#update-alert").length>0&&$.ajax({async:!0,dataType:"json",url:"/dashboard/api/system/version"}).done(function(t){0==t.is_latest&&$("#update-alert").removeClass("hidden")}),$("#subscribe-modal").on("show.bs.modal",function(t){var e=$(t.relatedTarget),n=$(this);n.find("#subscribe-modal-id").val(e.data("component-id"))}).on("hidden.bs.modal",function(t){var e=$(this);e.find("#subscribe-modal-id").val("")}),$(".modal").on("shown.bs.modal",function(){$(this).find("input[type=text]").focus()})}); \ No newline at end of file diff --git a/public/build/rev-manifest.json b/public/build/rev-manifest.json index b0d0724b..c939d257 100644 --- a/public/build/rev-manifest.json +++ b/public/build/rev-manifest.json @@ -1,4 +1,4 @@ { "dist/css/all.css": "dist/css/all-0a0328c0cc.css", - "dist/js/all.js": "dist/js/all-47747ca921.js" + "dist/js/all.js": "dist/js/all-e705b7b737.js" } \ No newline at end of file diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 8bb6ee74..543208a2 100755 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -39,11 +39,9 @@ $(function() { // Mock the DELETE form requests. $('[data-method]').not(".disabled").append(function() { var methodForm = "\n"; - methodForm += "
    \n"; - methodForm += " \n"; - if ($(this).attr('data-token')) { - methodForm += "\n"; - } + methodForm += "\n"; + methodForm += "\n"; + methodForm += "\n"; methodForm += "
    \n"; return methodForm; })