• fixed IE8 issue with the HTML element named Raphael cuttingedge
authorDmitry Baranovskiy <Dmitry@Baranovskiy.com>
Tue, 17 Aug 2010 02:52:58 +0000 (12:52 +1000)
committerDmitry Baranovskiy <Dmitry@Baranovskiy.com>
Tue, 17 Aug 2010 02:52:58 +0000 (12:52 +1000)
• fixed precision for arcs in IE
• added caching to getPointAtSegmentLength function
• added ability to do more than one animation of an element at the same time
• added "cubic-bezier()" as an easing method

raphael-min.js
reference.html

index c05ab70..5d78785 100644 (file)
@@ -1,113 +1,7 @@
 /*
- * Raphael 1.4.4 - JavaScript Vector Library
+ * Raphael 1.5.0 - JavaScript Vector Library
  *
  * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
  */
-Raphael=function(){function m(){if(m.is(arguments[0],V)){for(var a=arguments[0],b=Ba[L](m,a.splice(0,3+m.is(a[0],Q))),c=b.set(),d=0,f=a[o];d<f;d++){var e=a[d]||{};ob.test(e.type)&&c[F](b[e.type]().attr(e))}return c}return Ba[L](m,arguments)}m.version="1.4.4";var W=/[, ]+/,ob=/^(circle|rect|path|ellipse|text|image)$/,p="prototype",y="hasOwnProperty",C=document,Y=window,Na={was:Object[p][y].call(Y,"Raphael"),is:Y.Raphael};function H(){}var x="appendChild",L="apply",N="concat",Ca="createTouch"in C,A=
-"",O=" ",D=String,I="split",Oa="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[I](O),Da={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},R="join",o="length",da=String[p].toLowerCase,v=Math,Z=v.max,aa=v.min,Q="number",fa="string",V="array",P="toString",ba="fill",pb=Object[p][P],E=v.pow,F="push",ha=/^(?=[\da-f]$)/,Pa=/^url\(['"]?([^\)]+?)['"]?\)$/i,qb=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+(?:\s*,\s*[\d\.]+)?)\s*\)|rgba?\(\s*([\d\.]+%\s*,\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,
-G=v.round,X="setAttribute",z=parseFloat,ea=parseInt,Ea=" progid:DXImageTransform.Microsoft",qa=String[p].toUpperCase,ra={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},Fa={along:"along",blur:Q,"clip-rect":"csv",cx:Q,cy:Q,fill:"colour","fill-opacity":Q,"font-size":Q,height:Q,opacity:Q,path:"path",r:Q,rotation:"csv",rx:Q,ry:Q,scale:"csv",stroke:"colour","stroke-opacity":Q,"stroke-width":Q,translation:"csv",width:Q,x:Q,y:Q},J="replace";m.type=Y.SVGAngle||C.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure",
-"1.1")?"SVG":"VML";if(m.type=="VML"){var ia=C.createElement("div");ia.innerHTML="<!--[if vml]><br><br><![endif]--\>";if(ia.childNodes[o]!=2)return m.type=null;ia=null}m.svg=!(m.vml=m.type=="VML");H[p]=m[p];m._id=0;m._oid=0;m.fn={};m.is=function(a,b){b=da.call(b);return b=="object"&&a===Object(a)||b=="undefined"&&typeof a==b||b=="null"&&a==null||da.call(pb.call(a).slice(8,-1))==b};m.setWindow=function(a){Y=a;C=Y.document};function sa(a){if(m.vml){var b=/^\s+|\s+$/g;sa=U(function(d){var f;d=D(d)[J](b,
-A);try{var e=new Y.ActiveXObject("htmlfile");e.write("<body>");e.close();f=e.body}catch(g){f=Y.createPopup().document.body}e=f.createTextRange();try{f.style.color=d;var h=e.queryCommandValue("ForeColor");h=(h&255)<<16|h&65280|(h&16711680)>>>16;return"#"+("000000"+h[P](16)).slice(-6)}catch(i){return"none"}})}else{var c=C.createElement("i");c.title="Rapha\u00ebl Colour Picker";c.style.display="none";C.body[x](c);sa=U(function(d){c.style.color=d;return C.defaultView.getComputedStyle(c,A).getPropertyValue("color")})}return sa(a)}
-function rb(){return"hsb("+[this.h,this.s,this.b]+")"}function sb(){return this.hex}m.hsb2rgb=U(function(a,b,c){if(m.is(a,"object")&&"h"in a&&"s"in a&&"b"in a){c=a.b;b=a.s;a=a.h}var d;if(c==0)return{r:0,g:0,b:0,hex:"#000"};if(a>1||b>1||c>1){a/=255;b/=255;c/=255}d=~~(a*6);a=a*6-d;var f=c*(1-b),e=c*(1-b*a),g=c*(1-b*(1-a));a=[c,e,f,f,g,c,c][d];b=[g,c,c,e,f,f,g][d];d=[f,f,g,c,c,e,f][d];a*=255;b*=255;d*=255;c={r:a,g:b,b:d,toString:sb};a=(~~a)[P](16);b=(~~b)[P](16);d=(~~d)[P](16);a=a[J](ha,"0");b=b[J](ha,
-"0");d=d[J](ha,"0");c.hex="#"+a+b+d;return c},m);m.rgb2hsb=U(function(a,b,c){if(m.is(a,"object")&&"r"in a&&"g"in a&&"b"in a){c=a.b;b=a.g;a=a.r}if(m.is(a,fa)){var d=m.getRGB(a);a=d.r;b=d.g;c=d.b}if(a>1||b>1||c>1){a/=255;b/=255;c/=255}var f=Z(a,b,c),e=aa(a,b,c);d=f;if(e==f)return{h:0,s:0,b:f};else{var g=f-e;e=g/f;a=a==f?(b-c)/g:b==f?2+(c-a)/g:4+(a-b)/g;a/=6;a<0&&a++;a>1&&a--}return{h:a,s:e,b:d,toString:rb}},m);var tb=/,?([achlmqrstvxz]),?/gi,ta=/\s*,\s*/,ub={hs:1,rg:1};m._path2string=function(){return this.join(",")[J](tb,
-"$1")};function U(a,b,c){function d(){var f=Array[p].slice.call(arguments,0),e=f[R]("\u25ba"),g=d.cache=d.cache||{},h=d.count=d.count||[];if(g[y](e))return c?c(g[e]):g[e];h[o]>=1000&&delete g[h.shift()];h[F](e);g[e]=a[L](b,f);return c?c(g[e]):g[e]}return d}m.getRGB=U(function(a){if(!a||(a=D(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1};if(a=="none")return{r:-1,g:-1,b:-1,hex:"none"};!(ub[y](a.substring(0,2))||a.charAt()=="#")&&(a=sa(a));var b,c,d,f,e;if(a=a.match(qb)){if(a[2]){d=ea(a[2].substring(5),
-16);c=ea(a[2].substring(3,5),16);b=ea(a[2].substring(1,3),16)}if(a[3]){d=ea((e=a[3].charAt(3))+e,16);c=ea((e=a[3].charAt(2))+e,16);b=ea((e=a[3].charAt(1))+e,16)}if(a[4]){a=a[4][I](ta);b=z(a[0]);c=z(a[1]);d=z(a[2]);f=z(a[3])}if(a[5]){a=a[5][I](ta);b=z(a[0])*2.55;c=z(a[1])*2.55;d=z(a[2])*2.55;f=z(a[3])}if(a[6]){a=a[6][I](ta);b=z(a[0]);c=z(a[1]);d=z(a[2]);return m.hsb2rgb(b,c,d)}if(a[7]){a=a[7][I](ta);b=z(a[0])*2.55;c=z(a[1])*2.55;d=z(a[2])*2.55;return m.hsb2rgb(b,c,d)}a={r:b,g:c,b:d};b=(~~b)[P](16);
-c=(~~c)[P](16);d=(~~d)[P](16);b=b[J](ha,"0");c=c[J](ha,"0");d=d[J](ha,"0");a.hex="#"+b+c+d;isFinite(z(f))&&(a.o=f);return a}return{r:-1,g:-1,b:-1,hex:"none",error:1}},m);m.getColor=function(a){a=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||0.75};var b=this.hsb2rgb(a.h,a.s,a.b);a.h+=0.075;if(a.h>1){a.h=0;a.s-=0.2;a.s<=0&&(this.getColor.start={h:0,s:1,b:a.b})}return b.hex};m.getColor.reset=function(){delete this.start};var vb=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,
-wb=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig;m.parsePathString=U(function(a){if(!a)return null;var b={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[];if(m.is(a,V)&&m.is(a[0],V))c=ua(a);c[o]||D(a)[J](vb,function(d,f,e){var g=[];d=da.call(f);e[J](wb,function(h,i){i&&g[F](+i)});if(d=="m"&&g[o]>2){c[F]([f][N](g.splice(0,2)));d="l";f=f=="m"?"l":"L"}for(;g[o]>=b[d];){c[F]([f][N](g.splice(0,b[d])));if(!b[d])break}});c[P]=m._path2string;return c});m.findDotsAtSegment=function(a,b,c,d,f,e,g,h,i){var j=1-i,l=E(j,
-3)*a+E(j,2)*3*i*c+j*3*i*i*f+E(i,3)*g;j=E(j,3)*b+E(j,2)*3*i*d+j*3*i*i*e+E(i,3)*h;var n=a+2*i*(c-a)+i*i*(f-2*c+a),r=b+2*i*(d-b)+i*i*(e-2*d+b),q=c+2*i*(f-c)+i*i*(g-2*f+c),k=d+2*i*(e-d)+i*i*(h-2*e+d);a=(1-i)*a+i*c;b=(1-i)*b+i*d;f=(1-i)*f+i*g;e=(1-i)*e+i*h;h=90-v.atan((n-q)/(r-k))*180/v.PI;(n>q||r<k)&&(h+=180);return{x:l,y:j,m:{x:n,y:r},n:{x:q,y:k},start:{x:a,y:b},end:{x:f,y:e},alpha:h}};var wa=U(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=va(a);for(var b=0,c=0,d=[],f=[],e,g=0,h=a[o];g<h;g++){e=
-a[g];if(e[0]=="M"){b=e[1];c=e[2];d[F](b);f[F](c)}else{b=xb(b,c,e[1],e[2],e[3],e[4],e[5],e[6]);d=d[N](b.min.x,b.max.x);f=f[N](b.min.y,b.max.y);b=e[5];c=e[6]}}a=aa[L](0,d);e=aa[L](0,f);return{x:a,y:e,width:Z[L](0,d)-a,height:Z[L](0,f)-e}});function ua(a){var b=[];if(!m.is(a,V)||!m.is(a&&a[0],V))a=m.parsePathString(a);for(var c=0,d=a[o];c<d;c++){b[c]=[];for(var f=0,e=a[c][o];f<e;f++)b[c][f]=a[c][f]}b[P]=m._path2string;return b}var Ga=U(function(a){if(!m.is(a,V)||!m.is(a&&a[0],V))a=m.parsePathString(a);
-var b=[],c=0,d=0,f=0,e=0,g=0;if(a[0][0]=="M"){c=a[0][1];d=a[0][2];f=c;e=d;g++;b[F](["M",c,d])}g=g;for(var h=a[o];g<h;g++){var i=b[g]=[],j=a[g];if(j[0]!=da.call(j[0])){i[0]=da.call(j[0]);switch(i[0]){case "a":i[1]=j[1];i[2]=j[2];i[3]=j[3];i[4]=j[4];i[5]=j[5];i[6]=+(j[6]-c).toFixed(3);i[7]=+(j[7]-d).toFixed(3);break;case "v":i[1]=+(j[1]-d).toFixed(3);break;case "m":f=j[1];e=j[2];default:for(var l=1,n=j[o];l<n;l++)i[l]=+(j[l]-(l%2?c:d)).toFixed(3)}}else{b[g]=[];if(j[0]=="m"){f=j[1]+c;e=j[2]+d}i=0;for(l=
-j[o];i<l;i++)b[g][i]=j[i]}j=b[g][o];switch(b[g][0]){case "z":c=f;d=e;break;case "h":c+=+b[g][j-1];break;case "v":d+=+b[g][j-1];break;default:c+=+b[g][j-2];d+=+b[g][j-1]}}b[P]=m._path2string;return b},0,ua),la=U(function(a){if(!m.is(a,V)||!m.is(a&&a[0],V))a=m.parsePathString(a);var b=[],c=0,d=0,f=0,e=0,g=0;if(a[0][0]=="M"){c=+a[0][1];d=+a[0][2];f=c;e=d;g++;b[0]=["M",c,d]}g=g;for(var h=a[o];g<h;g++){var i=b[g]=[],j=a[g];if(j[0]!=qa.call(j[0])){i[0]=qa.call(j[0]);switch(i[0]){case "A":i[1]=j[1];i[2]=
-j[2];i[3]=j[3];i[4]=j[4];i[5]=j[5];i[6]=+(j[6]+c);i[7]=+(j[7]+d);break;case "V":i[1]=+j[1]+d;break;case "H":i[1]=+j[1]+c;break;case "M":f=+j[1]+c;e=+j[2]+d;default:for(var l=1,n=j[o];l<n;l++)i[l]=+j[l]+(l%2?c:d)}}else{l=0;for(n=j[o];l<n;l++)b[g][l]=j[l]}switch(i[0]){case "Z":c=f;d=e;break;case "H":c=i[1];break;case "V":d=i[1];break;case "M":f=b[g][b[g][o]-2];e=b[g][b[g][o]-1];default:c=b[g][b[g][o]-2];d=b[g][b[g][o]-1]}}b[P]=m._path2string;return b},null,ua);function xa(a,b,c,d){return[a,b,c,d,c,
-d]}function Qa(a,b,c,d,f,e){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*f+h*c,g*e+h*d,f,e]}function Ra(a,b,c,d,f,e,g,h,i,j){var l=v.PI,n=l*120/180,r=l/180*(+f||0),q=[],k,s=U(function(K,ga,ya){var yb=K*v.cos(ya)-ga*v.sin(ya);K=K*v.sin(ya)+ga*v.cos(ya);return{x:yb,y:K}});if(j){w=j[0];k=j[1];e=j[2];B=j[3]}else{k=s(a,b,-r);a=k.x;b=k.y;k=s(h,i,-r);h=k.x;i=k.y;v.cos(l/180*f);v.sin(l/180*f);k=(a-h)/2;w=(b-i)/2;B=k*k/(c*c)+w*w/(d*d);if(B>1){B=v.sqrt(B);c=B*c;d=B*d}B=c*c;var M=d*d;B=(e==g?-1:1)*v.sqrt(v.abs((B*
-M-B*w*w-M*k*k)/(B*w*w+M*k*k)));e=B*c*w/d+(a+h)/2;var B=B*-d*k/c+(b+i)/2,w=v.asin(((b-B)/d).toFixed(7));k=v.asin(((i-B)/d).toFixed(7));w=a<e?l-w:w;k=h<e?l-k:k;w<0&&(w=l*2+w);k<0&&(k=l*2+k);if(g&&w>k)w-=l*2;if(!g&&k>w)k-=l*2}l=k-w;if(v.abs(l)>n){q=k;l=h;M=i;k=w+n*(g&&k>w?1:-1);h=e+c*v.cos(k);i=B+d*v.sin(k);q=Ra(h,i,c,d,f,0,g,l,M,[k,q,e,B])}l=k-w;f=v.cos(w);e=v.sin(w);g=v.cos(k);k=v.sin(k);l=v.tan(l/4);c=4/3*c*l;l=4/3*d*l;d=[a,b];a=[a+c*e,b-l*f];b=[h+c*k,i-l*g];h=[h,i];a[0]=2*d[0]-a[0];a[1]=2*d[1]-a[1];
-if(j)return[a,b,h][N](q);else{q=[a,b,h][N](q)[R]()[I](",");j=[];h=0;for(i=q[o];h<i;h++)j[h]=h%2?s(q[h-1],q[h],r).y:s(q[h],q[h+1],r).x;return j}}function ma(a,b,c,d,f,e,g,h,i){var j=1-i;return{x:E(j,3)*a+E(j,2)*3*i*c+j*3*i*i*f+E(i,3)*g,y:E(j,3)*b+E(j,2)*3*i*d+j*3*i*i*e+E(i,3)*h}}var xb=U(function(a,b,c,d,f,e,g,h){var i=f-2*c+a-(g-2*f+c),j=2*(c-a)-2*(f-c),l=a-c,n=(-j+v.sqrt(j*j-4*i*l))/2/i;i=(-j-v.sqrt(j*j-4*i*l))/2/i;var r=[b,h],q=[a,g];v.abs(n)>1000000000000&&(n=0.5);v.abs(i)>1000000000000&&(i=0.5);
-if(n>0&&n<1){n=ma(a,b,c,d,f,e,g,h,n);q[F](n.x);r[F](n.y)}if(i>0&&i<1){n=ma(a,b,c,d,f,e,g,h,i);q[F](n.x);r[F](n.y)}i=e-2*d+b-(h-2*e+d);j=2*(d-b)-2*(e-d);l=b-d;n=(-j+v.sqrt(j*j-4*i*l))/2/i;i=(-j-v.sqrt(j*j-4*i*l))/2/i;v.abs(n)>1000000000000&&(n=0.5);v.abs(i)>1000000000000&&(i=0.5);if(n>0&&n<1){n=ma(a,b,c,d,f,e,g,h,n);q[F](n.x);r[F](n.y)}if(i>0&&i<1){n=ma(a,b,c,d,f,e,g,h,i);q[F](n.x);r[F](n.y)}return{min:{x:aa[L](0,q),y:aa[L](0,r)},max:{x:Z[L](0,q),y:Z[L](0,r)}}}),va=U(function(a,b){var c=la(a),d=b&&
-la(b);a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};b={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function f(q,k){var s;if(!q)return["C",k.x,k.y,k.x,k.y,k.x,k.y];!(q[0]in{T:1,Q:1})&&(k.qx=k.qy=null);switch(q[0]){case "M":k.X=q[1];k.Y=q[2];break;case "A":q=["C"][N](Ra[L](0,[k.x,k.y][N](q.slice(1))));break;case "S":s=k.x+(k.x-(k.bx||k.x));k=k.y+(k.y-(k.by||k.y));q=["C",s,k][N](q.slice(1));break;case "T":k.qx=k.x+(k.x-(k.qx||k.x));k.qy=k.y+(k.y-(k.qy||k.y));q=["C"][N](Qa(k.x,k.y,k.qx,k.qy,q[1],q[2]));
-break;case "Q":k.qx=q[1];k.qy=q[2];q=["C"][N](Qa(k.x,k.y,q[1],q[2],q[3],q[4]));break;case "L":q=["C"][N](xa(k.x,k.y,q[1],q[2]));break;case "H":q=["C"][N](xa(k.x,k.y,q[1],k.y));break;case "V":q=["C"][N](xa(k.x,k.y,k.x,q[1]));break;case "Z":q=["C"][N](xa(k.x,k.y,k.X,k.Y));break}return q}function e(q,k){if(q[k][o]>7){q[k].shift();for(var s=q[k];s[o];)q.splice(k++,0,["C"][N](s.splice(0,6)));q.splice(k,1);i=Z(c[o],d&&d[o]||0)}}function g(q,k,s,M,B){if(q&&k&&q[B][0]=="M"&&k[B][0]!="M"){k.splice(B,0,["M",
-M.x,M.y]);s.bx=0;s.by=0;s.x=q[B][1];s.y=q[B][2];i=Z(c[o],d&&d[o]||0)}}for(var h=0,i=Z(c[o],d&&d[o]||0);h<i;h++){c[h]=f(c[h],a);e(c,h);d&&(d[h]=f(d[h],b));d&&e(d,h);g(c,d,a,b,h);g(d,c,b,a,h);var j=c[h],l=d&&d[h],n=j[o],r=d&&l[o];a.x=j[n-2];a.y=j[n-1];a.bx=z(j[n-4])||a.x;a.by=z(j[n-3])||a.y;b.bx=d&&(z(l[r-4])||b.x);b.by=d&&(z(l[r-3])||b.y);b.x=d&&l[r-2];b.y=d&&l[r-1]}return d?[c,d]:c},null,ua),Sa=U(function(a){for(var b=[],c=0,d=a[o];c<d;c++){var f={},e=a[c].match(/^([^:]*):?([\d\.]*)/);f.color=m.getRGB(e[1]);
-if(f.color.error)return null;f.color=f.color.hex;e[2]&&(f.offset=e[2]+"%");b[F](f)}c=1;for(d=b[o]-1;c<d;c++)if(!b[c].offset){a=z(b[c-1].offset||0);e=0;for(f=c+1;f<d;f++)if(b[f].offset){e=b[f].offset;break}if(!e){e=100;f=d}e=z(e);for(e=(e-a)/(f-c+1);c<f;c++){a+=e;b[c].offset=a+"%"}}return b});function Ta(a,b,c,d){if(m.is(a,fa)||m.is(a,"object")){a=m.is(a,fa)?C.getElementById(a):a;if(a.tagName)return b==null?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:
-{container:a,width:b,height:c}}else return{container:1,x:a,y:b,width:c,height:d}}function Ha(a,b){var c=this;for(var d in b)if(b[y](d)&&!(d in a))switch(typeof b[d]){case "function":(function(f){a[d]=a===c?f:function(){return f[L](c,arguments)}})(b[d]);break;case "object":a[d]=a[d]||{};Ha.call(this,a[d],b[d]);break;default:a[d]=b[d];break}}function ja(a,b){a==b.top&&(b.top=a.prev);a==b.bottom&&(b.bottom=a.next);a.next&&(a.next.prev=a.prev);a.prev&&(a.prev.next=a.next)}function Ua(a,b){if(b.top!==
-a){ja(a,b);a.next=null;a.prev=b.top;b.top.next=a;b.top=a}}function Va(a,b){if(b.bottom!==a){ja(a,b);a.next=b.bottom;a.prev=null;b.bottom.prev=a;b.bottom=a}}function Wa(a,b,c){ja(a,c);b==c.top&&(c.top=a);b.next&&(b.next.prev=a);a.next=b.next;a.prev=b;b.next=a}function Xa(a,b,c){ja(a,c);b==c.bottom&&(c.bottom=a);b.prev&&(b.prev.next=a);a.prev=b.prev;b.prev=a;a.next=b}function Ya(a){return function(){throw new Error("Rapha\u00ebl: you are calling to method \u201c"+a+"\u201d of removed object");}}var Za=
-/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;m.pathToRelative=Ga;if(m.svg){H[p].svgns="http://www.w3.org/2000/svg";H[p].xlink="http://www.w3.org/1999/xlink";G=function(a){return+a+(~~a===a)*0.5};var u=function(a,b){if(b)for(var c in b)b[y](c)&&a[X](c,D(b[c]));else{a=C.createElementNS(H[p].svgns,a);a.style.webkitTapHighlightColor="rgba(0,0,0,0)";return a}};m[P]=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version};var $a=function(a,b){var c=u("path");b.canvas&&b.canvas[x](c);
-b=new t(c,b);b.type="path";ca(b,{fill:"none",stroke:"#000",path:a});return b},na=function(a,b,c){var d="linear",f=0.5,e=0.5,g=a.style;b=D(b)[J](Za,function(l,n,r){d="radial";if(n&&r){f=z(n);e=z(r);l=(e>0.5)*2-1;E(f-0.5,2)+E(e-0.5,2)>0.25&&(e=v.sqrt(0.25-E(f-0.5,2))*l+0.5)&&e!=0.5&&(e=e.toFixed(5)-1.0E-5*l)}return A});b=b[I](/\s*\-\s*/);if(d=="linear"){var h=b.shift();h=-z(h);if(isNaN(h))return null;h=[0,0,v.cos(h*v.PI/180),v.sin(h*v.PI/180)];var i=1/(Z(v.abs(h[2]),v.abs(h[3]))||1);h[2]*=i;h[3]*=i;
-if(h[2]<0){h[0]=-h[2];h[2]=0}if(h[3]<0){h[1]=-h[3];h[3]=0}}b=Sa(b);if(!b)return null;i=a.getAttribute(ba);(i=i.match(/^url\(#(.*)\)$/))&&c.defs.removeChild(C.getElementById(i[1]));i=u(d+"Gradient");i.id="r"+(m._id++)[P](36);u(i,d=="radial"?{fx:f,fy:e}:{x1:h[0],y1:h[1],x2:h[2],y2:h[3]});c.defs[x](i);c=0;for(h=b[o];c<h;c++){var j=u("stop");u(j,{offset:b[c].offset?b[c].offset:!c?"0%":"100%","stop-color":b[c].color||"#fff"});i[x](j)}u(a,{fill:"url(#"+i.id+")",opacity:1,"fill-opacity":1});g.fill=A;g.opacity=
-1;return g.fillOpacity=1},Ia=function(a){var b=a.getBBox();u(a.pattern,{patternTransform:m.format("translate({0},{1})",b.x,b.y)})},ca=function(a,b){var c={"":[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]},d=a.node,f=a.attrs,e=a.rotate();function g(k,s){if(s=c[da.call(s)]){var M=k.attrs["stroke-width"]||"1";k={round:M,square:M,butt:0}[k.attrs["stroke-linecap"]||b["stroke-linecap"]]||0;for(var B=
-[],w=s[o];w--;)B[w]=s[w]*M+(w%2?1:-1)*k;u(d,{"stroke-dasharray":B[R](",")})}}b[y]("rotation")&&(e=b.rotation);var h=D(e)[I](W);if(h.length-1){h[1]=+h[1];h[2]=+h[2]}else h=null;z(e)&&a.rotate(0,true);for(var i in b)if(b[y](i))if(ra[y](i)){var j=b[i];f[i]=j;switch(i){case "blur":a.blur(j);break;case "rotation":a.rotate(j,true);break;case "href":case "title":case "target":var l=d.parentNode;if(da.call(l.tagName)!="a"){var n=u("a");l.insertBefore(n,d);n[x](d);l=n}l.setAttributeNS(a.paper.xlink,i,j);break;
-case "cursor":d.style.cursor=j;break;case "clip-rect":l=D(j)[I](W);if(l[o]==4){a.clip&&a.clip.parentNode.parentNode.removeChild(a.clip.parentNode);var r=u("clipPath");n=u("rect");r.id="r"+(m._id++)[P](36);u(n,{x:l[0],y:l[1],width:l[2],height:l[3]});r[x](n);a.paper.defs[x](r);u(d,{"clip-path":"url(#"+r.id+")"});a.clip=n}if(!j){(j=C.getElementById(d.getAttribute("clip-path")[J](/(^url\(#|\)$)/g,A)))&&j.parentNode.removeChild(j);u(d,{"clip-path":A});delete a.clip}break;case "path":if(a.type=="path")u(d,
-{d:j?(f.path=la(j)):"M0,0"});break;case "width":d[X](i,j);if(f.fx){i="x";j=f.x}else break;case "x":if(f.fx)j=-f.x-(f.width||0);case "rx":if(i=="rx"&&a.type=="rect")break;case "cx":h&&(i=="x"||i=="cx")&&(h[1]+=j-f[i]);d[X](i,G(j));a.pattern&&Ia(a);break;case "height":d[X](i,j);if(f.fy){i="y";j=f.y}else break;case "y":if(f.fy)j=-f.y-(f.height||0);case "ry":if(i=="ry"&&a.type=="rect")break;case "cy":h&&(i=="y"||i=="cy")&&(h[2]+=j-f[i]);d[X](i,G(j));a.pattern&&Ia(a);break;case "r":a.type=="rect"?u(d,
-{rx:j,ry:j}):d[X](i,j);break;case "src":a.type=="image"&&d.setAttributeNS(a.paper.xlink,"href",j);break;case "stroke-width":d.style.strokeWidth=j;d[X](i,j);f["stroke-dasharray"]&&g(a,f["stroke-dasharray"]);break;case "stroke-dasharray":g(a,j);break;case "translation":j=D(j)[I](W);j[0]=+j[0]||0;j[1]=+j[1]||0;if(h){h[1]+=j[0];h[2]+=j[1]}za.call(a,j[0],j[1]);break;case "scale":j=D(j)[I](W);a.scale(+j[0]||1,+j[1]||+j[0]||1,isNaN(z(j[2]))?null:+j[2],isNaN(z(j[3]))?null:+j[3]);break;case ba:if(l=D(j).match(Pa)){r=
-u("pattern");var q=u("image");r.id="r"+(m._id++)[P](36);u(r,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});u(q,{x:0,y:0});q.setAttributeNS(a.paper.xlink,"href",l[1]);r[x](q);j=C.createElement("img");j.style.cssText="position:absolute;left:-9999em;top-9999em";j.onload=function(){u(r,{width:this.offsetWidth,height:this.offsetHeight});u(q,{width:this.offsetWidth,height:this.offsetHeight});C.body.removeChild(this);a.paper.safari()};C.body[x](j);j.src=l[1];a.paper.defs[x](r);d.style.fill="url(#"+
-r.id+")";u(d,{fill:"url(#"+r.id+")"});a.pattern=r;a.pattern&&Ia(a);break}l=m.getRGB(j);if(l.error){if(({circle:1,ellipse:1}[y](a.type)||D(j).charAt()!="r")&&na(d,j,a.paper)){f.gradient=j;f.fill="none";break}}else{delete b.gradient;delete f.gradient;!m.is(f.opacity,"undefined")&&m.is(b.opacity,"undefined")&&u(d,{opacity:f.opacity});!m.is(f["fill-opacity"],"undefined")&&m.is(b["fill-opacity"],"undefined")&&u(d,{"fill-opacity":f["fill-opacity"]})}l[y]("o")&&u(d,{"fill-opacity":l.o/100});case "stroke":l=
-m.getRGB(j);d[X](i,l.hex);i=="stroke"&&l[y]("o")&&u(d,{"stroke-opacity":l.o/100});break;case "gradient":(({circle:1,ellipse:1})[y](a.type)||D(j).charAt()!="r")&&na(d,j,a.paper);break;case "opacity":case "fill-opacity":if(f.gradient){if(l=C.getElementById(d.getAttribute(ba)[J](/^url\(#|\)$/g,A))){l=l.getElementsByTagName("stop");l[l[o]-1][X]("stop-opacity",j)}break}default:i=="font-size"&&(j=ea(j,10)+"px");l=i[J](/(\-.)/g,function(k){return qa.call(k.substring(1))});d.style[l]=j;d[X](i,j);break}}zb(a,
-b);if(h)a.rotate(h.join(O));else z(e)&&a.rotate(e,true)},ab=1.2,zb=function(a,b){if(!(a.type!="text"||!(b[y]("text")||b[y]("font")||b[y]("font-size")||b[y]("x")||b[y]("y")))){var c=a.attrs,d=a.node,f=d.firstChild?ea(C.defaultView.getComputedStyle(d.firstChild,A).getPropertyValue("font-size"),10):10;if(b[y]("text")){for(c.text=b.text;d.firstChild;)d.removeChild(d.firstChild);b=D(b.text)[I]("\n");for(var e=0,g=b[o];e<g;e++)if(b[e]){var h=u("tspan");e&&u(h,{dy:f*ab,x:c.x});h[x](C.createTextNode(b[e]));
-d[x](h)}}else{b=d.getElementsByTagName("tspan");e=0;for(g=b[o];e<g;e++)e&&u(b[e],{dy:f*ab,x:c.x})}u(d,{y:c.y});a=a.getBBox();(a=c.y-(a.y+a.height/2))&&isFinite(a)&&u(d,{y:c.y+a})}},t=function(a,b){this[0]=a;this.id=m._oid++;this.node=a;a.raphael=this;this.paper=b;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!b.bottom&&(b.bottom=this);(this.prev=b.top)&&(b.top.next=this);b.top=this;this.next=null};t[p].rotate=function(a,b,c){if(this.removed)return this;
-if(a==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][R](O);return this._.rt.deg}var d=this.getBBox();a=D(a)[I](W);if(a[o]-1){b=z(a[1]);c=z(a[2])}a=z(a[0]);if(b!=null)this._.rt.deg=a;else this._.rt.deg+=a;c==null&&(b=null);this._.rt.cx=b;this._.rt.cy=c;b=b==null?d.x+d.width/2:b;c=c==null?d.y+d.height/2:c;if(this._.rt.deg){this.transformations[0]=m.format("rotate({0} {1} {2})",this._.rt.deg,b,c);this.clip&&u(this.clip,{transform:m.format("rotate({0} {1} {2})",-this._.rt.deg,b,
-c)})}else{this.transformations[0]=A;this.clip&&u(this.clip,{transform:A})}u(this.node,{transform:this.transformations[R](O)});return this};t[p].hide=function(){!this.removed&&(this.node.style.display="none");return this};t[p].show=function(){!this.removed&&(this.node.style.display="");return this};t[p].remove=function(){if(!this.removed){ja(this,this.paper);this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=true}};t[p].getBBox=function(){if(this.removed)return this;
-if(this.type=="path")return wa(this.attrs.path);if(this.node.style.display=="none"){this.show();var a=true}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}if(this.type=="text"){b={x:b.x,y:Infinity,width:0,height:0};for(var d=0,f=this.node.getNumberOfChars();d<f;d++){var e=this.node.getExtentOfChar(d);e.y<b.y&&(b.y=e.y);e.y+e.height-b.y>b.height&&(b.height=e.y+e.height-b.y);e.x+e.width-b.x>b.width&&(b.width=e.x+e.width-b.x)}}a&&this.hide();return b};t[p].attr=function(a,b){if(this.removed)return this;
-if(a==null){a={};for(var c in this.attrs)if(this.attrs[y](c))a[c]=this.attrs[c];this._.rt.deg&&(a.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(a.scale=this.scale());a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient;return a}if(b==null&&m.is(a,fa)){if(a=="translation")return za.call(this);if(a=="rotation")return this.rotate();if(a=="scale")return this.scale();if(a==ba&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[a]}if(b==null&&
-m.is(a,V)){b={};c=0;for(var d=a.length;c<d;c++)b[a[c]]=this.attr(a[c]);return b}if(b!=null){c={};c[a]=b;ca(this,c)}else a!=null&&m.is(a,"object")&&ca(this,a);return this};t[p].toFront=function(){if(this.removed)return this;this.node.parentNode[x](this.node);var a=this.paper;a.top!=this&&Ua(this,a);return this};t[p].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);Va(this,this.paper)}return this};
-t[p].insertAfter=function(a){if(this.removed)return this;var b=a.node;b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode[x](this.node);Wa(this,a,this.paper);return this};t[p].insertBefore=function(a){if(this.removed)return this;var b=a.node;b.parentNode.insertBefore(this.node,b);Xa(this,a,this.paper);return this};t[p].blur=function(a){var b=this;if(+a!==0){var c=u("filter"),d=u("feGaussianBlur");b.attrs.blur=a;c.id="r"+(m._id++)[P](36);u(d,{stdDeviation:+a||1.5});c.appendChild(d);
-b.paper.defs.appendChild(c);b._blur=c;u(b.node,{filter:"url(#"+c.id+")"})}else{if(b._blur){b._blur.parentNode.removeChild(b._blur);delete b._blur;delete b.attrs.blur}b.node.removeAttribute("filter")}};var bb=function(a,b,c,d){b=G(b);c=G(c);var f=u("circle");a.canvas&&a.canvas[x](f);a=new t(f,a);a.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"};a.type="circle";u(f,a.attrs);return a},cb=function(a,b,c,d,f,e){b=G(b);c=G(c);var g=u("rect");a.canvas&&a.canvas[x](g);a=new t(g,a);a.attrs={x:b,y:c,width:d,
-height:f,r:e||0,rx:e||0,ry:e||0,fill:"none",stroke:"#000"};a.type="rect";u(g,a.attrs);return a},db=function(a,b,c,d,f){b=G(b);c=G(c);var e=u("ellipse");a.canvas&&a.canvas[x](e);a=new t(e,a);a.attrs={cx:b,cy:c,rx:d,ry:f,fill:"none",stroke:"#000"};a.type="ellipse";u(e,a.attrs);return a},eb=function(a,b,c,d,f,e){var g=u("image");u(g,{x:c,y:d,width:f,height:e,preserveAspectRatio:"none"});g.setAttributeNS(a.xlink,"href",b);a.canvas&&a.canvas[x](g);a=new t(g,a);a.attrs={x:c,y:d,width:f,height:e,src:b};
-a.type="image";return a},fb=function(a,b,c,d){var f=u("text");u(f,{x:b,y:c,"text-anchor":"middle"});a.canvas&&a.canvas[x](f);a=new t(f,a);a.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:ra.font,stroke:"none",fill:"#000"};a.type="text";ca(a,a.attrs);return a},gb=function(a,b){this.width=a||this.width;this.height=b||this.height;this.canvas[X]("width",this.width);this.canvas[X]("height",this.height);return this},Ba=function(){var a=Ta[L](0,arguments),b=a&&a.container,c=a.x,d=a.y,f=a.width;a=a.height;
-if(!b)throw new Error("SVG container not found.");var e=u("svg");c=c||0;d=d||0;f=f||512;a=a||342;u(e,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:f,height:a});if(b==1){e.style.cssText="position:absolute;left:"+c+"px;top:"+d+"px";C.body[x](e)}else b.firstChild?b.insertBefore(e,b.firstChild):b[x](e);b=new H;b.width=f;b.height=a;b.canvas=e;Ha.call(b,b,m.fn);b.clear();return b};H[p].clear=function(){for(var a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null;(this.desc=
-u("desc"))[x](C.createTextNode("Created with Rapha\u00ebl"));a[x](this.desc);a[x](this.defs=u("defs"))};H[p].remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=Ya(a)}}if(m.vml){var hb={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},Ab=/([clmz]),?([^clmz]*)/gi,Bb=/-?[^,\s-]+/g,oa=1000+O+1000,ka=10,pa={path:1,rect:1},Cb=function(a){var b=/[ahqstv]/ig,c=la;D(a).match(b)&&(c=va);b=/[clmz]/g;if(c==la&&!D(a).match(b))return a=D(a)[J](Ab,
-function(i,j,l){var n=[],r=da.call(j)=="m",q=hb[j];l[J](Bb,function(k){if(r&&n[o]==2){q+=n+hb[j=="m"?"l":"L"];n=[]}n[F](G(k*ka))});return q+n});b=c(a);var d;a=[];for(var f=0,e=b[o];f<e;f++){c=b[f];d=da.call(b[f][0]);d=="z"&&(d="x");for(var g=1,h=c[o];g<h;g++)d+=G(c[g]*ka)+(g!=h-1?",":A);a[F](d)}return a[R](O)};m[P]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\u00ebl "+this.version};$a=function(a,b){var c=S("group");c.style.cssText="position:absolute;left:0;top:0;width:"+
-b.width+"px;height:"+b.height+"px";c.coordsize=b.coordsize;c.coordorigin=b.coordorigin;var d=S("shape"),f=d.style;f.width=b.width+"px";f.height=b.height+"px";d.coordsize=oa;d.coordorigin=b.coordorigin;c[x](d);d=new t(d,c,b);f={fill:"none",stroke:"#000"};a&&(f.path=a);d.isAbsolute=true;d.type="path";d.path=[];d.Path=A;ca(d,f);b.canvas[x](c);return d};ca=function(a,b){a.attrs=a.attrs||{};var c=a.node,d=a.attrs,f=c.style,e;e=(b.x!=d.x||b.y!=d.y||b.width!=d.width||b.height!=d.height||b.r!=d.r)&&a.type==
-"rect";var g=a;for(var h in b)if(b[y](h))d[h]=b[h];if(e){d.path=ib(d.x,d.y,d.width,d.height,d.r);a.X=d.x;a.Y=d.y;a.W=d.width;a.H=d.height}b.href&&(c.href=b.href);b.title&&(c.title=b.title);b.target&&(c.target=b.target);b.cursor&&(f.cursor=b.cursor);"blur"in b&&a.blur(b.blur);if(b.path&&a.type=="path"||e)c.path=Cb(d.path);b.rotation!=null&&a.rotate(b.rotation,true);if(b.translation){e=D(b.translation)[I](W);za.call(a,e[0],e[1]);if(a._.rt.cx!=null){a._.rt.cx+=+e[0];a._.rt.cy+=+e[1];a.setBox(a.attrs,
-e[0],e[1])}}if(b.scale){e=D(b.scale)[I](W);a.scale(+e[0]||1,+e[1]||+e[0]||1,+e[2]||null,+e[3]||null)}if("clip-rect"in b){e=D(b["clip-rect"])[I](W);if(e[o]==4){e[2]=+e[2]+ +e[0];e[3]=+e[3]+ +e[1];h=c.clipRect||C.createElement("div");var i=h.style,j=c.parentNode;i.clip=m.format("rect({1}px {2}px {3}px {0}px)",e);if(!c.clipRect){i.position="absolute";i.top=0;i.left=0;i.width=a.paper.width+"px";i.height=a.paper.height+"px";j.parentNode.insertBefore(h,j);h[x](j);c.clipRect=h}}if(!b["clip-rect"])c.clipRect&&
-(c.clipRect.style.clip=A)}if(a.type=="image"&&b.src)c.src=b.src;if(a.type=="image"&&b.opacity){c.filterOpacity=Ea+".Alpha(opacity="+b.opacity*100+")";f.filter=(c.filterMatrix||A)+(c.filterOpacity||A)}b.font&&(f.font=b.font);b["font-family"]&&(f.fontFamily='"'+b["font-family"][I](",")[0][J](/^['"]+|['"]+$/g,A)+'"');b["font-size"]&&(f.fontSize=b["font-size"]);b["font-weight"]&&(f.fontWeight=b["font-weight"]);b["font-style"]&&(f.fontStyle=b["font-style"]);if(b.opacity!=null||b["stroke-width"]!=null||
-b.fill!=null||b.stroke!=null||b["stroke-width"]!=null||b["stroke-opacity"]!=null||b["fill-opacity"]!=null||b["stroke-dasharray"]!=null||b["stroke-miterlimit"]!=null||b["stroke-linejoin"]!=null||b["stroke-linecap"]!=null){c=a.shape||c;f=c.getElementsByTagName(ba)&&c.getElementsByTagName(ba)[0];e=false;!f&&(e=f=S(ba));if("fill-opacity"in b||"opacity"in b){a=((+d["fill-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+m.getRGB(b.fill).o+1||2)-1);a<0&&(a=0);a>1&&(a=1);f.opacity=a}b.fill&&(f.on=true);if(f.on==
-null||b.fill=="none")f.on=false;if(f.on&&b.fill)if(a=b.fill.match(Pa)){f.src=a[1];f.type="tile"}else{f.color=m.getRGB(b.fill).hex;f.src=A;f.type="solid";if(m.getRGB(b.fill).error&&(g.type in{circle:1,ellipse:1}||D(b.fill).charAt()!="r")&&na(g,b.fill)){d.fill="none";d.gradient=b.fill}}e&&c[x](f);f=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0];e=false;!f&&(e=f=S("stroke"));if(b.stroke&&b.stroke!="none"||b["stroke-width"]||b["stroke-opacity"]!=null||b["stroke-dasharray"]||b["stroke-miterlimit"]||
-b["stroke-linejoin"]||b["stroke-linecap"])f.on=true;(b.stroke=="none"||f.on==null||b.stroke==0||b["stroke-width"]==0)&&(f.on=false);a=m.getRGB(b.stroke);f.on&&b.stroke&&(f.color=a.hex);a=((+d["stroke-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+a.o+1||2)-1);h=(z(b["stroke-width"])||1)*0.75;a<0&&(a=0);a>1&&(a=1);b["stroke-width"]==null&&(h=d["stroke-width"]);b["stroke-width"]&&(f.weight=h);h&&h<1&&(a*=h)&&(f.weight=1);f.opacity=a;b["stroke-linejoin"]&&(f.joinstyle=b["stroke-linejoin"]||"miter");f.miterlimit=
-b["stroke-miterlimit"]||8;b["stroke-linecap"]&&(f.endcap=b["stroke-linecap"]=="butt"?"flat":b["stroke-linecap"]=="square"?"square":"round");if(b["stroke-dasharray"]){a={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};f.dashstyle=a[y](b["stroke-dasharray"])?a[b["stroke-dasharray"]]:A}e&&c[x](f)}if(g.type=="text"){f=g.paper.span.style;d.font&&(f.font=d.font);d["font-family"]&&
-(f.fontFamily=d["font-family"]);d["font-size"]&&(f.fontSize=d["font-size"]);d["font-weight"]&&(f.fontWeight=d["font-weight"]);d["font-style"]&&(f.fontStyle=d["font-style"]);g.node.string&&(g.paper.span.innerHTML=D(g.node.string)[J](/</g,"&#60;")[J](/&/g,"&#38;")[J](/\n/g,"<br>"));g.W=d.w=g.paper.span.offsetWidth;g.H=d.h=g.paper.span.offsetHeight;g.X=d.x;g.Y=d.y+G(g.H/2);switch(d["text-anchor"]){case "start":g.node.style["v-text-align"]="left";g.bbx=G(g.W/2);break;case "end":g.node.style["v-text-align"]=
-"right";g.bbx=-G(g.W/2);break;default:g.node.style["v-text-align"]="center";break}}};na=function(a,b){a.attrs=a.attrs||{};var c="linear",d=".5 .5";a.attrs.gradient=b;b=D(b)[J](Za,function(i,j,l){c="radial";if(j&&l){j=z(j);l=z(l);E(j-0.5,2)+E(l-0.5,2)>0.25&&(l=v.sqrt(0.25-E(j-0.5,2))*((l>0.5)*2-1)+0.5);d=j+O+l}return A});b=b[I](/\s*\-\s*/);if(c=="linear"){var f=b.shift();f=-z(f);if(isNaN(f))return null}var e=Sa(b);if(!e)return null;a=a.shape||a.node;b=a.getElementsByTagName(ba)[0]||S(ba);!b.parentNode&&
-a.appendChild(b);if(e[o]){b.on=true;b.method="none";b.color=e[0].color;b.color2=e[e[o]-1].color;a=[];for(var g=0,h=e[o];g<h;g++)e[g].offset&&a[F](e[g].offset+O+e[g].color);b.colors&&(b.colors.value=a[o]?a[R]():"0% "+b.color);if(c=="radial"){b.type="gradientradial";b.focus="100%";b.focussize=d;b.focusposition=d}else{b.type="gradient";b.angle=(270-f)%360}}return 1};t=function(a,b,c){this[0]=a;this.id=m._oid++;this.node=a;a.raphael=this;this.Y=this.X=0;this.attrs={};this.Group=b;this.paper=c;this._=
-{tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!c.bottom&&(c.bottom=this);(this.prev=c.top)&&(c.top.next=this);c.top=this;this.next=null};t[p].rotate=function(a,b,c){if(this.removed)return this;if(a==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][R](O);return this._.rt.deg}a=D(a)[I](W);if(a[o]-1){b=z(a[1]);c=z(a[2])}a=z(a[0]);if(b!=null)this._.rt.deg=a;else this._.rt.deg+=a;c==null&&(b=null);this._.rt.cx=b;this._.rt.cy=c;this.setBox(this.attrs,b,c);this.Group.style.rotation=this._.rt.deg;
-return this};t[p].setBox=function(a,b,c){if(this.removed)return this;var d=this.Group.style,f=this.shape&&this.shape.style||this.node.style;a=a||{};for(var e in a)if(a[y](e))this.attrs[e]=a[e];b=b||this._.rt.cx;c=c||this._.rt.cy;var g=this.attrs,h;switch(this.type){case "circle":a=g.cx-g.r;e=g.cy-g.r;h=g=g.r*2;break;case "ellipse":a=g.cx-g.rx;e=g.cy-g.ry;h=g.rx*2;g=g.ry*2;break;case "image":a=+g.x;e=+g.y;h=g.width||0;g=g.height||0;break;case "text":this.textpath.v=["m",G(g.x),", ",G(g.y-2),"l",G(g.x)+
-1,", ",G(g.y-2)][R](A);a=g.x-G(this.W/2);e=g.y-this.H/2;h=this.W;g=this.H;break;case "rect":case "path":if(this.attrs.path){g=wa(this.attrs.path);a=g.x;e=g.y;h=g.width;g=g.height}else{e=a=0;h=this.paper.width;g=this.paper.height}break;default:e=a=0;h=this.paper.width;g=this.paper.height;break}b=b==null?a+h/2:b;c=c==null?e+g/2:c;b=b-this.paper.width/2;c=c-this.paper.height/2;var i;d.left!=(i=b+"px")&&(d.left=i);d.top!=(i=c+"px")&&(d.top=i);this.X=pa[y](this.type)?-b:a;this.Y=pa[y](this.type)?-c:e;
-this.W=h;this.H=g;if(pa[y](this.type)){f.left!=(i=-b*ka+"px")&&(f.left=i);f.top!=(i=-c*ka+"px")&&(f.top=i)}else if(this.type=="text"){f.left!=(i=-b+"px")&&(f.left=i);f.top!=(i=-c+"px")&&(f.top=i)}else{d.width!=(i=this.paper.width+"px")&&(d.width=i);d.height!=(i=this.paper.height+"px")&&(d.height=i);f.left!=(i=a-b+"px")&&(f.left=i);f.top!=(i=e-c+"px")&&(f.top=i);f.width!=(i=h+"px")&&(f.width=i);f.height!=(i=g+"px")&&(f.height=i)}};t[p].hide=function(){!this.removed&&(this.Group.style.display="none");
-return this};t[p].show=function(){!this.removed&&(this.Group.style.display="block");return this};t[p].getBBox=function(){if(this.removed)return this;if(pa[y](this.type))return wa(this.attrs.path);return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};t[p].remove=function(){if(!this.removed){ja(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 a in this)delete this[a];
-this.removed=true}};t[p].attr=function(a,b){if(this.removed)return this;if(a==null){a={};for(var c in this.attrs)if(this.attrs[y](c))a[c]=this.attrs[c];this._.rt.deg&&(a.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(a.scale=this.scale());a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient;return a}if(b==null&&m.is(a,fa)){if(a=="translation")return za.call(this);if(a=="rotation")return this.rotate();if(a=="scale")return this.scale();if(a==ba&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;
-return this.attrs[a]}if(this.attrs&&b==null&&m.is(a,V)){var d={};c=0;for(b=a[o];c<b;c++)d[a[c]]=this.attr(a[c]);return d}if(b!=null){d={};d[a]=b}b==null&&m.is(a,"object")&&(d=a);if(d){if(d.text&&this.type=="text")this.node.string=d.text;ca(this,d);if(d.gradient&&({circle:1,ellipse:1}[y](this.type)||D(d.gradient).charAt()!="r"))na(this,d.gradient);(!pa[y](this.type)||this._.rt.deg)&&this.setBox(this.attrs)}return this};t[p].toFront=function(){!this.removed&&this.Group.parentNode[x](this.Group);this.paper.top!=
-this&&Ua(this,this.paper);return this};t[p].toBack=function(){if(this.removed)return this;if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);Va(this,this.paper)}return this};t[p].insertAfter=function(a){if(this.removed)return this;a.Group.nextSibling?a.Group.parentNode.insertBefore(this.Group,a.Group.nextSibling):a.Group.parentNode[x](this.Group);Wa(this,a,this.paper);return this};t[p].insertBefore=function(a){if(this.removed)return this;
-a.Group.parentNode.insertBefore(this.Group,a.Group);Xa(this,a,this.paper);return this};var Db=/ progid:\S+Blur\([^\)]+\)/g;t[p].blur=function(a){var b=this.node.runtimeStyle,c=b.filter;c=c.replace(Db,A);if(+a!==0){this.attrs.blur=a;b.filter=c+O+Ea+".Blur(pixelradius="+(+a||1.5)+")";b.margin=Raphael.format("-{0}px 0 0 -{0}px",Math.round(+a||1.5))}else{b.filter=c;b.margin=0;delete this.attrs.blur}};bb=function(a,b,c,d){var f=S("group"),e=S("oval");f.style.cssText="position:absolute;left:0;top:0;width:"+
-a.width+"px;height:"+a.height+"px";f.coordsize=oa;f.coordorigin=a.coordorigin;f[x](e);e=new t(e,f,a);e.type="circle";ca(e,{stroke:"#000",fill:"none"});e.attrs.cx=b;e.attrs.cy=c;e.attrs.r=d;e.setBox({x:b-d,y:c-d,width:d*2,height:d*2});a.canvas[x](f);return e};function ib(a,b,c,d,f){return f?m.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",a+f,b,c-f*2,f,-f,d-f*2,f*2-c,f*2-d):m.format("M{0},{1}l{2},0,0,{3},{4},0z",a,
-b,c,d,-c)}cb=function(a,b,c,d,f,e){var g=ib(b,c,d,f,e);a=a.path(g);var h=a.attrs;a.X=h.x=b;a.Y=h.y=c;a.W=h.width=d;a.H=h.height=f;h.r=e;h.path=g;a.type="rect";return a};db=function(a,b,c,d,f){var e=S("group"),g=S("oval");e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";e.coordsize=oa;e.coordorigin=a.coordorigin;e[x](g);g=new t(g,e,a);g.type="ellipse";ca(g,{stroke:"#000"});g.attrs.cx=b;g.attrs.cy=c;g.attrs.rx=d;g.attrs.ry=f;g.setBox({x:b-d,y:c-f,width:d*2,
-height:f*2});a.canvas[x](e);return g};eb=function(a,b,c,d,f,e){var g=S("group"),h=S("image");g.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";g.coordsize=oa;g.coordorigin=a.coordorigin;h.src=b;g[x](h);h=new t(h,g,a);h.type="image";h.attrs.src=b;h.attrs.x=c;h.attrs.y=d;h.attrs.w=f;h.attrs.h=e;h.setBox({x:c,y:d,width:f,height:e});a.canvas[x](g);return h};fb=function(a,b,c,d){var f=S("group"),e=S("shape"),g=e.style,h=S("path"),i=S("textpath");f.style.cssText=
-"position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";f.coordsize=oa;f.coordorigin=a.coordorigin;h.v=m.format("m{0},{1}l{2},{1}",G(b*10),G(c*10),G(b*10)+1);h.textpathok=true;g.width=a.width;g.height=a.height;i.string=D(d);i.on=true;e[x](i);e[x](h);f[x](e);g=new t(i,f,a);g.shape=e;g.textpath=h;g.type="text";g.attrs.text=d;g.attrs.x=b;g.attrs.y=c;g.attrs.w=1;g.attrs.h=1;ca(g,{font:ra.font,stroke:"none",fill:"#000"});g.setBox();a.canvas[x](f);return g};gb=function(a,b){var c=this.canvas.style;
-a==+a&&(a+="px");b==+b&&(b+="px");c.width=a;c.height=b;c.clip="rect(0 "+a+" "+b+" 0)";return this};var S;C.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!C.namespaces.rvml&&C.namespaces.add("rvml","urn:schemas-microsoft-com:vml");S=function(a){return C.createElement("<rvml:"+a+' class="rvml">')}}catch(Lb){S=function(a){return C.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}Ba=function(){var a=Ta[L](0,arguments),b=a.container,c=a.height,d=a.width,
-f=a.x;a=a.y;if(!b)throw new Error("VML container not found.");var e=new H,g=e.canvas=C.createElement("div"),h=g.style;f=f||0;a=a||0;d=d||512;c=c||342;d==+d&&(d+="px");c==+c&&(c+="px");e.width=1000;e.height=1000;e.coordsize=ka*1000+O+ka*1000;e.coordorigin="0 0";e.span=C.createElement("span");e.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";g[x](e.span);h.cssText=m.format("width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",
-d,c);if(b==1){C.body[x](g);h.left=f+"px";h.top=a+"px";h.position="absolute"}else b.firstChild?b.insertBefore(g,b.firstChild):b[x](g);Ha.call(e,e,m.fn);return e};H[p].clear=function(){this.canvas.innerHTML=A;this.span=C.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[x](this.span);this.bottom=this.top=null};H[p].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=
-Ya(a);return true}}H[p].safari=/^Apple|^Google/.test(Y.navigator.vendor)&&(!(Y.navigator.userAgent.indexOf("Version/4.0")+1)||Y.navigator.platform.slice(0,2)=="iP")?function(){var a=this.rect(-99,-99,this.width+99,this.height+99);Y.setTimeout(function(){a.remove()})}:function(){};function Eb(){this.returnValue=false}function Fb(){return this.originalEvent.preventDefault()}function Gb(){this.cancelBubble=true}function Hb(){return this.originalEvent.stopPropagation()}var Ib=function(){if(C.addEventListener)return function(a,
-b,c,d){var f=Ca&&Da[b]?Da[b]:b;function e(g){if(Ca&&Da[y](b))for(var h=0,i=g.targetTouches&&g.targetTouches.length;h<i;h++)if(g.targetTouches[h].target==a){i=g;g=g.targetTouches[h];g.originalEvent=i;g.preventDefault=Fb;g.stopPropagation=Hb;break}return c.call(d,g)}a.addEventListener(f,e,false);return function(){a.removeEventListener(f,e,false);return true}};else if(C.attachEvent)return function(a,b,c,d){function f(g){g=g||Y.event;g.preventDefault=g.preventDefault||Eb;g.stopPropagation=g.stopPropagation||
-Gb;return c.call(d,g)}a.attachEvent("on"+b,f);function e(){a.detachEvent("on"+b,f);return true}return e}}();for(ia=Oa[o];ia--;)(function(a){m[a]=t[p][a]=function(b){if(m.is(b,"function")){this.events=this.events||[];this.events.push({name:a,f:b,unbind:Ib(this.shape||this.node||C,a,b,this)})}return this};m["un"+a]=t[p]["un"+a]=function(b){for(var c=this.events,d=c[o];d--;)if(c[d].name==a&&c[d].f==b){c[d].unbind();c.splice(d,1);!c.length&&delete this.events;return this}return this}})(Oa[ia]);t[p].hover=
-function(a,b){return this.mouseover(a).mouseout(b)};t[p].unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};t[p].drag=function(a,b,c){this._drag={};var d=this.mousedown(function(g){(g.originalEvent?g.originalEvent:g).preventDefault();this._drag.x=g.clientX;this._drag.y=g.clientY;this._drag.id=g.identifier;b&&b.call(this,g.clientX,g.clientY);Raphael.mousemove(f).mouseup(e)});function f(g){var h=g.clientX,i=g.clientY;if(Ca)for(var j=g.touches.length,l;j--;){l=g.touches[j];if(l.identifier==
-d._drag.id){h=l.clientX;i=l.clientY;(g.originalEvent?g.originalEvent:g).preventDefault();break}}else g.preventDefault();a&&a.call(d,h-d._drag.x,i-d._drag.y,h,i)}function e(){d._drag={};Raphael.unmousemove(f).unmouseup(e);c&&c.call(d)}return this};H[p].circle=function(a,b,c){return bb(this,a||0,b||0,c||0)};H[p].rect=function(a,b,c,d,f){return cb(this,a||0,b||0,c||0,d||0,f||0)};H[p].ellipse=function(a,b,c,d){return db(this,a||0,b||0,c||0,d||0)};H[p].path=function(a){a&&!m.is(a,fa)&&!m.is(a[0],V)&&(a+=
-A);return $a(m.format[L](m,arguments),this)};H[p].image=function(a,b,c,d,f){return eb(this,a||"about:blank",b||0,c||0,d||0,f||0)};H[p].text=function(a,b,c){return fb(this,a||0,b||0,c||A)};H[p].set=function(a){arguments[o]>1&&(a=Array[p].splice.call(arguments,0,arguments[o]));return new $(a)};H[p].setSize=gb;H[p].top=H[p].bottom=null;H[p].raphael=m;function jb(){return this.x+O+this.y}t[p].resetScale=function(){if(this.removed)return this;this._.sx=1;this._.sy=1;this.attrs.scale="1 1"};t[p].scale=
-function(a,b,c,d){if(this.removed)return this;if(a==null&&b==null)return{x:this._.sx,y:this._.sy,toString:jb};b=b||a;!+b&&(b=a);var f,e,g=this.attrs;if(a!=0){var h=this.getBBox(),i=h.x+h.width/2,j=h.y+h.height/2;f=a/this._.sx;e=b/this._.sy;c=+c||c==0?c:i;d=+d||d==0?d:j;h=~~(a/v.abs(a));var l=~~(b/v.abs(b)),n=this.node.style,r=c+(i-c)*f;j=d+(j-d)*e;switch(this.type){case "rect":case "image":var q=g.width*h*f,k=g.height*l*e;this.attr({height:k,r:g.r*aa(h*f,l*e),width:q,x:r-q/2,y:j-k/2});break;case "circle":case "ellipse":this.attr({rx:g.rx*
-h*f,ry:g.ry*l*e,r:g.r*aa(h*f,l*e),cx:r,cy:j});break;case "text":this.attr({x:r,y:j});break;case "path":i=Ga(g.path);for(var s=true,M=0,B=i[o];M<B;M++){var w=i[M],K=qa.call(w[0]);if(!(K=="M"&&s)){s=false;if(K=="A"){w[i[M][o]-2]*=f;w[i[M][o]-1]*=e;w[1]*=h*f;w[2]*=l*e;w[5]=+!(h+l?!+w[5]:+w[5])}else if(K=="H"){K=1;for(var ga=w[o];K<ga;K++)w[K]*=f}else if(K=="V"){K=1;for(ga=w[o];K<ga;K++)w[K]*=e}else{K=1;for(ga=w[o];K<ga;K++)w[K]*=K%2?f:e}}}e=wa(i);f=r-e.x-e.width/2;e=j-e.y-e.height/2;i[0][1]+=f;i[0][2]+=
-e;this.attr({path:i});break}if(this.type in{text:1,image:1}&&(h!=1||l!=1))if(this.transformations){this.transformations[2]="scale("[N](h,",",l,")");this.node[X]("transform",this.transformations[R](O));f=h==-1?-g.x-(q||0):g.x;e=l==-1?-g.y-(k||0):g.y;this.attr({x:f,y:e});g.fx=h-1;g.fy=l-1}else{this.node.filterMatrix=Ea+".Matrix(M11="[N](h,", M12=0, M21=0, M22=",l,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");n.filter=(this.node.filterMatrix||A)+(this.node.filterOpacity||A)}else if(this.transformations){this.transformations[2]=
-A;this.node[X]("transform",this.transformations[R](O));g.fx=0;g.fy=0}else{this.node.filterMatrix=A;n.filter=(this.node.filterMatrix||A)+(this.node.filterOpacity||A)}g.scale=[a,b,c,d][R](O);this._.sx=a;this._.sy=b}return this};t[p].clone=function(){if(this.removed)return null;var a=this.attr();delete a.scale;delete a.translation;return this.paper[this.type]().attr(a)};var kb=U(function(a,b,c,d,f,e,g,h,i){for(var j=0,l,n=0;n<1.001;n+=0.0010){var r=m.findDotsAtSegment(a,b,c,d,f,e,g,h,n);n&&(j+=E(E(l.x-
-r.x,2)+E(l.y-r.y,2),0.5));if(j>=i)return r;l=r}});function Ja(a,b){return function(c,d,f){c=va(c);for(var e,g,h,i,j="",l={},n=0,r=0,q=c.length;r<q;r++){h=c[r];if(h[0]=="M"){e=+h[1];g=+h[2]}else{i=Jb(e,g,h[1],h[2],h[3],h[4],h[5],h[6]);if(n+i>d){if(b&&!l.start){e=kb(e,g,h[1],h[2],h[3],h[4],h[5],h[6],d-n);j+=["C",e.start.x,e.start.y,e.m.x,e.m.y,e.x,e.y];if(f)return j;l.start=j;j=["M",e.x,e.y+"C",e.n.x,e.n.y,e.end.x,e.end.y,h[5],h[6]][R]();n+=i;e=+h[5];g=+h[6];continue}if(!a&&!b){e=kb(e,g,h[1],h[2],h[3],
-h[4],h[5],h[6],d-n);return{x:e.x,y:e.y,alpha:e.alpha}}}n+=i;e=+h[5];g=+h[6]}j+=h}l.end=j;e=a?n:b?l:m.findDotsAtSegment(e,g,h[1],h[2],h[3],h[4],h[5],h[6],1);e.alpha&&(e={x:e.x,y:e.y,alpha:e.alpha});return e}}var Jb=U(function(a,b,c,d,f,e,g,h){for(var i={x:0,y:0},j=0,l=0;l<1.01;l+=0.01){var n=ma(a,b,c,d,f,e,g,h,l);l&&(j+=E(E(i.x-n.x,2)+E(i.y-n.y,2),0.5));i=n}return j}),lb=Ja(1),Aa=Ja(),Ka=Ja(0,1);t[p].getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();
-return lb(this.attrs.path)}};t[p].getPointAtLength=function(a){if(this.type=="path")return Aa(this.attrs.path,a)};t[p].getSubpath=function(a,b){if(this.type=="path"){if(v.abs(this.getTotalLength()-b)<1.0E-6)return Ka(this.attrs.path,a).end;b=Ka(this.attrs.path,b,1);return a?Ka(b,a).end:b}};m.easing_formulas={linear:function(a){return a},"<":function(a){return E(a,3)},">":function(a){return E(a-1,3)+1},"<>":function(a){a*=2;if(a<1)return E(a,3)/2;a-=2;return(E(a,3)+2)/2},backIn:function(a){var b=1.70158;
-return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==0||a==1)return a;var b=0.3,c=b/4;return E(2,-10*a)*v.sin((a-c)*2*v.PI/b)+1},bounce:function(a){var b=7.5625,c=2.75;if(a<1/c)a=b*a*a;else if(a<2/c){a-=1.5/c;a=b*a*a+0.75}else if(a<2.5/c){a-=2.25/c;a=b*a*a+0.9375}else{a-=2.625/c;a=b*a*a+0.984375}return a}};var T={length:0};function mb(){var a=+new Date;for(var b in T)if(b!="length"&&T[y](b)){var c=T[b];if(c.stop||c.el.removed){delete T[b];
-T[o]--}else{var d=a-c.start,f=c.ms,e=c.easing,g=c.from,h=c.diff,i=c.to,j=c.t,l=c.prev||0,n=c.el,r=c.callback,q={},k;if(d<f){r=m.easing_formulas[e]?m.easing_formulas[e](d/f):d/f;for(var s in g)if(g[y](s)){switch(Fa[s]){case "along":k=r*f*h[s];i.back&&(k=i.len-k);e=Aa(i[s],k);n.translate(h.sx-h.x||0,h.sy-h.y||0);h.x=e.x;h.y=e.y;n.translate(e.x-h.sx,e.y-h.sy);i.rot&&n.rotate(h.r+e.alpha,e.x,e.y);break;case Q:k=+g[s]+r*f*h[s];break;case "colour":k="rgb("+[La(G(g[s].r+r*f*h[s].r)),La(G(g[s].g+r*f*h[s].g)),
-La(G(g[s].b+r*f*h[s].b))][R](",")+")";break;case "path":k=[];e=0;for(var M=g[s][o];e<M;e++){k[e]=[g[s][e][0]];for(var B=1,w=g[s][e][o];B<w;B++)k[e][B]=+g[s][e][B]+r*f*h[s][e][B];k[e]=k[e][R](O)}k=k[R](O);break;case "csv":switch(s){case "translation":k=h[s][0]*(d-l);e=h[s][1]*(d-l);j.x+=k;j.y+=e;k=k+O+e;break;case "rotation":k=+g[s][0]+r*f*h[s][0];g[s][1]&&(k+=","+g[s][1]+","+g[s][2]);break;case "scale":k=[+g[s][0]+r*f*h[s][0],+g[s][1]+r*f*h[s][1],2 in i[s]?i[s][2]:A,3 in i[s]?i[s][3]:A][R](O);break;
-case "clip-rect":k=[];for(e=4;e--;)k[e]=+g[s][e]+r*f*h[s][e];break}break}q[s]=k}n.attr(q);n._run&&n._run.call(n)}else{if(i.along){e=Aa(i.along,i.len*!i.back);n.translate(h.sx-(h.x||0)+e.x-h.sx,h.sy-(h.y||0)+e.y-h.sy);i.rot&&n.rotate(h.r+e.alpha,e.x,e.y)}(j.x||j.y)&&n.translate(-j.x,-j.y);i.scale&&(i.scale+=A);n.attr(i);delete T[b];T[o]--;n.in_animation=null;m.is(r,"function")&&r.call(n)}c.prev=d}}m.svg&&n&&n.paper&&n.paper.safari();T[o]&&Y.setTimeout(mb)}function La(a){return Z(aa(a,255),0)}function za(a,
-b){if(a==null)return{x:this._.tx,y:this._.ty,toString:jb};this._.tx+=+a;this._.ty+=+b;switch(this.type){case "circle":case "ellipse":this.attr({cx:+a+this.attrs.cx,cy:+b+this.attrs.cy});break;case "rect":case "image":case "text":this.attr({x:+a+this.attrs.x,y:+b+this.attrs.y});break;case "path":var c=Ga(this.attrs.path);c[0][1]+=+a;c[0][2]+=+b;this.attr({path:c});break}return this}t[p].animateWith=function(a,b,c,d,f){T[a.id]&&(b.start=T[a.id].start);return this.animate(b,c,d,f)};t[p].animateAlong=
-nb();t[p].animateAlongBack=nb(1);function nb(a){return function(b,c,d,f){var e={back:a};m.is(d,"function")?(f=d):(e.rot=d);b&&b.constructor==t&&(b=b.attrs.path);b&&(e.along=b);return this.animate(e,c,f)}}t[p].onAnimation=function(a){this._run=a||0;return this};t[p].animate=function(a,b,c,d){if(m.is(c,"function")||!c)d=c||null;var f={},e={},g={};for(var h in a)if(a[y](h))if(Fa[y](h)){f[h]=this.attr(h);f[h]==null&&(f[h]=ra[h]);e[h]=a[h];switch(Fa[h]){case "along":var i=lb(a[h]),j=Aa(a[h],i*!!a.back),
-l=this.getBBox();g[h]=i/b;g.tx=l.x;g.ty=l.y;g.sx=j.x;g.sy=j.y;e.rot=a.rot;e.back=a.back;e.len=i;a.rot&&(g.r=z(this.rotate())||0);break;case Q:g[h]=(e[h]-f[h])/b;break;case "colour":f[h]=m.getRGB(f[h]);i=m.getRGB(e[h]);g[h]={r:(i.r-f[h].r)/b,g:(i.g-f[h].g)/b,b:(i.b-f[h].b)/b};break;case "path":i=va(f[h],e[h]);f[h]=i[0];j=i[1];g[h]=[];i=0;for(l=f[h][o];i<l;i++){g[h][i]=[0];for(var n=1,r=f[h][i][o];n<r;n++)g[h][i][n]=(j[i][n]-f[h][i][n])/b}break;case "csv":j=D(a[h])[I](W);i=D(f[h])[I](W);switch(h){case "translation":f[h]=
-[0,0];g[h]=[j[0]/b,j[1]/b];break;case "rotation":f[h]=i[1]==j[1]&&i[2]==j[2]?i:[0,j[1],j[2]];g[h]=[(j[0]-f[h][0])/b,0,0];break;case "scale":a[h]=j;f[h]=D(f[h])[I](W);g[h]=[(j[0]-f[h][0])/b,(j[1]-f[h][1])/b,0,0];break;case "clip-rect":f[h]=D(f[h])[I](W);g[h]=[];for(i=4;i--;)g[h][i]=(j[i]-f[h][i])/b;break}e[h]=j}}this.stop();this.in_animation=1;T[this.id]={start:a.start||+new Date,ms:b,easing:c,from:f,diff:g,to:e,el:this,callback:d,t:{x:0,y:0}};++T[o]==1&&mb();return this};t[p].stop=function(){T[this.id]&&
-T[o]--;delete T[this.id];return this};t[p].translate=function(a,b){return this.attr({translation:a+" "+b})};t[p][P]=function(){return"Rapha\u00ebl\u2019s object"};m.ae=T;function $(a){this.items=[];this[o]=0;this.type="set";if(a)for(var b=0,c=a[o];b<c;b++)if(a[b]&&(a[b].constructor==t||a[b].constructor==$)){this[this.items[o]]=this.items[this.items[o]]=a[b];this[o]++}}$[p][F]=function(){for(var a,b,c=0,d=arguments[o];c<d;c++)if((a=arguments[c])&&(a.constructor==t||a.constructor==$)){b=this.items[o];
-this[b]=this.items[b]=a;this[o]++}return this};$[p].pop=function(){delete this[this[o]--];return this.items.pop()};for(var Ma in t[p])if(t[p][y](Ma))$[p][Ma]=function(a){return function(){for(var b=0,c=this.items[o];b<c;b++)this.items[b][a][L](this.items[b],arguments);return this}}(Ma);$[p].attr=function(a,b){if(a&&m.is(a,V)&&m.is(a[0],"object")){b=0;for(var c=a[o];b<c;b++)this.items[b].attr(a[b])}else{c=0;for(var d=this.items[o];c<d;c++)this.items[c].attr(a,b)}return this};$[p].animate=function(a,
-b,c,d){(m.is(c,"function")||!c)&&(d=c||null);var f=this.items[o],e=f,g,h=this,i;d&&(i=function(){!--f&&d.call(h)});c=m.is(c,fa)?c:i;for(g=this.items[--e].animate(a,b,c,i);e--;)this.items[e].animateWith(g,a,b,c,i);return this};$[p].insertAfter=function(a){for(var b=this.items[o];b--;)this.items[b].insertAfter(a);return this};$[p].getBBox=function(){for(var a=[],b=[],c=[],d=[],f=this.items[o];f--;){var e=this.items[f].getBBox();a[F](e.x);b[F](e.y);c[F](e.x+e.width);d[F](e.y+e.height)}a=aa[L](0,a);b=
-aa[L](0,b);return{x:a,y:b,width:Z[L](0,c)-a,height:Z[L](0,d)-b}};$[p].clone=function(a){a=new $;for(var b=0,c=this.items[o];b<c;b++)a[F](this.items[b].clone());return a};m.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)if(a.face[y](d))b.face[d]=a.face[d];if(this.fonts[c])this.fonts[c][F](b);else this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=ea(a.face["units-per-em"],10);for(var f in a.glyphs)if(a.glyphs[y](f)){c=
-a.glyphs[f];b.glyphs[f]={w:c.w,k:{},d:c.d&&"M"+c.d[J](/[mlcxtrv]/g,function(g){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[g]||"M"})+"z"};if(c.k)for(var e in c.k)if(c[y](e))b.glyphs[f].k[e]=c.k[e]}}return a};H[p].getFont=function(a,b,c,d){d=d||"normal";c=c||"normal";b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400;if(m.fonts){var f=m.fonts[a];if(!f){a=new RegExp("(^|\\s)"+a[J](/[^\w\d\s+!~.:_-]/g,A)+"(\\s|$)","i");for(var e in m.fonts)if(m.fonts[y](e))if(a.test(e)){f=m.fonts[e];break}}var g;
-if(f){e=0;for(a=f[o];e<a;e++){g=f[e];if(g.face["font-weight"]==b&&(g.face["font-style"]==c||!g.face["font-style"])&&g.face["font-stretch"]==d)break}}return g}};H[p].print=function(a,b,c,d,f,e){e=e||"middle";var g=this.set(),h=D(c)[I](A),i=0;m.is(d,c)&&(d=this.getFont(d));if(d){c=(f||16)/d.face["units-per-em"];var j=d.face.bbox.split(W);f=+j[0];e=+j[1]+(e=="baseline"?j[3]-j[1]+ +d.face.descent:(j[3]-j[1])/2);j=0;for(var l=h[o];j<l;j++){var n=j&&d.glyphs[h[j-1]]||{},r=d.glyphs[h[j]];i+=j?(n.w||d.w)+
-(n.k&&n.k[h[j]]||0):0;r&&r.d&&g[F](this.path(r.d).attr({fill:"#000",stroke:"none",translation:[i,0]}))}g.scale(c,c,f,e).translate(a-f,b-e)}return g};var Kb=/\{(\d+)\}/g;m.format=function(a,b){var c=m.is(b,V)?[0][N](b):arguments;a&&m.is(a,fa)&&c[o]-1&&(a=a[J](Kb,function(d,f){return c[++f]==null?A:c[f]}));return a||A};m.ninja=function(){Na.was?(Raphael=Na.is):delete Raphael;return m};m.el=t[p];return m}();
\ No newline at end of file
+Raphael=(function(){function aG(){if(aG.is(arguments[0],a2)){var b=arguments[0],d=D[bx](aG,b.splice(0,3+aG.is(b[0],aD))),R=d.set();for(var E=0,S=b[q];E<S;E++){var e=b[E]||{};bk[af](e.type)&&R[h](d[e.type]().attr(e))}return R}return D[bx](aG,arguments)}aG.version="1.5.0";var a=/[, ]+/,bk={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},bi=/\{(\d+)\}/g,bA="prototype",af="hasOwnProperty",Z=document,aN=window,p={was:Object[bA][af].call(aN,"Raphael"),is:aN.Raphael},bu=function(){this.customAttributes={}},aV,bf="appendChild",bx="apply",br="concat",V="createTouch" in Z,aM="",aF=" ",by=String,H="split",P="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[H](aF),bl={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},aT="join",q="length",bC=by[bA].toLowerCase,an=Math,k=an.max,bd=an.min,bg=an.pow,aD="number",ae="string",a2="array",aW="toString",aZ="fill",aQ=Object[bA][aW],bo={},h="push",bv=/^(?=[\da-f]$)/,g=/^url\(['"]?([^\)]+?)['"]?\)$/i,F=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+(?:\s*,\s*[\d\.]+)?)\s*\)|rgba?\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%(?:\s*,\s*[\d\.]+%)?)\s*\)|hsb\(\s*([\d\.]+(?:deg|\xb0)?\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsb\(\s*([\d\.]+(?:deg|\xb0|%)\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hsl\(\s*([\d\.]+(?:deg|\xb0)?\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsl\(\s*([\d\.]+(?:deg|\xb0|%)\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,ao=/^(NaN|-?Infinity)$/,ac=an.round,C="setAttribute",ai=parseFloat,Q=parseInt,a0=" progid:DXImageTransform.Microsoft",bj=by[bA].toUpperCase,o={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},al={along:"along",blur:aD,"clip-rect":"csv",cx:aD,cy:aD,fill:"colour","fill-opacity":aD,"font-size":aD,height:aD,opacity:aD,path:"path",r:aD,rotation:"csv",rx:aD,ry:aD,scale:"csv",stroke:"colour","stroke-opacity":aD,"stroke-width":aD,translation:"csv",width:aD,x:aD,y:aD},bn="replace",a5=/,?([achlmqrstvxz]),?/gi,a8=/\s*,\s*/,l={hs:1,rg:1},ba=/^(from|to|\d+%)$/,aO=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,aE=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,bh=function(e,d){return e.key-d.key};aG.type=(aN.SVGAngle||Z.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");if(aG.type=="VML"){var av=Z.createElement("div"),az;av.innerHTML='<v:shape adj="1"/>';az=av.firstChild;az.style.behavior="url(#default#VML)";if(!(az&&typeof az.adj=="object")){return aG.type=null}av=null}aG.svg=!(aG.vml=aG.type=="VML");bu[bA]=aG[bA];aV=bu[bA];aG._id=0;aG._oid=0;aG.fn={};aG.is=function(d,b){b=bC.call(b);if(b=="finite"){return !ao.test(+d)}return(b=="null"&&d===null)||(b==typeof d)||(b=="object"&&d===Object(d))||(b=="array"&&Array.isArray&&Array.isArray(d))||aQ.call(d).slice(8,-1).toLowerCase()==b};aG.angle=function(E,S,e,R,d,i){if(d==null){var b=E-e,bD=S-R;if(!b&&!bD){return 0}return((b<0)*180+an.atan(-bD/-b)*180/an.PI+360)%360}else{return aG.angle(E,S,d,i)-aG.angle(e,R,d,i)}};aG.snapTo=function(d,E,b){b=b||10;d=[][br](d);var e=d.length;while(e--){if(an.abs(d[e]-E)<=b){return d[e]}}return E};aG.setWindow=function(b){aN=b;Z=aN.document};var a4=function(E){if(aG.vml){var b=/^\s+|\s+$/g;var S;try{var bD=new aN.ActiveXObject("htmlfile");bD.write("<body>");bD.close();S=bD.body}catch(bE){S=aN.createPopup().document.body}var d=S.createTextRange();a4=ay(function(i){try{S.style.color=by(i)[bn](b,aM);var bF=d.queryCommandValue("ForeColor");bF=((bF&255)<<16)|(bF&65280)|((bF&16711680)>>>16);return"#"+("000000"+bF[aW](16)).slice(-6)}catch(bG){return"none"}})}else{var R=Z.createElement("i");R.title="Rapha\xebl Colour Picker";R.style.display="none";Z.body[bf](R);a4=ay(function(e){R.style.color=e;return Z.defaultView.getComputedStyle(R,aM).getPropertyValue("color")})}return a4(E)},aA=function(){return"hsb("+[this.h,this.s,this.b]+")"},L=function(){return"hsl("+[this.h,this.s,this.l]+")"},A=function(){return this.hex};aG.hsb2rgb=function(i,e,d){if(aG.is(i,"object")&&"h" in i&&"s" in i&&"b" in i){d=i.b;e=i.s;i=i.h}return aG.hsl2rgb(i,e,d/2)};aG.hsl2rgb=function(S,bK,e){if(aG.is(S,"object")&&"h" in S&&"s" in S&&"l" in S){e=S.l;bK=S.s;S=S.h}if(S>1||bK>1||e>1){S/=360;bK/=100;e/=100}var bH={},bE=["r","g","b"],bD,bG,R,d,bF,bI;if(!bK){bH={r:e,g:e,b:e}}else{if(e<0.5){bD=e*(1+bK)}else{bD=e+bK-e*bK}bG=2*e-bD;for(var E=0,bJ=bE.length;E<bJ;E++){R=S+1/3*-(E-1);R<0&&R++;R>1&&R--;if(R*6<1){bH[bE[E]]=bG+(bD-bG)*6*R}else{if(R*2<1){bH[bE[E]]=bD}else{if(R*3<2){bH[bE[E]]=bG+(bD-bG)*(2/3-R)*6}else{bH[bE[E]]=bG}}}}}bH.r*=255;bH.g*=255;bH.b*=255;d=(~~bH.r)[aW](16);bF=(~~bH.g)[aW](16);bI=(~~bH.b)[aW](16);d=d[bn](bv,"0");bF=bF[bn](bv,"0");bI=bI[bn](bv,"0");bH.hex="#"+d+bF+bI;bH.toString=A;return bH};aG.rgb2hsb=function(b,d,bD){if(d==null&&aG.is(b,"object")&&"r" in b&&"g" in b&&"b" in b){bD=b.b;d=b.g;b=b.r}if(d==null&&aG.is(b,ae)){var bF=aG.getRGB(b);b=bF.r;d=bF.g;bD=bF.b}if(b>1||d>1||bD>1){b/=255;d/=255;bD/=255}var S=k(b,d,bD),e=bd(b,d,bD),E,i,R=S;if(e==S){return{h:0,s:0,b:S,toString:aA}}else{var bE=(S-e);i=bE/S;if(b==S){E=(d-bD)/bE}else{if(d==S){E=2+((bD-b)/bE)}else{E=4+((b-d)/bE)}}E/=6;E<0&&E++;E>1&&E--}return{h:E,s:i,b:R,toString:aA}};aG.rgb2hsl=function(d,e,S){if(e==null&&aG.is(d,"object")&&"r" in d&&"g" in d&&"b" in d){S=d.b;e=d.g;d=d.r}if(e==null&&aG.is(d,ae)){var bG=aG.getRGB(d);d=bG.r;e=bG.g;S=bG.b}if(d>1||e>1||S>1){d/=255;e/=255;S/=255}var R=k(d,e,S),i=bd(d,e,S),E,bF,b=(R+i)/2,bE;if(i==R){bE={h:0,s:0,l:b}}else{var bD=R-i;bF=b<0.5?bD/(R+i):bD/(2-R-i);if(d==R){E=(e-S)/bD}else{if(e==R){E=2+(S-d)/bD}else{E=4+(d-e)/bD}}E/=6;E<0&&E++;E>1&&E--;bE={h:E,s:bF,l:b}}bE.toString=L;return bE};aG._path2string=function(){return this.join(",")[bn](a5,"$1")};function ay(i,d,b){function e(){var E=Array[bA].slice.call(arguments,0),S=E[aT]("\u25ba"),R=e.cache=e.cache||{},bD=e.count=e.count||[];if(R[af](S)){return b?b(R[S]):R[S]}bD[q]>=1000&&delete R[bD.shift()];bD[h](S);R[S]=i[bx](d,E);return b?b(R[S]):R[S]}return e}aG.getRGB=ay(function(e){if(!e||!!((e=by(e)).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1}}if(e=="none"){return{r:-1,g:-1,b:-1,hex:"none"}}!(l[af](e.substring(0,2))||e.charAt()=="#")&&(e=a4(e));var bD,i,E,bG,S,bH,bE=e.match(F);if(bE){if(bE[2]){bG=Q(bE[2].substring(5),16);E=Q(bE[2].substring(3,5),16);i=Q(bE[2].substring(1,3),16)}if(bE[3]){bG=Q((bH=bE[3].charAt(3))+bH,16);E=Q((bH=bE[3].charAt(2))+bH,16);i=Q((bH=bE[3].charAt(1))+bH,16)}if(bE[4]){bE=bE[4][H](a8);i=ai(bE[0]);E=ai(bE[1]);bG=ai(bE[2]);S=ai(bE[3])}if(bE[5]){bE=bE[5][H](a8);i=ai(bE[0])*2.55;E=ai(bE[1])*2.55;bG=ai(bE[2])*2.55;S=ai(bE[3])}if(bE[6]){bE=bE[6][H](a8);i=ai(bE[0]);E=ai(bE[1]);bG=ai(bE[2]);(bE[0].slice(-3)=="deg"||bE[0].slice(-1)=="\xb0")&&(i/=360);return aG.hsb2rgb(i,E,bG)}if(bE[7]){bE=bE[7][H](a8);i=ai(bE[0])*2.55;E=ai(bE[1])*2.55;bG=ai(bE[2])*2.55;(bE[0].slice(-3)=="deg"||bE[0].slice(-1)=="\xb0")&&(i/=360*2.55);return aG.hsb2rgb(i,E,bG)}if(bE[8]){bE=bE[8][H](a8);i=ai(bE[0]);E=ai(bE[1]);bG=ai(bE[2]);(bE[0].slice(-3)=="deg"||bE[0].slice(-1)=="\xb0")&&(i/=360);return aG.hsl2rgb(i,E,bG)}if(bE[9]){bE=bE[9][H](a8);i=ai(bE[0])*2.55;E=ai(bE[1])*2.55;bG=ai(bE[2])*2.55;(bE[0].slice(-3)=="deg"||bE[0].slice(-1)=="\xb0")&&(i/=360*2.55);return aG.hsl2rgb(i,E,bG)}bE={r:i,g:E,b:bG};var d=(~~i)[aW](16),R=(~~E)[aW](16),bF=(~~bG)[aW](16);d=d[bn](bv,"0");R=R[bn](bv,"0");bF=bF[bn](bv,"0");bE.hex="#"+d+R+bF;isFinite(ai(S))&&(bE.o=S);return bE}return{r:-1,g:-1,b:-1,hex:"none",error:1}},aG);aG.getColor=function(d){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:d||0.75},b=this.hsb2rgb(e.h,e.s,e.b);e.h+=0.075;if(e.h>1){e.h=0;e.s-=0.2;e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})}return b.hex};aG.getColor.reset=function(){delete this.start};aG.parsePathString=ay(function(b){if(!b){return null}var e={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},d=[];if(aG.is(b,a2)&&aG.is(b[0],a2)){d=aP(b)}if(!d[q]){by(b)[bn](aO,function(E,i,bD){var S=[],R=bC.call(i);bD[bn](aE,function(bF,bE){bE&&S[h](+bE)});if(R=="m"&&S[q]>2){d[h]([i][br](S.splice(0,2)));R="l";i=i=="m"?"l":"L"}while(S[q]>=e[R]){d[h]([i][br](S.splice(0,e[R])));if(!e[R]){break}}})}d[aW]=aG._path2string;return d});aG.findDotsAtSegment=function(d,b,bQ,bO,S,E,bE,bD,bK){var bI=1-bK,bH=bg(bI,3)*d+bg(bI,2)*3*bK*bQ+bI*3*bK*bK*S+bg(bK,3)*bE,bF=bg(bI,3)*b+bg(bI,2)*3*bK*bO+bI*3*bK*bK*E+bg(bK,3)*bD,bM=d+2*bK*(bQ-d)+bK*bK*(S-2*bQ+d),bL=b+2*bK*(bO-b)+bK*bK*(E-2*bO+b),bP=bQ+2*bK*(S-bQ)+bK*bK*(bE-2*S+bQ),bN=bO+2*bK*(E-bO)+bK*bK*(bD-2*E+bO),bJ=(1-bK)*d+bK*bQ,bG=(1-bK)*b+bK*bO,i=(1-bK)*S+bK*bE,e=(1-bK)*E+bK*bD,R=(90-an.atan((bM-bP)/(bL-bN))*180/an.PI);(bM>bP||bL<bN)&&(R+=180);return{x:bH,y:bF,m:{x:bM,y:bL},n:{x:bP,y:bN},start:{x:bJ,y:bG},end:{x:i,y:e},alpha:R}};var ah=ay(function(bH){if(!bH){return{x:0,y:0,width:0,height:0}}bH=U(bH);var bE=0,bD=0,E=[],d=[],e;for(var R=0,bG=bH[q];R<bG;R++){e=bH[R];if(e[0]=="M"){bE=e[1];bD=e[2];E[h](bE);d[h](bD)}else{var S=a1(bE,bD,e[1],e[2],e[3],e[4],e[5],e[6]);E=E[br](S.min.x,S.max.x);d=d[br](S.min.y,S.max.y);bE=e[5];bD=e[6]}}var b=bd[bx](0,E),bF=bd[bx](0,d);return{x:b,y:bF,width:k[bx](0,E)-b,height:k[bx](0,d)-bF}}),aP=function(S){var e=[];if(!aG.is(S,a2)||!aG.is(S&&S[0],a2)){S=aG.parsePathString(S)}for(var d=0,E=S[q];d<E;d++){e[d]=[];for(var b=0,R=S[d][q];b<R;b++){e[d][b]=S[d][b]}}e[aW]=aG._path2string;return e},ar=ay(function(E){if(!aG.is(E,a2)||!aG.is(E&&E[0],a2)){E=aG.parsePathString(E)}var bG=[],bI=0,bH=0,bL=0,bK=0,e=0;if(E[0][0]=="M"){bI=E[0][1];bH=E[0][2];bL=bI;bK=bH;e++;bG[h](["M",bI,bH])}for(var bD=e,bM=E[q];bD<bM;bD++){var b=bG[bD]=[],bJ=E[bD];if(bJ[0]!=bC.call(bJ[0])){b[0]=bC.call(bJ[0]);switch(b[0]){case"a":b[1]=bJ[1];b[2]=bJ[2];b[3]=bJ[3];b[4]=bJ[4];b[5]=bJ[5];b[6]=+(bJ[6]-bI).toFixed(3);b[7]=+(bJ[7]-bH).toFixed(3);break;case"v":b[1]=+(bJ[1]-bH).toFixed(3);break;case"m":bL=bJ[1];bK=bJ[2];default:for(var S=1,bE=bJ[q];S<bE;S++){b[S]=+(bJ[S]-((S%2)?bI:bH)).toFixed(3)}}}else{b=bG[bD]=[];if(bJ[0]=="m"){bL=bJ[1]+bI;bK=bJ[2]+bH}for(var R=0,d=bJ[q];R<d;R++){bG[bD][R]=bJ[R]}}var bF=bG[bD][q];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[aW]=aG._path2string;return bG},0,aP),x=ay(function(E){if(!aG.is(E,a2)||!aG.is(E&&E[0],a2)){E=aG.parsePathString(E)}var bF=[],bH=0,bG=0,bK=0,bJ=0,e=0;if(E[0][0]=="M"){bH=+E[0][1];bG=+E[0][2];bK=bH;bJ=bG;e++;bF[0]=["M",bH,bG]}for(var bD=e,bL=E[q];bD<bL;bD++){var b=bF[bD]=[],bI=E[bD];if(bI[0]!=bj.call(bI[0])){b[0]=bj.call(bI[0]);switch(b[0]){case"A":b[1]=bI[1];b[2]=bI[2];b[3]=bI[3];b[4]=bI[4];b[5]=bI[5];b[6]=+(bI[6]+bH);b[7]=+(bI[7]+bG);break;case"V":b[1]=+bI[1]+bG;break;case"H":b[1]=+bI[1]+bH;break;case"M":bK=+bI[1]+bH;bJ=+bI[2]+bG;default:for(var S=1,bE=bI[q];S<bE;S++){b[S]=+bI[S]+((S%2)?bH:bG)}}}else{for(var R=0,d=bI[q];R<d;R++){bF[bD][R]=bI[R]}}switch(b[0]){case"Z":bH=bK;bG=bJ;break;case"H":bH=b[1];break;case"V":bG=b[1];break;case"M":bK=bF[bD][bF[bD][q]-2];bJ=bF[bD][bF[bD][q]-1];default:bH=bF[bD][bF[bD][q]-2];bG=bF[bD][bF[bD][q]-1]}}bF[aW]=aG._path2string;return bF},null,aP),bz=function(d,i,b,e){return[d,i,b,e,b,e]},be=function(d,i,S,E,b,e){var R=1/3,bD=2/3;return[R*d+bD*S,R*i+bD*E,R*b+bD*S,R*e+bD*E,b,e]},Y=function(bL,cg,bU,bS,bM,bG,R,bK,cf,bN){var E=an.PI,bR=E*120/180,b=E/180*(+bM||0),bY=[],bV,cc=ay(function(ch,ck,i){var cj=ch*an.cos(i)-ck*an.sin(i),ci=ch*an.sin(i)+ck*an.cos(i);return{x:cj,y:ci}});if(!bN){bV=cc(bL,cg,-b);bL=bV.x;cg=bV.y;bV=cc(bK,cf,-b);bK=bV.x;cf=bV.y;var d=an.cos(E/180*bM),bI=an.sin(E/180*bM),b0=(bL-bK)/2,bZ=(cg-cf)/2;var ca=(b0*b0)/(bU*bU)+(bZ*bZ)/(bS*bS);if(ca>1){ca=an.sqrt(ca);bU=ca*bU;bS=ca*bS}var e=bU*bU,b3=bS*bS,b5=(bG==R?-1:1)*an.sqrt(an.abs((e*b3-e*bZ*bZ-b3*b0*b0)/(e*bZ*bZ+b3*b0*b0))),bP=b5*bU*bZ/bS+(bL+bK)/2,bO=b5*-bS*b0/bU+(cg+cf)/2,bF=an.asin(((cg-bO)/bS).toFixed(7)),bE=an.asin(((cf-bO)/bS).toFixed(7));bF=bL<bP?E-bF:bF;bE=bK<bP?E-bE:bE;bF<0&&(bF=E*2+bF);bE<0&&(bE=E*2+bE);if(R&&bF>bE){bF=bF-E*2}if(!R&&bE>bF){bE=bE-E*2}}else{bF=bN[0];bE=bN[1];bP=bN[2];bO=bN[3]}var bJ=bE-bF;if(an.abs(bJ)>bR){var bQ=bE,bT=bK,bH=cf;bE=bF+bR*(R&&bE>bF?1:-1);bK=bP+bU*an.cos(bE);cf=bO+bS*an.sin(bE);bY=Y(bK,cf,bU,bS,bM,0,R,bT,bH,[bE,bQ,bP,bO])}bJ=bE-bF;var bD=an.cos(bF),ce=an.sin(bF),S=an.cos(bE),cd=an.sin(bE),b1=an.tan(bJ/4),b4=4/3*bU*b1,b2=4/3*bS*b1,cb=[bL,cg],b9=[bL+b4*ce,cg-b2*bD],b8=[bK+b4*cd,cf-b2*S],b6=[bK,cf];b9[0]=2*cb[0]-b9[0];b9[1]=2*cb[1]-b9[1];if(bN){return[b9,b8,b6][br](bY)}else{bY=[b9,b8,b6][br](bY)[aT]()[H](",");var bW=[];for(var b7=0,bX=bY[q];b7<bX;b7++){bW[b7]=b7%2?cc(bY[b7-1],bY[b7],b).y:cc(bY[b7],bY[b7+1],b).x}return bW}},ab=function(d,b,i,e,bE,bD,S,R,bF){var E=1-bF;return{x:bg(E,3)*d+bg(E,2)*3*bF*i+E*3*bF*bF*bE+bg(bF,3)*S,y:bg(E,3)*b+bg(E,2)*3*bF*e+E*3*bF*bF*bD+bg(bF,3)*R}},a1=ay(function(i,d,R,E,bM,bL,bI,bF){var bK=(bM-2*R+i)-(bI-2*bM+R),bH=2*(R-i)-2*(bM-R),bE=i-R,bD=(-bH+an.sqrt(bH*bH-4*bK*bE))/2/bK,S=(-bH-an.sqrt(bH*bH-4*bK*bE))/2/bK,bG=[d,bF],bJ=[i,bI],e;an.abs(bD)>"1e12"&&(bD=0.5);an.abs(S)>"1e12"&&(S=0.5);if(bD>0&&bD<1){e=ab(i,d,R,E,bM,bL,bI,bF,bD);bJ[h](e.x);bG[h](e.y)}if(S>0&&S<1){e=ab(i,d,R,E,bM,bL,bI,bF,S);bJ[h](e.x);bG[h](e.y)}bK=(bL-2*E+d)-(bF-2*bL+E);bH=2*(E-d)-2*(bL-E);bE=d-E;bD=(-bH+an.sqrt(bH*bH-4*bK*bE))/2/bK;S=(-bH-an.sqrt(bH*bH-4*bK*bE))/2/bK;an.abs(bD)>"1e12"&&(bD=0.5);an.abs(S)>"1e12"&&(S=0.5);if(bD>0&&bD<1){e=ab(i,d,R,E,bM,bL,bI,bF,bD);bJ[h](e.x);bG[h](e.y)}if(S>0&&S<1){e=ab(i,d,R,E,bM,bL,bI,bF,S);bJ[h](e.x);bG[h](e.y)}return{min:{x:bd[bx](0,bJ),y:bd[bx](0,bG)},max:{x:k[bx](0,bJ),y:k[bx](0,bG)}}}),U=ay(function(bL,bG){var E=x(bL),bH=bG&&x(bG),bI={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},S=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"][br](Y[bx](0,[bN.x,bN.y][br](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][br](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"][br](be(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"][br](be(bN.x,bN.y,bM[1],bM[2],bM[3],bM[4]));break;case"L":bM=["C"][br](bz(bN.x,bN.y,bM[1],bM[2]));break;case"H":bM=["C"][br](bz(bN.x,bN.y,bM[1],bN.y));break;case"V":bM=["C"][br](bz(bN.x,bN.y,bN.x,bM[1]));break;case"Z":bM=["C"][br](bz(bN.x,bN.y,bN.X,bN.Y));break}return bM},d=function(bM,bN){if(bM[bN][q]>7){bM[bN].shift();var bO=bM[bN];while(bO[q]){bM.splice(bN++,0,["C"][br](bO.splice(0,6)))}bM.splice(bN,1);bJ=k(E[q],bH&&bH[q]||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=k(E[q],bH&&bH[q]||0)}};for(var bE=0,bJ=k(E[q],bH&&bH[q]||0);bE<bJ;bE++){E[bE]=S(E[bE],bI);d(E,bE);bH&&(bH[bE]=S(bH[bE],b));bH&&d(bH,bE);e(E,bH,bI,b,bE);e(bH,E,b,bI,bE);var bD=E[bE],bK=bH&&bH[bE],R=bD[q],bF=bH&&bK[q];bI.x=bD[R-2];bI.y=bD[R-1];bI.bx=ai(bD[R-4])||bI.x;bI.by=ai(bD[R-3])||bI.y;b.bx=bH&&(ai(bK[bF-4])||b.x);b.by=bH&&(ai(bK[bF-3])||b.y);b.x=bH&&bK[bF-2];b.y=bH&&bK[bF-1]}return bH?[E,bH]:E},null,aP),v=ay(function(bG){var bF=[];for(var S=0,bH=bG[q];S<bH;S++){var b={},bE=bG[S].match(/^([^:]*):?([\d\.]*)/);b.color=aG.getRGB(bE[1]);if(b.color.error){return null}b.color=b.color.hex;bE[2]&&(b.offset=bE[2]+"%");bF[h](b)}for(S=1,bH=bF[q]-1;S<bH;S++){if(!bF[S].offset){var e=ai(bF[S-1].offset||0),E=0;for(var R=S+1;R<bH;R++){if(bF[R].offset){E=bF[R].offset;break}}if(!E){E=100;R=bH}E=ai(E);var bD=(E-e)/(R-S+1);for(;S<R;S++){e+=bD;bF[S].offset=e+"%"}}}return bF}),aH=function(b,E,e,i){var d;if(aG.is(b,ae)||aG.is(b,"object")){d=aG.is(b,ae)?Z.getElementById(b):b;if(d.tagName){if(E==null){return{container:d,width:d.style.pixelWidth||d.offsetWidth,height:d.style.pixelHeight||d.offsetHeight}}else{return{container:d,width:E,height:e}}}}else{return{container:1,x:b,y:E,width:e,height:i}}},a9=function(b,e){var d=this;for(var i in e){if(e[af](i)&&!(i in b)){switch(typeof e[i]){case"function":(function(E){b[i]=b===d?E:function(){return E[bx](d,arguments)}})(e[i]);break;case"object":b[i]=b[i]||{};a9.call(this,b[i],e[i]);break;default:b[i]=e[i];break}}}},aC=function(b,d){b==d.top&&(d.top=b.prev);b==d.bottom&&(d.bottom=b.next);b.next&&(b.next.prev=b.prev);b.prev&&(b.prev.next=b.next)},ak=function(b,d){if(d.top===b){return}aC(b,d);b.next=null;b.prev=d.top;d.top.next=b;d.top=b},n=function(b,d){if(d.bottom===b){return}aC(b,d);b.next=d.bottom;b.prev=null;d.bottom.prev=b;d.bottom=b},I=function(d,b,e){aC(d,e);b==e.top&&(e.top=d);b.next&&(b.next.prev=d);d.next=b.next;d.prev=b;b.next=d},aJ=function(d,b,e){aC(d,e);b==e.bottom&&(e.bottom=d);b.prev&&(b.prev.next=d);d.prev=b.prev;b.prev=d;d.next=b},y=function(b){return function(){throw new Error("Rapha\xebl: you are calling to method \u201c"+b+"\u201d of removed object")}},aL=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;aG.pathToRelative=ar;if(aG.svg){aV.svgns="http://www.w3.org/2000/svg";aV.xlink="http://www.w3.org/1999/xlink";ac=function(b){return +b+(~~b===b)*0.5};var bc=function(e,b){if(b){for(var d in b){if(b[af](d)){e[C](d,by(b[d]))}}}else{e=Z.createElementNS(aV.svgns,e);e.style.webkitTapHighlightColor="rgba(0,0,0,0)";return e}};aG[aW]=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var w=function(b,i){var d=bc("path");i.canvas&&i.canvas[bf](d);var e=new aR(d,i);e.type="path";am(e,{fill:"none",stroke:"#000",path:b});return e};var f=function(E,bK,b){var bH="linear",bE=0.5,S=0.5,bM=E.style;bK=by(bK)[bn](aL,function(bO,i,bP){bH="radial";if(i&&bP){bE=ai(i);S=ai(bP);var bN=((S>0.5)*2-1);bg(bE-0.5,2)+bg(S-0.5,2)>0.25&&(S=an.sqrt(0.25-bg(bE-0.5,2))*bN+0.5)&&S!=0.5&&(S=S.toFixed(5)-0.00001*bN)}return aM});bK=bK[H](/\s*\-\s*/);if(bH=="linear"){var bD=bK.shift();bD=-ai(bD);if(isNaN(bD)){return null}var R=[0,0,an.cos(bD*an.PI/180),an.sin(bD*an.PI/180)],bJ=1/(k(an.abs(R[2]),an.abs(R[3]))||1);R[2]*=bJ;R[3]*=bJ;if(R[2]<0){R[0]=-R[2];R[2]=0}if(R[3]<0){R[1]=-R[3];R[3]=0}}var bG=v(bK);if(!bG){return null}var d=E.getAttribute(aZ);d=d.match(/^url\(#(.*)\)$/);d&&b.defs.removeChild(Z.getElementById(d[1]));var e=bc(bH+"Gradient");e.id="r"+(aG._id++)[aW](36);bc(e,bH=="radial"?{fx:bE,fy:S}:{x1:R[0],y1:R[1],x2:R[2],y2:R[3]});b.defs[bf](e);for(var bF=0,bL=bG[q];bF<bL;bF++){var bI=bc("stop");bc(bI,{offset:bG[bF].offset?bG[bF].offset:!bF?"0%":"100%","stop-color":bG[bF].color||"#fff"});e[bf](bI)}bc(E,{fill:"url(#"+e.id+")",opacity:1,"fill-opacity":1});bM.fill=aM;bM.opacity=1;bM.fillOpacity=1;return 1};var aa=function(d){var b=d.getBBox();bc(d.pattern,{patternTransform:aG.format("translate({0},{1})",b.x,b.y)})};var am=function(bJ,bS){var bM={"":[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]},bO=bJ.node,bK=bJ.attrs,bG=bJ.rotate(),S=function(bZ,bY){bY=bM[bC.call(bY)];if(bY){var bW=bZ.attrs["stroke-width"]||"1",bU={round:bW,square:bW,butt:0}[bZ.attrs["stroke-linecap"]||bS["stroke-linecap"]]||0,bX=[];var bV=bY[q];while(bV--){bX[bV]=bY[bV]*bW+((bV%2)?1:-1)*bU}bc(bO,{"stroke-dasharray":bX[aT](",")})}};bS[af]("rotation")&&(bG=bS.rotation);var bF=by(bG)[H](a);if(!(bF.length-1)){bF=null}else{bF[1]=+bF[1];bF[2]=+bF[2]}ai(bG)&&bJ.rotate(0,true);for(var bN in bS){if(bS[af](bN)){if(!o[af](bN)){continue}var bL=bS[bN];bK[bN]=bL;switch(bN){case"blur":bJ.blur(bL);break;case"rotation":bJ.rotate(bL,true);break;case"href":case"title":case"target":var bQ=bO.parentNode;if(bC.call(bQ.tagName)!="a"){var E=bc("a");bQ.insertBefore(E,bO);E[bf](bO);bQ=E}if(bN=="target"&&bL=="blank"){bQ.setAttributeNS(bJ.paper.xlink,"show","new")}else{bQ.setAttributeNS(bJ.paper.xlink,bN,bL)}break;case"cursor":bO.style.cursor=bL;break;case"clip-rect":var d=by(bL)[H](a);if(d[q]==4){bJ.clip&&bJ.clip.parentNode.parentNode.removeChild(bJ.clip.parentNode);var e=bc("clipPath"),bP=bc("rect");e.id="r"+(aG._id++)[aW](36);bc(bP,{x:d[0],y:d[1],width:d[2],height:d[3]});e[bf](bP);bJ.paper.defs[bf](e);bc(bO,{"clip-path":"url(#"+e.id+")"});bJ.clip=bP}if(!bL){var bR=Z.getElementById(bO.getAttribute("clip-path")[bn](/(^url\(#|\)$)/g,aM));bR&&bR.parentNode.removeChild(bR);bc(bO,{"clip-path":aM});delete bJ.clip}break;case"path":if(bJ.type=="path"){bc(bO,{d:bL?bK.path=x(bL):"M0,0"})}break;case"width":bO[C](bN,bL);if(bK.fx){bN="x";bL=bK.x}else{break}case"x":if(bK.fx){bL=-bK.x-(bK.width||0)}case"rx":if(bN=="rx"&&bJ.type=="rect"){break}case"cx":bF&&(bN=="x"||bN=="cx")&&(bF[1]+=bL-bK[bN]);bO[C](bN,bL);bJ.pattern&&aa(bJ);break;case"height":bO[C](bN,bL);if(bK.fy){bN="y";bL=bK.y}else{break}case"y":if(bK.fy){bL=-bK.y-(bK.height||0)}case"ry":if(bN=="ry"&&bJ.type=="rect"){break}case"cy":bF&&(bN=="y"||bN=="cy")&&(bF[2]+=bL-bK[bN]);bO[C](bN,bL);bJ.pattern&&aa(bJ);break;case"r":if(bJ.type=="rect"){bc(bO,{rx:bL,ry:bL})}else{bO[C](bN,bL)}break;case"src":if(bJ.type=="image"){bO.setAttributeNS(bJ.paper.xlink,"href",bL)}break;case"stroke-width":bO.style.strokeWidth=bL;bO[C](bN,bL);if(bK["stroke-dasharray"]){S(bJ,bK["stroke-dasharray"])}break;case"stroke-dasharray":S(bJ,bL);break;case"translation":var bD=by(bL)[H](a);bD[0]=+bD[0]||0;bD[1]=+bD[1]||0;if(bF){bF[1]+=bD[0];bF[2]+=bD[1]}z.call(bJ,bD[0],bD[1]);break;case"scale":bD=by(bL)[H](a);bJ.scale(+bD[0]||1,+bD[1]||+bD[0]||1,isNaN(ai(bD[2]))?null:+bD[2],isNaN(ai(bD[3]))?null:+bD[3]);break;case aZ:var R=by(bL).match(g);if(R){e=bc("pattern");var bI=bc("image");e.id="r"+(aG._id++)[aW](36);bc(e,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});bc(bI,{x:0,y:0});bI.setAttributeNS(bJ.paper.xlink,"href",R[1]);e[bf](bI);var bT=Z.createElement("img");bT.style.cssText="position:absolute;left:-9999em;top-9999em";bT.onload=function(){bc(e,{width:this.offsetWidth,height:this.offsetHeight});bc(bI,{width:this.offsetWidth,height:this.offsetHeight});Z.body.removeChild(this);bJ.paper.safari()};Z.body[bf](bT);bT.src=R[1];bJ.paper.defs[bf](e);bO.style.fill="url(#"+e.id+")";bc(bO,{fill:"url(#"+e.id+")"});bJ.pattern=e;bJ.pattern&&aa(bJ);break}var i=aG.getRGB(bL);if(!i.error){delete bS.gradient;delete bK.gradient;!aG.is(bK.opacity,"undefined")&&aG.is(bS.opacity,"undefined")&&bc(bO,{opacity:bK.opacity});!aG.is(bK["fill-opacity"],"undefined")&&aG.is(bS["fill-opacity"],"undefined")&&bc(bO,{"fill-opacity":bK["fill-opacity"]})}else{if((({circle:1,ellipse:1})[af](bJ.type)||by(bL).charAt()!="r")&&f(bO,bL,bJ.paper)){bK.gradient=bL;bK.fill="none";break}}i[af]("o")&&bc(bO,{"fill-opacity":i.o>1?i.o/100:i.o});case"stroke":i=aG.getRGB(bL);bO[C](bN,i.hex);bN=="stroke"&&i[af]("o")&&bc(bO,{"stroke-opacity":i.o>1?i.o/100:i.o});break;case"gradient":(({circle:1,ellipse:1})[af](bJ.type)||by(bL).charAt()!="r")&&f(bO,bL,bJ.paper);break;case"opacity":case"fill-opacity":if(bK.gradient){var b=Z.getElementById(bO.getAttribute(aZ)[bn](/^url\(#|\)$/g,aM));if(b){var bE=b.getElementsByTagName("stop");bE[bE[q]-1][C]("stop-opacity",bL)}break}default:bN=="font-size"&&(bL=Q(bL,10)+"px");var bH=bN[bn](/(\-.)/g,function(bU){return bj.call(bU.substring(1))});bO.style[bH]=bL;bO[C](bN,bL);break}}}O(bJ,bS);if(bF){bJ.rotate(bF.join(aF))}else{ai(bG)&&bJ.rotate(bG,true)}};var m=1.2,O=function(b,E){if(b.type!="text"||!(E[af]("text")||E[af]("font")||E[af]("font-size")||E[af]("x")||E[af]("y"))){return}var bF=b.attrs,d=b.node,bH=d.firstChild?Q(Z.defaultView.getComputedStyle(d.firstChild,aM).getPropertyValue("font-size"),10):10;if(E[af]("text")){bF.text=E.text;while(d.firstChild){d.removeChild(d.firstChild)}var e=by(E.text)[H]("\n");for(var R=0,bG=e[q];R<bG;R++){if(e[R]){var bD=bc("tspan");R&&bc(bD,{dy:bH*m,x:bF.x});bD[bf](Z.createTextNode(e[R]));d[bf](bD)}}}else{e=d.getElementsByTagName("tspan");for(R=0,bG=e[q];R<bG;R++){R&&bc(e[R],{dy:bH*m,x:bF.x})}}bc(d,{y:bF.y});var S=b.getBBox(),bE=bF.y-(S.y+S.height/2);bE&&isFinite(bE)&&bc(d,{y:bF.y+bE})},aR=function(d,b){var i=0,e=0;this[0]=d;this.id=aG._oid++;this.node=d;d.raphael=this;this.paper=b;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1};!b.bottom&&(b.bottom=this);this.prev=b.top;b.top&&(b.top.next=this);b.top=this;this.next=null};var a7=aR[bA];aR[bA].rotate=function(d,b,i){if(this.removed){return this}if(d==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aT](aF)}return this._.rt.deg}var e=this.getBBox();d=by(d)[H](a);if(d[q]-1){b=ai(d[1]);i=ai(d[2])}d=ai(d[0]);if(b!=null&&b!==false){this._.rt.deg=d}else{this._.rt.deg+=d}(i==null)&&(b=null);this._.rt.cx=b;this._.rt.cy=i;b=b==null?e.x+e.width/2:b;i=i==null?e.y+e.height/2:i;if(this._.rt.deg){this.transformations[0]=aG.format("rotate({0} {1} {2})",this._.rt.deg,b,i);this.clip&&bc(this.clip,{transform:aG.format("rotate({0} {1} {2})",-this._.rt.deg,b,i)})}else{this.transformations[0]=aM;this.clip&&bc(this.clip,{transform:aM})}bc(this.node,{transform:this.transformations[aT](aF)});return this};aR[bA].hide=function(){!this.removed&&(this.node.style.display="none");return this};aR[bA].show=function(){!this.removed&&(this.node.style.display="");return this};aR[bA].remove=function(){if(this.removed){return}aC(this,this.paper);this.node.parentNode.removeChild(this.node);for(var b in this){delete this[b]}this.removed=true};aR[bA].getBBox=function(){if(this.removed){return this}if(this.type=="path"){return ah(this.attrs.path)}if(this.node.style.display=="none"){this.show();var d=true}var bD={};try{bD=this.node.getBBox()}catch(R){}finally{bD=bD||{}}if(this.type=="text"){bD={x:bD.x,y:Infinity,width:0,height:0};for(var b=0,E=this.node.getNumberOfChars();b<E;b++){var S=this.node.getExtentOfChar(b);(S.y<bD.y)&&(bD.y=S.y);(S.y+S.height-bD.y>bD.height)&&(bD.height=S.y+S.height-bD.y);(S.x+S.width-bD.x>bD.width)&&(bD.width=S.x+S.width-bD.x)}}d&&this.hide();return bD};aR[bA].attr=function(b,bF){if(this.removed){return this}if(b==null){var bE={};for(var R in this.attrs){if(this.attrs[af](R)){bE[R]=this.attrs[R]}}this._.rt.deg&&(bE.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(bE.scale=this.scale());bE.gradient&&bE.fill=="none"&&(bE.fill=bE.gradient)&&delete bE.gradient;return bE}if(bF==null&&aG.is(b,ae)){if(b=="translation"){return z.call(this)}if(b=="rotation"){return this.rotate()}if(b=="scale"){return this.scale()}if(b==aZ&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient}return this.attrs[b]}if(bF==null&&aG.is(b,a2)){var bH={};for(var E=0,S=b.length;E<S;E++){bH[b[E]]=this.attr(b[E])}return bH}if(bF!=null){var d={};d[b]=bF}else{if(b!=null&&aG.is(b,"object")){d=b}}for(var bG in this.paper.customAttributes){if(this.paper.customAttributes[af](bG)&&d[af](bG)&&aG.is(this.paper.customAttributes[bG],"function")){var bD=this.paper.customAttributes[bG].apply(this,[][br](d[bG]));this.attrs[bG]=d[bG];for(var e in bD){if(bD[af](e)){d[e]=bD[e]}}}}am(this,d);return this};aR[bA].toFront=function(){if(this.removed){return this}this.node.parentNode[bf](this.node);var b=this.paper;b.top!=this&&ak(this,b);return this};aR[bA].toBack=function(){if(this.removed){return this}if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);n(this,this.paper);var b=this.paper}return this};aR[bA].insertAfter=function(b){if(this.removed){return this}var d=b.node||b[b.length-1].node;if(d.nextSibling){d.parentNode.insertBefore(this.node,d.nextSibling)}else{d.parentNode[bf](this.node)}I(this,b,this.paper);return this};aR[bA].insertBefore=function(b){if(this.removed){return this}var d=b.node||b[0].node;d.parentNode.insertBefore(this.node,d);aJ(this,b,this.paper);return this};aR[bA].blur=function(d){var b=this;if(+d!==0){var e=bc("filter"),i=bc("feGaussianBlur");b.attrs.blur=d;e.id="r"+(aG._id++)[aW](36);bc(i,{stdDeviation:+d||1.5});e.appendChild(i);b.paper.defs.appendChild(e);b._blur=e;bc(b.node,{filter:"url(#"+e.id+")"})}else{if(b._blur){b._blur.parentNode.removeChild(b._blur);delete b._blur;delete b.attrs.blur}b.node.removeAttribute("filter")}};var ad=function(d,b,R,E){var i=bc("circle");d.canvas&&d.canvas[bf](i);var e=new aR(i,d);e.attrs={cx:b,cy:R,r:E,fill:"none",stroke:"#000"};e.type="circle";bc(i,e.attrs);return e},a6=function(e,b,bD,d,R,S){var E=bc("rect");e.canvas&&e.canvas[bf](E);var i=new aR(E,e);i.attrs={x:b,y:bD,width:d,height:R,r:S||0,rx:S||0,ry:S||0,fill:"none",stroke:"#000"};i.type="rect";bc(E,i.attrs);return i},ax=function(d,b,S,R,E){var i=bc("ellipse");d.canvas&&d.canvas[bf](i);var e=new aR(i,d);e.attrs={cx:b,cy:S,rx:R,ry:E,fill:"none",stroke:"#000"};e.type="ellipse";bc(i,e.attrs);return e},u=function(e,S,b,bD,d,R){var E=bc("image");bc(E,{x:b,y:bD,width:d,height:R,preserveAspectRatio:"none"});E.setAttributeNS(e.xlink,"href",S);e.canvas&&e.canvas[bf](E);var i=new aR(E,e);i.attrs={x:b,y:bD,width:d,height:R,src:S};i.type="image";return i},aj=function(d,b,R,E){var i=bc("text");bc(i,{x:b,y:R,"text-anchor":"middle"});d.canvas&&d.canvas[bf](i);var e=new aR(i,d);e.attrs={x:b,y:R,"text-anchor":"middle",text:E,font:o.font,stroke:"none",fill:"#000"};e.type="text";am(e,e.attrs);return e},bw=function(d,b){this.width=d||this.width;this.height=b||this.height;this.canvas[C]("width",this.width);this.canvas[C]("height",this.height);return this},D=function(){var i=aH[bx](0,arguments),e=i&&i.container,d=i.x,S=i.y,E=i.width,b=i.height;if(!e){throw new Error("SVG container not found.")}var R=bc("svg");d=d||0;S=S||0;E=E||512;b=b||342;bc(R,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:E,height:b});if(e==1){R.style.cssText="position:absolute;left:"+d+"px;top:"+S+"px";Z.body[bf](R)}else{if(e.firstChild){e.insertBefore(R,e.firstChild)}else{e[bf](R)}}e=new bu;e.width=E;e.height=b;e.canvas=R;a9.call(e,e,aG.fn);e.clear();return e};aV.clear=function(){var b=this.canvas;while(b.firstChild){b.removeChild(b.firstChild)}this.bottom=this.top=null;(this.desc=bc("desc"))[bf](Z.createTextNode("Created with Rapha\xebl"));b[bf](this.desc);b[bf](this.defs=bc("defs"))};aV.remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this){this[b]=y(b)}}}if(aG.vml){var M={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},aK=/([clmz]),?([^clmz]*)/gi,bs=/ progid:\S+Blur\([^\)]+\)/g,bB=/-?[^,\s-]+/g,aU=1000+aF+1000,t=10,r={path:1,rect:1},bb=function(bH){var bE=/[ahqstv]/ig,e=x;by(bH).match(bE)&&(e=U);bE=/[clmz]/g;if(e==x&&!by(bH).match(bE)){var bD=by(bH)[bn](aK,function(bK,bM,bI){var bL=[],i=bC.call(bM)=="m",bJ=M[bM];bI[bn](bB,function(bN){if(i&&bL[q]==2){bJ+=bL+M[bM=="m"?"l":"L"];bL=[]}bL[h](ac(bN*t))});return bJ+bL});return bD}var bF=e(bH),d,b;bD=[];for(var R=0,bG=bF[q];R<bG;R++){d=bF[R];b=bC.call(bF[R][0]);b=="z"&&(b="x");for(var E=1,S=d[q];E<S;E++){b+=ac(d[E]*t)+(E!=S-1?",":aM)}bD[h](b)}return bD[aT](aF)};aG[aW]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};w=function(e,d){var R=aw("group");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;var E=aw("shape"),i=E.style;i.width=d.width+"px";i.height=d.height+"px";E.coordsize=aU;E.coordorigin=d.coordorigin;R[bf](E);var S=new aR(E,R,d),b={fill:"none",stroke:"#000"};e&&(b.path=e);S.type="path";S.path=[];S.Path=aM;am(S,b);d.canvas[bf](R);return S};am=function(bF,bM){bF.attrs=bF.attrs||{};var bJ=bF.node,bN=bF.attrs,S=bJ.style,i,bL=(bM.x!=bN.x||bM.y!=bN.y||bM.width!=bN.width||bM.height!=bN.height||bM.r!=bN.r)&&bF.type=="rect",bR=bF;for(var bD in bM){if(bM[af](bD)){bN[bD]=bM[bD]}}if(bL){bN.path=aq(bN.x,bN.y,bN.width,bN.height,bN.r);bF.X=bN.x;bF.Y=bN.y;bF.W=bN.width;bF.H=bN.height}bM.href&&(bJ.href=bM.href);bM.title&&(bJ.title=bM.title);bM.target&&(bJ.target=bM.target);bM.cursor&&(S.cursor=bM.cursor);"blur" in bM&&bF.blur(bM.blur);if(bM.path&&bF.type=="path"||bL){bJ.path=bb(bN.path)}if(bM.rotation!=null){bF.rotate(bM.rotation,true)}if(bM.translation){i=by(bM.translation)[H](a);z.call(bF,i[0],i[1]);if(bF._.rt.cx!=null){bF._.rt.cx+=+i[0];bF._.rt.cy+=+i[1];bF.setBox(bF.attrs,i[0],i[1])}}if(bM.scale){i=by(bM.scale)[H](a);bF.scale(+i[0]||1,+i[1]||+i[0]||1,+i[2]||null,+i[3]||null)}if("clip-rect" in bM){var b=by(bM["clip-rect"])[H](a);if(b[q]==4){b[2]=+b[2]+(+b[0]);b[3]=+b[3]+(+b[1]);var bE=bJ.clipRect||Z.createElement("div"),bQ=bE.style,R=bJ.parentNode;bQ.clip=aG.format("rect({1}px {2}px {3}px {0}px)",b);if(!bJ.clipRect){bQ.position="absolute";bQ.top=0;bQ.left=0;bQ.width=bF.paper.width+"px";bQ.height=bF.paper.height+"px";R.parentNode.insertBefore(bE,R);bE[bf](R);bJ.clipRect=bE}}if(!bM["clip-rect"]){bJ.clipRect&&(bJ.clipRect.style.clip=aM)}}if(bF.type=="image"&&bM.src){bJ.src=bM.src}if(bF.type=="image"&&bM.opacity){bJ.filterOpacity=a0+".Alpha(opacity="+(bM.opacity*100)+")";S.filter=(bJ.filterMatrix||aM)+(bJ.filterOpacity||aM)}bM.font&&(S.font=bM.font);bM["font-family"]&&(S.fontFamily='"'+bM["font-family"][H](",")[0][bn](/^['"]+|['"]+$/g,aM)+'"');bM["font-size"]&&(S.fontSize=bM["font-size"]);bM["font-weight"]&&(S.fontWeight=bM["font-weight"]);bM["font-style"]&&(S.fontStyle=bM["font-style"]);if(bM.opacity!=null||bM["stroke-width"]!=null||bM.fill!=null||bM.stroke!=null||bM["stroke-width"]!=null||bM["stroke-opacity"]!=null||bM["fill-opacity"]!=null||bM["stroke-dasharray"]!=null||bM["stroke-miterlimit"]!=null||bM["stroke-linejoin"]!=null||bM["stroke-linecap"]!=null){bJ=bF.shape||bJ;var bK=(bJ.getElementsByTagName(aZ)&&bJ.getElementsByTagName(aZ)[0]),bO=false;!bK&&(bO=bK=aw(aZ));if("fill-opacity" in bM||"opacity" in bM){var d=((+bN["fill-opacity"]+1||2)-1)*((+bN.opacity+1||2)-1)*((+aG.getRGB(bM.fill).o+1||2)-1);d=bd(k(d,0),1);bK.opacity=d}bM.fill&&(bK.on=true);if(bK.on==null||bM.fill=="none"){bK.on=false}if(bK.on&&bM.fill){var e=bM.fill.match(g);if(e){bK.src=e[1];bK.type="tile"}else{bK.color=aG.getRGB(bM.fill).hex;bK.src=aM;bK.type="solid";if(aG.getRGB(bM.fill).error&&(bR.type in {circle:1,ellipse:1}||by(bM.fill).charAt()!="r")&&f(bR,bM.fill)){bN.fill="none";bN.gradient=bM.fill}}}bO&&bJ[bf](bK);var E=(bJ.getElementsByTagName("stroke")&&bJ.getElementsByTagName("stroke")[0]),bP=false;!E&&(bP=E=aw("stroke"));if((bM.stroke&&bM.stroke!="none")||bM["stroke-width"]||bM["stroke-opacity"]!=null||bM["stroke-dasharray"]||bM["stroke-miterlimit"]||bM["stroke-linejoin"]||bM["stroke-linecap"]){E.on=true}(bM.stroke=="none"||E.on==null||bM.stroke==0||bM["stroke-width"]==0)&&(E.on=false);var bI=aG.getRGB(bM.stroke);E.on&&bM.stroke&&(E.color=bI.hex);d=((+bN["stroke-opacity"]+1||2)-1)*((+bN.opacity+1||2)-1)*((+bI.o+1||2)-1);var bG=(ai(bM["stroke-width"])||1)*0.75;d=bd(k(d,0),1);bM["stroke-width"]==null&&(bG=bN["stroke-width"]);bM["stroke-width"]&&(E.weight=bG);bG&&bG<1&&(d*=bG)&&(E.weight=1);E.opacity=d;bM["stroke-linejoin"]&&(E.joinstyle=bM["stroke-linejoin"]||"miter");E.miterlimit=bM["stroke-miterlimit"]||8;bM["stroke-linecap"]&&(E.endcap=bM["stroke-linecap"]=="butt"?"flat":bM["stroke-linecap"]=="square"?"square":"round");if(bM["stroke-dasharray"]){var bH={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};E.dashstyle=bH[af](bM["stroke-dasharray"])?bH[bM["stroke-dasharray"]]:aM}bP&&bJ[bf](E)}if(bR.type=="text"){S=bR.paper.span.style;bN.font&&(S.font=bN.font);bN["font-family"]&&(S.fontFamily=bN["font-family"]);bN["font-size"]&&(S.fontSize=bN["font-size"]);bN["font-weight"]&&(S.fontWeight=bN["font-weight"]);bN["font-style"]&&(S.fontStyle=bN["font-style"]);bR.node.string&&(bR.paper.span.innerHTML=by(bR.node.string)[bn](/</g,"&#60;")[bn](/&/g,"&#38;")[bn](/\n/g,"<br>"));bR.W=bN.w=bR.paper.span.offsetWidth;bR.H=bN.h=bR.paper.span.offsetHeight;bR.X=bN.x;bR.Y=bN.y+ac(bR.H/2);switch(bN["text-anchor"]){case"start":bR.node.style["v-text-align"]="left";bR.bbx=ac(bR.W/2);break;case"end":bR.node.style["v-text-align"]="right";bR.bbx=-ac(bR.W/2);break;default:bR.node.style["v-text-align"]="center";break}}};f=function(b,bD){b.attrs=b.attrs||{};var bE=b.attrs,bG,R="linear",S=".5 .5";b.attrs.gradient=bD;bD=by(bD)[bn](aL,function(bI,bJ,i){R="radial";if(bJ&&i){bJ=ai(bJ);i=ai(i);bg(bJ-0.5,2)+bg(i-0.5,2)>0.25&&(i=an.sqrt(0.25-bg(bJ-0.5,2))*((i>0.5)*2-1)+0.5);S=bJ+aF+i}return aM});bD=bD[H](/\s*\-\s*/);if(R=="linear"){var d=bD.shift();d=-ai(d);if(isNaN(d)){return null}}var E=v(bD);if(!E){return null}b=b.shape||b.node;bG=b.getElementsByTagName(aZ)[0]||aw(aZ);!bG.parentNode&&b.appendChild(bG);if(E[q]){bG.on=true;bG.method="none";bG.color=E[0].color;bG.color2=E[E[q]-1].color;var bH=[];for(var e=0,bF=E[q];e<bF;e++){E[e].offset&&bH[h](E[e].offset+aF+E[e].color)}bG.colors&&(bG.colors.value=bH[q]?bH[aT]():"0% "+bG.color);if(R=="radial"){bG.type="gradientradial";bG.focus="100%";bG.focussize=S;bG.focusposition=S}else{bG.type="gradient";bG.angle=(270-d)%360}}return 1};aR=function(E,S,b){var R=0,e=0,d=0,i=1;this[0]=E;this.id=aG._oid++;this.node=E;E.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=S;this.paper=b;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!b.bottom&&(b.bottom=this);this.prev=b.top;b.top&&(b.top.next=this);b.top=this;this.next=null};a7=aR[bA];a7.rotate=function(d,b,e){if(this.removed){return this}if(d==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aT](aF)}return this._.rt.deg}d=by(d)[H](a);if(d[q]-1){b=ai(d[1]);e=ai(d[2])}d=ai(d[0]);if(b!=null){this._.rt.deg=d}else{this._.rt.deg+=d}e==null&&(b=null);this._.rt.cx=b;this._.rt.cy=e;this.setBox(this.attrs,b,e);this.Group.style.rotation=this._.rt.deg;return this};a7.setBox=function(E,R,e){if(this.removed){return this}var b=this.Group.style,S=(this.shape&&this.shape.style)||this.node.style;E=E||{};for(var bD in E){if(E[af](bD)){this.attrs[bD]=E[bD]}}R=R||this._.rt.cx;e=e||this._.rt.cy;var bG=this.attrs,bJ,bI,bK,bF;switch(this.type){case"circle":bJ=bG.cx-bG.r;bI=bG.cy-bG.r;bK=bF=bG.r*2;break;case"ellipse":bJ=bG.cx-bG.rx;bI=bG.cy-bG.ry;bK=bG.rx*2;bF=bG.ry*2;break;case"image":bJ=+bG.x;bI=+bG.y;bK=bG.width||0;bF=bG.height||0;break;case"text":this.textpath.v=["m",ac(bG.x),", ",ac(bG.y-2),"l",ac(bG.x)+1,", ",ac(bG.y-2)][aT](aM);bJ=bG.x-ac(this.W/2);bI=bG.y-this.H/2;bK=this.W;bF=this.H;break;case"rect":case"path":if(!this.attrs.path){bJ=0;bI=0;bK=this.paper.width;bF=this.paper.height}else{var bE=ah(this.attrs.path);bJ=bE.x;bI=bE.y;bK=bE.width;bF=bE.height}break;default:bJ=0;bI=0;bK=this.paper.width;bF=this.paper.height;break}R=(R==null)?bJ+bK/2:R;e=(e==null)?bI+bF/2:e;var d=R-this.paper.width/2,bH=e-this.paper.height/2,bL;b.left!=(bL=d+"px")&&(b.left=bL);b.top!=(bL=bH+"px")&&(b.top=bL);this.X=r[af](this.type)?-d:bJ;this.Y=r[af](this.type)?-bH:bI;this.W=bK;this.H=bF;if(r[af](this.type)){S.left!=(bL=-d*t+"px")&&(S.left=bL);S.top!=(bL=-bH*t+"px")&&(S.top=bL)}else{if(this.type=="text"){S.left!=(bL=-d+"px")&&(S.left=bL);S.top!=(bL=-bH+"px")&&(S.top=bL)}else{b.width!=(bL=this.paper.width+"px")&&(b.width=bL);b.height!=(bL=this.paper.height+"px")&&(b.height=bL);S.left!=(bL=bJ-d+"px")&&(S.left=bL);S.top!=(bL=bI-bH+"px")&&(S.top=bL);S.width!=(bL=bK+"px")&&(S.width=bL);S.height!=(bL=bF+"px")&&(S.height=bL)}}};a7.hide=function(){!this.removed&&(this.Group.style.display="none");return this};a7.show=function(){!this.removed&&(this.Group.style.display="block");return this};a7.getBBox=function(){if(this.removed){return this}if(r[af](this.type)){return ah(this.attrs.path)}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};a7.remove=function(){if(this.removed){return}aC(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 b in this){delete this[b]}this.removed=true};a7.attr=function(b,bD){if(this.removed){return this}if(b==null){var S={};for(var E in this.attrs){if(this.attrs[af](E)){S[E]=this.attrs[E]}}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&&aG.is(b,"string")){if(b=="translation"){return z.call(this)}if(b=="rotation"){return this.rotate()}if(b=="scale"){return this.scale()}if(b==aZ&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient}return this.attrs[b]}if(this.attrs&&bD==null&&aG.is(b,a2)){var bG,bF={};for(E=0,bG=b[q];E<bG;E++){bF[b[E]]=this.attr(b[E])}return bF}var d;if(bD!=null){d={};d[b]=bD}bD==null&&aG.is(b,"object")&&(d=b);if(d){for(var bE in this.paper.customAttributes){if(this.paper.customAttributes[af](bE)&&d[af](bE)&&aG.is(this.paper.customAttributes[bE],"function")){var R=this.paper.customAttributes[bE].apply(this,[][br](d[bE]));this.attrs[bE]=d[bE];for(var e in R){if(R[af](e)){d[e]=R[e]}}}}if(d.text&&this.type=="text"){this.node.string=d.text}am(this,d);if(d.gradient&&(({circle:1,ellipse:1})[af](this.type)||by(d.gradient).charAt()!="r")){f(this,d.gradient)}(!r[af](this.type)||this._.rt.deg)&&this.setBox(this.attrs)}return this};a7.toFront=function(){!this.removed&&this.Group.parentNode[bf](this.Group);this.paper.top!=this&&ak(this,this.paper);return this};a7.toBack=function(){if(this.removed){return this}if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);n(this,this.paper)}return this};a7.insertAfter=function(b){if(this.removed){return this}if(b.constructor==ag){b=b[b.length]}if(b.Group.nextSibling){b.Group.parentNode.insertBefore(this.Group,b.Group.nextSibling)}else{b.Group.parentNode[bf](this.Group)}I(this,b,this.paper);return this};a7.insertBefore=function(b){if(this.removed){return this}if(b.constructor==ag){b=b[0]}b.Group.parentNode.insertBefore(this.Group,b.Group);aJ(this,b,this.paper);return this};a7.blur=function(b){var d=this.node.runtimeStyle,e=d.filter;e=e.replace(bs,aM);if(+b!==0){this.attrs.blur=b;d.filter=e+aF+a0+".Blur(pixelradius="+(+b||1.5)+")";d.margin=aG.format("-{0}px 0 0 -{0}px",ac(+b||1.5))}else{d.filter=e;d.margin=0;delete this.attrs.blur}};ad=function(d,b,bD,R){var E=aw("group"),S=aw("oval"),e=S.style;E.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";E.coordsize=aU;E.coordorigin=d.coordorigin;E[bf](S);var i=new aR(S,E,d);i.type="circle";am(i,{stroke:"#000",fill:"none"});i.attrs.cx=b;i.attrs.cy=bD;i.attrs.r=R;i.setBox({x:b-R,y:bD-R,width:R*2,height:R*2});d.canvas[bf](E);return i};function aq(b,E,d,e,i){if(i){return aG.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",b+i,E,d-i*2,i,-i,e-i*2,i*2-d,i*2-e)}else{return aG.format("M{0},{1}l{2},0,0,{3},{4},0z",b,E,d,e,-d)}}a6=function(d,S,E,bD,e,b){var bE=aq(S,E,bD,e,b),i=d.path(bE),R=i.attrs;i.X=R.x=S;i.Y=R.y=E;i.W=R.width=bD;i.H=R.height=e;R.r=b;R.path=bE;i.type="rect";return i};ax=function(b,bE,bD,e,d){var E=aw("group"),i=aw("oval"),S=i.style;E.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px";E.coordsize=aU;E.coordorigin=b.coordorigin;E[bf](i);var R=new aR(i,E,b);R.type="ellipse";am(R,{stroke:"#000"});R.attrs.cx=bE;R.attrs.cy=bD;R.attrs.rx=e;R.attrs.ry=d;R.setBox({x:bE-e,y:bD-d,width:e*2,height:d*2});b.canvas[bf](E);return R};u=function(d,b,bD,S,bE,i){var E=aw("group"),e=aw("image");E.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";E.coordsize=aU;E.coordorigin=d.coordorigin;e.src=b;E[bf](e);var R=new aR(e,E,d);R.type="image";R.attrs.src=b;R.attrs.x=bD;R.attrs.y=S;R.attrs.w=bE;R.attrs.h=i;R.setBox({x:bD,y:S,width:bE,height:i});d.canvas[bf](E);return R};aj=function(d,bE,bD,bF){var E=aw("group"),i=aw("shape"),S=i.style,bG=aw("path"),b=bG.style,e=aw("textpath");E.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";E.coordsize=aU;E.coordorigin=d.coordorigin;bG.v=aG.format("m{0},{1}l{2},{1}",ac(bE*10),ac(bD*10),ac(bE*10)+1);bG.textpathok=true;S.width=d.width;S.height=d.height;e.string=by(bF);e.on=true;i[bf](e);i[bf](bG);E[bf](i);var R=new aR(e,E,d);R.shape=i;R.textpath=bG;R.type="text";R.attrs.text=bF;R.attrs.x=bE;R.attrs.y=bD;R.attrs.w=1;R.attrs.h=1;am(R,{font:o.font,stroke:"none",fill:"#000"});R.setBox();d.canvas[bf](E);return R};bw=function(e,b){var d=this.canvas.style;e==+e&&(e+="px");b==+b&&(b+="px");d.width=e;d.height=b;d.clip="rect(0 "+e+" "+b+" 0)";return this};var aw;Z.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!Z.namespaces.rvml&&Z.namespaces.add("rvml","urn:schemas-microsoft-com:vml");aw=function(b){return Z.createElement("<rvml:"+b+' class="rvml">')}}catch(au){aw=function(b){return Z.createElement("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}D=function(){var e=aH[bx](0,arguments),b=e.container,bE=e.height,bF,d=e.width,bD=e.x,S=e.y;if(!b){throw new Error("VML container not found.")}var E=new bu,R=E.canvas=Z.createElement("div"),i=R.style;bD=bD||0;S=S||0;d=d||512;bE=bE||342;d==+d&&(d+="px");bE==+bE&&(bE+="px");E.width=1000;E.height=1000;E.coordsize=t*1000+aF+t*1000;E.coordorigin="0 0";E.span=Z.createElement("span");E.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";R[bf](E.span);i.cssText=aG.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",d,bE);if(b==1){Z.body[bf](R);i.left=bD+"px";i.top=S+"px";i.position="absolute"}else{if(b.firstChild){b.insertBefore(R,b.firstChild)}else{b[bf](R)}}a9.call(E,E,aG.fn);return E};aV.clear=function(){this.canvas.innerHTML=aM;this.span=Z.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[bf](this.span);this.bottom=this.top=null};aV.remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var b in this){this[b]=y(b)}return true}}var T=navigator.userAgent.match(/Version\/(.*?)\s/);if((navigator.vendor=="Apple Computer, Inc.")&&(T&&T[1]<4||navigator.platform.slice(0,2)=="iP")){aV.safari=function(){var b=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){b.remove()})}}else{aV.safari=function(){}}var N=function(){this.returnValue=false},bq=function(){return this.originalEvent.preventDefault()},aY=function(){this.cancelBubble=true},aB=function(){return this.originalEvent.stopPropagation()},at=(function(){if(Z.addEventListener){return function(R,i,e,d){var b=V&&bl[i]?bl[i]:i;var E=function(bF){if(V&&bl[af](i)){for(var bD=0,bE=bF.targetTouches&&bF.targetTouches.length;bD<bE;bD++){if(bF.targetTouches[bD].target==R){var S=bF;bF=bF.targetTouches[bD];bF.originalEvent=S;bF.preventDefault=bq;bF.stopPropagation=aB;break}}}return e.call(d,bF)};R.addEventListener(b,E,false);return function(){R.removeEventListener(b,E,false);return true}}}else{if(Z.attachEvent){return function(R,i,e,d){var E=function(S){S=S||aN.event;S.preventDefault=S.preventDefault||N;S.stopPropagation=S.stopPropagation||aY;return e.call(d,S)};R.attachEvent("on"+i,E);var b=function(){R.detachEvent("on"+i,E);return true};return b}}}})(),a3=[],bm=function(S){var bE=S.clientX,bD=S.clientY,bF=Z.documentElement.scrollTop||Z.body.scrollTop,bG=Z.documentElement.scrollLeft||Z.body.scrollLeft,b,d=a3.length;while(d--){b=a3[d];if(V){var R=S.touches.length,E;while(R--){E=S.touches[R];if(E.identifier==b.el._drag.id){bE=E.clientX;bD=E.clientY;(S.originalEvent?S.originalEvent:S).preventDefault();break}}}else{S.preventDefault()}bE+=bG;bD+=bF;b.move&&b.move.call(b.el,bE-b.el._drag.x,bD-b.el._drag.y,bE,bD)}},c=function(){aG.unmousemove(bm).unmouseup(c);var d=a3.length,b;while(d--){b=a3[d];b.el._drag={};b.end&&b.end.call(b.el)}a3=[]};for(var ap=P[q];ap--;){(function(b){aG[b]=aR[bA][b]=function(d){if(aG.is(d,"function")){this.events=this.events||[];this.events.push({name:b,f:d,unbind:at(this.shape||this.node||Z,b,d,this)})}return this};aG["un"+b]=aR[bA]["un"+b]=function(i){var e=this.events,d=e[q];while(d--){if(e[d].name==b&&e[d].f==i){e[d].unbind();e.splice(d,1);!e.length&&delete this.events;return this}}return this}})(P[ap])}a7.hover=function(d,b){return this.mouseover(d).mouseout(b)};a7.unhover=function(d,b){return this.unmouseover(d).unmouseout(b)};a7.drag=function(b,e,d){this._drag={};this.mousedown(function(E){(E.originalEvent||E).preventDefault();var i=Z.documentElement.scrollTop||Z.body.scrollTop,R=Z.documentElement.scrollLeft||Z.body.scrollLeft;this._drag.x=E.clientX+R;this._drag.y=E.clientY+i;this._drag.id=E.identifier;e&&e.call(this,E.clientX+R,E.clientY+i);!a3.length&&aG.mousemove(bm).mouseup(c);a3.push({el:this,move:b,end:d})});return this};a7.undrag=function(b,E,e){var d=a3.length;while(d--){a3[d].el==this&&(a3[d].move==b&&a3[d].end==e)&&a3.splice(d,1);!a3.length&&aG.unmousemove(bm).unmouseup(c)}};aV.circle=function(b,e,d){return ad(this,b||0,e||0,d||0)};aV.rect=function(b,E,d,e,i){return a6(this,b||0,E||0,d||0,e||0,i||0)};aV.ellipse=function(b,i,e,d){return ax(this,b||0,i||0,e||0,d||0)};aV.path=function(b){b&&!aG.is(b,ae)&&!aG.is(b[0],a2)&&(b+=aM);return w(aG.format[bx](aG,arguments),this)};aV.image=function(i,b,E,d,e){return u(this,i||"about:blank",b||0,E||0,d||0,e||0)};aV.text=function(b,e,d){return aj(this,b||0,e||0,by(d))};aV.set=function(b){arguments[q]>1&&(b=Array[bA].splice.call(arguments,0,arguments[q]));return new ag(b)};aV.setSize=bw;aV.top=aV.bottom=null;aV.raphael=aG;function B(){return this.x+aF+this.y}a7.resetScale=function(){if(this.removed){return this}this._.sx=1;this._.sy=1;this.attrs.scale="1 1"};a7.scale=function(bI,bH,e,d){if(this.removed){return this}if(bI==null&&bH==null){return{x:this._.sx,y:this._.sy,toString:B}}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,E=bG.y+bG.height/2,bX=bI/this._.sx,bW=bH/this._.sy;e=(+e||e==0)?e:bD;d=(+d||d==0)?d:E;var bF=~~(bI/an.abs(bI)),S=~~(bH/an.abs(bH)),bP=this.node.style,b0=e+(bD-e)*bX,bZ=d+(E-d)*bW;switch(this.type){case"rect":case"image":var bE=bY.width*bF*bX,bO=bY.height*S*bW;this.attr({height:bO,r:bY.r*bd(bF*bX,S*bW),width:bE,x:b0-bE/2,y:bZ-bO/2});break;case"circle":case"ellipse":this.attr({rx:bY.rx*bF*bX,ry:bY.ry*S*bW,r:bY.r*bd(bF*bX,S*bW),cx:b0,cy:bZ});break;case"text":this.attr({x:b0,y:bZ});break;case"path":var bR=ar(bY.path),bS=true;for(var bU=0,bN=bR[q];bU<bN;bU++){var bQ=bR[bU],R=bj.call(bQ[0]);if(R=="M"&&bS){continue}else{bS=false}if(R=="A"){bQ[bR[bU][q]-2]*=bX;bQ[bR[bU][q]-1]*=bW;bQ[1]*=bF*bX;bQ[2]*=S*bW;bQ[5]=+!(bF+S?!+bQ[5]:+bQ[5])}else{if(R=="H"){for(var bT=1,bV=bQ[q];bT<bV;bT++){bQ[bT]*=bX}}else{if(R=="V"){for(bT=1,bV=bQ[q];bT<bV;bT++){bQ[bT]*=bW}}else{for(bT=1,bV=bQ[q];bT<bV;bT++){bQ[bT]*=(bT%2)?bX:bW}}}}}var b=ah(bR);bM=b0-b.x-b.width/2;bK=bZ-b.y-b.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||S!=1)){if(this.transformations){this.transformations[2]="scale("[br](bF,",",S,")");this.node[C]("transform",this.transformations[aT](aF));bM=(bF==-1)?-bY.x-(bE||0):bY.x;bK=(S==-1)?-bY.y-(bO||0):bY.y;this.attr({x:bM,y:bK});bY.fx=bF-1;bY.fy=S-1}else{this.node.filterMatrix=a0+".Matrix(M11="[br](bF,", M12=0, M21=0, M22=",S,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");bP.filter=(this.node.filterMatrix||aM)+(this.node.filterOpacity||aM)}}else{if(this.transformations){this.transformations[2]=aM;this.node[C]("transform",this.transformations[aT](aF));bY.fx=0;bY.fy=0}else{this.node.filterMatrix=aM;bP.filter=(this.node.filterMatrix||aM)+(this.node.filterOpacity||aM)}}bY.scale=[bI,bH,e,d][aT](aF);this._.sx=bI;this._.sy=bH}return this};a7.clone=function(){if(this.removed){return null}var b=this.attr();delete b.scale;delete b.translation;return this.paper[this.type]().attr(b)};var j=ay(function(e,b,bD,S,bJ,bI,bH,bG,E){var bF=0,R;for(var bE=0;bE<1.01;bE+=0.01){var d=aG.findDotsAtSegment(e,b,bD,S,bJ,bI,bH,bG,bE);bE&&(bF+=bg(bg(R.x-d.x,2)+bg(R.y-d.y,2),0.5));if(bF>=E){return d}R=d}}),aX=function(b,d){return function(bL,R,S){bL=U(bL);var bH,bG,e,bD,E="",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=s(bH,bG,e[1],e[2],e[3],e[4],e[5],e[6]);if(bF+bD>R){if(d&&!bK.start){bI=j(bH,bG,e[1],e[2],e[3],e[4],e[5],e[6],R-bF);E+=["C",bI.start.x,bI.start.y,bI.m.x,bI.m.y,bI.x,bI.y];if(S){return E}bK.start=E;E=["M",bI.x,bI.y+"C",bI.n.x,bI.n.y,bI.end.x,bI.end.y,e[5],e[6]][aT]();bF+=bD;bH=+e[5];bG=+e[6];continue}if(!b&&!d){bI=j(bH,bG,e[1],e[2],e[3],e[4],e[5],e[6],R-bF);return{x:bI.x,y:bI.y,alpha:bI.alpha}}}bF+=bD;bH=+e[5];bG=+e[6]}E+=e}bK.end=E;bI=b?bF:d?bK:aG.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}},s=ay(function(e,b,S,R,bI,bH,bG,bF){var E={x:0,y:0},bE=0;for(var bD=0;bD<1.01;bD+=0.01){var d=ab(e,b,S,R,bI,bH,bG,bF,bD);bD&&(bE+=bg(bg(E.x-d.x,2)+bg(E.y-d.y,2),0.5));E=d}return bE});var aI=aX(1),K=aX(),X=aX(0,1);a7.getTotalLength=function(){if(this.type!="path"){return}if(this.node.getTotalLength){return this.node.getTotalLength()}return aI(this.attrs.path)};a7.getPointAtLength=function(b){if(this.type!="path"){return}if(this.node.getPointAtLength){return this.node.getPointAtLength(b)}return K(this.attrs.path,b)};a7.getSubpath=function(e,d){if(this.type!="path"){return}if(an.abs(this.getTotalLength()-d)<0.000001){return X(this.attrs.path,e).end}var b=X(this.attrs.path,d,1);return e?X(b,e).end:b};aG.easing_formulas={linear:function(b){return b},"<":function(b){return bg(b,3)},">":function(b){return bg(b-1,3)+1},"<>":function(b){b=b*2;if(b<1){return bg(b,3)/2}b-=2;return(bg(b,3)+2)/2},backIn:function(d){var b=1.70158;return d*d*((b+1)*d-b)},backOut:function(d){d=d-1;var b=1.70158;return d*d*((b+1)*d+b)+1},elastic:function(e){if(e==0||e==1){return e}var d=0.3,b=d/4;return bg(2,-10*e)*an.sin((e-b)*(2*an.PI)/d)+1},bounce:function(i){var d=7.5625,e=2.75,b;if(i<(1/e)){b=d*i*i}else{if(i<(2/e)){i-=(1.5/e);b=d*i*i+0.75}else{if(i<(2.5/e)){i-=(2.25/e);b=d*i*i+0.9375}else{i-=(2.625/e);b=d*i*i+0.984375}}}return b}};var W={length:0},bp=function(){var bE=+new Date;for(var bP in W){if(bP!="length"&&W[af](bP)){var bU=W[bP];if(bU.stop||bU.el.removed){delete W[bP];W[q]--;continue}var R=bE-bU.start,bM=bU.ms,bL=bU.easing,bQ=bU.from,bJ=bU.diff,d=bU.to,bI=bU.t,bD=bU.el,bK={},b;if(R<bM){var E=aG.easing_formulas[bL]?aG.easing_formulas[bL](R/bM):R/bM;for(var bN in bQ){if(bQ[af](bN)){switch(al[bN]){case"along":b=E*bM*bJ[bN];d.back&&(b=d.len-b);var bO=K(d[bN],b);bD.translate(bJ.sx-bJ.x||0,bJ.sy-bJ.y||0);bJ.x=bO.x;bJ.y=bO.y;bD.translate(bO.x-bJ.sx,bO.y-bJ.sy);d.rot&&bD.rotate(bJ.r+bO.alpha,bO.x,bO.y);break;case aD:b=+bQ[bN]+E*bM*bJ[bN];break;case"colour":b="rgb("+[J(ac(bQ[bN].r+E*bM*bJ[bN].r)),J(ac(bQ[bN].g+E*bM*bJ[bN].g)),J(ac(bQ[bN].b+E*bM*bJ[bN].b))][aT](",")+")";break;case"path":b=[];for(var bS=0,bH=bQ[bN][q];bS<bH;bS++){b[bS]=[bQ[bN][bS][0]];for(var bR=1,bT=bQ[bN][bS][q];bR<bT;bR++){b[bS][bR]=+bQ[bN][bS][bR]+E*bM*bJ[bN][bS][bR]}b[bS]=b[bS][aT](aF)}b=b[aT](aF);break;case"csv":switch(bN){case"translation":var bG=E*bM*bJ[bN][0]-bI.x,bF=E*bM*bJ[bN][1]-bI.y;bI.x+=bG;bI.y+=bF;b=bG+aF+bF;break;case"rotation":b=+bQ[bN][0]+E*bM*bJ[bN][0];bQ[bN][1]&&(b+=","+bQ[bN][1]+","+bQ[bN][2]);break;case"scale":b=[+bQ[bN][0]+E*bM*bJ[bN][0],+bQ[bN][1]+E*bM*bJ[bN][1],(2 in d[bN]?d[bN][2]:aM),(3 in d[bN]?d[bN][3]:aM)][aT](aF);break;case"clip-rect":b=[];bS=4;while(bS--){b[bS]=+bQ[bN][bS]+E*bM*bJ[bN][bS]}break}break;default:var S=[].concat(bQ[bN]);b=[];bS=bD.paper.customAttributes[bN].length;while(bS--){b[bS]=+S[bS]+E*bM*bJ[bN][bS]}break}bK[bN]=b}}bD.attr(bK);bD._run&&bD._run.call(bD)}else{if(d.along){bO=K(d.along,d.len*!d.back);bD.translate(bJ.sx-(bJ.x||0)+bO.x-bJ.sx,bJ.sy-(bJ.y||0)+bO.y-bJ.sy);d.rot&&bD.rotate(bJ.r+bO.alpha,bO.x,bO.y)}(bI.x||bI.y)&&bD.translate(-bI.x,-bI.y);d.scale&&(d.scale+=aM);bD.attr(d);delete W[bP];W[q]--;bD.in_animation=null}}}aG.svg&&bD&&bD.paper&&bD.paper.safari();W[q]&&setTimeout(bp)},bt=function(b,d,E,e,i){e=e-E;setTimeout(function(){aG.is(i,"function")&&i.call(d);d.animate(b,e,b.easing)},E)},J=function(b){return k(bd(b,255),0)},z=function(b,e){if(b==null){return{x:this._.tx,y:this._.ty,toString:B}}this._.tx+=+b;this._.ty+=+e;switch(this.type){case"circle":case"ellipse":this.attr({cx:+b+this.attrs.cx,cy:+e+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+b+this.attrs.x,y:+e+this.attrs.y});break;case"path":var d=ar(this.attrs.path);d[0][1]+=+b;d[0][2]+=+e;this.attr({path:d});break}return this};a7.animateWith=function(d,e,b,E,i){W[d.id]&&(e.start=W[d.id].start);return this.animate(e,b,E,i)};a7.animateAlong=aS();a7.animateAlongBack=aS(1);function aS(b){return function(i,e,d,R){var E={back:b};aG.is(d,"function")?(R=d):(E.rot=d);i&&i.constructor==aR&&(i=i.attrs.path);i&&(E.along=i);return this.animate(E,e,R)}}a7.onAnimation=function(b){this._run=b||0;return this};a7.animate=function(bT,bK,bJ,E){var d=this;if(aG.is(bJ,"function")||!bJ){E=bJ||null}if(d.removed){E&&E.call(d);return d}var bO={},e={},R=false,bG={};for(var bL in bT){if(bT[af](bL)){if(al[af](bL)||d.paper.customAttributes[af](bL)){R=true;bO[bL]=d.attr(bL);(bO[bL]==null)&&(bO[bL]=o[bL]);e[bL]=bT[bL];switch(al[bL]){case"along":var bR=aI(bT[bL]);var bM=K(bT[bL],bR*!!bT.back);var S=d.getBBox();bG[bL]=bR/bK;bG.tx=S.x;bG.ty=S.y;bG.sx=bM.x;bG.sy=bM.y;e.rot=bT.rot;e.back=bT.back;e.len=bR;bT.rot&&(bG.r=ai(d.rotate())||0);break;case aD:bG[bL]=(e[bL]-bO[bL])/bK;break;case"colour":bO[bL]=aG.getRGB(bO[bL]);var bN=aG.getRGB(e[bL]);bG[bL]={r:(bN.r-bO[bL].r)/bK,g:(bN.g-bO[bL].g)/bK,b:(bN.b-bO[bL].b)/bK};break;case"path":var bD=U(bO[bL],e[bL]);bO[bL]=bD[0];var bH=bD[1];bG[bL]=[];for(var bQ=0,bF=bO[bL][q];bQ<bF;bQ++){bG[bL][bQ]=[0];for(var bP=1,bS=bO[bL][bQ][q];bP<bS;bP++){bG[bL][bQ][bP]=(bH[bQ][bP]-bO[bL][bQ][bP])/bK}}break;case"csv":var b=by(bT[bL])[H](a),bE=by(bO[bL])[H](a);switch(bL){case"translation":bO[bL]=[0,0];bG[bL]=[b[0]/bK,b[1]/bK];break;case"rotation":bO[bL]=(bE[1]==b[1]&&bE[2]==b[2])?bE:[0,b[1],b[2]];bG[bL]=[(b[0]-bO[bL][0])/bK,0,0];break;case"scale":bT[bL]=b;bO[bL]=by(bO[bL])[H](a);bG[bL]=[(b[0]-bO[bL][0])/bK,(b[1]-bO[bL][1])/bK,0,0];break;case"clip-rect":bO[bL]=by(bO[bL])[H](a);bG[bL]=[];bQ=4;while(bQ--){bG[bL][bQ]=(b[bQ]-bO[bL][bQ])/bK}break}e[bL]=b;break;default:b=[].concat(bT[bL]);bE=[].concat(bO[bL]);bG[bL]=[];bQ=d.paper.customAttributes[bL].length;while(bQ--){bG[bL][bQ]=((b[bQ]||0)-(bE[bQ]||0))/bK}break}}}}if(!R){var bI=[];for(var bU in bT){if(bT[af](bU)&&ba.test(bU)){bL={value:bT[bU]};bU=="from"&&(bU=0);bU=="to"&&(bU=100);bL.key=Q(bU,10);bI.push(bL)}}bI.sort(bh);for(bQ=0,bF=bI.length;bQ<bF;bQ++){bt(bI[bQ].value,d,bK/100*bI[bQ].key,bK/100*(bI[bQ+1]&&bI[bQ+1].key||100),bI[bQ-1]&&bI[bQ-1].value.callback)}}else{d.stop();d.in_animation=1;W[d.id]={start:bT.start||+new Date,ms:bK,easing:bJ,from:bO,diff:bG,to:e,el:d,t:{x:0,y:0}};aG.is(E,"function")&&(d._ac=setTimeout(function(){E.call(d)},bK));++W[q]==1&&setTimeout(bp)}return this};a7.stop=function(){W[this.id]&&W[q]--;delete W[this.id];clearTimeout(this._ac);delete this._ac;return this};a7.translate=function(b,d){return this.attr({translation:b+" "+d})};a7[aW]=function(){return"Rapha\xebl\u2019s object"};aG.ae=W;var ag=function(b){this.items=[];this[q]=0;this.type="set";if(b){for(var d=0,e=b[q];d<e;d++){if(b[d]&&(b[d].constructor==aR||b[d].constructor==ag)){this[this.items[q]]=this.items[this.items[q]]=b[d];this[q]++}}}};ag[bA][h]=function(){var E,b;for(var d=0,e=arguments[q];d<e;d++){E=arguments[d];if(E&&(E.constructor==aR||E.constructor==ag)){b=this.items[q];this[b]=this.items[b]=E;this[q]++}}return this};ag[bA].pop=function(){delete this[this[q]--];return this.items.pop()};for(var G in a7){if(a7[af](G)){ag[bA][G]=(function(b){return function(){for(var d=0,e=this.items[q];d<e;d++){this.items[d][b][bx](this.items[d],arguments)}return this}})(G)}}ag[bA].attr=function(d,S){if(d&&aG.is(d,a2)&&aG.is(d[0],"object")){for(var b=0,R=d[q];b<R;b++){this.items[b].attr(d[b])}}else{for(var e=0,E=this.items[q];e<E;e++){this.items[e].attr(d,S)}}return this};ag[bA].animate=function(d,b,S,bE){(aG.is(S,"function")||!S)&&(bE=S||null);var R=this.items[q],e=R,bF,bD=this,E;bE&&(E=function(){!--R&&bE.call(bD)});S=aG.is(S,ae)?S:E;bF=this.items[--e].animate(d,b,S,E);while(e--){this.items[e]&&!this.items[e].removed&&this.items[e].animateWith(bF,d,b,S,E)}return this};ag[bA].insertAfter=function(d){var b=this.items[q];while(b--){this.items[b].insertAfter(d)}return this};ag[bA].getBBox=function(){var b=[],S=[],d=[],E=[];for(var e=this.items[q];e--;){var R=this.items[e].getBBox();b[h](R.x);S[h](R.y);d[h](R.x+R.width);E[h](R.y+R.height)}b=bd[bx](0,b);S=bd[bx](0,S);return{x:b,y:S,width:k[bx](0,d)-b,height:k[bx](0,E)-S}};ag[bA].clone=function(e){e=new ag;for(var b=0,d=this.items[q];b<d;b++){e[h](this.items[b].clone())}return e};aG.registerFont=function(d){if(!d.face){return d}this.fonts=this.fonts||{};var i={w:d.w,face:{},glyphs:{}},e=d.face["font-family"];for(var S in d.face){if(d.face[af](S)){i.face[S]=d.face[S]}}if(this.fonts[e]){this.fonts[e][h](i)}else{this.fonts[e]=[i]}if(!d.svg){i.face["units-per-em"]=Q(d.face["units-per-em"],10);for(var E in d.glyphs){if(d.glyphs[af](E)){var R=d.glyphs[E];i.glyphs[E]={w:R.w,k:{},d:R.d&&"M"+R.d[bn](/[mlcxtrv]/g,function(bD){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[bD]||"M"})+"z"};if(R.k){for(var b in R.k){if(R[af](b)){i.glyphs[E].k[b]=R.k[b]}}}}}}return d};aV.getFont=function(bE,bF,d,E){E=E||"normal";d=d||"normal";bF=+bF||{normal:400,bold:700,lighter:300,bolder:800}[bF]||400;if(!aG.fonts){return}var R=aG.fonts[bE];if(!R){var e=new RegExp("(^|\\s)"+bE[bn](/[^\w\d\s+!~.:_-]/g,aM)+"(\\s|$)","i");for(var b in aG.fonts){if(aG.fonts[af](b)){if(e.test(b)){R=aG.fonts[b];break}}}}var S;if(R){for(var bD=0,bG=R[q];bD<bG;bD++){S=R[bD];if(S.face["font-weight"]==bF&&(S.face["font-style"]==d||!S.face["font-style"])&&S.face["font-stretch"]==E){break}}}return S};aV.print=function(R,E,b,bE,bF,bO,d){bO=bO||"middle";d=k(bd(d||0,1),-1);var bK=this.set(),bN=by(b)[H](aM),bL=0,bI=aM,bP;aG.is(bE,b)&&(bE=this.getFont(bE));if(bE){bP=(bF||16)/bE.face["units-per-em"];var e=bE.face.bbox.split(a),bD=+e[0],bG=+e[1]+(bO=="baseline"?e[3]-e[1]+(+bE.face.descent):(e[3]-e[1])/2);for(var bJ=0,S=bN[q];bJ<S;bJ++){var bH=bJ&&bE.glyphs[bN[bJ-1]]||{},bM=bE.glyphs[bN[bJ]];bL+=bJ?(bH.w||bE.w)+(bH.k&&bH.k[bN[bJ]]||0)+(bE.w*d):0;bM&&bM.d&&bK[h](this.path(bM.d).attr({fill:"#000",stroke:"none",translation:[bL,0]}))}bK.scale(bP,bP,bD,bG).translate(R-bD,E-bG)}return bK};aG.format=function(d,e){var b=aG.is(e,a2)?[0][br](e):arguments;d&&aG.is(d,ae)&&b[q]-1&&(d=d[bn](bi,function(R,E){return b[++E]==null?aM:b[E]}));return d||aM};aG.ninja=function(){p.was?(Raphael=p.is):delete Raphael;return aG};aG.el=a7;aG.st=ag[bA];return aG})();
\ No newline at end of file
index cb0d129..78cd08b 100644 (file)
@@ -1,34 +1,24 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
-   "http://www.w3.org/TR/html4/strict.dtd">
+<!DOCTYPE html>
 <html lang="en">
     <head>
         <title>Raphaël Reference</title>
         <meta http-equiv="content-language" content="en">
-        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <meta charset="utf-8">
         <meta name="author" content="Dmitry Baranovskiy">
         <meta name="description" content="Vector Graphics JavaScript Library">
         <meta name="keywords" content="JavaScript Library, Raphael, SVG, VML">
         <meta name="viewport" content="width=450; user-scalable=no">
+        <link rel="apple-touch-icon-precomposed" href="/Raphael.png"/>
         <link rel="shortcut icon" href="/favicon16.png" type="image/x-icon">
-        <link rel="stylesheet" href="raphael.css" type="text/css" charset="utf-8" media="screen,projection">
-        <link rel="stylesheet" type="text/css" media="print" href="print.css">
+        <link rel="stylesheet" href="site.css" type="text/css">
         <link rel="shortcut icon" href="/favicon16.png" type="image/x-icon">
-        <link media="only screen and (max-device-width: 480px)" href="iphone.css" type="text/css" rel="stylesheet">
-        <script src="raphael.js" type="text/javascript" charset="utf-8"></script>
-        <script src="museo.js" type="text/javascript" charset="utf-8"></script>
-
-
     </head>
     <body class="raphael" id="reference">
         <div id="header">
-            <a href="http://twitter.com/statuses/user_timeline/17180567.atom" id="rss" name="rss">rss</a>
-            <h1>
-                Raphaël—JavaScript Library
-            </h1>
+            <h1><span>&nbsp;</span>Raphaël—JavaScript Library</h1>
         </div>
         <div id="content">
-            <div>
-                <div>
+            <div id="top">&nbsp;</div>
                     <div id="column-1">
                         <h2>Main Function</h2>
                         <h3 id="Raphael">
@@ -189,6 +179,15 @@ var set = Raphael(["notepad", 320, 200, {
                         <pre class="javascript code"><code>var c = paper.path("M10 10L90 90");
 // draw a diagonal line:
 // move to 10,10, line to 90,90</code></pre>
+                        <h3 id="clear">
+                            clear
+                        </h3>
+                        <p>
+                            Clears the canvas, i.e. removes all the elements.
+                        </p>
+                        <h4>Usage</h4>
+                        <pre class="javascript code"><code>var c = paper.path("M10 10L90 90");
+paper.clear();</code></pre>
                         <h2 id="Element">
                             Element’s generic methods
                         </h2>
@@ -755,10 +754,13 @@ paper.circle(100, 100, 20).red();
                             <li>#•••••• — full length HTML colour: (“<samp>#000000</samp>”, “<samp>#bd2300</samp>”)</li>
                             <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<samp>rgb(200,&nbsp;100,&nbsp;0)</samp>”)</li>
                             <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<samp>rgb(100%,&nbsp;175%,&nbsp;0%)</samp>”)</li>
+                            <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<samp>rgb(200,&nbsp;100,&nbsp;0, .5)</samp>”)</li>
+                            <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<samp>rgb(100%,&nbsp;175%,&nbsp;0%, 50%)</samp>”)</li>
                             <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<samp>hsb(0.5,&nbsp;0.25,&nbsp;1)</samp>”)</li>
                             <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
