pulse-meter 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +19 -0
- data/.rbenv-version +1 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/Procfile +3 -0
- data/README.md +440 -0
- data/Rakefile +53 -0
- data/bin/pulse +6 -0
- data/examples/basic.ru +109 -0
- data/examples/basic_sensor_data.rb +38 -0
- data/examples/full/Procfile +2 -0
- data/examples/full/client.rb +82 -0
- data/examples/full/server.ru +114 -0
- data/examples/minimal/Procfile +2 -0
- data/examples/minimal/client.rb +16 -0
- data/examples/minimal/server.ru +20 -0
- data/examples/readme_client_example.rb +52 -0
- data/lib/cmd.rb +150 -0
- data/lib/pulse-meter.rb +17 -0
- data/lib/pulse-meter/mixins/dumper.rb +72 -0
- data/lib/pulse-meter/mixins/utils.rb +91 -0
- data/lib/pulse-meter/sensor.rb +44 -0
- data/lib/pulse-meter/sensor/base.rb +75 -0
- data/lib/pulse-meter/sensor/counter.rb +36 -0
- data/lib/pulse-meter/sensor/hashed_counter.rb +31 -0
- data/lib/pulse-meter/sensor/indicator.rb +33 -0
- data/lib/pulse-meter/sensor/timeline.rb +180 -0
- data/lib/pulse-meter/sensor/timelined/average.rb +26 -0
- data/lib/pulse-meter/sensor/timelined/counter.rb +16 -0
- data/lib/pulse-meter/sensor/timelined/hashed_counter.rb +22 -0
- data/lib/pulse-meter/sensor/timelined/max.rb +25 -0
- data/lib/pulse-meter/sensor/timelined/median.rb +14 -0
- data/lib/pulse-meter/sensor/timelined/min.rb +25 -0
- data/lib/pulse-meter/sensor/timelined/percentile.rb +31 -0
- data/lib/pulse-meter/version.rb +3 -0
- data/lib/pulse-meter/visualize/app.rb +43 -0
- data/lib/pulse-meter/visualize/dsl.rb +0 -0
- data/lib/pulse-meter/visualize/dsl/errors.rb +46 -0
- data/lib/pulse-meter/visualize/dsl/layout.rb +55 -0
- data/lib/pulse-meter/visualize/dsl/page.rb +50 -0
- data/lib/pulse-meter/visualize/dsl/sensor.rb +21 -0
- data/lib/pulse-meter/visualize/dsl/widget.rb +84 -0
- data/lib/pulse-meter/visualize/layout.rb +54 -0
- data/lib/pulse-meter/visualize/page.rb +30 -0
- data/lib/pulse-meter/visualize/public/css/application.css +19 -0
- data/lib/pulse-meter/visualize/public/css/bootstrap.css +4883 -0
- data/lib/pulse-meter/visualize/public/css/bootstrap.min.css +729 -0
- data/lib/pulse-meter/visualize/public/favicon.ico +0 -0
- data/lib/pulse-meter/visualize/public/img/glyphicons-halflings-white.png +0 -0
- data/lib/pulse-meter/visualize/public/img/glyphicons-halflings.png +0 -0
- data/lib/pulse-meter/visualize/public/js/application.coffee +262 -0
- data/lib/pulse-meter/visualize/public/js/application.js +279 -0
- data/lib/pulse-meter/visualize/public/js/backbone-min.js +38 -0
- data/lib/pulse-meter/visualize/public/js/bootstrap.js +1835 -0
- data/lib/pulse-meter/visualize/public/js/highcharts.js +203 -0
- data/lib/pulse-meter/visualize/public/js/jquery-1.7.2.min.js +4 -0
- data/lib/pulse-meter/visualize/public/js/json2.js +487 -0
- data/lib/pulse-meter/visualize/public/js/underscore-min.js +32 -0
- data/lib/pulse-meter/visualize/sensor.rb +60 -0
- data/lib/pulse-meter/visualize/views/main.haml +40 -0
- data/lib/pulse-meter/visualize/widget.rb +68 -0
- data/lib/pulse-meter/visualizer.rb +30 -0
- data/lib/test_helpers/matchers.rb +36 -0
- data/pulse-meter.gemspec +39 -0
- data/spec/pulse_meter/mixins/dumper_spec.rb +158 -0
- data/spec/pulse_meter/mixins/utils_spec.rb +134 -0
- data/spec/pulse_meter/sensor/base_spec.rb +97 -0
- data/spec/pulse_meter/sensor/counter_spec.rb +54 -0
- data/spec/pulse_meter/sensor/hashed_counter_spec.rb +39 -0
- data/spec/pulse_meter/sensor/indicator_spec.rb +43 -0
- data/spec/pulse_meter/sensor/timeline_spec.rb +58 -0
- data/spec/pulse_meter/sensor/timelined/average_spec.rb +6 -0
- data/spec/pulse_meter/sensor/timelined/counter_spec.rb +6 -0
- data/spec/pulse_meter/sensor/timelined/hashed_counter_spec.rb +8 -0
- data/spec/pulse_meter/sensor/timelined/max_spec.rb +7 -0
- data/spec/pulse_meter/sensor/timelined/median_spec.rb +7 -0
- data/spec/pulse_meter/sensor/timelined/min_spec.rb +7 -0
- data/spec/pulse_meter/sensor/timelined/percentile_spec.rb +17 -0
- data/spec/pulse_meter/visualize/app_spec.rb +27 -0
- data/spec/pulse_meter/visualize/dsl/layout_spec.rb +64 -0
- data/spec/pulse_meter/visualize/dsl/page_spec.rb +75 -0
- data/spec/pulse_meter/visualize/dsl/sensor_spec.rb +30 -0
- data/spec/pulse_meter/visualize/dsl/widget_spec.rb +127 -0
- data/spec/pulse_meter/visualize/layout_spec.rb +55 -0
- data/spec/pulse_meter/visualize/page_spec.rb +150 -0
- data/spec/pulse_meter/visualize/sensor_spec.rb +120 -0
- data/spec/pulse_meter/visualize/widget_spec.rb +113 -0
- data/spec/pulse_meter/visualizer_spec.rb +42 -0
- data/spec/pulse_meter_spec.rb +16 -0
- data/spec/shared_examples/timeline_sensor.rb +279 -0
- data/spec/shared_examples/timelined_subclass.rb +23 -0
- data/spec/spec_helper.rb +29 -0
- metadata +435 -0
@@ -0,0 +1,203 @@
|
|
1
|
+
/*
|
2
|
+
Highcharts JS v2.2.2 (2012-04-26)
|
3
|
+
|
4
|
+
(c) 2009-2011 Torstein H?nsi
|
5
|
+
|
6
|
+
License: www.highcharts.com/license
|
7
|
+
*/
|
8
|
+
(function(){function N(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function Ya(){for(var a=0,b=arguments,c=b.length,d={};a<c;a++)d[b[a++]]=b[a];return d}function T(a,b){return parseInt(a,b||10)}function yb(a){return typeof a==="string"}function lb(a){return typeof a==="object"}function bc(a){return Object.prototype.toString.call(a)==="[object Array]"}function mb(a){return typeof a==="number"}function nb(a){return na.log(a)/na.LN10}function bb(a){return na.pow(10,a)}function Eb(a,b){for(var c=
|
9
|
+
a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function u(a){return a!==V&&a!==null}function A(a,b,c){var d,e;if(yb(b))u(c)?a.setAttribute(b,c):a&&a.getAttribute&&(e=a.getAttribute(b));else if(u(b)&&lb(b))for(d in b)a.setAttribute(d,b[d]);return e}function Fb(a){return bc(a)?a:[a]}function r(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++)if(c=a[b],typeof c!=="undefined"&&c!==null)return c}function Q(a,b){if(ob&&b&&b.opacity!==V)b.filter="alpha(opacity="+b.opacity*100+")";N(a.style,b)}function xa(a,
|
10
|
+
b,c,d,e){a=B.createElement(a);b&&N(a,b);e&&Q(a,{padding:0,border:Ka,margin:0});c&&Q(a,c);d&&d.appendChild(a);return a}function da(a,b){var c=function(){};c.prototype=new a;N(c.prototype,b);return c}function cc(a,b,c,d){var e=Ba.lang,f=isNaN(b=ya(b))?2:b,b=c===void 0?e.decimalPoint:c,d=d===void 0?e.thousandsSep:d,e=a<0?"-":"",c=String(T(a=ya(+a||0).toFixed(f))),g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+ya(a-c).toFixed(f).slice(2):"")}
|
11
|
+
function Ca(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function dc(a,b,c,d){var e,c=r(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&&d.allowDecimals===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d<b.length;d++)if(a=b[d],e<=(b[d]+(b[d+1]||b[d]))/2)break;a*=c;return a}function Kc(a,b){var c=b||[[ec,[1,2,5,10,20,25,50,100,200,500]],[pb,[1,2,5,10,15,30]],[Pa,[1,2,5,10,15,30]],[za,[1,2,3,4,6,8,12]],[Ra,[1,2]],[oa,[1,2]],[sa,[1,2,3,4,6]],[ba,null]],d=c[c.length-1],e=y[d[0]],f=d[1],g;for(g=0;g<c.length;g++)if(d=
|
12
|
+
c[g],e=y[d[0]],f=d[1],c[g+1]&&a<=(e*f[f.length-1]+y[c[g+1][0]])/2)break;e===y[ba]&&a<5*e&&(f=[1,2,5]);e===y[ba]&&a<5*e&&(f=[1,2,5]);c=dc(a/e,f);return{unitRange:e,count:c,unitName:d[0]}}function Lc(a,b,c,d){var e=[],f={},g=Ba.global.useUTC,h,i=new Date(b),b=a.unitRange,k=a.count;b>=y[pb]&&(i.setMilliseconds(0),i.setSeconds(b>=y[Pa]?0:k*Sa(i.getSeconds()/k)));if(b>=y[Pa])i[qc](b>=y[za]?0:k*Sa(i[fc]()/k));if(b>=y[za])i[rc](b>=y[Ra]?0:k*Sa(i[gc]()/k));if(b>=y[Ra])i[hc](b>=y[sa]?1:k*Sa(i[Da]()/k));b>=
|
13
|
+
y[sa]&&(i[sc](b>=y[ba]?0:k*Sa(i[qb]()/k)),h=i[rb]());b>=y[ba]&&(h-=h%k,i[tc](h));if(b===y[oa])i[hc](i[Da]()-i[ic]()+r(d,1));d=1;h=i[rb]();for(var j=i.getTime(),l=i[qb](),i=i[Da]();j<c;)e.push(j),b===y[ba]?j=sb(h+d*k,0):b===y[sa]?j=sb(h,l+d*k):!g&&(b===y[Ra]||b===y[oa])?j=sb(h,l,i+d*k*(b===y[Ra]?1:7)):(j+=b*k,b<=y[za]&&j%y[Ra]===0&&(f[j]=Ra)),d++;e.push(j);e.info=N(a,{higherRanks:f,totalRange:b*k});return e}function uc(){this.symbol=this.color=0}function vc(a,b,c,d,e,f,g,h,i){var k=g.x,g=g.y,i=k+c+
|
14
|
+
(i?h:-a-h),j=g-b+d+15,l;i<7&&(i=c+k+h);i+a>c+e&&(i-=i+a-(c+e),j=g-b+d-h,l=!0);j<d+5&&(j=d+5,l&&g>=j&&g<=j+b&&(j=g+d+h));j+b>d+f&&(j=d+f-b-h);return{x:i,y:j}}function Mc(a,b){var c=a.length,d,e;for(e=0;e<c;e++)a[e].ss_i=e;a.sort(function(a,c){d=b(a,c);return d===0?a.ss_i-c.ss_i:d});for(e=0;e<c;e++)delete a[e].ss_i}function Rb(a){for(var b=a.length,c=a[0];b--;)a[b]<c&&(c=a[b]);return c}function Gb(a){for(var b=a.length,c=a[0];b--;)a[b]>c&&(c=a[b]);return c}function Hb(a){for(var b in a)a[b]&&a[b].destroy&&
|
15
|
+
a[b].destroy(),delete a[b]}function Sb(a){zb||(zb=xa(Ea));a&&zb.appendChild(a);zb.innerHTML=""}function jc(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;else U.console&&console.log(c)}function Ab(a){return parseFloat(a.toPrecision(14))}function Ib(a,b){Tb=r(a,b.animation)}function wc(){var a=Ba.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";sb=a?Date.UTC:function(a,b,c,g,h,i){return(new Date(a,b,r(c,1),r(g,0),r(h,0),r(i,0))).getTime()};fc=b+"Minutes";gc=b+"Hours";
|
16
|
+
ic=b+"Day";Da=b+"Date";qb=b+"Month";rb=b+"FullYear";qc=c+"Minutes";rc=c+"Hours";hc=c+"Date";sc=c+"Month";tc=c+"FullYear"}function fb(){}function xc(a,b){function c(a){function b(a,c){this.pos=a;this.type=c||"";this.isNew=!0;c||this.addLabel()}function c(a){if(a)this.options=a,this.id=a.id;return this}function d(a,b,c,e){this.isNegative=b;this.options=a;this.x=c;this.stack=e;this.alignOptions={align:a.align||(W?b?"left":"right":"center"),verticalAlign:a.verticalAlign||(W?"middle":b?"bottom":"top"),
|
17
|
+
y:r(a.y,W?4:b?14:-6),x:r(a.x,W?b?-6:6:0)};this.textAlign=a.textAlign||(W?b?"right":"left":"center")}function e(){var a=[],b=[],c;E=M=null;o(x.series,function(e){if(e.visible||!s.ignoreHiddenSeries){var f=e.options,g,h,i,j,k,m,l,F,n,x=f.threshold,Bb,o=[],t=0;if(Z&&x<=0)x=f.threshold=null;if(p)f=e.xData,f.length&&(E=Ta(r(E,f[0]),Rb(f)),M=X(r(M,f[0]),Gb(f)));else{var v,w,Jb,z=e.cropped,O=e.xAxis.getExtremes(),Y=!!e.modifyValue;g=f.stacking;Ha=g==="percent";if(g)k=f.stack,j=e.type+r(k,""),m="-"+j,e.stackKey=
|
18
|
+
j,h=a[j]||[],a[j]=h,i=b[m]||[],b[m]=i;Ha&&(E=0,M=99);f=e.processedXData;l=e.processedYData;Bb=l.length;for(c=0;c<Bb;c++)if(F=f[c],n=l[c],n!==null&&n!==V&&(g?(w=(v=n<x)?i:h,Jb=v?m:j,n=w[F]=u(w[F])?w[F]+n:n,ea[Jb]||(ea[Jb]={}),ea[Jb][F]||(ea[Jb][F]=new d(q.stackLabels,v,F,k)),ea[Jb][F].setTotal(n)):Y&&(n=e.modifyValue(n)),z||(f[c+1]||F)>=O.min&&(f[c-1]||F)<=O.max))if(F=n.length)for(;F--;)n[F]!==null&&(o[t++]=n[F]);else o[t++]=n;!Ha&&o.length&&(E=Ta(r(E,o[0]),Rb(o)),M=X(r(M,o[0]),Gb(o)));u(x)&&(E>=x?
|
19
|
+
(E=x,Ja=!0):M<x&&(M=x,Ka=!0))}}})}function f(a,b,c){for(var d,b=Ab(Sa(b/a)*a),c=Ab(Xb(c/a)*a),e=[];b<=c;){e.push(b);b=Ab(b+a);if(b===d)break;d=b}return e}function g(a,b,c,d){var e=[];if(!d)x._minorAutoInterval=null;if(a>=0.5)a=C(a),e=f(a,b,c);else if(a>=0.08){var h=Sa(b),i,j,k,m,l,F;for(i=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];h<c+1&&!F;h++){k=i.length;for(j=0;j<k&&!F;j++)m=nb(bb(h)*i[j]),m>b&&e.push(l),l>c&&(F=!0),l=m}}else if(b=bb(b),c=bb(c),a=q[d?"minorTickInterval":"tickInterval"],
|
20
|
+
a=r(a==="auto"?null:a,x._minorAutoInterval,(c-b)*(q.tickPixelInterval/(d?5:1))/((d?ia/P.length:ia)||1)),a=dc(a,null,na.pow(10,Sa(na.log(a)/na.LN10))),e=Ub(f(a,b,c),nb),!d)x._minorAutoInterval=a/5;d||(La=a);return e}function h(){var a=[],b,c;if(Z){c=P.length;for(b=1;b<c;b++)a=a.concat(g(Ga,P[b-1],P[b],!0))}else for(b=G+(P[0]-G)%Ga;b<=I;b+=Ga)a.push(b);return a}function i(){var a,b=M-E>=U,c,d,e,f,g,h;if(p&&U===V&&!Z)u(q.min)||u(q.max)?U=null:(o(x.series,function(a){f=a.xData;for(d=g=a.xIncrement?1:
|
21
|
+
f.length-1;d>0;d--)if(e=f[d]-f[d-1],c===V||e<c)c=e}),U=Ta(c*5,M-E)),x.setMinRange=function(a){U=a};I-G<U&&(a=(U-I+G)/2,a=[G-a,r(q.min,G-a)],b&&(a[2]=E),G=Gb(a),h=[G+U,r(q.max,G+U)],b&&(h[2]=M),I=Rb(h),I-G<U&&(a[0]=I-U,a[1]=r(q.min,I-U),G=Gb(a)))}function j(a){var b,c=q.tickInterval,d=q.tickPixelInterval;ba?(la=m[p?"xAxis":"yAxis"][q.linkedTo],b=la.getExtremes(),G=r(b.min,b.dataMin),I=r(b.max,b.dataMax),q.type!==la.options.type&&jc(11,1)):(G=r(ca,q.min,E),I=r(da,q.max,M));Z&&(!a&&Ta(G,E)<=0&&jc(10,
|
22
|
+
1),G=nb(G),I=nb(I));nc&&(ca=G=X(G,I-nc),da=I,a&&(nc=null));i();if(!Ua&&!Ha&&!ba&&u(G)&&u(I)){b=I-G||1;if(!u(q.min)&&!u(ca)&&Aa&&(E<0||!Ja))G-=b*Aa;if(!u(q.max)&&!u(da)&&Ba&&(M>0||!Ka))I+=b*Ba}La=G===I||G===void 0||I===void 0?1:ba&&!c&&d===la.options.tickPixelInterval?la.tickInterval:r(c,Ua?1:(I-G)*d/(ia||1));p&&!a&&o(x.series,function(a){a.processData(G!==Pb||I!==va)});Db();x.beforeSetTickPositions&&x.beforeSetTickPositions();x.postProcessTickInterval&&(La=x.postProcessTickInterval(La));!Y&&!Z&&(Wa=
|
23
|
+
na.pow(10,Sa(na.log(La)/na.LN10)),u(q.tickInterval)||(La=dc(La,null,Wa,q)));x.tickInterval=La;Ga=q.minorTickInterval==="auto"&&La?La/5:q.minorTickInterval;(P=q.tickPositions||Xa&&Xa.apply(x,[G,I]))||(P=Y?(x.getNonLinearTimeTicks||Lc)(Kc(La,q.units),G,I,q.startOfWeek,x.ordinalPositions,x.closestPointRange,!0):Z?g(La,G,I):f(La,G,I));if(!ba&&(a=P[0],c=P[P.length-1],q.startOnTick?G=a:G>a&&P.shift(),q.endOnTick?I=c:I<c&&P.pop(),cb||(cb={x:0,y:0}),!Y&&P.length>cb[$a]&&q.alignTicks!==!1))cb[$a]=P.length}
|
24
|
+
function k(a){a=(new c(a)).render();oa.push(a);return a}function l(){var a=q.title,d=q.stackLabels,e=q.alternateGridColor,f=q.lineWidth,g,i,j=m.hasRendered&&u(Pb)&&!isNaN(Pb),F=(g=x.series.length&&u(G)&&u(I))||r(q.showEmpty,!0),n,p;if(g||ba)if(Ga&&!Ua&&o(h(),function(a){ra[a]||(ra[a]=new b(a,"minor"));j&&ra[a].isNew&&ra[a].render(null,!0);ra[a].isActive=!0;ra[a].render()}),o(P.slice(1).concat([P[0]]),function(a,c){c=c===P.length-1?0:c+1;if(!ba||a>=G&&a<=I)Ma[a]||(Ma[a]=new b(a)),j&&Ma[a].isNew&&Ma[a].render(c,
|
25
|
+
!0),Ma[a].isActive=!0,Ma[a].render(c)}),e&&o(P,function(a,b){if(b%2===0&&a<I)za[a]||(za[a]=new c),n=a,p=P[b+1]!==V?P[b+1]:I,za[a].options={from:Z?bb(n):n,to:Z?bb(p):p,color:e},za[a].render(),za[a].isActive=!0}),!x._addedPlotLB)o((q.plotLines||[]).concat(q.plotBands||[]),function(a){k(a)}),x._addedPlotLB=!0;o([Ma,ra,za],function(a){for(var b in a)a[b].isActive?a[b].isActive=!1:(a[b].destroy(),delete a[b])});f&&(g=y+(t?B:0)+Ia,i=pa-Kb-(t?gb:0)+Ia,g=J.crispLine([ta,O?y:g,O?i:A,fa,O?qa-Yb:g,O?i:pa-Kb],
|
26
|
+
f),$?$.animate({d:g}):$=J.path(g).attr({stroke:q.lineColor,"stroke-width":f,zIndex:7}).add(),$[F?"show":"hide"]());if(w&&F)F=O?y:A,f=T(a.style.fontSize||12),F={low:F+(O?0:ia),middle:F+ia/2,high:F+(O?ia:0)}[a.align],f=(O?A+gb:y)+(O?1:-1)*(t?-1:1)*Va+(v===2?f:0),w[w.isNew?"attr":"animate"]({x:O?F:f+(t?B:0)+Ia+(a.x||0),y:O?f-(t?gb:0)+Ia:F+(a.y||0)}),w.isNew=!1;if(d&&d.enabled){var s,z,d=x.stackTotalGroup;if(!d)x.stackTotalGroup=d=J.g("stack-labels").attr({visibility:db,zIndex:6}).add();d.translate(R,
|
27
|
+
L);for(s in ea)for(z in a=ea[s],a)a[z].render(d)}x.isDirty=!1}function n(a){for(var b=oa.length;b--;)oa[b].id===a&&oa[b].destroy()}var p=a.isX,t=a.opposite,O=W?!p:p,v=O?t?0:2:t?1:3,ea={},q=K(p?Zb:kc,[Nc,Oc,yc,Pc][v],a),x=this,w,z=q.type,Y=z==="datetime",Z=z==="logarithmic",Ia=q.offset||0,$a=p?"x":"y",ia=0,D,H,Qa,jb,y,A,B,gb,Kb,Yb,Lb,Db,Q,S,eb,$,E,M,U=q.minRange||q.maxZoom,nc=q.range,ca,da,wa,xa,I=null,G=null,Pb,va,Aa=q.minPadding,Ba=q.maxPadding,Ca=0,ba=u(q.linkedTo),la,Ja,Ka,Ha,z=q.events,Oa,oa=
|
28
|
+
[],La,Ga,Wa,P,Xa=q.tickPositioner,Ma={},ra={},za={},Da,Fa,Va,Ua=q.categories,ab=q.labels.formatter||function(){var a=this.value,b=this.dateTimeLabelFormat;return b?$b(b,a):La%1E6===0?a/1E6+"M":La%1E3===0?a/1E3+"k":!Ua&&a>=1E3?cc(a,0):a},Pa=O&&q.labels.staggerLines,sa=q.reversed,Ea=Ua&&q.tickmarkPlacement==="between"?0.5:0;b.prototype={addLabel:function(){var a=this.pos,b=q.labels,c=Ua&&O&&Ua.length&&!b.step&&!b.staggerLines&&!b.rotation&&ja/Ua.length||!O&&ja/2,d=a===P[0],e=a===P[P.length-1],f=Ua&&
|
29
|
+
u(Ua[a])?Ua[a]:a,g=this.label,h=P.info,i;Y&&h&&(i=q.dateTimeLabelFormats[h.higherRanks[a]||h.unitName]);this.isFirst=d;this.isLast=e;a=ab.call({axis:x,chart:m,isFirst:d,isLast:e,dateTimeLabelFormat:i,value:Z?Ab(bb(f)):f});c=c&&{width:X(1,C(c-2*(b.padding||10)))+ga};c=N(c,b.style);u(g)?g&&g.attr({text:a}).css(c):this.label=u(a)&&b.enabled?J.text(a,0,0,b.useHTML).attr({align:b.align,rotation:b.rotation}).css(c).add(S):null},getLabelSize:function(){var a=this.label;return a?(this.labelBBox=a.getBBox(!0))[O?
|
30
|
+
"height":"width"]:0},getLabelSides:function(){var a=q.labels,b=this.labelBBox.width,a=b*{left:0,center:0.5,right:1}[a.align]-a.x;return[-a,b-a]},handleOverflow:function(a){var b=!0,c=this.isFirst,d=this.isLast,e=this.label,f=e.x;if(c||d){var g=this.getLabelSides(),h=g[0],g=g[1],i=m.plotLeft,j=i+x.len,k=(a=Ma[P[a+(c?1:-1)]])&&a.label.x+a.getLabelSides()[c?0:1];c&&!sa||d&&sa?f+h<i&&(f=i-h,a&&f+g>k&&(b=!1)):f+g>j&&(f=j-g,a&&f+h<k&&(b=!1));e.x=f}return b},render:function(a,b){var c=this.type,d=this.label,
|
31
|
+
e=this.pos,f=q.labels,g=this.gridLine,h=c?c+"Grid":"grid",i=c?c+"Tick":"tick",j=q[h+"LineWidth"],k=q[h+"LineColor"],m=q[h+"LineDashStyle"],F=q[i+"Length"],h=q[i+"Width"]||0,l=q[i+"Color"],n=q[i+"Position"],i=this.mark,p=f.step,x=b&&Ra||pa,Bb=!0,ea;ea=O?Lb(e+Ea,null,null,b)+Qa:y+Ia+(t?(b&&Ya||qa)-Yb-y:0);x=O?x-Kb+Ia-(t?gb:0):x-Lb(e+Ea,null,null,b)-Qa;if(j){e=Q(e+Ea,j,b);if(g===V){g={stroke:k,"stroke-width":j};if(m)g.dashstyle=m;if(!c)g.zIndex=1;this.gridLine=g=j?J.path(e).attr(g).add(eb):null}if(!b&&
|
32
|
+
g&&e)g[this.isNew?"attr":"animate"]({d:e})}if(h)n==="inside"&&(F=-F),t&&(F=-F),c=J.crispLine([ta,ea,x,fa,ea+(O?0:-F),x+(O?F:0)],h),i?i.animate({d:c}):this.mark=J.path(c).attr({stroke:l,"stroke-width":h}).add(S);if(d&&!isNaN(ea))ea=ea+f.x-(Ea&&O?Ea*H*(sa?-1:1):0),x=x+f.y-(Ea&&!O?Ea*H*(sa?1:-1):0),u(f.y)||(x+=T(d.styles.lineHeight)*0.9-d.getBBox().height/2),Pa&&(x+=a/(p||1)%Pa*16),d.x=ea,d.y=x,this.isFirst&&!r(q.showFirstLabel,1)||this.isLast&&!r(q.showLastLabel,1)?Bb=!1:!Pa&&O&&f.overflow==="justify"&&
|
33
|
+
!this.handleOverflow(a)&&(Bb=!1),p&&a%p&&(Bb=!1),Bb?(d[this.isNew?"attr":"animate"]({x:d.x,y:d.y}),d.show(),this.isNew=!1):d.hide()},destroy:function(){Hb(this)}};c.prototype={render:function(){var a=this,b=(x.pointRange||0)/2,c=a.options,d=c.label,e=a.label,f=c.width,g=c.to,h=c.from,i=c.value,j,k=c.dashStyle,m=a.svgElem,F=[],l,q,n=c.color;q=c.zIndex;var p=c.events;Z&&(h=nb(h),g=nb(g),i=nb(i));if(f){if(F=Q(i,f),b={stroke:n,"stroke-width":f},k)b.dashstyle=k}else if(u(h)&&u(g))h=X(h,G-b),g=Ta(g,I+b),
|
34
|
+
j=Q(g),(F=Q(h))&&j?F.push(j[4],j[5],j[1],j[2]):F=null,b={fill:n};else return;if(u(q))b.zIndex=q;if(m)F?m.animate({d:F},null,m.onGetPath):(m.hide(),m.onGetPath=function(){m.show()});else if(F&&F.length&&(a.svgElem=m=J.path(F).attr(b).add(),p))for(l in k=function(b){m.on(b,function(c){p[b].apply(a,[c])})},p)k(l);if(d&&u(d.text)&&F&&F.length&&B>0&&gb>0){d=K({align:O&&j&&"center",x:O?!j&&4:10,verticalAlign:!O&&j&&"middle",y:O?j?16:10:j?6:-4,rotation:O&&!j&&90},d);if(!e)a.label=e=J.text(d.text,0,0).attr({align:d.textAlign||
|
35
|
+
d.align,rotation:d.rotation,zIndex:q}).css(d.style).add();j=[F[1],F[4],r(F[6],F[1])];F=[F[2],F[5],r(F[7],F[2])];l=Rb(j);q=Rb(F);e.align(d,!1,{x:l,y:q,width:Gb(j)-l,height:Gb(F)-q});e.show()}else e&&e.hide();return a},destroy:function(){Hb(this);Eb(oa,this)}};d.prototype={destroy:function(){Hb(this)},setTotal:function(a){this.cum=this.total=a},render:function(a){var b=this.options.formatter.call(this);this.label?this.label.attr({text:b,visibility:Za}):this.label=m.renderer.text(b,0,0).css(this.options.style).attr({align:this.textAlign,
|
36
|
+
rotation:this.options.rotation,visibility:Za}).add(a)},setOffset:function(a,b){var c=this.isNegative,d=x.translate(this.total,0,0,0,1),e=x.translate(0),e=ya(d-e),f=m.xAxis[0].translate(this.x)+a,g=m.plotHeight,c={x:W?c?d:d-e:f,y:W?g-f-b:c?g-d-e:g-d,width:W?e:b,height:W?b:e};this.label&&this.label.align(this.alignOptions,null,c).attr({visibility:db})}};Lb=function(a,b,c,d,e){var f=1,g=0,h=d?jb:H,d=d?Pb:G,e=q.ordinal||Z&&e;h||(h=H);c&&(f*=-1,g=ia);sa&&(f*=-1,g-=f*ia);b?(sa&&(a=ia-a),a=a/h+d,e&&(a=x.lin2val(a))):
|
37
|
+
(e&&(a=x.val2lin(a)),a=f*(a-d)*h+g+f*Ca);return a};Q=function(a,b,c){var d,e,f,a=Lb(a,null,null,c),g=c&&Ra||pa,h=c&&Ya||qa,i,c=e=C(a+Qa);d=f=C(g-a-Qa);if(isNaN(a))i=!0;else if(O){if(d=A,f=g-Kb,c<y||c>y+B)i=!0}else if(c=y,e=h-Yb,d<A||d>A+gb)i=!0;return i?null:J.crispLine([ta,c,d,fa,e,f],b||0)};Db=function(){var a=I-G,b=0,c,d;if(p)ba?b=la.pointRange:o(x.series,function(a){b=X(b,a.pointRange);d=a.closestPointRange;!a.noSharedTooltip&&u(d)&&(c=u(c)?Ta(c,d):d)}),x.pointRange=b,x.closestPointRange=c;jb=
|
38
|
+
H;x.translationSlope=H=ia/(a+b||1);Qa=O?y:Kb;Ca=H*(b/2)};ua.push(x);m[p?"xAxis":"yAxis"].push(x);W&&p&&sa===V&&(sa=!0);N(x,{addPlotBand:k,addPlotLine:k,adjustTickAmount:function(){if(cb&&cb[$a]&&!Y&&!Ua&&!ba&&q.alignTicks!==!1){var a=Da,b=P.length;Da=cb[$a];if(b<Da){for(;P.length<Da;)P.push(Ab(P[P.length-1]+La));H*=(b-1)/(Da-1);I=P[P.length-1]}if(u(a)&&Da!==a)x.isDirty=!0}},categories:Ua,getExtremes:function(){return{min:Z?Ab(bb(G)):G,max:Z?Ab(bb(I)):I,dataMin:E,dataMax:M,userMin:ca,userMax:da}},
|
39
|
+
getPlotLinePath:Q,getThreshold:function(a){var b=Z?bb(G):G,c=Z?bb(I):I;b>a||a===null?a=b:c<a&&(a=c);return Lb(a,0,1,0,1)},isXAxis:p,options:q,plotLinesAndBands:oa,getOffset:function(){var a=x.series.length&&u(G)&&u(I),c=a||r(q.showEmpty,!0),d=0,e,f=0,g=q.title,h=q.labels,i=[-1,1,1,-1][v],j;S||(S=J.g("axis").attr({zIndex:7}).add(),eb=J.g("grid").attr({zIndex:q.gridZIndex||1}).add());Fa=0;if(a||ba)o(P,function(a){Ma[a]?Ma[a].addLabel():Ma[a]=new b(a)}),o(P,function(a){if(v===0||v===2||{1:"left",3:"right"}[v]===
|
40
|
+
h.align)Fa=X(Ma[a].getLabelSize(),Fa)}),Pa&&(Fa+=(Pa-1)*16);else for(j in Ma)Ma[j].destroy(),delete Ma[j];if(g&&g.text){if(!w)w=x.axisTitle=J.text(g.text,0,0,g.useHTML).attr({zIndex:7,rotation:g.rotation||0,align:g.textAlign||{low:"left",middle:"center",high:"right"}[g.align]}).css(g.style).add(),w.isNew=!0;if(c)d=w.getBBox()[O?"height":"width"],f=r(g.margin,O?5:10),e=g.offset;w[c?"show":"hide"]()}Ia=i*r(q.offset,ma[v]);Va=r(e,Fa+f+(v!==2&&Fa&&i*q.labels[O?"y":"x"]));ma[v]=X(ma[v],Va+d+i*Ia)},render:l,
|
41
|
+
setAxisSize:function(){var a=q.offsetLeft||0,b=q.offsetRight||0;y=r(q.left,R+a);A=r(q.top,L);B=r(q.width,ja-a+b);gb=r(q.height,ha);Kb=pa-gb-A;Yb=qa-B-y;ia=X(O?B:gb,0);x.left=y;x.top=A;x.len=ia},setAxisTranslation:Db,setCategories:function(b,c){x.categories=a.categories=Ua=b;o(x.series,function(a){a.translate();a.setTooltipPoints(!0)});x.isDirty=!0;r(c,!0)&&m.redraw()},setExtremes:function(a,b,c,d,e){c=r(c,!0);e=N(e,{min:a,max:b});aa(x,"setExtremes",e,function(){ca=a;da=b;x.isDirtyExtremes=!0;c&&m.redraw(d)})},
|
42
|
+
setScale:function(){var a,b,c,d;Pb=G;va=I;D=ia;x.setAxisSize();d=ia!==D;o(x.series,function(a){if(a.isDirtyData||a.isDirty||a.xAxis.isDirty)c=!0});if(d||c||ba||ca!==wa||da!==xa){e();j();wa=ca;xa=da;if(!p)for(a in ea)for(b in ea[a])ea[a][b].cum=ea[a][b].total;if(!x.isDirty)x.isDirty=d||G!==Pb||I!==va}},setTickPositions:j,translate:Lb,redraw:function(){tb.resetTracker&&tb.resetTracker(!0);l();o(oa,function(a){a.render()});o(x.series,function(a){a.isDirty=!0})},removePlotBand:n,removePlotLine:n,reversed:sa,
|
43
|
+
setTitle:function(a,b){q.title=K(q.title,a);w=w.destroy();x.isDirty=!0;r(b,!0)&&m.redraw()},series:[],stacks:ea,destroy:function(){var a;Na(x);for(a in ea)Hb(ea[a]),ea[a]=null;if(x.stackTotalGroup)x.stackTotalGroup=x.stackTotalGroup.destroy();o([Ma,ra,za,oa],function(a){Hb(a)});o([$,S,eb,w],function(a){a&&a.destroy()});$=S=eb=w=null}});for(Oa in z)ka(x,Oa,z[Oa]);if(Z)x.val2lin=nb,x.lin2val=bb}function d(a){function b(){var c=this.points||Fb(this),d=c[0].series,e;e=[d.tooltipHeaderFormatter(c[0].key)];
|
44
|
+
o(c,function(a){d=a.series;e.push(d.tooltipFormatter&&d.tooltipFormatter(a)||a.point.tooltipFormatter(d.tooltipOptions.pointFormat))});e.push(a.footerFormat||"");return e.join("")}function c(a,b){n=l?a:(2*n+a)/3;p=l?b:(p+b)/2;s.attr({x:n,y:p});kb=ya(a-n)>1||ya(b-p)>1?function(){c(a,b)}:null}function d(){if(!l){var a=m.hoverPoints;s.hide();a&&o(a,function(a){a.setState()});m.hoverPoints=null;l=!0}}var e,f=a.borderWidth,g=a.crosshairs,h=[],i=a.style,j=a.shared,k=T(i.padding),l=!0,n=0,p=0;i.padding=
|
45
|
+
0;var s=J.label("",0,0,null,null,null,a.useHTML,null,"tooltip").attr({padding:k,fill:a.backgroundColor,"stroke-width":f,r:a.borderRadius,zIndex:8}).css(i).hide().add();Fa||s.shadow(a.shadow);return{shared:j,refresh:function(f){var i,k,q,n,p={},w=[];q=f.tooltipPos;i=a.formatter||b;var p=m.hoverPoints,t;j&&(!f.series||!f.series.noSharedTooltip)?(n=0,p&&o(p,function(a){a.setState()}),m.hoverPoints=f,o(f,function(a){a.setState(Ga);n+=a.plotY;w.push(a.getLabelConfig())}),k=f[0].plotX,n=C(n)/f.length,p=
|
46
|
+
{x:f[0].category},p.points=w,f=f[0]):p=f.getLabelConfig();p=i.call(p);e=f.series;k=r(k,f.plotX);n=r(n,f.plotY);i=C(q?q[0]:W?ja-n:k);k=C(q?q[1]:W?ha-k:n);q=j||!e.isCartesian||e.tooltipOutsidePlot||va(i,k);p===!1||!q?d():(l&&(s.show(),l=!1),s.attr({text:p}),t=a.borderColor||f.color||e.color||"#606060",s.attr({stroke:t}),q=vc(s.width,s.height,R,L,ja,ha,{x:i,y:k},r(a.distance,12),W),c(C(q.x),C(q.y)));if(g){g=Fb(g);var v;q=g.length;for(var z;q--;)if(v=f.series[q?"yAxis":"xAxis"],g[q]&&v)if(v=v.getPlotLinePath(q?
|
47
|
+
r(f.stackY,f.y):f.x,1),h[q])h[q].attr({d:v,visibility:db});else{z={"stroke-width":g[q].width||1,stroke:g[q].color||"#C0C0C0",zIndex:g[q].zIndex||2};if(g[q].dashStyle)z.dashstyle=g[q].dashStyle;h[q]=J.path(v).attr(z).add()}}aa(m,"tooltipRefresh",{text:p,x:i+R,y:k+L,borderColor:t})},hide:d,hideCrosshairs:function(){o(h,function(a){a&&a.hide()})},destroy:function(){o(h,function(a){a&&a.destroy()});s&&(s=s.destroy())}}}function e(a){function b(a){var c,d,a=a||U.event;if(!a.target)a.target=a.srcElement;
|
48
|
+
if(a.originalEvent)a=a.originalEvent;if(a.event)a=a.event;c=a.touches?a.touches.item(0):a;hb=zc(H);c.pageX===V?(d=a.x,c=a.y):(d=c.pageX-hb.left,c=c.pageY-hb.top);return N(a,{chartX:C(d),chartY:C(c)})}function c(a){var b={xAxis:[],yAxis:[]};o(ua,function(c){var d=c.translate,e=c.isXAxis;b[e?"xAxis":"yAxis"].push({axis:c,value:d((W?!e:e)?a.chartX-R:ha-a.chartY+L,!0)})});return b}function e(a){var b=m.hoverSeries,c=m.hoverPoint,d=m.hoverPoints||c;if(a&&Va&&d)Va.refresh(d);else{if(c)c.onMouseOut();if(b)b.onMouseOut();
|
49
|
+
Va&&(Va.hide(),Va.hideCrosshairs());mb=null}}function f(){if(l){var a={xAxis:[],yAxis:[]},b=l.getBBox(),c=b.x-R,d=b.y-L,e;k&&(o(ua,function(f){if(f.options.zoomEnabled!==!1){var g=f.translate,h=f.isXAxis,i=W?!h:h,j=g(i?c:ha-d-b.height,!0,0,0,1),g=g(i?c+b.width:ha-d,!0,0,0,1);!isNaN(j)&&!isNaN(g)&&(a[h?"xAxis":"yAxis"].push({axis:f,min:Ta(j,g),max:X(j,g)}),e=!0)}}),e&&aa(m,"selection",a,sb));l=l.destroy()}if(m)Q(H,{cursor:"auto"}),m.cancelClick=k,m.mouseIsDown=za=k=!1;Na(B,Wa?"touchend":"mouseup",
|
50
|
+
f)}function g(a){Ac(a);hb&&!va(a.pageX-hb.left-R,a.pageY-hb.top-L)&&e()}function h(){e();hb=null}var i,j,k,l,n=Fa?"":s.zoomType,p=/x/.test(n),v=/y/.test(n),t=p&&!W||v&&W,w=v&&!W||p&&W;if(!Pa)m.trackerGroup=Pa=J.g("tracker").attr({zIndex:9}).add();if(a.enabled)m.tooltip=Va=d(a),xb=setInterval(function(){kb&&kb()},32);(function(){H.onmousedown=function(a){a=b(a);!Wa&&a.preventDefault&&a.preventDefault();m.mouseIsDown=za=!0;m.cancelClick=!1;m.mouseDownX=i=a.chartX;j=a.chartY;ka(B,Wa?"touchend":"mouseup",
|
51
|
+
f)};var d=function(c){if(!c||!(c.touches&&c.touches.length>1)){c=b(c);if(!Wa)c.returnValue=!1;var d=c.chartX,e=c.chartY,f=!va(d-R,e-L);Wa&&c.type==="touchstart"&&(A(c.target,"isTracker")?m.runTrackerClick||c.preventDefault():!fb&&!f&&c.preventDefault());f&&(d<R?d=R:d>R+ja&&(d=R+ja),e<L?e=L:e>L+ha&&(e=L+ha));if(za&&c.type!=="touchstart"){if(k=Math.sqrt(Math.pow(i-d,2)+Math.pow(j-e,2)),k>10){var g=va(i-R,j-L);if(Mb&&(p||v)&&g)l||(l=J.rect(R,L,t?1:ja,w?1:ha,0).attr({fill:s.selectionMarkerFill||"rgba(69,114,167,0.25)",
|
52
|
+
zIndex:7}).add());l&&t&&(c=d-i,l.attr({width:ya(c),x:(c>0?0:c)+i}));l&&w&&(e-=j,l.attr({height:ya(e),y:(e>0?0:e)+j}));g&&!l&&s.panning&&m.pan(d)}}else if(!f){var h,d=m.hoverPoint,e=m.hoverSeries,n,o,g=qa,z=W?ha+L-c.chartY:c.chartX-R;if(Va&&a.shared&&(!e||!e.noSharedTooltip)){h=[];n=S.length;for(o=0;o<n;o++)if(S[o].visible&&S[o].options.enableMouseTracking!==!1&&!S[o].noSharedTooltip&&S[o].tooltipPoints.length)c=S[o].tooltipPoints[z],c._dist=ya(z-c.plotX),g=Ta(g,c._dist),h.push(c);for(n=h.length;n--;)h[n]._dist>
|
53
|
+
g&&h.splice(n,1);if(h.length&&h[0].plotX!==mb)Va.refresh(h),mb=h[0].plotX}if(e&&e.tracker&&(c=e.tooltipPoints[z])&&c!==d)c.onMouseOver()}return f||!Mb}};H.onmousemove=d;ka(H,"mouseleave",h);ka(B,"mousemove",g);H.ontouchstart=function(a){if(p||v)H.onmousedown(a);d(a)};H.ontouchmove=d;H.ontouchend=function(){k&&e()};H.onclick=function(a){var d=m.hoverPoint,a=b(a);a.cancelBubble=!0;if(!m.cancelClick)if(d&&(A(a.target,"isTracker")||A(a.target.parentNode,"isTracker"))){var e=d.plotX,f=d.plotY;N(d,{pageX:hb.left+
|
54
|
+
R+(W?ja-f:e),pageY:hb.top+L+(W?ha-e:f)});aa(d.series,"click",N(a,{point:d}));d.firePointEvent("click",a)}else N(a,c(a)),va(a.chartX-R,a.chartY-L)&&aa(m,"click",a)}})();N(this,{zoomX:p,zoomY:v,resetTracker:e,normalizeMouseEvent:b,destroy:function(){if(m.trackerGroup)m.trackerGroup=Pa=m.trackerGroup.destroy();Na(H,"mouseleave",h);Na(B,"mousemove",g);H.onclick=H.onmousedown=H.onmousemove=H.ontouchstart=H.ontouchend=H.ontouchmove=null}})}function f(a){var b=a.type||s.type||s.defaultSeriesType,c=Ha[b],
|
55
|
+
d=m.hasRendered;if(d)if(W&&b==="column")c=Ha.bar;else if(!W&&b==="bar")c=Ha.column;b=new c;b.init(m,a);!d&&b.inverted&&(W=!0);if(b.isCartesian)Mb=b.isCartesian;S.push(b);return b}function g(){s.alignTicks!==!1&&o(ua,function(a){a.adjustTickAmount()});cb=null}function h(a){var b=m.isDirtyLegend,c,d=m.isDirtyBox,e=S.length,f=e,h=m.clipRect;for(Ib(a,m);f--;)if(a=S[f],a.isDirty&&a.options.stacking){c=!0;break}if(c)for(f=e;f--;)if(a=S[f],a.options.stacking)a.isDirty=!0;o(S,function(a){a.isDirty&&a.options.legendType===
|
56
|
+
"point"&&(b=!0)});if(b&&oa.renderLegend)oa.renderLegend(),m.isDirtyLegend=!1;Mb&&(Da||(cb=null,o(ua,function(a){a.setScale()})),g(),Vb(),o(ua,function(a){if(a.isDirtyExtremes)a.isDirtyExtremes=!1,aa(a,"afterSetExtremes",a.getExtremes());if(a.isDirty||d||c)a.redraw(),d=!0}));d&&(ob(),h&&(Nb(h),h.animate({width:m.plotSizeX,height:m.plotSizeY+1})));o(S,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});tb&&tb.resetTracker&&tb.resetTracker(!0);J.draw();aa(m,"redraw")}function i(){var a=
|
57
|
+
t.xAxis||{},b=t.yAxis||{},a=Fb(a);o(a,function(a,b){a.index=b;a.isX=!0});b=Fb(b);o(b,function(a,b){a.index=b});a=a.concat(b);o(a,function(a){new c(a)});g()}function k(){var a=Ba.lang,b=s.resetZoomButton,c=b.theme,d=c.states,e=b.relativeTo==="chart"?null:{x:R,y:L,width:ja,height:ha};m.resetZoomButton=J.button(a.resetZoom,null,null,zb,c,d&&d.hover).attr({align:b.position.align,title:a.resetZoomTitle}).add().align(b.position,!1,e)}function j(a,b){Qa=K(t.title,a);eb=K(t.subtitle,b);o([["title",a,Qa],
|
58
|
+
["subtitle",b,eb]],function(a){var b=a[0],c=m[b],d=a[1],a=a[2];c&&d&&(c=c.destroy());a&&a.text&&!c&&(m[b]=J.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":ib+b,zIndex:a.zIndex||4}).css(a.style).add().align(a,!1,Ia))})}function l(){function a(c){var d=s.width||la.offsetWidth,e=s.height||la.offsetHeight,c=c?c.target:U;if(d&&e&&(c===U||c===B)){if(d!==da||e!==ca)clearTimeout(b),b=setTimeout(function(){rb(d,e,!1)},100);da=d;ca=e}}var b;ka(U,"resize",a);ka(m,"destroy",function(){Na(U,"resize",a)})}
|
59
|
+
function n(){m&&aa(m,"endResize",null,function(){Da-=1})}function p(){for(var a=W||s.inverted||s.type==="bar"||s.defaultSeriesType==="bar",b=t.series,c=b&&b.length;!a&&c--;)b[c].type==="bar"&&(a=!0);m.inverted=W=a}function v(){var a=t.labels,b=t.credits,c;j();oa=m.legend=new Qb;o(ua,function(a){a.setScale()});Vb();cb=null;o(ua,function(a){a.setTickPositions(!0)});g();Vb();ob();Mb&&o(ua,function(a){a.render()});if(!m.seriesGroup)m.seriesGroup=J.g("series-group").attr({zIndex:3}).add();o(S,function(a){a.translate();
|
60
|
+
a.setTooltipPoints();a.render()});a.items&&o(a.items,function(){var b=N(a.style,this.style),c=T(b.left)+R,d=T(b.top)+L+12;delete b.left;delete b.top;J.text(this.html,c,d).attr({zIndex:2}).css(b).add()});if(b.enabled&&!m.credits)c=b.href,m.credits=J.text(b.text,0,0).on("click",function(){if(c)location.href=c}).attr({align:b.position.align,zIndex:8}).css(b.style).add().align(b.position);m.hasRendered=!0}function Z(){if(!Ob&&U==U.top&&B.readyState!=="complete"||Fa&&!U.canvg)Fa?Bc.push(Z,t.global.canvasToolsURL):
|
61
|
+
B.attachEvent("onreadystatechange",function(){B.detachEvent("onreadystatechange",Z);B.readyState==="complete"&&Z()});else{la=s.renderTo;Aa=ib+lc++;yb(la)&&(la=B.getElementById(la));la||jc(13,!0);la.innerHTML="";la.offsetWidth||(E=la.cloneNode(0),Q(E,{position:ub,top:"-9999px",display:"block"}),B.body.appendChild(E));da=(E||la).offsetWidth;ca=(E||la).offsetHeight;m.chartWidth=qa=s.width||da||600;m.chartHeight=pa=s.height||(ca>19?ca:400);m.container=H=xa(Ea,{className:ib+"container"+(s.className?" "+
|
62
|
+
s.className:""),id:Aa},N({position:mc,overflow:Za,width:qa+ga,height:pa+ga,textAlign:"left",lineHeight:"normal"},s.style),E||la);m.renderer=J=s.forExport?new Cb(H,qa,pa,!0):new Wb(H,qa,pa);Fa&&J.create(m,H,qa,pa);aa(m,"init");if(Highcharts.RangeSelector&&t.rangeSelector.enabled)m.rangeSelector=new Highcharts.RangeSelector(m);pb();qb();p();i();o(t.series||[],function(a){f(a)});if(Highcharts.Scroller&&(t.navigator.enabled||t.scrollbar.enabled))m.scroller=new Highcharts.Scroller(m);m.render=v;m.tracker=
|
63
|
+
tb=new e(t.tooltip);v();J.draw();b&&b.apply(m,[m]);o(m.callbacks,function(a){a.apply(m,[m])});E&&(la.appendChild(H),Sb(E));aa(m,"load")}}var t,w=a.series;a.series=null;t=K(Ba,a);t.series=a.series=w;var s=t.chart,w=s.margin,w=lb(w)?w:[w,w,w,w],Y=r(s.marginTop,w[0]),z=r(s.marginRight,w[1]),ia=r(s.marginBottom,w[2]),D=r(s.marginLeft,w[3]),jb=s.spacingTop,Db=s.spacingRight,$a=s.spacingBottom,y=s.spacingLeft,Ia,Qa,eb,L,M,$,R,ma,la,E,H,Aa,da,ca,qa,pa,Ya,Ra,wa,ba,Oa,Ca,m=this,fb=(w=s.events)&&!!w.click,
|
64
|
+
ra,va,Va,za,vb,sa,ab,ha,ja,tb,Pa,oa,Xa,wb,hb,Mb=s.showAxes,Da=0,ua=[],cb,S=[],W,J,kb,xb,mb,ob,Vb,pb,qb,rb,sb,zb,Qb=function(){function a(b,c){var d=b.legendItem,e=b.legendLine,g=b.legendSymbol,h=p.color,i=c?f.itemStyle.color:h,h=c?b.color:h;d&&d.css({fill:i});e&&e.attr({stroke:h});g&&g.attr({stroke:h,fill:h})}function b(a){var c=a.legendItem,d=a.legendLine,e=a._legendItemPos,f=e[0],e=e[1],g=a.legendSymbol,a=a.checkbox;c&&c.attr({x:v?f:Xa-f,y:e});d&&d.translate(v?f:Xa-f,e-4);g&&(c=f+g.xOff,g.attr({x:v?
|
65
|
+
c:Xa-c,y:e+g.yOff}));if(a)a.x=f,a.y=e}function c(){o(j,function(a){var b=a.checkbox,c=A.alignAttr;b&&Q(b,{left:c.translateX+a.legendItemWidth+b.x-40+ga,top:c.translateY+b.y-11+ga})})}function d(b){var c,e,j,k,m=b.legendItem;k=b.series||b;var q=k.options,o=q&&q.borderWidth||0;if(!m){k=/^(bar|pie|area|column)$/.test(k.type);b.legendItem=m=J.text(f.labelFormatter.call(b),0,0,f.useHTML).css(b.visible?l:p).on("mouseover",function(){b.setState(Ga);m.css(n)}).on("mouseout",function(){m.css(b.visible?l:p);
|
66
|
+
b.setState()}).on("click",function(){var a=function(){b.setVisible()};b.firePointEvent?b.firePointEvent("legendItemClick",null,a):aa(b,"legendItemClick",null,a)}).attr({align:v?"left":"right",zIndex:2}).add(A);if(!k&&q&&q.lineWidth){var Ia={"stroke-width":q.lineWidth,zIndex:2};if(q.dashStyle)Ia.dashstyle=q.dashStyle;b.legendLine=J.path([ta,(-h-i)*(v?1:-1),0,fa,-i*(v?1:-1),0]).attr(Ia).add(A)}if(k)j=J.rect(c=-h-i,e=-11,h,12,2).attr({zIndex:3}).add(A),v||(c+=h);else if(q&&q.marker&&q.marker.enabled)j=
|
67
|
+
q.marker.radius,j=J.symbol(b.symbol,c=-h/2-i-j,e=-4-j,2*j,2*j).attr(b.pointAttr[Ja]).attr({zIndex:3}).add(A),v||(c+=h/2);if(j)j.xOff=c+o%2/2,j.yOff=e+o%2/2;b.legendSymbol=j;a(b,b.visible);if(q&&q.showCheckbox)b.checkbox=xa("input",{type:"checkbox",checked:b.selected,defaultChecked:b.selected},f.itemCheckboxStyle,H),ka(b.checkbox,"click",function(a){aa(b,"checkboxClick",{checked:a.target.checked},function(){b.select()})})}c=m.getBBox();e=b.legendItemWidth=f.itemWidth||h+i+c.width+s;C=c.height;if(g&&
|
68
|
+
Y-r+e>(B||qa-2*s-r))Y=r,u+=t+C+w;!g&&u+f.y+C>pa-jb-$a&&(u=Z,Y+=z,z=0);z=X(z,e);ia=X(ia,u+w);b._legendItemPos=[Y,u];g?Y+=e:u+=t+C+w;E=B||X(Y-r+(g?0:e),E)}function e(){Y=r;u=Z;ia=E=0;A||(A=J.g("legend").attr({zIndex:7}).add());j=[];o(L,function(a){var b=a.options;b.showInLegend&&(j=j.concat(a.legendItems||(b.legendType==="point"?a.data:a)))});Mc(j,function(a,b){return(a.options.legendIndex||0)-(b.options.legendIndex||0)});M&&j.reverse();o(j,d);Xa=B||E;wb=ia-q+C;if(D||Qa){Xa+=2*s;wb+=2*s;if(y){if(Xa>
|
69
|
+
0&&wb>0)y[y.isNew?"attr":"animate"](y.crisp(null,null,null,Xa,wb)),y.isNew=!1}else y=J.rect(0,0,Xa,wb,f.borderRadius,D||0).attr({stroke:f.borderColor,"stroke-width":D||0,fill:Qa||Ka}).add(A).shadow(f.shadow),y.isNew=!0;y[j.length?"show":"hide"]()}o(j,b);for(var a=["left","right","top","bottom"],g,h=4;h--;)g=a[h],k[g]&&k[g]!=="auto"&&(f[h<2?"align":"verticalAlign"]=g,f[h<2?"x":"y"]=T(k[g])*(h%2?-1:1));j.length&&A.align(N(f,{width:Xa,height:wb}),!0,Ia);Da||c()}var f=m.options.legend;if(f.enabled){var g=
|
70
|
+
f.layout==="horizontal",h=f.symbolWidth,i=f.symbolPadding,j,k=f.style,l=f.itemStyle,n=f.itemHoverStyle,p=K(l,f.itemHiddenStyle),s=f.padding||T(k.padding),v=!f.rtl,t=f.itemMarginTop||0,w=f.itemMarginBottom||0,q=18,z=0,r=4+s+h+i,Z=s+t+q-5,Y,u,ia,C=0,y,D=f.borderWidth,Qa=f.backgroundColor,A,E,B=f.width,L=m.series,M=f.reversed;e();ka(m,"endResize",c);return{colorizeItem:a,destroyItem:function(a){var b=a.checkbox;o(["legendItem","legendLine","legendSymbol"],function(b){a[b]&&a[b].destroy()});b&&Sb(a.checkbox)},
|
71
|
+
renderLegend:e,destroy:function(){y&&(y=y.destroy());A&&(A=A.destroy())}}}};va=function(a,b){return a>=0&&a<=ja&&b>=0&&b<=ha};zb=function(){var a=m.resetZoomButton;aa(m,"selection",{resetSelection:!0},sb);if(a)m.resetZoomButton=a.destroy()};sb=function(a){var b;m.resetZoomEnabled!==!1&&!m.resetZoomButton&&k();!a||a.resetSelection?o(ua,function(a){a.options.zoomEnabled!==!1&&(a.setExtremes(null,null,!1),b=!0)}):o(a.xAxis.concat(a.yAxis),function(a){var c=a.axis;if(m.tracker[c.isXAxis?"zoomX":"zoomY"])c.setExtremes(a.min,
|
72
|
+
a.max,!1),b=!0});b&&h(r(s.animation,m.pointCount<100))};m.pan=function(a){var b=m.xAxis[0],c=m.mouseDownX,d=b.pointRange/2,e=b.getExtremes(),f=b.translate(c-a,!0)+d,c=b.translate(c+ja-a,!0)-d;(d=m.hoverPoints)&&o(d,function(a){a.setState()});f>Ta(e.dataMin,e.min)&&c<X(e.dataMax,e.max)&&b.setExtremes(f,c,!0,!1);m.mouseDownX=a;Q(H,{cursor:"move"})};Vb=function(){var a=t.legend,b=r(a.margin,10),c=a.x,d=a.y,e=a.align,f=a.verticalAlign,g;pb();if((m.title||m.subtitle)&&!u(Y))(g=X(m.title&&!Qa.floating&&
|
73
|
+
!Qa.verticalAlign&&Qa.y||0,m.subtitle&&!eb.floating&&!eb.verticalAlign&&eb.y||0))&&(L=X(L,g+r(Qa.margin,15)+jb));a.enabled&&!a.floating&&(e==="right"?u(z)||(M=X(M,Xa-c+b+Db)):e==="left"?u(D)||(R=X(R,Xa+c+b+y)):f==="top"?u(Y)||(L=X(L,wb+d+b+jb)):f==="bottom"&&(u(ia)||($=X($,wb-d+b+$a))));m.extraBottomMargin&&($+=m.extraBottomMargin);m.extraTopMargin&&(L+=m.extraTopMargin);Mb&&o(ua,function(a){a.getOffset()});u(D)||(R+=ma[3]);u(Y)||(L+=ma[0]);u(ia)||($+=ma[2]);u(z)||(M+=ma[1]);qb()};rb=function(a,b,
|
74
|
+
c){var d=m.title,e=m.subtitle;Da+=1;Ib(c,m);Ra=pa;Ya=qa;if(u(a))m.chartWidth=qa=C(a);if(u(b))m.chartHeight=pa=C(b);Q(H,{width:qa+ga,height:pa+ga});J.setSize(qa,pa,c);ja=qa-R-M;ha=pa-L-$;cb=null;o(ua,function(a){a.isDirty=!0;a.setScale()});o(S,function(a){a.isDirty=!0});m.isDirtyLegend=!0;m.isDirtyBox=!0;Vb();d&&d.align(null,null,Ia);e&&e.align(null,null,Ia);h(c);Ra=null;aa(m,"resize");Tb===!1?n():setTimeout(n,Tb&&Tb.duration||500)};qb=function(){m.plotLeft=R=C(R);m.plotTop=L=C(L);m.plotWidth=ja=C(qa-
|
75
|
+
R-M);m.plotHeight=ha=C(pa-L-$);m.plotSizeX=W?ha:ja;m.plotSizeY=W?ja:ha;Ia={x:y,y:jb,width:qa-y-Db,height:pa-jb-$a};o(ua,function(a){a.setAxisSize();a.setAxisTranslation()})};pb=function(){L=r(Y,jb);M=r(z,Db);$=r(ia,$a);R=r(D,y);ma=[0,0,0,0]};ob=function(){var a=s.borderWidth||0,b=s.backgroundColor,c=s.plotBackgroundColor,d=s.plotBackgroundImage,e,f={x:R,y:L,width:ja,height:ha};e=a+(s.shadow?8:0);if(a||b)wa?wa.animate(wa.crisp(null,null,null,qa-e,pa-e)):wa=J.rect(e/2,e/2,qa-e,pa-e,s.borderRadius,a).attr({stroke:s.borderColor,
|
76
|
+
"stroke-width":a,fill:b||Ka}).add().shadow(s.shadow);c&&(ba?ba.animate(f):ba=J.rect(R,L,ja,ha,0).attr({fill:c}).add().shadow(s.plotShadow));d&&(Oa?Oa.animate(f):Oa=J.image(d,R,L,ja,ha).add());s.plotBorderWidth&&(Ca?Ca.animate(Ca.crisp(null,R,L,ja,ha)):Ca=J.rect(R,L,ja,ha,0,s.plotBorderWidth).attr({stroke:s.plotBorderColor,"stroke-width":s.plotBorderWidth,zIndex:4}).add());m.isDirtyBox=!1};s.reflow!==!1&&ka(m,"load",l);if(w)for(ra in w)ka(m,ra,w[ra]);m.options=t;m.series=S;m.xAxis=[];m.yAxis=[];m.addSeries=
|
77
|
+
function(a,b,c){var d;a&&(Ib(c,m),b=r(b,!0),aa(m,"addSeries",{options:a},function(){d=f(a);d.isDirty=!0;m.isDirtyLegend=!0;b&&m.redraw()}));return d};m.animation=Fa?!1:r(s.animation,!0);m.Axis=c;m.destroy=function(){var a,b=H&&H.parentNode;if(m!==null){aa(m,"destroy");Na(m);for(a=ua.length;a--;)ua[a]=ua[a].destroy();for(a=S.length;a--;)S[a]=S[a].destroy();o("title,subtitle,seriesGroup,clipRect,credits,tracker,scroller,rangeSelector".split(","),function(a){var b=m[a];b&&(m[a]=b.destroy())});o([wa,
|
78
|
+
Ca,ba,oa,Va,J,tb],function(a){a&&a.destroy&&a.destroy()});wa=Ca=ba=oa=Va=J=tb=null;if(H)H.innerHTML="",Na(H),b&&Sb(H),H=null;clearInterval(xb);for(a in m)delete m[a];t=m=null}};m.get=function(a){var b,c,d;for(b=0;b<ua.length;b++)if(ua[b].options.id===a)return ua[b];for(b=0;b<S.length;b++)if(S[b].options.id===a)return S[b];for(b=0;b<S.length;b++){d=S[b].points||[];for(c=0;c<d.length;c++)if(d[c].id===a)return d[c]}return null};m.getSelectedPoints=function(){var a=[];o(S,function(b){a=a.concat(oc(b.points,
|
79
|
+
function(a){return a.selected}))});return a};m.getSelectedSeries=function(){return oc(S,function(a){return a.selected})};m.hideLoading=function(){vb&&ac(vb,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){Q(vb,{display:Ka})}});ab=!1};m.initSeries=f;m.isInsidePlot=va;m.redraw=h;m.setSize=rb;m.setTitle=j;m.showLoading=function(a){var b=t.loading;vb||(vb=xa(Ea,{className:ib+"loading"},N(b.style,{left:R+ga,top:L+ga,width:ja+ga,height:ha+ga,zIndex:10,display:Ka}),H),sa=xa("span",null,
|
80
|
+
b.labelStyle,vb));sa.innerHTML=a||t.lang.loading;ab||(Q(vb,{opacity:0,display:""}),ac(vb,{opacity:b.style.opacity},{duration:b.showDuration||0}),ab=!0)};m.pointCount=0;m.counters=new uc;Z()}var V,B=document,U=window,na=Math,C=na.round,Sa=na.floor,Xb=na.ceil,X=na.max,Ta=na.min,ya=na.abs,$=na.cos,ca=na.sin,ra=na.PI,Cc=ra*2/360,va=navigator.userAgent,ob=/msie/i.test(va)&&!U.opera,ab=B.documentMode===8,Dc=/AppleWebKit/.test(va),Ec=/Firefox/.test(va),Ob=!!B.createElementNS&&!!B.createElementNS("http://www.w3.org/2000/svg",
|
81
|
+
"svg").createSVGRect,Qc=Ec&&parseInt(va.split("Firefox/")[1],10)<4,Fa=!Ob&&!ob&&!!B.createElement("canvas").getContext,Wb,Wa=B.documentElement.ontouchstart!==V,Fc={},lc=0,zb,Ba,$b,Tb,kb,y,Ea="div",ub="absolute",mc="relative",Za="hidden",ib="highcharts-",db="visible",ga="px",Ka="none",ta="M",fa="L",Gc="rgba(192,192,192,"+(Ob?1.0E-6:0.0020)+")",Ja="",Ga="hover",ec="millisecond",pb="second",Pa="minute",za="hour",Ra="day",oa="week",sa="month",ba="year",sb,fc,gc,ic,Da,qb,rb,qc,rc,hc,sc,tc,D=U.HighchartsAdapter,
|
82
|
+
ma=D||{},Hc=ma.getScript,o=ma.each,oc=ma.grep,zc=ma.offset,Ub=ma.map,K=ma.merge,ka=ma.addEvent,Na=ma.removeEvent,aa=ma.fireEvent,Ac=ma.washMouseEvent,ac=ma.animate,Nb=ma.stop,Ha={};U.Highcharts={};$b=function(a,b,c){if(!u(b)||isNaN(b))return"Invalid date";var a=r(a,"%Y-%m-%d %H:%M:%S"),d=new Date(b),e,f=d[gc](),g=d[ic](),h=d[Da](),i=d[qb](),k=d[rb](),j=Ba.lang,l=j.weekdays,b={a:l[g].substr(0,3),A:l[g],d:Ca(h),e:h,b:j.shortMonths[i],B:j.months[i],m:Ca(i+1),y:k.toString().substr(2,2),Y:k,H:Ca(f),I:Ca(f%
|
83
|
+
12||12),l:f%12||12,M:Ca(d[fc]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:Ca(d.getSeconds()),L:Ca(C(b%1E3),3)};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};uc.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};y=Ya(ec,1,pb,1E3,Pa,6E4,za,36E5,Ra,864E5,oa,6048E5,sa,2592E6,ba,31556952E3);kb={init:function(a,b,c){var b=b||"",d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g,b=b.split(" "),c=[].concat(c),h,
|
84
|
+
i,k=function(a){for(g=a.length;g--;)a[g]===ta&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(k(b),k(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6));if(d<=c.length/f)for(;d--;)c=[].concat(c).splice(0,f).concat(c);a.shift=0;if(b.length)for(a=c.length;b.length<a;)d=[].concat(b).splice(b.length-f,f),e&&(d[f-6]=d[f-2],d[f-5]=d[f-1]),b=b.concat(d);h&&(b=b.concat(h),c=c.concat(i));return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;)d=
|
85
|
+
parseFloat(a[f]),e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d;else e=b;return e}};D&&D.init&&D.init(kb);if(!D&&U.jQuery){var E=jQuery,Hc=E.getScript,o=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===!1)return c},oc=E.grep,Ub=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c},K=function(){var a=arguments;return E.extend(!0,null,a[0],a[1],a[2],a[3])},zc=function(a){return E(a).offset()},ka=function(a,b,c){E(a).bind(b,c)},Na=function(a,b,c){var d=
|
86
|
+
B.removeEventListener?"removeEventListener":"detachEvent";B[d]&&!a[d]&&(a[d]=function(){});E(a).unbind(b,c)},aa=function(a,b,c,d){var e=E.Event(b),f="detached"+b,g;N(e,c);a[b]&&(a[f]=a[b],a[b]=null);o(["preventDefault","stopPropagation"],function(a){var b=e[a];e[a]=function(){try{b.call(e)}catch(c){a==="preventDefault"&&(g=!0)}}});E(a).trigger(e);a[f]&&(a[b]=a[f],a[f]=null);d&&!e.isDefaultPrevented()&&!g&&d(e)},Ac=function(a){return a},ac=function(a,b,c){var d=E(a);if(b.d)a.toD=b.d,b.d=1;d.stop();
|
87
|
+
d.animate(b,c)},Nb=function(a){E(a).stop()};E.extend(E.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var Ic=jQuery.fx,Jc=Ic.step;o(["cur","_default","width","height"],function(a,b){var c=b?Jc:Ic.prototype,d=c[a],e;d&&(c[a]=function(a){a=b?a:this;e=a.elem;return e.attr?e.attr(a.prop,a.now):d.apply(this,arguments)})});Jc.d=function(a){var b=a.elem;if(!a.started){var c=kb.init(b,b.d,b.toD);a.start=c[0];a.end=c[1];a.started=!0}b.attr("d",kb.step(a.start,a.end,a.pos,b.toD))}}D={enabled:!0,
|
88
|
+
align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Ba={colors:"#4572A7,#AA4643,#89A54E,#80699B,#3D96AE,#DB843D,#92A8CD,#A47D7C,#B5CA92".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
|
89
|
+
decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/2.2.2/modules/canvas-tools.js"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",
|
90
|
+
resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},lineWidth:2,shadow:!0,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:K(D,
|
91
|
+
{enabled:!1,y:-6,formatter:function(){return this.y}}),cropThreshold:300,pointRange:0,showInLegend:!0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0}},labels:{style:{position:ub,color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:!1,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},
|
92
|
+
itemCheckboxStyle:{position:ub,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{labelStyle:{fontWeight:"bold",position:mc,top:"1em"},style:{position:ub,backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:!0,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',
|
93
|
+
shadow:!0,shared:Fa,snap:Wa?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var Zb={dateTimeLabelFormats:Ya(ec,"%H:%M:%S.%L",pb,"%H:%M:%S",Pa,"%H:%M",za,"%H:%M",Ra,"%e. %b",oa,"%e. %b",sa,"%b '%y",ba,"%Y"),endOnTick:!1,gridLineColor:"#C0C0C0",labels:D,lineColor:"#C0D0E0",lineWidth:1,
|
94
|
+
max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},kc=K(Zb,{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{align:"right",x:-8,
|
95
|
+
y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:!1,formatter:function(){return this.total},style:D.style}}),Pc={labels:{align:"right",x:-8,y:null},title:{rotation:270}},Oc={labels:{align:"left",x:8,y:null},title:{rotation:90}},yc={labels:{align:"center",x:0,y:14},title:{rotation:0}},Nc=K(yc,{labels:{y:-5,overflow:"justify"}}),Aa=Ba.plotOptions,D=Aa.line;Aa.spline=K(D);Aa.scatter=K(D,{lineWidth:0,states:{hover:{lineWidth:0}},
|
96
|
+
tooltip:{headerFormat:'<span style="font-size: 10px; color:{series.color}">{series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}});Aa.area=K(D,{threshold:0});Aa.areaspline=K(Aa.area);Aa.column=K(D,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:0.1,shadow:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{y:null,verticalAlign:null},
|
97
|
+
threshold:0});Aa.bar=K(Aa.column,{dataLabels:{align:"left",x:5,y:null,verticalAlign:"middle"}});Aa.pie=K(D,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,size:"75%",showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}}});wc();var Oa=function(a){var b=[],c;(function(a){(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a))?
|
98
|
+
b=[T(c[1]),T(c[2]),T(c[3]),parseFloat(c[4],10)]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))&&(b=[T(c[1],16),T(c[2],16),T(c[3],16),1])})(a);return{get:function(c){return b&&!isNaN(b[0])?c==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(a){if(mb(a)&&a!==0){var c;for(c=0;c<3;c++)b[c]+=T(a*255),b[c]<0&&(b[c]=0),b[c]>255&&(b[c]=255)}return this},setOpacity:function(a){b[3]=a;return this}}};fb.prototype={init:function(a,b){this.element=
|
99
|
+
b==="span"?xa(b):B.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a;this.attrSetters={}},animate:function(a,b,c){b=r(b,Tb,!0);Nb(this);if(b){b=K(b);if(c)b.complete=c;ac(this,a,b)}else this.attr(a),c&&c()},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,i=this.renderer,k,j=this.attrSetters,l=this.shadows,n,p=this;yb(a)&&u(b)&&(c=a,a={},a[c]=b);if(yb(a))c=a,h==="circle"?c={x:"cx",y:"cy"}[c]||c:c==="strokeWidth"&&(c="stroke-width"),p=A(g,c)||this[c]||0,c!=="d"&&c!=="visibility"&&
|
100
|
+
(p=parseFloat(p));else for(c in a)if(k=!1,d=a[c],e=j[c]&&j[c](d,c),e!==!1){e!==V&&(d=e);if(c==="d")d&&d.join&&(d=d.join(" ")),/(NaN| {2}|^$)/.test(d)&&(d="M 0 0"),this.d=d;else if(c==="x"&&h==="text"){for(e=0;e<g.childNodes.length;e++)f=g.childNodes[e],A(f,"x")===A(g,"x")&&A(f,"x",d);this.rotation&&A(g,"transform","rotate("+this.rotation+" "+d+" "+T(a.y||A(g,"y"))+")")}else if(c==="fill")d=i.color(d,g,c);else if(h==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(h==="rect"&&c==="r")A(g,
|
101
|
+
{rx:d,ry:d}),k=!0;else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign")this[c]=d,this.updateTransform(),k=!0;else if(c==="stroke")d=i.color(d,g,c);else if(c==="dashstyle")if(c="stroke-dasharray",d=d&&d.toLowerCase(),d==="solid")d=Ka;else{if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");
|
102
|
+
for(e=d.length;e--;)d[e]=T(d[e])*a["stroke-width"];d=d.join(",")}}else if(c==="isTracker")this[c]=d;else if(c==="width")d=T(d);else if(c==="align")c="text-anchor",d={left:"start",center:"middle",right:"end"}[d];else if(c==="title")e=g.getElementsByTagName("title")[0],e||(e=B.createElementNS("http://www.w3.org/2000/svg","title"),g.appendChild(e)),e.textContent=d;c==="strokeWidth"&&(c="stroke-width");Dc&&c==="stroke-width"&&d===0&&(d=1.0E-6);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c)&&
|
103
|
+
(n||(this.symbolAttr(a),n=!0),k=!0);if(l&&/^(width|height|visibility|x|y|d|transform)$/.test(c))for(e=l.length;e--;)A(l[e],c,d);if((c==="width"||c==="height")&&h==="rect"&&d<0)d=0;c==="text"?(this.textStr=d,this.added&&i.buildText(this)):k||A(g,c,d)}if(Dc&&/Chrome\/(18|19)/.test(va)&&h==="text"&&(a.x!==V||a.y!==V))c=g.parentNode,d=g.nextSibling,c&&(c.removeChild(g),d?c.insertBefore(g,d):c.appendChild(g));return p},symbolAttr:function(a){var b=this;o("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),
|
104
|
+
function(c){b[c]=r(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},crisp:function(a,b,c,d,e){var f,g={},h={},i,a=a||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;i=C(a)%2/2;h.x=Sa(b||this.x||0)+i;h.y=Sa(c||this.y||0)+i;h.width=Sa((d||this.width||0)-2*i);h.height=Sa((e||this.height||0)-2*i);h.strokeWidth=a;for(f in h)this[f]!==h[f]&&(this[f]=g[f]=h[f]);return g},
|
105
|
+
css:function(a){var b=this.element,b=a&&a.width&&b.nodeName==="text",c,d="",e=function(a,b){return"-"+b.toLowerCase()};if(a&&a.color)a.fill=a.color;this.styles=a=N(this.styles,a);if(ob&&!Ob)b&&delete a.width,Q(this.element,a);else{for(c in a)d+=c.replace(/([A-Z])/g,e)+":"+a[c]+";";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;Wa&&a==="click"&&(a="touchstart",c=function(a){a.preventDefault();b()});this.element["on"+a]=c;return this},translate:function(a,
|
106
|
+
b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},htmlCss:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width)delete a.width,this.textWidth=b,this.updateTransform();this.styles=N(this.styles,a);Q(this.element,a);return this},htmlGetBBox:function(a){var b=this.element,c=this.bBox;if(!c||a){if(b.nodeName==="text")b.style.position=ub;c=this.bBox={x:b.offsetLeft,y:b.offsetTop,width:b.offsetWidth,height:b.offsetHeight}}return c},
|
107
|
+
htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,d=this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=g&&g!=="left",k=this.shadows;if(c||d)Q(b,{marginLeft:c,marginTop:d}),k&&o(k,function(a){Q(a,{marginLeft:c+1,marginTop:d+1})});this.inverted&&o(b.childNodes,function(c){a.invertChild(c,b)});if(b.tagName==="SPAN"){var j,l,k=this.rotation,n;j=0;var p=1,v=0,Z;n=T(this.textWidth);var t=this.xCorr||
|
108
|
+
0,w=this.yCorr||0,s=[k,g,b.innerHTML,this.textWidth].join(",");if(s!==this.cTT)u(k)&&(j=k*Cc,p=$(j),v=ca(j),Q(b,{filter:k?["progid:DXImageTransform.Microsoft.Matrix(M11=",p,", M12=",-v,", M21=",v,", M22=",p,", sizingMethod='auto expand')"].join(""):Ka})),j=r(this.elemWidth,b.offsetWidth),l=r(this.elemHeight,b.offsetHeight),j>n&&(Q(b,{width:n+ga,display:"block",whiteSpace:"normal"}),j=n),n=a.fontMetrics(b.style.fontSize).b,t=p<0&&-j,w=v<0&&-l,Z=p*v<0,t+=v*n*(Z?1-h:h),w-=p*n*(k?Z?h:1-h:1),i&&(t-=j*
|
109
|
+
h*(p<0?-1:1),k&&(w-=l*h*(v<0?-1:1)),Q(b,{textAlign:g})),this.xCorr=t,this.yCorr=w;Q(b,{left:e+t+ga,top:f+w+ga});this.cTT=s}}else this.alignOnAdd=!0},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];c&&(a+=this.attr("width"),b+=this.attr("height"));(a||b)&&e.push("translate("+a+","+b+")");c?e.push("rotate(90) scale(-1,1)"):d&&e.push("rotate("+d+" "+this.x+" "+this.y+")");e.length&&A(this.element,"transform",e.join(" "))},toFront:function(){var a=
|
110
|
+
this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){a?(this.alignOptions=a,this.alignByTranslate=b,c||this.renderer.alignedObjects.push(this)):(a=this.alignOptions,b=this.alignByTranslate);var c=r(c,this.renderer),d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};/^(right|center)$/.test(d)&&(f+=(c.width-(a.width||0))/{right:1,center:2}[d]);h[b?"translateX":"x"]=C(f);/^(bottom|middle)$/.test(e)&&(g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1));
|
111
|
+
h[b?"translateY":"y"]=C(g);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(a){var b,c,d=this.rotation;c=this.element;var e=d*Cc;if(c.namespaceURI==="http://www.w3.org/2000/svg"){try{b=c.getBBox?N({},c.getBBox()):{width:c.offsetWidth,height:c.offsetHeight}}catch(f){}if(!b||b.width<0)b={width:0,height:0};a=b.width;c=b.height;if(d)b.width=ya(c*ca(e))+ya(a*$(e)),b.height=ya(c*$(e))+ya(a*ca(e))}else b=this.htmlGetBBox(a);return b},show:function(){return this.attr({visibility:db})},
|
112
|
+
hide:function(){return this.attr({visibility:Za})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=A(f,"zIndex"),h;this.parentInverted=a&&a.inverted;this.textStr!==void 0&&b.buildText(this);if(g)c.handleZ=!0,g=T(g);if(c.handleZ)for(c=0;c<e.length;c++)if(a=e[c],b=A(a,"zIndex"),a!==f&&(T(b)>g||!u(g)&&u(b))){d.insertBefore(f,a);h=!0;break}h||d.appendChild(f);this.added=!0;aa(this,"add");return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},
|
113
|
+
destroy:function(){var a=this,b=a.element||{},c=a.shadows,d=a.box,e,f;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=null;Nb(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(f=0;f<a.stops.length;f++)a.stops[f]=a.stops[f].destroy();a.stops=null}a.safeRemoveChild(b);c&&o(c,function(b){a.safeRemoveChild(b)});d&&d.destroy();Eb(a.renderer.alignedObjects,a);for(e in a)delete a[e];return null},empty:function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},
|
114
|
+
shadow:function(a,b){var c=[],d,e,f=this.element,g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(d=1;d<=3;d++)e=f.cloneNode(0),A(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*d,"stroke-width":7-2*d,transform:"translate"+g,fill:Ka}),b?b.element.appendChild(e):f.parentNode.insertBefore(e,f),c.push(e);this.shadows=c}return this}};var Cb=function(){this.init.apply(this,arguments)};Cb.prototype={Element:fb,init:function(a,b,c,d){var e=location,f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",
|
115
|
+
version:"1.1"});a.appendChild(f.element);this.isSVG=!0;this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=ob?"":e.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1");this.defs=this.createElement("defs").add();this.forExport=d;this.gradients={};this.setSize(b,c,!1);var g;if(Ec&&a.getBoundingClientRect)this.subPixelFix=b=function(){Q(a,{left:0,top:0});g=a.getBoundingClientRect();Q(a,{left:-(g.left-T(g.left))+ga,top:-(g.top-T(g.top))+ga})},b(),ka(U,"resize",b)},destroy:function(){var a=
|
116
|
+
this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();Hb(this.gradients||{});this.gradients=null;if(a)this.defs=a.destroy();Na(U,"resize",this.subPixelFix);return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:function(){},buildText:function(a){for(var b=a.element,c=r(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,
|
117
|
+
"</span>").split(/<br.*?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=A(b,"x"),h=a.styles,i=h&&T(h.width),k=h&&h.lineHeight,j,h=d.length,l=[];h--;)b.removeChild(d[h]);i&&!a.added&&this.box.appendChild(b);c[c.length-1]===""&&c.pop();o(c,function(c,d){var h,r=0,t,c=c.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");h=c.split("|||");o(h,function(c){if(c!==""||h.length===1){var n={},o=B.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(c)&&A(o,"style",c.match(e)[1].replace(/(;| |^)color([ :])/,
|
118
|
+
"$1fill$2"));f.test(c)&&(A(o,"onclick",'location.href="'+c.match(f)[1]+'"'),Q(o,{cursor:"pointer"}));c=(c.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">");o.appendChild(B.createTextNode(c));r?n.dx=3:n.x=g;if(!r){if(d){!Ob&&a.renderer.forExport&&Q(o,{display:"block"});t=U.getComputedStyle&&T(U.getComputedStyle(j,null).getPropertyValue("line-height"));if(!t||isNaN(t)){var z;if(!(z=k))if(!(z=j.offsetHeight))l[d]=b.getBBox().height,z=C(l[d]-(l[d-1]||0))||18;t=z}A(o,"dy",t)}j=
|
119
|
+
o}A(o,n);b.appendChild(o);r++;if(i)for(var c=c.replace(/-/g,"- ").split(" "),u=[];c.length||u.length;)z=a.getBBox().width,n=z>i,!n||c.length===1?(c=u,u=[],c.length&&(o=B.createElementNS("http://www.w3.org/2000/svg","tspan"),A(o,{dy:k||16,x:g}),b.appendChild(o),z>i&&(i=z))):(o.removeChild(o.firstChild),u.unshift(c.pop())),c.length&&o.appendChild(B.createTextNode(c.join(" ").replace(/- /g,"-")))}})})},button:function(a,b,c,d,e,f,g){var h=this.label(a,b,c),i=0,k,j,l,n,p,a={x1:0,y1:0,x2:0,y2:1},e=K(Ya("stroke-width",
|
120
|
+
1,"stroke","#999","fill",Ya("linearGradient",a,"stops",[[0,"#FFF"],[1,"#DDD"]]),"r",3,"padding",3,"style",Ya("color","black")),e);l=e.style;delete e.style;f=K(e,Ya("stroke","#68A","fill",Ya("linearGradient",a,"stops",[[0,"#FFF"],[1,"#ACF"]])),f);n=f.style;delete f.style;g=K(e,Ya("stroke","#68A","fill",Ya("linearGradient",a,"stops",[[0,"#9BD"],[1,"#CDF"]])),g);p=g.style;delete g.style;ka(h.element,"mouseenter",function(){h.attr(f).css(n)});ka(h.element,"mouseleave",function(){k=[e,f,g][i];j=[l,n,p][i];
|
121
|
+
h.attr(k).css(j)});h.setState=function(a){(i=a)?a===2&&h.attr(g).css(p):h.attr(e).css(l)};return h.on("click",function(){d.call(h)}).attr(e).css(N({cursor:"default"},l))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=C(a[1])+b%2/2);a[2]===a[5]&&(a[2]=a[5]=C(a[2])+b%2/2);return a},path:function(a){return this.createElement("path").attr({d:a,fill:Ka})},circle:function(a,b,c){a=lb(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(lb(a))b=a.y,c=a.r,d=a.innerR,
|
122
|
+
e=a.start,f=a.end,a=a.x;return this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(lb(a))b=a.y,c=a.width,d=a.height,e=a.r,f=a.strokeWidth,a=a.x;e=this.createElement("rect").attr({rx:e,ry:e,fill:Ka});return e.attr(e.crisp(f,a,b,X(c,0),X(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[r(c,!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");
|
123
|
+
return u(a)?b.attr({"class":ib+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:Ka};arguments.length>1&&N(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(C(b),C(c),d,e,f),i=/^url\((.*?)\)$/,k,j;h?(g=this.path(h),N(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&N(g,f)):i.test(a)&&
|
124
|
+
(j=function(a,b){a.attr({width:b[0],height:b[1]});a.alignByTranslate||a.translate(-C(b[0]/2),-C(b[1]/2))},k=a.match(i)[1],a=Fc[k],g=this.image(k).attr({x:b,y:c}),a?j(g,a):(g.attr({width:0,height:0}),xa("img",{onload:function(){j(g,Fc[k]=[this.width,this.height])},src:k})));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return[ta,a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return[ta,a,b,fa,a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,
|
125
|
+
b,c,d){return[ta,a+c/2,b,fa,a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return[ta,a,b,fa,a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return[ta,a+c/2,b,fa,a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.end-1.0E-6,d=e.innerR,h=$(f),i=ca(f),k=$(g),g=ca(g),e=e.end-f<ra?0:1;return[ta,a+c*h,b+c*i,"A",c,c,0,e,1,a+c*k,b+c*g,fa,a+d*k,b+d*g,"A",d,d,0,e,0,a+d*h,b+d*i,"Z"]}},clipRect:function(a,b,c,d){var e=ib+lc++,f=this.createElement("clipPath").attr({id:e}).add(this.defs),
|
126
|
+
a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this,g=a.linearGradient,b=!bc(g),c=f.gradients,h,i=g.x1||g[0]||0,k=g.y1||g[1]||0,j=g.x2||g[2]||0,l=g.y2||g[3]||0,n,p,v=[b,i,k,j,l,a.stops.join(",")].join(",");c[v]?g=A(c[v].element,"id"):(g=ib+lc++,h=f.createElement("linearGradient").attr(N({id:g,x1:i,y1:k,x2:j,y2:l},b?null:{gradientUnits:"userSpaceOnUse"})).add(f.defs),h.stops=[],o(a.stops,function(a){e.test(a[1])?(d=Oa(a[1]),
|
127
|
+
n=d.get("rgb"),p=d.get("a")):(n=a[1],p=1);a=f.createElement("stop").attr({offset:a[0],"stop-color":n,"stop-opacity":p}).add(h);h.stops.push(a)}),c[v]=h);return"url("+this.url+"#"+g+")"}else return e.test(a)?(d=Oa(a),A(b,c+"-opacity",d.get("a")),d.get("rgb")):(b.removeAttribute(c+"-opacity"),a)},text:function(a,b,c,d){var e=Ba.chart.style;if(d&&!this.forExport)return this.html(a,b,c);b=C(r(b,0));c=C(r(c,0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:e.fontFamily,fontSize:e.fontSize});
|
128
|
+
a.x=b;a.y=c;return a},html:function(a,b,c){var d=Ba.chart.style,e=this.createElement("span"),f=e.attrSetters,g=e.element,h=e.renderer;f.text=function(a){g.innerHTML=a;return!1};f.x=f.y=f.align=function(a,b){b==="align"&&(b="textAlign");e[b]=a;e.htmlUpdateTransform();return!1};e.attr({text:a,x:C(b),y:C(c)}).css({position:ub,whiteSpace:"nowrap",fontFamily:d.fontFamily,fontSize:d.fontSize});e.css=e.htmlCss;if(h.isSVG)e.add=function(a){var b,c,d=h.box.parentNode;if(a){if(b=a.div,!b)b=a.div=xa(Ea,{className:A(a.element,
|
129
|
+
"class")},{position:ub,left:a.attr("translateX")+ga,top:a.attr("translateY")+ga},d),c=b.style,N(a.attrSetters,{translateX:function(a){c.left=a+ga},translateY:function(a){c.top=a+ga},visibility:function(a,b){c[b]=a}})}else b=d;b.appendChild(g);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e};return e},fontMetrics:function(a){var a=T(a||11),a=a<24?a+4:C(a*1.2),b=C(a*0.8);return{h:a,b:b}},label:function(a,b,c,d,e,f,g,h,i){function k(){var a=p.styles,a=a&&a.textAlign,b=s*(1-w),c;c=h?0:$a;if(u(Y)&&
|
130
|
+
(a==="center"||a==="right"))b+={center:0.5,right:1}[a]*(Y-t.width);(b!==v.x||c!==v.y)&&v.attr({x:b,y:c});v.x=b;v.y=c}function j(a,b){r?r.attr(a,b):E[a]=b}function l(){p.attr({text:a,x:b,y:c,anchorX:e,anchorY:f})}var n=this,p=n.g(i),v=n.text("",0,0,g).attr({zIndex:1}).add(p),r,t,w=0,s=3,Y,z,y,A,D=0,E={},$a,g=p.attrSetters;ka(p,"add",l);g.width=function(a){Y=a;return!1};g.height=function(a){z=a;return!1};g.padding=function(a){u(a)&&a!==s&&(s=a,k());return!1};g.align=function(a){w={left:0,center:0.5,
|
131
|
+
right:1}[a];return!1};g.text=function(a,b){v.attr(b,a);var c;c=v.element.style;t=(Y===void 0||z===void 0||p.styles.textAlign)&&v.getBBox(!0);p.width=(Y||t.width||0)+2*s;p.height=(z||t.height||0)+2*s;$a=s+n.fontMetrics(c&&c.fontSize).b;if(!r)c=h?-$a:0,p.box=r=d?n.symbol(d,-w*s,c,p.width,p.height):n.rect(-w*s,c,p.width,p.height,0,E["stroke-width"]),r.add(p);r.attr(K({width:p.width,height:p.height},E));E=null;k();return!1};g["stroke-width"]=function(a,b){D=a%2/2;j(b,a);return!1};g.stroke=g.fill=g.r=
|
132
|
+
function(a,b){j(b,a);return!1};g.anchorX=function(a,b){e=a;j(b,a+D-y);return!1};g.anchorY=function(a,b){f=a;j(b,a-A);return!1};g.x=function(a){p.x=a;a-=w*((Y||t.width)+s);y=C(a);p.attr("translateX",y);return!1};g.y=function(a){A=p.y=C(a);p.attr("translateY",a);return!1};var B=p.css;return N(p,{css:function(a){if(a){var b={},a=K({},a);o("fontSize,fontWeight,fontFamily,color,lineHeight,width".split(","),function(c){a[c]!==V&&(b[c]=a[c],delete a[c])});v.css(b)}return B.call(p,a)},getBBox:function(){return r.getBBox()},
|
133
|
+
shadow:function(a){r.shadow(a);return p},destroy:function(){Na(p,"add",l);Na(p.element,"mouseenter");Na(p.element,"mouseleave");v&&(v=v.destroy());fb.prototype.destroy.call(p)}})}};Wb=Cb;var wa;if(!Ob&&!Fa)wa={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",ub,";"];(b==="shape"||b===Ea)&&d.push("left:0;top:0;width:10px;height:10px;");ab&&d.push("visibility: ",b===Ea?Za:db);c.push(' style="',d.join(""),'"/>');if(b)c=b===Ea||b==="span"||b==="img"?c.join(""):a.prepVML(c),this.element=
|
134
|
+
xa(c);this.renderer=a;this.attrSetters={}},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);ab&&d.gVis===Za&&Q(c,{visibility:Za});d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();aa(this,"add");return this},toggleChildren:function(a,b){for(var c=a.childNodes,d=c.length;d--;)Q(c[d],{visibility:b}),c[d].nodeName==="DIV"&&this.toggleChildren(c[d],b)},updateTransform:fb.prototype.htmlUpdateTransform,
|
135
|
+
attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,i=this.renderer,k=this.symbolName,j,l=this.shadows,n,p=this.attrSetters,o=this;yb(a)&&u(b)&&(c=a,a={},a[c]=b);if(yb(a))c=a,o=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c];else for(c in a)if(d=a[c],n=!1,e=p[c]&&p[c](d,c),e!==!1&&d!==null){e!==V&&(d=e);if(k&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c))j||(this.symbolAttr(a),j=!0),n=!0;else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(n=
|
136
|
+
[];e--;)n[e]=mb(d[e])?C(d[e]*10)-5:d[e]==="Z"?"x":d[e];d=n.join(" ")||"x";f.path=d;if(l)for(e=l.length;e--;)l[e].path=d;n=!0}else if(c==="zIndex"||c==="visibility"){if(ab&&c==="visibility"&&h==="DIV")f.gVis=d,this.toggleChildren(f,d),d===db&&(d=null);d&&(g[c]=d);n=!0}else if(c==="width"||c==="height")d=X(0,d),this[c]=d,this.updateClipping?(this[c]=d,this.updateClipping()):g[c]=d,n=!0;else if(c==="x"||c==="y")this[c]=d,g[{x:"left",y:"top"}[c]]=d;else if(c==="class")f.className=d;else if(c==="stroke")d=
|
137
|
+
i.color(d,f,c),c="strokecolor";else if(c==="stroke-width"||c==="strokeWidth")f.stroked=d?!0:!1,c="strokeweight",this[c]=d,mb(d)&&(d+=ga);else if(c==="dashstyle")(f.getElementsByTagName("stroke")[0]||xa(i.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid",this.dashstyle=d,n=!0;else if(c==="fill")h==="SPAN"?g.color=d:(f.filled=d!==Ka?!0:!1,d=i.color(d,f,c),c="fillcolor");else if(c==="translateX"||c==="translateY"||c==="rotation")this[c]=d,this.updateTransform(),n=!0;else if(c==="text")this.bBox=null,
|
138
|
+
f.innerHTML=d,n=!0;if(l&&c==="visibility")for(e=l.length;e--;)l[e].style[c]=d;n||(ab?f[c]=d:A(f,c,d))}return o},clip:function(a){var b=this,c=a.members,d=b.element;c.push(b);b.destroyClip=function(){Eb(c,b)};d.parentNode.className==="highcharts-tracker"&&!ab&&Q(d,{visibility:Za});return b.css(a.getCSS(b.inverted))},css:fb.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Sb(a)},destroy:function(){this.destroyClip&&this.destroyClip();return fb.prototype.destroy.apply(this)},empty:function(){for(var a=
|
139
|
+
this.element.childNodes,b=a.length,c;b--;)c=a[b],c.parentNode.removeChild(c)},on:function(a,b){this.element["on"+a]=function(){var a=U.event;a.target=a.srcElement;b(a)};return this},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,i,k=e.path;k&&typeof k.value!=="string"&&(k="x");if(a){for(d=1;d<=3;d++)i=['<shape isShadow="true" strokeweight="',7-2*d,'" filled="false" path="',k,'" coordsize="100,100" style="',e.style.cssText,'" />'],g=xa(f.prepVML(i),null,{left:T(h.left)+
|
140
|
+
1,top:T(h.top)+1}),i=['<stroke color="black" opacity="',0.05*d,'"/>'],xa(f.prepVML(i),null,null,g),b?b.element.appendChild(g):e.parentNode.insertBefore(g,e),c.push(g);this.shadows=c}return this}},wa=da(fb,wa),D={Element:wa,isIE8:va.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d,e;this.alignedObjects=[];d=this.createElement(Ea);e=d.element;e.style.position=mc;a.appendChild(d.element);this.box=e;this.boxWrapper=d;this.setSize(b,c,!1);if(!B.namespaces.hcv)B.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),
|
141
|
+
B.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "},clipRect:function(a,b,c,d){var e=this.createElement();return N(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(a){var b=this.top,c=this.left,d=c+this.width,e=b+this.height,b={clip:"rect("+C(a?c:b)+"px,"+C(a?e:d)+"px,"+C(a?d:e)+"px,"+C(a?b:c)+"px)"};!a&&ab&&N(b,{width:d+ga,height:e+ga});return b},updateClipping:function(){o(e.members,function(a){a.css(e.getCSS(a.inverted))})}})},
|
142
|
+
color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,i=h.x1||h[0]||0,k=h.y1||h[1]||0,j=h.x2||h[2]||0,h=h.y2||h[3]||0,l,n,p,r;o(a.stops,function(a,b){e.test(a[1])?(d=Oa(a[1]),f=d.get("rgb"),g=d.get("a")):(f=a[1],g=1);b?(p=f,r=g):(l=f,n=g)});if(c==="fill")a=90-na.atan((h-k)/(j-i))*180/ra,a=['<fill colors="0% ',l,",100% ",p,'" angle="',a,'" opacity="',r,'" o:opacity2="',n,'" type="gradient" focus="100%" method="sigma" />'],xa(this.prepVML(a),null,null,b);else return f}else if(e.test(a)&&
|
143
|
+
b.tagName!=="IMG")return d=Oa(a),a=["<",c,' opacity="',d.get("a"),'"/>'],xa(this.prepVML(a),null,null,b),d.get("rgb");else{b=b.getElementsByTagName(c);if(b.length)b[0].opacity=1;return a}},prepVML:function(a){var b=this.isIE8,a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<",
|
144
|
+
"<hcv:");return a},text:Cb.prototype.html,path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,c){return this.symbol("circle").attr({x:a-c,y:b-c,width:2*c,height:2*c})},g:function(a){var b;a&&(b={className:ib+a,"class":ib+a});return this.createElement(Ea).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){if(lb(a))b=a.y,c=
|
145
|
+
a.width,d=a.height,f=a.strokeWidth,a=a.x;var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,X(c,0),X(d,0)))},invertChild:function(a,b){var c=b.style;Q(a,{flip:"x",left:T(c.width)-10,top:T(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,c=e.r||c||d,d=$(f),h=ca(f),i=$(g),k=ca(g),e=e.innerR,j=0.08/c,l=e&&0.25/e||0;if(g-f===0)return["x"];else 2*ra-g+f<j?i=-j:g-f<l&&(i=$(f+l));return["wa",a-c,b-c,a+c,b+c,a+c*d,b+c*h,a+c*i,b+c*k,"at",a-e,b-e,a+e,b+e,a+e*i,b+
|
146
|
+
e*k,a+e*d,b+e*h,"x","e"]},circle:function(a,b,c,d){return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){if(!u(e))return[];var f=a+c,g=b+d,c=Ta(e.r||0,c,d);return[ta,a+c,b,fa,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,fa,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,fa,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,fa,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}},wa=function(){this.init.apply(this,arguments)},wa.prototype=K(Cb.prototype,D),Wb=wa;var pc,Bc;Fa&&(pc=function(){},Bc=function(){function a(){var a=
|
147
|
+
b.length,d;for(d=0;d<a;d++)b[d]();b=[]}var b=[];return{push:function(c,d){b.length===0&&Hc(d,a);b.push(c)}}}());Wb=wa||pc||Cb;xc.prototype.callbacks=[];var xb=function(){};xb.prototype={init:function(a,b,c){var d=a.chart.counters;this.series=a;this.applyOptions(b,c);this.pointAttr={};if(a.options.colorByPoint){b=a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||b[d.color++];d.wrapColor(b.length)}a.chart.pointCount++;return this},applyOptions:function(a,
|
148
|
+
b){var c=this.series,d=typeof a;this.config=a;if(d==="number"||a===null)this.y=a;else if(typeof a[0]==="number")this.x=a[0],this.y=a[1];else if(d==="object"&&typeof a.length!=="number"){if(N(this,a),this.options=a,a.dataLabels)c._hasPointLabels=!0}else if(typeof a[0]==="string")this.name=a[0],this.y=a[1];if(this.x===V)this.x=b===V?c.autoIncrement():b},destroy:function(){var a=this.series.chart,b=a.hoverPoints,c;a.pointCount--;if(b&&(this.setState(),Eb(b,this),!b.length))a.hoverPoints=null;if(this===
|
149
|
+
a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)Na(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var a="graphic,tracker,dataLabel,group,connector,shadowGroup".split(","),b,c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},
|
150
|
+
select:function(a,b){var c=this,d=c.series.chart,a=r(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=a;c.setState(a&&"select");b||o(d.getSelectedPoints(),function(a){if(a.selected&&a!==c)a.selected=!1,a.setState(Ja),a.firePointEvent("unselect")})})},onMouseOver:function(){var a=this.series,b=a.chart,c=b.tooltip,d=b.hoverPoint;if(d&&d!==this)d.onMouseOut();this.firePointEvent("mouseOver");c&&(!c.shared||a.noSharedTooltip)&&c.refresh(this);this.setState(Ga);
|
151
|
+
b.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=String(this.y).split("."),d=d[1]?d[1].length:0,e=a.match(/\{(series|point)\.[a-zA-Z]+\}/g),f=/[{\.}]/,g,h,i,k;for(k in e)h=e[k],yb(h)&&h!==a&&(i=(" "+h).split(f),g={point:this,series:b}[i[1]],i=i[2],g=g===this&&(i==="y"||i==="open"||i==="high"||i==="low"||i==="close")?(c.valuePrefix||c.yPrefix||"")+cc(this[i],
|
152
|
+
r(c.valueDecimals,c.yDecimals,d))+(c.valueSuffix||c.ySuffix||""):g[i],a=a.replace(h,g));return a},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g,h=e.data,i=h.length,k=e.chart,b=r(b,!0);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);lb(a)&&(e.getAttribs(),f&&f.attr(d.pointAttr[e.state]));for(g=0;g<i;g++)if(h[g]===d){e.xData[g]=d.x;e.yData[g]=d.y;e.options.data[g]=a;break}e.isDirty=!0;e.isDirtyData=!0;b&&k.redraw(c)})},remove:function(a,b){var c=this,d=c.series,e=d.chart,
|
153
|
+
f,g=d.data,h=g.length;Ib(b,e);a=r(a,!0);c.firePointEvent("remove",null,function(){for(f=0;f<h;f++)if(g[f]===c){g.splice(f,1);d.options.data.splice(f,1);d.xData.splice(f,1);d.yData.splice(f,1);break}c.destroy();d.isDirty=!0;d.isDirtyData=!0;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents();a==="click"&&e.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});
|
154
|
+
aa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=K(this.series.options.point,this.options).events,b;this.events=a;for(b in a)ka(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a){var b=this.plotX,c=this.plotY,d=this.series,e=d.options.states,f=Aa[d.type].marker&&d.options.marker,g=f&&!f.enabled,h=f&&f.states[a],i=h&&h.enabled===!1,k=d.stateMarkerGraphic,j=d.chart,l=this.pointAttr,a=a||Ja;if(!(a===this.state||this.selected&&a!=="select"||e[a]&&e[a].enabled===!1||
|
155
|
+
a&&(i||g&&!h.enabled))){if(this.graphic)e=f&&this.graphic.symbolName&&l[a].r,this.graphic.attr(K(l[a],e?{x:b-e,y:c-e,width:2*e,height:2*e}:{}));else{if(a){if(!k)e=f.radius,d.stateMarkerGraphic=k=j.renderer.symbol(d.symbol,-e,-e,2*e,2*e).attr(l[a]).add(d.group);k.translate(b,c)}if(k)k[a?"show":"hide"]()}this.state=a}}};var M=function(){};M.prototype={isCartesian:!0,type:"line",pointClass:xb,sorted:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,
|
156
|
+
b){var c,d;d=a.series.length;this.chart=a;this.options=b=this.setOptions(b);this.bindAxes();N(this,{index:d,name:b.name||"Series "+(d+1),state:Ja,pointAttr:{},visible:b.visible!==!1,selected:b.selected===!0});if(Fa)b.animation=!1;d=b.events;for(c in d)ka(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;this.getColor();this.getSymbol();this.setData(b.data,!1)},bindAxes:function(){var a=this,b=a.options,c=a.chart,d;a.isCartesian&&o(["xAxis",
|
157
|
+
"yAxis"],function(e){o(c[e],function(c){d=c.options;if(b[e]===d.index||b[e]===V&&d.index===0)c.series.push(a),a[e]=c,c.isDirty=!0})})},autoIncrement:function(){var a=this.options,b=this.xIncrement,b=r(b,a.pointStart,0);this.pointInterval=r(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},getSegments:function(){var a=-1,b=[],c,d=this.points,e=d.length;if(e)if(this.options.connectNulls){for(c=e;c--;)d[c].y===null&&d.splice(c,1);d.length&&(b=[d])}else o(d,function(c,
|
158
|
+
g){c.y===null?(g>a+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart.options,c=b.plotOptions,d=a.data;a.data=null;c=K(c[this.type],c.series,a);c.data=a.data=d;this.tooltipOptions=K(b.tooltip,c.tooltip);return c},getColor:function(){var a=this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.options.marker,b=this.chart,c=b.options.symbols,
|
159
|
+
b=b.counters;this.symbol=a.symbol||c[b.symbol++];if(/^url/.test(this.symbol))a.radius=0;b.wrapSymbol(c.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart,i=this.xData,k=this.yData,j=f&&f.shift||0,l=this.options.data;Ib(d,h);if(f&&c)f.shift=j+1;if(g){if(c)g.shift=j+1;g.isArea=!0}b=r(b,!0);d={series:this};this.pointClass.prototype.applyOptions.apply(d,[a]);i.push(d.x);k.push(this.valueCount===4?[d.open,d.high,d.low,d.close]:d.y);l.push(a);c&&(e[0]&&e[0].remove?
|
160
|
+
e[0].remove(!1):(e.shift(),i.shift(),k.shift(),l.shift()));this.getAttribs();this.isDirtyData=this.isDirty=!0;b&&h.redraw()},setData:function(a,b){var c=this.points,d=this.options,e=this.initialColor,f=this.chart,g=null,h=this.xAxis;this.xIncrement=null;this.pointRange=h&&h.categories&&1||d.pointRange;if(u(e))f.counters.color=e;var i=[],k=[],j=a?a.length:[],l=this.valueCount===4;if(j>(d.turboThreshold||1E3)){for(e=0;g===null&&e<j;)g=a[e],e++;if(mb(g)){g=r(d.pointStart,0);d=r(d.pointInterval,1);for(e=
|
161
|
+
0;e<j;e++)i[e]=g,k[e]=a[e],g+=d;this.xIncrement=g}else if(bc(g))if(l)for(e=0;e<j;e++)d=a[e],i[e]=d[0],k[e]=d.slice(1,5);else for(e=0;e<j;e++)d=a[e],i[e]=d[0],k[e]=d[1]}else for(e=0;e<j;e++)d={series:this},this.pointClass.prototype.applyOptions.apply(d,[a[e]]),i[e]=d.x,k[e]=l?[d.open,d.high,d.low,d.close]:d.y;this.data=[];this.options.data=a;this.xData=i;this.yData=k;for(e=c&&c.length||0;e--;)c[e]&&c[e].destroy&&c[e].destroy();h&&h.setMinRange&&h.setMinRange();this.isDirty=this.isDirtyData=f.isDirtyBox=
|
162
|
+
!0;r(b,!0)&&f.redraw(!1)},remove:function(a,b){var c=this,d=c.chart,a=r(a,!0);if(!c.isRemoving)c.isRemoving=!0,aa(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=!0;a&&d.redraw(b)});c.isRemoving=!1},processData:function(a){var b=this.xData,c=this.yData,d=b.length,e=0,f=d,g,h,i=this.xAxis,k=this.options,j=k.cropThreshold,l=this.isCartesian;if(l&&!this.isDirty&&!i.isDirty&&!this.yAxis.isDirty&&!a)return!1;if(l&&this.sorted&&(!j||d>j||this.forceCrop))if(a=i.getExtremes(),i=a.min,
|
163
|
+
j=a.max,b[d-1]<i||b[0]>j)b=[],c=[];else if(b[0]<i||b[d-1]>j){for(a=0;a<d;a++)if(b[a]>=i){e=X(0,a-1);break}for(;a<d;a++)if(b[a]>j){f=a+1;break}b=b.slice(e,f);c=c.slice(e,f);g=!0}for(a=b.length-1;a>0;a--)if(d=b[a]-b[a-1],d>0&&(h===V||d<h))h=d;this.cropped=g;this.cropStart=e;this.processedXData=b;this.processedYData=c;if(k.pointRange===null)this.pointRange=h||1;this.closestPointRange=h},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,
|
164
|
+
g=d.length,h=this.cropStart||0,i,k=this.hasGroupedData,j,l=[],n;if(!b&&!k)b=[],b.length=a.length,b=this.data=b;for(n=0;n<g;n++)i=h+n,k?l[n]=(new f).init(this,[d[n]].concat(Fb(e[n]))):(b[i]?j=b[i]:b[i]=j=(new f).init(this,a[i],d[n]),l[n]=j);if(b&&(g!==(c=b.length)||k))for(n=0;n<c;n++)n===h&&!k&&(n+=g),b[n]&&b[n].destroyElements();this.data=b;this.points=l},translate:function(){this.processedXData||this.processData();this.generatePoints();for(var a=this.chart,b=this.options,c=b.stacking,d=this.xAxis,
|
165
|
+
e=d.categories,f=this.yAxis,g=this.points,h=g.length,i=!!this.modifyValue,k,j=f.series,l=j.length;l--;)if(j[l].visible){l===this.index&&(k=!0);break}for(l=0;l<h;l++){var j=g[l],n=j.x,p=j.y,o=j.low,r=f.stacks[(p<b.threshold?"-":"")+this.stackKey];j.plotX=C(d.translate(n,0,0,0,1)*10)/10;if(c&&this.visible&&r&&r[n]){o=r[n];n=o.total;o.cum=o=o.cum-p;p=o+p;if(k)o=b.threshold;c==="percent"&&(o=n?o*100/n:0,p=n?p*100/n:0);j.percentage=n?j.y*100/n:0;j.stackTotal=n;j.stackY=p}j.yBottom=u(o)?f.translate(o,0,
|
166
|
+
1,0,1):null;i&&(p=this.modifyValue(p,j));j.plotY=typeof p==="number"?C(f.translate(p,0,1,0,1)*10)/10:V;j.clientX=a.inverted?a.plotHeight-j.plotX:j.plotX;j.category=e&&e[j.x]!==V?e[j.x]:j.x}this.getSegments()},setTooltipPoints:function(a){var b=[],c=this.chart.plotSizeX,d,e;d=this.xAxis;var f,g,h=[];if(this.options.enableMouseTracking!==!1){if(a)this.tooltipPoints=null;o(this.segments||this.points,function(a){b=b.concat(a)});d&&d.reversed&&(b=b.reverse());a=b.length;for(g=0;g<a;g++){f=b[g];d=b[g-1]?
|
167
|
+
b[g-1]._high+1:0;for(e=f._high=b[g+1]?Sa((f.plotX+(b[g+1]?b[g+1].plotX:c))/2):c;d<=e;)h[d++]=f}this.tooltipPoints=h}},tooltipHeaderFormatter:function(a){var b=this.tooltipOptions,c=b.xDateFormat||"%A, %b %e, %Y",d=this.xAxis;return b.headerFormat.replace("{point.key}",d&&d.options.type==="datetime"?$b(c,a):a).replace("{series.name}",this.name).replace("{series.color}",this.color)},onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(Wa||!a.mouseIsDown){if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&
|
168
|
+
aa(this,"mouseOver");this.setState(Ga);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;if(d)d.onMouseOut();this&&a.events.mouseOut&&aa(this,"mouseOut");c&&!a.stickyTracking&&!c.shared&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,d=this.options.animation;d&&!lb(d)&&(d={});if(a){if(!c.isAnimating)c.attr("width",0),c.isAnimating=!0}else c.animate({width:b.plotSizeX},d),this.animate=null},drawPoints:function(){var a,
|
169
|
+
b=this.points,c=this.chart,d,e,f,g,h,i,k,j;if(this.options.marker.enabled)for(f=b.length;f--;)if(g=b[f],d=g.plotX,e=g.plotY,j=g.graphic,e!==V&&!isNaN(e))if(a=g.pointAttr[g.selected?"select":Ja],h=a.r,i=r(g.marker&&g.marker.symbol,this.symbol),k=i.indexOf("url")===0,j)j.animate(N({x:d-h,y:e-h},j.symbolName?{width:2*h,height:2*h}:{}));else if(h>0||k)g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h).attr(a).add(this.group)},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={},a=a||{},
|
170
|
+
b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=r(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=Aa[a.type].marker?a.options.marker:a.options,c=b.states,d=c[Ga],e,f=a.color,g={stroke:f,fill:f},h=a.points,i=[],k,j=a.pointAttrToOptions,l;a.options.marker?(d.radius=d.radius||b.radius+2,d.lineWidth=d.lineWidth||b.lineWidth+1):d.color=d.color||Oa(d.color||f).brighten(d.brightness).get();i[Ja]=a.convertAttribs(b,g);o([Ga,"select"],function(b){i[b]=a.convertAttribs(c[b],i[Ja])});a.pointAttr=
|
171
|
+
i;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===!1)b.radius=0;e=!1;if(g.options)for(l in j)u(b[j[l]])&&(e=!0);if(e){k=[];c=b.states||{};e=c[Ga]=c[Ga]||{};if(!a.options.marker)e.color=Oa(e.color||g.options.color).brighten(e.brightness||d.brightness).get();k[Ja]=a.convertAttribs(b,i[Ja]);k[Ga]=a.convertAttribs(c[Ga],i[Ga],k[Ja]);k.select=a.convertAttribs(c.select,i.select,k[Ja])}else k=i;g.pointAttr=k}},destroy:function(){var a=this,b=a.chart,c=a.clipRect,d=
|
172
|
+
/AppleWebKit\/533/.test(va),e,f,g=a.data||[],h,i,k;aa(a,"destroy");Na(a);o(["xAxis","yAxis"],function(b){if(k=a[b])Eb(k.series,a),k.isDirty=!0});a.legendItem&&a.chart.legend.destroyItem(a);for(f=g.length;f--;)(h=g[f])&&h.destroy&&h.destroy();a.points=null;if(c&&c!==b.clipRect)a.clipRect=c.destroy();o(["area","graph","dataLabelsGroup","group","tracker"],function(b){a[b]&&(e=d&&b==="group"?"hide":"destroy",a[b][e]())});if(b.hoverSeries===a)b.hoverSeries=null;Eb(b.series,a);for(i in a)delete a[i]},drawDataLabels:function(){var a=
|
173
|
+
this,b=a.options,c=b.dataLabels;if(c.enabled||a._hasPointLabels){var d,e,f=a.points,g,h,i,k=a.dataLabelsGroup,j=a.chart,l=a.xAxis,l=l?l.left:j.plotLeft,n=a.yAxis,n=n?n.top:j.plotTop,p=j.renderer,v=j.inverted,y=a.type,t=b.stacking,w=y==="column"||y==="bar",s=c.verticalAlign===null,Y=c.y===null,z=p.fontMetrics(c.style.fontSize),A=z.h,D=z.b,E,B;w&&(z={top:D,middle:D-A/2,bottom:-A+D},t?(s&&(c=K(c,{verticalAlign:"middle"})),Y&&(c=K(c,{y:z[c.verticalAlign]}))):s?c=K(c,{verticalAlign:"top"}):Y&&(c=K(c,{y:z[c.verticalAlign]})));
|
174
|
+
k?k.translate(l,n):k=a.dataLabelsGroup=p.g("data-labels").attr({visibility:a.visible?db:Za,zIndex:6}).translate(l,n).add();h=c;o(f,function(f){E=f.dataLabel;c=h;(g=f.options)&&g.dataLabels&&(c=K(c,g.dataLabels));if(B=c.enabled){var l=f.barX&&f.barX+f.barW/2||r(f.plotX,-999),n=r(f.plotY,-999),o=c.y===null?f.y>=b.threshold?-A+D:D:c.y;d=(v?j.plotWidth-n:l)+c.x;e=C((v?j.plotHeight-l:n)+o)}if(E&&a.isCartesian&&(!j.isInsidePlot(d,e)||!B))f.dataLabel=E.destroy();else if(B){l=c.align;i=c.formatter.call(f.getLabelConfig(),
|
175
|
+
c);y==="column"&&(d+={left:-1,right:1}[l]*f.barW/2||0);!t&&v&&f.y<0&&(l="right",d-=10);c.style.color=r(c.color,c.style.color,a.color,"black");if(E)E.attr({text:i}).animate({x:d,y:e});else if(u(i))E=f.dataLabel=p[c.rotation?"text":"label"](i,d,e,null,null,null,c.useHTML,!0).attr({align:l,fill:c.backgroundColor,stroke:c.borderColor,"stroke-width":c.borderWidth,r:c.borderRadius||0,rotation:c.rotation,padding:c.padding,zIndex:1}).css(c.style).add(k).shadow(c.shadow);if(w&&b.stacking&&E)l=f.barX,n=f.barY,
|
176
|
+
o=f.barW,f=f.barH,E.align(c,null,{x:v?j.plotWidth-n-f:l,y:v?j.plotHeight-l-o:n,width:v?f:o,height:v?o:f})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,i=b.lineWidth,k=b.dashStyle,j,l=a.chart.renderer,n=a.yAxis.getThreshold(b.threshold),p=/^area/.test(a.type),v=[],u=[];o(a.segments,function(c){j=[];o(c,function(d,e){a.getPointSpline?j.push.apply(j,a.getPointSpline(c,d,e)):(j.push(e?fa:ta),e&&b.step&&j.push(d.plotX,c[e-1].plotY),j.push(d.plotX,
|
177
|
+
d.plotY))});c.length>1?d=d.concat(j):v.push(c[0]);if(p){var e=[],f,g=j.length;for(f=0;f<g;f++)e.push(j[f]);g===3&&e.push(fa,j[1],j[2]);if(b.stacking&&a.type!=="areaspline")for(f=c.length-1;f>=0;f--)f<c.length-1&&b.step&&e.push(c[f+1].plotX,c[f].yBottom),e.push(c[f].plotX,c[f].yBottom);else e.push(fa,c[c.length-1].plotX,n,fa,c[0].plotX,n);u=u.concat(e)}});a.graphPath=d;a.singlePoints=v;if(p)e=r(b.fillColor,Oa(a.color).setOpacity(b.fillOpacity||0.75).get()),f?f.animate({d:u}):a.area=a.chart.renderer.path(u).attr({fill:e}).add(g);
|
178
|
+
if(c)Nb(c),c.animate({d:d});else if(i){c={stroke:h,"stroke-width":i};if(k)c.dashstyle=k;a.graph=l.path(d).attr(c).add(g).shadow(b.shadow)}},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};c.attr(a).invert();d&&d.attr(a).invert()}var b=this,c=b.group,d=b.trackerGroup,e=b.chart;ka(e,"resize",a);ka(b,"destroy",function(){Na(e,"resize",a)});a();b.invertGroups=a},render:function(){var a=this,b=a.chart,c,d=a.options,e=d.clip!==!1,f=d.animation,g=f&&a.animate,f=g?f&&f.duration||
|
179
|
+
500:0,h=a.clipRect,i=b.renderer;if(!h&&(h=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:i.clipRect(0,0,b.plotSizeX,b.plotSizeY+1),!b.clipRect))b.clipRect=h;if(!a.group)c=a.group=i.g("series"),c.attr({visibility:a.visible?db:Za,zIndex:d.zIndex}).translate(a.xAxis.left,a.yAxis.top).add(b.seriesGroup);a.drawDataLabels();g&&a.animate(!0);a.getAttribs();a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==!1&&a.drawTracker();b.inverted&&a.invertGroups();e&&!a.hasRendered&&(c.clip(h),
|
180
|
+
a.trackerGroup&&a.trackerGroup.clip(b.clipRect));g&&a.animate();setTimeout(function(){h.isAnimating=!1;if((c=a.group)&&h!==b.clipRect&&h.renderer){if(e)c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.group;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:this.xAxis.left,translateY:this.yAxis.top}));this.translate();this.setTooltipPoints(!0);this.render();b&&
|
181
|
+
aa(this,"updatedData")},setState:function(a){var b=this.options,c=this.graph,d=b.states,b=b.lineWidth,a=a||Ja;if(this.state!==a)this.state=a,d[a]&&d[a].enabled===!1||(a&&(b=d[a].lineWidth||b+1),c&&!c.dashstyle&&c.attr({"stroke-width":b},a?0:500))},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,i=this.points,k=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===V?!h:a)?"show":"hide";if(e)e[h]();if(f)f[h]();else if(i)for(e=
|
182
|
+
i.length;e--;)if(f=i[e],f.tracker)f.tracker[h]();if(g)g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=!0;this.options.stacking&&o(c.series,function(a){if(a.options.stacking&&a.visible)a.isDirty=!0});if(k)c.isDirtyBox=!0;b!==!1&&c.redraw();aa(this,h)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===V?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;aa(this,a?"select":"unselect")},drawTrackerGroup:function(){var a=this.trackerGroup,
|
183
|
+
b=this.chart;if(this.isCartesian){if(!a)this.trackerGroup=a=b.renderer.g().attr({zIndex:this.options.zIndex||1}).add(b.trackerGroup);a.translate(this.xAxis.left,this.yAxis.top)}return a},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.renderer,g=e.options.tooltip.snap,h=a.tracker,i=b.cursor,i=i&&{cursor:i},k=a.singlePoints,j=a.drawTrackerGroup(),l;if(d)for(l=d+1;l--;)c[l]===ta&&c.splice(l+1,0,c[l+1]-g,c[l+2],fa),(l&&c[l]===ta||l===d)&&c.splice(l,0,fa,
|
184
|
+
c[l-2]+g,c[l-1]);for(l=0;l<k.length;l++)d=k[l],c.push(ta,d.plotX-g,d.plotY,fa,d.plotX+g,d.plotY);h?h.attr({d:c}):a.tracker=f.path(c).attr({isTracker:!0,stroke:Gc,fill:Ka,"stroke-linejoin":"bevel","stroke-width":b.lineWidth+2*g,visibility:a.visible?db:Za}).on(Wa?"touchstart":"mouseover",function(){if(e.hoverSeries!==a)a.onMouseOver()}).on("mouseout",function(){if(!b.stickyTracking)a.onMouseOut()}).css(i).add(j)}};D=da(M);Ha.line=D;D=da(M,{type:"area"});Ha.area=D;D=da(M,{type:"spline",getPointSpline:function(a,
|
185
|
+
b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,i,k,j;if(c&&c<a.length-1){a=f.plotY;k=g.plotX;var g=g.plotY,l;h=(1.5*d+f.plotX)/2.5;i=(1.5*e+a)/2.5;k=(1.5*d+k)/2.5;j=(1.5*e+g)/2.5;l=(j-i)*(k-d)/(k-h)+e-j;i+=l;j+=l;i>a&&i>e?(i=X(a,e),j=2*e-i):i<a&&i<e&&(i=Ta(a,e),j=2*e-i);j>g&&j>e?(j=X(g,e),i=2*e-j):j<g&&j<e&&(j=Ta(g,e),i=2*e-j);b.rightContX=k;b.rightContY=j}c?(b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e],f.rightContX=f.rightContY=null):b=[ta,d,e];return b}});Ha.spline=D;D=da(D,
|
186
|
+
{type:"areaspline"});Ha.areaspline=D;var Qb=da(M,{type:"column",tooltipOutsidePlot:!0,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){M.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&o(b.series,function(b){if(b.type===a.type)b.isDirty=!0})},translate:function(){var a=this,b=a.chart,c=a.options,d=c.stacking,e=c.borderWidth,f=0,g=a.xAxis,h=g.reversed,i={},k,j;M.prototype.translate.apply(a);o(b.series,function(b){if(b.type===
|
187
|
+
a.type&&b.visible&&a.options.group===b.options.group)b.options.stacking?(k=b.stackKey,i[k]===V&&(i[k]=f++),j=i[k]):j=f++,b.columnIndex=j});var b=a.points,g=ya(g.translationSlope)*(g.ordinalSlope||g.closestPointRange||1),l=g*c.groupPadding,n=(g-2*l)/f,p=c.pointWidth,v=u(p)?(n-p)/2:n*c.pointPadding,y=Xb(X(r(p,n-2*v),1+2*e)),t=v+(l+((h?f-a.columnIndex:a.columnIndex)||0)*n-g/2)*(h?-1:1),w=a.yAxis.getThreshold(c.threshold),s=r(c.minPointLength,5);o(b,function(b){var f=b.plotY,g=r(b.yBottom,w),h=b.plotX+
|
188
|
+
t,i=Xb(Ta(f,g)),j=Xb(X(f,g)-i),k=a.yAxis.stacks[(b.y<0?"-":"")+a.stackKey];d&&a.visible&&k&&k[b.x]&&k[b.x].setOffset(t,y);ya(j)<s&&s&&(j=s,i=ya(i-w)>s?g-s:w-(f<=w?s:0));N(b,{barX:h,barY:i,barW:y,barH:j});b.shapeType="rect";f={x:h,y:i,width:y,height:j,r:c.borderRadius,strokeWidth:e};e%2&&(f.y-=1,f.height+=1);b.shapeArgs=f;b.trackerArgs=ya(j)<3&&K(b.shapeArgs,{height:6,y:i-3})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;o(a.points,
|
189
|
+
function(f){var g=f.plotY;if(g!==V&&!isNaN(g)&&f.y!==null)d=f.graphic,e=f.shapeArgs,d?(Nb(d),d.animate(c.Element.prototype.crisp.apply({},[e.strokeWidth,e.x,e.y,e.width,e.height]))):f.graphic=d=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":Ja]).add(a.group).shadow(b.shadow)})},drawTracker:function(){var a=this,b=a.chart,c=b.renderer,d,e,f=+new Date,g=a.options,h=g.cursor,i=h&&{cursor:h},k=a.drawTrackerGroup(),j,l,n;o(a.points,function(h){e=h.tracker;d=h.trackerArgs||h.shapeArgs;l=h.plotY;
|
190
|
+
n=!a.isCartesian||l!==V&&!isNaN(l);delete d.strokeWidth;if(h.y!==null&&n)e?e.attr(d):h.tracker=c[h.shapeType](d).attr({isTracker:f,fill:Gc,visibility:a.visible?db:Za}).on(Wa?"touchstart":"mouseover",function(c){j=c.relatedTarget||c.fromElement;if(b.hoverSeries!==a&&A(j,"isTracker")!==f)a.onMouseOver();h.onMouseOver()}).on("mouseout",function(b){if(!g.stickyTracking&&(j=b.relatedTarget||b.toElement,A(j,"isTracker")!==f))a.onMouseOut()}).css(i).add(h.group||k)})},animate:function(a){var b=this,c=b.points,
|
191
|
+
d=b.options;if(!a)o(c,function(a){var c=a.graphic,a=a.shapeArgs,g=b.yAxis,h=d.threshold;c&&(c.attr({height:0,y:u(h)?g.getThreshold(h):g.translate(g.getExtremes().min,0,1,0,1)}),c.animate({height:a.height,y:a.y},d.animation))}),b.animate=null},remove:function(){var a=this,b=a.chart;b.hasRendered&&o(b.series,function(b){if(b.type===a.type)b.isDirty=!0});M.prototype.remove.apply(a,arguments)}});Ha.column=Qb;D=da(Qb,{type:"bar",init:function(){this.inverted=!0;Qb.prototype.init.apply(this,arguments)}});
|
192
|
+
Ha.bar=D;D=da(M,{type:"scatter",sorted:!1,translate:function(){var a=this;M.prototype.translate.apply(a);o(a.points,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){for(var a=this,b=a.options.cursor,b=b&&{cursor:b},c=a.points,d=c.length,e;d--;)if(e=c[d].graphic)e.element._i=d;a._hasTracking?a._hasTracking=!0:a.group.attr({isTracker:!0}).on(Wa?"touchstart":"mouseover",function(b){a.onMouseOver();if(b.target._i!==V)c[b.target._i].onMouseOver()}).on("mouseout",
|
193
|
+
function(){if(!a.options.stickyTracking)a.onMouseOut()}).css(b)}});Ha.scatter=D;D=da(xb,{init:function(){xb.prototype.init.apply(this,arguments);var a=this,b;N(a,{visible:a.visible!==!1,name:r(a.name,"Slice")});b=function(){a.slice()};ka(a,"select",b);ka(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel,e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===V?!this.visible:a)?"show":"hide";this.group[g]();if(c)c[g]();if(d)d[g]();if(e)e[g]();
|
194
|
+
if(f)f[g]();this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;Ib(c,d);r(b,!0);a=this.sliced=u(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});D=da(M,{type:"pie",isCartesian:!1,pointClass:D,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},
|
195
|
+
animate:function(){var a=this;o(a.points,function(b){var c=b.graphic,b=b.shapeArgs,d=-ra/2;c&&(c.attr({r:0,start:d,end:d}),c.animate({r:b.r,start:b.start,end:b.end},a.options.animation))});a.animate=null},setData:function(a,b){M.prototype.setData.call(this,a,!1);this.processData();this.generatePoints();r(b,!0)&&this.chart.redraw()},translate:function(){this.generatePoints();var a=0,b=-0.25,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f=c.center.concat([c.size,c.innerSize||0]),g=this.chart,h=
|
196
|
+
g.plotWidth,i=g.plotHeight,k,j,l,n=this.points,p=2*ra,r,u=Ta(h,i),t,w,s,y=c.dataLabels.distance,f=Ub(f,function(a,b){return(t=/%$/.test(a))?[h,i,u,u][b]*T(a)/100:a});this.getX=function(a,b){l=na.asin((a-f[1])/(f[2]/2+y));return f[0]+(b?-1:1)*$(l)*(f[2]/2+y)};this.center=f;o(n,function(b){a+=b.y});o(n,function(c){r=a?c.y/a:0;k=C(b*p*1E3)/1E3;b+=r;j=C(b*p*1E3)/1E3;c.shapeType="arc";c.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:k,end:j};l=(j+k)/2;c.slicedTranslation=Ub([$(l)*d+g.plotLeft,ca(l)*
|
197
|
+
d+g.plotTop],C);w=$(l)*f[2]/2;s=ca(l)*f[2]/2;c.tooltipPos=[f[0]+w*0.7,f[1]+s*0.7];c.labelPos=[f[0]+w+$(l)*y,f[1]+s+ca(l)*y,f[0]+w+$(l)*e,f[1]+s+ca(l)*e,f[0]+w,f[1]+s,y<0?"center":l<p/4?"left":"right",l];c.percentage=r*100;c.total=a});this.setTooltipPoints()},render:function(){this.getAttribs();this.drawPoints();this.options.enableMouseTracking!==!1&&this.drawTracker();this.drawDataLabels();this.options.animation&&this.animate&&this.animate();this.isDirty=!1},drawPoints:function(){var a=this.chart,
|
198
|
+
b=a.renderer,c,d,e,f=this.options.shadow,g,h;o(this.points,function(i){d=i.graphic;h=i.shapeArgs;e=i.group;g=i.shadowGroup;if(f&&!g)g=i.shadowGroup=b.g("shadow").attr({zIndex:4}).add();if(!e)e=i.group=b.g("point").attr({zIndex:5}).add();c=i.sliced?i.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);g&&g.translate(c[0],c[1]);d?d.animate(h):i.graphic=b.arc(h).attr(N(i.pointAttr[Ja],{"stroke-linejoin":"round"})).add(i.group).shadow(f,g);i.visible===!1&&i.setVisible(!1)})},drawDataLabels:function(){var a=
|
199
|
+
this.data,b,c=this.chart,d=this.options.dataLabels,e=r(d.connectorPadding,10),f=r(d.connectorWidth,1),g,h,i=r(d.softConnector,!0),k=d.distance,j=this.center,l=j[2]/2,n=j[1],p=k>0,v=[[],[]],u,t,w,s,y=2,z;if(d.enabled){M.prototype.drawDataLabels.apply(this);o(a,function(a){a.dataLabel&&v[a.labelPos[7]<ra/2?0:1].push(a)});v[1].reverse();s=function(a,b){return b.y-a.y};for(a=v[0][0]&&v[0][0].dataLabel&&v[0][0].dataLabel.getBBox().height;y--;){var A=[],E=[],D=v[y],C=D.length,B;if(k>0){for(z=n-l-k;z<=n+
|
200
|
+
l+k;z+=a)A.push(z);w=A.length;if(C>w){h=[].concat(D);h.sort(s);for(z=C;z--;)h[z].rank=z;for(z=C;z--;)D[z].rank>=w&&D.splice(z,1);C=D.length}for(z=0;z<C;z++){b=D[z];h=b.labelPos;b=9999;for(t=0;t<w;t++)g=ya(A[t]-h[1]),g<b&&(b=g,B=t);if(B<z&&A[z]!==null)B=z;else for(w<C-z+B&&A[z]!==null&&(B=w-C+z);A[B]===null;)B++;E.push({i:B,y:A[B]});A[B]=null}E.sort(s)}for(z=0;z<C;z++){b=D[z];h=b.labelPos;g=b.dataLabel;w=b.visible===!1?Za:db;u=h[1];if(k>0){if(t=E.pop(),B=t.i,t=t.y,u>t&&A[B+1]!==null||u<t&&A[B-1]!==
|
201
|
+
null)t=u}else t=u;u=d.justify?j[0]+(y?-1:1)*(l+k):this.getX(B===0||B===A.length-1?u:t,y);g.attr({visibility:w,align:h[6]})[g.moved?"animate":"attr"]({x:u+d.x+({left:e,right:-e}[h[6]]||0),y:t+d.y});g.moved=!0;if(p&&f)g=b.connector,h=i?[ta,u+(h[6]==="left"?5:-5),t,"C",u,t,2*h[2]-h[4],2*h[3]-h[5],h[2],h[3],fa,h[4],h[5]]:[ta,u+(h[6]==="left"?5:-5),t,fa,h[2],h[3],fa,h[4],h[5]],g?(g.animate({d:h}),g.attr("visibility",w)):b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f,stroke:d.connectorColor||
|
202
|
+
b.color||"#606060",visibility:w,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}},drawTracker:Qb.prototype.drawTracker,getSymbol:function(){}});Ha.pie=D;N(Highcharts,{Chart:xc,dateFormat:$b,pathAnim:kb,getOptions:function(){return Ba},hasBidiBug:Qc,numberFormat:cc,Point:xb,Color:Oa,Renderer:Wb,SVGRenderer:Cb,VMLRenderer:wa,CanVGRenderer:pc,seriesTypes:Ha,setOptions:function(a){Zb=K(Zb,a.xAxis);kc=K(kc,a.yAxis);a.xAxis=a.yAxis=V;Ba=K(Ba,a);wc();return Ba},Series:M,addEvent:ka,removeEvent:Na,createElement:xa,
|
203
|
+
discardElement:Sb,css:Q,each:o,extend:N,map:Ub,merge:K,pick:r,splat:Fb,extendClass:da,placeBox:vc,product:"Highcharts",version:"2.2.2"})})();
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/*! jQuery v1.7.2 jquery.com | jquery.org/license */
|
2
|
+
(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
|
3
|
+
a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
|
4
|
+
.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
|
@@ -0,0 +1,487 @@
|
|
1
|
+
/*
|
2
|
+
json2.js
|
3
|
+
2011-10-19
|
4
|
+
|
5
|
+
Public Domain.
|
6
|
+
|
7
|
+
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
|
8
|
+
|
9
|
+
See http://www.JSON.org/js.html
|
10
|
+
|
11
|
+
|
12
|
+
This code should be minified before deployment.
|
13
|
+
See http://javascript.crockford.com/jsmin.html
|
14
|
+
|
15
|
+
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
|
16
|
+
NOT CONTROL.
|
17
|
+
|
18
|
+
|
19
|
+
This file creates a global JSON object containing two methods: stringify
|
20
|
+
and parse.
|
21
|
+
|
22
|
+
JSON.stringify(value, replacer, space)
|
23
|
+
value any JavaScript value, usually an object or array.
|
24
|
+
|
25
|
+
replacer an optional parameter that determines how object
|
26
|
+
values are stringified for objects. It can be a
|
27
|
+
function or an array of strings.
|
28
|
+
|
29
|
+
space an optional parameter that specifies the indentation
|
30
|
+
of nested structures. If it is omitted, the text will
|
31
|
+
be packed without extra whitespace. If it is a number,
|
32
|
+
it will specify the number of spaces to indent at each
|
33
|
+
level. If it is a string (such as '\t' or ' '),
|
34
|
+
it contains the characters used to indent at each level.
|
35
|
+
|
36
|
+
This method produces a JSON text from a JavaScript value.
|
37
|
+
|
38
|
+
When an object value is found, if the object contains a toJSON
|
39
|
+
method, its toJSON method will be called and the result will be
|
40
|
+
stringified. A toJSON method does not serialize: it returns the
|
41
|
+
value represented by the name/value pair that should be serialized,
|
42
|
+
or undefined if nothing should be serialized. The toJSON method
|
43
|
+
will be passed the key associated with the value, and this will be
|
44
|
+
bound to the value
|
45
|
+
|
46
|
+
For example, this would serialize Dates as ISO strings.
|
47
|
+
|
48
|
+
Date.prototype.toJSON = function (key) {
|
49
|
+
function f(n) {
|
50
|
+
// Format integers to have at least two digits.
|
51
|
+
return n < 10 ? '0' + n : n;
|
52
|
+
}
|
53
|
+
|
54
|
+
return this.getUTCFullYear() + '-' +
|
55
|
+
f(this.getUTCMonth() + 1) + '-' +
|
56
|
+
f(this.getUTCDate()) + 'T' +
|
57
|
+
f(this.getUTCHours()) + ':' +
|
58
|
+
f(this.getUTCMinutes()) + ':' +
|
59
|
+
f(this.getUTCSeconds()) + 'Z';
|
60
|
+
};
|
61
|
+
|
62
|
+
You can provide an optional replacer method. It will be passed the
|
63
|
+
key and value of each member, with this bound to the containing
|
64
|
+
object. The value that is returned from your method will be
|
65
|
+
serialized. If your method returns undefined, then the member will
|
66
|
+
be excluded from the serialization.
|
67
|
+
|
68
|
+
If the replacer parameter is an array of strings, then it will be
|
69
|
+
used to select the members to be serialized. It filters the results
|
70
|
+
such that only members with keys listed in the replacer array are
|
71
|
+
stringified.
|
72
|
+
|
73
|
+
Values that do not have JSON representations, such as undefined or
|
74
|
+
functions, will not be serialized. Such values in objects will be
|
75
|
+
dropped; in arrays they will be replaced with null. You can use
|
76
|
+
a replacer function to replace those with JSON values.
|
77
|
+
JSON.stringify(undefined) returns undefined.
|
78
|
+
|
79
|
+
The optional space parameter produces a stringification of the
|
80
|
+
value that is filled with line breaks and indentation to make it
|
81
|
+
easier to read.
|
82
|
+
|
83
|
+
If the space parameter is a non-empty string, then that string will
|
84
|
+
be used for indentation. If the space parameter is a number, then
|
85
|
+
the indentation will be that many spaces.
|
86
|
+
|
87
|
+
Example:
|
88
|
+
|
89
|
+
text = JSON.stringify(['e', {pluribus: 'unum'}]);
|
90
|
+
// text is '["e",{"pluribus":"unum"}]'
|
91
|
+
|
92
|
+
|
93
|
+
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
|
94
|
+
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
|
95
|
+
|
96
|
+
text = JSON.stringify([new Date()], function (key, value) {
|
97
|
+
return this[key] instanceof Date ?
|
98
|
+
'Date(' + this[key] + ')' : value;
|
99
|
+
});
|
100
|
+
// text is '["Date(---current time---)"]'
|
101
|
+
|
102
|
+
|
103
|
+
JSON.parse(text, reviver)
|
104
|
+
This method parses a JSON text to produce an object or array.
|
105
|
+
It can throw a SyntaxError exception.
|
106
|
+
|
107
|
+
The optional reviver parameter is a function that can filter and
|
108
|
+
transform the results. It receives each of the keys and values,
|
109
|
+
and its return value is used instead of the original value.
|
110
|
+
If it returns what it received, then the structure is not modified.
|
111
|
+
If it returns undefined then the member is deleted.
|
112
|
+
|
113
|
+
Example:
|
114
|
+
|
115
|
+
// Parse the text. Values that look like ISO date strings will
|
116
|
+
// be converted to Date objects.
|
117
|
+
|
118
|
+
myData = JSON.parse(text, function (key, value) {
|
119
|
+
var a;
|
120
|
+
if (typeof value === 'string') {
|
121
|
+
a =
|
122
|
+
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
|
123
|
+
if (a) {
|
124
|
+
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
|
125
|
+
+a[5], +a[6]));
|
126
|
+
}
|
127
|
+
}
|
128
|
+
return value;
|
129
|
+
});
|
130
|
+
|
131
|
+
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
|
132
|
+
var d;
|
133
|
+
if (typeof value === 'string' &&
|
134
|
+
value.slice(0, 5) === 'Date(' &&
|
135
|
+
value.slice(-1) === ')') {
|
136
|
+
d = new Date(value.slice(5, -1));
|
137
|
+
if (d) {
|
138
|
+
return d;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
return value;
|
142
|
+
});
|
143
|
+
|
144
|
+
|
145
|
+
This is a reference implementation. You are free to copy, modify, or
|
146
|
+
redistribute.
|
147
|
+
*/
|
148
|
+
|
149
|
+
/*jslint evil: true, regexp: true */
|
150
|
+
|
151
|
+
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
|
152
|
+
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
|
153
|
+
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
|
154
|
+
lastIndex, length, parse, prototype, push, replace, slice, stringify,
|
155
|
+
test, toJSON, toString, valueOf
|
156
|
+
*/
|
157
|
+
|
158
|
+
|
159
|
+
// Create a JSON object only if one does not already exist. We create the
|
160
|
+
// methods in a closure to avoid creating global variables.
|
161
|
+
|
162
|
+
var JSON;
|
163
|
+
if (!JSON) {
|
164
|
+
JSON = {};
|
165
|
+
}
|
166
|
+
|
167
|
+
(function () {
|
168
|
+
'use strict';
|
169
|
+
|
170
|
+
function f(n) {
|
171
|
+
// Format integers to have at least two digits.
|
172
|
+
return n < 10 ? '0' + n : n;
|
173
|
+
}
|
174
|
+
|
175
|
+
if (typeof Date.prototype.toJSON !== 'function') {
|
176
|
+
|
177
|
+
Date.prototype.toJSON = function (key) {
|
178
|
+
|
179
|
+
return isFinite(this.valueOf())
|
180
|
+
? this.getUTCFullYear() + '-' +
|
181
|
+
f(this.getUTCMonth() + 1) + '-' +
|
182
|
+
f(this.getUTCDate()) + 'T' +
|
183
|
+
f(this.getUTCHours()) + ':' +
|
184
|
+
f(this.getUTCMinutes()) + ':' +
|
185
|
+
f(this.getUTCSeconds()) + 'Z'
|
186
|
+
: null;
|
187
|
+
};
|
188
|
+
|
189
|
+
String.prototype.toJSON =
|
190
|
+
Number.prototype.toJSON =
|
191
|
+
Boolean.prototype.toJSON = function (key) {
|
192
|
+
return this.valueOf();
|
193
|
+
};
|
194
|
+
}
|
195
|
+
|
196
|
+
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
197
|
+
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
198
|
+
gap,
|
199
|
+
indent,
|
200
|
+
meta = { // table of character substitutions
|
201
|
+
'\b': '\\b',
|
202
|
+
'\t': '\\t',
|
203
|
+
'\n': '\\n',
|
204
|
+
'\f': '\\f',
|
205
|
+
'\r': '\\r',
|
206
|
+
'"' : '\\"',
|
207
|
+
'\\': '\\\\'
|
208
|
+
},
|
209
|
+
rep;
|
210
|
+
|
211
|
+
|
212
|
+
function quote(string) {
|
213
|
+
|
214
|
+
// If the string contains no control characters, no quote characters, and no
|
215
|
+
// backslash characters, then we can safely slap some quotes around it.
|
216
|
+
// Otherwise we must also replace the offending characters with safe escape
|
217
|
+
// sequences.
|
218
|
+
|
219
|
+
escapable.lastIndex = 0;
|
220
|
+
return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
|
221
|
+
var c = meta[a];
|
222
|
+
return typeof c === 'string'
|
223
|
+
? c
|
224
|
+
: '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
225
|
+
}) + '"' : '"' + string + '"';
|
226
|
+
}
|
227
|
+
|
228
|
+
|
229
|
+
function str(key, holder) {
|
230
|
+
|
231
|
+
// Produce a string from holder[key].
|
232
|
+
|
233
|
+
var i, // The loop counter.
|
234
|
+
k, // The member key.
|
235
|
+
v, // The member value.
|
236
|
+
length,
|
237
|
+
mind = gap,
|
238
|
+
partial,
|
239
|
+
value = holder[key];
|
240
|
+
|
241
|
+
// If the value has a toJSON method, call it to obtain a replacement value.
|
242
|
+
|
243
|
+
if (value && typeof value === 'object' &&
|
244
|
+
typeof value.toJSON === 'function') {
|
245
|
+
value = value.toJSON(key);
|
246
|
+
}
|
247
|
+
|
248
|
+
// If we were called with a replacer function, then call the replacer to
|
249
|
+
// obtain a replacement value.
|
250
|
+
|
251
|
+
if (typeof rep === 'function') {
|
252
|
+
value = rep.call(holder, key, value);
|
253
|
+
}
|
254
|
+
|
255
|
+
// What happens next depends on the value's type.
|
256
|
+
|
257
|
+
switch (typeof value) {
|
258
|
+
case 'string':
|
259
|
+
return quote(value);
|
260
|
+
|
261
|
+
case 'number':
|
262
|
+
|
263
|
+
// JSON numbers must be finite. Encode non-finite numbers as null.
|
264
|
+
|
265
|
+
return isFinite(value) ? String(value) : 'null';
|
266
|
+
|
267
|
+
case 'boolean':
|
268
|
+
case 'null':
|
269
|
+
|
270
|
+
// If the value is a boolean or null, convert it to a string. Note:
|
271
|
+
// typeof null does not produce 'null'. The case is included here in
|
272
|
+
// the remote chance that this gets fixed someday.
|
273
|
+
|
274
|
+
return String(value);
|
275
|
+
|
276
|
+
// If the type is 'object', we might be dealing with an object or an array or
|
277
|
+
// null.
|
278
|
+
|
279
|
+
case 'object':
|
280
|
+
|
281
|
+
// Due to a specification blunder in ECMAScript, typeof null is 'object',
|
282
|
+
// so watch out for that case.
|
283
|
+
|
284
|
+
if (!value) {
|
285
|
+
return 'null';
|
286
|
+
}
|
287
|
+
|
288
|
+
// Make an array to hold the partial results of stringifying this object value.
|
289
|
+
|
290
|
+
gap += indent;
|
291
|
+
partial = [];
|
292
|
+
|
293
|
+
// Is the value an array?
|
294
|
+
|
295
|
+
if (Object.prototype.toString.apply(value) === '[object Array]') {
|
296
|
+
|
297
|
+
// The value is an array. Stringify every element. Use null as a placeholder
|
298
|
+
// for non-JSON values.
|
299
|
+
|
300
|
+
length = value.length;
|
301
|
+
for (i = 0; i < length; i += 1) {
|
302
|
+
partial[i] = str(i, value) || 'null';
|
303
|
+
}
|
304
|
+
|
305
|
+
// Join all of the elements together, separated with commas, and wrap them in
|
306
|
+
// brackets.
|
307
|
+
|
308
|
+
v = partial.length === 0
|
309
|
+
? '[]'
|
310
|
+
: gap
|
311
|
+
? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
|
312
|
+
: '[' + partial.join(',') + ']';
|
313
|
+
gap = mind;
|
314
|
+
return v;
|
315
|
+
}
|
316
|
+
|
317
|
+
// If the replacer is an array, use it to select the members to be stringified.
|
318
|
+
|
319
|
+
if (rep && typeof rep === 'object') {
|
320
|
+
length = rep.length;
|
321
|
+
for (i = 0; i < length; i += 1) {
|
322
|
+
if (typeof rep[i] === 'string') {
|
323
|
+
k = rep[i];
|
324
|
+
v = str(k, value);
|
325
|
+
if (v) {
|
326
|
+
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
327
|
+
}
|
328
|
+
}
|
329
|
+
}
|
330
|
+
} else {
|
331
|
+
|
332
|
+
// Otherwise, iterate through all of the keys in the object.
|
333
|
+
|
334
|
+
for (k in value) {
|
335
|
+
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
336
|
+
v = str(k, value);
|
337
|
+
if (v) {
|
338
|
+
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
339
|
+
}
|
340
|
+
}
|
341
|
+
}
|
342
|
+
}
|
343
|
+
|
344
|
+
// Join all of the member texts together, separated with commas,
|
345
|
+
// and wrap them in braces.
|
346
|
+
|
347
|
+
v = partial.length === 0
|
348
|
+
? '{}'
|
349
|
+
: gap
|
350
|
+
? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
|
351
|
+
: '{' + partial.join(',') + '}';
|
352
|
+
gap = mind;
|
353
|
+
return v;
|
354
|
+
}
|
355
|
+
}
|
356
|
+
|
357
|
+
// If the JSON object does not yet have a stringify method, give it one.
|
358
|
+
|
359
|
+
if (typeof JSON.stringify !== 'function') {
|
360
|
+
JSON.stringify = function (value, replacer, space) {
|
361
|
+
|
362
|
+
// The stringify method takes a value and an optional replacer, and an optional
|
363
|
+
// space parameter, and returns a JSON text. The replacer can be a function
|
364
|
+
// that can replace values, or an array of strings that will select the keys.
|
365
|
+
// A default replacer method can be provided. Use of the space parameter can
|
366
|
+
// produce text that is more easily readable.
|
367
|
+
|
368
|
+
var i;
|
369
|
+
gap = '';
|
370
|
+
indent = '';
|
371
|
+
|
372
|
+
// If the space parameter is a number, make an indent string containing that
|
373
|
+
// many spaces.
|
374
|
+
|
375
|
+
if (typeof space === 'number') {
|
376
|
+
for (i = 0; i < space; i += 1) {
|
377
|
+
indent += ' ';
|
378
|
+
}
|
379
|
+
|
380
|
+
// If the space parameter is a string, it will be used as the indent string.
|
381
|
+
|
382
|
+
} else if (typeof space === 'string') {
|
383
|
+
indent = space;
|
384
|
+
}
|
385
|
+
|
386
|
+
// If there is a replacer, it must be a function or an array.
|
387
|
+
// Otherwise, throw an error.
|
388
|
+
|
389
|
+
rep = replacer;
|
390
|
+
if (replacer && typeof replacer !== 'function' &&
|
391
|
+
(typeof replacer !== 'object' ||
|
392
|
+
typeof replacer.length !== 'number')) {
|
393
|
+
throw new Error('JSON.stringify');
|
394
|
+
}
|
395
|
+
|
396
|
+
// Make a fake root object containing our value under the key of ''.
|
397
|
+
// Return the result of stringifying the value.
|
398
|
+
|
399
|
+
return str('', {'': value});
|
400
|
+
};
|
401
|
+
}
|
402
|
+
|
403
|
+
|
404
|
+
// If the JSON object does not yet have a parse method, give it one.
|
405
|
+
|
406
|
+
if (typeof JSON.parse !== 'function') {
|
407
|
+
JSON.parse = function (text, reviver) {
|
408
|
+
|
409
|
+
// The parse method takes a text and an optional reviver function, and returns
|
410
|
+
// a JavaScript value if the text is a valid JSON text.
|
411
|
+
|
412
|
+
var j;
|
413
|
+
|
414
|
+
function walk(holder, key) {
|
415
|
+
|
416
|
+
// The walk method is used to recursively walk the resulting structure so
|
417
|
+
// that modifications can be made.
|
418
|
+
|
419
|
+
var k, v, value = holder[key];
|
420
|
+
if (value && typeof value === 'object') {
|
421
|
+
for (k in value) {
|
422
|
+
if (Object.prototype.hasOwnProperty.call(value, k)) {
|
423
|
+
v = walk(value, k);
|
424
|
+
if (v !== undefined) {
|
425
|
+
value[k] = v;
|
426
|
+
} else {
|
427
|
+
delete value[k];
|
428
|
+
}
|
429
|
+
}
|
430
|
+
}
|
431
|
+
}
|
432
|
+
return reviver.call(holder, key, value);
|
433
|
+
}
|
434
|
+
|
435
|
+
|
436
|
+
// Parsing happens in four stages. In the first stage, we replace certain
|
437
|
+
// Unicode characters with escape sequences. JavaScript handles many characters
|
438
|
+
// incorrectly, either silently deleting them, or treating them as line endings.
|
439
|
+
|
440
|
+
text = String(text);
|
441
|
+
cx.lastIndex = 0;
|
442
|
+
if (cx.test(text)) {
|
443
|
+
text = text.replace(cx, function (a) {
|
444
|
+
return '\\u' +
|
445
|
+
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
446
|
+
});
|
447
|
+
}
|
448
|
+
|
449
|
+
// In the second stage, we run the text against regular expressions that look
|
450
|
+
// for non-JSON patterns. We are especially concerned with '()' and 'new'
|
451
|
+
// because they can cause invocation, and '=' because it can cause mutation.
|
452
|
+
// But just to be safe, we want to reject all unexpected forms.
|
453
|
+
|
454
|
+
// We split the second stage into 4 regexp operations in order to work around
|
455
|
+
// crippling inefficiencies in IE's and Safari's regexp engines. First we
|
456
|
+
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
|
457
|
+
// replace all simple value tokens with ']' characters. Third, we delete all
|
458
|
+
// open brackets that follow a colon or comma or that begin the text. Finally,
|
459
|
+
// we look to see that the remaining characters are only whitespace or ']' or
|
460
|
+
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
|
461
|
+
|
462
|
+
if (/^[\],:{}\s]*$/
|
463
|
+
.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
|
464
|
+
.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
|
465
|
+
.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
|
466
|
+
|
467
|
+
// In the third stage we use the eval function to compile the text into a
|
468
|
+
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
|
469
|
+
// in JavaScript: it can begin a block or an object literal. We wrap the text
|
470
|
+
// in parens to eliminate the ambiguity.
|
471
|
+
|
472
|
+
j = eval('(' + text + ')');
|
473
|
+
|
474
|
+
// In the optional fourth stage, we recursively walk the new structure, passing
|
475
|
+
// each name/value pair to a reviver function for possible transformation.
|
476
|
+
|
477
|
+
return typeof reviver === 'function'
|
478
|
+
? walk({'': j}, '')
|
479
|
+
: j;
|
480
|
+
}
|
481
|
+
|
482
|
+
// If the text is not JSON parseable, then a SyntaxError is thrown.
|
483
|
+
|
484
|
+
throw new SyntaxError('JSON.parse');
|
485
|
+
};
|
486
|
+
}
|
487
|
+
}());
|