(function(e,t,n){(function(e){if(typeof define==="function"&&define.amd){define(["jquery"],e)}else if(jQuery&&!jQuery.fn.sparkline){e(jQuery)}})(function(r){"use strict";var i={},s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j=0;s=function(){return{common:{type:"line",lineColor:"#00f",fillColor:"#cdf",defaultPixelsPerValue:3,width:"auto",height:"auto",composite:false,tagValuesAttribute:"values",tagOptionsPrefix:"spark",enableTagOptions:false,enableHighlight:true,highlightLighten:1.4,tooltipSkipNull:true,tooltipPrefix:"",tooltipSuffix:"",disableHiddenCheck:false,numberFormatter:false,numberDigitGroupCount:3,numberDigitGroupSep:",",numberDecimalMark:".",disableTooltips:false,disableInteraction:false},line:{spotColor:"#f80",highlightSpotColor:"#5f5",highlightLineColor:"#f22",spotRadius:1.5,minSpotColor:"#f80",maxSpotColor:"#f80",lineWidth:1,normalRangeMin:n,normalRangeMax:n,normalRangeColor:"#ccc",drawNormalOnTop:false,chartRangeMin:n,chartRangeMax:n,chartRangeMinX:n,chartRangeMaxX:n,tooltipFormat:new u(' {{prefix}}{{y}}{{suffix}}')},bar:{barColor:"#3366cc",negBarColor:"#f44",stackedBarColor:["#3366cc","#dc3912","#ff9900","#109618","#66aa00","#dd4477","#0099c6","#990099"],zeroColor:n,nullColor:n,zeroAxis:true,barWidth:4,barSpacing:1,chartRangeMax:n,chartRangeMin:n,chartRangeClip:false,colorMap:n,tooltipFormat:new u(' {{prefix}}{{value}}{{suffix}}')},tristate:{barWidth:4,barSpacing:1,posBarColor:"#6f6",negBarColor:"#f44",zeroBarColor:"#999",colorMap:{},tooltipFormat:new u(' {{value:map}}'),tooltipValueLookups:{map:{"-1":"Loss",0:"Draw",1:"Win"}}},discrete:{lineHeight:"auto",thresholdColor:n,thresholdValue:0,chartRangeMax:n,chartRangeMin:n,chartRangeClip:false,tooltipFormat:new u("{{prefix}}{{value}}{{suffix}}")},bullet:{targetColor:"#f33",targetWidth:3,performanceColor:"#33f",rangeColors:["#d3dafe","#a8b6ff","#7f94ff"],base:n,tooltipFormat:new u("{{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 u(' {{value}} ({{percent.1}}%)')},box:{raw:false,boxLineColor:"#000",boxFillColor:"#cdf",whiskerColor:"#000",outlierLineColor:"#333",outlierFillColor:"#fff",medianColor:"#f00",showOutliers:true,outlierIQR:1.5,spotRadius:1.5,target:n,targetColor:"#4a2",chartRangeMax:n,chartRangeMin:n,tooltipFormat:new u("{{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"}}}}};O=".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;"+"z-index: 10000;"+"}"+".jqsfield { "+"color: white;"+"font: 10px arial, san serif;"+"text-align: left;"+"}";o=function(){var e,t;e=function(){this.init.apply(this,arguments)};if(arguments.length>1){if(arguments[0]){e.prototype=r.extend(new arguments[0],arguments[arguments.length-1]);e._super=arguments[0].prototype}else{e.prototype=arguments[arguments.length-1]}if(arguments.length>2){t=Array.prototype.slice.call(arguments,1,-1);t.unshift(e.prototype);r.extend.apply(r,t)}}else{e.prototype=arguments[0]}e.prototype.cls=e;return e};r.SPFormatClass=u=o({fre:/\{\{([\w.]+?)(:(.+?))?\}\}/g,precre:/(\w+)\.(\d+)/,init:function(e,t){this.format=e;this.fclass=t},render:function(e,t,r){var i=this,s=e,o,u,a,f,l;return this.format.replace(this.fre,function(){var e;u=arguments[1];a=arguments[3];o=i.precre.exec(u);if(o){l=o[2];u=o[1]}else{l=false}f=s[u];if(f===n){return""}if(a&&t&&t[a]){e=t[a];if(e.get){return t[a].get(f)||f}else{return t[a][f]||f}}if(p(f)){if(r.get("numberFormatter")){f=r.get("numberFormatter")(f)}else{f=y(f,l,r.get("numberDigitGroupCount"),r.get("numberDigitGroupSep"),r.get("numberDecimalMark"))}}return f})}});r.spformat=function(e,t){return new u(e,t)};a=function(e,t,n){if(en){return n}return e};f=function(e,n){var r;if(n===2){r=t.floor(e.length/2);return e.length%2?e[r]:(e[r-1]+e[r])/2}else{if(e.length%2){r=(e.length*n+n)/4;return r%1?(e[t.floor(r)]+e[t.floor(r)-1])/2:e[r-1]}else{r=(e.length*n+2)/4;return r%1?(e[t.floor(r)]+e[t.floor(r)-1])/2:e[r-1]}}};l=function(e){var t;switch(e){case"undefined":e=n;break;case"null":e=null;break;case"true":e=true;break;case"false":e=false;break;default:t=parseFloat(e);if(e==t){e=t}}return e};c=function(e){var t,n=[];for(t=e.length;t--;){n[t]=l(e[t])}return n};h=function(e,t){var n,r,i=[];for(n=0,r=e.length;n0;u-=n){e.splice(u,0,i)}return e.join("")};d=function(e,t,n){var r;for(r=t.length;r--;){if(n&&t[r]===null)continue;if(t[r]!==e){return false}}return true};v=function(e){var t=0,n;for(n=e.length;n--;){t+=typeof e[n]==="number"?e[n]:0}return t};g=function(e){return r.isArray(e)?e:[e]};m=function(t){var n;if(e.createStyleSheet){e.createStyleSheet().cssText=t}else{n=e.createElement("style");n.type="text/css";e.getElementsByTagName("head")[0].appendChild(n);n[typeof e.body.style.WebkitAppearance=="string"?"innerText":"innerHTML"]=t}};r.fn.simpledraw=function(t,i,s,o){var u,a;if(s&&(u=this.data("_jqs_vcanvas"))){return u}if(r.fn.sparkline.canvas===false){return false}else if(r.fn.sparkline.canvas===n){var f=e.createElement("canvas");if(!!(f.getContext&&f.getContext("2d"))){r.fn.sparkline.canvas=function(e,t,n,r){return new P(e,t,n,r)}}else if(e.namespaces&&!e.namespaces.v){e.namespaces.add("v","urn:schemas-microsoft-com:vml","#default#VML");r.fn.sparkline.canvas=function(e,t,n,r){return new H(e,t,n)}}else{r.fn.sparkline.canvas=false;return false}}if(t===n){t=r(this).innerWidth()}if(i===n){i=r(this).innerHeight()}u=r.fn.sparkline.canvas(t,i,this,o);a=r(this).data("_jqs_mhandler");if(a){a.registerCanvas(u)}return u};r.fn.cleardraw=function(){var e=this.data("_jqs_vcanvas");if(e){e.reset()}};r.RangeMapClass=b=o({init:function(e){var t,n,r=[];for(t in e){if(e.hasOwnProperty(t)&&typeof t==="string"&&t.indexOf(":")>-1){n=t.split(":");n[0]=n[0].length===0?-Infinity:parseFloat(n[0]);n[1]=n[1].length===0?Infinity:parseFloat(n[1]);n[2]=e[t];r.push(n)}}this.map=e;this.rangelist=r||false},get:function(e){var t=this.rangelist,r,i,s;if((s=this.map[e])!==n){return s}if(t){for(r=t.length;r--;){i=t[r];if(i[0]<=e&&i[1]>=e){return i[2]}}}return n}});r.range_map=function(e){return new b(e)};w=o({init:function(e,t){var n=r(e);this.$el=n;this.options=t;this.currentPageX=0;this.currentPageY=0;this.el=e;this.splist=[];this.tooltip=null;this.over=false;this.displayTooltips=!t.get("disableTooltips");this.highlightEnabled=!t.get("disableHighlight")},registerSparkline:function(e){this.splist.push(e);if(this.over){this.updateDisplay()}},registerCanvas:function(e){var t=r(e.canvas);this.canvas=e;this.$canvas=t;t.mouseenter(r.proxy(this.mouseenter,this));t.mouseleave(r.proxy(this.mouseleave,this));t.click(r.proxy(this.mouseclick,this))},reset:function(e){this.splist=[];if(this.tooltip&&e){this.tooltip.remove();this.tooltip=n}},mouseclick:function(e){var t=r.Event("sparklineClick");t.originalEvent=e;t.sparklines=this.splist;this.$el.trigger(t)},mouseenter:function(t){r(e.body).unbind("mousemove.jqs");r(e.body).bind("mousemove.jqs",r.proxy(this.mousemove,this));this.over=true;this.currentPageX=t.pageX;this.currentPageY=t.pageY;this.currentEl=t.target;if(!this.tooltip&&this.displayTooltips){this.tooltip=new E(this.options);this.tooltip.updatePosition(t.pageX,t.pageY)}this.updateDisplay()},mouseleave:function(){r(e.body).unbind("mousemove.jqs");var t=this.splist,n=t.length,i=false,s,o;this.over=false;this.currentEl=null;if(this.tooltip){this.tooltip.remove();this.tooltip=null}for(o=0;o