-                            <li>hsl(•••, •••, •••) — same as hsb</li>
-                            <li>hsl(•••%, •••%, •••%) — same as hsb</li>
+                            <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li>
+                            <li>hsl(•••%, •••%, •••%) — almost the same as hsb</li>
+                            <li>Optionally for hsb and hsl you could specify hue as a degree: “<samp>hsl(240deg,&nbsp;1,&nbsp;.5)</samp>” or, if you want to fancy, “<samp>hsl(240°,&nbsp;1,&nbsp;.5)</samp>”</li>
                         </ul>
                         <h4>Usage</h4>
                         <pre class="javascript code"><code>paper.circle(100, 100, 20).attr({
@@ -821,6 +823,42 @@ element.hover(function (event) {
                         <p>
                             To unbind events use the same method names with “un” prefix, i.e. <samp>element.unclick(f);</samp>
                         </p>
+                        <h3 id="drag-n-drop">
+                            Drag ’n’ Drop
+                        </h3>
+                        <p>
+                            To make element “draggable” you need to call method <code>drag</code> on element.
+                        </p>
+                        <h4>Parameters</h4>
+                        <ol>
+                            <li>onmove <em>function</em> event handler for moving</li>
+                            <li>onstart <em>function</em> event handler for start</li>
+                            <li>onend <em>function</em> event handler for end of the drag</li>
+                        </ol>
+                        <h4>Usage</h4>
+                        <pre class="javascript code"><code>var c = R.circle(100, 100, 50).attr({
+    fill: "hsb(.8, 1, 1)",
+    stroke: "none",
+    opacity: .5
+});
+var start = function () {
+    // storing original coordinates
+    this.ox = this.attr("cx");
+    this.oy = this.attr("cy");
+    this.attr({opacity: 1});
+},
+move = function (dx, dy) {
+    // move will be called with dx and dy
+    this.attr({cx: this.ox + dx, cy: this.oy + dy});
+},
+up = function () {
+    // restoring state
+    this.attr({opacity: .5});
+};
+c.drag(move, start, up);</code></pre>
+                        <p>
+                            To unbind drag use the <samp>undrag</samp> method.
+                        </p>
                     </div>
                     <div id="column-2">
                         <h2>
@@ -854,6 +892,9 @@ element.hover(function (event) {
                             <li>
                                 <a href="#path"><code>path</code></a>
                             </li>
+                            <li>
+                                <a href="#clear"><code>clear</code></a>
+                            </li>
                             <li>
                                 <a href="#node"><code>node</code></a>
                             </li>
@@ -972,14 +1013,14 @@ element.hover(function (event) {
                             <a href="http://www.opensource.org/licenses/mit-license.php" title="MIT License" rel="license">Some Rights Reserved</a> by <a href="http://dmitry.baranovskiy.com/">Dmitry Baranovskiy</a>
                         </h3>
                         <h3 id="font">
-                            Logo by <a href="http://wasabicube.com/">Wasabicube</a> ·
-                            Work at this project started as 20% time at <a href="http://www.atlassian.com/" title="Atlassian — Software to Track, Test &#38; Collaborate, from Enterprises to Open Source Projects.">Atlassian</a>
+                            Logo by <a href="http://wasabicube.com/">Wasabicube</a>
                         </h3>
                     </div>
-                </div>
-            </div>
         </div>
+        <script src="raphael.js" type="text/javascript" charset="utf-8"></script>
         <script src="syntax.js" type="text/javascript" charset="utf-8"></script>
+        <script src="museo.js" type="text/javascript" charset="utf-8"></script>
+        <script src="site.js" type="text/javascript" charset="utf-8"></script>
         <script type="text/javascript">
         var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
         document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
@@ -989,4 +1030,4 @@ element.hover(function (event) {
         pageTracker._trackPageview();
         </script>
     </body>
-</html>
\ No newline at end of file
+</html>