1.3.2
authorDmitry Baranovskiy <dbaranovskiy@Fresh-Air.sydney.atlassian.com>
Thu, 18 Mar 2010 22:19:19 +0000 (09:19 +1100)
committerDmitry Baranovskiy <dbaranovskiy@Fresh-Air.sydney.atlassian.com>
Thu, 18 Mar 2010 22:19:19 +0000 (09:19 +1100)
• fixed hsb2rgb & rgb2hsb caching
• Dramatically improved path rendering in IE
• Fixed scale issues
• Fixed getPointAtLength

raphael-min.js
raphael.js

index a9ba36d..01a448f 100644 (file)
@@ -4,4 +4,4 @@
  * Copyright (c) 2009 Dmitry Baranovskiy (http://raphaeljs.com)
  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
  */
-Raphael=(function(){var a=/[, ]+/,aS=/^(circle|rect|path|ellipse|text|image)$/,T="hasOwnProperty",M=document,ax=window,l={was:ax[T]("Raphael"),is:ax.Raphael},ap=function(){if(ap.is(arguments[0],"array")){var d=arguments[0],e=w[a0](ap,d.splice(0,3+ap.is(d[0],am))),S=e.set();for(var R=0,a5=d[m];R<a5;R++){var E=d[R]||{};aS.test(E.type)&&S[f](e[E.type]().attr(E));}return S;}return w[a0](ap,arguments);},aX=function(){},aP="appendChild",a0="apply",aW="concat",aw="",ao=" ",z="split",G="click dblclick mousedown mousemove mouseout mouseover mouseup"[z](ao),aD="join",m="length",a2="prototype",a4=String[a2].toLowerCase,ac=Math,g=ac.max,aM=ac.min,am="number",aE="toString",aA=Object[a2][aE],aU={},aQ=ac.pow,f="push",aY=/^(?=[\da-f]$)/,c=/^url\(['"]?([^\)]+)['"]?\)$/i,x=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,P=ac.round,v="setAttribute",X=parseFloat,H=parseInt,aR=String[a2].toUpperCase,j={"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},aa={along:"along","clip-rect":"csv",cx:am,cy:am,fill:"colour","fill-opacity":am,"font-size":am,height:am,opacity:am,path:"path",r:am,rotation:"csv",rx:am,ry:am,scale:"csv",stroke:"colour","stroke-opacity":am,"stroke-width":am,translation:"csv",width:am,x:am,y:am},aT="replace";ap.version="1.3.2";ap.type=(ax.SVGAngle||M.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");if(ap.type=="VML"){var ah=document.createElement("div");ah.innerHTML="<!--[if vml]><br><br><![endif]-->";if(ah.childNodes[m]!=2){return null;}}ap.svg=!(ap.vml=ap.type=="VML");aX[a2]=ap[a2];ap._id=0;ap._oid=0;ap.fn={};ap.is=function(e,d){d=a4.call(d);return((d=="object"||d=="undefined")&&typeof e==d)||(e==null&&d=="null")||a4.call(aA.call(e).slice(8,-1))==d;};ap.setWindow=function(d){ax=d;M=ax.document;};var aH=function(e){if(ap.vml){var d=/^\s+|\s+$/g;aH=ak(function(R){var S;R=(R+aw)[aT](d,aw);try{var a5=new ActiveXObject("htmlfile");a5.write("<body>");a5.close();S=a5.body;}catch(a7){S=createPopup().document.body;}var i=S.createTextRange();try{S.style.color=R;var a6=i.queryCommandValue("ForeColor");a6=((a6&255)<<16)|(a6&65280)|((a6&16711680)>>>16);return"#"+("000000"+a6[aE](16)).slice(-6);}catch(a7){return"none";}});}else{var E=M.createElement("i");E.title="Rapha\xebl Colour Picker";E.style.display="none";M.body[aP](E);aH=ak(function(i){E.style.color=i;return M.defaultView.getComputedStyle(E,aw).getPropertyValue("color");});}return aH(e);};ap.hsb2rgb=ak(function(a8,a6,bc){if(ap.is(a8,"object")&&"h" in a8&&"s" in a8&&"b" in a8){bc=a8.b;a6=a8.s;a8=a8.h;}var R,S,bd;if(bc==0){return{r:0,g:0,b:0,hex:"#000"};}if(a8>1||a6>1||bc>1){a8/=255;a6/=255;bc/=255;}var a5=~~(a8*6),a9=(a8*6)-a5,E=bc*(1-a6),e=bc*(1-(a6*a9)),be=bc*(1-(a6*(1-a9)));R=[bc,e,E,E,be,bc,bc][a5];S=[be,bc,bc,e,E,E,be][a5];bd=[E,E,be,bc,bc,e,E][a5];R*=255;S*=255;bd*=255;var ba={r:R,g:S,b:bd},d=(~~R)[aE](16),a7=(~~S)[aE](16),bb=(~~bd)[aE](16);d=d[aT](aY,"0");a7=a7[aT](aY,"0");bb=bb[aT](aY,"0");ba.hex="#"+d+a7+bb;return ba;},ap);ap.rgb2hsb=ak(function(d,e,a6){if(ap.is(d,"object")&&"r" in d&&"g" in d&&"b" in d){a6=d.b;e=d.g;d=d.r;}if(ap.is(d,"string")){var a8=ap.getRGB(d);d=a8.r;e=a8.g;a6=a8.b;}if(d>1||e>1||a6>1){d/=255;e/=255;a6/=255;}var a5=g(d,e,a6),i=aM(d,e,a6),R,E,S=a5;if(i==a5){return{h:0,s:0,b:a5};}else{var a7=(a5-i);E=a7/a5;if(d==a5){R=(e-a6)/a7;}else{if(e==a5){R=2+((a6-d)/a7);}else{R=4+((d-e)/a7);}}R/=6;R<0&&R++;R>1&&R--;}return{h:R,s:E,b:S};},ap);var aI=/,?([achlmqrstvxz]),?/gi;ap._path2string=function(){return this.join(",")[aT](aI,"$1");};function ak(E,e,d){function i(){var R=Array[a2].slice.call(arguments,0),a5=R[aD]("\u25ba"),S=i.cache=i.cache||{},a6=i.count=i.count||[];if(S[T](a5)){return d?d(S[a5]):S[a5];}a6[m]>=1000&&delete S[a6.shift()];a6[f](a5);S[a5]=E[a0](e,R);return d?d(S[a5]):S[a5];}return i;}ap.getRGB=ak(function(d){if(!d||!!((d=d+aw).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1};}if(d=="none"){return{r:-1,g:-1,b:-1,hex:"none"};}!(({hs:1,rg:1})[T](d.substring(0,2))||d.charAt()=="#")&&(d=aH(d));var S,i,E,a7,a8,a5=d.match(x);if(a5){if(a5[2]){a7=H(a5[2].substring(5),16);E=H(a5[2].substring(3,5),16);i=H(a5[2].substring(1,3),16);}if(a5[3]){a7=H((a8=a5[3].charAt(3))+a8,16);E=H((a8=a5[3].charAt(2))+a8,16);i=H((a8=a5[3].charAt(1))+a8,16);}if(a5[4]){a5=a5[4][z](/\s*,\s*/);i=X(a5[0]);E=X(a5[1]);a7=X(a5[2]);}if(a5[5]){a5=a5[5][z](/\s*,\s*/);i=X(a5[0])*2.55;E=X(a5[1])*2.55;a7=X(a5[2])*2.55;}if(a5[6]){a5=a5[6][z](/\s*,\s*/);i=X(a5[0]);E=X(a5[1]);a7=X(a5[2]);return ap.hsb2rgb(i,E,a7);}if(a5[7]){a5=a5[7][z](/\s*,\s*/);i=X(a5[0])*2.55;E=X(a5[1])*2.55;a7=X(a5[2])*2.55;return ap.hsb2rgb(i,E,a7);}a5={r:i,g:E,b:a7};var e=(~~i)[aE](16),R=(~~E)[aE](16),a6=(~~a7)[aE](16);e=e[aT](aY,"0");R=R[aT](aY,"0");a6=a6[aT](aY,"0");a5.hex="#"+e+R+a6;return a5;}return{r:-1,g:-1,b:-1,hex:"none",error:1};},ap);ap.getColor=function(e){var i=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||0.75},d=this.hsb2rgb(i.h,i.s,i.b);i.h+=0.075;if(i.h>1){i.h=0;i.s-=0.2;i.s<=0&&(this.getColor.start={h:0,s:1,b:i.b});}return d.hex;};ap.getColor.reset=function(){delete this.start;};var ay=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,an=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig;ap.parsePathString=ak(function(d){if(!d){return null;}var i={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=[];if(ap.is(d,"array")&&ap.is(d[0],"array")){e=az(d);}if(!e[m]){(d+aw)[aT](ay,function(R,E,a6){var a5=[],S=a4.call(E);a6[aT](an,function(a8,a7){a7&&a5[f](+a7);});if(S=="m"&&a5[m]>2){e[f]([E][aW](a5.splice(0,2)));S="l";E=E=="m"?"l":"L";}while(a5[m]>=i[S]){e[f]([E][aW](a5.splice(0,i[S])));if(!i[S]){break;}}});}e[aE]=ap._path2string;return e;});ap.findDotsAtSegment=function(e,d,bj,bh,a5,R,a7,a6,bd){var bb=1-bd,ba=aQ(bb,3)*e+aQ(bb,2)*3*bd*bj+bb*3*bd*bd*a5+aQ(bd,3)*a7,a8=aQ(bb,3)*d+aQ(bb,2)*3*bd*bh+bb*3*bd*bd*R+aQ(bd,3)*a6,bf=e+2*bd*(bj-e)+bd*bd*(a5-2*bj+e),be=d+2*bd*(bh-d)+bd*bd*(R-2*bh+d),bi=bj+2*bd*(a5-bj)+bd*bd*(a7-2*a5+bj),bg=bh+2*bd*(R-bh)+bd*bd*(a6-2*R+bh),bc=(1-bd)*e+bd*bj,a9=(1-bd)*d+bd*bh,E=(1-bd)*a5+bd*a7,i=(1-bd)*R+bd*a6,S=(90-ac.atan((bf-bi)/(be-bg))*180/ac.PI);(bf>bi||be<bg)&&(S+=180);return{x:ba,y:a8,m:{x:bf,y:be},n:{x:bi,y:bg},start:{x:bc,y:a9},end:{x:E,y:i},alpha:S};};var V=ak(function(ba){if(!ba){return{x:0,y:0,width:0,height:0};}ba=I(ba);var a7=0,a6=0,R=[],e=[],E;for(var S=0,a9=ba[m];S<a9;S++){E=ba[S];if(E[0]=="M"){a7=E[1];a6=E[2];R[f](a7);e[f](a6);}else{var a5=aG(a7,a6,E[1],E[2],E[3],E[4],E[5],E[6]);R=R[aW](a5.min.x,a5.max.x);e=e[aW](a5.min.y,a5.max.y);a7=E[5];a6=E[6];}}var d=aM[a0](0,R),a8=aM[a0](0,e);return{x:d,y:a8,width:g[a0](0,R)-d,height:g[a0](0,e)-a8};}),az=function(a5){var E=[];if(!ap.is(a5,"array")||!ap.is(a5&&a5[0],"array")){a5=ap.parsePathString(a5);}for(var e=0,R=a5[m];e<R;e++){E[e]=[];for(var d=0,S=a5[e][m];d<S;d++){E[e][d]=a5[e][d];}}E[aE]=ap._path2string;return E;},ae=ak(function(R){if(!ap.is(R,"array")||!ap.is(R&&R[0],"array")){R=ap.parsePathString(R);}var a9=[],bb=0,ba=0,be=0,bd=0,E=0;if(R[0][0]=="M"){bb=R[0][1];ba=R[0][2];be=bb;bd=ba;E++;a9[f](["M",bb,ba]);}for(var a6=E,bf=R[m];a6<bf;a6++){var d=a9[a6]=[],bc=R[a6];if(bc[0]!=a4.call(bc[0])){d[0]=a4.call(bc[0]);switch(d[0]){case"a":d[1]=bc[1];d[2]=bc[2];d[3]=bc[3];d[4]=bc[4];d[5]=bc[5];d[6]=+(bc[6]-bb).toFixed(3);d[7]=+(bc[7]-ba).toFixed(3);break;case"v":d[1]=+(bc[1]-ba).toFixed(3);break;case"m":be=bc[1];bd=bc[2];default:for(var a5=1,a7=bc[m];a5<a7;a5++){d[a5]=+(bc[a5]-((a5%2)?bb:ba)).toFixed(3);}}}else{d=a9[a6]=[];if(bc[0]=="m"){be=bc[1]+bb;bd=bc[2]+ba;}for(var S=0,e=bc[m];S<e;S++){a9[a6][S]=bc[S];}}var a8=a9[a6][m];switch(a9[a6][0]){case"z":bb=be;ba=bd;break;case"h":bb+=+a9[a6][a8-1];break;case"v":ba+=+a9[a6][a8-1];break;default:bb+=+a9[a6][a8-2];ba+=+a9[a6][a8-1];}}a9[aE]=ap._path2string;return a9;},0,az),r=ak(function(R){if(!ap.is(R,"array")||!ap.is(R&&R[0],"array")){R=ap.parsePathString(R);}var a8=[],ba=0,a9=0,bd=0,bc=0,E=0;if(R[0][0]=="M"){ba=+R[0][1];a9=+R[0][2];bd=ba;bc=a9;E++;a8[0]=["M",ba,a9];}for(var a6=E,be=R[m];a6<be;a6++){var d=a8[a6]=[],bb=R[a6];if(bb[0]!=aR.call(bb[0])){d[0]=aR.call(bb[0]);switch(d[0]){case"A":d[1]=bb[1];d[2]=bb[2];d[3]=bb[3];d[4]=bb[4];d[5]=bb[5];d[6]=+(bb[6]+ba);d[7]=+(bb[7]+a9);break;case"V":d[1]=+bb[1]+a9;break;case"H":d[1]=+bb[1]+ba;break;case"M":bd=+bb[1]+ba;bc=+bb[2]+a9;default:for(var a5=1,a7=bb[m];a5<a7;a5++){d[a5]=+bb[a5]+((a5%2)?ba:a9);}}}else{for(var S=0,e=bb[m];S<e;S++){a8[a6][S]=bb[S];}}switch(d[0]){case"Z":ba=bd;a9=bc;break;case"H":ba=d[1];break;case"V":a9=d[1];break;default:ba=a8[a6][a8[a6][m]-2];a9=a8[a6][a8[a6][m]-1];}}a8[aE]=ap._path2string;return a8;},null,az),a1=function(e,E,d,i){return[e,E,d,i,d,i];},aO=function(e,E,a5,R,d,i){var S=1/3,a6=2/3;return[S*e+a6*a5,S*E+a6*R,S*d+a6*a5,S*i+a6*R,d,i];},L=function(be,bJ,bn,bl,bf,a9,S,bd,bI,bg){var R=ac.PI,bk=R*120/180,d=R/180*(+bf||0),br=[],bo,bF=ak(function(bK,bN,i){var bM=bK*ac.cos(i)-bN*ac.sin(i),bL=bK*ac.sin(i)+bN*ac.cos(i);return{x:bM,y:bL};});if(!bg){bo=bF(be,bJ,-d);be=bo.x;bJ=bo.y;bo=bF(bd,bI,-d);bd=bo.x;bI=bo.y;var e=ac.cos(R/180*bf),bb=ac.sin(R/180*bf),bt=(be-bd)/2,bs=(bJ-bI)/2;var bD=(bt*bt)/(bn*bn)+(bs*bs)/(bl*bl);if(bD>1){bD=ac.sqrt(bD);bn=bD*bn;bl=bD*bl;}var E=bn*bn,bw=bl*bl,by=(a9==S?-1:1)*ac.sqrt(ac.abs((E*bw-E*bs*bs-bw*bt*bt)/(E*bs*bs+bw*bt*bt))),bi=by*bn*bs/bl+(be+bd)/2,bh=by*-bl*bt/bn+(bJ+bI)/2,a8=ac.asin(((bJ-bh)/bl).toFixed(7)),a7=ac.asin(((bI-bh)/bl).toFixed(7));a8=be<bi?R-a8:a8;a7=bd<bi?R-a7:a7;a8<0&&(a8=R*2+a8);a7<0&&(a7=R*2+a7);if(S&&a8>a7){a8=a8-R*2;}if(!S&&a7>a8){a7=a7-R*2;}}else{a8=bg[0];a7=bg[1];bi=bg[2];bh=bg[3];}var bc=a7-a8;if(ac.abs(bc)>bk){var bj=a7,bm=bd,ba=bI;a7=a8+bk*(S&&a7>a8?1:-1);bd=bi+bn*ac.cos(a7);bI=bh+bl*ac.sin(a7);br=L(bd,bI,bn,bl,bf,0,S,bm,ba,[a7,bj,bi,bh]);}bc=a7-a8;var a6=ac.cos(a8),bH=ac.sin(a8),a5=ac.cos(a7),bG=ac.sin(a7),bu=ac.tan(bc/4),bx=4/3*bn*bu,bv=4/3*bl*bu,bE=[be,bJ],bC=[be+bx*bH,bJ-bv*a6],bB=[bd+bx*bG,bI-bv*a5],bz=[bd,bI];bC[0]=2*bE[0]-bC[0];bC[1]=2*bE[1]-bC[1];if(bg){return[bC,bB,bz][aW](br);}else{br=[bC,bB,bz][aW](br)[aD]()[z](",");var bp=[];for(var bA=0,bq=br[m];bA<bq;bA++){bp[bA]=bA%2?bF(br[bA-1],br[bA],d).y:bF(br[bA],br[bA+1],d).x;}return bp;}},N=function(e,d,E,i,a7,a6,a5,S,a8){var R=1-a8;return{x:aQ(R,3)*e+aQ(R,2)*3*a8*E+R*3*a8*a8*a7+aQ(a8,3)*a5,y:aQ(R,3)*d+aQ(R,2)*3*a8*i+R*3*a8*a8*a6+aQ(a8,3)*S};},aG=ak(function(i,d,R,E,be,bd,ba,a7){var bc=(be-2*R+i)-(ba-2*be+R),a9=2*(R-i)-2*(be-R),a6=i-R,a5=(-a9+ac.sqrt(a9*a9-4*bc*a6))/2/bc,S=(-a9-ac.sqrt(a9*a9-4*bc*a6))/2/bc,a8=[d,a7],bb=[i,ba],e;ac.abs(a5)>1000000000000&&(a5=0.5);ac.abs(S)>1000000000000&&(S=0.5);if(a5>0&&a5<1){e=N(i,d,R,E,be,bd,ba,a7,a5);bb[f](e.x);a8[f](e.y);}if(S>0&&S<1){e=N(i,d,R,E,be,bd,ba,a7,S);bb[f](e.x);a8[f](e.y);}bc=(bd-2*E+d)-(a7-2*bd+E);a9=2*(E-d)-2*(bd-E);a6=d-E;a5=(-a9+ac.sqrt(a9*a9-4*bc*a6))/2/bc;S=(-a9-ac.sqrt(a9*a9-4*bc*a6))/2/bc;ac.abs(a5)>1000000000000&&(a5=0.5);ac.abs(S)>1000000000000&&(S=0.5);if(a5>0&&a5<1){e=N(i,d,R,E,be,bd,ba,a7,a5);bb[f](e.x);a8[f](e.y);}if(S>0&&S<1){e=N(i,d,R,E,be,bd,ba,a7,S);bb[f](e.x);a8[f](e.y);}return{min:{x:aM[a0](0,bb),y:aM[a0](0,a8)},max:{x:g[a0](0,bb),y:g[a0](0,a8)}};}),I=ak(function(be,a9){var R=r(be),ba=a9&&r(a9),bb={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},d={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a5=function(bf,bg){var i,bh;if(!bf){return["C",bg.x,bg.y,bg.x,bg.y,bg.x,bg.y];}!(bf[0] in {T:1,Q:1})&&(bg.qx=bg.qy=null);switch(bf[0]){case"M":bg.X=bf[1];bg.Y=bf[2];break;case"A":bf=["C"][aW](L[a0](0,[bg.x,bg.y][aW](bf.slice(1))));break;case"S":i=bg.x+(bg.x-(bg.bx||bg.x));bh=bg.y+(bg.y-(bg.by||bg.y));bf=["C",i,bh][aW](bf.slice(1));break;case"T":bg.qx=bg.x+(bg.x-(bg.qx||bg.x));bg.qy=bg.y+(bg.y-(bg.qy||bg.y));bf=["C"][aW](aO(bg.x,bg.y,bg.qx,bg.qy,bf[1],bf[2]));break;case"Q":bg.qx=bf[1];bg.qy=bf[2];bf=["C"][aW](aO(bg.x,bg.y,bf[1],bf[2],bf[3],bf[4]));break;case"L":bf=["C"][aW](a1(bg.x,bg.y,bf[1],bf[2]));break;case"H":bf=["C"][aW](a1(bg.x,bg.y,bf[1],bg.y));break;case"V":bf=["C"][aW](a1(bg.x,bg.y,bg.x,bf[1]));break;case"Z":bf=["C"][aW](a1(bg.x,bg.y,bg.X,bg.Y));break;}return bf;},e=function(bf,bg){if(bf[bg][m]>7){bf[bg].shift();var bh=bf[bg];while(bh[m]){bf.splice(bg++,0,["C"][aW](bh.splice(0,6)));}bf.splice(bg,1);bc=g(R[m],ba&&ba[m]||0);}},E=function(bj,bi,bg,bf,bh){if(bj&&bi&&bj[bh][0]=="M"&&bi[bh][0]!="M"){bi.splice(bh,0,["M",bf.x,bf.y]);bg.bx=0;bg.by=0;bg.x=bj[bh][1];bg.y=bj[bh][2];bc=g(R[m],ba&&ba[m]||0);}};for(var a7=0,bc=g(R[m],ba&&ba[m]||0);a7<bc;a7++){R[a7]=a5(R[a7],bb);e(R,a7);ba&&(ba[a7]=a5(ba[a7],d));ba&&e(ba,a7);E(R,ba,bb,d,a7);E(ba,R,d,bb,a7);var a6=R[a7],bd=ba&&ba[a7],S=a6[m],a8=ba&&bd[m];bb.x=a6[S-2];bb.y=a6[S-1];bb.bx=X(a6[S-4])||bb.x;bb.by=X(a6[S-3])||bb.y;d.bx=ba&&(X(bd[a8-4])||d.x);d.by=ba&&(X(bd[a8-3])||d.y);d.x=ba&&bd[a8-2];d.y=ba&&bd[a8-1];}return ba?[R,ba]:R;},null,az),p=ak(function(a9){var a8=[];for(var a5=0,ba=a9[m];a5<ba;a5++){var e={},a7=a9[a5].match(/^([^:]*):?([\d\.]*)/);e.color=ap.getRGB(a7[1]);if(e.color.error){return null;}e.color=e.color.hex;a7[2]&&(e.offset=a7[2]+"%");a8[f](e);}for(var a5=1,ba=a8[m]-1;a5<ba;a5++){if(!a8[a5].offset){var E=X(a8[a5-1].offset||0),R=0;for(var S=a5+1;S<ba;S++){if(a8[S].offset){R=a8[S].offset;break;}}if(!R){R=100;S=ba;}R=X(R);var a6=(R-E)/(S-a5+1);for(;a5<S;a5++){E+=a6;a8[a5].offset=E+"%";}}}return a8;}),aq=function(){var i,e,R,E,d;if(ap.is(arguments[0],"string")||ap.is(arguments[0],"object")){if(ap.is(arguments[0],"string")){i=M.getElementById(arguments[0]);}else{i=arguments[0];}if(i.tagName){if(arguments[1]==null){return{container:i,width:i.style.pixelWidth||i.offsetWidth,height:i.style.pixelHeight||i.offsetHeight};}else{return{container:i,width:arguments[1],height:arguments[2]};}}}else{if(ap.is(arguments[0],am)&&arguments[m]>3){return{container:1,x:arguments[0],y:arguments[1],width:arguments[2],height:arguments[3]};}}},aK=function(d,i){var e=this;for(var E in i){if(i[T](E)&&!(E in d)){switch(typeof i[E]){case"function":(function(R){d[E]=d===e?R:function(){return R[a0](e,arguments);};})(i[E]);break;case"object":d[E]=d[E]||{};aK.call(this,d[E],i[E]);break;default:d[E]=i[E];break;}}}},al=function(d,e){d==e.top&&(e.top=d.prev);d==e.bottom&&(e.bottom=d.next);d.next&&(d.next.prev=d.prev);d.prev&&(d.prev.next=d.next);},Z=function(d,e){if(e.top===d){return;}al(d,e);d.next=null;d.prev=e.top;e.top.next=d;e.top=d;},k=function(d,e){if(e.bottom===d){return;}al(d,e);d.next=e.bottom;d.prev=null;e.bottom.prev=d;e.bottom=d;},A=function(e,d,i){al(e,i);d==i.top&&(i.top=e);d.next&&(d.next.prev=e);e.next=d.next;e.prev=d;d.next=e;},at=function(e,d,i){al(e,i);d==i.bottom&&(i.bottom=e);d.prev&&(d.prev.next=e);e.prev=d.prev;d.prev=e;e.next=d;},s=function(d){return function(){throw new Error("Rapha\xebl: you are calling to method \u201c"+d+"\u201d of removed object");};},av=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;if(ap.svg){aX[a2].svgns="http://www.w3.org/2000/svg";aX[a2].xlink="http://www.w3.org/1999/xlink";var P=function(d){return +d+(~~d===d)*0.5;},W=function(S){for(var e=0,E=S[m];e<E;e++){if(a4.call(S[e][0])!="a"){for(var d=1,R=S[e][m];d<R;d++){S[e][d]=P(S[e][d]);}}else{S[e][6]=P(S[e][6]);S[e][7]=P(S[e][7]);}}return S;},aN=function(i,d){if(d){for(var e in d){if(d[T](e)){i[v](e,d[e]);}}}else{return M.createElementNS(aX[a2].svgns,i);}};ap[aE]=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version;};var q=function(d,E){var e=aN("path");E.canvas&&E.canvas[aP](e);var i=new aB(e,E);i.type="path";ab(i,{fill:"none",stroke:"#000",path:d});return i;};var b=function(E,bc,d){var a9="linear",a6=0.5,S=0.5,be=E.style;bc=(bc+aw)[aT](av,function(bg,i,bh){a9="radial";if(i&&bh){a6=X(i);S=X(bh);var bf=((S>0.5)*2-1);aQ(a6-0.5,2)+aQ(S-0.5,2)>0.25&&(S=ac.sqrt(0.25-aQ(a6-0.5,2))*bf+0.5)&&S!=0.5&&(S=S.toFixed(5)-0.00001*bf);}return aw;});bc=bc[z](/\s*\-\s*/);if(a9=="linear"){var a5=bc.shift();a5=-X(a5);if(isNaN(a5)){return null;}var R=[0,0,ac.cos(a5*ac.PI/180),ac.sin(a5*ac.PI/180)],bb=1/(g(ac.abs(R[2]),ac.abs(R[3]))||1);R[2]*=bb;R[3]*=bb;if(R[2]<0){R[0]=-R[2];R[2]=0;}if(R[3]<0){R[1]=-R[3];R[3]=0;}}var a8=p(bc);if(!a8){return null;}var e=aN(a9+"Gradient");e.id="r"+(ap._id++)[aE](36);aN(e,a9=="radial"?{fx:a6,fy:S}:{x1:R[0],y1:R[1],x2:R[2],y2:R[3]});d.defs[aP](e);for(var a7=0,bd=a8[m];a7<bd;a7++){var ba=aN("stop");aN(ba,{offset:a8[a7].offset?a8[a7].offset:!a7?"0%":"100%","stop-color":a8[a7].color||"#fff"});e[aP](ba);}aN(E,{fill:"url(#"+e.id+")",opacity:1,"fill-opacity":1});be.fill=aw;be.opacity=1;be.fillOpacity=1;return 1;};var O=function(e){var d=e.getBBox();aN(e.pattern,{patternTransform:ap.format("translate({0},{1})",d.x,d.y)});};var ab=function(bb,bk){var be={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},bg=bb.node,bc=bb.attrs,a8=bb.rotate(),S=function(br,bq){bq=be[a4.call(bq)];if(bq){var bo=br.attrs["stroke-width"]||"1",bm={round:bo,square:bo,butt:0}[br.attrs["stroke-linecap"]||bk["stroke-linecap"]]||0,bp=[];var bn=bq[m];while(bn--){bp[bn]=bq[bn]*bo+((bn%2)?1:-1)*bm;}aN(bg,{"stroke-dasharray":bp[aD](",")});}};bk[T]("rotation")&&(a8=bk.rotation);var a7=(a8+aw)[z](a);if(!(a7.length-1)){a7=null;}else{a7[1]=+a7[1];a7[2]=+a7[2];}X(a8)&&bb.rotate(0,true);for(var bf in bk){if(bk[T](bf)){if(!j[T](bf)){continue;}var bd=bk[bf];bc[bf]=bd;switch(bf){case"rotation":bb.rotate(bd,true);break;case"href":case"title":case"target":var bi=bg.parentNode;if(a4.call(bi.tagName)!="a"){var E=aN("a");bi.insertBefore(E,bg);E[aP](bg);bi=E;}bi.setAttributeNS(bb.paper.xlink,bf,bd);break;case"cursor":bg.style.cursor=bd;break;case"clip-rect":var e=(bd+aw)[z](a);if(e[m]==4){bb.clip&&bb.clip.parentNode.parentNode.removeChild(bb.clip.parentNode);var i=aN("clipPath"),bh=aN("rect");i.id="r"+(ap._id++)[aE](36);aN(bh,{x:e[0],y:e[1],width:e[2],height:e[3]});i[aP](bh);bb.paper.defs[aP](i);aN(bg,{"clip-path":"url(#"+i.id+")"});bb.clip=bh;}if(!bd){var bj=M.getElementById(bg.getAttribute("clip-path")[aT](/(^url\(#|\)$)/g,aw));bj&&bj.parentNode.removeChild(bj);aN(bg,{"clip-path":aw});delete bb.clip;}break;case"path":if(bb.type=="path"){aN(bg,{d:bd?bc.path=W(r(bd)):"M0,0"});}break;case"width":bg[v](bf,bd);if(bc.fx){bf="x";bd=bc.x;}else{break;}case"x":if(bc.fx){bd=-bc.x-(bc.width||0);}case"rx":if(bf=="rx"&&bb.type=="rect"){break;}case"cx":a7&&(bf=="x"||bf=="cx")&&(a7[1]+=bd-bc[bf]);bg[v](bf,P(bd));bb.pattern&&O(bb);break;case"height":bg[v](bf,bd);if(bc.fy){bf="y";bd=bc.y;}else{break;}case"y":if(bc.fy){bd=-bc.y-(bc.height||0);}case"ry":if(bf=="ry"&&bb.type=="rect"){break;}case"cy":a7&&(bf=="y"||bf=="cy")&&(a7[2]+=bd-bc[bf]);bg[v](bf,P(bd));bb.pattern&&O(bb);break;case"r":if(bb.type=="rect"){aN(bg,{rx:bd,ry:bd});}else{bg[v](bf,bd);}break;case"src":if(bb.type=="image"){bg.setAttributeNS(bb.paper.xlink,"href",bd);}break;case"stroke-width":bg.style.strokeWidth=bd;bg[v](bf,bd);if(bc["stroke-dasharray"]){S(bb,bc["stroke-dasharray"]);}break;case"stroke-dasharray":S(bb,bd);break;case"translation":var a5=(bd+aw)[z](a);a5[0]=+a5[0]||0;a5[1]=+a5[1]||0;if(a7){a7[1]+=a5[0];a7[2]+=a5[1];}t.call(bb,a5[0],a5[1]);break;case"scale":var a5=(bd+aw)[z](a);bb.scale(+a5[0]||1,+a5[1]||+a5[0]||1,+a5[2]||null,+a5[3]||null);break;case"fill":var R=(bd+aw).match(c);if(R){var i=aN("pattern"),ba=aN("image");i.id="r"+(ap._id++)[aE](36);aN(i,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});aN(ba,{x:0,y:0});ba.setAttributeNS(bb.paper.xlink,"href",R[1]);i[aP](ba);var bl=M.createElement("img");bl.style.cssText="position:absolute;left:-9999em;top-9999em";bl.onload=function(){aN(i,{width:this.offsetWidth,height:this.offsetHeight});aN(ba,{width:this.offsetWidth,height:this.offsetHeight});M.body.removeChild(this);bb.paper.safari();};M.body[aP](bl);bl.src=R[1];bb.paper.defs[aP](i);bg.style.fill="url(#"+i.id+")";aN(bg,{fill:"url(#"+i.id+")"});bb.pattern=i;bb.pattern&&O(bb);break;}if(!ap.getRGB(bd).error){delete bk.gradient;delete bc.gradient;!ap.is(bc.opacity,"undefined")&&ap.is(bk.opacity,"undefined")&&aN(bg,{opacity:bc.opacity});!ap.is(bc["fill-opacity"],"undefined")&&ap.is(bk["fill-opacity"],"undefined")&&aN(bg,{"fill-opacity":bc["fill-opacity"]});}else{if((({circle:1,ellipse:1})[T](bb.type)||(bd+aw).charAt()!="r")&&b(bg,bd,bb.paper)){bc.gradient=bd;bc.fill="none";break;}}case"stroke":bg[v](bf,ap.getRGB(bd).hex);break;case"gradient":(({circle:1,ellipse:1})[T](bb.type)||(bd+aw).charAt()!="r")&&b(bg,bd,bb.paper);break;case"opacity":case"fill-opacity":if(bc.gradient){var d=M.getElementById(bg.getAttribute("fill")[aT](/^url\(#|\)$/g,aw));if(d){var a6=d.getElementsByTagName("stop");a6[a6[m]-1][v]("stop-opacity",bd);}break;}default:bf=="font-size"&&(bd=H(bd,10)+"px");var a9=bf[aT](/(\-.)/g,function(bm){return aR.call(bm.substring(1));});bg.style[a9]=bd;bg[v](bf,bd);break;}}}F(bb,bk);if(a7){bb.rotate(a7.join(ao));}else{X(a8)&&bb.rotate(a8,true);}};var h=1.2;var F=function(d,R){if(d.type!="text"||!(R[T]("text")||R[T]("font")||R[T]("font-size")||R[T]("x")||R[T]("y"))){return;}var a8=d.attrs,e=d.node,ba=e.firstChild?H(M.defaultView.getComputedStyle(e.firstChild,aw).getPropertyValue("font-size"),10):10;if(R[T]("text")){a8.text=R.text;while(e.firstChild){e.removeChild(e.firstChild);}var E=(R.text+aw)[z]("\n");for(var S=0,a9=E[m];S<a9;S++){if(E[S]){var a6=aN("tspan");S&&aN(a6,{dy:ba*h,x:a8.x});a6[aP](M.createTextNode(E[S]));e[aP](a6);}}}else{var E=e.getElementsByTagName("tspan");for(var S=0,a9=E[m];S<a9;S++){S&&aN(E[S],{dy:ba*h,x:a8.x});}}aN(e,{y:a8.y});var a5=d.getBBox(),a7=a8.y-(a5.y+a5.height/2);a7&&isFinite(a7)&&aN(e,{y:a8.y+a7});};var aB=function(e,d){var E=0,i=0;this[0]=e;this.id=ap._oid++;this.node=e;e.raphael=this;this.paper=d;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!d.bottom&&(d.bottom=this);this.prev=d.top;d.top&&(d.top.next=this);d.top=this;this.next=null;};aB[a2].rotate=function(e,d,E){if(this.removed){return this;}if(e==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aD](ao);}return this._.rt.deg;}var i=this.getBBox();e=(e+aw)[z](a);if(e[m]-1){d=X(e[1]);E=X(e[2]);}e=X(e[0]);if(d!=null){this._.rt.deg=e;}else{this._.rt.deg+=e;}(E==null)&&(d=null);this._.rt.cx=d;this._.rt.cy=E;d=d==null?i.x+i.width/2:d;E=E==null?i.y+i.height/2:E;if(this._.rt.deg){this.transformations[0]=ap.format("rotate({0} {1} {2})",this._.rt.deg,d,E);this.clip&&aN(this.clip,{transform:ap.format("rotate({0} {1} {2})",-this._.rt.deg,d,E)});}else{this.transformations[0]=aw;this.clip&&aN(this.clip,{transform:aw});}aN(this.node,{transform:this.transformations[aD](ao)});return this;};aB[a2].hide=function(){!this.removed&&(this.node.style.display="none");return this;};aB[a2].show=function(){!this.removed&&(this.node.style.display="");return this;};aB[a2].remove=function(){if(this.removed){return;}al(this,this.paper);this.node.parentNode.removeChild(this.node);for(var d in this){delete this[d];}this.removed=true;};aB[a2].getBBox=function(){if(this.removed){return this;}if(this.type=="path"){return V(this.attrs.path);}if(this.node.style.display=="none"){this.show();var E=true;}var a6={};try{a6=this.node.getBBox();}catch(S){}finally{a6=a6||{};}if(this.type=="text"){a6={x:a6.x,y:Infinity,width:0,height:0};for(var d=0,R=this.node.getNumberOfChars();d<R;d++){var a5=this.node.getExtentOfChar(d);(a5.y<a6.y)&&(a6.y=a5.y);(a5.y+a5.height-a6.y>a6.height)&&(a6.height=a5.y+a5.height-a6.y);(a5.x+a5.width-a6.x>a6.width)&&(a6.width=a5.x+a5.width-a6.x);}}E&&this.hide();return a6;};aB[a2].attr=function(){if(this.removed){return this;}if(arguments[m]==0){var R={};for(var E in this.attrs){if(this.attrs[T](E)){R[E]=this.attrs[E];}}this._.rt.deg&&(R.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(R.scale=this.scale());R.gradient&&R.fill=="none"&&(R.fill=R.gradient)&&delete R.gradient;return R;}if(arguments[m]==1&&ap.is(arguments[0],"string")){if(arguments[0]=="translation"){return t.call(this);}if(arguments[0]=="rotation"){return this.rotate();}if(arguments[0]=="scale"){return this.scale();}if(arguments[0]=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient;}return this.attrs[arguments[0]];}if(arguments[m]==1&&ap.is(arguments[0],"array")){var d={};for(var e in arguments[0]){if(arguments[0][T](e)){d[arguments[0][e]]=this.attrs[arguments[0][e]];}}return d;}if(arguments[m]==2){var S={};S[arguments[0]]=arguments[1];ab(this,S);}else{if(arguments[m]==1&&ap.is(arguments[0],"object")){ab(this,arguments[0]);}}return this;};aB[a2].toFront=function(){if(this.removed){return this;}this.node.parentNode[aP](this.node);var d=this.paper;d.top!=this&&Z(this,d);return this;};aB[a2].toBack=function(){if(this.removed){return this;}if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);k(this,this.paper);var d=this.paper;}return this;};aB[a2].insertAfter=function(d){if(this.removed){return this;}var e=d.node;if(e.nextSibling){e.parentNode.insertBefore(this.node,e.nextSibling);}else{e.parentNode[aP](this.node);}A(this,d,this.paper);return this;};aB[a2].insertBefore=function(d){if(this.removed){return this;}var e=d.node;e.parentNode.insertBefore(this.node,e);at(this,d,this.paper);return this;};var Q=function(e,d,S,R){d=P(d);S=P(S);var E=aN("circle");e.canvas&&e.canvas[aP](E);var i=new aB(E,e);i.attrs={cx:d,cy:S,r:R,fill:"none",stroke:"#000"};i.type="circle";aN(E,i.attrs);return i;};var aJ=function(i,d,a6,e,S,a5){d=P(d);a6=P(a6);var R=aN("rect");i.canvas&&i.canvas[aP](R);var E=new aB(R,i);E.attrs={x:d,y:a6,width:e,height:S,r:a5||0,rx:a5||0,ry:a5||0,fill:"none",stroke:"#000"};E.type="rect";aN(R,E.attrs);return E;};var aj=function(e,d,a5,S,R){d=P(d);a5=P(a5);var E=aN("ellipse");e.canvas&&e.canvas[aP](E);var i=new aB(E,e);i.attrs={cx:d,cy:a5,rx:S,ry:R,fill:"none",stroke:"#000"};i.type="ellipse";aN(E,i.attrs);return i;};var o=function(i,a5,d,a6,e,S){var R=aN("image");aN(R,{x:d,y:a6,width:e,height:S,preserveAspectRatio:"none"});R.setAttributeNS(i.xlink,"href",a5);i.canvas&&i.canvas[aP](R);var E=new aB(R,i);E.attrs={x:d,y:a6,width:e,height:S,src:a5};E.type="image";return E;};var Y=function(e,d,S,R){var E=aN("text");aN(E,{x:d,y:S,"text-anchor":"middle"});e.canvas&&e.canvas[aP](E);var i=new aB(E,e);i.attrs={x:d,y:S,"text-anchor":"middle",text:R,font:j.font,stroke:"none",fill:"#000"};i.type="text";ab(i,i.attrs);return i;};var aZ=function(e,d){this.width=e||this.width;this.height=d||this.height;this.canvas[v]("width",this.width);this.canvas[v]("height",this.height);return this;};var w=function(){var E=aq[a0](null,arguments),i=E&&E.container,e=E.x,a5=E.y,R=E.width,d=E.height;if(!i){throw new Error("SVG container not found.");}var S=aN("svg");R=R||512;d=d||342;aN(S,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:R,height:d});if(i==1){S.style.cssText="position:absolute;left:"+e+"px;top:"+a5+"px";M.body[aP](S);}else{if(i.firstChild){i.insertBefore(S,i.firstChild);}else{i[aP](S);}}i=new aX;i.width=R;i.height=d;i.canvas=S;aK.call(i,i,ap.fn);i.clear();return i;};aX[a2].clear=function(){var d=this.canvas;while(d.firstChild){d.removeChild(d.firstChild);}this.bottom=this.top=null;(this.desc=aN("desc"))[aP](M.createTextNode("Created with Rapha\xebl"));d[aP](this.desc);d[aP](this.defs=aN("defs"));};aX[a2].remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var d in this){this[d]=s(d);}};}if(ap.vml){var D={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},au=/([clmz]),?([^clmz]*)/gi,a3=/-?[^,\s-]+/g,aL=function(ba){var a7=/[ahqstv]/ig,E=r;(ba+aw).match(a7)&&(E=I);a7=/[clmz]/g;if(E==r&&!(ba+aw).match(a7)){var a6=(ba+aw)[aT](au,function(bd,bf,bb){var be=[],i=a4.call(bf)=="m",bc=D[bf];bb[aT](a3,function(bg){if(i&&be[m]==2){bc+=be+D[bf=="m"?"l":"L"];be=[];}be[f](P(bg));});return bc+be;});return a6;}var a8=E(ba),e,a6=[],d;for(var S=0,a9=a8[m];S<a9;S++){e=a8[S];d=a4.call(a8[S][0]);d=="z"&&(d="x");for(var R=1,a5=e[m];R<a5;R++){d+=P(e[R])+(R!=a5-1?",":aw);}a6[f](d);}return a6[aD](ao);};ap[aE]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version;};var q=function(e,a5){var R=ai("group");R.style.cssText="position:absolute;left:0;top:0;width:"+a5.width+"px;height:"+a5.height+"px";R.coordsize=a5.coordsize;R.coordorigin=a5.coordorigin;var E=ai("shape"),i=E.style;i.width=a5.width+"px";i.height=a5.height+"px";E.coordsize=this.coordsize;E.coordorigin=this.coordorigin;R[aP](E);var S=new aB(E,R,a5),d={fill:"none",stroke:"#000"};e&&(d.path=e);S.isAbsolute=true;S.type="path";S.path=[];S.Path=aw;ab(S,d);a5.canvas[aP](R);return S;};var ab=function(a8,bd){a8.attrs=a8.attrs||{};var bb=a8.node,be=a8.attrs,a5=bb.style,E,bi=a8;for(var a6 in bd){if(bd[T](a6)){be[a6]=bd[a6];}}bd.href&&(bb.href=bd.href);bd.title&&(bb.title=bd.title);bd.target&&(bb.target=bd.target);bd.cursor&&(a5.cursor=bd.cursor);if(bd.path&&a8.type=="path"){be.path=bd.path;bb.path=aL(be.path);}if(bd.rotation!=null){a8.rotate(bd.rotation,true);}if(bd.translation){E=(bd.translation+aw)[z](a);t.call(a8,E[0],E[1]);if(a8._.rt.cx!=null){a8._.rt.cx+=+E[0];a8._.rt.cy+=+E[1];a8.setBox(a8.attrs,E[0],E[1]);}}if(bd.scale){E=(bd.scale+aw)[z](a);a8.scale(+E[0]||1,+E[1]||+E[0]||1,+E[2]||null,+E[3]||null);}if("clip-rect" in bd){var d=(bd["clip-rect"]+aw)[z](a);if(d[m]==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);var a7=bb.clipRect||M.createElement("div"),bh=a7.style,S=bb.parentNode;bh.clip=ap.format("rect({1}px {2}px {3}px {0}px)",d);if(!bb.clipRect){bh.position="absolute";bh.top=0;bh.left=0;bh.width=a8.paper.width+"px";bh.height=a8.paper.height+"px";S.parentNode.insertBefore(a7,S);a7[aP](S);bb.clipRect=a7;}}if(!bd["clip-rect"]){bb.clipRect&&(bb.clipRect.style.clip=aw);}}if(a8.type=="image"&&bd.src){bb.src=bd.src;}if(a8.type=="image"&&bd.opacity){bb.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(bd.opacity*100)+")";a5.filter=(bb.filterMatrix||aw)+(bb.filterOpacity||aw);}bd.font&&(a5.font=bd.font);bd["font-family"]&&(a5.fontFamily='"'+bd["font-family"][z](",")[0][aT](/^['"]+|['"]+$/g,aw)+'"');bd["font-size"]&&(a5.fontSize=bd["font-size"]);bd["font-weight"]&&(a5.fontWeight=bd["font-weight"]);bd["font-style"]&&(a5.fontStyle=bd["font-style"]);if(bd.opacity!=null||bd["stroke-width"]!=null||bd.fill!=null||bd.stroke!=null||bd["stroke-width"]!=null||bd["stroke-opacity"]!=null||bd["fill-opacity"]!=null||bd["stroke-dasharray"]!=null||bd["stroke-miterlimit"]!=null||bd["stroke-linejoin"]!=null||bd["stroke-linecap"]!=null){bb=a8.shape||bb;var bc=(bb.getElementsByTagName("fill")&&bb.getElementsByTagName("fill")[0]),bf=false;!bc&&(bf=bc=ai("fill"));if("fill-opacity" in bd||"opacity" in bd){var e=((+be["fill-opacity"]+1||2)-1)*((+be.opacity+1||2)-1);e<0&&(e=0);e>1&&(e=1);bc.opacity=e;}bd.fill&&(bc.on=true);if(bc.on==null||bd.fill=="none"){bc.on=false;}if(bc.on&&bd.fill){var i=bd.fill.match(c);if(i){bc.src=i[1];bc.type="tile";}else{bc.color=ap.getRGB(bd.fill).hex;bc.src=aw;bc.type="solid";if(ap.getRGB(bd.fill).error&&(bi.type in {circle:1,ellipse:1}||(bd.fill+aw).charAt()!="r")&&b(bi,bd.fill)){be.fill="none";be.gradient=bd.fill;}}}bf&&bb[aP](bc);var R=(bb.getElementsByTagName("stroke")&&bb.getElementsByTagName("stroke")[0]),bg=false;!R&&(bg=R=ai("stroke"));if((bd.stroke&&bd.stroke!="none")||bd["stroke-width"]||bd["stroke-opacity"]!=null||bd["stroke-dasharray"]||bd["stroke-miterlimit"]||bd["stroke-linejoin"]||bd["stroke-linecap"]){R.on=true;}(bd.stroke=="none"||R.on==null||bd.stroke==0||bd["stroke-width"]==0)&&(R.on=false);R.on&&bd.stroke&&(R.color=ap.getRGB(bd.stroke).hex);var e=((+be["stroke-opacity"]+1||2)-1)*((+be.opacity+1||2)-1),a9=(X(bd["stroke-width"])||1)*0.75;e<0&&(e=0);e>1&&(e=1);bd["stroke-width"]==null&&(a9=be["stroke-width"]);bd["stroke-width"]&&(R.weight=a9);a9&&a9<1&&(e*=a9)&&(R.weight=1);R.opacity=e;bd["stroke-linejoin"]&&(R.joinstyle=bd["stroke-linejoin"]||"miter");R.miterlimit=bd["stroke-miterlimit"]||8;bd["stroke-linecap"]&&(R.endcap=bd["stroke-linecap"]=="butt"?"flat":bd["stroke-linecap"]=="square"?"square":"round");if(bd["stroke-dasharray"]){var ba={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};R.dashstyle=ba[T](bd["stroke-dasharray"])?ba[bd["stroke-dasharray"]]:aw;}bg&&bb[aP](R);}if(bi.type=="text"){var a5=bi.paper.span.style;be.font&&(a5.font=be.font);be["font-family"]&&(a5.fontFamily=be["font-family"]);be["font-size"]&&(a5.fontSize=be["font-size"]);be["font-weight"]&&(a5.fontWeight=be["font-weight"]);be["font-style"]&&(a5.fontStyle=be["font-style"]);bi.node.string&&(bi.paper.span.innerHTML=(bi.node.string+aw)[aT](/</g,"&#60;")[aT](/&/g,"&#38;")[aT](/\n/g,"<br>"));bi.W=be.w=bi.paper.span.offsetWidth;bi.H=be.h=bi.paper.span.offsetHeight;bi.X=be.x;bi.Y=be.y+P(bi.H/2);switch(be["text-anchor"]){case"start":bi.node.style["v-text-align"]="left";bi.bbx=P(bi.W/2);break;case"end":bi.node.style["v-text-align"]="right";bi.bbx=-P(bi.W/2);break;default:bi.node.style["v-text-align"]="center";break;}}};var b=function(d,a6){d.attrs=d.attrs||{};var a7=d.attrs,a9=d.node.getElementsByTagName("fill"),S="linear",a5=".5 .5";d.attrs.gradient=a6;a6=(a6+aw)[aT](av,function(bb,bc,i){S="radial";if(bc&&i){bc=X(bc);i=X(i);aQ(bc-0.5,2)+aQ(i-0.5,2)>0.25&&(i=ac.sqrt(0.25-aQ(bc-0.5,2))*((i>0.5)*2-1)+0.5);a5=bc+ao+i;}return aw;});a6=a6[z](/\s*\-\s*/);if(S=="linear"){var e=a6.shift();e=-X(e);if(isNaN(e)){return null;}}var R=p(a6);if(!R){return null;}d=d.shape||d.node;a9=a9[0]||ai("fill");if(R[m]){a9.on=true;a9.method="none";a9.type=(S=="radial")?"gradientradial":"gradient";a9.color=R[0].color;a9.color2=R[R[m]-1].color;var ba=[];for(var E=0,a8=R[m];E<a8;E++){R[E].offset&&ba[f](R[E].offset+ao+R[E].color);}a9.colors&&(a9.colors.value=ba[m]?ba[aD](","):"0% "+a9.color);if(S=="radial"){a9.focus="100%";a9.focussize=a5;a9.focusposition=a5;}else{a9.angle=(270-e)%360;}}return 1;};var aB=function(R,a5,d){var S=0,i=0,e=0,E=1;this[0]=R;this.id=ap._oid++;this.node=R;R.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=a5;this.paper=d;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!d.bottom&&(d.bottom=this);this.prev=d.top;d.top&&(d.top.next=this);d.top=this;this.next=null;};aB[a2].rotate=function(e,d,i){if(this.removed){return this;}if(e==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aD](ao);}return this._.rt.deg;}e=(e+aw)[z](a);if(e[m]-1){d=X(e[1]);i=X(e[2]);}e=X(e[0]);if(d!=null){this._.rt.deg=e;}else{this._.rt.deg+=e;}i==null&&(d=null);this._.rt.cx=d;this._.rt.cy=i;this.setBox(this.attrs,d,i);this.Group.style.rotation=this._.rt.deg;return this;};aB[a2].setBox=function(bg,e,d){if(this.removed){return this;}var ba=this.Group.style,R=(this.shape&&this.shape.style)||this.node.style;bg=bg||{};for(var be in bg){if(bg[T](be)){this.attrs[be]=bg[be];}}e=e||this._.rt.cx;d=d||this._.rt.cy;var bc=this.attrs,a6,a5,a7,bf;switch(this.type){case"circle":a6=bc.cx-bc.r;a5=bc.cy-bc.r;a7=bf=bc.r*2;break;case"ellipse":a6=bc.cx-bc.rx;a5=bc.cy-bc.ry;a7=bc.rx*2;bf=bc.ry*2;break;case"rect":case"image":a6=+bc.x;a5=+bc.y;a7=bc.width||0;bf=bc.height||0;break;case"text":this.textpath.v=["m",P(bc.x),", ",P(bc.y-2),"l",P(bc.x)+1,", ",P(bc.y-2)][aD](aw);a6=bc.x-P(this.W/2);a5=bc.y-this.H/2;a7=this.W;bf=this.H;break;case"path":if(!this.attrs.path){a6=0;a5=0;a7=this.paper.width;bf=this.paper.height;}else{var bd=V(this.attrs.path);a6=bd.x;a5=bd.y;a7=bd.width;bf=bd.height;}break;default:a6=0;a5=0;a7=this.paper.width;bf=this.paper.height;break;}e=(e==null)?a6+a7/2:e;d=(d==null)?a5+bf/2:d;var E=e-this.paper.width/2,a9=d-this.paper.height/2;if(this.type=="path"||this.type=="text"){(ba.left!=E+"px")&&(ba.left=E+"px");(ba.top!=a9+"px")&&(ba.top=a9+"px");this.X=this.type=="text"?a6:-E;this.Y=this.type=="text"?a5:-a9;this.W=a7;this.H=bf;(R.left!=-E+"px")&&(R.left=-E+"px");(R.top!=-a9+"px")&&(R.top=-a9+"px");}else{(ba.left!=E+"px")&&(ba.left=E+"px");(ba.top!=a9+"px")&&(ba.top=a9+"px");this.X=a6;this.Y=a5;this.W=a7;this.H=bf;(ba.width!=this.paper.width+"px")&&(ba.width=this.paper.width+"px");(ba.height!=this.paper.height+"px")&&(ba.height=this.paper.height+"px");(R.left!=a6-E+"px")&&(R.left=a6-E+"px");(R.top!=a5-a9+"px")&&(R.top=a5-a9+"px");(R.width!=a7+"px")&&(R.width=a7+"px");(R.height!=bf+"px")&&(R.height=bf+"px");var S=(+bg.r||0)/aM(a7,bf);if(this.type=="rect"&&this.arcsize.toFixed(4)!=S.toFixed(4)&&(S||this.arcsize)){var bb=ai("roundrect"),bh={},be=0,a8=this.events&&this.events[m];bb.arcsize=S;bb.raphael=this;this.Group[aP](bb);this.Group.removeChild(this.node);this[0]=this.node=bb;this.arcsize=S;for(var be in bc){bh[be]=bc[be];}delete bh.scale;this.attr(bh);if(this.events){for(;be<a8;be++){this.events[be].unbind=af(this.node,this.events[be].name,this.events[be].f,this);}}}}};aB[a2].hide=function(){!this.removed&&(this.Group.style.display="none");return this;};aB[a2].show=function(){!this.removed&&(this.Group.style.display="block");return this;};aB[a2].getBBox=function(){if(this.removed){return this;}if(this.type=="path"){return V(this.attrs.path);}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H};};aB[a2].remove=function(){if(this.removed){return;}al(this,this.paper);this.node.parentNode.removeChild(this.node);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var d in this){delete this[d];}this.removed=true;};aB[a2].attr=function(){if(this.removed){return this;}if(arguments[m]==0){var E={};for(var e in this.attrs){if(this.attrs[T](e)){E[e]=this.attrs[e];}}this._.rt.deg&&(E.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(E.scale=this.scale());E.gradient&&E.fill=="none"&&(E.fill=E.gradient)&&delete E.gradient;return E;}if(arguments[m]==1&&ap.is(arguments[0],"string")){if(arguments[0]=="translation"){return t.call(this);}if(arguments[0]=="rotation"){return this.rotate();}if(arguments[0]=="scale"){return this.scale();}if(arguments[0]=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient;}return this.attrs[arguments[0]];}if(this.attrs&&arguments[m]==1&&ap.is(arguments[0],"array")){var d={};for(var e=0,R=arguments[0][m];e<R;e++){d[arguments[0][e]]=this.attrs[arguments[0][e]];}return d;}var S;if(arguments[m]==2){S={};S[arguments[0]]=arguments[1];}arguments[m]==1&&ap.is(arguments[0],"object")&&(S=arguments[0]);if(S){if(S.text&&this.type=="text"){this.node.string=S.text;}ab(this,S);if(S.gradient&&(({circle:1,ellipse:1})[T](this.type)||(S.gradient+aw).charAt()!="r")){b(this,S.gradient);}(this.type!="path"||this._.rt.deg)&&this.setBox(this.attrs);}return this;};aB[a2].toFront=function(){!this.removed&&this.Group.parentNode[aP](this.Group);this.paper.top!=this&&Z(this,this.paper);return this;};aB[a2].toBack=function(){if(this.removed){return this;}if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);k(this,this.paper);}return this;};aB[a2].insertAfter=function(d){if(this.removed){return this;}if(d.Group.nextSibling){d.Group.parentNode.insertBefore(this.Group,d.Group.nextSibling);}else{d.Group.parentNode[aP](this.Group);}A(this,d,this.paper);return this;};aB[a2].insertBefore=function(d){if(this.removed){return this;}d.Group.parentNode.insertBefore(this.Group,d.Group);at(this,d,this.paper);return this;};var Q=function(e,d,a6,S){var R=ai("group"),a5=ai("oval"),i=a5.style;R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=e.coordsize;R.coordorigin=e.coordorigin;R[aP](a5);var E=new aB(a5,R,e);E.type="circle";ab(E,{stroke:"#000",fill:"none"});E.attrs.cx=d;E.attrs.cy=a6;E.attrs.r=S;E.setBox({x:d-S,y:a6-S,width:S*2,height:S*2});e.canvas[aP](R);return E;},aJ=function(e,a6,a5,a7,E,d){var R=ai("group"),i=ai("roundrect"),a8=(+d||0)/(aM(a7,E));R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=e.coordsize;R.coordorigin=e.coordorigin;R[aP](i);i.arcsize=a8;var S=new aB(i,R,e);S.type="rect";ab(S,{stroke:"#000"});S.arcsize=a8;S.setBox({x:a6,y:a5,width:a7,height:E,r:d});e.canvas[aP](R);return S;},aj=function(d,a7,a6,i,e){var R=ai("group"),E=ai("oval"),a5=E.style;R.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";R.coordsize=d.coordsize;R.coordorigin=d.coordorigin;R[aP](E);var S=new aB(E,R,d);S.type="ellipse";ab(S,{stroke:"#000"});S.attrs.cx=a7;S.attrs.cy=a6;S.attrs.rx=i;S.attrs.ry=e;S.setBox({x:a7-i,y:a6-e,width:i*2,height:e*2});d.canvas[aP](R);return S;},o=function(e,d,a7,a6,a8,E){var R=ai("group"),i=ai("image"),a5=i.style;R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=e.coordsize;R.coordorigin=e.coordorigin;i.src=d;R[aP](i);var S=new aB(i,R,e);S.type="image";S.attrs.src=d;S.attrs.x=a7;S.attrs.y=a6;S.attrs.w=a8;S.attrs.h=E;S.setBox({x:a7,y:a6,width:a8,height:E});e.canvas[aP](R);return S;},Y=function(e,a7,a6,a8){var R=ai("group"),E=ai("shape"),a5=E.style,a9=ai("path"),d=a9.style,i=ai("textpath");R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=e.coordsize;R.coordorigin=e.coordorigin;a9.v=ap.format("m{0},{1}l{2},{1}",P(a7),P(a6),P(a7)+1);a9.textpathok=true;a5.width=e.width;a5.height=e.height;i.string=a8+aw;i.on=true;E[aP](i);E[aP](a9);R[aP](E);var S=new aB(i,R,e);S.shape=E;S.textpath=a9;S.type="text";S.attrs.text=a8;S.attrs.x=a7;S.attrs.y=a6;S.attrs.w=1;S.attrs.h=1;ab(S,{font:j.font,stroke:"none",fill:"#000"});S.setBox();e.canvas[aP](R);return S;},aZ=function(i,d){var e=this.canvas.style;i==+i&&(i+="px");d==+d&&(d+="px");e.width=i;e.height=d;e.clip="rect(0 "+i+" "+d+" 0)";return this;},ai;M.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!M.namespaces.rvml&&M.namespaces.add("rvml","urn:schemas-microsoft-com:vml");ai=function(d){return M.createElement("<rvml:"+d+' class="rvml">');};}catch(ag){ai=function(d){return M.createElement("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');};}var w=function(){var i=aq[a0](null,arguments),d=i.container,a7=i.height,a8,e=i.width,a6=i.x,a5=i.y;if(!d){throw new Error("VML container not found.");}var R=new aX,S=R.canvas=M.createElement("div"),E=S.style;e=e||512;a7=a7||342;e==+e&&(e+="px");a7==+a7&&(a7+="px");R.width=1000;R.height=1000;R.coordsize="1000 1000";R.coordorigin="0 0";R.span=M.createElement("span");R.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";S[aP](R.span);E.cssText=ap.format("width:{0};height:{1};position:absolute;clip:rect(0 {0} {1} 0);overflow:hidden",e,a7);if(d==1){M.body[aP](S);E.left=a6+"px";E.top=a5+"px";}else{d.style.width=e;d.style.height=a7;if(d.firstChild){d.insertBefore(S,d.firstChild);}else{d[aP](S);}}aK.call(R,R,ap.fn);return R;};aX[a2].clear=function(){this.canvas.innerHTML=aw;this.span=M.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[aP](this.span);this.bottom=this.top=null;};aX[a2].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var d in this){this[d]=s(d);}};}if((/^Apple|^Google/).test(navigator.vendor)&&!(navigator.userAgent.indexOf("Version/4.0")+1)){aX[a2].safari=function(){var d=this.rect(-99,-99,this.width+99,this.height+99);setTimeout(function(){d.remove();});};}else{aX[a2].safari=function(){};}var af=(function(){if(M.addEventListener){return function(R,i,e,d){var E=function(S){return e.call(d,S);};R.addEventListener(i,E,false);return function(){R.removeEventListener(i,E,false);return true;};};}else{if(M.attachEvent){return function(S,E,i,e){var R=function(a5){return i.call(e,a5||ax.event);};S.attachEvent("on"+E,R);var d=function(){S.detachEvent("on"+E,R);return true;};return d;};}}})();for(var ad=G[m];ad--;){(function(d){aB[a2][d]=function(e){if(ap.is(e,"function")){this.events=this.events||[];this.events.push({name:d,f:e,unbind:af(this.shape||this.node,d,e,this)});}return this;};aB[a2]["un"+d]=function(E){var i=this.events,e=i[m];while(e--){if(i[e].name==d&&i[e].f==E){i[e].unbind();i.splice(e,1);!i.length&&delete this.events;return this;}}return this;};})(G[ad]);}aB[a2].hover=function(e,d){return this.mouseover(e).mouseout(d);};aB[a2].unhover=function(e,d){return this.unmouseover(e).unmouseout(d);};aX[a2].circle=function(d,i,e){return Q(this,d||0,i||0,e||0);};aX[a2].rect=function(d,R,e,i,E){return aJ(this,d||0,R||0,e||0,i||0,E||0);};aX[a2].ellipse=function(d,E,i,e){return aj(this,d||0,E||0,i||0,e||0);};aX[a2].path=function(d){d&&!ap.is(d,"string")&&!ap.is(d[0],"array")&&(d+=aw);return q(ap.format[a0](ap,arguments),this);};aX[a2].image=function(E,d,R,e,i){return o(this,E||"about:blank",d||0,R||0,e||0,i||0);};aX[a2].text=function(d,i,e){return Y(this,d||0,i||0,e||aw);};aX[a2].set=function(d){arguments[m]>1&&(d=Array[a2].splice.call(arguments,0,arguments[m]));return new U(d);};aX[a2].setSize=aZ;aX[a2].top=aX[a2].bottom=null;aX[a2].raphael=ap;function u(){return this.x+ao+this.y;}aB[a2].scale=function(bc,ba,E,e){if(bc==null&&ba==null){return{x:this._.sx,y:this._.sy,toString:u};}ba=ba||bc;!+ba&&(ba=bc);var bg,be,bf,bd,br=this.attrs;if(bc!=0){var a9=this.getBBox(),a6=a9.x+a9.width/2,R=a9.y+a9.height/2,bq=bc/this._.sx,bp=ba/this._.sy;E=(+E||E==0)?E:a6;e=(+e||e==0)?e:R;var a8=~~(bc/ac.abs(bc)),a5=~~(ba/ac.abs(ba)),bj=this.node.style,bt=E+(a6-E)*bq,bs=e+(R-e)*bp;switch(this.type){case"rect":case"image":var a7=br.width*a8*bq,bi=br.height*a5*bp;this.attr({height:bi,r:br.r*aM(a8*bq,a5*bp),width:a7,x:bt-a7/2,y:bs-bi/2});break;case"circle":case"ellipse":this.attr({rx:br.rx*a8*bq,ry:br.ry*a5*bp,r:br.r*aM(a8*bq,a5*bp),cx:bt,cy:bs});break;case"path":var bl=ae(br.path),bm=true;for(var bo=0,bh=bl[m];bo<bh;bo++){var bk=bl[bo],bn,S=aR.call(bk[0]);if(S=="M"&&bm){continue;}else{bm=false;}if(S=="A"){bk[bl[bo][m]-2]*=bq;bk[bl[bo][m]-1]*=bp;bk[1]*=a8*bq;bk[2]*=a5*bp;bk[5]=+(a8+a5?!!+bk[5]:!+bk[5]);}else{if(S=="H"){for(bn=1,jj=bk[m];bn<jj;bn++){bk[bn]*=bq;}}else{if(S=="V"){for(bn=1,jj=bk[m];bn<jj;bn++){bk[bn]*=bp;}}else{for(bn=1,jj=bk[m];bn<jj;bn++){bk[bn]*=(bn%2)?bq:bp;}}}}}var d=V(bl),bg=bt-d.x-d.width/2,be=bs-d.y-d.height/2;bl[0][1]+=bg;bl[0][2]+=be;this.attr({path:bl});break;}if(this.type in {text:1,image:1}&&(a8!=1||a5!=1)){if(this.transformations){this.transformations[2]="scale("[aW](a8,",",a5,")");this.node[v]("transform",this.transformations[aD](ao));bg=(a8==-1)?-br.x-(a7||0):br.x;be=(a5==-1)?-br.y-(bi||0):br.y;this.attr({x:bg,y:be});br.fx=a8-1;br.fy=a5-1;}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11="[aW](a8,", M12=0, M21=0, M22=",a5,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");bj.filter=(this.node.filterMatrix||aw)+(this.node.filterOpacity||aw);}}else{if(this.transformations){this.transformations[2]=aw;this.node[v]("transform",this.transformations[aD](ao));br.fx=0;br.fy=0;}else{this.node.filterMatrix=aw;bj.filter=(this.node.filterMatrix||aw)+(this.node.filterOpacity||aw);}}br.scale=[bc,ba,E,e][aD](ao);this._.sx=bc;this._.sy=ba;}return this;};aB[a2].clone=function(){var d=this.attr();delete d.scale;delete d.translation;return this.paper[this.type]().attr(d);};var aF=function(d,e){return function(be,S,a5){be=I(be);var ba,a9,E,a6,R="",bd={},bb,a8=0;for(var a7=0,bc=be.length;a7<bc;a7++){E=be[a7];if(E[0]=="M"){ba=+E[1];a9=+E[2];}else{a6=n(ba,a9,E[1],E[2],E[3],E[4],E[5],E[6]);if(a8+a6>S){if(e&&!bd.start){bb=ap.findDotsAtSegment(ba,a9,E[1],E[2],E[3],E[4],E[5],E[6],(S-a8)/a6);R+=["C",bb.start.x,bb.start.y,bb.m.x,bb.m.y,bb.x,bb.y];if(a5){return R;}bd.start=R;R=["M",bb.x,bb.y+"C",bb.n.x,bb.n.y,bb.end.x,bb.end.y,E[5],E[6]][aD]();a8+=a6;ba=+E[5];a9=+E[6];continue;}if(!d&&!e){bb=ap.findDotsAtSegment(ba,a9,E[1],E[2],E[3],E[4],E[5],E[6],(S-a8)/a6);return{x:bb.x,y:bb.y,alpha:bb.alpha};}}a8+=a6;ba=+E[5];a9=+E[6];}R+=E;}bd.end=R;bb=d?a8:e?bd:ap.findDotsAtSegment(ba,a9,E[1],E[2],E[3],E[4],E[5],E[6],1);bb.alpha&&(bb={x:bb.x,y:bb.y,alpha:bb.alpha});return bb;};},n=ak(function(E,d,a5,S,bb,ba,a9,a8){var R={x:0,y:0},a7=0;for(var a6=0;a6<1.01;a6+=0.01){var e=N(E,d,a5,S,bb,ba,a9,a8,a6);a6&&(a7+=ac.sqrt(aQ(R.x-e.x,2)+aQ(R.y-e.y,2)));R=e;}return a7;});var ar=aF(1),C=aF(),K=aF(0,1);aB[a2].getTotalLength=function(){if(this.type!="path"){return;}return ar(this.attrs.path);};aB[a2].getPointAtLength=function(d){if(this.type!="path"){return;}return C(this.attrs.path,d);};aB[a2].getSubpath=function(i,e){if(this.type!="path"){return;}if(ac.abs(this.getTotalLength()-e)<0.000001){return K(this.attrs.path,i).end;}var d=K(this.attrs.path,e,1);return i?K(d,i).end:d;};ap.easing_formulas={linear:function(d){return d;},"<":function(d){return aQ(d,3);},">":function(d){return aQ(d-1,3)+1;},"<>":function(d){d=d*2;if(d<1){return aQ(d,3)/2;}d-=2;return(aQ(d,3)+2)/2;},backIn:function(e){var d=1.70158;return e*e*((d+1)*e-d);},backOut:function(e){e=e-1;var d=1.70158;return e*e*((d+1)*e+d)+1;},elastic:function(i){if(i==0||i==1){return i;}var e=0.3,d=e/4;return aQ(2,-10*i)*ac.sin((i-d)*(2*ac.PI)/e)+1;},bounce:function(E){var e=7.5625,i=2.75,d;if(E<(1/i)){d=e*E*E;}else{if(E<(2/i)){E-=(1.5/i);d=e*E*E+0.75;}else{if(E<(2.5/i)){E-=(2.25/i);d=e*E*E+0.9375;}else{E-=(2.625/i);d=e*E*E+0.984375;}}}return d;}};var J={length:0},aV=function(){var a7=+new Date;for(var bj in J){if(bj!="length"&&J[T](bj)){var bo=J[bj];if(bo.stop||bo.el.removed){delete J[bj];J[m]--;continue;}var a5=a7-bo.start,bg=bo.ms,bf=bo.easing,bk=bo.from,bc=bo.diff,E=bo.to,bb=bo.t,be=bo.prev||0,a6=bo.el,R=bo.callback,bd={},d;if(a5<bg){var S=ap.easing_formulas[bf]?ap.easing_formulas[bf](a5/bg):a5/bg;for(var bh in bk){if(bk[T](bh)){switch(aa[bh]){case"along":d=S*bg*bc[bh];E.back&&(d=E.len-d);var bi=C(E[bh],d);a6.translate(bc.sx-bc.x||0,bc.sy-bc.y||0);bc.x=bi.x;bc.y=bi.y;a6.translate(bi.x-bc.sx,bi.y-bc.sy);E.rot&&a6.rotate(bc.r+bi.alpha,bi.x,bi.y);break;case"number":d=+bk[bh]+S*bg*bc[bh];break;case"colour":d="rgb("+[B(P(bk[bh].r+S*bg*bc[bh].r)),B(P(bk[bh].g+S*bg*bc[bh].g)),B(P(bk[bh].b+S*bg*bc[bh].b))][aD](",")+")";break;case"path":d=[];for(var bm=0,ba=bk[bh][m];bm<ba;bm++){d[bm]=[bk[bh][bm][0]];for(var bl=1,bn=bk[bh][bm][m];bl<bn;bl++){d[bm][bl]=+bk[bh][bm][bl]+S*bg*bc[bh][bm][bl];}d[bm]=d[bm][aD](ao);}d=d[aD](ao);break;case"csv":switch(bh){case"translation":var a9=bc[bh][0]*(a5-be),a8=bc[bh][1]*(a5-be);bb.x+=a9;bb.y+=a8;d=a9+ao+a8;break;case"rotation":d=+bk[bh][0]+S*bg*bc[bh][0];bk[bh][1]&&(d+=","+bk[bh][1]+","+bk[bh][2]);break;case"scale":d=[+bk[bh][0]+S*bg*bc[bh][0],+bk[bh][1]+S*bg*bc[bh][1],(2 in E[bh]?E[bh][2]:aw),(3 in E[bh]?E[bh][3]:aw)][aD](ao);break;case"clip-rect":d=[];var bm=4;while(bm--){d[bm]=+bk[bh][bm]+S*bg*bc[bh][bm];}break;}break;}bd[bh]=d;}}a6.attr(bd);a6._run&&a6._run.call(a6);}else{if(E.along){var bi=C(E.along,E.len*!E.back);a6.translate(bc.sx-(bc.x||0)+bi.x-bc.sx,bc.sy-(bc.y||0)+bi.y-bc.sy);E.rot&&a6.rotate(bc.r+bi.alpha,bi.x,bi.y);}(bb.x||bb.y)&&a6.translate(-bb.x,-bb.y);E.scale&&(E.scale=E.scale+aw);a6.attr(E);delete J[bj];J[m]--;a6.in_animation=null;ap.is(R,"function")&&R.call(a6);}bo.prev=a5;}}ap.svg&&a6&&a6.paper.safari();J[m]&&setTimeout(aV);},B=function(d){return d>255?255:(d<0?0:d);},t=function(d,i){if(d==null){return{x:this._.tx,y:this._.ty,toString:u};}this._.tx+=+d;this._.ty+=+i;switch(this.type){case"circle":case"ellipse":this.attr({cx:+d+this.attrs.cx,cy:+i+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+d+this.attrs.x,y:+i+this.attrs.y});break;case"path":var e=ae(this.attrs.path);e[0][1]+=+d;e[0][2]+=+i;this.attr({path:e});break;}return this;};aB[a2].animateWith=function(e,i,d,R,E){J[e.id]&&(i.start=J[e.id].start);return this.animate(i,d,R,E);};aB[a2].animateAlong=aC();aB[a2].animateAlongBack=aC(1);function aC(d){return function(E,i,e,S){var R={back:d};ap.is(e,"function")?(S=e):(R.rot=e);E&&E.constructor==aB&&(E=E.attrs.path);E&&(R.along=E);return this.animate(R,i,S);};}aB[a2].onAnimation=function(d){this._run=d||0;return this;};aB[a2].animate=function(bj,ba,a9,E){if(ap.is(a9,"function")||!a9){E=a9||null;}var be={},e={},a7={};for(var bb in bj){if(bj[T](bb)){if(aa[T](bb)){be[bb]=this.attr(bb);(be[bb]==null)&&(be[bb]=j[bb]);e[bb]=bj[bb];switch(aa[bb]){case"along":var bh=ar(bj[bb]),bc=C(bj[bb],bh*!!bj.back),R=this.getBBox();a7[bb]=bh/ba;a7.tx=R.x;a7.ty=R.y;a7.sx=bc.x;a7.sy=bc.y;e.rot=bj.rot;e.back=bj.back;e.len=bh;bj.rot&&(a7.r=X(this.rotate())||0);break;case"number":a7[bb]=(e[bb]-be[bb])/ba;break;case"colour":be[bb]=ap.getRGB(be[bb]);var bd=ap.getRGB(e[bb]);a7[bb]={r:(bd.r-be[bb].r)/ba,g:(bd.g-be[bb].g)/ba,b:(bd.b-be[bb].b)/ba};break;case"path":var S=I(be[bb],e[bb]);be[bb]=S[0];var a8=S[1];a7[bb]=[];for(var bg=0,a6=be[bb][m];bg<a6;bg++){a7[bb][bg]=[0];for(var bf=1,bi=be[bb][bg][m];bf<bi;bf++){a7[bb][bg][bf]=(a8[bg][bf]-be[bb][bg][bf])/ba;}}break;case"csv":var d=(bj[bb]+aw)[z](a),a5=(be[bb]+aw)[z](a);switch(bb){case"translation":be[bb]=[0,0];a7[bb]=[d[0]/ba,d[1]/ba];break;case"rotation":be[bb]=(a5[1]==d[1]&&a5[2]==d[2])?a5:[0,d[1],d[2]];a7[bb]=[(d[0]-be[bb][0])/ba,0,0];break;case"scale":bj[bb]=d;be[bb]=(be[bb]+aw)[z](a);a7[bb]=[(d[0]-be[bb][0])/ba,(d[1]-be[bb][1])/ba,0,0];break;case"clip-rect":be[bb]=(be[bb]+aw)[z](a);a7[bb]=[];var bg=4;while(bg--){a7[bb][bg]=(d[bg]-be[bb][bg])/ba;}break;}e[bb]=d;}}}}this.stop();this.in_animation=1;J[this.id]={start:bj.start||+new Date,ms:ba,easing:a9,from:be,diff:a7,to:e,el:this,callback:E,t:{x:0,y:0}};++J[m]==1&&aV();return this;};aB[a2].stop=function(){J[this.id]&&J[m]--;delete J[this.id];return this;};aB[a2].translate=function(d,e){return this.attr({translation:d+" "+e});};aB[a2][aE]=function(){return"Rapha\xebl\u2019s object";};ap.ae=J;var U=function(d){this.items=[];this[m]=0;if(d){for(var e=0,E=d[m];e<E;e++){if(d[e]&&(d[e].constructor==aB||d[e].constructor==U)){this[this.items[m]]=this.items[this.items[m]]=d[e];this[m]++;}}}};U[a2][f]=function(){var R,d;for(var e=0,E=arguments[m];e<E;e++){R=arguments[e];if(R&&(R.constructor==aB||R.constructor==U)){d=this.items[m];this[d]=this.items[d]=R;this[m]++;}}return this;};U[a2].pop=function(){delete this[this[m]--];return this.items.pop();};for(var y in aB[a2]){if(aB[a2][T](y)){U[a2][y]=(function(d){return function(){for(var e=0,E=this.items[m];e<E;e++){this.items[e][d][a0](this.items[e],arguments);}return this;};})(y);}}U[a2].attr=function(e,a5){if(e&&ap.is(e,"array")&&ap.is(e[0],"object")){for(var d=0,S=e[m];d<S;d++){this.items[d].attr(e[d]);}}else{for(var E=0,R=this.items[m];E<R;E++){this.items[E].attr[a0](this.items[E],arguments);}}return this;};U[a2].animate=function(S,e,a7,a6){(ap.is(a7,"function")||!a7)&&(a6=a7||null);var d=this.items[m],E=d,a5=this,R;a6&&(R=function(){!--d&&a6.call(a5);});this.items[--E].animate(S,e,a7||R,R);while(E--){this.items[E].animateWith(this.items[d-1],S,e,a7||R,R);}return this;};U[a2].insertAfter=function(e){var d=this.items[m];while(d--){this.items[d].insertAfter(e);}return this;};U[a2].getBBox=function(){var d=[],a5=[],e=[],R=[];for(var E=this.items[m];E--;){var S=this.items[E].getBBox();d[f](S.x);a5[f](S.y);e[f](S.x+S.width);R[f](S.y+S.height);}d=aM[a0](0,d);a5=aM[a0](0,a5);return{x:d,y:a5,width:g[a0](0,e)-d,height:g[a0](0,R)-a5};};U[a2].clone=function(E){E=new U;for(var d=0,e=this.items[m];d<e;d++){E[f](this.items[d].clone());}return E;};ap.registerFont=function(e){if(!e.face){return e;}this.fonts=this.fonts||{};var E={w:e.w,face:{},glyphs:{}},i=e.face["font-family"];for(var a5 in e.face){if(e.face[T](a5)){E.face[a5]=e.face[a5];}}if(this.fonts[i]){this.fonts[i][f](E);}else{this.fonts[i]=[E];}if(!e.svg){E.face["units-per-em"]=H(e.face["units-per-em"],10);for(var R in e.glyphs){if(e.glyphs[T](R)){var S=e.glyphs[R];E.glyphs[R]={w:S.w,k:{},d:S.d&&"M"+S.d[aT](/[mlcxtrv]/g,function(a6){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a6]||"M";})+"z"};if(S.k){for(var d in S.k){if(S[T](d)){E.glyphs[R].k[d]=S.k[d];}}}}}}return e;};aX[a2].getFont=function(a7,a8,e,R){R=R||"normal";e=e||"normal";a8=+a8||{normal:400,bold:700,lighter:300,bolder:800}[a8]||400;var S=ap.fonts[a7];if(!S){var E=new RegExp("(^|\\s)"+a7[aT](/[^\w\d\s+!~.:_-]/g,aw)+"(\\s|$)","i");for(var d in ap.fonts){if(ap.fonts[T](d)){if(E.test(d)){S=ap.fonts[d];break;}}}}var a5;if(S){for(var a6=0,a9=S[m];a6<a9;a6++){a5=S[a6];if(a5.face["font-weight"]==a8&&(a5.face["font-style"]==e||!a5.face["font-style"])&&a5.face["font-stretch"]==R){break;}}}return a5;};aX[a2].print=function(R,E,d,a6,a7,bg){bg=bg||"middle";var bc=this.set(),bf=(d+aw)[z](aw),bd=0,a9=aw,bh;ap.is(a6,"string")&&(a6=this.getFont(a6));if(a6){bh=(a7||16)/a6.face["units-per-em"];var e=a6.face.bbox.split(a),a5=+e[0],a8=+e[1]+(bg=="baseline"?e[3]-e[1]+(+a6.face.descent):(e[3]-e[1])/2);for(var bb=0,S=bf[m];bb<S;bb++){var ba=bb&&a6.glyphs[bf[bb-1]]||{},be=a6.glyphs[bf[bb]];bd+=bb?(ba.w||a6.w)+(ba.k&&ba.k[bf[bb]]||0):0;be&&be.d&&bc[f](this.path(be.d).attr({fill:"#000",stroke:"none",translation:[bd,0]}));}bc.scale(bh,bh,a5,a8).translate(R-a5,E-a8);}return bc;};ap.format=function(i){var e=ap.is(arguments[1],"array")?[0][aW](arguments[1]):arguments,d=/\{(\d+)\}/g;i&&ap.is(i,"string")&&e[m]-1&&(i=i[aT](d,function(R,E){return e[++E]==null?aw:e[E];}));return i||aw;};ap.ninja=function(){l.was?(Raphael=l.is):delete Raphael;return ap;};ap.el=aB[a2];return ap;})();
\ No newline at end of file
+Raphael=(function(){var a=/[, ]+/,aY=/^(circle|rect|path|ellipse|text|image)$/,a9="prototype",W="hasOwnProperty",P=document,aB=window,m={was:Object[a9][W].call(aB,"Raphael"),is:aB.Raphael},au=function(){if(au.is(arguments[0],"array")){var d=arguments[0],e=z[a7](au,d.splice(0,3+au.is(d[0],aq))),S=e.set();for(var R=0,bc=d[n];R<bc;R++){var E=d[R]||{};aY.test(E.type)&&S[f](e[E.type]().attr(E));}return S;}return z[a7](au,arguments);},a4=function(){},aU="appendChild",a7="apply",a2="concat",aA="",at=" ",C="split",J="click dblclick mousedown mousemove mouseout mouseover mouseup"[C](at),aH="join",n="length",bb=String[a9].toLowerCase,af=Math,h=af.max,aR=af.min,aq="number",aJ="toString",aE=Object[a9][aJ],a0={},aV=af.pow,f="push",a5=/^(?=[\da-f]$)/,c=/^url\(['"]?([^\)]+?)['"]?\)$/i,A=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,U=af.round,y="setAttribute",aa=parseFloat,K=parseInt,aX=String[a9].toUpperCase,k={blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/",opacity:1,path:"M0,0",r:0,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},ad={along:"along",blur:aq,"clip-rect":"csv",cx:aq,cy:aq,fill:"colour","fill-opacity":aq,"font-size":aq,height:aq,opacity:aq,path:"path",r:aq,rotation:"csv",rx:aq,ry:aq,scale:"csv",stroke:"colour","stroke-opacity":aq,"stroke-width":aq,translation:"csv",width:aq,x:aq,y:aq},aZ="replace";au.version="1.3.2";au.type=(aB.SVGAngle||P.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");if(au.type=="VML"){var ak=P.createElement("div");ak.innerHTML="<!--[if vml]><br><br><![endif]-->";if(ak.childNodes[n]!=2){return au.type=null;}ak=null;}au.svg=!(au.vml=au.type=="VML");a4[a9]=au[a9];au._id=0;au._oid=0;au.fn={};au.is=function(e,d){d=bb.call(d);return((d=="object"||d=="undefined")&&typeof e==d)||(e==null&&d=="null")||bb.call(aE.call(e).slice(8,-1))==d;};au.setWindow=function(d){aB=d;P=aB.document;};var aM=function(e){if(au.vml){var d=/^\s+|\s+$/g;aM=an(function(R){var S;R=(R+aA)[aZ](d,aA);try{var bc=new aB.ActiveXObject("htmlfile");bc.write("<body>");bc.close();S=bc.body;}catch(be){S=aB.createPopup().document.body;}var i=S.createTextRange();try{S.style.color=R;var bd=i.queryCommandValue("ForeColor");bd=((bd&255)<<16)|(bd&65280)|((bd&16711680)>>>16);return"#"+("000000"+bd[aJ](16)).slice(-6);}catch(be){return"none";}});}else{var E=P.createElement("i");E.title="Rapha\xebl Colour Picker";E.style.display="none";P.body[aU](E);aM=an(function(i){E.style.color=i;return P.defaultView.getComputedStyle(E,aA).getPropertyValue("color");});}return aM(e);};var ao=function(){return"hsb("+[this.h,this.s,this.b]+")";},w=function(){return this.hex;};au.hsb2rgb=an(function(bf,bd,bj){if(au.is(bf,"object")&&"h" in bf&&"s" in bf&&"b" in bf){bj=bf.b;bd=bf.s;bf=bf.h;}var R,S,bk;if(bj==0){return{r:0,g:0,b:0,hex:"#000"};}if(bf>1||bd>1||bj>1){bf/=255;bd/=255;bj/=255;}var bc=~~(bf*6),bg=(bf*6)-bc,E=bj*(1-bd),e=bj*(1-(bd*bg)),bl=bj*(1-(bd*(1-bg)));R=[bj,e,E,E,bl,bj,bj][bc];S=[bl,bj,bj,e,E,E,bl][bc];bk=[E,E,bl,bj,bj,e,E][bc];R*=255;S*=255;bk*=255;var bh={r:R,g:S,b:bk,toString:w},d=(~~R)[aJ](16),be=(~~S)[aJ](16),bi=(~~bk)[aJ](16);d=d[aZ](a5,"0");be=be[aZ](a5,"0");bi=bi[aZ](a5,"0");bh.hex="#"+d+be+bi;return bh;},au);au.rgb2hsb=an(function(d,e,bd){if(au.is(d,"object")&&"r" in d&&"g" in d&&"b" in d){bd=d.b;e=d.g;d=d.r;}if(au.is(d,"string")){var bf=au.getRGB(d);d=bf.r;e=bf.g;bd=bf.b;}if(d>1||e>1||bd>1){d/=255;e/=255;bd/=255;}var bc=h(d,e,bd),i=aR(d,e,bd),R,E,S=bc;if(i==bc){return{h:0,s:0,b:bc};}else{var be=(bc-i);E=be/bc;if(d==bc){R=(e-bd)/be;}else{if(e==bc){R=2+((bd-d)/be);}else{R=4+((d-e)/be);}}R/=6;R<0&&R++;R>1&&R--;}return{h:R,s:E,b:S,toString:ao};},au);var aN=/,?([achlmqrstvxz]),?/gi;au._path2string=function(){return this.join(",")[aZ](aN,"$1");};function an(E,e,d){function i(){var R=Array[a9].slice.call(arguments,0),bc=R[aH]("\u25ba"),S=i.cache=i.cache||{},bd=i.count=i.count||[];if(S[W](bc)){return d?d(S[bc]):S[bc];}bd[n]>=1000&&delete S[bd.shift()];bd[f](bc);S[bc]=E[a7](e,R);return d?d(S[bc]):S[bc];}return i;}au.getRGB=an(function(d){if(!d||!!((d=d+aA).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1};}if(d=="none"){return{r:-1,g:-1,b:-1,hex:"none"};}!(({hs:1,rg:1})[W](d.substring(0,2))||d.charAt()=="#")&&(d=aM(d));var S,i,E,be,bf,bc=d.match(A);if(bc){if(bc[2]){be=K(bc[2].substring(5),16);E=K(bc[2].substring(3,5),16);i=K(bc[2].substring(1,3),16);}if(bc[3]){be=K((bf=bc[3].charAt(3))+bf,16);E=K((bf=bc[3].charAt(2))+bf,16);i=K((bf=bc[3].charAt(1))+bf,16);}if(bc[4]){bc=bc[4][C](/\s*,\s*/);i=aa(bc[0]);E=aa(bc[1]);be=aa(bc[2]);}if(bc[5]){bc=bc[5][C](/\s*,\s*/);i=aa(bc[0])*2.55;E=aa(bc[1])*2.55;be=aa(bc[2])*2.55;}if(bc[6]){bc=bc[6][C](/\s*,\s*/);i=aa(bc[0]);E=aa(bc[1]);be=aa(bc[2]);return au.hsb2rgb(i,E,be);}if(bc[7]){bc=bc[7][C](/\s*,\s*/);i=aa(bc[0])*2.55;E=aa(bc[1])*2.55;be=aa(bc[2])*2.55;return au.hsb2rgb(i,E,be);}bc={r:i,g:E,b:be};var e=(~~i)[aJ](16),R=(~~E)[aJ](16),bd=(~~be)[aJ](16);e=e[aZ](a5,"0");R=R[aZ](a5,"0");bd=bd[aZ](a5,"0");bc.hex="#"+e+R+bd;return bc;}return{r:-1,g:-1,b:-1,hex:"none",error:1};},au);au.getColor=function(e){var i=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||0.75},d=this.hsb2rgb(i.h,i.s,i.b);i.h+=0.075;if(i.h>1){i.h=0;i.s-=0.2;i.s<=0&&(this.getColor.start={h:0,s:1,b:i.b});}return d.hex;};au.getColor.reset=function(){delete this.start;};var aC=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,ar=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig;au.parsePathString=an(function(d){if(!d){return null;}var i={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=[];if(au.is(d,"array")&&au.is(d[0],"array")){e=aD(d);}if(!e[n]){(d+aA)[aZ](aC,function(R,E,bd){var bc=[],S=bb.call(E);bd[aZ](ar,function(bf,be){be&&bc[f](+be);});if(S=="m"&&bc[n]>2){e[f]([E][a2](bc.splice(0,2)));S="l";E=E=="m"?"l":"L";}while(bc[n]>=i[S]){e[f]([E][a2](bc.splice(0,i[S])));if(!i[S]){break;}}});}e[aJ]=au._path2string;return e;});au.findDotsAtSegment=function(e,d,bq,bo,bc,R,be,bd,bk){var bi=1-bk,bh=aV(bi,3)*e+aV(bi,2)*3*bk*bq+bi*3*bk*bk*bc+aV(bk,3)*be,bf=aV(bi,3)*d+aV(bi,2)*3*bk*bo+bi*3*bk*bk*R+aV(bk,3)*bd,bm=e+2*bk*(bq-e)+bk*bk*(bc-2*bq+e),bl=d+2*bk*(bo-d)+bk*bk*(R-2*bo+d),bp=bq+2*bk*(bc-bq)+bk*bk*(be-2*bc+bq),bn=bo+2*bk*(R-bo)+bk*bk*(bd-2*R+bo),bj=(1-bk)*e+bk*bq,bg=(1-bk)*d+bk*bo,E=(1-bk)*bc+bk*be,i=(1-bk)*R+bk*bd,S=(90-af.atan((bm-bp)/(bl-bn))*180/af.PI);(bm>bp||bl<bn)&&(S+=180);return{x:bh,y:bf,m:{x:bm,y:bl},n:{x:bp,y:bn},start:{x:bj,y:bg},end:{x:E,y:i},alpha:S};};var Y=an(function(bh){if(!bh){return{x:0,y:0,width:0,height:0};}bh=L(bh);var be=0,bd=0,R=[],e=[],E;for(var S=0,bg=bh[n];S<bg;S++){E=bh[S];if(E[0]=="M"){be=E[1];bd=E[2];R[f](be);e[f](bd);}else{var bc=aL(be,bd,E[1],E[2],E[3],E[4],E[5],E[6]);R=R[a2](bc.min.x,bc.max.x);e=e[a2](bc.min.y,bc.max.y);be=E[5];bd=E[6];}}var d=aR[a7](0,R),bf=aR[a7](0,e);return{x:d,y:bf,width:h[a7](0,R)-d,height:h[a7](0,e)-bf};}),aD=function(bc){var E=[];if(!au.is(bc,"array")||!au.is(bc&&bc[0],"array")){bc=au.parsePathString(bc);}for(var e=0,R=bc[n];e<R;e++){E[e]=[];for(var d=0,S=bc[e][n];d<S;d++){E[e][d]=bc[e][d];}}E[aJ]=au._path2string;return E;},ah=an(function(R){if(!au.is(R,"array")||!au.is(R&&R[0],"array")){R=au.parsePathString(R);}var bg=[],bi=0,bh=0,bl=0,bk=0,E=0;if(R[0][0]=="M"){bi=R[0][1];bh=R[0][2];bl=bi;bk=bh;E++;bg[f](["M",bi,bh]);}for(var bd=E,bm=R[n];bd<bm;bd++){var d=bg[bd]=[],bj=R[bd];if(bj[0]!=bb.call(bj[0])){d[0]=bb.call(bj[0]);switch(d[0]){case"a":d[1]=bj[1];d[2]=bj[2];d[3]=bj[3];d[4]=bj[4];d[5]=bj[5];d[6]=+(bj[6]-bi).toFixed(3);d[7]=+(bj[7]-bh).toFixed(3);break;case"v":d[1]=+(bj[1]-bh).toFixed(3);break;case"m":bl=bj[1];bk=bj[2];default:for(var bc=1,be=bj[n];bc<be;bc++){d[bc]=+(bj[bc]-((bc%2)?bi:bh)).toFixed(3);}}}else{d=bg[bd]=[];if(bj[0]=="m"){bl=bj[1]+bi;bk=bj[2]+bh;}for(var S=0,e=bj[n];S<e;S++){bg[bd][S]=bj[S];}}var bf=bg[bd][n];switch(bg[bd][0]){case"z":bi=bl;bh=bk;break;case"h":bi+=+bg[bd][bf-1];break;case"v":bh+=+bg[bd][bf-1];break;default:bi+=+bg[bd][bf-2];bh+=+bg[bd][bf-1];}}bg[aJ]=au._path2string;return bg;},0,aD),t=an(function(R){if(!au.is(R,"array")||!au.is(R&&R[0],"array")){R=au.parsePathString(R);}var bf=[],bh=0,bg=0,bk=0,bj=0,E=0;if(R[0][0]=="M"){bh=+R[0][1];bg=+R[0][2];bk=bh;bj=bg;E++;bf[0]=["M",bh,bg];}for(var bd=E,bl=R[n];bd<bl;bd++){var d=bf[bd]=[],bi=R[bd];if(bi[0]!=aX.call(bi[0])){d[0]=aX.call(bi[0]);switch(d[0]){case"A":d[1]=bi[1];d[2]=bi[2];d[3]=bi[3];d[4]=bi[4];d[5]=bi[5];d[6]=+(bi[6]+bh);d[7]=+(bi[7]+bg);break;case"V":d[1]=+bi[1]+bg;break;case"H":d[1]=+bi[1]+bh;break;case"M":bk=+bi[1]+bh;bj=+bi[2]+bg;default:for(var bc=1,be=bi[n];bc<be;bc++){d[bc]=+bi[bc]+((bc%2)?bh:bg);}}}else{for(var S=0,e=bi[n];S<e;S++){bf[bd][S]=bi[S];}}switch(d[0]){case"Z":bh=bk;bg=bj;break;case"H":bh=d[1];break;case"V":bg=d[1];break;default:bh=bf[bd][bf[bd][n]-2];bg=bf[bd][bf[bd][n]-1];}}bf[aJ]=au._path2string;return bf;},null,aD),a8=function(e,E,d,i){return[e,E,d,i,d,i];},aT=function(e,E,bc,R,d,i){var S=1/3,bd=2/3;return[S*e+bd*bc,S*E+bd*R,S*d+bd*bc,S*i+bd*R,d,i];},O=function(bl,bQ,bu,bs,bm,bg,S,bk,bP,bn){var R=af.PI,br=R*120/180,d=R/180*(+bm||0),by=[],bv,bM=an(function(bR,bU,i){var bT=bR*af.cos(i)-bU*af.sin(i),bS=bR*af.sin(i)+bU*af.cos(i);return{x:bT,y:bS};});if(!bn){bv=bM(bl,bQ,-d);bl=bv.x;bQ=bv.y;bv=bM(bk,bP,-d);bk=bv.x;bP=bv.y;var e=af.cos(R/180*bm),bi=af.sin(R/180*bm),bA=(bl-bk)/2,bz=(bQ-bP)/2;var bK=(bA*bA)/(bu*bu)+(bz*bz)/(bs*bs);if(bK>1){bK=af.sqrt(bK);bu=bK*bu;bs=bK*bs;}var E=bu*bu,bD=bs*bs,bF=(bg==S?-1:1)*af.sqrt(af.abs((E*bD-E*bz*bz-bD*bA*bA)/(E*bz*bz+bD*bA*bA))),bp=bF*bu*bz/bs+(bl+bk)/2,bo=bF*-bs*bA/bu+(bQ+bP)/2,bf=af.asin(((bQ-bo)/bs).toFixed(7)),be=af.asin(((bP-bo)/bs).toFixed(7));bf=bl<bp?R-bf:bf;be=bk<bp?R-be:be;bf<0&&(bf=R*2+bf);be<0&&(be=R*2+be);if(S&&bf>be){bf=bf-R*2;}if(!S&&be>bf){be=be-R*2;}}else{bf=bn[0];be=bn[1];bp=bn[2];bo=bn[3];}var bj=be-bf;if(af.abs(bj)>br){var bq=be,bt=bk,bh=bP;be=bf+br*(S&&be>bf?1:-1);bk=bp+bu*af.cos(be);bP=bo+bs*af.sin(be);by=O(bk,bP,bu,bs,bm,0,S,bt,bh,[be,bq,bp,bo]);}bj=be-bf;var bd=af.cos(bf),bO=af.sin(bf),bc=af.cos(be),bN=af.sin(be),bB=af.tan(bj/4),bE=4/3*bu*bB,bC=4/3*bs*bB,bL=[bl,bQ],bJ=[bl+bE*bO,bQ-bC*bd],bI=[bk+bE*bN,bP-bC*bc],bG=[bk,bP];bJ[0]=2*bL[0]-bJ[0];bJ[1]=2*bL[1]-bJ[1];if(bn){return[bJ,bI,bG][a2](by);}else{by=[bJ,bI,bG][a2](by)[aH]()[C](",");var bw=[];for(var bH=0,bx=by[n];bH<bx;bH++){bw[bH]=bH%2?bM(by[bH-1],by[bH],d).y:bM(by[bH],by[bH+1],d).x;}return bw;}},T=function(e,d,E,i,be,bd,bc,S,bf){var R=1-bf;return{x:aV(R,3)*e+aV(R,2)*3*bf*E+R*3*bf*bf*be+aV(bf,3)*bc,y:aV(R,3)*d+aV(R,2)*3*bf*i+R*3*bf*bf*bd+aV(bf,3)*S};},aL=an(function(i,d,R,E,bl,bk,bh,be){var bj=(bl-2*R+i)-(bh-2*bl+R),bg=2*(R-i)-2*(bl-R),bd=i-R,bc=(-bg+af.sqrt(bg*bg-4*bj*bd))/2/bj,S=(-bg-af.sqrt(bg*bg-4*bj*bd))/2/bj,bf=[d,be],bi=[i,bh],e;af.abs(bc)>1000000000000&&(bc=0.5);af.abs(S)>1000000000000&&(S=0.5);if(bc>0&&bc<1){e=T(i,d,R,E,bl,bk,bh,be,bc);bi[f](e.x);bf[f](e.y);}if(S>0&&S<1){e=T(i,d,R,E,bl,bk,bh,be,S);bi[f](e.x);bf[f](e.y);}bj=(bk-2*E+d)-(be-2*bk+E);bg=2*(E-d)-2*(bk-E);bd=d-E;bc=(-bg+af.sqrt(bg*bg-4*bj*bd))/2/bj;S=(-bg-af.sqrt(bg*bg-4*bj*bd))/2/bj;af.abs(bc)>1000000000000&&(bc=0.5);af.abs(S)>1000000000000&&(S=0.5);if(bc>0&&bc<1){e=T(i,d,R,E,bl,bk,bh,be,bc);bi[f](e.x);bf[f](e.y);}if(S>0&&S<1){e=T(i,d,R,E,bl,bk,bh,be,S);bi[f](e.x);bf[f](e.y);}return{min:{x:aR[a7](0,bi),y:aR[a7](0,bf)},max:{x:h[a7](0,bi),y:h[a7](0,bf)}};}),L=an(function(bl,bg){var R=t(bl),bh=bg&&t(bg),bi={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},d={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},bc=function(bm,bn){var i,bo;if(!bm){return["C",bn.x,bn.y,bn.x,bn.y,bn.x,bn.y];}!(bm[0] in {T:1,Q:1})&&(bn.qx=bn.qy=null);switch(bm[0]){case"M":bn.X=bm[1];bn.Y=bm[2];break;case"A":bm=["C"][a2](O[a7](0,[bn.x,bn.y][a2](bm.slice(1))));break;case"S":i=bn.x+(bn.x-(bn.bx||bn.x));bo=bn.y+(bn.y-(bn.by||bn.y));bm=["C",i,bo][a2](bm.slice(1));break;case"T":bn.qx=bn.x+(bn.x-(bn.qx||bn.x));bn.qy=bn.y+(bn.y-(bn.qy||bn.y));bm=["C"][a2](aT(bn.x,bn.y,bn.qx,bn.qy,bm[1],bm[2]));break;case"Q":bn.qx=bm[1];bn.qy=bm[2];bm=["C"][a2](aT(bn.x,bn.y,bm[1],bm[2],bm[3],bm[4]));break;case"L":bm=["C"][a2](a8(bn.x,bn.y,bm[1],bm[2]));break;case"H":bm=["C"][a2](a8(bn.x,bn.y,bm[1],bn.y));break;case"V":bm=["C"][a2](a8(bn.x,bn.y,bn.x,bm[1]));break;case"Z":bm=["C"][a2](a8(bn.x,bn.y,bn.X,bn.Y));break;}return bm;},e=function(bm,bn){if(bm[bn][n]>7){bm[bn].shift();var bo=bm[bn];while(bo[n]){bm.splice(bn++,0,["C"][a2](bo.splice(0,6)));}bm.splice(bn,1);bj=h(R[n],bh&&bh[n]||0);}},E=function(bq,bp,bn,bm,bo){if(bq&&bp&&bq[bo][0]=="M"&&bp[bo][0]!="M"){bp.splice(bo,0,["M",bm.x,bm.y]);bn.bx=0;bn.by=0;bn.x=bq[bo][1];bn.y=bq[bo][2];bj=h(R[n],bh&&bh[n]||0);}};for(var be=0,bj=h(R[n],bh&&bh[n]||0);be<bj;be++){R[be]=bc(R[be],bi);e(R,be);bh&&(bh[be]=bc(bh[be],d));bh&&e(bh,be);E(R,bh,bi,d,be);E(bh,R,d,bi,be);var bd=R[be],bk=bh&&bh[be],S=bd[n],bf=bh&&bk[n];bi.x=bd[S-2];bi.y=bd[S-1];bi.bx=aa(bd[S-4])||bi.x;bi.by=aa(bd[S-3])||bi.y;d.bx=bh&&(aa(bk[bf-4])||d.x);d.by=bh&&(aa(bk[bf-3])||d.y);d.x=bh&&bk[bf-2];d.y=bh&&bk[bf-1];}return bh?[R,bh]:R;},null,aD),r=an(function(bg){var bf=[];for(var bc=0,bh=bg[n];bc<bh;bc++){var e={},be=bg[bc].match(/^([^:]*):?([\d\.]*)/);e.color=au.getRGB(be[1]);if(e.color.error){return null;}e.color=e.color.hex;be[2]&&(e.offset=be[2]+"%");bf[f](e);}for(bc=1,bh=bf[n]-1;bc<bh;bc++){if(!bf[bc].offset){var E=aa(bf[bc-1].offset||0),R=0;for(var S=bc+1;S<bh;S++){if(bf[S].offset){R=bf[S].offset;break;}}if(!R){R=100;S=bh;}R=aa(R);var bd=(R-E)/(S-bc+1);for(;bc<S;bc++){E+=bd;bf[bc].offset=E+"%";}}}return bf;}),av=function(d,R,i,E){var e;if(au.is(d,"string")||au.is(d,"object")){e=au.is(d,"string")?P.getElementById(d):d;if(e.tagName){if(R==null){return{container:e,width:e.style.pixelWidth||e.offsetWidth,height:e.style.pixelHeight||e.offsetHeight};}else{return{container:e,width:R,height:i};}}}else{if(au.is(d,aq)&&E!=null){return{container:1,x:d,y:R,width:i,height:E};}}},aP=function(d,i){var e=this;for(var E in i){if(i[W](E)&&!(E in d)){switch(typeof i[E]){case"function":(function(R){d[E]=d===e?R:function(){return R[a7](e,arguments);};})(i[E]);break;case"object":d[E]=d[E]||{};aP.call(this,d[E],i[E]);break;default:d[E]=i[E];break;}}}},ap=function(d,e){d==e.top&&(e.top=d.prev);d==e.bottom&&(e.bottom=d.next);d.next&&(d.next.prev=d.prev);d.prev&&(d.prev.next=d.next);},ac=function(d,e){if(e.top===d){return;}ap(d,e);d.next=null;d.prev=e.top;e.top.next=d;e.top=d;},l=function(d,e){if(e.bottom===d){return;}ap(d,e);d.next=e.bottom;d.prev=null;e.bottom.prev=d;e.bottom=d;},D=function(e,d,i){ap(e,i);d==i.top&&(i.top=e);d.next&&(d.next.prev=e);e.next=d.next;e.prev=d;d.next=e;},ax=function(e,d,i){ap(e,i);d==i.bottom&&(i.bottom=e);d.prev&&(d.prev.next=e);e.prev=d.prev;d.prev=e;e.next=d;},u=function(d){return function(){throw new Error("Rapha\xebl: you are calling to method \u201c"+d+"\u201d of removed object");};},az=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;if(au.svg){a4[a9].svgns="http://www.w3.org/2000/svg";a4[a9].xlink="http://www.w3.org/1999/xlink";U=function(d){return +d+(~~d===d)*0.5;};var Z=function(S){for(var e=0,E=S[n];e<E;e++){if(bb.call(S[e][0])!="a"){for(var d=1,R=S[e][n];d<R;d++){S[e][d]=U(S[e][d]);}}else{S[e][6]=U(S[e][6]);S[e][7]=U(S[e][7]);}}return S;},aS=function(i,d){if(d){for(var e in d){if(d[W](e)){i[y](e,d[e]);}}}else{return P.createElementNS(a4[a9].svgns,i);}};au[aJ]=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version;};var s=function(d,E){var e=aS("path");E.canvas&&E.canvas[aU](e);var i=new aF(e,E);i.type="path";ae(i,{fill:"none",stroke:"#000",path:d});return i;};var b=function(R,bk,d){var bh="linear",be=0.5,bc=0.5,bm=R.style;bk=(bk+aA)[aZ](az,function(bo,i,bp){bh="radial";if(i&&bp){be=aa(i);bc=aa(bp);var bn=((bc>0.5)*2-1);aV(be-0.5,2)+aV(bc-0.5,2)>0.25&&(bc=af.sqrt(0.25-aV(be-0.5,2))*bn+0.5)&&bc!=0.5&&(bc=bc.toFixed(5)-0.00001*bn);}return aA;});bk=bk[C](/\s*\-\s*/);if(bh=="linear"){var bd=bk.shift();bd=-aa(bd);if(isNaN(bd)){return null;}var S=[0,0,af.cos(bd*af.PI/180),af.sin(bd*af.PI/180)],bj=1/(h(af.abs(S[2]),af.abs(S[3]))||1);S[2]*=bj;S[3]*=bj;if(S[2]<0){S[0]=-S[2];S[2]=0;}if(S[3]<0){S[1]=-S[3];S[3]=0;}}var bg=r(bk);if(!bg){return null;}var e=R.getAttribute("fill");e=e.match(/^url\(#(.*)\)$/);e&&d.defs.removeChild(P.getElementById(e[1]));var E=aS(bh+"Gradient");E.id="r"+(au._id++)[aJ](36);aS(E,bh=="radial"?{fx:be,fy:bc}:{x1:S[0],y1:S[1],x2:S[2],y2:S[3]});d.defs[aU](E);for(var bf=0,bl=bg[n];bf<bl;bf++){var bi=aS("stop");aS(bi,{offset:bg[bf].offset?bg[bf].offset:!bf?"0%":"100%","stop-color":bg[bf].color||"#fff"});E[aU](bi);}aS(R,{fill:"url(#"+E.id+")",opacity:1,"fill-opacity":1});bm.fill=aA;bm.opacity=1;bm.fillOpacity=1;return 1;};var Q=function(e){var d=e.getBBox();aS(e.pattern,{patternTransform:au.format("translate({0},{1})",d.x,d.y)});};var ae=function(bi,br){var bl={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},bn=bi.node,bj=bi.attrs,bf=bi.rotate(),S=function(by,bx){bx=bl[bb.call(bx)];if(bx){var bv=by.attrs["stroke-width"]||"1",bt={round:bv,square:bv,butt:0}[by.attrs["stroke-linecap"]||br["stroke-linecap"]]||0,bw=[];var bu=bx[n];while(bu--){bw[bu]=bx[bu]*bv+((bu%2)?1:-1)*bt;}aS(bn,{"stroke-dasharray":bw[aH](",")});}};br[W]("rotation")&&(bf=br.rotation);var be=(bf+aA)[C](a);if(!(be.length-1)){be=null;}else{be[1]=+be[1];be[2]=+be[2];}aa(bf)&&bi.rotate(0,true);for(var bm in br){if(br[W](bm)){if(!k[W](bm)){continue;}var bk=br[bm];bj[bm]=bk;switch(bm){case"blur":bi.blur(bk);break;case"rotation":bi.rotate(bk,true);break;case"href":case"title":case"target":var bp=bn.parentNode;if(bb.call(bp.tagName)!="a"){var E=aS("a");bp.insertBefore(E,bn);E[aU](bn);bp=E;}bp.setAttributeNS(bi.paper.xlink,bm,bk);break;case"cursor":bn.style.cursor=bk;break;case"clip-rect":var e=(bk+aA)[C](a);if(e[n]==4){bi.clip&&bi.clip.parentNode.parentNode.removeChild(bi.clip.parentNode);var i=aS("clipPath"),bo=aS("rect");i.id="r"+(au._id++)[aJ](36);aS(bo,{x:e[0],y:e[1],width:e[2],height:e[3]});i[aU](bo);bi.paper.defs[aU](i);aS(bn,{"clip-path":"url(#"+i.id+")"});bi.clip=bo;}if(!bk){var bq=P.getElementById(bn.getAttribute("clip-path")[aZ](/(^url\(#|\)$)/g,aA));bq&&bq.parentNode.removeChild(bq);aS(bn,{"clip-path":aA});delete bi.clip;}break;case"path":if(bi.type=="path"){aS(bn,{d:bk?bj.path=Z(t(bk)):"M0,0"});}break;case"width":bn[y](bm,bk);if(bj.fx){bm="x";bk=bj.x;}else{break;}case"x":if(bj.fx){bk=-bj.x-(bj.width||0);}case"rx":if(bm=="rx"&&bi.type=="rect"){break;}case"cx":be&&(bm=="x"||bm=="cx")&&(be[1]+=bk-bj[bm]);bn[y](bm,U(bk));bi.pattern&&Q(bi);break;case"height":bn[y](bm,bk);if(bj.fy){bm="y";bk=bj.y;}else{break;}case"y":if(bj.fy){bk=-bj.y-(bj.height||0);}case"ry":if(bm=="ry"&&bi.type=="rect"){break;}case"cy":be&&(bm=="y"||bm=="cy")&&(be[2]+=bk-bj[bm]);bn[y](bm,U(bk));bi.pattern&&Q(bi);break;case"r":if(bi.type=="rect"){aS(bn,{rx:bk,ry:bk});}else{bn[y](bm,bk);}break;case"src":if(bi.type=="image"){bn.setAttributeNS(bi.paper.xlink,"href",bk);}break;case"stroke-width":bn.style.strokeWidth=bk;bn[y](bm,bk);if(bj["stroke-dasharray"]){S(bi,bj["stroke-dasharray"]);}break;case"stroke-dasharray":S(bi,bk);break;case"translation":var bc=(bk+aA)[C](a);bc[0]=+bc[0]||0;bc[1]=+bc[1]||0;if(be){be[1]+=bc[0];be[2]+=bc[1];}v.call(bi,bc[0],bc[1]);break;case"scale":bc=(bk+aA)[C](a);bi.scale(+bc[0]||1,+bc[1]||+bc[0]||1,isNaN(aa(bc[2]))?null:+bc[2],isNaN(aa(bc[3]))?null:+bc[3]);break;case"fill":var R=(bk+aA).match(c);if(R){i=aS("pattern");var bh=aS("image");i.id="r"+(au._id++)[aJ](36);aS(i,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});aS(bh,{x:0,y:0});bh.setAttributeNS(bi.paper.xlink,"href",R[1]);i[aU](bh);var bs=P.createElement("img");bs.style.cssText="position:absolute;left:-9999em;top-9999em";bs.onload=function(){aS(i,{width:this.offsetWidth,height:this.offsetHeight});aS(bh,{width:this.offsetWidth,height:this.offsetHeight});P.body.removeChild(this);bi.paper.safari();};P.body[aU](bs);bs.src=R[1];bi.paper.defs[aU](i);bn.style.fill="url(#"+i.id+")";aS(bn,{fill:"url(#"+i.id+")"});bi.pattern=i;bi.pattern&&Q(bi);break;}if(!au.getRGB(bk).error){delete br.gradient;delete bj.gradient;!au.is(bj.opacity,"undefined")&&au.is(br.opacity,"undefined")&&aS(bn,{opacity:bj.opacity});!au.is(bj["fill-opacity"],"undefined")&&au.is(br["fill-opacity"],"undefined")&&aS(bn,{"fill-opacity":bj["fill-opacity"]});}else{if((({circle:1,ellipse:1})[W](bi.type)||(bk+aA).charAt()!="r")&&b(bn,bk,bi.paper)){bj.gradient=bk;bj.fill="none";break;}}case"stroke":bn[y](bm,au.getRGB(bk).hex);break;case"gradient":(({circle:1,ellipse:1})[W](bi.type)||(bk+aA).charAt()!="r")&&b(bn,bk,bi.paper);break;case"opacity":case"fill-opacity":if(bj.gradient){var d=P.getElementById(bn.getAttribute("fill")[aZ](/^url\(#|\)$/g,aA));if(d){var bd=d.getElementsByTagName("stop");bd[bd[n]-1][y]("stop-opacity",bk);}break;}default:bm=="font-size"&&(bk=K(bk,10)+"px");var bg=bm[aZ](/(\-.)/g,function(bt){return aX.call(bt.substring(1));});bn.style[bg]=bk;bn[y](bm,bk);break;}}}I(bi,br);if(be){bi.rotate(be.join(at));}else{aa(bf)&&bi.rotate(bf,true);}};var j=1.2,I=function(d,R){if(d.type!="text"||!(R[W]("text")||R[W]("font")||R[W]("font-size")||R[W]("x")||R[W]("y"))){return;}var bf=d.attrs,e=d.node,bh=e.firstChild?K(P.defaultView.getComputedStyle(e.firstChild,aA).getPropertyValue("font-size"),10):10;if(R[W]("text")){bf.text=R.text;while(e.firstChild){e.removeChild(e.firstChild);}var E=(R.text+aA)[C]("\n");for(var S=0,bg=E[n];S<bg;S++){if(E[S]){var bd=aS("tspan");S&&aS(bd,{dy:bh*j,x:bf.x});bd[aU](P.createTextNode(E[S]));e[aU](bd);}}}else{E=e.getElementsByTagName("tspan");for(S=0,bg=E[n];S<bg;S++){S&&aS(E[S],{dy:bh*j,x:bf.x});}}aS(e,{y:bf.y});var bc=d.getBBox(),be=bf.y-(bc.y+bc.height/2);be&&isFinite(be)&&aS(e,{y:bf.y+be});},aF=function(e,d){var E=0,i=0;this[0]=e;this.id=au._oid++;this.node=e;e.raphael=this;this.paper=d;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!d.bottom&&(d.bottom=this);this.prev=d.top;d.top&&(d.top.next=this);d.top=this;this.next=null;};aF[a9].rotate=function(e,d,E){if(this.removed){return this;}if(e==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aH](at);}return this._.rt.deg;}var i=this.getBBox();e=(e+aA)[C](a);if(e[n]-1){d=aa(e[1]);E=aa(e[2]);}e=aa(e[0]);if(d!=null){this._.rt.deg=e;}else{this._.rt.deg+=e;}(E==null)&&(d=null);this._.rt.cx=d;this._.rt.cy=E;d=d==null?i.x+i.width/2:d;E=E==null?i.y+i.height/2:E;if(this._.rt.deg){this.transformations[0]=au.format("rotate({0} {1} {2})",this._.rt.deg,d,E);this.clip&&aS(this.clip,{transform:au.format("rotate({0} {1} {2})",-this._.rt.deg,d,E)});}else{this.transformations[0]=aA;this.clip&&aS(this.clip,{transform:aA});}aS(this.node,{transform:this.transformations[aH](at)});return this;};aF[a9].hide=function(){!this.removed&&(this.node.style.display="none");return this;};aF[a9].show=function(){!this.removed&&(this.node.style.display="");return this;};aF[a9].remove=function(){if(this.removed){return;}ap(this,this.paper);this.node.parentNode.removeChild(this.node);for(var d in this){delete this[d];}this.removed=true;};aF[a9].getBBox=function(){if(this.removed){return this;}if(this.type=="path"){return Y(this.attrs.path);}if(this.node.style.display=="none"){this.show();var E=true;}var bd={};try{bd=this.node.getBBox();}catch(S){}finally{bd=bd||{};}if(this.type=="text"){bd={x:bd.x,y:Infinity,width:0,height:0};for(var d=0,R=this.node.getNumberOfChars();d<R;d++){var bc=this.node.getExtentOfChar(d);(bc.y<bd.y)&&(bd.y=bc.y);(bc.y+bc.height-bd.y>bd.height)&&(bd.height=bc.y+bc.height-bd.y);(bc.x+bc.width-bd.x>bd.width)&&(bd.width=bc.x+bc.width-bd.x);}}E&&this.hide();return bd;};aF[a9].attr=function(E,bd){if(this.removed){return this;}if(E==null){var S={};for(var R in this.attrs){if(this.attrs[W](R)){S[R]=this.attrs[R];}}this._.rt.deg&&(S.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(S.scale=this.scale());S.gradient&&S.fill=="none"&&(S.fill=S.gradient)&&delete S.gradient;return S;}if(bd==null&&au.is(E,"string")){if(E=="translation"){return v.call(this);}if(E=="rotation"){return this.rotate();}if(E=="scale"){return this.scale();}if(E=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient;}return this.attrs[E];}if(bd==null&&au.is(E,"array")){var d={};for(var e=0,bc=E.length;e<bc;e++){d[E[e]]=this.attr(E[e]);}return d;}if(bd!=null){var be={};be[E]=bd;ae(this,be);}else{if(E!=null&&au.is(E,"object")){ae(this,E);}}return this;};aF[a9].toFront=function(){if(this.removed){return this;}this.node.parentNode[aU](this.node);var d=this.paper;d.top!=this&&ac(this,d);return this;};aF[a9].toBack=function(){if(this.removed){return this;}if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);l(this,this.paper);var d=this.paper;}return this;};aF[a9].insertAfter=function(d){if(this.removed){return this;}var e=d.node;if(e.nextSibling){e.parentNode.insertBefore(this.node,e.nextSibling);}else{e.parentNode[aU](this.node);}D(this,d,this.paper);return this;};aF[a9].insertBefore=function(d){if(this.removed){return this;}var e=d.node;e.parentNode.insertBefore(this.node,e);ax(this,d,this.paper);return this;};aF[a9].blur=function(e){var d=this;if(+e!==0){var i=aS("filter"),E=aS("feGaussianBlur");d.attrs.blur=e;i.id="r"+(au._id++)[aJ](36);aS(E,{stdDeviation:+e||1.5});i.appendChild(E);d.paper.defs.appendChild(i);d._blur=i;aS(d.node,{filter:"url(#"+i.id+")"});}else{if(d._blur){d._blur.parentNode.removeChild(d._blur);delete d._blur;delete d.attrs.blur;}d.node.removeAttribute("filter");}};var V=function(e,d,S,R){d=U(d);S=U(S);var E=aS("circle");e.canvas&&e.canvas[aU](E);var i=new aF(E,e);i.attrs={cx:d,cy:S,r:R,fill:"none",stroke:"#000"};i.type="circle";aS(E,i.attrs);return i;};var aO=function(i,d,bd,e,S,bc){d=U(d);bd=U(bd);var R=aS("rect");i.canvas&&i.canvas[aU](R);var E=new aF(R,i);E.attrs={x:d,y:bd,width:e,height:S,r:bc||0,rx:bc||0,ry:bc||0,fill:"none",stroke:"#000"};E.type="rect";aS(R,E.attrs);return E;};var am=function(e,d,bc,S,R){d=U(d);bc=U(bc);var E=aS("ellipse");e.canvas&&e.canvas[aU](E);var i=new aF(E,e);i.attrs={cx:d,cy:bc,rx:S,ry:R,fill:"none",stroke:"#000"};i.type="ellipse";aS(E,i.attrs);return i;};var q=function(i,bc,d,bd,e,S){var R=aS("image");aS(R,{x:d,y:bd,width:e,height:S,preserveAspectRatio:"none"});R.setAttributeNS(i.xlink,"href",bc);i.canvas&&i.canvas[aU](R);var E=new aF(R,i);E.attrs={x:d,y:bd,width:e,height:S,src:bc};E.type="image";return E;};var ab=function(e,d,S,R){var E=aS("text");aS(E,{x:d,y:S,"text-anchor":"middle"});e.canvas&&e.canvas[aU](E);var i=new aF(E,e);i.attrs={x:d,y:S,"text-anchor":"middle",text:R,font:k.font,stroke:"none",fill:"#000"};i.type="text";ae(i,i.attrs);return i;};var a6=function(e,d){this.width=e||this.width;this.height=d||this.height;this.canvas[y]("width",this.width);this.canvas[y]("height",this.height);return this;};var z=function(){var E=av[a7](0,arguments),i=E&&E.container,e=E.x,bc=E.y,R=E.width,d=E.height;if(!i){throw new Error("SVG container not found.");}var S=aS("svg");R=R||512;d=d||342;aS(S,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:R,height:d});if(i==1){S.style.cssText="position:absolute;left:"+e+"px;top:"+bc+"px";P.body[aU](S);}else{if(i.firstChild){i.insertBefore(S,i.firstChild);}else{i[aU](S);}}i=new a4;i.width=R;i.height=d;i.canvas=S;aP.call(i,i,au.fn);i.clear();return i;};a4[a9].clear=function(){var d=this.canvas;while(d.firstChild){d.removeChild(d.firstChild);}this.bottom=this.top=null;(this.desc=aS("desc"))[aU](P.createTextNode("Created with Rapha\xebl"));d[aU](this.desc);d[aU](this.defs=aS("defs"));};a4[a9].remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var d in this){this[d]=u(d);}};}if(au.vml){var H={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},ay=/([clmz]),?([^clmz]*)/gi,ba=/-?[^,\s-]+/g,aI=1000+at+1000,p=10,aQ=function(bh){var be=/[ahqstv]/ig,E=t;(bh+aA).match(be)&&(E=L);be=/[clmz]/g;if(E==t&&!(bh+aA).match(be)){var bd=(bh+aA)[aZ](ay,function(bk,bm,bi){var bl=[],i=bb.call(bm)=="m",bj=H[bm];bi[aZ](ba,function(bn){if(i&&bl[n]==2){bj+=bl+H[bm=="m"?"l":"L"];bl=[];}bl[f](U(bn*p));});return bj+bl;});return bd;}var bf=E(bh),e,d;bd=[];for(var S=0,bg=bf[n];S<bg;S++){e=bf[S];d=bb.call(bf[S][0]);d=="z"&&(d="x");for(var R=1,bc=e[n];R<bc;R++){d+=U(e[R]*p)+(R!=bc-1?",":aA);}bd[f](d);}return bd[aH](at);};au[aJ]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version;};s=function(i,e){var S=al("group");S.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";S.coordsize=e.coordsize;S.coordorigin=e.coordorigin;var R=al("shape"),E=R.style;E.width=e.width+"px";E.height=e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;S[aU](R);var bc=new aF(R,S,e),d={fill:"none",stroke:"#000"};i&&(d.path=i);bc.isAbsolute=true;bc.type="path";bc.path=[];bc.Path=aA;ae(bc,d);e.canvas[aU](S);return bc;};ae=function(bf,bk){bf.attrs=bf.attrs||{};var bi=bf.node,bl=bf.attrs,bc=bi.style,E,bp=bf;for(var bd in bk){if(bk[W](bd)){bl[bd]=bk[bd];}}bk.href&&(bi.href=bk.href);bk.title&&(bi.title=bk.title);bk.target&&(bi.target=bk.target);bk.cursor&&(bc.cursor=bk.cursor);"blur" in bk&&bf.blur(bk.blur);if(bk.path&&bf.type=="path"){bl.path=bk.path;bi.path=aQ(bl.path);}if(bk.rotation!=null){bf.rotate(bk.rotation,true);}if(bk.translation){E=(bk.translation+aA)[C](a);v.call(bf,E[0],E[1]);if(bf._.rt.cx!=null){bf._.rt.cx+=+E[0];bf._.rt.cy+=+E[1];bf.setBox(bf.attrs,E[0],E[1]);}}if(bk.scale){E=(bk.scale+aA)[C](a);bf.scale(+E[0]||1,+E[1]||+E[0]||1,+E[2]||null,+E[3]||null);}if("clip-rect" in bk){var d=(bk["clip-rect"]+aA)[C](a);if(d[n]==4){d[2]=+d[2]+(+d[0]);d[3]=+d[3]+(+d[1]);var be=bi.clipRect||P.createElement("div"),bo=be.style,S=bi.parentNode;bo.clip=au.format("rect({1}px {2}px {3}px {0}px)",d);if(!bi.clipRect){bo.position="absolute";bo.top=0;bo.left=0;bo.width=bf.paper.width+"px";bo.height=bf.paper.height+"px";S.parentNode.insertBefore(be,S);be[aU](S);bi.clipRect=be;}}if(!bk["clip-rect"]){bi.clipRect&&(bi.clipRect.style.clip=aA);}}if(bf.type=="image"&&bk.src){bi.src=bk.src;}if(bf.type=="image"&&bk.opacity){bi.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+(bk.opacity*100)+")";bc.filter=(bi.filterMatrix||aA)+(bi.filterOpacity||aA);}bk.font&&(bc.font=bk.font);bk["font-family"]&&(bc.fontFamily='"'+bk["font-family"][C](",")[0][aZ](/^['"]+|['"]+$/g,aA)+'"');bk["font-size"]&&(bc.fontSize=bk["font-size"]);bk["font-weight"]&&(bc.fontWeight=bk["font-weight"]);bk["font-style"]&&(bc.fontStyle=bk["font-style"]);if(bk.opacity!=null||bk["stroke-width"]!=null||bk.fill!=null||bk.stroke!=null||bk["stroke-width"]!=null||bk["stroke-opacity"]!=null||bk["fill-opacity"]!=null||bk["stroke-dasharray"]!=null||bk["stroke-miterlimit"]!=null||bk["stroke-linejoin"]!=null||bk["stroke-linecap"]!=null){bi=bf.shape||bi;var bj=(bi.getElementsByTagName("fill")&&bi.getElementsByTagName("fill")[0]),bm=false;!bj&&(bm=bj=al("fill"));if("fill-opacity" in bk||"opacity" in bk){var e=((+bl["fill-opacity"]+1||2)-1)*((+bl.opacity+1||2)-1);e<0&&(e=0);e>1&&(e=1);bj.opacity=e;}bk.fill&&(bj.on=true);if(bj.on==null||bk.fill=="none"){bj.on=false;}if(bj.on&&bk.fill){var i=bk.fill.match(c);if(i){bj.src=i[1];bj.type="tile";}else{bj.color=au.getRGB(bk.fill).hex;bj.src=aA;bj.type="solid";if(au.getRGB(bk.fill).error&&(bp.type in {circle:1,ellipse:1}||(bk.fill+aA).charAt()!="r")&&b(bp,bk.fill)){bl.fill="none";bl.gradient=bk.fill;}}}bm&&bi[aU](bj);var R=(bi.getElementsByTagName("stroke")&&bi.getElementsByTagName("stroke")[0]),bn=false;!R&&(bn=R=al("stroke"));if((bk.stroke&&bk.stroke!="none")||bk["stroke-width"]||bk["stroke-opacity"]!=null||bk["stroke-dasharray"]||bk["stroke-miterlimit"]||bk["stroke-linejoin"]||bk["stroke-linecap"]){R.on=true;}(bk.stroke=="none"||R.on==null||bk.stroke==0||bk["stroke-width"]==0)&&(R.on=false);R.on&&bk.stroke&&(R.color=au.getRGB(bk.stroke).hex);e=((+bl["stroke-opacity"]+1||2)-1)*((+bl.opacity+1||2)-1);var bg=(aa(bk["stroke-width"])||1)*0.75;e<0&&(e=0);e>1&&(e=1);bk["stroke-width"]==null&&(bg=bl["stroke-width"]);bk["stroke-width"]&&(R.weight=bg);bg&&bg<1&&(e*=bg)&&(R.weight=1);R.opacity=e;bk["stroke-linejoin"]&&(R.joinstyle=bk["stroke-linejoin"]||"miter");R.miterlimit=bk["stroke-miterlimit"]||8;bk["stroke-linecap"]&&(R.endcap=bk["stroke-linecap"]=="butt"?"flat":bk["stroke-linecap"]=="square"?"square":"round");if(bk["stroke-dasharray"]){var bh={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};R.dashstyle=bh[W](bk["stroke-dasharray"])?bh[bk["stroke-dasharray"]]:aA;}bn&&bi[aU](R);}if(bp.type=="text"){bc=bp.paper.span.style;bl.font&&(bc.font=bl.font);bl["font-family"]&&(bc.fontFamily=bl["font-family"]);bl["font-size"]&&(bc.fontSize=bl["font-size"]);bl["font-weight"]&&(bc.fontWeight=bl["font-weight"]);bl["font-style"]&&(bc.fontStyle=bl["font-style"]);bp.node.string&&(bp.paper.span.innerHTML=(bp.node.string+aA)[aZ](/</g,"&#60;")[aZ](/&/g,"&#38;")[aZ](/\n/g,"<br>"));bp.W=bl.w=bp.paper.span.offsetWidth;bp.H=bl.h=bp.paper.span.offsetHeight;bp.X=bl.x;bp.Y=bl.y+U(bp.H/2);switch(bl["text-anchor"]){case"start":bp.node.style["v-text-align"]="left";bp.bbx=U(bp.W/2);break;case"end":bp.node.style["v-text-align"]="right";bp.bbx=-U(bp.W/2);break;default:bp.node.style["v-text-align"]="center";break;}}};b=function(d,bd){d.attrs=d.attrs||{};var be=d.attrs,bg=d.node.getElementsByTagName("fill"),S="linear",bc=".5 .5";d.attrs.gradient=bd;bd=(bd+aA)[aZ](az,function(bi,bj,i){S="radial";if(bj&&i){bj=aa(bj);i=aa(i);aV(bj-0.5,2)+aV(i-0.5,2)>0.25&&(i=af.sqrt(0.25-aV(bj-0.5,2))*((i>0.5)*2-1)+0.5);bc=bj+at+i;}return aA;});bd=bd[C](/\s*\-\s*/);if(S=="linear"){var e=bd.shift();e=-aa(e);if(isNaN(e)){return null;}}var R=r(bd);if(!R){return null;}d=d.shape||d.node;bg=bg[0]||al("fill");if(R[n]){bg.on=true;bg.method="none";bg.type=(S=="radial")?"gradientradial":"gradient";bg.color=R[0].color;bg.color2=R[R[n]-1].color;var bh=[];for(var E=0,bf=R[n];E<bf;E++){R[E].offset&&bh[f](R[E].offset+at+R[E].color);}bg.colors&&(bg.colors.value=bh[n]?bh[aH](","):"0% "+bg.color);if(S=="radial"){bg.focus="100%";bg.focussize=bc;bg.focusposition=bc;}else{bg.angle=(270-e)%360;}}return 1;};aF=function(R,bc,d){var S=0,i=0,e=0,E=1;this[0]=R;this.id=au._oid++;this.node=R;R.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=bc;this.paper=d;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!d.bottom&&(d.bottom=this);this.prev=d.top;d.top&&(d.top.next=this);d.top=this;this.next=null;};aF[a9].rotate=function(e,d,i){if(this.removed){return this;}if(e==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aH](at);}return this._.rt.deg;}e=(e+aA)[C](a);if(e[n]-1){d=aa(e[1]);i=aa(e[2]);}e=aa(e[0]);if(d!=null){this._.rt.deg=e;}else{this._.rt.deg+=e;}i==null&&(d=null);this._.rt.cx=d;this._.rt.cy=i;this.setBox(this.attrs,d,i);this.Group.style.rotation=this._.rt.deg;return this;};aF[a9].setBox=function(bo,e,d){if(this.removed){return this;}var bi=this.Group.style,R=(this.shape&&this.shape.style)||this.node.style;bo=bo||{};for(var bm in bo){if(bo[W](bm)){this.attrs[bm]=bo[bm];}}e=e||this._.rt.cx;d=d||this._.rt.cy;var bk=this.attrs,bd,bc,be,bn;switch(this.type){case"circle":bd=bk.cx-bk.r;bc=bk.cy-bk.r;be=bn=bk.r*2;break;case"ellipse":bd=bk.cx-bk.rx;bc=bk.cy-bk.ry;be=bk.rx*2;bn=bk.ry*2;break;case"rect":case"image":bd=+bk.x;bc=+bk.y;be=bk.width||0;bn=bk.height||0;break;case"text":this.textpath.v=["m",U(bk.x),", ",U(bk.y-2),"l",U(bk.x)+1,", ",U(bk.y-2)][aH](aA);bd=bk.x-U(this.W/2);bc=bk.y-this.H/2;be=this.W;bn=this.H;break;case"path":if(!this.attrs.path){bd=0;bc=0;be=this.paper.width;bn=this.paper.height;}else{var bl=Y(this.attrs.path);bd=bl.x;bc=bl.y;be=bl.width;bn=bl.height;}break;default:bd=0;bc=0;be=this.paper.width;bn=this.paper.height;break;}e=(e==null)?bd+be/2:e;d=(d==null)?bc+bn/2:d;var E=e-this.paper.width/2,bh=d-this.paper.height/2,bg;bi.left!=(bg=E+"px")&&(bi.left=bg);bi.top!=(bg=bh+"px")&&(bi.top=bg);this.X=this.type=="path"?-E:bd;this.Y=this.type=="path"?-bh:bc;this.W=be;this.H=bn;if(this.type=="path"){R.left!=(bg=-E*p+"px")&&(R.left=bg);R.top!=(bg=-bh*p+"px")&&(R.top=bg);}else{if(this.type=="text"){R.left!=(bg=-E+"px")&&(R.left=bg);R.top!=(bg=-bh+"px")&&(R.top=bg);}else{bi.width!=(bg=this.paper.width+"px")&&(bi.width=bg);bi.height!=(bg=this.paper.height+"px")&&(bi.height=bg);R.left!=(bg=bd-E+"px")&&(R.left=bg);R.top!=(bg=bc-bh+"px")&&(R.top=bg);R.width!=(bg=be+"px")&&(R.width=bg);R.height!=(bg=bn+"px")&&(R.height=bg);var S=(+bo.r||0)/aR(be,bn);if(this.type=="rect"&&this.arcsize.toFixed(4)!=S.toFixed(4)&&(S||this.arcsize)){var bj=al("roundrect"),bp={},bf=this.events&&this.events[n];bm=0;bj.arcsize=S;bj.raphael=this;this.Group[aU](bj);this.Group.removeChild(this.node);this[0]=this.node=bj;this.arcsize=S;for(bm in bk){bp[bm]=bk[bm];}delete bp.scale;this.attr(bp);if(this.events){for(;bm<bf;bm++){this.events[bm].unbind=ai(this.node,this.events[bm].name,this.events[bm].f,this);}}}}}};aF[a9].hide=function(){!this.removed&&(this.Group.style.display="none");return this;};aF[a9].show=function(){!this.removed&&(this.Group.style.display="block");return this;};aF[a9].getBBox=function(){if(this.removed){return this;}if(this.type=="path"){return Y(this.attrs.path);}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H};};aF[a9].remove=function(){if(this.removed){return;}ap(this,this.paper);this.node.parentNode.removeChild(this.node);this.Group.parentNode.removeChild(this.Group);this.shape&&this.shape.parentNode.removeChild(this.shape);for(var d in this){delete this[d];}this.removed=true;};aF[a9].attr=function(e,bc){if(this.removed){return this;}if(e==null){var R={};for(var E in this.attrs){if(this.attrs[W](E)){R[E]=this.attrs[E];}}this._.rt.deg&&(R.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(R.scale=this.scale());R.gradient&&R.fill=="none"&&(R.fill=R.gradient)&&delete R.gradient;return R;}if(bc==null&&au.is(e,"string")){if(e=="translation"){return v.call(this);}if(e=="rotation"){return this.rotate();}if(e=="scale"){return this.scale();}if(e=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient;}return this.attrs[e];}if(this.attrs&&bc==null&&au.is(e,"array")){var S,d={};for(E=0,S=e[n];E<S;E++){d[e[E]]=this.attr(e[E]);}return d;}var bd;if(bc!=null){bd={};bd[e]=bc;}bc==null&&au.is(e,"object")&&(bd=e);if(bd){if(bd.text&&this.type=="text"){this.node.string=bd.text;}ae(this,bd);if(bd.gradient&&(({circle:1,ellipse:1})[W](this.type)||(bd.gradient+aA).charAt()!="r")){b(this,bd.gradient);}(this.type!="path"||this._.rt.deg)&&this.setBox(this.attrs);}return this;};aF[a9].toFront=function(){!this.removed&&this.Group.parentNode[aU](this.Group);this.paper.top!=this&&ac(this,this.paper);return this;};aF[a9].toBack=function(){if(this.removed){return this;}if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);l(this,this.paper);}return this;};aF[a9].insertAfter=function(d){if(this.removed){return this;}if(d.Group.nextSibling){d.Group.parentNode.insertBefore(this.Group,d.Group.nextSibling);}else{d.Group.parentNode[aU](this.Group);}D(this,d,this.paper);return this;};aF[a9].insertBefore=function(d){if(this.removed){return this;}d.Group.parentNode.insertBefore(this.Group,d.Group);ax(this,d,this.paper);return this;};var a3=/ progid:\S+Blur\([^\)]+\)/g;aF[a9].blur=function(d){var e=this.node.style,i=e.filter;i=i.replace(a3,"");if(+d!==0){this.attrs.blur=d;e.filter=i+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+d||1.5)+")";e.margin=Raphael.format("-{0}px 0 0 -{0}px",Math.round(+d||1.5));}else{e.filter=i;e.margin=0;delete this.attrs.blur;}};V=function(e,d,bd,S){var R=al("group"),bc=al("oval"),i=bc.style;R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;R[aU](bc);var E=new aF(bc,R,e);E.type="circle";ae(E,{stroke:"#000",fill:"none"});E.attrs.cx=d;E.attrs.cy=bd;E.attrs.r=S;E.setBox({x:d-S,y:bd-S,width:S*2,height:S*2});e.canvas[aU](R);return E;};aO=function(e,bd,bc,be,E,d){var R=al("group"),i=al("roundrect"),bf=(+d||0)/(aR(be,E));R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;R[aU](i);i.arcsize=bf;var S=new aF(i,R,e);S.type="rect";ae(S,{stroke:"#000"});S.arcsize=bf;S.setBox({x:bd,y:bc,width:be,height:E,r:d});e.canvas[aU](R);return S;};am=function(d,be,bd,i,e){var R=al("group"),E=al("oval"),bc=E.style;R.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";R.coordsize=aI;R.coordorigin=d.coordorigin;R[aU](E);var S=new aF(E,R,d);S.type="ellipse";ae(S,{stroke:"#000"});S.attrs.cx=be;S.attrs.cy=bd;S.attrs.rx=i;S.attrs.ry=e;S.setBox({x:be-i,y:bd-e,width:i*2,height:e*2});d.canvas[aU](R);return S;};q=function(e,d,be,bd,bf,E){var R=al("group"),i=al("image"),bc=i.style;R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;i.src=d;R[aU](i);var S=new aF(i,R,e);S.type="image";S.attrs.src=d;S.attrs.x=be;S.attrs.y=bd;S.attrs.w=bf;S.attrs.h=E;S.setBox({x:be,y:bd,width:bf,height:E});e.canvas[aU](R);return S;};ab=function(e,be,bd,bf){var R=al("group"),E=al("shape"),bc=E.style,bg=al("path"),d=bg.style,i=al("textpath");R.style.cssText="position:absolute;left:0;top:0;width:"+e.width+"px;height:"+e.height+"px";R.coordsize=aI;R.coordorigin=e.coordorigin;bg.v=au.format("m{0},{1}l{2},{1}",U(be*10),U(bd*10),U(be*10)+1);bg.textpathok=true;bc.width=e.width;bc.height=e.height;i.string=bf+aA;i.on=true;E[aU](i);E[aU](bg);R[aU](E);var S=new aF(i,R,e);S.shape=E;S.textpath=bg;S.type="text";S.attrs.text=bf;S.attrs.x=be;S.attrs.y=bd;S.attrs.w=1;S.attrs.h=1;ae(S,{font:k.font,stroke:"none",fill:"#000"});S.setBox();e.canvas[aU](R);return S;};a6=function(i,d){var e=this.canvas.style;i==+i&&(i+="px");d==+d&&(d+="px");e.width=i;e.height=d;e.clip="rect(0 "+i+" "+d+" 0)";return this;};var al;P.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!P.namespaces.rvml&&P.namespaces.add("rvml","urn:schemas-microsoft-com:vml");al=function(d){return P.createElement("<rvml:"+d+' class="rvml">');};}catch(aj){al=function(d){return P.createElement("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');};}z=function(){var i=av[a7](0,arguments),d=i.container,be=i.height,bf,e=i.width,bd=i.x,bc=i.y;if(!d){throw new Error("VML container not found.");}var R=new a4,S=R.canvas=P.createElement("div"),E=S.style;e=e||512;be=be||342;e==+e&&(e+="px");be==+be&&(be+="px");R.width=1000;R.height=1000;R.coordsize=p*1000+at+p*1000;R.coordorigin="0 0";R.span=P.createElement("span");R.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";S[aU](R.span);E.cssText=au.format("width:{0};height:{1};position:absolute;clip:rect(0 {0} {1} 0);overflow:hidden",e,be);if(d==1){P.body[aU](S);E.left=bd+"px";E.top=bc+"px";}else{d.style.width=e;d.style.height=be;if(d.firstChild){d.insertBefore(S,d.firstChild);}else{d[aU](S);}}aP.call(R,R,au.fn);return R;};a4[a9].clear=function(){this.canvas.innerHTML=aA;this.span=P.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[aU](this.span);this.bottom=this.top=null;};a4[a9].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var d in this){this[d]=u(d);}return true;};}if((/^Apple|^Google/).test(aB.navigator.vendor)&&!(aB.navigator.userAgent.indexOf("Version/4.0")+1)){a4[a9].safari=function(){var d=this.rect(-99,-99,this.width+99,this.height+99);aB.setTimeout(function(){d.remove();});};}else{a4[a9].safari=function(){};}var ai=(function(){if(P.addEventListener){return function(R,i,e,d){var E=function(S){return e.call(d,S);};R.addEventListener(i,E,false);return function(){R.removeEventListener(i,E,false);return true;};};}else{if(P.attachEvent){return function(S,E,i,e){var R=function(bc){return i.call(e,bc||aB.event);};S.attachEvent("on"+E,R);var d=function(){S.detachEvent("on"+E,R);return true;};return d;};}}})();for(var ag=J[n];ag--;){(function(d){aF[a9][d]=function(e){if(au.is(e,"function")){this.events=this.events||[];this.events.push({name:d,f:e,unbind:ai(this.shape||this.node,d,e,this)});}return this;};aF[a9]["un"+d]=function(E){var i=this.events,e=i[n];while(e--){if(i[e].name==d&&i[e].f==E){i[e].unbind();i.splice(e,1);!i.length&&delete this.events;return this;}}return this;};})(J[ag]);}aF[a9].hover=function(e,d){return this.mouseover(e).mouseout(d);};aF[a9].unhover=function(e,d){return this.unmouseover(e).unmouseout(d);};a4[a9].circle=function(d,i,e){return V(this,d||0,i||0,e||0);};a4[a9].rect=function(d,R,e,i,E){return aO(this,d||0,R||0,e||0,i||0,E||0);};a4[a9].ellipse=function(d,E,i,e){return am(this,d||0,E||0,i||0,e||0);};a4[a9].path=function(d){d&&!au.is(d,"string")&&!au.is(d[0],"array")&&(d+=aA);return s(au.format[a7](au,arguments),this);};a4[a9].image=function(E,d,R,e,i){return q(this,E||"about:blank",d||0,R||0,e||0,i||0);};a4[a9].text=function(d,i,e){return ab(this,d||0,i||0,e||aA);};a4[a9].set=function(d){arguments[n]>1&&(d=Array[a9].splice.call(arguments,0,arguments[n]));return new X(d);};a4[a9].setSize=a6;a4[a9].top=a4[a9].bottom=null;a4[a9].raphael=au;function x(){return this.x+at+this.y;}aF[a9].scale=function(bi,bh,E,e){if(bi==null&&bh==null){return{x:this._.sx,y:this._.sy,toString:x};}bh=bh||bi;!+bh&&(bh=bi);var bm,bk,bl,bj,by=this.attrs;if(bi!=0){var bg=this.getBBox(),bd=bg.x+bg.width/2,R=bg.y+bg.height/2,bx=bi/this._.sx,bw=bh/this._.sy;E=(+E||E==0)?E:bd;e=(+e||e==0)?e:R;var bf=~~(bi/af.abs(bi)),bc=~~(bh/af.abs(bh)),bp=this.node.style,bA=E+(bd-E)*bx,bz=e+(R-e)*bw;switch(this.type){case"rect":case"image":var be=by.width*bf*bx,bo=by.height*bc*bw;this.attr({height:bo,r:by.r*aR(bf*bx,bc*bw),width:be,x:bA-be/2,y:bz-bo/2});break;case"circle":case"ellipse":this.attr({rx:by.rx*bf*bx,ry:by.ry*bc*bw,r:by.r*aR(bf*bx,bc*bw),cx:bA,cy:bz});break;case"path":var br=ah(by.path),bs=true;for(var bu=0,bn=br[n];bu<bn;bu++){var bq=br[bu],S=aX.call(bq[0]);if(S=="M"&&bs){continue;}else{bs=false;}if(S=="A"){bq[br[bu][n]-2]*=bx;bq[br[bu][n]-1]*=bw;bq[1]*=bf*bx;bq[2]*=bc*bw;bq[5]=+!(bf+bc?!+bq[5]:+bq[5]);}else{if(S=="H"){for(var bt=1,bv=bq[n];bt<bv;bt++){bq[bt]*=bx;}}else{if(S=="V"){for(bt=1,bv=bq[n];bt<bv;bt++){bq[bt]*=bw;}}else{for(bt=1,bv=bq[n];bt<bv;bt++){bq[bt]*=(bt%2)?bx:bw;}}}}}var d=Y(br);bm=bA-d.x-d.width/2;bk=bz-d.y-d.height/2;br[0][1]+=bm;br[0][2]+=bk;this.attr({path:br});break;}if(this.type in {text:1,image:1}&&(bf!=1||bc!=1)){if(this.transformations){this.transformations[2]="scale("[a2](bf,",",bc,")");this.node[y]("transform",this.transformations[aH](at));bm=(bf==-1)?-by.x-(be||0):by.x;bk=(bc==-1)?-by.y-(bo||0):by.y;this.attr({x:bm,y:bk});by.fx=bf-1;by.fy=bc-1;}else{this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11="[a2](bf,", M12=0, M21=0, M22=",bc,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");bp.filter=(this.node.filterMatrix||aA)+(this.node.filterOpacity||aA);}}else{if(this.transformations){this.transformations[2]=aA;this.node[y]("transform",this.transformations[aH](at));by.fx=0;by.fy=0;}else{this.node.filterMatrix=aA;bp.filter=(this.node.filterMatrix||aA)+(this.node.filterOpacity||aA);}}by.scale=[bi,bh,E,e][aH](at);this._.sx=bi;this._.sy=bh;}return this;};aF[a9].clone=function(){var d=this.attr();delete d.scale;delete d.translation;return this.paper[this.type]().attr(d);};var g=an(function(E,d,bd,bc,bj,bi,bh,bg,R){var bf=0,S;for(var be=0;be<1.001;be+=0.001){var e=au.findDotsAtSegment(E,d,bd,bc,bj,bi,bh,bg,be);be&&(bf+=aV(aV(S.x-e.x,2)+aV(S.y-e.y,2),0.5));if(bf>=R){return e;}S=e;}}),aK=function(d,e){return function(bl,S,bc){bl=L(bl);var bh,bg,E,bd,R="",bk={},bi,bf=0;for(var be=0,bj=bl.length;be<bj;be++){E=bl[be];if(E[0]=="M"){bh=+E[1];bg=+E[2];}else{bd=o(bh,bg,E[1],E[2],E[3],E[4],E[5],E[6]);if(bf+bd>S){if(e&&!bk.start){bi=g(bh,bg,E[1],E[2],E[3],E[4],E[5],E[6],S-bf);R+=["C",bi.start.x,bi.start.y,bi.m.x,bi.m.y,bi.x,bi.y];if(bc){return R;}bk.start=R;R=["M",bi.x,bi.y+"C",bi.n.x,bi.n.y,bi.end.x,bi.end.y,E[5],E[6]][aH]();bf+=bd;bh=+E[5];bg=+E[6];continue;}if(!d&&!e){bi=g(bh,bg,E[1],E[2],E[3],E[4],E[5],E[6],S-bf);return{x:bi.x,y:bi.y,alpha:bi.alpha};}}bf+=bd;bh=+E[5];bg=+E[6];}R+=E;}bk.end=R;bi=d?bf:e?bk:au.findDotsAtSegment(bh,bg,E[1],E[2],E[3],E[4],E[5],E[6],1);bi.alpha&&(bi={x:bi.x,y:bi.y,alpha:bi.alpha});return bi;};},o=an(function(E,d,bc,S,bi,bh,bg,bf){var R={x:0,y:0},be=0;for(var bd=0;bd<1.01;bd+=0.01){var e=T(E,d,bc,S,bi,bh,bg,bf,bd);bd&&(be+=aV(aV(R.x-e.x,2)+aV(R.y-e.y,2),0.5));R=e;}return be;});var aw=aK(1),G=aK(),N=aK(0,1);aF[a9].getTotalLength=function(){if(this.type!="path"){return;}return aw(this.attrs.path);};aF[a9].getPointAtLength=function(d){if(this.type!="path"){return;}return G(this.attrs.path,d);};aF[a9].getSubpath=function(i,e){if(this.type!="path"){return;}if(af.abs(this.getTotalLength()-e)<0.000001){return N(this.attrs.path,i).end;}var d=N(this.attrs.path,e,1);return i?N(d,i).end:d;};au.easing_formulas={linear:function(d){return d;},"<":function(d){return aV(d,3);},">":function(d){return aV(d-1,3)+1;},"<>":function(d){d=d*2;if(d<1){return aV(d,3)/2;}d-=2;return(aV(d,3)+2)/2;},backIn:function(e){var d=1.70158;return e*e*((d+1)*e-d);},backOut:function(e){e=e-1;var d=1.70158;return e*e*((d+1)*e+d)+1;},elastic:function(i){if(i==0||i==1){return i;}var e=0.3,d=e/4;return aV(2,-10*i)*af.sin((i-d)*(2*af.PI)/e)+1;},bounce:function(E){var e=7.5625,i=2.75,d;if(E<(1/i)){d=e*E*E;}else{if(E<(2/i)){E-=(1.5/i);d=e*E*E+0.75;}else{if(E<(2.5/i)){E-=(2.25/i);d=e*E*E+0.9375;}else{E-=(2.625/i);d=e*E*E+0.984375;}}}return d;}};var M={length:0},a1=function(){var be=+new Date;for(var bq in M){if(bq!="length"&&M[W](bq)){var bv=M[bq];if(bv.stop||bv.el.removed){delete M[bq];M[n]--;continue;}var bc=be-bv.start,bn=bv.ms,bm=bv.easing,br=bv.from,bj=bv.diff,E=bv.to,bi=bv.t,bl=bv.prev||0,bd=bv.el,R=bv.callback,bk={},d;if(bc<bn){var S=au.easing_formulas[bm]?au.easing_formulas[bm](bc/bn):bc/bn;for(var bo in br){if(br[W](bo)){switch(ad[bo]){case"along":d=S*bn*bj[bo];E.back&&(d=E.len-d);var bp=G(E[bo],d);bd.translate(bj.sx-bj.x||0,bj.sy-bj.y||0);bj.x=bp.x;bj.y=bp.y;bd.translate(bp.x-bj.sx,bp.y-bj.sy);E.rot&&bd.rotate(bj.r+bp.alpha,bp.x,bp.y);break;case"number":d=+br[bo]+S*bn*bj[bo];break;case"colour":d="rgb("+[F(U(br[bo].r+S*bn*bj[bo].r)),F(U(br[bo].g+S*bn*bj[bo].g)),F(U(br[bo].b+S*bn*bj[bo].b))][aH](",")+")";break;case"path":d=[];for(var bt=0,bh=br[bo][n];bt<bh;bt++){d[bt]=[br[bo][bt][0]];for(var bs=1,bu=br[bo][bt][n];bs<bu;bs++){d[bt][bs]=+br[bo][bt][bs]+S*bn*bj[bo][bt][bs];}d[bt]=d[bt][aH](at);}d=d[aH](at);break;case"csv":switch(bo){case"translation":var bg=bj[bo][0]*(bc-bl),bf=bj[bo][1]*(bc-bl);bi.x+=bg;bi.y+=bf;d=bg+at+bf;break;case"rotation":d=+br[bo][0]+S*bn*bj[bo][0];br[bo][1]&&(d+=","+br[bo][1]+","+br[bo][2]);break;case"scale":d=[+br[bo][0]+S*bn*bj[bo][0],+br[bo][1]+S*bn*bj[bo][1],(2 in E[bo]?E[bo][2]:aA),(3 in E[bo]?E[bo][3]:aA)][aH](at);break;case"clip-rect":d=[];bt=4;while(bt--){d[bt]=+br[bo][bt]+S*bn*bj[bo][bt];}break;}break;}bk[bo]=d;}}bd.attr(bk);bd._run&&bd._run.call(bd);}else{if(E.along){bp=G(E.along,E.len*!E.back);bd.translate(bj.sx-(bj.x||0)+bp.x-bj.sx,bj.sy-(bj.y||0)+bp.y-bj.sy);E.rot&&bd.rotate(bj.r+bp.alpha,bp.x,bp.y);}(bi.x||bi.y)&&bd.translate(-bi.x,-bi.y);E.scale&&(E.scale=E.scale+aA);bd.attr(E);delete M[bq];M[n]--;bd.in_animation=null;au.is(R,"function")&&R.call(bd);}bv.prev=bc;}}au.svg&&bd&&bd.paper.safari();M[n]&&aB.setTimeout(a1);},F=function(d){return d>255?255:(d<0?0:d);},v=function(d,i){if(d==null){return{x:this._.tx,y:this._.ty,toString:x};}this._.tx+=+d;this._.ty+=+i;switch(this.type){case"circle":case"ellipse":this.attr({cx:+d+this.attrs.cx,cy:+i+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+d+this.attrs.x,y:+i+this.attrs.y});break;case"path":var e=ah(this.attrs.path);e[0][1]+=+d;e[0][2]+=+i;this.attr({path:e});break;}return this;};aF[a9].animateWith=function(e,i,d,R,E){M[e.id]&&(i.start=M[e.id].start);return this.animate(i,d,R,E);};aF[a9].animateAlong=aG();aF[a9].animateAlongBack=aG(1);function aG(d){return function(E,i,e,S){var R={back:d};au.is(e,"function")?(S=e):(R.rot=e);E&&E.constructor==aF&&(E=E.attrs.path);E&&(R.along=E);return this.animate(R,i,S);};}aF[a9].onAnimation=function(d){this._run=d||0;return this;};aF[a9].animate=function(bq,bh,bg,E){if(au.is(bg,"function")||!bg){E=bg||null;}var bl={},e={},be={};for(var bi in bq){if(bq[W](bi)){if(ad[W](bi)){bl[bi]=this.attr(bi);(bl[bi]==null)&&(bl[bi]=k[bi]);e[bi]=bq[bi];switch(ad[bi]){case"along":var bo=aw(bq[bi]),bj=G(bq[bi],bo*!!bq.back),R=this.getBBox();be[bi]=bo/bh;be.tx=R.x;be.ty=R.y;be.sx=bj.x;be.sy=bj.y;e.rot=bq.rot;e.back=bq.back;e.len=bo;bq.rot&&(be.r=aa(this.rotate())||0);break;case"number":be[bi]=(e[bi]-bl[bi])/bh;break;case"colour":bl[bi]=au.getRGB(bl[bi]);var bk=au.getRGB(e[bi]);be[bi]={r:(bk.r-bl[bi].r)/bh,g:(bk.g-bl[bi].g)/bh,b:(bk.b-bl[bi].b)/bh};break;case"path":var S=L(bl[bi],e[bi]);bl[bi]=S[0];var bf=S[1];be[bi]=[];for(var bn=0,bd=bl[bi][n];bn<bd;bn++){be[bi][bn]=[0];for(var bm=1,bp=bl[bi][bn][n];bm<bp;bm++){be[bi][bn][bm]=(bf[bn][bm]-bl[bi][bn][bm])/bh;}}break;case"csv":var d=(bq[bi]+aA)[C](a),bc=(bl[bi]+aA)[C](a);switch(bi){case"translation":bl[bi]=[0,0];be[bi]=[d[0]/bh,d[1]/bh];break;case"rotation":bl[bi]=(bc[1]==d[1]&&bc[2]==d[2])?bc:[0,d[1],d[2]];be[bi]=[(d[0]-bl[bi][0])/bh,0,0];break;case"scale":bq[bi]=d;bl[bi]=(bl[bi]+aA)[C](a);be[bi]=[(d[0]-bl[bi][0])/bh,(d[1]-bl[bi][1])/bh,0,0];break;case"clip-rect":bl[bi]=(bl[bi]+aA)[C](a);be[bi]=[];bn=4;while(bn--){be[bi][bn]=(d[bn]-bl[bi][bn])/bh;}break;}e[bi]=d;}}}}this.stop();this.in_animation=1;M[this.id]={start:bq.start||+new Date,ms:bh,easing:bg,from:bl,diff:be,to:e,el:this,callback:E,t:{x:0,y:0}};++M[n]==1&&a1();return this;};aF[a9].stop=function(){M[this.id]&&M[n]--;delete M[this.id];return this;};aF[a9].translate=function(d,e){return this.attr({translation:d+" "+e});};aF[a9][aJ]=function(){return"Rapha\xebl\u2019s object";};au.ae=M;var X=function(d){this.items=[];this[n]=0;if(d){for(var e=0,E=d[n];e<E;e++){if(d[e]&&(d[e].constructor==aF||d[e].constructor==X)){this[this.items[n]]=this.items[this.items[n]]=d[e];this[n]++;}}}};X[a9][f]=function(){var R,d;for(var e=0,E=arguments[n];e<E;e++){R=arguments[e];if(R&&(R.constructor==aF||R.constructor==X)){d=this.items[n];this[d]=this.items[d]=R;this[n]++;}}return this;};X[a9].pop=function(){delete this[this[n]--];return this.items.pop();};for(var B in aF[a9]){if(aF[a9][W](B)){X[a9][B]=(function(d){return function(){for(var e=0,E=this.items[n];e<E;e++){this.items[e][d][a7](this.items[e],arguments);}return this;};})(B);}}X[a9].attr=function(e,bc){if(e&&au.is(e,"array")&&au.is(e[0],"object")){for(var d=0,S=e[n];d<S;d++){this.items[d].attr(e[d]);}}else{for(var E=0,R=this.items[n];E<R;E++){this.items[E].attr(e,bc);}}return this;};X[a9].animate=function(S,e,be,bd){(au.is(be,"function")||!be)&&(bd=be||null);var d=this.items[n],E=d,bc=this,R;bd&&(R=function(){!--d&&bd.call(bc);});this.items[--E].animate(S,e,be||R,R);while(E--){this.items[E].animateWith(this.items[d-1],S,e,be||R,R);}return this;};X[a9].insertAfter=function(e){var d=this.items[n];while(d--){this.items[d].insertAfter(e);}return this;};X[a9].getBBox=function(){var d=[],bc=[],e=[],R=[];for(var E=this.items[n];E--;){var S=this.items[E].getBBox();d[f](S.x);bc[f](S.y);e[f](S.x+S.width);R[f](S.y+S.height);}d=aR[a7](0,d);bc=aR[a7](0,bc);return{x:d,y:bc,width:h[a7](0,e)-d,height:h[a7](0,R)-bc};};X[a9].clone=function(E){E=new X;for(var d=0,e=this.items[n];d<e;d++){E[f](this.items[d].clone());}return E;};au.registerFont=function(e){if(!e.face){return e;}this.fonts=this.fonts||{};var E={w:e.w,face:{},glyphs:{}},i=e.face["font-family"];for(var bc in e.face){if(e.face[W](bc)){E.face[bc]=e.face[bc];}}if(this.fonts[i]){this.fonts[i][f](E);}else{this.fonts[i]=[E];}if(!e.svg){E.face["units-per-em"]=K(e.face["units-per-em"],10);for(var R in e.glyphs){if(e.glyphs[W](R)){var S=e.glyphs[R];E.glyphs[R]={w:S.w,k:{},d:S.d&&"M"+S.d[aZ](/[mlcxtrv]/g,function(bd){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[bd]||"M";})+"z"};if(S.k){for(var d in S.k){if(S[W](d)){E.glyphs[R].k[d]=S.k[d];}}}}}}return e;};a4[a9].getFont=function(be,bf,e,R){R=R||"normal";e=e||"normal";bf=+bf||{normal:400,bold:700,lighter:300,bolder:800}[bf]||400;var S=au.fonts[be];if(!S){var E=new RegExp("(^|\\s)"+be[aZ](/[^\w\d\s+!~.:_-]/g,aA)+"(\\s|$)","i");for(var d in au.fonts){if(au.fonts[W](d)){if(E.test(d)){S=au.fonts[d];break;}}}}var bc;if(S){for(var bd=0,bg=S[n];bd<bg;bd++){bc=S[bd];if(bc.face["font-weight"]==bf&&(bc.face["font-style"]==e||!bc.face["font-style"])&&bc.face["font-stretch"]==R){break;}}}return bc;};a4[a9].print=function(R,E,d,bd,be,bn){bn=bn||"middle";var bj=this.set(),bm=(d+aA)[C](aA),bk=0,bg=aA,bo;au.is(bd,"string")&&(bd=this.getFont(bd));if(bd){bo=(be||16)/bd.face["units-per-em"];var e=bd.face.bbox.split(a),bc=+e[0],bf=+e[1]+(bn=="baseline"?e[3]-e[1]+(+bd.face.descent):(e[3]-e[1])/2);for(var bi=0,S=bm[n];bi<S;bi++){var bh=bi&&bd.glyphs[bm[bi-1]]||{},bl=bd.glyphs[bm[bi]];bk+=bi?(bh.w||bd.w)+(bh.k&&bh.k[bm[bi]]||0):0;bl&&bl.d&&bj[f](this.path(bl.d).attr({fill:"#000",stroke:"none",translation:[bk,0]}));}bj.scale(bo,bo,bc,bf).translate(R-bc,E-bf);}return bj;};var aW=/\{(\d+)\}/g;au.format=function(e,i){var d=au.is(i,"array")?[0][a2](i):arguments;e&&au.is(e,"string")&&d[n]-1&&(e=e[aZ](aW,function(R,E){return d[++E]==null?aA:d[E];}));return e||aA;};au.ninja=function(){m.was?(Raphael=m.is):delete Raphael;return au;};au.el=aF[a9];return au;})();
\ No newline at end of file
index cf41ab0..01bf433 100644 (file)
@@ -5,15 +5,15 @@
  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
  */
  
 Raphael = (function () {
     var separator = /[, ]+/,
         elements = /^(circle|rect|path|ellipse|text|image)$/,
+        proto = "prototype",
         has = "hasOwnProperty",
         doc = document,
         win = window,
         oldRaphael = {
-            was: win[has]("Raphael"),
+            was: Object[proto][has].call(win, "Raphael"),
             is: win.Raphael
         },
         R = function () {
@@ -39,7 +39,6 @@ Raphael = (function () {
         events = "click dblclick mousedown mousemove mouseout mouseover mouseup"[split](S),
         join = "join",
         length = "length",
-        proto = "prototype",
         lowerCase = String[proto].toLowerCase,
         math = Math,
         mmax = math.max,
@@ -51,24 +50,25 @@ Raphael = (function () {
         pow = math.pow,
         push = "push",
         rg = /^(?=[\da-f]$)/,
-        ISURL = /^url\(['"]?([^\)]+)['"]?\)$/i,
+        ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i,
         colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,
         round = math.round,
         setAttribute = "setAttribute",
         toFloat = parseFloat,
         toInt = parseInt,
         upperCase = String[proto].toUpperCase,
-        availableAttrs = {"clip-rect": "0 0 1e9 1e9", cursor: "default", cx: 0, cy: 0, fill: "#fff", "fill-opacity": 1, font: '10px "Arial"', "font-family": '"Arial"', "font-size": "10", "font-style": "normal", "font-weight": 400, gradient: 0, height: 0, href: "http://raphaeljs.com/", opacity: 1, path: "M0,0", r: 0, rotation: 0, rx: 0, ry: 0, scale: "1 1", src: "", stroke: "#000", "stroke-dasharray": "", "stroke-linecap": "butt", "stroke-linejoin": "butt", "stroke-miterlimit": 0, "stroke-opacity": 1, "stroke-width": 1, target: "_blank", "text-anchor": "middle", title: "Raphael", translation: "0 0", width: 0, x: 0, y: 0},
-        availableAnimAttrs = {along: "along", "clip-rect": "csv", cx: nu, cy: nu, fill: "colour", "fill-opacity": nu, "font-size": nu, height: nu, opacity: nu, path: "path", r: nu, rotation: "csv", rx: nu, ry: nu, scale: "csv", stroke: "colour", "stroke-opacity": nu, "stroke-width": nu, translation: "csv", width: nu, x: nu, y: nu},
+        availableAttrs = {blur: 0, "clip-rect": "0 0 1e9 1e9", cursor: "default", cx: 0, cy: 0, fill: "#fff", "fill-opacity": 1, font: '10px "Arial"', "font-family": '"Arial"', "font-size": "10", "font-style": "normal", "font-weight": 400, gradient: 0, height: 0, href: "http://raphaeljs.com/", opacity: 1, path: "M0,0", r: 0, rotation: 0, rx: 0, ry: 0, scale: "1 1", src: "", stroke: "#000", "stroke-dasharray": "", "stroke-linecap": "butt", "stroke-linejoin": "butt", "stroke-miterlimit": 0, "stroke-opacity": 1, "stroke-width": 1, target: "_blank", "text-anchor": "middle", title: "Raphael", translation: "0 0", width: 0, x: 0, y: 0},
+        availableAnimAttrs = {along: "along", blur: nu, "clip-rect": "csv", cx: nu, cy: nu, fill: "colour", "fill-opacity": nu, "font-size": nu, height: nu, opacity: nu, path: "path", r: nu, rotation: "csv", rx: nu, ry: nu, scale: "csv", stroke: "colour", "stroke-opacity": nu, "stroke-width": nu, translation: "csv", width: nu, x: nu, y: nu},
         rp = "replace";
     R.version = "1.3.2";
     R.type = (win.SVGAngle || doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML");
     if (R.type == "VML") {
-        var d = document.createElement("div");
+        var d = doc.createElement("div");
         d.innerHTML = '<!--[if vml]><br><br><![endif]-->';
         if (d.childNodes[length] != 2) {
-            return null;
+            return R.type = null;
         }
+        d = null;
     }
     R.svg = !(R.vml = R.type == "VML");
     Paper[proto] = R[proto];
@@ -92,12 +92,12 @@ Raphael = (function () {
                 var bod;
                 color = (color + E)[rp](trim, E);
                 try {
-                    var docum = new ActiveXObject("htmlfile");
+                    var docum = new win.ActiveXObject("htmlfile");
                     docum.write("<body>");
                     docum.close();
                     bod = docum.body;
                 } catch(e) {
-                    bod = createPopup().document.body;
+                    bod = win.createPopup().document.body;
                 }
                 var range = bod.createTextRange();
                 try {
@@ -121,6 +121,12 @@ Raphael = (function () {
         }
         return toHex(color);
     };
+    var hsbtoString = function () {
+        return "hsb(" + [this.h, this.s, this.b] + ")";
+    },
+    rgbtoString = function () {
+        return this.hex;
+    };
     R.hsb2rgb = cacher(function (hue, saturation, brightness) {
         if (R.is(hue, "object") && "h" in hue && "s" in hue && "b" in hue) {
             brightness = hue.b;
@@ -149,7 +155,7 @@ Raphael = (function () {
         red *= 255;
         green *= 255;
         blue *= 255;
-        var rgb = {r: red, g: green, b: blue},
+        var rgb = {r: red, g: green, b: blue, toString: rgbtoString},
             r = (~~red)[toString](16),
             g = (~~green)[toString](16),
             b = (~~blue)[toString](16);
@@ -197,7 +203,7 @@ Raphael = (function () {
             hue < 0 && hue++;
             hue > 1 && hue--;
         }
-        return {h: hue, s: saturation, b: brightness};
+        return {h: hue, s: saturation, b: brightness, toString: hsbtoString};
     }, R);
     var p2s = /,?([achlmqrstvxz]),?/gi;
     R._path2string = function () {
@@ -325,7 +331,7 @@ Raphael = (function () {
                     data[push]([b][concat](params.splice(0, paramCounts[name])));
                     if (!paramCounts[name]) {
                         break;
-                    };
+                    }
                 }
             });
         }
@@ -804,7 +810,7 @@ Raphael = (function () {
                 par[2] && (dot.offset = par[2] + "%");
                 dots[push](dot);
             }
-            for (var i = 1, ii = dots[length] - 1; i < ii; i++) {
+            for (i = 1, ii = dots[length] - 1; i < ii; i++) {
                 if (!dots[i].offset) {
                     var start = toFloat(dots[i - 1].offset || 0),
                         end = 0;
@@ -828,49 +834,43 @@ Raphael = (function () {
             }
             return dots;
         }),
-        getContainer = function () {
-            var container,
-                x,
-                y,
-                width,
-                height;
-            if (R.is(arguments[0], "string") || R.is(arguments[0], "object")) {
-                if (R.is(arguments[0], "string")) {
-                    container = doc.getElementById(arguments[0]);
-                } else {
-                    container = arguments[0];
-                }
+        getContainer = function (x, y, w, h) {
+            var container;
+            if (R.is(x, "string") || R.is(x, "object")) {
+                container = R.is(x, "string") ? doc.getElementById(x) : x;
                 if (container.tagName) {
-                    if (arguments[1] == null) {
+                    if (y == null) {
                         return {
                             container: container,
                             width: container.style.pixelWidth || container.offsetWidth,
                             height: container.style.pixelHeight || container.offsetHeight
                         };
                     } else {
-                        return {container: container, width: arguments[1], height: arguments[2]};
+                        return {container: container, width: y, height: w};
                     }
                 }
-            } else if (R.is(arguments[0], nu) && arguments[length] > 3) {
-                return {container: 1, x: arguments[0], y: arguments[1], width: arguments[2], height: arguments[3]};
+            } else if (R.is(x, nu) && h != null) {
+                return {container: 1, x: x, y: y, width: w, height: h};
             }
         },
         plugins = function (con, add) {
             var that = this;
-            for (var prop in add) if (add[has](prop) && !(prop in con)) {
-                switch (typeof add[prop]) {
-                    case "function":
-                        (function (f) {
-                            con[prop] = con === that ? f : function () { return f[apply](that, arguments); };
-                        })(add[prop]);
-                    break;
-                    case "object":
-                        con[prop] = con[prop] || {};
-                        plugins.call(this, con[prop], add[prop]);
-                    break;
-                    default:
-                        con[prop] = add[prop];
-                    break;
+            for (var prop in add) {
+                if (add[has](prop) && !(prop in con)) {
+                    switch (typeof add[prop]) {
+                        case "function":
+                            (function (f) {
+                                con[prop] = con === that ? f : function () { return f[apply](that, arguments); };
+                            })(add[prop]);
+                        break;
+                        case "object":
+                            con[prop] = con[prop] || {};
+                            plugins.call(this, con[prop], add[prop]);
+                        break;
+                        default:
+                            con[prop] = add[prop];
+                        break;
+                    }
                 }
             }
         },
@@ -927,31 +927,33 @@ Raphael = (function () {
     if (R.svg) {
         Paper[proto].svgns = "http://www.w3.org/2000/svg";
         Paper[proto].xlink = "http://www.w3.org/1999/xlink";
-        var round = function (num) {
+        round = function (num) {
             return +num + (~~num === num) * .5;
-        },
-            roundPath = function (path) {
-                for (var i = 0, ii = path[length]; i < ii; i++) {
-                    if (lowerCase.call(path[i][0]) != "a") {
-                        for (var j = 1, jj = path[i][length]; j < jj; j++) {
-                            path[i][j] = round(path[i][j]);
-                        }
-                    } else {
-                        path[i][6] = round(path[i][6]);
-                        path[i][7] = round(path[i][7]);
+        };
+        var roundPath = function (path) {
+            for (var i = 0, ii = path[length]; i < ii; i++) {
+                if (lowerCase.call(path[i][0]) != "a") {
+                    for (var j = 1, jj = path[i][length]; j < jj; j++) {
+                        path[i][j] = round(path[i][j]);
                     }
+                } else {
+                    path[i][6] = round(path[i][6]);
+                    path[i][7] = round(path[i][7]);
                 }
-                return path;
-            },
-            $ = function (el, attr) {
-                if (attr) {
-                    for (var key in attr) if (attr[has](key)) {
+            }
+            return path;
+        },
+        $ = function (el, attr) {
+            if (attr) {
+                for (var key in attr) {
+                    if (attr[has](key)) {
                         el[setAttribute](key, attr[key]);
                     }
-                } else {
-                    return doc.createElementNS(Paper[proto].svgns, el);
                 }
-            };
+            } else {
+                return doc.createElementNS(Paper[proto].svgns, el);
+            }
+        };
         R[toString] = function () {
             return  "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version;
         };
@@ -1004,6 +1006,10 @@ Raphael = (function () {
             if (!dots) {
                 return null;
             }
+            var id = o.getAttribute("fill");
+            id = id.match(/^url\(#(.*)\)$/);
+            id && SVG.defs.removeChild(doc.getElementById(id[1]));
+            
             var el = $(type + "Gradient");
             el.id = "r" + (R._id++)[toString](36);
             $(el, type == "radial" ? {fx: fx, fy: fy} : {x1: vector[0], y1: vector[1], x2: vector[2], y2: vector[3]});
@@ -1015,7 +1021,7 @@ Raphael = (function () {
                     "stop-color": dots[i].color || "#fff"
                 });
                 el[appendChild](stop);
-            };
+            }
             $(o, {
                 fill: "url(#" + el.id + ")",
                 opacity: 1,
@@ -1070,208 +1076,213 @@ Raphael = (function () {
                 rotxy[2] = +rotxy[2];
             }
             toFloat(rot) && o.rotate(0, true);
-            for (var att in params) if (params[has](att)) {
-                if (!availableAttrs[has](att)) {
-                    continue;
-                }
-                var value = params[att];
-                attrs[att] = value;
-                switch (att) {
-                    case "rotation":
-                        o.rotate(value, true);
-                        break;
-                    // Hyperlink
-                    case "href":
-                    case "title":
-                    case "target":
-                        var pn = node.parentNode;
-                        if (lowerCase.call(pn.tagName) != "a") {
-                            var hl = $("a");
-                            pn.insertBefore(hl, node);
-                            hl[appendChild](node);
-                            pn = hl;
-                        }
-                        pn.setAttributeNS(o.paper.xlink, att, value);
-                        break;
-                    case "cursor":
-                        node.style.cursor = value;
-                        break;
-                    case "clip-rect":
-                        var rect = (value + E)[split](separator);
-                        if (rect[length] == 4) {
-                            o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);
-                            var el = $("clipPath"),
-                                rc = $("rect");
-                            el.id = "r" + (R._id++)[toString](36);
-                            $(rc, {
-                                x: rect[0],
-                                y: rect[1],
-                                width: rect[2],
-                                height: rect[3]
-                            });
-                            el[appendChild](rc);
-                            o.paper.defs[appendChild](el);
-                            $(node, {"clip-path": "url(#" + el.id + ")"});
-                            o.clip = rc;
-                        }
-                        if (!value) {
-                            var clip = doc.getElementById(node.getAttribute("clip-path")[rp](/(^url\(#|\)$)/g, E));
-                            clip && clip.parentNode.removeChild(clip);
-                            $(node, {"clip-path": E});
-                            delete o.clip;
-                        }
-                    break;
-                    case "path":
-                        if (o.type == "path") {
-                            $(node, {d: value ? attrs.path = roundPath(pathToAbsolute(value)) : "M0,0"});
-                        }
-                        break;
-                    case "width":
-                        node[setAttribute](att, value);
-                        if (attrs.fx) {
-                            att = "x";
-                            value = attrs.x;
-                        } else {
+            for (var att in params) {
+                if (params[has](att)) {
+                    if (!availableAttrs[has](att)) {
+                        continue;
+                    }
+                    var value = params[att];
+                    attrs[att] = value;
+                    switch (att) {
+                        case "blur":
+                            o.blur(value);
                             break;
-                        }
-                    case "x":
-                        if (attrs.fx) {
-                            value = -attrs.x - (attrs.width || 0);
-                        }
-                    case "rx":
-                        if (att == "rx" && o.type == "rect") {
+                        case "rotation":
+                            o.rotate(value, true);
                             break;
-                        }
-                    case "cx":
-                        rotxy && (att == "x" || att == "cx") && (rotxy[1] += value - attrs[att]);
-                        node[setAttribute](att, round(value));
-                        o.pattern && updatePosition(o);
-                        break;
-                    case "height":
-                        node[setAttribute](att, value);
-                        if (attrs.fy) {
-                            att = "y";
-                            value = attrs.y;
-                        } else {
+                        // Hyperlink
+                        case "href":
+                        case "title":
+                        case "target":
+                            var pn = node.parentNode;
+                            if (lowerCase.call(pn.tagName) != "a") {
+                                var hl = $("a");
+                                pn.insertBefore(hl, node);
+                                hl[appendChild](node);
+                                pn = hl;
+                            }
+                            pn.setAttributeNS(o.paper.xlink, att, value);
                             break;
-                        }
-                    case "y":
-                        if (attrs.fy) {
-                            value = -attrs.y - (attrs.height || 0);
-                        }
-                    case "ry":
-                        if (att == "ry" && o.type == "rect") {
+                        case "cursor":
+                            node.style.cursor = value;
                             break;
-                        }
-                    case "cy":
-                        rotxy && (att == "y" || att == "cy") && (rotxy[2] += value - attrs[att]);
-                        node[setAttribute](att, round(value));
-                        o.pattern && updatePosition(o);
+                        case "clip-rect":
+                            var rect = (value + E)[split](separator);
+                            if (rect[length] == 4) {
+                                o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);
+                                var el = $("clipPath"),
+                                    rc = $("rect");
+                                el.id = "r" + (R._id++)[toString](36);
+                                $(rc, {
+                                    x: rect[0],
+                                    y: rect[1],
+                                    width: rect[2],
+                                    height: rect[3]
+                                });
+                                el[appendChild](rc);
+                                o.paper.defs[appendChild](el);
+                                $(node, {"clip-path": "url(#" + el.id + ")"});
+                                o.clip = rc;
+                            }
+                            if (!value) {
+                                var clip = doc.getElementById(node.getAttribute("clip-path")[rp](/(^url\(#|\)$)/g, E));
+                                clip && clip.parentNode.removeChild(clip);
+                                $(node, {"clip-path": E});
+                                delete o.clip;
+                            }
                         break;
-                    case "r":
-                        if (o.type == "rect") {
-                            $(node, {rx: value, ry: value});
-                        } else {
+                        case "path":
+                            if (o.type == "path") {
+                                $(node, {d: value ? attrs.path = roundPath(pathToAbsolute(value)) : "M0,0"});
+                            }
+                            break;
+                        case "width":
                             node[setAttribute](att, value);
-                        }
-                        break;
-                    case "src":
-                        if (o.type == "image") {
-                            node.setAttributeNS(o.paper.xlink, "href", value);
-                        }
-                        break;
-                    case "stroke-width":
-                        node.style.strokeWidth = value;
-                        // Need following line for Firefox
-                        node[setAttribute](att, value);
-                        if (attrs["stroke-dasharray"]) {
-                            addDashes(o, attrs["stroke-dasharray"]);
-                        }
-                        break;
-                    case "stroke-dasharray":
-                        addDashes(o, value);
-                        break;
-                    case "translation":
-                        var xy = (value + E)[split](separator);
-                        xy[0] = +xy[0] || 0;
-                        xy[1] = +xy[1] || 0;
-                        if (rotxy) {
-                            rotxy[1] += xy[0];
-                            rotxy[2] += xy[1];
-                        }
-                        translate.call(o, xy[0], xy[1]);
-                        break;
-                    case "scale":
-                        var xy = (value + E)[split](separator);
-                        o.scale(+xy[0] || 1, +xy[1] || +xy[0] || 1, +xy[2] || null, +xy[3] || null);
-                        break;
-                    case "fill":
-                        var isURL = (value + E).match(ISURL);
-                        if (isURL) {
-                            var el = $("pattern"),
-                                ig = $("image");
-                            el.id = "r" + (R._id++)[toString](36);
-                            $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1});
-                            $(ig, {x: 0, y: 0});
-                            ig.setAttributeNS(o.paper.xlink, "href", isURL[1]);
-                            el[appendChild](ig);
-                            var img = doc.createElement("img");
-                            img.style.cssText = "position:absolute;left:-9999em;top-9999em";
-                            img.onload = function () {
-                                $(el, {width: this.offsetWidth, height: this.offsetHeight});
-                                $(ig, {width: this.offsetWidth, height: this.offsetHeight});
-                                doc.body.removeChild(this);
-                                o.paper.safari();
-                            };
-                            doc.body[appendChild](img);
-                            img.src = isURL[1];
-                            o.paper.defs[appendChild](el);
-                            node.style.fill = "url(#" + el.id + ")";
-                            $(node, {fill: "url(#" + el.id + ")"});
-                            o.pattern = el;
+                            if (attrs.fx) {
+                                att = "x";
+                                value = attrs.x;
+                            } else {
+                                break;
+                            }
+                        case "x":
+                            if (attrs.fx) {
+                                value = -attrs.x - (attrs.width || 0);
+                            }
+                        case "rx":
+                            if (att == "rx" && o.type == "rect") {
+                                break;
+                            }
+                        case "cx":
+                            rotxy && (att == "x" || att == "cx") && (rotxy[1] += value - attrs[att]);
+                            node[setAttribute](att, round(value));
                             o.pattern && updatePosition(o);
                             break;
-                        }
-                        if (!R.getRGB(value).error) {
-                            delete params.gradient;
-                            delete attrs.gradient;
-                            !R.is(attrs.opacity, "undefined") &&
-                                R.is(params.opacity, "undefined") &&
-                                $(node, {opacity: attrs.opacity});
-                            !R.is(attrs["fill-opacity"], "undefined") &&
-                                R.is(params["fill-opacity"], "undefined") &&
-                                $(node, {"fill-opacity": attrs["fill-opacity"]});
-                        } else if ((({circle: 1, ellipse: 1})[has](o.type) || (value + E).charAt() != "r") && addGradientFill(node, value, o.paper)) {
-                            attrs.gradient = value;
-                            attrs.fill = "none";
+                        case "height":
+                            node[setAttribute](att, value);
+                            if (attrs.fy) {
+                                att = "y";
+                                value = attrs.y;
+                            } else {
+                                break;
+                            }
+                        case "y":
+                            if (attrs.fy) {
+                                value = -attrs.y - (attrs.height || 0);
+                            }
+                        case "ry":
+                            if (att == "ry" && o.type == "rect") {
+                                break;
+                            }
+                        case "cy":
+                            rotxy && (att == "y" || att == "cy") && (rotxy[2] += value - attrs[att]);
+                            node[setAttribute](att, round(value));
+                            o.pattern && updatePosition(o);
                             break;
-                        }
-                    case "stroke":
-                        node[setAttribute](att, R.getRGB(value).hex);
-                        break;
-                    case "gradient":
-                        (({circle: 1, ellipse: 1})[has](o.type) || (value + E).charAt() != "r") && addGradientFill(node, value, o.paper);
-                        break;
-                    case "opacity":
-                    case "fill-opacity":
-                        if (attrs.gradient) {
-                            var gradient = doc.getElementById(node.getAttribute("fill")[rp](/^url\(#|\)$/g, E));
-                            if (gradient) {
-                                var stops = gradient.getElementsByTagName("stop");
-                                stops[stops[length] - 1][setAttribute]("stop-opacity", value);
+                        case "r":
+                            if (o.type == "rect") {
+                                $(node, {rx: value, ry: value});
+                            } else {
+                                node[setAttribute](att, value);
                             }
                             break;
-                        }
-                    default:
-                        att == "font-size" && (value = toInt(value, 10) + "px");
-                        var cssrule = att[rp](/(\-.)/g, function (w) {
-                            return upperCase.call(w.substring(1));
-                        });
-                        node.style[cssrule] = value;
-                        // Need following line for Firefox
-                        node[setAttribute](att, value);
-                        break;
+                        case "src":
+                            if (o.type == "image") {
+                                node.setAttributeNS(o.paper.xlink, "href", value);
+                            }
+                            break;
+                        case "stroke-width":
+                            node.style.strokeWidth = value;
+                            // Need following line for Firefox
+                            node[setAttribute](att, value);
+                            if (attrs["stroke-dasharray"]) {
+                                addDashes(o, attrs["stroke-dasharray"]);
+                            }
+                            break;
+                        case "stroke-dasharray":
+                            addDashes(o, value);
+                            break;
+                        case "translation":
+                            var xy = (value + E)[split](separator);
+                            xy[0] = +xy[0] || 0;
+                            xy[1] = +xy[1] || 0;
+                            if (rotxy) {
+                                rotxy[1] += xy[0];
+                                rotxy[2] += xy[1];
+                            }
+                            translate.call(o, xy[0], xy[1]);
+                            break;
+                        case "scale":
+                            xy = (value + E)[split](separator);
+                            o.scale(+xy[0] || 1, +xy[1] || +xy[0] || 1, isNaN(toFloat(xy[2])) ? null : +xy[2], isNaN(toFloat(xy[3])) ? null : +xy[3]);
+                            break;
+                        case "fill":
+                            var isURL = (value + E).match(ISURL);
+                            if (isURL) {
+                                el = $("pattern");
+                                var ig = $("image");
+                                el.id = "r" + (R._id++)[toString](36);
+                                $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1});
+                                $(ig, {x: 0, y: 0});
+                                ig.setAttributeNS(o.paper.xlink, "href", isURL[1]);
+                                el[appendChild](ig);
+                                var img = doc.createElement("img");
+                                img.style.cssText = "position:absolute;left:-9999em;top-9999em";
+                                img.onload = function () {
+                                    $(el, {width: this.offsetWidth, height: this.offsetHeight});
+                                    $(ig, {width: this.offsetWidth, height: this.offsetHeight});
+                                    doc.body.removeChild(this);
+                                    o.paper.safari();
+                                };
+                                doc.body[appendChild](img);
+                                img.src = isURL[1];
+                                o.paper.defs[appendChild](el);
+                                node.style.fill = "url(#" + el.id + ")";
+                                $(node, {fill: "url(#" + el.id + ")"});
+                                o.pattern = el;
+                                o.pattern && updatePosition(o);
+                                break;
+                            }
+                            if (!R.getRGB(value).error) {
+                                delete params.gradient;
+                                delete attrs.gradient;
+                                !R.is(attrs.opacity, "undefined") &&
+                                    R.is(params.opacity, "undefined") &&
+                                    $(node, {opacity: attrs.opacity});
+                                !R.is(attrs["fill-opacity"], "undefined") &&
+                                    R.is(params["fill-opacity"], "undefined") &&
+                                    $(node, {"fill-opacity": attrs["fill-opacity"]});
+                            } else if ((({circle: 1, ellipse: 1})[has](o.type) || (value + E).charAt() != "r") && addGradientFill(node, value, o.paper)) {
+                                attrs.gradient = value;
+                                attrs.fill = "none";
+                                break;
+                            }
+                        case "stroke":
+                            node[setAttribute](att, R.getRGB(value).hex);
+                            break;
+                        case "gradient":
+                            (({circle: 1, ellipse: 1})[has](o.type) || (value + E).charAt() != "r") && addGradientFill(node, value, o.paper);
+                            break;
+                        case "opacity":
+                        case "fill-opacity":
+                            if (attrs.gradient) {
+                                var gradient = doc.getElementById(node.getAttribute("fill")[rp](/^url\(#|\)$/g, E));
+                                if (gradient) {
+                                    var stops = gradient.getElementsByTagName("stop");
+                                    stops[stops[length] - 1][setAttribute]("stop-opacity", value);
+                                }
+                                break;
+                            }
+                        default:
+                            att == "font-size" && (value = toInt(value, 10) + "px");
+                            var cssrule = att[rp](/(\-.)/g, function (w) {
+                                return upperCase.call(w.substring(1));
+                            });
+                            node.style[cssrule] = value;
+                            // Need following line for Firefox
+                            node[setAttribute](att, value);
+                            break;
+                    }
                 }
             }
             
@@ -1282,8 +1293,8 @@ Raphael = (function () {
                 toFloat(rot) && o.rotate(rot, true);
             }
         };
-        var leading = 1.2;
-        var tuneText = function (el, params) {
+        var leading = 1.2,
+        tuneText = function (el, params) {
             if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) {
                 return;
             }
@@ -1304,8 +1315,8 @@ Raphael = (function () {
                     node[appendChild](tspan);
                 }
             } else {
-                var texts = node.getElementsByTagName("tspan");
-                for (var i = 0, ii = texts[length]; i < ii; i++) {
+                texts = node.getElementsByTagName("tspan");
+                for (i = 0, ii = texts[length]; i < ii; i++) {
                     i && $(texts[i], {dy: fontSize * leading, x: a.x});
                 }
             }
@@ -1313,8 +1324,8 @@ Raphael = (function () {
             var bb = el.getBBox(),
                 dif = a.y - (bb.y + bb.height / 2);
             dif && isFinite(dif) && $(node, {y: a.y + dif});
-        };
-        var Element = function (node, svg) {
+        },
+        Element = function (node, svg) {
             var X = 0,
                 Y = 0;
             this[0] = node;
@@ -1424,11 +1435,11 @@ Raphael = (function () {
             hide && this.hide();
             return bbox;
         };
-        Element[proto].attr = function () {
+        Element[proto].attr = function (name, value) {
             if (this.removed) {
                 return this;
             }
-            if (arguments[length] == 0) {
+            if (name == null) {
                 var res = {};
                 for (var i in this.attrs) if (this.attrs[has](i)) {
                     res[i] = this.attrs[i];
@@ -1438,34 +1449,34 @@ Raphael = (function () {
                 res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
                 return res;
             }
-            if (arguments[length] == 1 && R.is(arguments[0], "string")) {
-                if (arguments[0] == "translation") {
+            if (value == null && R.is(name, "string")) {
+                if (name == "translation") {
                     return translate.call(this);
                 }
-                if (arguments[0] == "rotation") {
+                if (name == "rotation") {
                     return this.rotate();
                 }
-                if (arguments[0] == "scale") {
+                if (name == "scale") {
                     return this.scale();
                 }
-                if (arguments[0] == "fill" && this.attrs.fill == "none" && this.attrs.gradient) {
+                if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) {
                     return this.attrs.gradient;
                 }
-                return this.attrs[arguments[0]];
+                return this.attrs[name];
             }
-            if (arguments[length] == 1 && R.is(arguments[0], "array")) {
+            if (value == null && R.is(name, "array")) {
                 var values = {};
-                for (var j in arguments[0]) if (arguments[0][has](j)) {
-                    values[arguments[0][j]] = this.attrs[arguments[0][j]];
+                for (var j = 0, jj = name.length; j < jj; j++) {
+                    values[name[j]] = this.attr(name[j]);
                 }
                 return values;
             }
-            if (arguments[length] == 2) {
+            if (value != null) {
                 var params = {};
-                params[arguments[0]] = arguments[1];
+                params[name] = value;
                 setFillAndStroke(this, params);
-            } else if (arguments[length] == 1 && R.is(arguments[0], "object")) {
-                setFillAndStroke(this, arguments[0]);
+            } else if (name != null && R.is(name, "object")) {
+                setFillAndStroke(this, name);
             }
             return this;
         };
@@ -1511,6 +1522,28 @@ Raphael = (function () {
             insertbefore(this, element, this.paper);
             return this;
         };
+        Element[proto].blur = function (size) {
+            // Experimental. No Safari support. Use it on your own risk.
+            var t = this;
+            if (+size !== 0) {
+                var fltr = $("filter"),
+                    blur = $("feGaussianBlur");
+                t.attrs.blur = size;
+                fltr.id = "r" + (R._id++)[toString](36);
+                $(blur, {stdDeviation: +size || 1.5});
+                fltr.appendChild(blur);
+                t.paper.defs.appendChild(fltr);
+                t._blur = fltr;
+                $(t.node, {filter: "url(#" + fltr.id + ")"});
+            } else {
+                if (t._blur) {
+                    t._blur.parentNode.removeChild(t._blur);
+                    delete t._blur;
+                    delete t.attrs.blur;
+                }
+                t.node.removeAttribute("filter");
+            }
+        };
         var theCircle = function (svg, x, y, r) {
             x = round(x);
             y = round(y);
@@ -1572,7 +1605,7 @@ Raphael = (function () {
             return this;
         };
         var create = function () {
-            var con = getContainer[apply](null, arguments),
+            var con = getContainer[apply](0, arguments),
                 container = con && con.container,
                 x = con.x,
                 y = con.y,
@@ -1625,12 +1658,14 @@ Raphael = (function () {
             }
         };
     }
+
     // VML
     if (R.vml) {
         var map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"},
             bites = /([clmz]),?([^clmz]*)/gi,
             val = /-?[^,\s-]+/g,
+            coordsize = 1e3 + S + 1e3,
+            zoom = 10,
             path2vml = function (path) {
                 var total =  /[ahqstv]/ig,
                     command = pathToAbsolute;
@@ -1646,19 +1681,20 @@ Raphael = (function () {
                                 res += vals + map[command == "m" ? "l" : "L"];
                                 vals = [];
                             }
-                            vals[push](round(value));
+                            vals[push](round(value * zoom));
                         });
                         return res + vals;
                     });
                     return res;
                 }
-                var pa = command(path), p, res = [], r;
+                var pa = command(path), p, r;
+                res = [];
                 for (var i = 0, ii = pa[length]; i < ii; i++) {
                     p = pa[i];
                     r = lowerCase.call(pa[i][0]);
                     r == "z" && (r = "x");
                     for (var j = 1, jj = p[length]; j < jj; j++) {
-                        r += round(p[j]) + (j != jj - 1 ? "," : E);
+                        r += round(p[j] * zoom) + (j != jj - 1 ? "," : E);
                     }
                     res[push](r);
                 }
@@ -1668,18 +1704,18 @@ Raphael = (function () {
         R[toString] = function () {
             return  "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version;
         };
-        var thePath = function (pathString, VML) {
+        thePath = function (pathString, vml) {
             var g = createNode("group");
-            g.style.cssText = "position:absolute;left:0;top:0;width:" + VML.width + "px;height:" + VML.height + "px";
-            g.coordsize = VML.coordsize;
-            g.coordorigin = VML.coordorigin;
+            g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px";
+            g.coordsize = vml.coordsize;
+            g.coordorigin = vml.coordorigin;
             var el = createNode("shape"), ol = el.style;
-            ol.width = VML.width + "px";
-            ol.height = VML.height + "px";
-            el.coordsize = this.coordsize;
-            el.coordorigin = this.coordorigin;
+            ol.width = vml.width + "px";
+            ol.height = vml.height + "px";
+            el.coordsize = coordsize;
+            el.coordorigin = vml.coordorigin;
             g[appendChild](el);
-            var p = new Element(el, g, VML),
+            var p = new Element(el, g, vml),
                 attr = {fill: "none", stroke: "#000"};
             pathString && (attr.path = pathString);
             p.isAbsolute = true;
@@ -1687,10 +1723,10 @@ Raphael = (function () {
             p.path = [];
             p.Path = E;
             setFillAndStroke(p, attr);
-            VML.canvas[appendChild](g);
+            vml.canvas[appendChild](g);
             return p;
         };
-        var setFillAndStroke = function (o, params) {
+        setFillAndStroke = function (o, params) {
             o.attrs = o.attrs || {};
             var node = o.node,
                 a = o.attrs,
@@ -1704,6 +1740,7 @@ Raphael = (function () {
             params.title && (node.title = params.title);
             params.target && (node.target = params.target);
             params.cursor && (s.cursor = params.cursor);
+            "blur" in params && o.blur(params.blur);
             if (params.path && o.type == "path") {
                 a.path = params.path;
                 node.path = path2vml(a.path);
@@ -1815,8 +1852,8 @@ Raphael = (function () {
                 }
                 (params.stroke == "none" || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false);
                 stroke.on && params.stroke && (stroke.color = R.getRGB(params.stroke).hex);
-                var opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1),
-                    width = (toFloat(params["stroke-width"]) || 1) * .75;
+                opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1);
+                var width = (toFloat(params["stroke-width"]) || 1) * .75;
                 opacity < 0 && (opacity = 0);
                 opacity > 1 && (opacity = 1);
                 params["stroke-width"] == null && (width = a["stroke-width"]);
@@ -1845,7 +1882,7 @@ Raphael = (function () {
                 newstroke && node[appendChild](stroke);
             }
             if (res.type == "text") {
-                var s = res.paper.span.style;
+                s = res.paper.span.style;
                 a.font && (s.font = a.font);
                 a["font-family"] && (s.fontFamily = a["font-family"]);
                 a["font-size"] && (s.fontSize = a["font-size"]);
@@ -1873,7 +1910,7 @@ Raphael = (function () {
                 }
             }
         };
-        var addGradientFill = function (o, gradient) {
+        addGradientFill = function (o, gradient) {
             o.attrs = o.attrs || {};
             var attrs = o.attrs,
                 fill = o.node.getElementsByTagName("fill"),
@@ -1925,7 +1962,7 @@ Raphael = (function () {
             }
             return 1;
         };
-        var Element = function (node, group, vml) {
+        Element = function (node, group, vml) {
             var Rotation = 0,
                 RotX = 0,
                 RotY = 0,
@@ -2052,43 +2089,40 @@ Raphael = (function () {
             cx = (cx == null) ? x + w / 2 : cx;
             cy = (cy == null) ? y + h / 2 : cy;
             var left = cx - this.paper.width / 2,
-                top = cy - this.paper.height / 2;
-            if (this.type == "path" || this.type == "text") {
-                (gs.left != left + "px") && (gs.left = left + "px");
-                (gs.top != top + "px") && (gs.top = top + "px");
-                this.X = this.type == "text" ? x : -left;
-                this.Y = this.type == "text" ? y : -top;
-                this.W = w;
-                this.H = h;
-                (os.left != -left + "px") && (os.left = -left + "px");
-                (os.top != -top + "px") && (os.top = -top + "px");
+                top = cy - this.paper.height / 2, t;
+            gs.left != (t = left + "px") && (gs.left = t);
+            gs.top != (t = top + "px") && (gs.top = t);
+            this.X = this.type == "path" ? -left : x;
+            this.Y = this.type == "path" ? -top : y;
+            this.W = w;
+            this.H = h;
+            if (this.type == "path") {
+                os.left != (t = -left * zoom + "px") && (os.left = t);
+                os.top != (t = -top * zoom + "px") && (os.top = t);
+            } else if (this.type == "text") {
+                os.left != (t = -left + "px") && (os.left = t);
+                os.top != (t = -top + "px") && (os.top = t);
             } else {
-                (gs.left != left + "px") && (gs.left = left + "px");
-                (gs.top != top + "px") && (gs.top = top + "px");
-                this.X = x;
-                this.Y = y;
-                this.W = w;
-                this.H = h;
-                (gs.width != this.paper.width + "px") && (gs.width = this.paper.width + "px");
-                (gs.height != this.paper.height + "px") && (gs.height = this.paper.height + "px");
-                (os.left != x - left + "px") && (os.left = x - left + "px");
-                (os.top != y - top + "px") && (os.top = y - top + "px");
-                (os.width != w + "px") && (os.width = w + "px");
-                (os.height != h + "px") && (os.height = h + "px");
+                gs.width != (t = this.paper.width + "px") && (gs.width = t);
+                gs.height != (t = this.paper.height + "px") && (gs.height = t);
+                os.left != (t = x - left + "px") && (os.left = t);
+                os.top != (t = y - top + "px") && (os.top = t);
+                os.width != (t = w + "px") && (os.width = t);
+                os.height != (t = h + "px") && (os.height = t);
                 var arcsize = (+params.r || 0) / mmin(w, h);
                 if (this.type == "rect" && this.arcsize.toFixed(4) != arcsize.toFixed(4) && (arcsize || this.arcsize)) {
                     // We should replace element with the new one
                     var o = createNode("roundrect"),
                         a = {},
-                        i = 0,
                         ii = this.events && this.events[length];
+                    i = 0;
                     o.arcsize = arcsize;
                     o.raphael = this;
                     this.Group[appendChild](o);
                     this.Group.removeChild(this.node);
                     this[0] = this.node = o;
                     this.arcsize = arcsize;
-                    for (var i in attr) {
+                    for (i in attr) {
                         a[i] = attr[i];
                     }
                     delete a.scale;
@@ -2134,11 +2168,11 @@ Raphael = (function () {
             }
             this.removed = true;
         };
-        Element[proto].attr = function () {
+        Element[proto].attr = function (name, value) {
             if (this.removed) {
                 return this;
             }
-            if (arguments[length] == 0) {
+            if (name == null) {
                 var res = {};
                 for (var i in this.attrs) if (this.attrs[has](i)) {
                     res[i] = this.attrs[i];
@@ -2148,34 +2182,34 @@ Raphael = (function () {
                 res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;
                 return res;
             }
-            if (arguments[length] == 1 && R.is(arguments[0], "string")) {
-                if (arguments[0] == "translation") {
+            if (value == null && R.is(name, "string")) {
+                if (name == "translation") {
                     return translate.call(this);
                 }
-                if (arguments[0] == "rotation") {
+                if (name == "rotation") {
                     return this.rotate();
                 }
-                if (arguments[0] == "scale") {
+                if (name == "scale") {
                     return this.scale();
                 }
-                if (arguments[0] == "fill" && this.attrs.fill == "none" && this.attrs.gradient) {
+                if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) {
                     return this.attrs.gradient;
                 }
-                return this.attrs[arguments[0]];
+                return this.attrs[name];
             }
-            if (this.attrs && arguments[length] == 1 && R.is(arguments[0], "array")) {
-                var values = {};
-                for (var i = 0, ii = arguments[0][length]; i < ii; i++) {
-                    values[arguments[0][i]] = this.attrs[arguments[0][i]];
-                };
+            if (this.attrs && value == null && R.is(name, "array")) {
+                var ii, values = {};
+                for (i = 0, ii = name[length]; i < ii; i++) {
+                    values[name[i]] = this.attr(name[i]);
+                }
                 return values;
             }
             var params;
-            if (arguments[length] == 2) {
+            if (value != null) {
                 params = {};
-                params[arguments[0]] = arguments[1];
+                params[name] = value;
             }
-            arguments[length] == 1 && R.is(arguments[0], "object") && (params = arguments[0]);
+            value == null && R.is(name, "object") && (params = name);
             if (params) {
                 if (params.text && this.type == "text") {
                     this.node.string = params.text;
@@ -2223,13 +2257,28 @@ Raphael = (function () {
             insertbefore(this, element, this.paper);
             return this;
         };
+        var blurregexp = / progid:\S+Blur\([^\)]+\)/g;
+        Element[proto].blur = function (size) {
+            var s = this.node.style,
+                f = s.filter;
+            f = f.replace(blurregexp, "");
+            if (+size !== 0) {
+                this.attrs.blur = size;
+                s.filter = f + " progid:DXImageTransform.Microsoft.Blur(pixelradius=" + (+size || 1.5) + ")";
+                s.margin = Raphael.format("-{0}px 0 0 -{0}px", Math.round(+size || 1.5));
+            } else {
+                s.filter = f;
+                s.margin = 0;
+                delete this.attrs.blur;
+            }
+        };
  
-        var theCircle = function (vml, x, y, r) {
+        theCircle = function (vml, x, y, r) {
             var g = createNode("group"),
                 o = createNode("oval"),
                 ol = o.style;
             g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px";
-            g.coordsize = vml.coordsize;
+            g.coordsize = coordsize;
             g.coordorigin = vml.coordorigin;
             g[appendChild](o);
             var res = new Element(o, g, vml);
@@ -2241,13 +2290,13 @@ Raphael = (function () {
             res.setBox({x: x - r, y: y - r, width: r * 2, height: r * 2});
             vml.canvas[appendChild](g);
             return res;
-        },
+        };
         theRect = function (vml, x, y, w, h, r) {
             var g = createNode("group"),
                 o = createNode("roundrect"),
                 arcsize = (+r || 0) / (mmin(w, h));
             g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px";
-            g.coordsize = vml.coordsize;
+            g.coordsize = coordsize;
             g.coordorigin = vml.coordorigin;
             g[appendChild](o);
             o.arcsize = arcsize;
@@ -2258,13 +2307,13 @@ Raphael = (function () {
             res.setBox({x: x, y: y, width: w, height: h, r: r});
             vml.canvas[appendChild](g);
             return res;
-        },
+        };
         theEllipse = function (vml, x, y, rx, ry) {
             var g = createNode("group"),
                 o = createNode("oval"),
                 ol = o.style;
             g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px";
-            g.coordsize = vml.coordsize;
+            g.coordsize = coordsize;
             g.coordorigin = vml.coordorigin;
             g[appendChild](o);
             var res = new Element(o, g, vml);
@@ -2277,13 +2326,13 @@ Raphael = (function () {
             res.setBox({x: x - rx, y: y - ry, width: rx * 2, height: ry * 2});
             vml.canvas[appendChild](g);
             return res;
-        },
+        };
         theImage = function (vml, src, x, y, w, h) {
             var g = createNode("group"),
                 o = createNode("image"),
                 ol = o.style;
             g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px";
-            g.coordsize = vml.coordsize;
+            g.coordsize = coordsize;
             g.coordorigin = vml.coordorigin;
             o.src = src;
             g[appendChild](o);
@@ -2297,7 +2346,7 @@ Raphael = (function () {
             res.setBox({x: x, y: y, width: w, height: h});
             vml.canvas[appendChild](g);
             return res;
-        },
+        };
         theText = function (vml, x, y, text) {
             var g = createNode("group"),
                 el = createNode("shape"),
@@ -2306,9 +2355,9 @@ Raphael = (function () {
                 ps = path.style,
                 o = createNode("textpath");
             g.style.cssText = "position:absolute;left:0;top:0;width:" + vml.width + "px;height:" + vml.height + "px";
-            g.coordsize = vml.coordsize;
+            g.coordsize = coordsize;
             g.coordorigin = vml.coordorigin;
-            path.v = R.format("m{0},{1}l{2},{1}", round(x), round(y), round(x) + 1);
+            path.v = R.format("m{0},{1}l{2},{1}", round(x * 10), round(y * 10), round(x * 10) + 1);
             path.textpathok = true;
             ol.width = vml.width;
             ol.height = vml.height;
@@ -2330,7 +2379,7 @@ Raphael = (function () {
             res.setBox();
             vml.canvas[appendChild](g);
             return res;
-        },
+        };
         setSize = function (width, height) {
             var cs = this.canvas.style;
             width == +width && (width += "px");
@@ -2339,8 +2388,8 @@ Raphael = (function () {
             cs.height = height;
             cs.clip = "rect(0 " + width + " " + height + " 0)";
             return this;
-        },
-        createNode;
+        };
+        var createNode;
         doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");
         try {
             !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");
@@ -2352,8 +2401,8 @@ Raphael = (function () {
                 return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');
             };
         }
-        var create = function () {
-            var con = getContainer[apply](null, arguments),
+        create = function () {
+            var con = getContainer[apply](0, arguments),
                 container = con.container,
                 height = con.height,
                 s,
@@ -2372,7 +2421,7 @@ Raphael = (function () {
             height == +height && (height += "px");
             res.width = 1e3;
             res.height = 1e3;
-            res.coordsize = "1000 1000";
+            res.coordsize = zoom * 1e3 + S + zoom * 1e3;
             res.coordorigin = "0 0";
             res.span = doc.createElement("span");
             res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";
@@ -2406,15 +2455,16 @@ Raphael = (function () {
             for (var i in this) {
                 this[i] = removed(i);
             }
+            return true;
         };
     }
  
     // rest
     // Safari or Chrome (WebKit) rendering bug workaround method
-    if ((/^Apple|^Google/).test(navigator.vendor) && !(navigator.userAgent.indexOf("Version/4.0") + 1)) {
+    if ((/^Apple|^Google/).test(win.navigator.vendor) && !(win.navigator.userAgent.indexOf("Version/4.0") + 1)) {
         Paper[proto].safari = function () {
             var rect = this.rect(-99, -99, this.width + 99, this.height + 99);
-            setTimeout(function () {rect.remove();});
+            win.setTimeout(function () {rect.remove();});
         };
     } else {
         Paper[proto].safari = function () {};
@@ -2503,7 +2553,7 @@ Raphael = (function () {
     Paper[proto].raphael = R;
     function x_y() {
         return this.x + S + this.y;
-    };
+    }
     Element[proto].scale = function (x, y, cx, cy) {
         if (x == null && y == null) {
             return {
@@ -2560,7 +2610,6 @@ Raphael = (function () {
                         skip = true;
                     for (var i = 0, ii = path[length]; i < ii; i++) {
                         var p = path[i],
-                            j,
                             P0 = upperCase.call(p[0]);
                         if (P0 == "M" && skip) {
                             continue;
@@ -2572,9 +2621,9 @@ Raphael = (function () {
                             p[path[i][length] - 1] *= ky;
                             p[1] *= dirx * kx;
                             p[2] *= diry * ky;
-                            p[5] = +(dirx + diry ? !!+p[5] : !+p[5]);
+                            p[5] = +!(dirx + diry ? !+p[5] : +p[5]);
                         } else if (P0 == "H") {
-                            for (j = 1, jj = p[length]; j < jj; j++) {
+                            for (var j = 1, jj = p[length]; j < jj; j++) {
                                 p[j] *= kx;
                             }
                         } else if (P0 == "V") {
@@ -2587,9 +2636,9 @@ Raphael = (function () {
                             }
                         }
                     }
-                    var dim2 = pathDimensions(path),
-                        dx = ncx - dim2.x - dim2.width / 2,
-                        dy = ncy - dim2.y - dim2.height / 2;
+                    var dim2 = pathDimensions(path);
+                    dx = ncx - dim2.x - dim2.width / 2;
+                    dy = ncy - dim2.y - dim2.height / 2;
                     path[0][1] += dx;
                     path[0][2] += dy;
                     this.attr({path: path});
@@ -2633,7 +2682,19 @@ Raphael = (function () {
         delete attr.translation;
         return this.paper[this.type]().attr(attr);
     };
-    var getLengthFactory = function (istotal, subpath) {
+    var getPointAtSegmentLength = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {
+        var len = 0,
+            old;
+        for (var i = 0; i < 1.001; i+=.001) {
+            var dot = R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, i);
+            i && (len += pow(pow(old.x - dot.x, 2) + pow(old.y - dot.y, 2), .5));
+            if (len >= length) {
+                return dot;
+            }
+            old = dot;
+        }
+    }),
+    getLengthFactory = function (istotal, subpath) {
         return function (path, length, onlystart) {
             path = path2curve(path);
             var x, y, p, l, sp = "", subpaths = {}, point,
@@ -2647,9 +2708,9 @@ Raphael = (function () {
                     l = segmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);
                     if (len + l > length) {
                         if (subpath && !subpaths.start) {
-                            point = R.findDotsAtSegment(x, y, p[1], p[2], p[3], p[4], p[5], p[6], (length - len) / l);
+                            point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);
                             sp += ["C", point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y];
-                            if (onlystart) return sp;
+                            if (onlystart) {return sp;}
                             subpaths.start = sp;
                             sp = ["M", point.x, point.y + "C", point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]][join]();
                             len += l;
@@ -2658,7 +2719,7 @@ Raphael = (function () {
                             continue;
                         }
                         if (!istotal && !subpath) {
-                            point = R.findDotsAtSegment(x, y, p[1], p[2], p[3], p[4], p[5], p[6], (length - len) / l);
+                            point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);
                             return {x: point.x, y: point.y, alpha: point.alpha};
                         }
                     }
@@ -2679,7 +2740,7 @@ Raphael = (function () {
             len = 0;
         for (var i = 0; i < 1.01; i+=.01) {
             var dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, i);
-            i && (len += math.sqrt(pow(old.x - dot.x, 2) + pow(old.y - dot.y, 2)));
+            i && (len += pow(pow(old.x - dot.x, 2) + pow(old.y - dot.y, 2), .5));
             old = dot;
         }
         return len;
@@ -2688,15 +2749,15 @@ Raphael = (function () {
         getPointAtLength = getLengthFactory(),
         getSubpathsAtLength = getLengthFactory(0, 1);
     Element[proto].getTotalLength = function () {
-        if (this.type != "path") return;
+        if (this.type != "path") {return;}
         return getTotalLength(this.attrs.path);
     };
     Element[proto].getPointAtLength = function (length) {
-        if (this.type != "path") return;
+        if (this.type != "path") {return;}
         return getPointAtLength(this.attrs.path, length);
     };
     Element[proto].getSubpath = function (from, to) {
-        if (this.type != "path") return;
+        if (this.type != "path") {return;}
         if (math.abs(this.getTotalLength() - to) < 1e-6) {
             return getSubpathsAtLength(this.attrs.path, from).end;
         }
@@ -2839,7 +2900,7 @@ Raphael = (function () {
                                     break;
                                     case "clip-rect":
                                         now = [];
-                                        var i = 4;
+                                        i = 4;
                                         while (i--) {
                                             now[i] = +from[attr][i] + pos * ms * diff[attr][i];
                                         }
@@ -2853,7 +2914,7 @@ Raphael = (function () {
                     that._run && that._run.call(that);
                 } else {
                     if (to.along) {
-                        var point = getPointAtLength(to.along, to.len * !to.back);
+                        point = getPointAtLength(to.along, to.len * !to.back);
                         that.translate(diff.sx - (diff.x || 0) + point.x - diff.sx, diff.sy - (diff.y || 0) + point.y - diff.sy);
                         to.rot && that.rotate(diff.r + point.alpha, point.x, point.y);
                     }
@@ -2868,7 +2929,7 @@ Raphael = (function () {
                 e.prev = time;
             }
             R.svg && that && that.paper.safari();
-            animationElements[length] && setTimeout(animation);
+            animationElements[length] && win.setTimeout(animation);
         },
         upto255 = function (color) {
             return color > 255 ? 255 : (color < 0 ? 0 : color);
@@ -2988,7 +3049,7 @@ Raphael = (function () {
                             case "clip-rect":
                                 from[attr] = (from[attr] + E)[split](separator);
                                 diff[attr] = [];
-                                var i = 4;
+                                i = 4;
                                 while (i--) {
                                     diff[attr][i] = (values[i] - from[attr][i]) / ms;
                                 }
@@ -3074,7 +3135,7 @@ Raphael = (function () {
             }
         } else {
             for (var i = 0, ii = this.items[length]; i < ii; i++) {
-                this.items[i].attr[apply](this.items[i], arguments);
+                this.items[i].attr(name, value);
             }
         }
         return this;
@@ -3217,11 +3278,11 @@ Raphael = (function () {
         }
         return out;
     };
-    R.format = function (token) {
-        var args = R.is(arguments[1], "array") ? [0][concat](arguments[1]) : arguments,
-            rg = /\{(\d+)\}/g;
-        token && R.is(token, "string") && args[length] - 1 && (token = token[rp](rg, function (str, i) {
+
+    var formatrg = /\{(\d+)\}/g;
+    R.format = function (token, array) {
+        var args = R.is(array, "array") ? [0][concat](array) : arguments;
+        token && R.is(token, "string") && args[length] - 1 && (token = token[rp](formatrg, function (str, i) {
             return args[++i] == null ? E : args[i];
         }));
         return token || E;