p[0]||xmin==null){xmin=p[0]}if(ymaxp[1]||ymin==null){ymin=p[1]}}if(this.type==="line"&&this.renderer.bands.show){ymax=this._yaxis.series_u2p(this.renderer.bands._min);ymin=this._yaxis.series_u2p(this.renderer.bands._max)}this._boundingBox=[[xmin,ymax],[xmax,ymin]];if(this.markerRenderer.show&&!fill){if(this.renderer.smooth){gd=this.gridData}for(i=0;idim){dim=temp}}}tick=null;t=null;if(lshow){w=this._label._elem.outerWidth(true);h=this._label._elem.outerHeight(true)}if(this.name=="xaxis"){dim=dim+h;this._elem.css({height:dim+"px",left:"0px",bottom:"0px"})}else if(this.name=="x2axis"){dim=dim+h;this._elem.css({height:dim+"px",left:"0px",top:"0px"})}else if(this.name=="yaxis"){dim=dim+w;this._elem.css({width:dim+"px",left:"0px",top:"0px"});if(lshow&&this._label.constructor==$.jqplot.AxisLabelRenderer){this._label._elem.css("width",w+"px")}}else{dim=dim+w;this._elem.css({width:dim+"px",right:"0px",top:"0px"});if(lshow&&this._label.constructor==$.jqplot.AxisLabelRenderer){this._label._elem.css("width",w+"px")}}}};$.jqplot.LinearAxisRenderer.prototype.createTicks=function(plot){var ticks=this._ticks;var userTicks=this.ticks;var name=this.name;var db=this._dataBounds;var dim=this.name.charAt(0)==="x"?this._plotDimensions.width:this._plotDimensions.height;var interval;var min,max;var pos1,pos2;var tt,i;var userMin=this.min;var userMax=this.max;var userNT=this.numberTicks;var userTI=this.tickInterval;var threshold=30;this._scalefact=(Math.max(dim,threshold+1)-threshold)/300;if(userTicks.length){for(i=0;ithis.breakPoints[0]&&ut[0]<=this.breakPoints[1]){t.show=false;t.showGridline=false;t.label=ut[1]}else{t.label=ut[1]}}else{t.label=ut[1]}t.setTick(ut[0],this.name);this._ticks.push(t)}else if($.isPlainObject(ut)){$.extend(true,t,ut);t.axis=this.name;this._ticks.push(t)}else{t.value=ut;if(this.breakPoints){if(ut==this.breakPoints[0]){t.label=this.breakTickLabel;t._breakTick=true;t.showGridline=false;t.showMark=false}else if(ut>this.breakPoints[0]&&ut<=this.breakPoints[1]){t.show=false;t.showGridline=false}}t.setTick(ut,this.name);this._ticks.push(t)}}this.numberTicks=userTicks.length;this.min=this._ticks[0].value;this.max=this._ticks[this.numberTicks-1].value;this.tickInterval=(this.max-this.min)/(this.numberTicks-1)}else{if(name=="xaxis"||name=="x2axis"){dim=this._plotDimensions.width}else{dim=this._plotDimensions.height}var _numberTicks=this.numberTicks;if(this.alignTicks){if(this.name==="x2axis"&&plot.axes.xaxis.show){_numberTicks=plot.axes.xaxis.numberTicks}else if(this.name.charAt(0)==="y"&&this.name!=="yaxis"&&this.name!=="yMidAxis"&&plot.axes.yaxis.show){_numberTicks=plot.axes.yaxis.numberTicks}}min=this.min!=null?this.min:db.min;max=this.max!=null?this.max:db.max;var range=max-min;var rmin,rmax;var temp;if(this.tickOptions==null||!this.tickOptions.formatString){this._overrideFormatString=true}if(this.min==null||this.max==null&&this.tickInterval==null&&!this.autoscale){if(this.forceTickAt0){if(min>0){min=0}if(max<0){max=0}}if(this.forceTickAt100){if(min>100){min=100}if(max<100){max=100}}var keepMin=false,keepMax=false;if(this.min!=null){keepMin=true}else if(this.max!=null){keepMax=true}var ret=$.jqplot.LinearTickGenerator(min,max,this._scalefact,_numberTicks,keepMin,keepMax);var tumin=this.min!=null?min:min+range*(this.padMin-1);var tumax=this.max!=null?max:max-range*(this.padMax-1);if(mintumax){tumin=this.min!=null?min:min-range*(this.padMin-1);tumax=this.max!=null?max:max+range*(this.padMax-1);ret=$.jqplot.LinearTickGenerator(tumin,tumax,this._scalefact,_numberTicks,keepMin,keepMax)}this.min=ret[0];this.max=ret[1];this.numberTicks=ret[2];this._autoFormatString=ret[3];this.tickInterval=ret[4]}else{if(min==max){var adj=.05;if(min>0){adj=Math.max(Math.log(min)/Math.LN10,.05)}min-=adj;max+=adj}if(this.autoscale&&this.min==null&&this.max==null){var rrange,ti,margin;var forceMinZero=false;var forceZeroLine=false;var intervals={min:null,max:null,average:null,stddev:null};for(var i=0;ivmax){vmax=vals[j]}}var dp=(vmax-vmin)/vmax;if(s.renderer.constructor==$.jqplot.BarRenderer){if(vmin>=0&&(s.fillToZero||dp>.1)){forceMinZero=true}else{forceMinZero=false;if(s.fill&&s.fillToZero&&vmin<0&&vmax>0){forceZeroLine=true}else{forceZeroLine=false}}}else if(s.fill){if(vmin>=0&&(s.fillToZero||dp>.1)){forceMinZero=true}else if(vmin<0&&vmax>0&&s.fillToZero){forceMinZero=false;forceZeroLine=true}else{forceMinZero=false;forceZeroLine=false}}else if(vmin<0){forceMinZero=false}}}if(forceMinZero){this.numberTicks=2+Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing);this.min=0;userMin=0;ti=max/(this.numberTicks-1);temp=Math.pow(10,Math.abs(Math.floor(Math.log(ti)/Math.LN10)));if(ti/temp==parseInt(ti/temp,10)){ti+=temp}this.tickInterval=Math.ceil(ti/temp)*temp;this.max=this.tickInterval*(this.numberTicks-1)}else if(forceZeroLine){this.numberTicks=2+Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing);var ntmin=Math.ceil(Math.abs(min)/range*(this.numberTicks-1));var ntmax=this.numberTicks-1-ntmin;ti=Math.max(Math.abs(min/ntmin),Math.abs(max/ntmax));temp=Math.pow(10,Math.abs(Math.floor(Math.log(ti)/Math.LN10)));this.tickInterval=Math.ceil(ti/temp)*temp;this.max=this.tickInterval*ntmax;this.min=-this.tickInterval*ntmin}else{if(this.numberTicks==null){if(this.tickInterval){this.numberTicks=3+Math.ceil(range/this.tickInterval)}else{this.numberTicks=2+Math.ceil((dim-(this.tickSpacing-1))/this.tickSpacing)}}if(this.tickInterval==null){ti=range/(this.numberTicks-1);if(ti<1){temp=Math.pow(10,Math.abs(Math.floor(Math.log(ti)/Math.LN10)))}else{temp=1}this.tickInterval=Math.ceil(ti*temp*this.pad)/temp}else{temp=1/this.tickInterval}rrange=this.tickInterval*(this.numberTicks-1);margin=(rrange-range)/2;if(this.min==null){this.min=Math.floor(temp*(min-margin))/temp}if(this.max==null){this.max=this.min+rrange}}var sf=$.jqplot.getSignificantFigures(this.tickInterval);var fstr;if(sf.digitsLeft>=sf.significantDigits){fstr="%d"}else{var temp=Math.max(0,5-sf.digitsLeft);temp=Math.min(temp,sf.digitsRight);fstr="%."+temp+"f"}this._autoFormatString=fstr}else{rmin=this.min!=null?this.min:min-range*(this.padMin-1);rmax=this.max!=null?this.max:max+range*(this.padMax-1);range=rmax-rmin;if(this.numberTicks==null){if(this.tickInterval!=null){this.numberTicks=Math.ceil((rmax-rmin)/this.tickInterval)+1}else if(dim>100){this.numberTicks=parseInt(3+(dim-100)/75,10)}else{this.numberTicks=2}}if(this.tickInterval==null){this.tickInterval=range/(this.numberTicks-1)}if(this.max==null){rmax=rmin+this.tickInterval*(this.numberTicks-1)}if(this.min==null){rmin=rmax-this.tickInterval*(this.numberTicks-1)}var sf=$.jqplot.getSignificantFigures(this.tickInterval);var fstr;if(sf.digitsLeft>=sf.significantDigits){fstr="%d"}else{var temp=Math.max(0,5-sf.digitsLeft);temp=Math.min(temp,sf.digitsRight);fstr="%."+temp+"f"}this._autoFormatString=fstr;this.min=rmin;this.max=rmax}if(this.renderer.constructor==$.jqplot.LinearAxisRenderer&&this._autoFormatString==""){range=this.max-this.min;var temptick=new this.tickRenderer(this.tickOptions);var fs=temptick.formatString||$.jqplot.config.defaultTickFormatString;var fs=fs.match($.jqplot.sprintf.regex)[0];var precision=0;if(fs){if(fs.search(/[fFeEgGpP]/)>-1){var m=fs.match(/\%\.(\d{0,})?[eEfFgGpP]/);if(m){precision=parseInt(m[1],10)}else{precision=6}}else if(fs.search(/[di]/)>-1){precision=0}var fact=Math.pow(10,-precision);if(this.tickIntervalthis.breakPoints[0]&&uthis.breakPoints[0]&&uthis.breakPoints[0]&&u=this.breakPoints[1]){return(u-max)*pixellength/unitlength}else{return(u+this.breakPoints[1]-this.breakPoints[0]-max)*pixellength/unitlength}};this.series_p2u=function(p){return p*unitlength/pixellength+max}}}else{this.p2u=function(p){return(p-offmin)*unitlength/pixellength+min};this.u2p=function(u){return(u-min)*pixellength/unitlength+offmin};if(this.name=="xaxis"||this.name=="x2axis"){this.series_u2p=function(u){return(u-min)*pixellength/unitlength};this.series_p2u=function(p){return p*unitlength/pixellength+min}}else{this.series_u2p=function(u){return(u-max)*pixellength/unitlength};this.series_p2u=function(p){return p*unitlength/pixellength+max}}}if(this.show){if(this.name=="xaxis"||this.name=="x2axis"){for(var i=0;i0){shim=-t._textRenderer.height*Math.cos(-t._textRenderer.angle)/2}else{shim=-t.getHeight()+t._textRenderer.height*Math.cos(t._textRenderer.angle)/2}break;case"middle":shim=-t.getHeight()/2;break;default:shim=-t.getHeight()/2;break}}else{shim=-t.getHeight()/2}var val=this.u2p(t.value)+shim+"px";t._elem.css("top",val);t.pack()}}if(lshow){var h=this._label._elem.outerHeight(true);this._label._elem.css("top",offmax-pixellength/2-h/2+"px");if(this.name=="yaxis"){this._label._elem.css("left","0px")}else{this._label._elem.css("right","0px")}this._label.pack()}}}ticks=null};function bestFormatString(interval){var fstr;interval=Math.abs(interval);if(interval>=10){fstr="%d"}else if(interval>1){if(interval===parseInt(interval,10)){fstr="%d"}else{fstr="%.1f"}}else{var expv=-Math.floor(Math.log(interval)/Math.LN10);fstr="%."+expv+"f"}return fstr}var _factors=[.1,.2,.3,.4,.5,.8,1,2,3,4,5];var _getLowerFactor=function(f){var i=_factors.indexOf(f);if(i>0){return _factors[i-1]}else{return _factors[_factors.length-1]/100}};var _getHigherFactor=function(f){var i=_factors.indexOf(f);if(i<_factors.length-1){return _factors[i+1]}else{return _factors[0]*100}};function bestConstrainedInterval(min,max,nttarget){var low=Math.floor(nttarget/2);var hi=Math.ceil(nttarget*1.5);var badness=Number.MAX_VALUE;var r=max-min;var temp;var sd;var bestNT;var gsf=$.jqplot.getSignificantFigures;var fsd;var fs;var currentNT;var bestPrec;for(var i=0,l=hi-low+1;i5){interval=10*magnitude}else if(residual>2){interval=5*magnitude}else if(residual>1){interval=2*magnitude}else{interval=magnitude}}else{if(residual>5){interval=10*magnitude}else if(residual>4){interval=5*magnitude}else if(residual>3){interval=4*magnitude}else if(residual>2){interval=3*magnitude}else if(residual>1){interval=2*magnitude}else{interval=magnitude}}return interval}function bestLinearInterval(range,scalefact){scalefact=scalefact||1;var expv=Math.floor(Math.log(range)/Math.LN10);var magnitude=Math.pow(10,expv);var f=range/magnitude;var fact;f=f/scalefact;if(f<=.38){fact=.1}else if(f<=1.6){fact=.2}else if(f<=4){fact=.5}else if(f<=8){fact=1}else if(f<=16){fact=2}else{fact=5}return fact*magnitude}function bestLinearComponents(range,scalefact){var expv=Math.floor(Math.log(range)/Math.LN10);var magnitude=Math.pow(10,expv);var f=range/magnitude;var interval;var fact;f=f/scalefact;if(f<=.38){fact=.1}else if(f<=1.6){fact=.2}else if(f<=4){fact=.5}else if(f<=8){fact=1}else if(f<=16){fact=2}else{fact=5}interval=fact*magnitude;return[interval,fact,magnitude]}$.jqplot.LinearTickGenerator=function(axis_min,axis_max,scalefact,numberTicks,keepMin,keepMax){keepMin=keepMin===null?false:keepMin;keepMax=keepMax===null||keepMin?false:keepMax;if(axis_min===axis_max){axis_max=axis_max?0:1}scalefact=scalefact||1;if(axis_maxw){w=tempright}if(tempbottom>h){h=tempbottom}})}newCanvas.width=w+Number(x_offset);newCanvas.height=h+Number(y_offset);var newContext=newCanvas.getContext("2d");newContext.save();newContext.fillStyle=backgroundColor;newContext.fillRect(0,0,newCanvas.width,newCanvas.height);newContext.restore();newContext.translate(transx,transy);newContext.textAlign="left";newContext.textBaseline="top";function getLineheight(el){var lineheight=parseInt($(el).css("line-height"),10);if(isNaN(lineheight)){lineheight=parseInt($(el).css("font-size"),10)*1.2}return lineheight}function writeWrappedText(el,context,text,left,top,canvasWidth){var lineheight=getLineheight(el);var tagwidth=$(el).innerWidth();var tagheight=$(el).innerHeight();var words=text.split(/\s+/);var wl=words.length;var w="";var breaks=[];var temptop=top;var templeft=left;for(var i=0;itagwidth&&w.length>words[i].length){breaks.push(i);w="";i--}}if(breaks.length===0){if($(el).css("textAlign")==="center"){templeft=left+(canvasWidth-context.measureText(w).width)/2-transx}context.fillText(text,templeft,top)}else{w=words.slice(0,breaks[0]).join(" ");if($(el).css("textAlign")==="center"){templeft=left+(canvasWidth-context.measureText(w).width)/2-transx}context.fillText(w,templeft,temptop);temptop+=lineheight;for(var i=1,l=breaks.length;i0){newContext.strokeRect(left,top,$(el).innerWidth(),$(el).innerHeight())}$(el).find("div.jqplot-table-legend-swatch-outline").each(function(){var elem=$(this);newContext.strokeStyle=elem.css("border-top-color");var l=left+elem.position().left;var t=top+elem.position().top;newContext.strokeRect(l,t,elem.innerWidth(),elem.innerHeight());l+=parseInt(elem.css("padding-left"),10);t+=parseInt(elem.css("padding-top"),10);var h=elem.innerHeight()-2*parseInt(elem.css("padding-top"),10);var w=elem.innerWidth()-2*parseInt(elem.css("padding-left"),10);var swatch=elem.children("div.jqplot-table-legend-swatch");newContext.fillStyle=swatch.css("background-color");newContext.fillRect(l,t,w,h)});$(el).find("td.jqplot-table-legend-label").each(function(){var elem=$(this);var l=left+elem.position().left;var t=top+elem.position().top+parseInt(elem.css("padding-top"),10);newContext.font=elem.jqplotGetComputedFontStyle();newContext.fillStyle=elem.css("color");writeWrappedText(elem,newContext,elem.text(),l,t,w)});var elem=null}else if(tagname=="canvas"){newContext.drawImage(el,left,top)}}$(this).children().each(function(){_jqpToImage(this,x_offset,y_offset)});return newCanvas};$.fn.jqplotToImageStr=function(options){var imgCanvas=$(this).jqplotToImageCanvas(options);if(imgCanvas){return imgCanvas.toDataURL("image/png")}else{return null}};$.fn.jqplotToImageElem=function(options){var elem=document.createElement("img");var str=$(this).jqplotToImageStr(options);elem.src=str;return elem};$.fn.jqplotToImageElemStr=function(options){var str="";return str};$.fn.jqplotSaveImage=function(){var imgData=$(this).jqplotToImageStr({});if(imgData){window.location.href=imgData.replace("image/png","image/octet-stream")}};$.fn.jqplotViewImage=function(){var imgStr=$(this).jqplotToImageElemStr({});var imgData=$(this).jqplotToImageStr({});if(imgStr){var w=window.open("");w.document.open("image/png");w.document.write(imgStr);w.document.close();w=null}};var jsDate=function(){this.syntax=jsDate.config.syntax;this._type="jsDate";this.proxy=new Date;this.options={};this.locale=jsDate.regional.getLocale();this.formatString="";this.defaultCentury=jsDate.config.defaultCentury;switch(arguments.length){case 0:break;case 1:if(get_type(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var opts=this.options=arguments[0];this.syntax=opts.syntax||this.syntax;this.defaultCentury=opts.defaultCentury||this.defaultCentury;this.proxy=jsDate.createDate(opts.date)}else{this.proxy=jsDate.createDate(arguments[0])}break;default:var a=[];for(var i=0;i0?"floor":"ceil"](unitDiff)};jsDate.prototype.getAbbrDayName=function(){return jsDate.regional[this.locale]["dayNamesShort"][this.proxy.getDay()]};jsDate.prototype.getAbbrMonthName=function(){return jsDate.regional[this.locale]["monthNamesShort"][this.proxy.getMonth()]};jsDate.prototype.getAMPM=function(){return this.proxy.getHours()>=12?"PM":"AM"};jsDate.prototype.getAmPm=function(){return this.proxy.getHours()>=12?"pm":"am"};jsDate.prototype.getCentury=function(){return parseInt(this.proxy.getFullYear()/100,10)};jsDate.prototype.getDate=function(){return this.proxy.getDate()};jsDate.prototype.getDay=function(){return this.proxy.getDay()};jsDate.prototype.getDayOfWeek=function(){var dow=this.proxy.getDay();return dow===0?7:dow};jsDate.prototype.getDayOfYear=function(){var d=this.proxy;var ms=d-new Date(""+d.getFullYear()+"/1/1 GMT");ms+=d.getTimezoneOffset()*6e4;d=null;return parseInt(ms/6e4/60/24,10)+1};jsDate.prototype.getDayName=function(){return jsDate.regional[this.locale]["dayNames"][this.proxy.getDay()]};jsDate.prototype.getFullWeekOfYear=function(){var d=this.proxy;var doy=this.getDayOfYear();var rdow=6-d.getDay();var woy=parseInt((doy+rdow)/7,10);return woy};jsDate.prototype.getFullYear=function(){return this.proxy.getFullYear()};jsDate.prototype.getGmtOffset=function(){var hours=this.proxy.getTimezoneOffset()/60;var prefix=hours<0?"+":"-";hours=Math.abs(hours);return prefix+addZeros(Math.floor(hours),2)+":"+addZeros(hours%1*60,2)};jsDate.prototype.getHours=function(){return this.proxy.getHours()};jsDate.prototype.getHours12=function(){var hours=this.proxy.getHours();return hours>12?hours-12:hours==0?12:hours};jsDate.prototype.getIsoWeek=function(){var d=this.proxy;var woy=this.getWeekOfYear();var dow1_1=new Date(""+d.getFullYear()+"/1/1").getDay();var idow=woy+(dow1_1>4||dow1_1<=1?0:1);if(idow==53&&new Date(""+d.getFullYear()+"/12/31").getDay()<4){idow=1}else if(idow===0){d=new jsDate(new Date(""+(d.getFullYear()-1)+"/12/31"));idow=d.getIsoWeek()}d=null;return idow};jsDate.prototype.getMilliseconds=function(){return this.proxy.getMilliseconds()};jsDate.prototype.getMinutes=function(){return this.proxy.getMinutes()};jsDate.prototype.getMonth=function(){return this.proxy.getMonth()};jsDate.prototype.getMonthName=function(){return jsDate.regional[this.locale]["monthNames"][this.proxy.getMonth()]};jsDate.prototype.getMonthNumber=function(){return this.proxy.getMonth()+1};jsDate.prototype.getSeconds=function(){return this.proxy.getSeconds()};jsDate.prototype.getShortYear=function(){return this.proxy.getYear()%100};jsDate.prototype.getTime=function(){return this.proxy.getTime()};jsDate.prototype.getTimezoneAbbr=function(){return this.proxy.toString().replace(/^.*\(([^)]+)\)$/,"$1")};jsDate.prototype.getTimezoneName=function(){var match=/(?:\((.+)\)$| ([A-Z]{3}) )/.exec(this.toString());return match[1]||match[2]||"GMT"+this.getGmtOffset()};jsDate.prototype.getTimezoneOffset=function(){return this.proxy.getTimezoneOffset()};jsDate.prototype.getWeekOfYear=function(){var doy=this.getDayOfYear();var rdow=7-this.getDayOfWeek();var woy=parseInt((doy+rdow)/7,10);return woy};jsDate.prototype.getUnix=function(){return Math.round(this.proxy.getTime()/1e3,0)};jsDate.prototype.getYear=function(){return this.proxy.getYear()};jsDate.prototype.next=function(unit){unit=unit||"day";return this.clone().add(1,unit)};jsDate.prototype.set=function(){switch(arguments.length){case 0:this.proxy=new Date;break;case 1:if(get_type(arguments[0])=="[object Object]"&&arguments[0]._type!="jsDate"){var opts=this.options=arguments[0];this.syntax=opts.syntax||this.syntax;this.defaultCentury=opts.defaultCentury||this.defaultCentury;this.proxy=jsDate.createDate(opts.date)}else{this.proxy=jsDate.createDate(arguments[0])}break;default:var a=[];for(var i=0;i0?"floor":"ceil"](number/12));var prevMonth=d.getMonth()+number%12;if(prevMonth==12){prevMonth=0;d.setYear(d.getFullYear()+1)}else if(prevMonth==-1){prevMonth=11;d.setYear(d.getFullYear()-1)}d.setMonth(prevMonth)},diff:function(d1,d2){var diffYears=d1.getFullYear()-d2.getFullYear();var diffMonths=d1.getMonth()-d2.getMonth()+diffYears*12;var diffDays=d1.getDate()-d2.getDate();return diffMonths+diffDays/30}},year:{add:function(d,number){d.setYear(d.getFullYear()+Math[number>0?"floor":"ceil"](number))},diff:function(d1,d2){return multipliers.month.diff(d1,d2)/12}}};for(var unit in multipliers){if(unit.substring(unit.length-1)!="s"){multipliers[unit+"s"]=multipliers[unit]}}var format=function(d,code,syntax){if(jsDate.formats[syntax]["shortcuts"][code]){return jsDate.strftime(d,jsDate.formats[syntax]["shortcuts"][code],syntax)}else{var getter=(jsDate.formats[syntax]["codes"][code]||"").split(".");var nbr=d["get"+getter[0]]?d["get"+getter[0]]():"";if(getter[1]){nbr=addZeros(nbr,getter[1])}return nbr}};jsDate.strftime=function(d,formatString,syntax,locale){var syn="perl";var loc=jsDate.regional.getLocale();if(syntax&&jsDate.formats.hasOwnProperty(syntax)){syn=syntax}else if(syntax&&jsDate.regional.hasOwnProperty(syntax)){loc=syntax}if(locale&&jsDate.formats.hasOwnProperty(locale)){syn=locale}else if(locale&&jsDate.regional.hasOwnProperty(locale)){loc=locale}if(get_type(d)!="[object Object]"||d._type!="jsDate"){d=new jsDate(d);d.locale=loc}if(!formatString){formatString=d.formatString||jsDate.regional[loc]["formatString"]}var source=formatString||"%Y-%m-%d",result="",match;while(source.length>0){if(match=source.match(jsDate.formats[syn].codes.matcher)){result+=source.slice(0,match.index);result+=(match[1]||"")+format(d,match[2],syn);source=source.slice(match.index+match[0].length)}else{result+=source;source=""}}return result};jsDate.formats={ISO:"%Y-%m-%dT%H:%M:%S.%N%G",SQL:"%Y-%m-%d %H:%M:%S"};jsDate.formats.perl={codes:{matcher:/()%(#?(%|[a-z]))/i,Y:"FullYear",y:"ShortYear.2",m:"MonthNumber.2","#m":"MonthNumber",B:"MonthName",b:"AbbrMonthName",d:"Date.2","#d":"Date",e:"Date",A:"DayName",a:"AbbrDayName",w:"Day",H:"Hours.2","#H":"Hours",I:"Hours12.2","#I":"Hours12",p:"AMPM",M:"Minutes.2","#M":"Minutes",S:"Seconds.2","#S":"Seconds",s:"Unix",N:"Milliseconds.3","#N":"Milliseconds",O:"TimezoneOffset",Z:"TimezoneName",G:"GmtOffset"},shortcuts:{F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",D:"%m/%d/%y","#c":"%a %b %e %H:%M:%S %Y",v:"%e-%b-%Y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};jsDate.formats.php={codes:{matcher:/()%((%|[a-z]))/i,a:"AbbrDayName",A:"DayName",d:"Date.2",e:"Date",j:"DayOfYear.3",u:"DayOfWeek",w:"Day",U:"FullWeekOfYear.2",V:"IsoWeek.2",W:"WeekOfYear.2",b:"AbbrMonthName",B:"MonthName",m:"MonthNumber.2",h:"AbbrMonthName",C:"Century.2",y:"ShortYear.2",Y:"FullYear",H:"Hours.2",I:"Hours12.2",l:"Hours12",p:"AMPM",P:"AmPm",M:"Minutes.2",S:"Seconds.2",s:"Unix",O:"TimezoneOffset",z:"GmtOffset",Z:"TimezoneAbbr"},shortcuts:{D:"%m/%d/%y",F:"%Y-%m-%d",T:"%H:%M:%S",X:"%H:%M:%S",x:"%m/%d/%y",R:"%H:%M",r:"%I:%M:%S %p",t:"\t",n:"\n","%":"%"}};jsDate.createDate=function(date){if(date==null){return new Date}if(date instanceof Date){return date}if(typeof date=="number"){return new Date(date)}var parsable=String(date).replace(/^\s*(.+)\s*$/g,"$1");parsable=parsable.replace(/^([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,4})/,"$1/$2/$3");parsable=parsable.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{4})/i,"$1 $2 $3");var match=parsable.match(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i);if(match&&match.length>3){var m3=parseFloat(match[3]);var ny=jsDate.config.defaultCentury+m3;ny=String(ny);parsable=parsable.replace(/^(3[01]|[0-2]?\d)[-\/]([a-z]{3,})[-\/](\d{2})\D*/i,match[1]+" "+match[2]+" "+ny)}match=parsable.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})[^0-9]/);function h1(parsable,match){var m1=parseFloat(match[1]);var m2=parseFloat(match[2]);var m3=parseFloat(match[3]);var cent=jsDate.config.defaultCentury;var ny,nd,nm,str;if(m1>31){nd=m3;nm=m2;ny=cent+m1}else{nd=m2;nm=m1;ny=cent+m3}str=nm+"/"+nd+"/"+ny;return parsable.replace(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})/,str)}if(match&&match.length>3){parsable=h1(parsable,match)}var match=parsable.match(/^([0-9]{1,2})[-\/]([0-9]{1,2})[-\/]([0-9]{1,2})$/);if(match&&match.length>3){parsable=h1(parsable,match)}var i=0;var length=jsDate.matchers.length;var pattern,ms,current=parsable,obj;while(i31){nd=m3;ny=cent+m1}else{nd=m1;ny=cent+m3}var nm=inArray(match[2],jsDate.regional[jsDate.regional.getLocale()]["monthNamesShort"]);if(nm==-1){nm=inArray(match[2],jsDate.regional[jsDate.regional.getLocale()]["monthNames"])}d.setFullYear(ny,nm,nd);d.setHours(0,0,0,0);return d}else{return str}}];function inArray(elem,array){if(array.indexOf){return array.indexOf(elem)}for(var i=0,length=array.length;i=len?"":Array(1+len-str.length>>>0).join(chr);return leftJustify?str+padding:padding+str}function thousand_separate(value){var value_str=String(value);for(var i=10;i>0;i--){if(value_str==(value_str=value_str.replace(/^(\d+)(\d{3})/,"$1"+$.jqplot.sprintf.thousandsSeparator+"$2")))break}return value_str}function justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace){var diff=minWidth-value.length;if(diff>0){var spchar=" ";if(htmlSpace){spchar=" "}if(leftJustify||!zeroPad){value=pad(value,minWidth,spchar,leftJustify)}else{value=value.slice(0,prefix.length)+pad("",diff,"0",true)+value.slice(prefix.length)}}return value}function formatBaseX(value,base,prefix,leftJustify,minWidth,precision,zeroPad,htmlSpace){var number=value>>>0;prefix=prefix&&number&&{2:"0b",8:"0",16:"0x"}[base]||"";value=prefix+pad(number.toString(base),precision||0,"0",false);return justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)}function formatString(value,leftJustify,minWidth,precision,zeroPad,htmlSpace){if(precision!=null){value=value.slice(0,precision)}return justify(value,"",leftJustify,minWidth,zeroPad,htmlSpace)}var a=arguments,i=0,format=a[i++];return format.replace($.jqplot.sprintf.regex,function(substring,valueIndex,flags,minWidth,_,precision,type){if(substring=="%%"){return"%"}var leftJustify=false,positivePrefix="",zeroPad=false,prefixBaseX=false,htmlSpace=false,thousandSeparation=false;for(var j=0;flags&&j-1?6:type=="d"?0:void 0}else if(precision=="*"){precision=+a[i++]}else if(precision.charAt(0)=="*"){precision=+a[precision.slice(1,-1)]}else{precision=+precision}var value=valueIndex?a[valueIndex.slice(0,-1)]:a[i++];switch(type){case"s":{if(value==null){return""}return formatString(String(value),leftJustify,minWidth,precision,zeroPad,htmlSpace)}case"c":return formatString(String.fromCharCode(+value),leftJustify,minWidth,precision,zeroPad,htmlSpace);case"b":return formatBaseX(value,2,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace);case"o":return formatBaseX(value,8,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace);case"x":return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace);case"X":return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace).toUpperCase();case"u":return formatBaseX(value,10,prefixBaseX,leftJustify,minWidth,precision,zeroPad,htmlSpace);case"i":{var number=parseInt(+value,10);if(isNaN(number)){return""}var prefix=number<0?"-":positivePrefix;var number_str=thousandSeparation?thousand_separate(String(Math.abs(number))):String(Math.abs(number));value=prefix+pad(number_str,precision,"0",false);return justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)}case"d":{var number=Math.round(+value);if(isNaN(number)){return""}var prefix=number<0?"-":positivePrefix;var number_str=thousandSeparation?thousand_separate(String(Math.abs(number))):String(Math.abs(number));value=prefix+pad(number_str,precision,"0",false);return justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)}case"e":case"E":case"f":case"F":case"g":case"G":{var number=+value;if(isNaN(number)){return""}var prefix=number<0?"-":positivePrefix;var method=["toExponential","toFixed","toPrecision"]["efg".indexOf(type.toLowerCase())];var textTransform=["toString","toUpperCase"]["eEfFgG".indexOf(type)%2];var number_str=Math.abs(number)[method](precision);var parts=number_str.toString().split(".");parts[0]=thousandSeparation?thousand_separate(parts[0]):parts[0];number_str=parts.join($.jqplot.sprintf.decimalMark);value=prefix+number_str;var justified=justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)[textTransform]();return justified}case"p":case"P":{var number=+value;if(isNaN(number)){return""}var prefix=number<0?"-":positivePrefix;var parts=String(Number(Math.abs(number)).toExponential()).split(/e|E/);var sd=parts[0].indexOf(".")!=-1?parts[0].length-1:String(number).length;var zeros=parts[1]<0?-parts[1]-1:0;if(Math.abs(number)<1){if(sd+zeros<=precision){value=prefix+Math.abs(number).toPrecision(sd)}else{if(sd<=precision-1){value=prefix+Math.abs(number).toExponential(sd-1)}else{value=prefix+Math.abs(number).toExponential(precision-1)}}}else{var prec=sd<=precision?sd:precision;value=prefix+Math.abs(number).toPrecision(prec)}var textTransform=["toString","toUpperCase"]["pP".indexOf(type)%2];return justify(value,prefix,leftJustify,minWidth,zeroPad,htmlSpace)[textTransform]()}case"n":return"";default:return substring}})};$.jqplot.sprintf.thousandsSeparator=",";$.jqplot.sprintf.decimalMark=".";$.jqplot.sprintf.regex=/%%|%(\d+\$)?([-+#0&\' ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([nAscboxXuidfegpEGP])/g;$.jqplot.getSignificantFigures=function(number){var parts=String(Number(Math.abs(number)).toExponential()).split(/e|E/);var sd=parts[0].indexOf(".")!=-1?parts[0].length-1:parts[0].length;var zeros=parts[1]<0?-parts[1]-1:0;var expn=parseInt(parts[1],10);var dleft=expn+1>0?expn+1:0;var dright=sd<=dleft?0:sd-expn-1;return{significantDigits:sd,digitsLeft:dleft,digitsRight:dright,zeros:zeros,exponent:expn}};$.jqplot.getPrecision=function(number){return $.jqplot.getSignificantFigures(number).digitsRight};var backCompat=$.uiBackCompat!==false;$.jqplot.effects={effect:{}};var dataSpace="jqplot.storage.";$.extend($.jqplot.effects,{version:"1.9pre",save:function(element,set){for(var i=0;i").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),size={width:element.width(),height:element.height()},active=document.activeElement;element.wrap(wrapper);if(element[0]===active||$.contains(element[0],active)){$(active).focus()}wrapper=element.parent();if(element.css("position")==="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{$.extend(props,{position:element.css("position"),zIndex:element.css("z-index")});$.each(["top","left","bottom","right"],function(i,pos){props[pos]=element.css(pos);if(isNaN(parseInt(props[pos],10))){props[pos]="auto"}});element.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}element.css(size);return wrapper.css(props).show()},removeWrapper:function(element){var active=document.activeElement;if(element.parent().is(".ui-effects-wrapper")){element.parent().replaceWith(element);if(element[0]===active||$.contains(element[0],active)){$(active).focus()}}return element}});function _normalizeArguments(effect,options,speed,callback){if($.isPlainObject(effect)){return effect}effect={effect:effect};if(options===undefined){options={}}if($.isFunction(options)){callback=options;speed=null;options={}}if($.type(options)==="number"||$.fx.speeds[options]){callback=speed;speed=options;options={}}if($.isFunction(speed)){callback=speed;speed=null}if(options){$.extend(effect,options)}speed=speed||options.duration;effect.duration=$.fx.off?0:typeof speed==="number"?speed:speed in $.fx.speeds?$.fx.speeds[speed]:$.fx.speeds._default;effect.complete=callback||options.complete;return effect}function standardSpeed(speed){if(!speed||typeof speed==="number"||$.fx.speeds[speed]){return true}if(typeof speed==="string"&&!$.jqplot.effects.effect[speed]){if(backCompat&&$.jqplot.effects[speed]){return false}return true}return false}$.fn.extend({jqplotEffect:function(effect,options,speed,callback){var args=_normalizeArguments.apply(this,arguments),mode=args.mode,queue=args.queue,effectMethod=$.jqplot.effects.effect[args.effect],oldEffectMethod=!effectMethod&&backCompat&&$.jqplot.effects[args.effect];if($.fx.off||!(effectMethod||oldEffectMethod)){if(mode){return this[mode](args.duration,args.complete)}else{return this.each(function(){if(args.complete){args.complete.call(this)}})}}function run(next){var elem=$(this),complete=args.complete,mode=args.mode;function done(){if($.isFunction(complete)){complete.call(elem[0])}if($.isFunction(next)){next()}}if(elem.is(":hidden")?mode==="hide":mode==="show"){done()}else{effectMethod.call(elem[0],args,done)}}if(effectMethod){return queue===false?this.each(run):this.queue(queue||"fx",run)}else{return oldEffectMethod.call(this,{options:args,duration:args.duration,callback:args.complete,mode:args.mode})}}});var rvertical=/up|down|vertical/,rpositivemotion=/up|left|vertical|horizontal/;$.jqplot.effects.effect.blind=function(o,done){var el=$(this),props=["position","top","bottom","left","right","height","width"],mode=$.jqplot.effects.setMode(el,o.mode||"hide"),direction=o.direction||"up",vertical=rvertical.test(direction),ref=vertical?"height":"width",ref2=vertical?"top":"left",motion=rpositivemotion.test(direction),animation={},show=mode==="show",wrapper,distance,top;if(el.parent().is(".ui-effects-wrapper")){$.jqplot.effects.save(el.parent(),props)}else{$.jqplot.effects.save(el,props)}el.show();top=parseInt(el.css("top"),10);wrapper=$.jqplot.effects.createWrapper(el).css({overflow:"hidden"});distance=vertical?wrapper[ref]()+top:wrapper[ref]();animation[ref]=show?String(distance):"0";if(!motion){el.css(vertical?"bottom":"right",0).css(vertical?"top":"left","").css({position:"absolute"});animation[ref2]=show?"0":String(distance)}if(show){wrapper.css(ref,0);if(!motion){wrapper.css(ref2,distance)}}wrapper.animate(animation,{duration:o.duration,easing:o.easing,queue:false,complete:function(){if(mode==="hide"){el.hide()}$.jqplot.effects.restore(el,props);$.jqplot.effects.removeWrapper(el);done()}})}})(jQuery);