rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zh...@apache.org
Subject svn commit: r1087520 [31/35] - in /incubator/rave/donations/ogce-gadget-container: ./ config/ config/shindig-1.1-BETA5/ config/shindig-2.0.0/ db-cleaner/ examples/ examples/src/ examples/src/main/ examples/src/main/java/ examples/src/main/java/cgl/ exa...
Date Fri, 01 Apr 2011 00:29:38 GMT
Added: incubator/rave/donations/ogce-gadget-container/third-party-gadgets/highcharts.js
URL: http://svn.apache.org/viewvc/incubator/rave/donations/ogce-gadget-container/third-party-gadgets/highcharts.js?rev=1087520&view=auto
==============================================================================
--- incubator/rave/donations/ogce-gadget-container/third-party-gadgets/highcharts.js (added)
+++ incubator/rave/donations/ogce-gadget-container/third-party-gadgets/highcharts.js Fri Apr  1 00:29:22 2011
@@ -0,0 +1,132 @@
+/*
+ Highcharts JS v2.0.1 (2010-07-18)
+
+ (c) 2009-2010 Torstein H√łnsi
+
+ License: www.highcharts.com/license
+*/
+(function(){function R(a,b){a||(a={});for(var c in b)a[c]=b[c];return a}function U(a){return a!==Ta&&a!==null}function na(a,b,c){var d,e="setAttribute",f;if(typeof b=="string")if(U(c))a[e](b,c);else{if(a&&a.getAttribute)f=a.getAttribute(b)}else if(U(b)&&typeof b=="object")for(d in b)a[e](d,b[d]);return f}function nc(a){if(!a||a.constructor!=Array)a=[a];return a}function A(){var a=arguments,b,c;for(b=0;b<a.length;b++){c=a[b];if(U(c))return c}}function oc(a){var b="",c;for(c in a)b+=pc(c)+":"+a[c]+
+";";return b}function Ua(a,b){if(qc)if(b&&b.opacity!==Ta)b.filter="alpha(opacity="+b.opacity*100+")";R(a.style,b)}function Da(a,b,c,d,e){a=Ea.createElement(a);b&&R(a,b);e&&Ua(a,{padding:0,border:db,margin:0});c&&Ua(a,c);d&&d.appendChild(a);return a}function Lc(){var a=ra.global.useUTC;Yb=a?Date.UTC:function(b,c,d,e,f,g){return(new Date(b,c,A(d,1),A(e,0),A(f,0),A(g,0))).getTime()};rc=a?"getUTCMinutes":"getMinutes";sc=a?"getUTCHours":"getHours";tc=a?"getUTCDay":"getDay";Ob=a?"getUTCDate":"getDate";
+Zb=a?"getUTCMonth":"getMonth";$b=a?"getUTCFullYear":"getFullYear";Mc=a?"setUTCMinutes":"setMinutes";Nc=a?"setUTCHours":"setHours";uc=a?"setUTCDate":"setDate";Oc=a?"setUTCMonth":"setMonth";Pc=a?"setUTCFullYear":"setFullYear"}function dd(a){ra=ka(ra,a);Lc();return ra}function ed(){return ra}function ac(a){bc||(bc=Da(xb));a&&bc.appendChild(a);bc.innerHTML=""}function eb(a,b){var c=function(){};c.prototype=new a;R(c.prototype,b);return c}function fd(a,b,c,d){var e=ra.lang;a=a;var f=isNaN(b=Za(b))?2:b;
+b=c===undefined?e.decimalPoint:c;d=d===undefined?e.thousandsSep:d;e=a<0?"-":"";c=parseInt(a=Za(+a||0).toFixed(f),10)+"";var g=(g=c.length)>3?g%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+Za(a-c).toFixed(f).slice(2):"")}function gd(a){for(var b={x:a.offsetLeft,y:a.offsetTop};a.offsetParent;){a=a.offsetParent;b.x+=a.offsetLeft;b.y+=a.offsetTop;if(a!=Ea.body&&a!=Ea.documentElement){b.x-=a.scrollLeft;b.y-=a.scrollTop}}return b}function cc(){}function hd(a){function b(m,
+i){function r(){var k=[],o;F=K=null;S=[];p(sa,function(s){o=false;p(["xAxis","yAxis"],function(G){if(s.isCartesian&&(G=="xAxis"&&L||G=="yAxis"&&!L)&&(s.options[G]==i.index||s.options[G]===Ta&&i.index===0)){s[G]=T;S.push(s);o=true}});if(!s.visible&&E.ignoreHiddenSeries)o=false;if(o){var z,B;if(!L){z=s.options.stacking;dc=z=="percent";if(z){B=k[s.type]||[];k[s.type]=B}if(dc){F=0;K=99}}if(s.isCartesian){p(s.data,function(G){var H=G.x,fa=G.y;if(F===null)F=K=G[nb];if(L)if(H>K)K=H;else{if(H<F)F=H}else if(U(fa)){if(z)B[H]=
+B[H]?B[H]+fa:fa;G=B?B[H]:fa;if(!dc)if(G>K)K=G;else if(G<F)F=G;if(z)$a[s.type][H]={total:G,cum:G}}});if(/(area|column|bar)/.test(s.type)&&!L)if(F>=0){F=0;Qc=true}else if(K<0){K=0;Rc=true}}}})}function w(k,o,s){var z=1,B=0;if(s){z*=-1;B=La}if(yb){z*=-1;B-=z*La}if(o){if(yb)k=La-k;k=k/fb+P}else k=z*(k-P)*fb+B;return k}function I(k,o,s){if(s){var z,B,G;z=w(k);var H;k=B=z+zb;z=G=za-z-zb;if(V){z=ga;G=za-Ab;if(k<W||k>W+va)H=true}else{k=W;B=Ma-vc;if(z<ga||z>ga+oa)H=true}H||M.path(M.crispLine([gb,k,z,Na,B,
+G],s)).attr({stroke:o,"stroke-width":s}).add(N)}}function J(k,o,s){k=sb(k,P);o=Kb(o,X);var z=(o-k)*fb;I(k+(o-k)/2,s,z)}function C(k,o,s,z,B,G,H){var fa,pb,ba,Va=i.labels;if(o=="inside")B=-B;if(ha)B=-B;o=pb=w(k+Bb)+zb;fa=ba=za-w(k+Bb)-zb;if(V){fa=za-Ab-(ha?oa:0)+Wa;ba=fa+B}else{o=W+(ha?va:0)+Wa;pb=o-B}z&&M.path(M.crispLine([gb,o,fa,Na,pb,ba],z)).attr({stroke:s,"stroke-width":z}).add(q);if(G&&Va.enabled)if((k=ec.call({index:H,isFirst:k==da[0],isLast:k==da[da.length-1],value:Oa&&Oa[k]?Oa[k]:k}))||k===
+0){o=o+Va.x-(Bb&&V?Bb*fb*(yb?-1:1):0);fa=fa+Va.y-(Bb&&!V?Bb*fb*(yb?1:-1):0);M.text(k,o,fa,Va.style,Va.rotation,Va.align).add(q)}}function la(k,o){var s;tb=o?1:Ga.pow(10,hb(Ga.log(k)/Ga.LN10));s=k/tb;if(!o){o=[1,2,2.5,5,10];if(i.allowDecimals===false)if(tb==1)o=[1,2,5,10];else if(tb<=0.1)o=[1/tb]}for(var z=0;z<o.length;z++){k=o[z];if(s<=(o[z]+(o[z+1]||o[z]))/2)break}k*=tb;return k}function ta(){da=[];var k,o=ra.global.useUTC,s=1E3/ab,z=6E4/ab,B=36E5/ab,G=864E5/ab,H=6048E5/ab,fa=2592E6/ab,pb=31556952E3/
+ab,ba=[["second",s,[1,2,5,10,15,30]],["minute",z,[1,2,5,10,15,30]],["hour",B,[1,2,3,4,6,8,12]],["day",G,[1,2]],["week",H,[1,2]],["month",fa,[1,2,3,4,6]],["year",pb,null]],Va=ba[6],ia=Va[1],Y=Va[2];for(k=0;k<ba.length;k++){Va=ba[k];ia=Va[1];Y=Va[2];if(ba[k+1]){var id=(ia*Y[Y.length-1]+ba[k+1][1])/2;if(Pa<=id)break}}if(ia==pb&&Pa<5*ia)Y=[1,2,5];ba=la(Pa/ia,Y);var ub;Y=new Date(P*ab);Y.setMilliseconds(0);if(ia>=s)Y.setSeconds(ia>=z?0:ba*hb(Y.getSeconds()/ba));if(ia>=z)Y[Mc](ia>=B?0:ba*hb(Y[rc]()/ba));
+if(ia>=B)Y[Nc](ia>=G?0:ba*hb(Y[sc]()/ba));if(ia>=G)Y[uc](ia>=fa?1:ba*hb(Y[Ob]()/ba));if(ia>=fa){Y[Oc](ia>=pb?0:ba*hb(Y[Zb]()/ba));ub=Y[$b]()}if(ia>=pb){ub-=ub%ba;Y[Pc](ub)}ia==H&&Y[uc](Y[Ob]()-Y[tc]()+i.startOfWeek);k=1;ub=Y[$b]();s=Y.getTime()/ab;z=Y[Zb]();for(B=Y[Ob]();s<X&&k<va;){da.push(s);if(ia==pb)s=Yb(ub+k*ba,0)/ab;else if(ia==fa)s=Yb(ub,z+k*ba)/ab;else if(!o&&(ia==G||ia==H))s=Yb(ub,z,B+k*ba*(ia==G?1:7));else s+=ia*ba;k++}da.push(s);i.labels.formatter||(ec=function(){return fc(i.dateTimeLabelFormats[Va[0]],
+this.value,1)})}function ja(k){var o=(tb<1?Z(1/tb):1)*10;return Z(k*o)/o}function Fa(){var k;k=hb(P/Pa)*Pa;var o=Ga.ceil(X/Pa)*Pa;da=[];for(k=ja(k);k<=o;){da.push(k);k=ja(k+Pa)}if(Oa){P-=0.5;X+=0.5}ec||(ec=function(){return this.value})}function wa(){ib?ta():Fa();var k=da[0],o=da[da.length-1];if(i.startOnTick)P=k;else P>k&&da.shift();if(i.endOnTick)X=o;else X<o&&da.pop()}function xa(){if(!ib&&!Oa){var k=Lb,o=da.length;Lb=Mb[nb];if(o<Lb){for(;da.length<Lb;)da.push(ja(da[da.length-1]+Pa));fb*=(o-1)/
+(Lb-1)}if(U(k)&&Lb!=k)T.isDirty=true}}function bb(){var k,o,s,z=P,B=X;k=i.maxZoom;var G;r();P=A(Aa,i.min,F);X=A(Pb,i.max,K);if(X-P<k){G=(k-X+P)/2;P=sb(P-G,A(i.min,P-G));X=Kb(P+k,A(i.max,P+k))}if(!Oa&&!dc&&U(P)&&U(X)){k=X-P||1;if(!U(i.min)&&!U(Aa)&&Sc&&(F<0||!Qc))P-=k*Sc;if(!U(i.max)&&!U(Pb)&&Tc&&(K>0||!Rc))X+=k*Tc}Pa=Oa||P==X?1:A(i.tickInterval,(X-P)*i.tickPixelInterval/La);if(!ib&&!U(i.tickInterval))Pa=la(Pa);wc=i.minorTickInterval==="auto"&&Pa?Pa/5:i.minorTickInterval;wa();fb=La/(X-P||1);Mb||(Mb=
+{x:0,y:0});if(!ib&&da.length>Mb[nb])Mb[nb]=da.length;if(!L)for(o in $a)for(s in $a[o])$a[o][s].cum=$a[o][s].total;if(!T.isDirty)T.isDirty=P!=z||X!=B}function Ha(k,o,s){s=A(s,true);ya(T,"setExtremes",{min:k,max:o},function(){if(Oa){if(k<0)k=0;if(o>Oa.length-1)o=Oa.length-1}Aa=k;Pb=o;s&&m.redraw()})}function Xa(){return{min:P,max:X,dataMin:F,dataMax:K}}function qb(k){if(P>k)k=P;else if(X<k)k=X;return w(k,0,1)}function aa(k){var o=k.width,s=o?xc:yc;s.push(k);o?I(k.value,k.color,k.width):J(k.from,k.to,
+k.color)}function t(){var k=i.title,o=i.alternateGridColor,s=i.minorTickWidth,z=i.lineWidth,B,G;B=S.length&&U(P)&&U(X);if(q){q.empty();N.empty()}else{q=M.g("axis").attr({zIndex:7}).add();N=M.g("grid").attr({zIndex:1}).add()}if(B){o&&p(da,function(H,fa){if(fa%2===0&&H<X)J(H,da[fa+1]!==Ta?da[fa+1]:X,o)});p(yc,function(H){J(H.from,H.to,H.color)});if(wc&&!Oa)for(B=P;B<=X;B+=wc){I(B,i.minorGridLineColor,i.minorGridLineWidth);s&&C(B,i.minorTickPosition,i.minorTickColor,s,i.minorTickLength)}p(da,function(H,
+fa){G=H+Bb;I(G,i.gridLineColor,i.gridLineWidth);C(H,i.tickPosition,i.tickColor,i.tickWidth,i.tickLength,!(H==P&&!i.showFirstLabel||H==X&&!i.showLastLabel),fa)});p(xc,function(H){I(H.value,H.color,H.width)})}if(!T.hasRenderedLine&&z){s=W+(ha?va:0)+Wa;B=za-Ab-(ha?oa:0)+Wa;M.path(M.crispLine([gb,V?W:s,V?B:ga,Na,V?Ma-vc:s,V?B:za-Ab],z)).attr({stroke:i.lineColor,"stroke-width":z,zIndex:7}).add();T.hasRenderedLine=true}if(!T.hasRenderedTitle&&!T.axisTitle&&k&&k.text){z=V?W:ga;z={low:z+(V?0:La),middle:z+
+La/2,high:z+(V?La:0)}[k.align];s=(V?ga+oa:W)+(V?1:-1)*(ha?-1:1)*k.margin-(qc?parseInt(k.style.fontSize||12,10)/3:0);T.axisTitle=M.text(k.text,V?z:s+(ha?va:0)+Wa,V?s-(ha?oa:0)+Wa:z,k.style,k.rotation||0,{low:"left",middle:"center",high:"right"}[k.align]).attr({zIndex:7}).add();T.hasRenderedTitle=true}T.isDirty=false}function v(k){p([yc,xc],function(o){for(var s=0;s<o.length;s++)if(o[s].id==k){o.splice(s,1);break}});t()}function D(){Nb.resetTracker&&Nb.resetTracker();t();p(S,function(k){k.isDirty=true})}
+function Q(k,o){T.categories=Oa=k;p(S,function(s){s.translate();s.setTooltipPoints(true)});T.isDirty=true;A(o,true)&&D()}var L=i.isX,ha=i.opposite,V=ma?!L:L,$a={bar:{},column:{},area:{},areaspline:{},line:{}};i=ka(L?gc:zc,V?ha?jd:Uc:ha?kd:ld,i);var T=this,ib=i.type=="datetime",Wa=i.offset||0,nb=L?"x":"y",La=V?va:oa,fb,zb=V?W:Ab,q,N,F,K,S,Aa,Pb,X=null,P=null,Sc=i.minPadding,Tc=i.maxPadding,Qc,Rc,dc,Vc=i.events,Ac,yc=i.plotBands||[],xc=i.plotLines||[],Pa,wc,tb,da,Lb,ec=i.labels.formatter,Oa=i.categories||
+L&&m.columnCount,yb=i.reversed,Bb=Oa&&i.tickmarkPlacement=="between"?0.5:0;if(ma&&L&&yb===Ta)yb=true;ha||(Wa*=-1);if(V)Wa*=-1;R(T,{addPlotBand:aa,addPlotLine:aa,adjustTickAmount:xa,categories:Oa,getExtremes:Xa,getThreshold:qb,isXAxis:L,options:i,render:t,setExtremes:Ha,setScale:bb,setCategories:Q,translate:w,redraw:D,removePlotBand:v,removePlotLine:v,reversed:yb,stacks:$a});for(Ac in Vc)jb(T,Ac,Vc[Ac]);bb()}function c(){function m(w,I,J,C){if(!r[w]){I=M.text(I,W+va-20,ga+30,a.toolbar.itemStyle,0,
+"right").on("click",C).attr({zIndex:20}).add();r[w]=I}}function i(w){ac(r[w].element);r[w]=null}var r={};return{add:m,remove:i}}function d(m){function i(aa,t){xa=ja?aa:(2*xa+aa)/3;bb=ja?t:(bb+t)/2;Ha.translate(xa,bb);Bc=Za(aa-xa)>1||Za(t-bb)>1?function(){i(aa,t)}:null}function r(){ja=true;Ha.hide()}function w(aa){var t=aa.series,v=m.borderColor||aa.color||t.color||"#606060",D,Q;Q=aa.tooltipText;D=aa.tooltipPos;I=t;t=D?D[0]:ma?va-aa.plotY:aa.plotX;aa=D?D[1]:ma?oa-aa.plotX:aa.plotY;D=Qb(t,aa);if(Q===
+false||!D)r();else{if(ja){Ha.show();ja=false}qb.attr({text:Q});Q=qb.getBBox();Fa=Q.width;wa=Q.height;Xa.attr({width:Fa+2*la,height:wa+2*la,stroke:v});v=t-Fa+W-25;t=aa-wa+ga+10;if(v<7){v=7;t-=20}if(t<5)t=5;else if(t+wa>za)t=za-wa-5;i(Z(v-ta),Z(t-ta))}}var I,J=m.borderWidth,C=m.style,la=parseInt(C.padding,10),ta=J+la,ja=true,Fa,wa,xa=0,bb=0;C.padding=0;var Ha=M.g("tooltip").attr({zIndex:8}).add(),Xa=M.rect(ta,ta,0,0,m.borderRadius,J).attr({fill:m.backgroundColor,"stroke-width":J}).add(Ha).shadow(m.shadow),
+qb=M.text("",la+ta,parseInt(C.fontSize,10)+la+ta).attr({zIndex:1}).css(C).add(Ha);return{refresh:w,hide:r}}function e(m,i){function r(t){t=t||kb.event;if(!t.target)t.target=t.srcElement;if(t.type!="mousemove"||kb.opera)Rb=gd(Qa);if(t.layerX===Ta)if(qc){t.layerX=t.x;t.layerY=t.y}else{t.layerX=t.pageX-Rb.x;t.layerY=t.pageY-Rb.y}return t}function w(t){var v={xAxis:[],yAxis:[]};p(Ra,function(D){var Q=D.translate,L=D.isXAxis,ha=ma?!L:L;v[L?"xAxis":"yAxis"].push({axis:D,value:Q(ha?t.layerX-W:oa-t.layerY+
+ga,true)})});return v}function I(t){var v=m.hoverPoint,D=m.hoverSeries;if(D&&D.tracker)(t=D.tooltipPoints[ma?t.layerY:t.layerX-W])&&t!=v&&t.onMouseOver()}function J(){var t=m.hoverSeries,v=m.hoverPoint;v&&v.onMouseOut();t&&t.onMouseOut();Cc&&Cc.hide()}function C(){if(xa){var t={xAxis:[],yAxis:[]},v=xa.getBBox(),D=v.x-W,Q=v.y-ga;if(wa){p(Ra,function(L){var ha=L.translate,V=L.isXAxis,$a=ma?!V:V,T=ha($a?D:oa-Q-v.height,true);ha=ha($a?D+v.width:oa-Q,true);t[V?"xAxis":"yAxis"].push({axis:L,min:Kb(T,ha),
+max:sb(T,ha)})});ya(m,"selection",t,Dc)}xa=xa.destroy()}m.mouseIsDown=Ec=wa=false}function la(){var t=true;Qa.onmousedown=function(v){v=r(v);v.preventDefault&&v.preventDefault();m.mouseIsDown=Ec=true;ja=v.layerX;Fa=v.layerY;if(hc&&(Ha||Xa))xa||(xa=M.rect(W,ga,qb?1:va,aa?1:oa,0).attr({fill:"rgba(69,114,167,0.25)",zIndex:7}).add())};Qa.onmousemove=function(v){v=r(v);v.returnValue=false;var D=v.layerX,Q=v.layerY,L=!Qb(D-W,Q-ga);if(Ec){wa=Math.sqrt(Math.pow(ja-D,2)+Math.pow(Fa-Q,2))>10;if(qb){v=D-ja;
+xa.attr({width:Za(v),x:(v>0?0:v)+ja})}if(aa){Q=Q-Fa;xa.attr({height:Za(Q),y:(Q>0?0:Q)+Fa})}}else L||I(v);if(L&&!t){J();C()}t=L;return false};Qa.onmouseup=function(){C()};Qa.onclick=function(v){var D=m.hoverPoint;v=r(v);v.cancelBubble=true;if(!wa)if(D&&na(v.target,"isTracker")){var Q=D.plotX,L=D.plotY;R(D,{pageX:Rb.x+W+(ma?va-L:Q),pageY:Rb.y+ga+(ma?oa-Q:L)});ya(m.hoverSeries,"click",R(v,{point:D}));D.firePointEvent("click",v)}else{R(v,w(v));Qb(v.layerX-W,v.layerY-ga)&&ya(m,"click",v)}wa=false}}function ta(){m.trackerGroup=
+Fc=M.g("tracker");ma&&Fc.attr({width:m.plotWidth,height:m.plotHeight}).invert();Fc.attr({zIndex:9}).translate(W,ga).add()}var ja,Fa,wa,xa,bb=E.zoomType,Ha=/x/.test(bb),Xa=/y/.test(bb),qb=Ha&&!ma||Xa&&ma,aa=Xa&&!ma||Ha&&ma;ta();if(i.enabled)m.tooltip=Cc=d(i);la();Wc=setInterval(function(){Bc&&Bc()},32);R(this,{zoomX:Ha,zoomY:Xa,resetTracker:J})}function f(m){var i=m.type||E.defaultSeriesType,r=cb[i],w=x.hasRendered;if(w)if(ma&&i=="column")r=cb.bar;else if(!ma&&i=="bar")r=cb.column;i=new r;i.init(x,
+m);if(!w&&i.inverted)ma=true;if(i.isCartesian)hc=i.isCartesian;sa.push(i);return i}function g(m,i){var r;i=A(i,true);ya(x,"addSeries",{options:m},function(){r=f(m);r.isDirty=true;x.isDirty=true;i&&x.redraw()});return r}function j(){E.alignTicks!==false&&p(Ra,function(m){m.adjustTickAmount()})}function h(){for(var m=x.isDirty,i,r=sa.length,w=r,I;w--;){I=sa[w];if(I.isDirty&&I.options.stacking){i=true;break}}if(i)for(w=r;w--;){I=sa[w];if(I.options.stacking)I.isDirty=true}p(sa,function(J){if(J.isDirty){J.cleanData();
+J.getSegments();if(J.options.legendType=="point")m=true}});Mb=null;if(hc){p(Ra,function(J){J.setScale()});j();p(Ra,function(J){J.isDirty&&J.redraw()})}p(sa,function(J){J.isDirty&&J.visible&&J.redraw()});if(m&&Gc.renderLegend){Gc.renderLegend();x.isDirty=false}Nb&&Nb.resetTracker&&Nb.resetTracker();ya(x,"redraw")}function l(){var m=a.loading;if(!Cb){Cb=Da(xb,{className:"highcharts-loading"},R(m.style,{left:W+Ia,top:ga+Ia,width:va+Ia,height:oa+Ia,zIndex:10,display:db}),Qa);Da("span",{innerHTML:a.lang.loading},
+m.labelStyle,Cb)}if(!Hc){Ua(Cb,{opacity:0,display:""});Sb(Cb,{opacity:m.style.opacity},{duration:m.showDuration});Hc=true}}function n(){Sb(Cb,{opacity:0},{duration:a.loading.hideDuration,complete:function(){Ua(Cb,{display:db})}});Hc=false}function u(m){var i,r,w;for(i=0;i<Ra.length;i++)if(Ra[i].options.id==m)return Ra[i];for(i=0;i<sa.length;i++)if(sa[i].options.id==m)return sa[i];for(i=0;i<sa.length;i++){w=sa[i].data;for(r=0;r<w.length;r++)if(w[r].id==m)return w[r]}return null}function y(){var m=
+a.xAxis||{},i=a.yAxis||{},r;m=nc(m);p(m,function(w,I){w.index=I;w.isX=true});i=nc(i);p(i,function(w,I){w.index=I});Ra=m.concat(i);x.xAxis=[];x.yAxis=[];Ra=Db(Ra,function(w){r=new b(x,w);x[r.isXAxis?"xAxis":"yAxis"].push(r);return r});j()}function ca(){var m=[];p(sa,function(i){m=m.concat(ic(i.data,function(r){return r.selected}))});return m}function Ba(){return ic(sa,function(m){return m.selected})}function O(){var m=a.title,i=m.align,r=a.subtitle,w=r.align,I={left:0,center:Ma/2,right:Ma};m&&m.text&&
+M.text(m.text,I[i]+m.x,m.y,m.style,0,i).attr({"class":"highcharts-title"}).add();r&&r.text&&M.text(r.text,I[w]+r.x,r.y,r.style,0,w).attr({"class":"highcharts-subtitle"}).add()}function ea(){lb=E.renderTo;Xc=Eb+Ic++;if(typeof lb=="string")lb=Ea.getElementById(lb);lb.innerHTML="";if(!lb.offsetWidth){vb=lb.cloneNode(0);Ua(vb,{position:Tb,top:"-9999px",display:""});Ea.body.appendChild(vb)}var m=(vb||lb).offsetHeight;Ma=E.width||(vb||lb).offsetWidth||600;za=E.height||(m>ga+Ab?m:0)||400;Qa=Da(xb,{className:"highcharts-container"+
+(E.className?" "+E.className:""),id:Xc},R({position:Yc,overflow:Fb,width:Ma+Ia,height:za+Ia,textAlign:"left"},E.style),vb||lb);x.renderer=M=E.renderer=="SVG"?new Ub(Qa,Ma,za):new Zc(Qa,Ma,za)}function mb(){var m,i=a.labels,r=a.credits,w=E.borderWidth||0,I=E.backgroundColor,J=E.plotBackgroundColor,C=E.plotBackgroundImage;m=2*w+(E.shadow?8:0);if(w||I)M.rect(m/2,m/2,Ma-m,za-m,E.borderRadius,w).attr({stroke:E.borderColor,"stroke-width":w,fill:I||db}).add().shadow(E.shadow);J&&M.rect(W,ga,va,oa,0).attr({fill:J}).add().shadow(E.plotShadow);
+C&&M.image(C,W,ga,va,oa).add();E.plotBorderWidth&&M.rect(W,ga,va,oa,0,E.plotBorderWidth).attr({"class":"plot-border",stroke:E.plotBorderColor,"stroke-width":E.plotBorderWidth,zIndex:4}).add();hc&&p(Ra,function(la){la.render()});O();i.items&&p(i.items,function(){var la=R(i.style,this.style),ta=parseInt(la.left,10)+W,ja=parseInt(la.top,10)+ga+12;delete la.left;delete la.top;M.text(this.html,ta,ja,la).attr({zIndex:2}).add()});p(sa,function(la){la.render()});Gc=x.legend=new md(x);if(!x.toolbar)x.toolbar=
+c(x);r.enabled&&!x.credits&&M.text(r.text,Ma-10,za-5,r.style,0,"right").on("click",function(){location.href=r.href}).attr({zIndex:8}).add();x.hasRendered=true;if(vb){lb.appendChild(Qa);ac(vb)}}function Ja(){var m=sa.length;Gb(kb,"unload",Ja);Gb(x);for(p(Ra,function(i){Gb(i)});m--;)sa[m].destroy();Qa.innerHTML="";Qa=null;clearInterval(Wc);for(m in x)delete x[m]}function jc(){y();p(sa,function(m){m.translate();m.setTooltipPoints()});x.render=mb;mb();ya(x,"load")}gc=ka(gc,ra.xAxis);zc=ka(zc,ra.yAxis);
+ra.xAxis=ra.yAxis=null;a=ka(ra,a);var E=a.chart,ua=E.margin;ua=typeof ua=="number"?[ua,ua,ua,ua]:ua;var ga=A(E.marginTop,ua[0]),vc=A(E.marginRight,ua[1]),Ab=A(E.marginBottom,ua[2]),W=A(E.marginLeft,ua[3]),lb,vb,Qa,Xc,Ma,za,x=this;ua=E.events;var Vb,Jc,Qb,Cc,Ec,Cb,Hc,oa,va,Nb,Fc,Gc,Rb,hc=E.showAxes,Ra=[],Mb,sa=[],ma,M,Bc,Wc,Dc,$c,md=function(m){function i(q,N){var F=q.legendItem,K=q.legendLine,S=q.legendSymbol,Aa=Ha.color,Pb=N?C.itemStyle.color:Aa;q=N?q.color:Aa;F&&F.attr({fill:Pb});K&&K.attr({stroke:q});
+S&&S.attr({stroke:q,fill:q})}function r(q,N,F){var K=q.legendItem,S=q.legendLine,Aa=q.legendSymbol;q=q.checkbox;K&&K.attr({x:N,y:F});S&&S.translate(N,F-4);Aa&&Aa.translate(N,F);if(q){q.x=N;q.y=F}}function w(q){for(var N=Fa.length,F=q.checkbox;N--;)if(Fa[N]==q){Fa.splice(N,1);break}p(["legendItem","legendLine","legendSymbol"],function(K){q[K]&&q[K].destroy()});F&&ac(q.checkbox)}function I(q){var N,F,K=q.legendItem;F=q.series||q;if(!K){F=/^(bar|pie|area|column)$/.test(F.type);q.legendItem=K=M.text(C.labelFormatter.call(q),
+0,0).css(xa).on("mouseover",function(){q.setState(ob);K.css(bb)}).on("mouseout",function(){K.css(q.visible?xa:Ha);q.setState()}).on("click",function(){var S="legendItemClick",Aa=function(){q.setVisible()};q.firePointEvent?q.firePointEvent(S,null,Aa):ya(q,S,null,Aa)}).attr({zIndex:2}).add(T);if(!F&&q.options&&q.options.lineWidth)q.legendLine=M.path([gb,-ta-ja,0,Na,-ja,0]).attr({"stroke-width":q.options.lineWidth,zIndex:2}).add(T);if(F)N=M.rect(-ta-ja,-11,ta,12,2).attr({"stroke-width":0,zIndex:3}).add(T);
+else if(q.options&&q.options.marker&&q.options.marker.enabled)N=M.symbol(q.symbol,-ta/2-ja,-4,q.options.marker.radius).attr(q.pointAttr[Ka]).attr({zIndex:3}).add(T);q.legendSymbol=N;i(q,q.visible);if(q.options&&q.options.showCheckbox){q.checkbox=Da("input",{type:"checkbox",checked:q.selected,defaultChecked:q.selected},C.itemCheckboxStyle,Qa);jb(q.checkbox,"click",function(S){S=S.target;ya(q,"checkboxClick",{checked:S.checked},function(){q.select()})})}}r(q,D,Q);N=K.getBBox();L=Q;q.legendItemWidth=
+N=C.itemWidth||ta+ja+N.width+qb;if(la){D+=N;ib=Wa||sb(D-v,ib);if(D-v+N>(Wa||Ma-2*Xa-v)){D=v;Q+=aa}}else{Q+=aa;ib=Wa||sb(N,ib)}Fa.push(q)}function J(){D=v;Q=t;L=ib=0;T||(T=M.g("legend").attr({zIndex:7}).add());zb&&fb.reverse();p(fb,function(S){if(S.options.showInLegend){S=S.options.legendType=="point"?S.data:[S];p(S,I)}});zb&&fb.reverse();nb=Wa||ib;La=L-t+aa;if(V||$a){nb+=2*Xa;La+=2*Xa;if(ha)ha.attr({height:La,width:nb});else ha=M.rect(0,0,nb,La,C.borderRadius,V||0).attr({stroke:C.borderColor,"stroke-width":V||
+0,fill:$a||db}).add(T).shadow(C.shadow)}for(var q=["left","right","top","bottom"],N,F=4;F--;){N=q[F];if(wa[N]&&wa[N]!="auto"){C[F<2?"align":"verticalAlign"]=N;C[F<2?"x":"y"]=parseInt(wa[N],10)*(F%2?-1:1)}}var K=Jc(R({width:nb,height:La},C));T.translate(K.x,K.y);p(Fa,function(S){var Aa=S.checkbox;Aa&&Ua(Aa,{left:K.x+S.legendItemWidth+Aa.x-40+Ia,top:K.y+Aa.y-11+Ia})})}var C=m.options.legend;if(C.enabled){var la=C.layout=="horizontal",ta=C.symbolWidth,ja=C.symbolPadding,Fa=[],wa=C.style,xa=C.itemStyle,
+bb=C.itemHoverStyle,Ha=C.itemHiddenStyle,Xa=parseInt(wa.padding,10),qb=20,aa=C.lineHeight||16,t=18,v=4+Xa+ta+ja,D,Q,L,ha,V=C.borderWidth,$a=C.backgroundColor,T,ib,Wa=C.width,nb,La,fb=m.series,zb=C.reversed;J();return{colorizeItem:i,destroyItem:w,renderLegend:J}}};Qb=function(m,i){var r=0,w=0;return m>=r&&m<=r+va&&i>=w&&i<=w+oa};$c=function(){ya(x,"selection",{resetSelection:true},Dc);x.toolbar.remove("zoom")};Dc=function(m){var i=ra.lang;x.toolbar.add("zoom",i.resetZoom,i.resetZoomTitle,$c);!m||m.resetSelection?
+p(Ra,function(r){r.setExtremes(null,null,false)}):p(m.xAxis.concat(m.yAxis),function(r){var w=r.axis;if(x.tracker[w.isXAxis?"zoomX":"zoomY"])w.setExtremes(r.min,r.max,false)});h()};Jc=function(m){var i=m.align,r=m.verticalAlign,w=m.x||0,I=m.y||0,J={x:w||0,y:I||0};if(/^(right|center)$/.test(i))J.x=(Ma-m.width)/{right:1,center:2}[i]+w;if(/^(bottom|middle)$/.test(r))J.y=(za-m.height)/{bottom:1,middle:2}[r]+I;return J};ea();kc=rb=0;jb(kb,"unload",Ja);if(ua)for(Vb in ua)jb(x,Vb,ua[Vb]);x.options=a;x.series=
+sa;x.container=Qa;x.chartWidth=Ma;x.chartHeight=za;x.plotWidth=va=Ma-W-vc;x.plotHeight=oa=za-ga-Ab;x.plotLeft=W;x.plotTop=ga;x.addSeries=g;x.destroy=Ja;x.get=u;x.getAlignment=Jc;x.getSelectedPoints=ca;x.getSelectedSeries=Ba;x.hideLoading=n;x.isInsidePlot=Qb;x.redraw=h;x.showLoading=l;p(a.series||[],function(m){f(m)});x.inverted=ma=A(ma,a.chart.inverted);x.plotSizeX=Vb=ma?oa:va;x.plotSizeY=Vb=ma?va:oa;x.tracker=Nb=new e(x,a.tooltip);jc()}function ad(a){var b=[],c=[],d;for(d=0;d<a.length;d++){b[d]=
+a[d].plotX;c[d]=a[d].plotY}this.xdata=b;this.ydata=c;a=[];this.y2=[];var e=c.length;this.n=e;this.y2[0]=0;this.y2[e-1]=0;a[0]=0;for(d=1;d<e-1;d++){var f=b[d+1]-b[d-1];f=(b[d]-b[d-1])/f;var g=f*this.y2[d-1]+2;this.y2[d]=(f-1)/g;a[d]=(c[d+1]-c[d])/(b[d+1]-b[d])-(c[d]-c[d-1])/(b[d]-b[d-1]);a[d]=(6*a[d]/(b[d+1]-b[d-1])-f*a[d-1])/g}for(b=e-2;b>=0;b--)this.y2[b]=this.y2[b]*this.y2[b+1]+a[b]}var Ea=document,kb=window,Ga=Math,Z=Ga.round,hb=Ga.floor,sb=Ga.max,Kb=Ga.min,Za=Ga.abs,Hb=Ga.cos,Ib=Ga.sin,pa=navigator.userAgent,
+qc=/msie/i.test(pa)&&!kb.opera,nd=/AppleWebKit/.test(pa),bd=kb.SVGAngle||Ea.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),rb,kc,od={},Ic=0,ab=1,bc,ra,fc,Ta,xb="div",Tb="absolute",Yc="relative",Fb="hidden",Eb="highcharts-",Wb="visible",Ia="px",db="none",gb="M",Na="L",cd="rgba(192,192,192,0.005)",Ka="",ob="hover",wb="select",Yb,rc,sc,tc,Ob,Zb,$b,Mc,Nc,uc,Oc,Pc,Ca=kb.HighchartsAdapter,qa=Ca||{},p=qa.each,ic=qa.grep,Db=qa.map,ka=qa.merge,pc=qa.hyphenate,jb=qa.addEvent,
+Gb=qa.removeEvent,ya=qa.fireEvent,Sb=qa.animate,lc=qa.stop;qa=qa.getAjax;var cb={};if(!Ca&&kb.jQuery){var Ya=jQuery;p=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===false)return c};ic=Ya.grep;Db=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};ka=function(){var a=arguments;return Ya.extend(true,null,a[0],a[1],a[2],a[3])};pc=function(a){return a.replace(/([A-Z])/g,function(b,c){return"-"+c.toLowerCase()})};jb=function(a,b,c){Ya(a).bind(b,
+c)};Gb=function(a,b,c){try{Ya(a).unbind(b,c)}catch(d){}};ya=function(a,b,c,d){var e=Ya.Event(b),f="detached"+b;R(e,c);if(a[b]){a[f]=a[b];a[b]=null}Ya(a).trigger(e);if(a[f]){a[b]=a[f];a[f]=null}d&&!e.isDefaultPrevented()&&d(e)};Sb=function(a,b,c){a=Ya(a);a.stop();a.animate(b,c)};lc=function(a){Ya(a).stop()};qa=function(a,b){Ya.get(a,null,b)};Ya.extend(Ya.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var pd=jQuery.fx.step._default,qd=jQuery.fx.prototype.cur;Ya.fx.step._default=
+function(a){var b=a.elem;b.attr?b.attr(a.prop,a.now):pd.apply(this,arguments)};Ya.fx.prototype.cur=function(){var a=this.elem;return a=a.attr?a.attr(this.prop):qd.apply(this,arguments)}}else if(!Ca&&kb.MooTools){p=$each;Db=function(a,b){return a.map(b)};ic=function(a,b){return a.filter(b)};ka=$merge;pc=function(a){return a.hyphenate()};jb=function(a,b,c){if(typeof b=="string"){if(b=="unload")b="beforeunload";if(!a.addEvent)if(a.nodeName)a=$(a);else R(a,new Events);a.addEvent(b,c)}};Gb=function(a,
+b,c){if(b){if(b=="unload")b="beforeunload";a.removeEvent(b,c)}};ya=function(a,b,c,d){b=new Event({type:b,target:a});b=R(b,c);b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)};Sb=function(a,b,c){var d=a.attr;if(d&&!a.setStyle){a.setStyle=a.getStyle=a.attr;a.$family=a.uid=true}lc(a);c=new Fx.Morph(d?a:$(a),R(c,{transition:Fx.Transitions.Quad.easeInOut}));c.start(b);a.fx=c};lc=function(a){a.fx&&a.fx.cancel()};qa=function(a,b){(new Request({url:a,method:"get",onSuccess:b})).send()}}Ca=
+{enabled:true,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px"}};ra={colors:["#4572A7","#AA4643","#89A54E","#80699B","#3D96AE","#DB843D","#92A8CD","#A47D7C","#B5CA92"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",resetZoom:"Reset zoom",
+resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:true},chart:{margin:[50,50,90,80],borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:true,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0"},title:{text:"Chart title",x:0,y:20,align:"center",style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",x:0,y:40,align:"center",style:{color:"#6D869F"}},
+plotOptions:{line:{allowPointSelect:false,showCheckbox:false,animation:true,events:{},lineWidth:2,shadow:true,marker:{enabled:true,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:ka(Ca,{enabled:false,y:-6,formatter:function(){return this.y}}),showInLegend:true,states:{hover:{lineWidth:3,marker:{}},select:{marker:{}}},stickyTracking:true}},labels:{style:{position:Tb,color:"#3E576F"}},legend:{enabled:true,
+align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:false,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"},itemCheckboxStyle:{position:Tb,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:15,y:-15},loading:{hideDuration:100,labelStyle:{fontWeight:"bold",position:Yc,top:"1em"},showDuration:100,style:{position:Tb,
+backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:true,formatter:function(){var a=this,b=a.series,c=b.xAxis,d=a.x;return"<b>"+(a.point.name||b.name)+"</b><br/>"+(U(d)?"X value: "+(c&&c.options.type=="datetime"?fc(null,d):d)+"<br/>":"")+"Y value: "+a.y},backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,shadow:true,snap:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},toolbar:{itemStyle:{color:"#4572A7",cursor:"pointer"}},credits:{enabled:true,
+text:"Highcharts.com",href:"http://www.highcharts.com",style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var gc={dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:false,gridLineColor:"#C0C0C0",labels:Ca,lineColor:"#C0D0E0",lineWidth:1,max:null,min:null,minPadding:0.01,maxPadding:0.01,maxZoom:null,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",
+minorTickWidth:1,showFirstLabel:true,showLastLabel:false,startOfWeek:1,startOnTick:false,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",margin:35,style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},zc=ka(gc,{endOnTick:true,gridLineWidth:1,tickPixelInterval:72,showLastLabel:true,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:true,tickWidth:0,title:{margin:40,rotation:270,
+text:"Y-values"}}),ld={labels:{align:"right",x:-8,y:3},title:{rotation:270}},kd={labels:{align:"left",x:8,y:3},title:{rotation:90}},Uc={labels:{align:"center",x:0,y:14},title:{rotation:0}},jd=ka(Uc,{labels:{y:-5}});Ca=ra.plotOptions;qa=Ca.line;Ca.spline=ka(qa);Ca.scatter=ka(qa,{lineWidth:0,states:{hover:{lineWidth:0}}});Ca.area=ka(qa,{});Ca.areaspline=ka(Ca.area);Ca.column=ka(qa,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,states:{hover:{brightness:0.1,
+shadow:false},select:{color:"#C0C0C0",borderColor:"#000000",shadow:false}}});Ca.bar=ka(Ca.column,{dataLabels:{align:"left",x:5,y:0}});Ca.pie=ka(qa,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:true,legendType:"point",marker:null,size:"90%",slicedOffset:10,states:{hover:{brightness:0.1,shadow:false}}});Lc();var Jb=function(a){function b(j){if(g=/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(j))f=[parseInt(g[1],10),parseInt(g[2],
+10),parseInt(g[3],10),parseFloat(g[4],10)];else if(g=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(j))f=[parseInt(g[1],16),parseInt(g[2],16),parseInt(g[3],16),1]}function c(j){return j=f&&!isNaN(f[0])?j=="rgb"?"rgb("+f[0]+","+f[1]+","+f[2]+")":j=="a"?f[3]:"rgba("+f.join(",")+")":a}function d(j){if(typeof j=="number"&&j!==0)for(var h=0;h<3;h++){f[h]+=parseInt(j*255,10);if(f[h]<0)f[h]=0;if(f[h]>255)f[h]=255}return this}function e(j){f[3]=j;return this}var f=[],g;b(a);return{get:c,brighten:d,
+setOpacity:e}};fc=function(a,b,c){function d(y){return y.toString().replace(/^([0-9])$/,"0$1")}if(!U(b)||isNaN(b))return"Invalid date";a=A(a,"%Y-%m-%d %H:%M:%S");b=new Date(b*ab);var e=b[sc](),f=b[tc](),g=b[Ob](),j=b[Zb](),h=b[$b](),l=ra.lang,n=l.weekdays;l=l.months;b={a:n[f].substr(0,3),A:n[f],d:d(g),e:g,b:l[j].substr(0,3),B:l[j],m:d(j+1),y:h.toString().substr(2,2),Y:h,H:d(e),I:d(e%12||12),l:e%12||12,M:d(b[rc]()),p:e<12?"AM":"PM",P:e<12?"am":"pm",S:d(b.getSeconds())};for(var u in b)a=a.replace("%"+
+u,b[u]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};cc.prototype={init:function(a,b){this.element=Ea.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a},animate:function(a,b){Sb(this,a,b)},attr:function(a,b){var c,d,e,f=this.element,g=f.nodeName,j=this.renderer,h,l=this.shadows,n,u=this;if(typeof a=="string"&&U(b)){c=a;a={};a[c]=b}if(typeof a=="string"){c=a;if(g=="circle")c={x:"cx",y:"cy"}[c]||c;else if(c=="strokeWidth")c="stroke-width";u=parseFloat(na(f,c)||this[c]||0)}else for(c in a){b=
+a[c];if(c=="d"){if(typeof b!="string")b=b.join(" ")}else if(c=="x"&&g=="text")for(d=0;d<f.childNodes.length;d++){e=f.childNodes[d];na(e,"x")==na(f,"x")&&na(e,"x",b)}else if(c=="fill")b=j.color(b,f,c);else if(g=="circle")c={x:"cx",y:"cy"}[c]||c;else if(c=="translateX"||c=="translateY"){this[c]=b;this.updateTransform();h=true}else if(c=="stroke")b=j.color(b,f,c);else if(c=="isTracker")this[c]=b;if(c=="strokeWidth")c="stroke-width";if(nd&&c=="stroke-width"&&b===0)b=1.0E-6;if(this.symbolName&&/^(x|y|r|start|end|innerR)/.test(c)){if(!n){this.symbolAttr(a);
+n=true}h=true}if(l&&/^(width|height|visibility|x|y|d)$/.test(c))for(d=l.length;d--;)na(l[d],c,b);if(c=="text")j.buildText(f,b);else h||na(f,c,b)}return u},symbolAttr:function(a){var b=this;b.x=A(a.x,b.x);b.y=A(a.y,b.y);b.r=A(a.r,b.r);b.start=A(a.start,b.start);b.end=A(a.end,b.end);b.width=A(a.width,b.width);b.height=A(a.height,b.height);b.innerR=A(a.innerR,b.innerR);b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.r,{start:b.start,end:b.end,width:b.width,height:b.height,innerR:b.innerR})})},clip:function(a){return this.attr("clip-path",
+"url("+this.renderer.url+"#"+a.id+")")},css:function(a){var b=this;if(a&&a.color)a.fill=a.color;a=R(b.styles,a);b.attr({style:oc(a)});b.styles=a;return b},on:function(a,b){this.element["on"+a]=b;return this},translate:function(a,b){var c=this;c.translateX=a;c.translateY=b;c.updateTransform();return c},invert:function(){var a=this;a.inverted=true;a.updateTransform();return a},updateTransform:function(){var a=this,b=a.translateX||0,c=a.translateY||0,d=a.inverted,e=[];if(d){b+=a.attr("width");c+=a.attr("height")}if(b||
+c)e.push("translate("+b+","+c+")");d&&e.push("rotate(90) scale(-1,1)");e.length&&na(a.element,"transform",e.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},getBBox:function(){return this.element.getBBox()},show:function(){return this.attr({visibility:Wb})},hide:function(){return this.attr({visibility:Fb})},add:function(a){var b=a?a.element:this.renderer.box,c=b.childNodes,d=this.element,e=na(d,"zIndex"),f,g;this.parentInverted=a&&a.inverted;for(g=0;g<c.length;g++){a=
+c[g];f=na(a,"zIndex");if(a!=d&&(f>e||!U(e)&&U(f))){b.insertBefore(d,a);return this}}b.appendChild(d);return this},destroy:function(){var a=this,b=a.element,c=a.shadows,d=b.parentNode,e;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=null;lc(a);d&&d.removeChild(b);c&&p(c,function(f){(d=f.parentNode)&&d.removeChild(f)});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])},shadow:function(a){var b=[],c,d=this.element,e=this.parentInverted?
+"(-1,-1)":"(1,1)";if(a){for(a=1;a<=3;a++){c=d.cloneNode(0);na(c,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*a,"stroke-width":7-2*a,transform:"translate"+e,fill:db});d.parentNode.insertBefore(c,d);b.push(c)}this.shadows=b}return this}};var Ub=function(){this.init.apply(this,arguments)};Ub.prototype={init:function(a,b,c){var d=Ea.createElementNS("http://www.w3.org/2000/svg","svg"),e=location;na(d,{width:b,height:c,xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(d);
+this.Element=cc;this.box=d;this.url=e.href.replace(e.hash,"");this.defs=this.createElement("defs").add()},createElement:function(a){var b=new this.Element;b.init(this,a);return b},buildText:function(a,b){b=b.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,"</span>").split("<br/>");var c=a.childNodes,d=/style="([ 0-9a-z:;\-]+)"/,e=/href="([^"]+)"/,f=na(a,"x"),g;for(g=
+c.length-1;g>=0;g--)a.removeChild(c[g]);p(b,function(j,h){var l=0;j=j.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");j=j.split("|||");p(j,function(n){if(n!==""){var u={},y=Ea.createElementNS("http://www.w3.org/2000/svg","tspan");d.test(n)&&na(y,"style",n.match(d)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));if(e.test(n)){na(y,"onclick",'location.href="'+n.match(e)[1]+'"');Ua(y,{cursor:"pointer"})}n=n.replace(/<(.|\n)*?>/g,"");y.appendChild(Ea.createTextNode(n));if(l)u.dx=3;else u.x=
+f;if(h&&!l)u.dy=16;na(y,u);a.appendChild(y);l++}})})},crispLine:function(a,b){if(a[1]==a[4])a[1]=a[4]=Z(a[1])+b%2/2;if(a[2]==a[5])a[2]=a[5]=Z(a[2])+b%2/2;return a},path:function(a){return this.createElement("path").attr({d:a,fill:db})},circle:function(a,b,c){a=typeof a=="object"?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(typeof a=="object"){b=a.y;c=a.r;d=a.innerR;e=a.start;f=a.end;a=a.x}return this.symbol("arc",a||0,b||0,c||0,{innerR:d||0,start:e||0,
+end:f||0})},rect:function(a,b,c,d,e,f){if(arguments.length>1){var g=(f||0)%2/2;a=Z(a||0)+g;b=Z(b||0)+g;c=Z((c||0)-2*g);d=Z((d||0)-2*g)}g=typeof a=="object"?a:{x:a,y:b,width:sb(c,0),height:sb(d,0)};return this.createElement("rect").attr(R(g,{rx:e||g.r,ry:e||g.r,fill:db}))},g:function(a){return this.createElement("g").attr(U(a)&&{"class":Eb+a})},image:function(a,b,c,d,e){b=this.createElement("image").attr({x:b,y:c,width:d,height:e,preserveAspectRatio:db});b.element.setAttributeNS("http://www.w3.org/1999/xlink",
+"href",a);return b},symbol:function(a,b,c,d,e){var f,g=this.symbols[a];g=g&&g(b,c,d,e);var j=/^url\((.*?)\)$/;if(g){f=this.path(g);R(f,{symbolName:a,x:b,y:c,r:d});e&&R(f,e)}else if(j.test(a)){a=a.match(j)[1];f=this.image(a).attr({visibility:Fb});Da("img",{onload:function(){var h=this;h=od[h.src]||[h.width,h.height];f.attr({x:Z(b-h[0]/2)+Ia,y:Z(c-h[1]/2)+Ia,width:h[0],height:h[1],visibility:"inherit"})},src:a})}else f=this.circle(b,c,d);return f},symbols:{square:function(a,b,c){c=0.707*c;return[gb,
+a-c,b-c,Na,a+c,b-c,a+c,b+c,a-c,b+c,"Z"]},triangle:function(a,b,c){return[gb,a,b-1.33*c,Na,a+c,b+0.67*c,a-c,b+0.67*c,"Z"]},"triangle-down":function(a,b,c){return[gb,a,b+1.33*c,Na,a-c,b-0.67*c,a+c,b-0.67*c,"Z"]},diamond:function(a,b,c){return[gb,a,b-c,Na,a+c,b,a,b+c,a-c,b,"Z"]},arc:function(a,b,c,d){var e=Math.PI,f=d.start,g=d.end-1.0E-6,j=d.innerR,h=Hb(f),l=Ib(f),n=Hb(g);g=Ib(g);d=d.end-f<e?0:1;return[gb,a+c*h,b+c*l,"A",c,c,0,d,1,a+c*n,b+c*g,Na,a+j*n,b+j*g,"A",j,j,0,d,0,a+j*h,b+j*l,"Z"]}},clipRect:function(a,
+b,c,d){var e=Eb+Ic++,f=this.createElement("clipPath").attr({id:e}).add(this.defs);a=this.rect(a,b,c,d,0).add(f);a.id=e;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this;b="linearGradient";c=a[b];var g=Eb+Ic++,j,h,l;j=f.createElement(b).attr({id:g,gradientUnits:"userSpaceOnUse",x1:c[0],y1:c[1],x2:c[2],y2:c[3]}).add(f.defs);p(a.stops,function(n){if(e.test(n[1])){d=Jb(n[1]);h=d.get("rgb");l=d.get("a")}else{h=n[1];l=1}f.createElement("stop").attr({offset:n[0],"stop-color":h,
+"stop-opacity":l}).add(j)});return"url("+this.url+"#"+g+")"}else if(e.test(a)){d=Jb(a);na(b,c+"-opacity",d.get("a"));return d.get("rgb")}else return a},text:function(a,b,c,d,e,f){d=d||{};f=f||"left";e=e||0;var g=d.color||"#000000",j=ra.chart.style;b=Z(A(b,0));c=Z(A(c,0));R(d,{fontFamily:d.fontFamily||j.fontFamily,fontSize:d.fontSize||j.fontSize});d=oc(d);a={x:b,y:c,text:a,fill:g,style:d.replace(/"/g,"'")};if(e||f!="left")a=R(a,{"text-anchor":{left:"start",center:"middle",right:"end"}[f],transform:"rotate("+
+e+" "+b+" "+c+")"});return this.createElement("text").attr(a)}};var Kc;if(!bd){var rd=eb(cc,{init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",Tb,";"];if(b=="shape"||b==xb)d.push("left:0;top:0;width:10px;height:10px;");c.push(' style="',d.join(""),'"/>');if(b){c=b==xb||b=="span"||b=="img"?c.join(""):a.prepVML(c);this.element=Da(c)}this.renderer=a},add:function(a){var b=this,c=b.renderer,d=b.element,e=c.box;c=a&&a.inverted;a=a?a.element||a:e;if(c){c=a.style;Ua(d,{flip:"x",
+left:parseInt(c.width,10)-10,top:parseInt(c.height,10)-10,rotation:-90})}a.appendChild(d);return b},attr:function(a,b){var c,d,e,f=this.element,g=f.style,j=f.nodeName,h=this.renderer,l=this.symbolName,n,u=this.shadows,y,ca=this;if(typeof a=="string"&&U(b)){c=a;a={};a[c]=b}if(typeof a=="string"){c=a;ca=c=="strokeWidth"||c=="stroke-width"?f.strokeweight:A(this[c],parseInt(g[{x:"left",y:"top"}[c]||c],10))}else for(c in a){d=a[c];y=false;if(l&&/^(x|y|r|start|end|width|height|innerR)/.test(c)){if(!n){this.symbolAttr(a);
+n=true}y=true}else if(c=="d"){e=d.length;for(y=[];e--;)y[e]=typeof d[e]=="number"?Z(d[e]*10)-5:d[e]=="Z"?"x":d[e];d=y.join(" ")||"x";f.path=d;if(u)for(e=u.length;e--;)u[e].path=d;y=true}else if(c=="zIndex"||c=="visibility"){g[c]=d;y=true}else if(/^(width|height)$/.test(c)){g[c]=d;this.updateClipping&&this.updateClipping();y=true}else if(/^(x|y)$/.test(c)){if(c=="y"&&f.tagName=="SPAN"&&f.lineHeight)d-=f.lineHeight;g[{x:"left",y:"top"}[c]]=d}else if(c=="class")f.className=d;else if(c=="stroke"){d=h.color(d,
+f,c);c="strokecolor"}else if(c=="stroke-width"||c=="strokeWidth"){f.stroked=d?true:false;c="strokeweight";if(typeof d=="number")d+=Ia}else if(c=="fill")if(j=="SPAN")g.color=d;else{f.filled=d!=db?true:false;d=h.color(d,f,c);c="fillcolor"}else if(c=="translateX"||c=="translateY"){this[c]=b;this.updateTransform();y=true}if(u&&c=="visibility")for(e=u.length;e--;)u[e].style[c]=d;if(c=="text")f.innerHTML=d;else if(!y)if(Ea.documentMode==8)f[c]=d;else na(f,c,d)}return ca},clip:function(a){var b=this,c=a.members,
+d=c.length;c.push(b);b.destroyClip=function(){c.splice(d,1)};return b.css({clip:a.getCSS(b.inverted)})},css:function(a){var b=this;Ua(b.element,a);return b},destroy:function(){var a=this;a.destroyClip&&a.destroyClip();cc.prototype.destroy.apply(this)},empty:function(){var a=this.element;a=a.childNodes;for(var b=a.length,c;b--;){c=a[b];c.parentNode.removeChild(c)}},getBBox:function(){var a=this.element,b,c=a.offsetWidth,d=a.parentNode;c||Ea.body.appendChild(a);b={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,
+height:a.offsetHeight};c||(d?d.appendChild(a):Ea.body.removeChild(a));return b},on:function(a,b){this.element["on"+a]=function(){var c=kb.event;c.target=c.srcElement;b(c)};return this},updateTransform:function(){var a=this,b=a.translateX||0,c=a.translateY||0;if(b||c)a.css({left:b,top:c})},shadow:function(a){var b=[],c=this.element,d=this.renderer,e,f=c.style,g;if(a&&typeof c.path=="string"){for(a=1;a<=3;a++){g=['<shape isShadow="true" strokeweight="',7-2*a,'" filled="false" path="',c.path,'" coordsize="100,100" style="',
+c.style.cssText,'" />'];e=Da(d.prepVML(g),null,{left:parseInt(f.left,10)+1,top:parseInt(f.top,10)+1});g=['<stroke color="black" opacity="',0.05*a,'"/>'];Da(d.prepVML(g),null,null,e);c.parentNode.insertBefore(e,c);b.push(e)}this.shadows=b}return this}});Kc=function(){this.init.apply(this,arguments)};Kc.prototype=ka(Ub.prototype,{isIE8:pa.indexOf("MSIE 8.0")>-1,init:function(a,b,c){this.box=Da(xb,null,{width:b+Ia,height:c+Ia},a);this.Element=rd;if(!Ea.namespaces.hcv){Ea.namespaces.add("hcv","urn:schemas-microsoft-com:vml");
+Ea.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:textpath, hcv\\:shape, hcv\\:stroke, hcv\\:line { behavior:url(#default#VML); display: inline-block; } "}},clipRect:function(a,b,c,d){var e=this.createElement();return R(e,{members:[],element:{style:{left:a,top:b,width:c,height:d}},getCSS:function(f){var g=e.element.style,j=g.top,h=g.left,l=h+g.width;g=j+g.height;return"rect("+(f?h:j)+"px,"+(f?g:l)+"px,"+(f?l:g)+"px,"+(f?j:h)+"px)"},updateClipping:function(){p(e.members,function(f){f.css({clip:e.getCSS(f.inverted)})})}})},
+color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g;c=a.linearGradient;var j,h,l,n;p(a.stops,function(u,y){if(e.test(u[1])){d=Jb(u[1]);f=d.get("rgb");g=d.get("a")}else{f=u[1];g=1}if(y){l=f;n=g}else{j=f;h=g}});a=90-Ga.atan((c[3]-c[1])/(c[2]-c[0]))*180/Ga.PI;a=['<fill colors="0% ',j,",100% ",l,'" angle="',a,'" opacity="',n,'" o:opacity2="',h,'" type="gradient" focus="100%" />'];Da(this.prepVML(a),null,null,b)}else if(e.test(a)){d=Jb(a);a=["<",c,' opacity="',d.get("a"),'"/>'];Da(this.prepVML(a),
+null,null,b);return d.get("rgb")}else return a},prepVML:function(a){var b="display:inline-block;behavior:url(#default#VML);",c=this.isIE8;a=a.join("");if(c){a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />');a=a.indexOf('style="')==-1?a.replace("/>",' style="'+b+'" />'):a.replace('style="','style="'+b)}else a=a.replace("<","<hcv:");return a},text:function(a,b,c,d,e,f){d=d||{};f=f||"left";e=e||0;var g=Z(parseInt(d.fontSize||12,10)*1.2),j=ra.chart.style;b=Z(b);c=Z(c);R(d,{color:d.color||
+"#000000",whiteSpace:"nowrap",fontFamily:d.fontFamily||j.fontFamily,fontSize:d.fontSize||j.fontSize});if(e){j=(e||0)*Ga.PI*2/360;e=Hb(j);j=Ib(j);var h=10;g=g*0.3;var l=f=="left",n=f=="right",u=l?b:b-h*e;b=n?b:b+h*e;l=l?c:c-h*j;c=n?c:c+h*j;u+=g*j;b+=g*j;l-=g*e;c-=g*e;if(Za(u-b)<0.1)u+=0.1;if(Za(l-c)<0.1)l+=0.1;c=this.createElement("line").attr({from:u+", "+l,to:b+", "+c});e=c.element;Da("hcv:fill",{on:true,color:d.color},null,e);Da("hcv:path",{textpathok:true},null,e);Da('<hcv:textpath style="v-text-align:'+
+f+";"+oc(d).replace(/"/g,"'")+'" on="true" string="'+a+'">',null,null,e)}else{c=this.createElement("span").attr({x:b,y:c-g,text:a});e=c.element;e.lineHeight=g;Ua(e,d);if(f!="left"){a=c.getBBox().width;Ua(e,{left:b-a/{right:1,center:2}[f]+Ia})}}return c},path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,c){return this.path(this.symbols.circle(a,b,c))},g:function(a){var b;if(a)b={className:Eb+a,"class":Eb+a};return a=this.createElement(xb).attr(b)},
+image:function(a,b,c,d,e){return this.createElement("img").attr({src:a}).css({left:b,top:c,width:d,height:e})},rect:function(a,b,c,d,e,f){if(arguments.length>1){var g=(f||0)%2/2;a=Z(a||0)+g;b=Z(b||0)+g;c=Z((c||0)-2*g);d=Z((d||0)-2*g)}if(typeof a=="object"){b=a.y;c=a.width;d=a.height;e=a.r;a=a.x}return this.symbol("rect",a||0,b||0,e||0,{width:c||0,height:d||0})},symbol:function(a,b,c){var d;d=/^url\((.*?)\)$/;return d=d.test(a)?this.createElement("img").attr({onload:function(){var e=this,f=[e.width,
+e.height];Ua(e,{left:Z(b-f[0]/2),top:Z(c-f[1]/2)})},src:a.match(d)[1]}):Ub.prototype.symbol.apply(this,arguments)},symbols:{arc:function(a,b,c,d){var e=d.start,f=d.end,g=f-e==2*Math.PI?f-0.0010:f,j=Hb(e),h=Ib(e),l=Hb(g);g=Ib(g);d=d.innerR;if(f-e===0)return["x"];return["wa",a-c,b-c,a+c,b+c,a+c*j,b+c*h,a+c*l,b+c*g,"at",a-d,b-d,a+d,b+d,a+d*l,b+d*g,a+d*j,b+d*h,"x","e"]},circle:function(a,b,c){return["wa",a-c,b-c,a+c,b+c,a+c,b,a+c,b,"e"]},rect:function(a,b,c,d){var e=d.width;d=d.height;var f=a+e,g=b+d;
+c=Kb(c,e,d);return[gb,a+c,b,Na,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,Na,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,Na,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,Na,a,b+c,"wa",a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}})}var Zc=bd?Ub:Kc,Xb=function(){};Xb.prototype={init:function(a,b){var c=this;c.series=a;c.applyOptions(b);c.pointAttr={};if(a.options.colorByPoint){a=ra.colors;if(!c.options)c.options={};c.color=c.options.color=c.color||a[rb++];if(rb>=a.length)rb=0}return c},applyOptions:function(a){var b=this,
+c=b.series;if(typeof a=="number"||a===null)b.y=a;else if(typeof a=="object"&&typeof a.length!="number"){R(b,a);b.options=a}else if(typeof a[0]=="string"){b.name=a[0];b.y=a[1]}else if(typeof a[0]=="number"){b.x=a[0];b.y=a[1]}if(b.x===Ta)b.x=c.autoIncrement()},destroy:function(){var a=this,b;a==a.series.chart.hoverPoint&&a.onMouseOut();Gb(a);p(["graphic","tracker","group"],function(c){a[c]&&a[c].destroy()});a.legendItem&&a.series.chart.legend.destroyItem(a);for(b in a)a[b]=null},select:function(a,b){var c=
+this,d=c.series;d=d.chart;c.selected=a=A(a,!c.selected);c.firePointEvent(a?"select":"unselect");c.setState(wb);b||p(d.getSelectedPoints(),function(e){if(e.selected&&e!=c){e.selected=false;e.setState(Ka);e.firePointEvent("unselect")}})},onMouseOver:function(){var a=this,b=a.series.chart,c=b.tooltip,d=b.hoverPoint;d&&d!=a&&d.onMouseOut();a.firePointEvent("mouseOver");c&&c.refresh(a);a.setState(ob);b.hoverPoint=a},onMouseOut:function(){var a=this;a.firePointEvent("mouseOut");a.setState(Ka);a.series.chart.hoverPoint=
+null},update:function(a,b){var c=this,d=c.series;b=A(b,true);c.firePointEvent("update",{options:a},function(){c.applyOptions(a);d.isDirty=true;b&&d.chart.redraw()})},remove:function(a){var b=this,c=b.series,d=c.chart,e=c.data,f=e.length;a=A(a,true);b.firePointEvent("remove",null,function(){for(;f--;)if(e[f]==b){e.splice(f,1);break}b.destroy();c.isDirty=true;a&&d.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series;e=e.options;if(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])this.importEvents();
+if(a=="click"&&e.allowPointSelect)c=function(f){d.select(null,f.ctrlKey||f.metaKey||f.shiftKey)};ya(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=this,b=ka(a.series.options.point,a.options);b=b.events;var c;a.events=b;for(c in b)jb(a,c,b[c]);this.hasImportedEvents=true}},setState:function(a){var b=this,c=b.series,d=c.options.states,e=c.options.marker,f=e&&!e.enabled,g=(e=e&&e.states[a])&&e.enabled===false,j=c.chart,h=b.pointAttr;a||(a=Ka);if(!(b.selected&&a!=wb||d[a]&&d[a].enabled===
+false||a&&(g||f&&!e.enabled)))if(a&&!b.graphic){if(!c.stateMarkerGraphic)c.stateMarkerGraphic=j.renderer.circle(0,0,h[a].r).attr(h[a]).add(c.group);c.stateMarkerGraphic.translate(b.plotX,b.plotY)}else b.graphic&&b.graphic.attr(h[a])},setTooltipText:function(){var a=this;a.tooltipText=a.series.chart.options.tooltip.formatter.call({series:a.series,point:a,x:a.category,y:a.y,percentage:a.percentage,total:a.total||a.stackTotal})}};var Sa=function(){};Sa.prototype={isCartesian:true,type:"line",pointClass:Xb,
+pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c=this,d,e=a.series.length;c.chart=a;b=c.setOptions(b);R(c,{index:e,options:b,name:b.name||"Series "+(e+1),state:Ka,pointAttr:{},visible:b.visible!==false,selected:b.selected===true});a=b.events;for(d in a)jb(c,d,a[d]);c.getColor();c.getSymbol();c.setData(b.data,false)},autoIncrement:function(){var a=this,b=a.options,c=a.xIncrement;c=A(c,b.pointStart,0);a.pointInterval=A(a.pointInterval,
+b.pointInterval,1);a.xIncrement=c+a.pointInterval;return c},cleanData:function(){var a=this;a=a.data;var b;a.sort(function(c,d){return c.x-d.x});for(b=a.length-1;b>=0;b--)a[b-1]&&a[b-1].x==a[b].x&&a.splice(b-1,1)},getSegments:function(){var a=-1,b=[],c=this.data;p(c,function(d,e){if(d.y===null){e>a+1&&b.push(c.slice(a+1,e));a=e}else e==c.length-1&&b.push(c.slice(a+1,e+1))});this.segments=b},setOptions:function(a){var b=this.chart.options.plotOptions;return a=ka(b[this.type],b.series,a)},getColor:function(){var a=
+this.chart.options.colors;this.color=this.options.color||a[rb++]||"#0000ff";if(rb>=a.length)rb=0},getSymbol:function(){var a=this.chart.options.symbols,b=this.options.marker.symbol||a[kc++];this.symbol=b;if(kc>=a.length)kc=0},addPoint:function(a,b,c){var d=this,e=d.data;a=(new d.pointClass).init(d,a);b=A(b,true);e.push(a);c&&e[0].remove(false);d.isDirty=true;b&&d.chart.redraw()},setData:function(a,b){var c=this,d=c.data,e=c.initialColor,f=d&&d.length||0;c.xIncrement=null;if(U(e))rb=e;for(a=Db(nc(a||
+[]),function(g){return(new c.pointClass).init(c,g)});f--;)d[f].destroy();c.data=a;c.cleanData();c.getSegments();c.isDirty=true;A(b,true)&&c.chart.redraw()},remove:function(a){var b=this,c=b.chart;a=A(a,true);if(!b.isRemoving){b.isRemoving=true;ya(b,"remove",null,function(){b.destroy();c.isDirty=true;a&&c.redraw()})}b.isRemoving=false},translate:function(){for(var a=this,b=a.chart,c=a.options.stacking,d=a.xAxis.categories,e=a.yAxis,f=e.stacks[a.type],g=a.data,j=g.length;j--;){var h=g[j],l=h.x,n=h.y,
+u;h.plotX=a.xAxis.translate(l);if(c&&a.visible&&f[l]){u=f[l];l=u.total;u.cum=u=u.cum-n;n=u+n;if(c=="percent"){u=l?u*100/l:0;n=l?n*100/l:0}h.percentage=l?h.y*100/l:0;h.stackTotal=l;h.yBottom=e.translate(u,0,1)}if(n!==null)h.plotY=e.translate(n,0,1);h.clientX=b.inverted?b.plotHeight-h.plotX:h.plotX;h.category=d&&d[h.x]!==Ta?d[h.x]:h.x}},setTooltipPoints:function(a){var b=this,c=b.chart,d=c.inverted,e=[],f=(d?c.plotTop:c.plotLeft)+c.plotSizeX,g,j,h=[];if(a)b.tooltipPoints=null;p(b.segments,function(l){e=
+e.concat(l)});if(b.xAxis&&b.xAxis.reversed)e=e.reverse();p(e,function(l,n){b.tooltipPoints||l.setTooltipText();g=e[n-1]?e[n-1].high+1:0;for(j=l.high=e[n+1]?hb((l.plotX+(e[n+1]?e[n+1].plotX:f))/2):f;g<=j;)h[d?f-g++:g++]=l});b.tooltipPoints=h},onMouseOver:function(){var a=this,b=a.chart,c=b.hoverSeries,d=a.stateMarkerGraphic;if(!b.mouseIsDown){d&&d.show();c&&c!=a&&c.onMouseOut();a.options.events.mouseOver&&ya(a,"mouseOver");a.tracker&&a.tracker.toFront();a.setState(ob);b.hoverSeries=a}},onMouseOut:function(){var a=
+this,b=a.options,c=a.chart,d=c.tooltip,e=c.hoverPoint;e&&e.onMouseOut();a&&b.events.mouseOut&&ya(a,"mouseOut");d&&!b.stickyTracking&&d.hide();a.setState();c.hoverSeries=null},animate:function(a){var b=this,c=b.chart,d=b.clipRect;if(a){if(!d.isAnimating){d.attr("width",0);d.isAnimating=true}}else{d.animate({width:c.plotSizeX},{complete:function(){d.isAnimating=false},duration:1E3});this.animate=null}},drawPoints:function(){var a=this,b,c=a.data,d=a.chart,e,f,g,j,h,l;if(a.options.marker.enabled)for(g=
+c.length;g--;){j=c[g];e=j.plotX;f=j.plotY;l=j.graphic;if(j.plotY!==Ta){b=j.pointAttr[j.selected?wb:Ka];h=b.r;if(l)l.attr({x:e,y:f,r:h});else j.graphic=d.renderer.symbol(A(j.marker&&j.marker.symbol,a.symbol),e,f,h).attr(b).add(a.group)}}},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,j={};a=a||{};b=b||{};c=c||{};d=d||{};for(f in e){g=e[f];j[f]=A(a[g],b[f],c[f],d[f])}return j},getAttribs:function(){var a=this,b=a.options.marker||a.options,c=b.states,d=c[ob],e,f={},g=a.color,j=a.data,
+h=[],l,n=a.pointAttrToOptions;if(a.options.marker){f={stroke:g,fill:g};d.radius=d.radius||b.radius+2;d.lineWidth=d.lineWidth||b.lineWidth+1}else{f={fill:g};d.color=d.color||Jb(d.color||g).brighten(d.brightness).get()}h[Ka]=a.convertAttribs(b,f);p([ob,wb],function(y){h[y]=a.convertAttribs(c[y],h[Ka])});a.pointAttr=h;for(f=j.length;f--;){g=j[f];b=g.options&&g.options.marker||g.options;e=false;if(g.options)for(var u in n)if(b[n[u]])e=true;if(e){l=[];c=b.states||{};e=c[ob]=c[ob]||{};if(!a.options.marker)e.color=
+Jb(e.color||g.options.color).brighten(e.brightness||d.brightness).get();l[Ka]=a.convertAttribs(b,h[Ka]);l[ob]=a.convertAttribs(c[ob],h[ob],l[Ka]);l[wb]=a.convertAttribs(c[wb],h[wb],l[Ka])}else l=h;g.pointAttr=l}},destroy:function(){var a=this,b=a.chart.series,c=a.clipRect,d;Gb(a);a.legendItem&&a.chart.legend.destroyItem(a);p(a.data,function(e){e.destroy()});p(["area","graph","dataLabelsGroup","group","tracker"],function(e){a[e]&&a[e].destroy()});c&&c!=a.chart.clipRect&&c.destroy();p(b,function(e,
+f){e==a&&b.splice(f,1)});for(d in a)delete a[d]},drawDataLabels:function(){if(this.options.dataLabels.enabled){var a=this,b,c,d=a.data,e=a.options.dataLabels,f,g=a.dataLabelsGroup,j=a.chart,h=j.inverted,l=a.type,n,u;if(!g)g=a.dataLabelsGroup=j.renderer.g(Eb+"data-labels").attr({visibility:a.visible?Wb:Fb,zIndex:4}).translate(j.plotLeft,j.plotTop).add();n=e.color;if(n=="auto")n=null;e.style.color=A(n,a.color);p(d,function(y){var ca=A(y.barX,y.plotX),Ba=y.plotY,O=y.tooltipPos,ea=y.dataLabel;ea&&ea.destroy();
+f=e.formatter.call({x:y.x,y:y.y,series:a,point:y,percentage:y.percentage,total:y.total||y.stackTotal});b=(h?j.plotWidth-Ba:ca)+e.x;c=(h?j.plotHeight-ca:Ba)+e.y;if(O){b=O[0]+e.x;c=O[1]+e.y}u=e.align;if(l=="column")b+={center:y.barW/2,right:y.barW}[u]||0;if(f)y.dataLabel=j.renderer.text(f,b,c,e.style,e.rotation,u).attr({zIndex:1}).add(y.group||g);a.drawConnector&&a.drawConnector(y)})}},drawGraph:function(){var a=this,b=a.options,c=a.chart,d=a.graph,e=[],f=a.area,g=a.group,j=b.lineColor||a.color,h=b.lineWidth,
+l;c=c.renderer;var n=a.yAxis.getThreshold(b.threshold||0),u=/^area/.test(a.type),y=[];p(a.segments,function(ca){l=[];p(ca,function(mb,Ja){Ja<2&&l.push([gb,Na][Ja]);if(Ja&&b.step){Ja=ca[Ja-1];l.push(mb.plotX,Ja.plotY)}l.push(mb.plotX,mb.plotY)});e=e.concat(l);if(u){var Ba=[],O,ea=l.length;for(O=0;O<ea;O++)Ba.push(l[O]);if(b.stacking&&a.type!="areaspline")for(O=ca.length-1;O>=0;O--)Ba.push(ca[O].plotX,ca[O].yBottom);else Ba.push(ca[ca.length-1].plotX,n,ca[0].plotX,n,"z");y=y.concat(Ba)}});a.graphPath=
+e;if(d)d.attr({d:e});else if(h)a.graph=c.path(e).attr({stroke:j,"stroke-width":h+Ia}).add(g).shadow(b.shadow);if(u){d=A(b.fillColor,Jb(a.color).setOpacity(b.fillOpacity||0.75).get());if(f)f.attr({d:y});else a.area=a.chart.renderer.path(y).attr({fill:d}).add(a.group)}},render:function(){var a=this,b=a.chart,c,d=a.options.animation&&a.animate;c=b.renderer;if(!a.clipRect){a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:c.clipRect(0,0,b.plotSizeX,b.plotSizeY);if(!b.clipRect)b.clipRect=a.clipRect}if(!a.group){c=
+a.group=c.g("series");b.inverted&&c.attr({width:b.plotWidth,height:b.plotHeight}).invert();c.clip(a.clipRect).attr({visibility:a.visible?Wb:Fb,zIndex:3}).translate(b.plotLeft,b.plotTop).add()}a.drawDataLabels();d&&a.animate(true);a.getAttribs();a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();d&&a.animate();a.isDirty=false},redraw:function(){var a=this;a.translate();a.setTooltipPoints(true);a.render()},setState:function(a){var b=this,c=b.options,d=b.graph,
+e=c.states,f=b.stateMarkerGraphic;c=c.lineWidth;a=a||Ka;if(b.state!=a){b.state=a;if(!(e[a]&&e[a].enabled===false)){if(a)c=e[a].lineWidth||c;else f&&f.hide();if(d)d.animate({"stroke-width":c},a?0:500)}}},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f=c.group,g=c.tracker,j=c.dataLabelsGroup,h,l=c.data,n=d.options.chart.ignoreHiddenSeries;h=c.visible;h=(c.visible=a=a===Ta?!h:a)?"show":"hide";if(a)c.isDirty=n;f&&f[h]();if(g)g[h]();else for(f=l.length;f--;){g=l[f];g.tracker&&g.tracker[h]()}j&&
+j[h]();e&&d.legend.colorizeItem(c,a);n&&c.options.stacking&&p(d.series,function(u){if(u.options.stacking&&u.visible)u.isDirty=true});b!==false&&d.redraw();ya(c,h)},show:function(){this.setVisible(true)},hide:function(){this.setVisible(false)},select:function(a){var b=this;b.selected=a=a===Ta?!b.selected:a;if(b.checkbox)b.checkbox.checked=a;ya(b,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=a.graphPath,d=a.chart,e=a.tracker,f=b.cursor;f=f&&{cursor:f};if(e)e.attr({d:c});else a.tracker=
+d.renderer.path(c).attr({isTracker:true,stroke:cd,fill:db,"stroke-width":b.lineWidth+2*d.options.tooltip.snap,"stroke-linecap":"round",visibility:a.visible?Wb:Fb,zIndex:1}).on("mouseover",function(){d.hoverSeries!=a&&a.onMouseOver()}).on("mouseout",function(){b.stickyTracking||a.onMouseOut()}).css(f).add(d.trackerGroup)}};pa=eb(Sa);cb.line=pa;pa=eb(Sa,{type:"area"});cb.area=pa;ad.prototype={get:function(a){a||(a=50);var b=this.n;b=(this.xdata[b-1]-this.xdata[0])/(a-1);var c=[],d=[];c[0]=this.xdata[0];
+d[0]=this.ydata[0];for(var e=[{plotX:c[0],plotY:d[0]}],f=1;f<a;f++){c[f]=c[0]+f*b;d[f]=this.interpolate(c[f]);e[f]={plotX:c[f],plotY:d[f]}}return e},interpolate:function(a){for(var b=this.n-1,c=0;b-c>1;){var d=(b+c)/2;if(this.xdata[hb(d)]>a)b=d;else c=d}b=hb(b);c=hb(c);d=this.xdata[b]-this.xdata[c];var e=(this.xdata[b]-a)/d;a=(a-this.xdata[c])/d;return e*this.ydata[c]+a*this.ydata[b]+((e*e*e-e)*this.y2[c]+(a*a*a-a)*this.y2[b])*d*d/6}};pa=eb(Sa,{type:"spline",drawGraph:function(){var a=this,b=a.segments;
+a.splinedata=a.getSplineData();a.segments=a.splinedata;Sa.prototype.drawGraph.apply(a,arguments);a.segments=b},getSplineData:function(){var a=this,b=a.chart,c=[],d;p(a.segments,function(e){if(a.xAxis.reversed)e=e.reverse();var f=[],g,j;p(e,function(h,l){g=e[l+2]||e[l+1]||h;j=e[l-2]||e[l-1]||h;g.plotX>=0&&j.plotX<=b.plotWidth&&f.push(h)});if(f.length>1)d=Z(sb(b.plotWidth,f[f.length-1].clientX-f[0].clientX)/3);c.push(e.length>1?d?(new ad(f)).get(d):[]:e)});return c}});cb.spline=pa;pa=eb(pa,{type:"areaspline"});
+cb.areaspline=pa;var mc=eb(Sa,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){Sa.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&p(b.series,function(c){if(c.type==a.type)c.isDirty=true})},translate:function(){var a=this,b=a.chart,c=0,d=a.xAxis.reversed,e=a.xAxis.categories,f;Sa.prototype.translate.apply(a);p(b.series,function(O){if(O.type==a.type)if(O.options.stacking){U(f)||(f=c++);O.columnIndex=
+f}else O.columnIndex=c++});var g=a.options,j=a.data,h=a.closestPoints;b=Za(j[1]?j[h].plotX-j[h-1].plotX:b.plotSizeX/(e?e.length:1));e=b*g.groupPadding;h=b-2*e;h=h/c;var l=g.pointWidth,n=U(l)?(h-l)/2:h*g.pointPadding,u=A(l,h-2*n);l=(d?c-a.columnIndex:a.columnIndex)||0;var y=n+(e+l*h-b/2)*(d?-1:1),ca=a.yAxis.getThreshold(g.threshold||0),Ba=g.minPointLength;p(j,function(O){var ea=O.plotY,mb=O.plotX+y,Ja=Kb(ea,ca),jc=u,E=Za((O.yBottom||ca)-ea),ua;if(Za(E)<(Ba||5)){if(Ba){E=Ba;Ja=ca-(ea<=ca?Ba:0)}ua=Ja-
+3}R(O,{barX:mb,barY:Ja,barW:jc,barH:E});O.shapeType="rect";O.shapeArgs={x:mb,y:Ja,width:jc,height:E,r:g.borderRadius};if(U(ua))O.trackerArgs=ka(O.shapeArgs,{height:6,y:ua})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;p(a.data,function(f){if(U(f.plotY)){d=f.graphic;e=f.shapeArgs;if(d)d.attr(e);else f.graphic=c[f.shapeType](e).attr(f.pointAttr[f.selected?wb:Ka]).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.cursor,j=g&&{cursor:g},h;p(a.data,function(l){e=l.tracker;d=l.trackerArgs||l.shapeArgs;if(e)e.attr(d);else l.tracker=c[l.shapeType](d).attr({isTracker:f,fill:cd,visibility:a.visible?Wb:Fb,zIndex:1}).on("mouseover",function(n){h=n.relatedTarget||n.fromElement;b.hoverSeries!=a&&na(h,"isTracker")!=f&&a.onMouseOver();l.onMouseOver()}).on("mouseout",function(n){if(!a.options.stickyTracking){h=n.relatedTarget||n.toElement;na(h,"isTracker")!=f&&a.onMouseOut()}}).css(j).add(b.trackerGroup)})},
+cleanData:function(){var a=this,b=a.data,c,d,e,f;Sa.prototype.cleanData.apply(a);for(f=b.length-1;f>=0;f--)if(b[f-1]){c=b[f].x-b[f-1].x;if(d===Ta||c<d){d=c;e=f}}a.closestPoints=e},animate:function(a){var b=this,c=b.data;if(!a){p(c,function(d){var e=d.graphic;if(e){e.attr({height:0,y:b.yAxis.translate(0,0,1)});e.animate({height:d.barH,y:d.barY},{duration:1E3})}});b.animate=null}},remove:function(){var a=this,b=a.chart;b.hasRendered&&p(b.series,function(c){if(c.type==a.type)c.isDirty=true});Sa.prototype.remove.apply(a,
+arguments)}});cb.column=mc;pa=eb(mc,{type:"bar",init:function(a){a.inverted=this.inverted=true;mc.prototype.init.apply(this,arguments)}});cb.bar=pa;pa=eb(Sa,{type:"scatter",translate:function(){var a=this;Sa.prototype.translate.apply(a);p(a.data,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){var a=this,b=a.options.cursor,c=b&&{cursor:b},d;p(a.data,function(e){(d=e.graphic)&&d.attr({isTracker:true}).on("mouseover",function(){a.onMouseOver();
+e.onMouseOver()}).on("mouseout",function(){a.options.stickyTracking||a.onMouseOut()}).css(c)})},cleanData:function(){}});cb.scatter=pa;pa=eb(Xb,{init:function(){Xb.prototype.init.apply(this,arguments);var a=this,b;R(a,{visible:a.visible!==false,name:A(a.name,"Slice")});b=function(){a.slice()};jb(a,"select",b);jb(a,"unselect",b);return a},setVisible:function(a){var b=this,c=b.series.chart;if(b.visible=a=a===Ta?!b.visible:a){b.group.show();b.tracker.show()}else{b.group.hide();b.tracker.hide()}b.legendItem&&
+c.legend.colorizeItem(b,a)},slice:function(a,b){var c=this,d=c.series;d=d.chart;var e=c.slicedTranslation;A(b,true);a=c.sliced=U(a)?a:!c.sliced;c.group.animate({translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop},100)}});pa=eb(Sa,{type:"pie",isCartesian:false,pointClass:pa,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=rb},translate:function(){var a=0,b=this,c=-0.25,d=b.options,e=d.slicedOffset,f=d.center,g=b.chart,j=
+g.plotWidth,h=g.plotHeight,l,n,u;b=b.data;var y=2*Ga.PI,ca,Ba=Kb(j,h),O;f.push(d.size,d.innerSize||0);f=Db(f,function(ea,mb){return(O=/%$/.test(ea))?[j,h,Ba,Ba][mb]*parseInt(ea,10)/100:ea});p(b,function(ea){a+=ea.y});p(b,function(ea){ca=a?ea.y/a:0;l=c*y;c+=ca;n=c*y;ea.shapeType="arc";ea.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:l,end:n};u=(n+l)/2;ea.slicedTranslation=Db([Hb(u)*e+g.plotLeft,Ib(u)*e+g.plotTop],Z);ea.tooltipPos=[f[0]+Hb(u)*f[2]*0.35,f[1]+Ib(u)*f[2]*0.35];ea.percentage=ca*
+100;ea.total=a});this.setTooltipPoints()},render:function(){var a=this;a.getAttribs();this.drawPoints();a.options.enableMouseTracking!==false&&a.drawTracker();this.drawDataLabels();a.isDirty=false},drawPoints:function(){var a=this,b=a.chart,c=b.renderer,d,e,f;p(this.data,function(g){e=g.graphic;f=g.shapeArgs;if(!g.group){d=g.sliced?g.slicedTranslation:[b.plotLeft,b.plotTop];g.group=c.g("point").attr({zIndex:3}).add().translate(d[0],d[1])}if(e)e.attr(f);else g.graphic=c.arc(f).attr(g.pointAttr[Ka]).add(g.group);
+g.visible===false&&g.setVisible(false)})},drawTracker:mc.prototype.drawTracker,getSymbol:function(){}});cb.pie=pa;kb.Highcharts={Chart:hd,dateFormat:fc,getOptions:ed,numberFormat:fd,Point:Xb,Renderer:Zc,seriesTypes:cb,setOptions:dd,Series:Sa,addEvent:jb,createElement:Da,discardElement:ac,css:Ua,each:p,extend:R,map:Db,merge:ka,pick:A,extendClass:eb}})();

Added: incubator/rave/donations/ogce-gadget-container/third-party-gadgets/newsletter-fc.xml
URL: http://svn.apache.org/viewvc/incubator/rave/donations/ogce-gadget-container/third-party-gadgets/newsletter-fc.xml?rev=1087520&view=auto
==============================================================================
--- incubator/rave/donations/ogce-gadget-container/third-party-gadgets/newsletter-fc.xml (added)
+++ incubator/rave/donations/ogce-gadget-container/third-party-gadgets/newsletter-fc.xml Fri Apr  1 00:29:22 2011
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Module>
+    <ModulePrefs
+        title="Event (CTS)"
+        author_email="jenvor@gmail.com"
+        description="" 
+        height="300">
+        <Require feature="opensocial-0.8" />
+        <Require feature="dynamic-height" />
+    </ModulePrefs>
+    <Content type="html" view="home, canvas">
+  <![CDATA[
+
+    <!-- Include the Google Friend Connect javascript library. -->
+    <script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
+    <!-- Define the div tag where the gadget will be inserted. -->
+    <div id="div-5908048148607210906" style="width:282px;border:1px solid #cccccc;"></div>
+    <!-- Render the gadget into a div. -->
+    <script type="text/javascript">
+    var skin = {};
+    skin['BORDER_COLOR'] = '#cccccc';
+    skin['ENDCAP_BG_COLOR'] = '#e0ecff';
+    skin['ENDCAP_TEXT_COLOR'] = '#333333';
+    skin['ENDCAP_LINK_COLOR'] = '#0000cc';
+    skin['ALTERNATE_BG_COLOR'] = '#ffffff';
+    skin['CONTENT_BG_COLOR'] = '#ffffff';
+    skin['CONTENT_LINK_COLOR'] = '#0000cc';
+    skin['CONTENT_TEXT_COLOR'] = '#333333';
+    skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
+    skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
+    skin['CONTENT_HEADLINE_COLOR'] = '#333333';
+    google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
+    google.friendconnect.container.renderOpenSocialGadget(
+     { id: 'div-5908048148607210906',
+       url:'http://www.google.com/friendconnect/gadgets/newsletterSubscribe.xml',
+       site: '@friendConnectSiteID@',
+       'view-params':{}
+    ,
+       'prefs':{"newsletterHeadlineText":"Sign up for our newsletter!","newsletterStandardText":"Get email updates featuring our sites latest content"}
+     },
+      skin);
+    </script>
+  ]]>
+</Content>
+</Module>

Added: incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth-contacts.xml
URL: http://svn.apache.org/viewvc/incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth-contacts.xml?rev=1087520&view=auto
==============================================================================
--- incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth-contacts.xml (added)
+++ incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth-contacts.xml Fri Apr  1 00:29:22 2011
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8" ?> 
+<Module>
+  <ModulePrefs title="OAuth Contacts" scrolling="true">
+    <Require feature="opensocial-0.8" />
+    <Require feature="locked-domain"/>
+    <OAuth>
+      <Service name="google">
+        <Access url="https://www.google.com/accounts/OAuthGetAccessToken" method="GET" /> 
+        <Request url="https://www.google.com/accounts/OAuthGetRequestToken?scope=http://www.google.com/m8/feeds/" method="GET" /> 
+        <Authorization url="https://www.google.com/accounts/OAuthAuthorizeToken?oauth_callback=https://gf13.ucs.indiana.edu:7443/gadgets/oauthcallback" /> 
+      </Service>
+    </OAuth>
+  </ModulePrefs>
+  <Content type="html">
+  <![CDATA[ 
+ 
+  <!-- shindig oauth popup handling code -->
+  <script src="http://gadget-doc-examples.googlecode.com/svn/trunk/opensocial-gadgets/popup.js"></script>
+
+  <style>
+  #main {
+    margin: 0px;
+    padding: 0px;
+    font-size: small;
+  }
+  </style>
+
+  <div id="main" style="display: none">
+  </div>
+
+  <div id="approval" style="display: none">
+    <img src="http://gadget-doc-examples.googlecode.com/svn/trunk/images/new.gif">
+    <a href="#" id="personalize">Personalize this gadget</a>
+  </div>
+
+  <div id="waiting" style="display: none">
+    Please click
+    <a href="#" id="approvaldone">I've approved access</a>
+    once you've approved access to your data.
+  </div>
+
+  <script type="text/javascript">
+    // Display UI depending on OAuth access state of the gadget (see <divs> above).
+    // If user hasn't approved access to data, provide a "Personalize this gadget" link
+    // that contains the oauthApprovalUrl returned from makeRequest.
+    //
+    // If the user has opened the popup window but hasn't yet approved access, display
+    // text prompting the user to confirm that s/he approved access to data.  The user
+    // may not ever need to click this link, if the gadget is able to automatically
+    // detect when the user has approved access, but showing the link gives users
+    // an option to fetch their data even if the automatic detection fails.
+    //
+    // When the user confirms access, the fetchData() function is invoked again to
+    // obtain and display the user's data.
+    function showOneSection(toshow) {
+      var sections = [ 'main', 'approval', 'waiting' ];
+      for (var i=0; i < sections.length; ++i) {
+        var s = sections[i];
+        var el = document.getElementById(s);
+        if (s === toshow) {
+          el.style.display = "block";
+        } else {
+          el.style.display = "none";
+        }
+      }
+    }
+      
+    // Process returned JSON feed to display data.
+    function showResults(result) {
+      showOneSection('main');
+
+      var titleElement = document.createElement('div');
+      var nameNode = document.createTextNode(result.feed.title.$t);
+      titleElement.appendChild(nameNode);
+      document.getElementById("main").appendChild(titleElement);
+      document.getElementById("main").appendChild(document.createElement("br"));
+
+      list = result.feed.entry;
+
+      for(var i = 0; i < list.length; i++) {
+        entry = list[i];
+        var divElement = document.createElement('div');
+        divElement.setAttribute('class', 'name');
+        var valueNode = document.createTextNode(entry.gd$email[0].address);
+        divElement.appendChild(nameNode);
+        divElement.appendChild(valueNode);
+        document.getElementById("main").appendChild(divElement);
+      }
+    }
+
+    // Invoke makeRequest() to fetch data from the service provider endpoint.
+    // Depending on the results of makeRequest, decide which version of the UI
+    // to ask showOneSection() to display. If user has approved access to his
+    // or her data, display data.
+    // If the user hasn't approved access yet, response.oauthApprovalUrl contains a
+    // URL that includes a Google-supplied request token. This is presented in the 
+    // gadget as a link that the user clicks to begin the approval process.     
+    function fetchData() {
+      var params = {};
+      url = "http://www.google.com/m8/feeds/contacts/default/base?alt=json";
+      params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
+      params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.OAUTH;
+      params[gadgets.io.RequestParameters.OAUTH_SERVICE_NAME] = "google";
+      params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;
+
+      gadgets.io.makeRequest(url, function (response) { 
+        if (response.oauthApprovalUrl) {
+          // Create the popup handler. The onOpen function is called when the user
+          // opens the popup window. The onClose function is called when the popup
+          // window is closed.
+          var popup = shindig.oauth.popup({
+            destination: response.oauthApprovalUrl,
+            windowOptions: null,
+            onOpen: function() { showOneSection('waiting'); },
+            onClose: function() { fetchData(); }
+          });
+          // Use the popup handler to attach onclick handlers to UI elements.  The
+          // createOpenerOnClick() function returns an onclick handler to open the
+          // popup window.  The createApprovedOnClick function returns an onclick 
+          // handler that will close the popup window and attempt to fetch the user's
+          // data again.
+          var personalize = document.getElementById('personalize');
+          personalize.onclick = popup.createOpenerOnClick();
+          var approvaldone = document.getElementById('approvaldone');
+          approvaldone.onclick = popup.createApprovedOnClick();
+          showOneSection('approval');
+        } else if (response.data) {
+          showOneSection('main');
+          showResults(response.data);
+        } else {
+          // The response.oauthError and response.oauthErrorText values may help debug
+          // problems with your gadget.
+          var main = document.getElementById('main');
+          var err = document.createTextNode('OAuth error: ' +
+            response.oauthError + ': ' + response.oauthErrorText);
+          main.appendChild(err);
+          showOneSection('main');
+        }
+      }, params);
+    }
+    // Call fetchData() when gadget loads.
+    gadgets.util.registerOnLoadHandler(fetchData);
+  </script>
+  ]]> 
+  </Content>
+</Module>

Added: incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth-twitter.xml
URL: http://svn.apache.org/viewvc/incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth-twitter.xml?rev=1087520&view=auto
==============================================================================
--- incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth-twitter.xml (added)
+++ incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth-twitter.xml Fri Apr  1 00:29:22 2011
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8" ?> 
+<Module>
+  <ModulePrefs title="OAuth Contacts" scrolling="true">
+    <Require feature="opensocial-0.8" />
+    <Require feature="locked-domain"/>
+    <OAuth>
+      <Service name="google">
+        <Access url="http://twitter.com/oauth/access_token" method="GET" /> 
+        <Request url="http://twitter.com/oauth/request_token" method="GET" /> 
+        <Authorization url="http://twitter.com/oauth/authorize?oauth_callback=https://gf13.ucs.indiana.edu:7443/gadgets/oauthcallback" /> 
+      </Service>
+    </OAuth>
+  </ModulePrefs>
+
+  <Content type="html">
+  <![CDATA[ 
+ 
+  <!-- shindig oauth popup handling code -->
+  <script src="http://gadget-doc-examples.googlecode.com/svn/trunk/opensocial-gadgets/popup.js"></script>
+
+  <style>
+  #main {
+    margin: 0px;
+    padding: 0px;
+    font-size: small;
+  }
+  </style>
+
+  <div id="main" style="display: none">
+  </div>
+
+  <div id="approval" style="display: none">
+    <img src="http://gadget-doc-examples.googlecode.com/svn/trunk/images/new.gif">
+    <a href="#" id="personalize">Personalize this gadget</a>
+  </div>
+
+  <div id="waiting" style="display: none">
+    Please click
+    <a href="#" id="approvaldone">I've approved access</a>
+    once you've approved access to your data.
+  </div>
+
+  <script type="text/javascript">
+    // Display UI depending on OAuth access state of the gadget (see <divs> above).
+    // If user hasn't approved access to data, provide a "Personalize this gadget" link
+    // that contains the oauthApprovalUrl returned from makeRequest.
+    //
+    // If the user has opened the popup window but hasn't yet approved access, display
+    // text prompting the user to confirm that s/he approved access to data.  The user
+    // may not ever need to click this link, if the gadget is able to automatically
+    // detect when the user has approved access, but showing the link gives users
+    // an option to fetch their data even if the automatic detection fails.
+    //
+    // When the user confirms access, the fetchData() function is invoked again to
+    // obtain and display the user's data.
+    function showOneSection(toshow) {
+      var sections = [ 'main', 'approval', 'waiting' ];
+      for (var i=0; i < sections.length; ++i) {
+        var s = sections[i];
+        var el = document.getElementById(s);
+        if (s === toshow) {
+          el.style.display = "block";
+        } else {
+          el.style.display = "none";
+        }
+      }
+    }
+      
+    // Process returned JSON feed to display data.
+    function showResults(result) {
+      showOneSection('main');
+
+      var titleElement = document.createElement('div');
+      var nameNode = document.createTextNode(result.feed.title.$t);
+      titleElement.appendChild(nameNode);
+      document.getElementById("main").appendChild(titleElement);
+      document.getElementById("main").appendChild(document.createElement("br"));
+
+      list = result.feed.entry;
+
+      for(var i = 0; i < list.length; i++) {
+        entry = list[i];
+        var divElement = document.createElement('div');
+        divElement.setAttribute('class', 'name');
+        var valueNode = document.createTextNode(entry.gd$email[0].address);
+        divElement.appendChild(nameNode);
+        divElement.appendChild(valueNode);
+        document.getElementById("main").appendChild(divElement);
+      }
+    }
+
+    // Invoke makeRequest() to fetch data from the service provider endpoint.
+    // Depending on the results of makeRequest, decide which version of the UI
+    // to ask showOneSection() to display. If user has approved access to his
+    // or her data, display data.
+    // If the user hasn't approved access yet, response.oauthApprovalUrl contains a
+    // URL that includes a Google-supplied request token. This is presented in the 
+    // gadget as a link that the user clicks to begin the approval process.     
+    function fetchData() {
+      var params = {};
+      url = "http://www.google.com/m8/feeds/contacts/default/base?alt=json";
+      params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON;
+      params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.OAUTH;
+      params[gadgets.io.RequestParameters.OAUTH_SERVICE_NAME] = "google";
+      params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;
+
+      gadgets.io.makeRequest(url, function (response) { 
+        if (response.oauthApprovalUrl) {
+          // Create the popup handler. The onOpen function is called when the user
+          // opens the popup window. The onClose function is called when the popup
+          // window is closed.
+          var popup = shindig.oauth.popup({
+            destination: response.oauthApprovalUrl,
+            windowOptions: null,
+            onOpen: function() { showOneSection('waiting'); },
+            onClose: function() { fetchData(); }
+          });
+          // Use the popup handler to attach onclick handlers to UI elements.  The
+          // createOpenerOnClick() function returns an onclick handler to open the
+          // popup window.  The createApprovedOnClick function returns an onclick 
+          // handler that will close the popup window and attempt to fetch the user's
+          // data again.
+          var personalize = document.getElementById('personalize');
+          personalize.onclick = popup.createOpenerOnClick();
+          var approvaldone = document.getElementById('approvaldone');
+          approvaldone.onclick = popup.createApprovedOnClick();
+          showOneSection('approval');
+        } else if (response.data) {
+          showOneSection('main');
+          showResults(response.data);
+        } else {
+          // The response.oauthError and response.oauthErrorText values may help debug
+          // problems with your gadget.
+          var main = document.getElementById('main');
+          var err = document.createTextNode('OAuth error: ' +
+            response.oauthError + ': ' + response.oauthErrorText);
+          main.appendChild(err);
+          showOneSection('main');
+        }
+      }, params);
+    }
+    // Call fetchData() when gadget loads.
+    gadgets.util.registerOnLoadHandler(fetchData);
+  </script>
+  ]]> 
+  </Content>
+</Module>

Added: incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth.xml
URL: http://svn.apache.org/viewvc/incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth.xml?rev=1087520&view=auto
==============================================================================
--- incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth.xml (added)
+++ incubator/rave/donations/ogce-gadget-container/third-party-gadgets/oauth.xml Fri Apr  1 00:29:22 2011
@@ -0,0 +1,114 @@
+ <?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<Module>
+  <ModulePrefs title="Demo OAuth Gadget"
+               icon="https://gf13.ucs.indiana.edu:7443/gadgets/files/samplecontainer/examples/icon.png">
+    <OAuth>
+      <Service>
+        <Request url="https://www.google.com/accounts/OAuthGetRequestToken?scope=http://www.google.com/m8/feeds/" method="GET" />
+        <Access url="https://www.google.com/accounts/OAuthGetAccessToken" method="GET"/>
+        <Authorization url="https://www.google.com/accounts/OAuthAuthorizeToken?oauth_callback=https://gf13.ucs.indiana.edu:7443/gadgets/oauthcallback" />
+      </Service>
+    </OAuth>
+    <Require feature="oauthpopup" />
+    <Preload authz="oauth" href="http://localhost:9090/oauth-provider/echo" />
+  </ModulePrefs>
+  <Content type="html">
+      <![CDATA[
+
+    <style>
+    #main {
+        margin: 0px;
+        padding: 0px;
+        font-size: small;
+    }
+    </style>
+
+    <div id="main" style="display: none">
+    </div>
+
+    <div id="approval" style="display: none">
+      <img src="http://localhost:8080/gadgets/files/samplecontainer/examples/new.gif">
+      <a href="#" id="personalize">Personalize this gadget</a>
+    </div>
+
+    <div id="waiting" style="display: none">
+      Please click
+      <a href="#" id="approvaldone">I've approved access</a>
+      once you've approved access to your data.
+    </div>
+
+    <script type="text/javascript">
+      function $(x) {
+        return document.getElementById(x);
+      }
+
+      function showOneSection(toshow) {
+        var sections = [ 'main', 'approval', 'waiting' ];
+        for (var i=0; i < sections.length; ++i) {
+          var s = sections[i];
+          var el = $(s);
+          if (s === toshow) {
+            el.style.display = "block";
+          } else {
+            el.style.display = "none";
+          }
+        }
+      }
+
+      function fetchData() {
+        // url = "http://localhost:9090/oauth-provider/echo";
+        url = "http://www.google.com/m8/feeds/contacts/default/base?alt=json";
+        var params = {};
+        params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
+        params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.OAUTH;
+        params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;
+
+        gadgets.io.makeRequest(url, function (response) {
+          if (response.oauthApprovalUrl) {
+            var onOpen = function() {
+              showOneSection('waiting');
+            };
+            var onClose = function() {
+              fetchData();
+            };
+            var popup = new gadgets.oauth.Popup(response.oauthApprovalUrl,
+                null, onOpen, onClose);
+            $('personalize').onclick = popup.createOpenerOnClick();
+            $('approvaldone').onclick = popup.createApprovedOnClick();
+            showOneSection('approval');
+          } else if (response.data) {
+            $('main').appendChild(document.createTextNode(response.data));
+            showOneSection('main');
+          } else {
+            var whoops = document.createTextNode(
+                'OAuth error: ' + response.oauthError + ': ' +
+                response.oauthErrorText);
+            $('main').appendChild(whoops);
+            showOneSection('main');
+          }
+        }, params);
+      }
+
+      gadgets.util.registerOnLoadHandler(fetchData);
+    </script>
+        ]]>
+  </Content>
+</Module>

Added: incubator/rave/donations/ogce-gadget-container/third-party-gadgets/opensocial-test.xml
URL: http://svn.apache.org/viewvc/incubator/rave/donations/ogce-gadget-container/third-party-gadgets/opensocial-test.xml?rev=1087520&view=auto
==============================================================================
--- incubator/rave/donations/ogce-gadget-container/third-party-gadgets/opensocial-test.xml (added)
+++ incubator/rave/donations/ogce-gadget-container/third-party-gadgets/opensocial-test.xml Fri Apr  1 00:29:22 2011
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Module>
+  <ModulePrefs
+      title="OpenSocial test"
+      author="Gerald Guo"
+      author_email="zhguo@indiana.edu"
+      description="Test OpenSocial support">
+    <Require feature="osapi"/>
+  </ModulePrefs>
+  <Content type="html">
+    <![CDATA[
+    <script type="text/javascript">
+      function getInfo() {
+        var fields = ['displayName', 'birthday', 'emails', 'name'];
+        osapi.people.getViewer({fields: fields}).execute(function(result) {
+          if (!result.error) {
+            msg = 'Your name is "' + result.name.formatted + '"';
+            msg += '<br>Your display name is "' + result.displayName + '"';
+            var emails = result.emails;
+            msg += '<br>Your emails are "';
+            for (var i = 0; i < emails.length; ++i) {
+              if (i > 0) msg += ',';
+              msg += emails[i].value;
+            }
+            msg += '"';
+            showMsg('resultdiv', msg);
+          } else {
+            showMsg('resultdiv', 'Error:' + result.error.message);
+          }
+        });
+      }
+      function showMsg (eleid, msg) {
+        var ele = document.getElementById(eleid);
+        if (ele == null) return;
+        ele.innerHTML = msg;
+      }
+    </script>
+    <input type="button" value="get user info" onclick="getInfo();">
+    <div>
+    result:
+    <div id="resultdiv"></div>
+    </div>
+    ]]>
+  </Content>
+</Module>
+



Mime
View raw message