function RGBColor(t){this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var u={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var e in u)t==e&&(t=u[e]);for(var f=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i<f.length;i++){var n=f[i].re,s=f[i].process,a=n.exec(t);a&&(channels=s(a),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:255<this.r?255:this.r,this.g=this.g<0||isNaN(this.g)?0:255<this.g?255:this.g,this.b=this.b<0||isNaN(this.b)?0:255<this.b?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==i.length&&(i="0"+i),"#"+t+e+i},this.getHelpXML=function(){for(var t=new Array,e=0;e<f.length;e++)for(var i=f[e].example,n=0;n<i.length;n++)t[t.length]=i[n];for(var s in u)t[t.length]=s;var a=document.createElement("ul");a.setAttribute("id","rgbcolor-examples");for(e=0;e<t.length;e++)try{var r=document.createElement("li"),o=new RGBColor(t[e]),l=document.createElement("div");l.style.cssText="margin: 3px; border: 1px solid black; background:"+o.toHex()+"; color:"+o.toHex(),l.appendChild(document.createTextNode("test"));var h=document.createTextNode(" "+t[e]+" -> "+o.toRGB()+" -> "+o.toHex());r.appendChild(l),r.appendChild(h),a.appendChild(r)}catch(t){}return a}}window.console||(window.console={},window.console.log=function(t){},window.console.dir=function(t){}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){for(var e=0;e<this.length;e++)if(this[e]==t)return e;return-1}),function(){this.canvg=function(t,e,n){if(null!=t||null!=e||null!=n){var s,S;n=n||{},"string"==typeof t&&(t=document.getElementById(t)),null==t.svg?((S={FRAMERATE:30,MAX_VIRTUAL_PIXELS:3e4}).init=function(t){S.Definitions={},S.Styles={},S.Animations=[],S.Images=[],S.ctx=t,S.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(t,e){this.viewPorts.push({width:t,height:e})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(t){return null!=t&&"number"==typeof t?t:"x"==t?this.width():"y"==t?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},S.init(),S.ImagesLoaded=function(){for(var t=0;t<S.Images.length;t++)if(!S.Images[t].loaded)return!1;return!0},S.trim=function(t){return t.replace(/^\s+|\s+$/g,"")},S.compressSpaces=function(t){return t.replace(/[\s\r\t\n]+/gm," ")},S.ajax=function(t){var e;return(e=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"))?(e.open("GET",t,!1),e.send(null),e.responseText):null},S.parseXml=function(t){if(window.DOMParser)return(new DOMParser).parseFromString(t,"text/xml");t=t.replace(/<!DOCTYPE svg[^>]*>/,"");var e=new ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e},S.Property=function(t,e){this.name=t,this.value=e,this.hasValue=function(){return null!=this.value&&""!==this.value},this.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},this.valueOrDefault=function(t){return this.hasValue()?this.value:t},this.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t};var n=this;this.Color={addOpacity:function(t){var e=n.value;if(null!=t&&""!=t){var i=new RGBColor(n.value);i.ok&&(e="rgba("+i.r+", "+i.g+", "+i.b+", "+t+")")}return new S.Property(n.name,e)}},this.Definition={getDefinition:function(){var t=n.value.replace(/^(url\()?#([^\)]+)\)?$/,"$2");return S.Definitions[t]},isUrl:function(){return 0==n.value.indexOf("url(")},getFillStyle:function(t){var e=this.getDefinition();return null!=e&&e.createGradient?e.createGradient(S.ctx,t):null!=e&&e.createPattern?e.createPattern(S.ctx,t):null}},this.Length={DPI:function(t){return 96},EM:function(t){var e=12,i=new S.Property("fontSize",S.Font.Parse(S.ctx.font).fontSize);return i.hasValue()&&(e=i.Length.toPixels(t)),e},toPixels:function(t){if(!n.hasValue())return 0;var e=n.value+"";return e.match(/em$/)?n.numValue()*this.EM(t):e.match(/ex$/)?n.numValue()*this.EM(t)/2:e.match(/px$/)?n.numValue():e.match(/pt$/)?1.25*n.numValue():e.match(/pc$/)?15*n.numValue():e.match(/cm$/)?n.numValue()*this.DPI(t)/2.54:e.match(/mm$/)?n.numValue()*this.DPI(t)/25.4:e.match(/in$/)?n.numValue()*this.DPI(t):e.match(/%$/)?n.numValue()*S.ViewPort.ComputeSize(t):n.numValue()}},this.Time={toMilliseconds:function(){if(!n.hasValue())return 0;var t=n.value+"";return t.match(/s$/)?1e3*n.numValue():(t.match(/ms$/),n.numValue())}},this.Angle={toRadians:function(){if(!n.hasValue())return 0;var t=n.value+"";return t.match(/deg$/)?n.numValue()*(Math.PI/180):t.match(/grad$/)?n.numValue()*(Math.PI/200):t.match(/rad$/)?n.numValue():n.numValue()*(Math.PI/180)}}},S.Font=new function(){this.Styles=["normal","italic","oblique","inherit"],this.Variants=["normal","small-caps","inherit"],this.Weights=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900","inherit"],this.CreateFont=function(t,e,i,n,s,a){var r=null!=a?this.Parse(a):this.CreateFont("","","","","",S.ctx.font);return{fontFamily:s||r.fontFamily,fontSize:n||r.fontSize,fontStyle:t||r.fontStyle,fontWeight:i||r.fontWeight,fontVariant:e||r.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var r=this;this.Parse=function(t){for(var e={},i=S.trim(S.compressSpaces(t||"")).split(" "),n={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},s="",a=0;a<i.length;a++)n.fontStyle||-1==r.Styles.indexOf(i[a])?n.fontVariant||-1==r.Variants.indexOf(i[a])?n.fontWeight||-1==r.Weights.indexOf(i[a])?n.fontSize?"inherit"!=i[a]&&(s+=i[a]):("inherit"!=i[a]&&(e.fontSize=i[a].split("/")[0]),n.fontStyle=n.fontVariant=n.fontWeight=n.fontSize=!0):("inherit"!=i[a]&&(e.fontWeight=i[a]),n.fontStyle=n.fontVariant=n.fontWeight=!0):("inherit"!=i[a]&&(e.fontVariant=i[a]),n.fontStyle=n.fontVariant=!0):("inherit"!=i[a]&&(e.fontStyle=i[a]),n.fontStyle=!0);return""!=s&&(e.fontFamily=s),e}},S.ToNumberArray=function(t){for(var e=S.trim(S.compressSpaces((t||"").replace(/,/g," "))).split(" "),i=0;i<e.length;i++)e[i]=parseFloat(e[i]);return e},S.Point=function(t,e){this.x=t,this.y=e,this.angleTo=function(t){return Math.atan2(t.y-this.y,t.x-this.x)},this.applyTransform=function(t){var e=this.x*t[0]+this.y*t[2]+t[4],i=this.x*t[1]+this.y*t[3]+t[5];this.x=e,this.y=i}},S.CreatePoint=function(t){var e=S.ToNumberArray(t);return new S.Point(e[0],e[1])},S.CreatePath=function(t){for(var e=S.ToNumberArray(t),i=[],n=0;n<e.length;n+=2)i.push(new S.Point(e[n],e[n+1]));return i},S.BoundingBox=function(t,e,n,s){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN,this.x=function(){return this.x1},this.y=function(){return this.y1},this.width=function(){return this.x2-this.x1},this.height=function(){return this.y2-this.y1},this.addPoint=function(t,e){null!=t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,i,n,s,a){var r=t+2/3*(i-t),o=e+2/3*(n-e),l=r+1/3*(s-t),h=o+1/3*(a-e);this.addBezierCurve(t,e,r,l,o,h,s,a)},this.addBezierCurve=function(t,e,n,s,a,r,o,l){var h=[t,e],u=[n,s],f=[a,r],c=[o,l];for(this.addPoint(h[0],h[1]),this.addPoint(c[0],c[1]),i=0;i<=1;i++){function d(t){return Math.pow(1-t,3)*h[i]+3*Math.pow(1-t,2)*t*u[i]+3*(1-t)*Math.pow(t,2)*f[i]+Math.pow(t,3)*c[i]}var m=6*h[i]-12*u[i]+6*f[i],p=-3*h[i]+9*u[i]-9*f[i]+3*c[i],g=3*u[i]-3*h[i];if(0!=p){var y=Math.pow(m,2)-4*g*p;if(!(y<0)){var v=(-m+Math.sqrt(y))/(2*p);0<v&&v<1&&(0==i&&this.addX(d(v)),1==i&&this.addY(d(v)));var b=(-m-Math.sqrt(y))/(2*p);0<b&&b<1&&(0==i&&this.addX(d(b)),1==i&&this.addY(d(b)))}}else{if(0==m)continue;var x=-g/m;0<x&&x<1&&(0==i&&this.addX(d(x)),1==i&&this.addY(d(x)))}}},this.isPointInBox=function(t,e){return this.x1<=t&&t<=this.x2&&this.y1<=e&&e<=this.y2},this.addPoint(t,e),this.addPoint(n,s)},S.Transform=function(t){var e=this;this.Type={},this.Type.translate=function(t){this.p=S.CreatePoint(t),this.apply=function(t){t.translate(this.p.x||0,this.p.y||0)},this.applyToPoint=function(t){t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(t){var e=S.ToNumberArray(t);this.angle=new S.Property("angle",e[0]),this.cx=e[1]||0,this.cy=e[2]||0,this.apply=function(t){t.translate(this.cx,this.cy),t.rotate(this.angle.Angle.toRadians()),t.translate(-this.cx,-this.cy)},this.applyToPoint=function(t){var e=this.angle.Angle.toRadians();t.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]),t.applyTransform([Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0]),t.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(t){this.p=S.CreatePoint(t),this.apply=function(t){t.scale(this.p.x||1,this.p.y||this.p.x||1)},this.applyToPoint=function(t){t.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(t){this.m=S.ToNumberArray(t),this.apply=function(t){t.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])},this.applyToPoint=function(t){t.applyTransform(this.m)}},this.Type.SkewBase=function(t){this.base=e.Type.matrix,this.base(t),this.angle=new S.Property("angle",t)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(t){this.base=e.Type.SkewBase,this.base(t),this.m=[1,0,Math.tan(this.angle.Angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(t){this.base=e.Type.SkewBase,this.base(t),this.m=[1,Math.tan(this.angle.Angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].apply(t)},this.applyToPoint=function(t){for(var e=0;e<this.transforms.length;e++)this.transforms[e].applyToPoint(t)};for(var i=S.trim(S.compressSpaces(t)).split(/\s(?=[a-z])/),n=0;n<i.length;n++){var s=i[n].split("(")[0],a=i[n].split("(")[1].replace(")",""),r=new this.Type[s](a);this.transforms.push(r)}},S.AspectRatio=function(t,e,i,n,s,a,r,o,l,h){var u=(e=(e=S.compressSpaces(e)).replace(/^defer\s/,"")).split(" ")[0]||"xMidYMid",f=e.split(" ")[1]||"meet",c=i/n,d=s/a,m=Math.min(c,d),p=Math.max(c,d);"meet"==f&&(n*=m,a*=m),"slice"==f&&(n*=p,a*=p),l=new S.Property("refX",l),h=new S.Property("refY",h),l.hasValue()&&h.hasValue()?t.translate(-m*l.Length.toPixels("x"),-m*h.Length.toPixels("y")):(u.match(/^xMid/)&&("meet"==f&&m==d||"slice"==f&&p==d)&&t.translate(i/2-n/2,0),u.match(/YMid$/)&&("meet"==f&&m==c||"slice"==f&&p==c)&&t.translate(0,s/2-a/2),u.match(/^xMax/)&&("meet"==f&&m==d||"slice"==f&&p==d)&&t.translate(i-n,0),u.match(/YMax$/)&&("meet"==f&&m==c||"slice"==f&&p==c)&&t.translate(0,s-a)),"none"==u?t.scale(c,d):"meet"==f?t.scale(m,m):"slice"==f&&t.scale(p,p),t.translate(null==r?0:-r,null==o?0:-o)},S.Element={},S.Element.ElementBase=function(t){if(this.attributes={},this.styles={},this.children=[],this.attribute=function(t,e){var i=this.attributes[t];return null!=i||(i=new S.Property(t,""),1==e&&(this.attributes[t]=i)),i},this.style=function(t,e){var i=this.styles[t];if(null!=i)return i;var n=this.attribute(t);if(null!=n&&n.hasValue())return n;var s=this.parent;if(null!=s){var a=s.style(t);if(null!=a&&a.hasValue())return a}return i=new S.Property(t,""),1==e&&(this.styles[t]=i),i},this.render=function(t){if("none"!=this.style("display").value&&"hidden"!=this.attribute("visibility").value){if(t.save(),this.setContext(t),this.attribute("mask").hasValue()){var e=this.attribute("mask").Definition.getDefinition();null!=e&&e.apply(t,this)}else if(this.style("filter").hasValue()){var i=this.style("filter").Definition.getDefinition();null!=i&&i.apply(t,this)}else this.renderChildren(t);this.clearContext(t),t.restore()}},this.setContext=function(t){},this.clearContext=function(t){},this.renderChildren=function(t){for(var e=0;e<this.children.length;e++)this.children[e].render(t)},this.addChild=function(t,e){var i=t;e&&(i=S.CreateElement(t)),(i.parent=this).children.push(i)},null!=t&&1==t.nodeType){for(var e=0;e<t.childNodes.length;e++){var i=t.childNodes[e];1==i.nodeType&&this.addChild(i,!0)}for(e=0;e<t.attributes.length;e++){var n=t.attributes[e];this.attributes[n.nodeName]=new S.Property(n.nodeName,n.nodeValue)}if(null!=(o=S.Styles[t.nodeName]))for(var s in o)this.styles[s]=o[s];if(this.attribute("class").hasValue())for(var a=S.compressSpaces(this.attribute("class").value).split(" "),r=0;r<a.length;r++){if(null!=(o=S.Styles["."+a[r]]))for(var s in o)this.styles[s]=o[s];if(null!=(o=S.Styles[t.nodeName+"."+a[r]]))for(var s in o)this.styles[s]=o[s]}if(this.attribute("style").hasValue()){var o=this.attribute("style").value.split(";");for(e=0;e<o.length;e++)if(""!=S.trim(o[e])){var l=o[e].split(":"),h=(s=S.trim(l[0]),S.trim(l[1]));this.styles[s]=new S.Property(s,h)}}this.attribute("id").hasValue()&&null==S.Definitions[this.attribute("id").value]&&(S.Definitions[this.attribute("id").value]=this)}},S.Element.RenderedElementBase=function(t){this.base=S.Element.ElementBase,this.base(t),this.setContext=function(t){var e;if(this.style("fill").Definition.isUrl())null!=(e=this.style("fill").Definition.getFillStyle(this))&&(t.fillStyle=e);else if(this.style("fill").hasValue()){var i=this.style("fill");this.style("fill-opacity").hasValue()&&(i=i.Color.addOpacity(this.style("fill-opacity").value)),t.fillStyle="none"==i.value?"rgba(0,0,0,0)":i.value}if(this.style("stroke").Definition.isUrl())null!=(e=this.style("stroke").Definition.getFillStyle(this))&&(t.strokeStyle=e);else if(this.style("stroke").hasValue()){var n=this.style("stroke");this.style("stroke-opacity").hasValue()&&(n=n.Color.addOpacity(this.style("stroke-opacity").value)),t.strokeStyle="none"==n.value?"rgba(0,0,0,0)":n.value}if(this.style("stroke-width").hasValue()&&(t.lineWidth=this.style("stroke-width").Length.toPixels()),this.style("stroke-linecap").hasValue()&&(t.lineCap=this.style("stroke-linecap").value),this.style("stroke-linejoin").hasValue()&&(t.lineJoin=this.style("stroke-linejoin").value),this.style("stroke-miterlimit").hasValue()&&(t.miterLimit=this.style("stroke-miterlimit").value),void 0!==t.font&&(t.font=S.Font.CreateFont(this.style("font-style").value,this.style("font-variant").value,this.style("font-weight").value,this.style("font-size").hasValue()?this.style("font-size").Length.toPixels()+"px":"",this.style("font-family").value).toString()),this.attribute("transform").hasValue()&&new S.Transform(this.attribute("transform").value).apply(t),this.attribute("clip-path").hasValue()){var s=this.attribute("clip-path").Definition.getDefinition();null!=s&&s.apply(t)}this.style("opacity").hasValue()&&(t.globalAlpha=this.style("opacity").numValue())}},S.Element.RenderedElementBase.prototype=new S.Element.ElementBase,S.Element.PathElementBase=function(t){this.base=S.Element.RenderedElementBase,this.base(t),this.path=function(t){return null!=t&&t.beginPath(),new S.BoundingBox},this.renderChildren=function(t){this.path(t),S.Mouse.checkPath(this,t),""!=t.fillStyle&&t.fill(),""!=t.strokeStyle&&t.stroke();var e=this.getMarkers();if(null!=e){if(this.style("marker-start").Definition.isUrl()&&(i=this.style("marker-start").Definition.getDefinition()).render(t,e[0][0],e[0][1]),this.style("marker-mid").Definition.isUrl())for(var i=this.style("marker-mid").Definition.getDefinition(),n=1;n<e.length-1;n++)i.render(t,e[n][0],e[n][1]);this.style("marker-end").Definition.isUrl()&&(i=this.style("marker-end").Definition.getDefinition()).render(t,e[e.length-1][0],e[e.length-1][1])}},this.getBoundingBox=function(){return this.path()},this.getMarkers=function(){return null}},S.Element.PathElementBase.prototype=new S.Element.RenderedElementBase,S.Element.svg=function(t){this.base=S.Element.RenderedElementBase,this.base(t),this.baseClearContext=this.clearContext,this.clearContext=function(t){this.baseClearContext(t),S.ViewPort.RemoveCurrent()},this.baseSetContext=this.setContext,this.setContext=function(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4,this.baseSetContext(t),this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&t.translate(this.attribute("x").Length.toPixels("x"),this.attribute("y").Length.toPixels("y"));var e=S.ViewPort.width(),i=S.ViewPort.height();if(void 0===this.root&&this.attribute("width").hasValue()&&this.attribute("height").hasValue()){e=this.attribute("width").Length.toPixels("x"),i=this.attribute("height").Length.toPixels("y");var n=0,s=0;this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(n=-this.attribute("refX").Length.toPixels("x"),s=-this.attribute("refY").Length.toPixels("y")),t.beginPath(),t.moveTo(n,s),t.lineTo(e,s),t.lineTo(e,i),t.lineTo(n,i),t.closePath(),t.clip()}if(S.ViewPort.SetCurrent(e,i),this.attribute("viewBox").hasValue()){var a=S.ToNumberArray(this.attribute("viewBox").value),r=a[0],o=a[1];e=a[2],i=a[3],S.AspectRatio(t,this.attribute("preserveAspectRatio").value,S.ViewPort.width(),e,S.ViewPort.height(),i,r,o,this.attribute("refX").value,this.attribute("refY").value),S.ViewPort.RemoveCurrent(),S.ViewPort.SetCurrent(a[2],a[3])}}},S.Element.svg.prototype=new S.Element.RenderedElementBase,S.Element.rect=function(t){this.base=S.Element.PathElementBase,this.base(t),this.path=function(t){var e=this.attribute("x").Length.toPixels("x"),i=this.attribute("y").Length.toPixels("y"),n=this.attribute("width").Length.toPixels("x"),s=this.attribute("height").Length.toPixels("y"),a=this.attribute("rx").Length.toPixels("x"),r=this.attribute("ry").Length.toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(r=a),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(a=r),null!=t&&(t.beginPath(),t.moveTo(e+a,i),t.lineTo(e+n-a,i),t.quadraticCurveTo(e+n,i,e+n,i+r),t.lineTo(e+n,i+s-r),t.quadraticCurveTo(e+n,i+s,e+n-a,i+s),t.lineTo(e+a,i+s),t.quadraticCurveTo(e,i+s,e,i+s-r),t.lineTo(e,i+r),t.quadraticCurveTo(e,i,e+a,i),t.closePath()),new S.BoundingBox(e,i,e+n,i+s)}},S.Element.rect.prototype=new S.Element.PathElementBase,S.Element.circle=function(t){this.base=S.Element.PathElementBase,this.base(t),this.path=function(t){var e=this.attribute("cx").Length.toPixels("x"),i=this.attribute("cy").Length.toPixels("y"),n=this.attribute("r").Length.toPixels();return null!=t&&(t.beginPath(),t.arc(e,i,n,0,2*Math.PI,!0),t.closePath()),new S.BoundingBox(e-n,i-n,e+n,i+n)}},S.Element.circle.prototype=new S.Element.PathElementBase,S.Element.ellipse=function(t){this.base=S.Element.PathElementBase,this.base(t),this.path=function(t){var e=(Math.sqrt(2)-1)/3*4,i=this.attribute("rx").Length.toPixels("x"),n=this.attribute("ry").Length.toPixels("y"),s=this.attribute("cx").Length.toPixels("x"),a=this.attribute("cy").Length.toPixels("y");return null!=t&&(t.beginPath(),t.moveTo(s,a-n),t.bezierCurveTo(s+e*i,a-n,s+i,a-e*n,s+i,a),t.bezierCurveTo(s+i,a+e*n,s+e*i,a+n,s,a+n),t.bezierCurveTo(s-e*i,a+n,s-i,a+e*n,s-i,a),t.bezierCurveTo(s-i,a-e*n,s-e*i,a-n,s,a-n),t.closePath()),new S.BoundingBox(s-i,a-n,s+i,a+n)}},S.Element.ellipse.prototype=new S.Element.PathElementBase,S.Element.line=function(t){this.base=S.Element.PathElementBase,this.base(t),this.getPoints=function(){return[new S.Point(this.attribute("x1").Length.toPixels("x"),this.attribute("y1").Length.toPixels("y")),new S.Point(this.attribute("x2").Length.toPixels("x"),this.attribute("y2").Length.toPixels("y"))]},this.path=function(t){var e=this.getPoints();return null!=t&&(t.beginPath(),t.moveTo(e[0].x,e[0].y),t.lineTo(e[1].x,e[1].y)),new S.BoundingBox(e[0].x,e[0].y,e[1].x,e[1].y)},this.getMarkers=function(){var t=this.getPoints(),e=t[0].angleTo(t[1]);return[[t[0],e],[t[1],e]]}},S.Element.line.prototype=new S.Element.PathElementBase,S.Element.polyline=function(t){this.base=S.Element.PathElementBase,this.base(t),this.points=S.CreatePath(this.attribute("points").value),this.path=function(t){var e=new S.BoundingBox(this.points[0].x,this.points[0].y);null!=t&&(t.beginPath(),t.moveTo(this.points[0].x,this.points[0].y));for(var i=1;i<this.points.length;i++)e.addPoint(this.points[i].x,this.points[i].y),null!=t&&t.lineTo(this.points[i].x,this.points[i].y);return e},this.getMarkers=function(){for(var t=[],e=0;e<this.points.length-1;e++)t.push([this.points[e],this.points[e].angleTo(this.points[e+1])]);return t.push([this.points[this.points.length-1],t[t.length-1][1]]),t}},S.Element.polyline.prototype=new S.Element.PathElementBase,S.Element.polygon=function(t){this.base=S.Element.polyline,this.base(t),this.basePath=this.path,this.path=function(t){var e=this.basePath(t);return null!=t&&(t.lineTo(this.points[0].x,this.points[0].y),t.closePath()),e}},S.Element.polygon.prototype=new S.Element.polyline,S.Element.path=function(t){this.base=S.Element.PathElementBase,this.base(t);var e=this.attribute("d").value;e=(e=(e=(e=(e=(e=(e=(e=e.replace(/,/gm," ")).replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([MmZzLlHhVvCcSsQqTtAa])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2")).replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2")).replace(/([0-9])([+\-])/gm,"$1 $2")).replace(/(\.[0-9]*)(\.)/gm,"$1 $2")).replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 "),e=S.compressSpaces(e),e=S.trim(e),this.PathParser=new function(t){this.tokens=t.split(" "),this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new S.Point(0,0),this.control=new S.Point(0,0),this.current=new S.Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){return this.command==this.command.toLowerCase()},this.getToken=function(){return this.i=this.i+1,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new S.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t},this.getReflectedControlPoint=function(){return"c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()?this.current:new S.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x=this.current.x+t.x,t.y=this.current.y+t.y),t},this.addMarker=function(t,e,i){null!=i&&0<this.angles.length&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(i)),this.addMarkerAngle(t,null==e?null:e.angleTo(t))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t<this.angles.length;t++)if(null==this.angles[t])for(var e=t+1;e<this.angles.length;e++)if(null!=this.angles[e]){this.angles[t]=this.angles[e];break}return this.angles}}(e),this.path=function(t){var e=this.PathParser;e.reset();var i=new S.BoundingBox;for(null!=t&&t.beginPath();!e.isEnd();)switch(e.nextCommand(),e.command.toUpperCase()){case"M":var n=e.getAsCurrentPoint();for(e.addMarker(n),i.addPoint(n.x,n.y),null!=t&&t.moveTo(n.x,n.y),e.start=e.current;!e.isCommandOrEnd();)n=e.getAsCurrentPoint(),e.addMarker(n,e.start),i.addPoint(n.x,n.y),null!=t&&t.lineTo(n.x,n.y);break;case"L":for(;!e.isCommandOrEnd();){var s=e.current;n=e.getAsCurrentPoint(),e.addMarker(n,s),i.addPoint(n.x,n.y),null!=t&&t.lineTo(n.x,n.y)}break;case"H":for(;!e.isCommandOrEnd();){var a=new S.Point((e.isRelativeCommand()?e.current.x:0)+e.getScalar(),e.current.y);e.addMarker(a,e.current),e.current=a,i.addPoint(e.current.x,e.current.y),null!=t&&t.lineTo(e.current.x,e.current.y)}break;case"V":for(;!e.isCommandOrEnd();)a=new S.Point(e.current.x,(e.isRelativeCommand()?e.current.y:0)+e.getScalar()),e.addMarker(a,e.current),e.current=a,i.addPoint(e.current.x,e.current.y),null!=t&&t.lineTo(e.current.x,e.current.y);break;case"C":for(;!e.isCommandOrEnd();){var r=e.current,o=e.getPoint(),l=e.getAsControlPoint(),h=e.getAsCurrentPoint();e.addMarker(h,l,o),i.addBezierCurve(r.x,r.y,o.x,o.y,l.x,l.y,h.x,h.y),null!=t&&t.bezierCurveTo(o.x,o.y,l.x,l.y,h.x,h.y)}break;case"S":for(;!e.isCommandOrEnd();)r=e.current,o=e.getReflectedControlPoint(),l=e.getAsControlPoint(),h=e.getAsCurrentPoint(),e.addMarker(h,l,o),i.addBezierCurve(r.x,r.y,o.x,o.y,l.x,l.y,h.x,h.y),null!=t&&t.bezierCurveTo(o.x,o.y,l.x,l.y,h.x,h.y);break;case"Q":for(;!e.isCommandOrEnd();)r=e.current,l=e.getAsControlPoint(),h=e.getAsCurrentPoint(),e.addMarker(h,l,l),i.addQuadraticCurve(r.x,r.y,l.x,l.y,h.x,h.y),null!=t&&t.quadraticCurveTo(l.x,l.y,h.x,h.y);break;case"T":for(;!e.isCommandOrEnd();)r=e.current,l=e.getReflectedControlPoint(),e.control=l,h=e.getAsCurrentPoint(),e.addMarker(h,l,l),i.addQuadraticCurve(r.x,r.y,l.x,l.y,h.x,h.y),null!=t&&t.quadraticCurveTo(l.x,l.y,h.x,h.y);break;case"A":for(;!e.isCommandOrEnd();){r=e.current;var u=e.getScalar(),f=e.getScalar(),c=e.getScalar()*(Math.PI/180),d=e.getScalar(),m=e.getScalar(),p=(h=e.getAsCurrentPoint(),new S.Point(Math.cos(c)*(r.x-h.x)/2+Math.sin(c)*(r.y-h.y)/2,-Math.sin(c)*(r.x-h.x)/2+Math.cos(c)*(r.y-h.y)/2)),g=Math.pow(p.x,2)/Math.pow(u,2)+Math.pow(p.y,2)/Math.pow(f,2);1<g&&(u*=Math.sqrt(g),f*=Math.sqrt(g));var y=(d==m?-1:1)*Math.sqrt((Math.pow(u,2)*Math.pow(f,2)-Math.pow(u,2)*Math.pow(p.y,2)-Math.pow(f,2)*Math.pow(p.x,2))/(Math.pow(u,2)*Math.pow(p.y,2)+Math.pow(f,2)*Math.pow(p.x,2)));function v(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function b(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(E(t,e))}isNaN(y)&&(y=0);var x=new S.Point(y*u*p.y/f,y*-f*p.x/u),w=new S.Point((r.x+h.x)/2+Math.cos(c)*x.x-Math.sin(c)*x.y,(r.y+h.y)/2+Math.sin(c)*x.x+Math.cos(c)*x.y),E=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(v(t)*v(e))},P=b([1,0],[(p.x-x.x)/u,(p.y-x.y)/f]),C=[(p.x-x.x)/u,(p.y-x.y)/f],B=[(-p.x-x.x)/u,(-p.y-x.y)/f],T=b(C,B);E(C,B)<=-1&&(T=Math.PI),1<=E(C,B)&&(T=0),0==m&&0<T&&(T-=2*Math.PI),1==m&&T<0&&(T+=2*Math.PI);var k=new S.Point(w.x-u*Math.cos((P+T)/2),w.y-f*Math.sin((P+T)/2));if(e.addMarkerAngle(k,(P+T)/2+(0==m?1:-1)*Math.PI/2),e.addMarkerAngle(h,T+(0==m?1:-1)*Math.PI/2),i.addPoint(h.x,h.y),null!=t){E=f<u?u:f;var V=f<u?1:u/f,M=f<u?f/u:1;t.translate(w.x,w.y),t.rotate(c),t.scale(V,M),t.arc(0,0,E,P,P+T,1-m),t.scale(1/V,1/M),t.rotate(-c),t.translate(-w.x,-w.y)}}break;case"Z":null!=t&&t.closePath(),e.current=e.start}return i},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),i=[],n=0;n<t.length;n++)i.push([t[n],e[n]]);return i}},S.Element.path.prototype=new S.Element.PathElementBase,S.Element.pattern=function(t){this.base=S.Element.ElementBase,this.base(t),this.createPattern=function(t,e){var i=new S.Element.svg;i.attributes.viewBox=new S.Property("viewBox",this.attribute("viewBox").value),i.attributes.x=new S.Property("x",this.attribute("x").value),i.attributes.y=new S.Property("y",this.attribute("y").value),i.attributes.width=new S.Property("width",this.attribute("width").value),i.attributes.height=new S.Property("height",this.attribute("height").value),i.children=this.children;var n=document.createElement("canvas");return n.width=this.attribute("width").Length.toPixels("x"),n.height=this.attribute("height").Length.toPixels("y"),i.render(n.getContext("2d")),t.createPattern(n,"repeat")}},S.Element.pattern.prototype=new S.Element.ElementBase,S.Element.marker=function(t){this.base=S.Element.ElementBase,this.base(t),this.baseRender=this.render,this.render=function(t,e,i){t.translate(e.x,e.y),"auto"==this.attribute("orient").valueOrDefault("auto")&&t.rotate(i),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&t.scale(t.lineWidth,t.lineWidth),t.save();var n=new S.Element.svg;n.attributes.viewBox=new S.Property("viewBox",this.attribute("viewBox").value),n.attributes.refX=new S.Property("refX",this.attribute("refX").value),n.attributes.refY=new S.Property("refY",this.attribute("refY").value),n.attributes.width=new S.Property("width",this.attribute("markerWidth").value),n.attributes.height=new S.Property("height",this.attribute("markerHeight").value),n.attributes.fill=new S.Property("fill",this.attribute("fill").valueOrDefault("black")),n.attributes.stroke=new S.Property("stroke",this.attribute("stroke").valueOrDefault("none")),n.children=this.children,n.render(t),t.restore(),"strokeWidth"==this.attribute("markerUnits").valueOrDefault("strokeWidth")&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"==this.attribute("orient").valueOrDefault("auto")&&t.rotate(-i),t.translate(-e.x,-e.y)}},S.Element.marker.prototype=new S.Element.ElementBase,S.Element.defs=function(t){this.base=S.Element.ElementBase,this.base(t),this.render=function(t){}},S.Element.defs.prototype=new S.Element.ElementBase,S.Element.GradientBase=function(t){this.base=S.Element.ElementBase,this.base(t),this.gradientUnits=this.attribute("gradientUnits").valueOrDefault("objectBoundingBox"),this.stops=[];for(var e=0;e<this.children.length;e++){var i=this.children[e];this.stops.push(i)}this.getGradient=function(){},this.createGradient=function(t,e){var i=this;this.attribute("xlink:href").hasValue()&&(i=this.attribute("xlink:href").Definition.getDefinition());for(var n=this.getGradient(t,e),s=0;s<i.stops.length;s++)n.addColorStop(i.stops[s].offset,i.stops[s].color);if(this.attribute("gradientTransform").hasValue()){var a=S.ViewPort.viewPorts[0],r=new S.Element.rect;r.attributes.x=new S.Property("x",-S.MAX_VIRTUAL_PIXELS/3),r.attributes.y=new S.Property("y",-S.MAX_VIRTUAL_PIXELS/3),r.attributes.width=new S.Property("width",S.MAX_VIRTUAL_PIXELS),r.attributes.height=new S.Property("height",S.MAX_VIRTUAL_PIXELS);var o=new S.Element.g;o.attributes.transform=new S.Property("transform",this.attribute("gradientTransform").value),o.children=[r];var l=new S.Element.svg;l.attributes.x=new S.Property("x",0),l.attributes.y=new S.Property("y",0),l.attributes.width=new S.Property("width",a.width),l.attributes.height=new S.Property("height",a.height),l.children=[o];var h=document.createElement("canvas");h.width=a.width,h.height=a.height;var u=h.getContext("2d");return u.fillStyle=n,l.render(u),u.createPattern(h,"no-repeat")}return n}},S.Element.GradientBase.prototype=new S.Element.ElementBase,S.Element.linearGradient=function(t){this.base=S.Element.GradientBase,this.base(t),this.getGradient=function(t,e){var i=e.getBoundingBox(),n="objectBoundingBox"==this.gradientUnits?i.x()+i.width()*this.attribute("x1").numValue():this.attribute("x1").Length.toPixels("x"),s="objectBoundingBox"==this.gradientUnits?i.y()+i.height()*this.attribute("y1").numValue():this.attribute("y1").Length.toPixels("y"),a="objectBoundingBox"==this.gradientUnits?i.x()+i.width()*this.attribute("x2").numValue():this.attribute("x2").Length.toPixels("x"),r="objectBoundingBox"==this.gradientUnits?i.y()+i.height()*this.attribute("y2").numValue():this.attribute("y2").Length.toPixels("y");return t.createLinearGradient(n,s,a,r)}},S.Element.linearGradient.prototype=new S.Element.GradientBase,S.Element.radialGradient=function(t){this.base=S.Element.GradientBase,this.base(t),this.getGradient=function(t,e){var i=e.getBoundingBox(),n="objectBoundingBox"==this.gradientUnits?i.x()+i.width()*this.attribute("cx").numValue():this.attribute("cx").Length.toPixels("x"),s="objectBoundingBox"==this.gradientUnits?i.y()+i.height()*this.attribute("cy").numValue():this.attribute("cy").Length.toPixels("y"),a=n,r=s;this.attribute("fx").hasValue()&&(a="objectBoundingBox"==this.gradientUnits?i.x()+i.width()*this.attribute("fx").numValue():this.attribute("fx").Length.toPixels("x")),this.attribute("fy").hasValue()&&(r="objectBoundingBox"==this.gradientUnits?i.y()+i.height()*this.attribute("fy").numValue():this.attribute("fy").Length.toPixels("y"));var o="objectBoundingBox"==this.gradientUnits?(i.width()+i.height())/2*this.attribute("r").numValue():this.attribute("r").Length.toPixels();return t.createRadialGradient(a,r,0,n,s,o)}},S.Element.radialGradient.prototype=new S.Element.GradientBase,S.Element.stop=function(t){this.base=S.Element.ElementBase,this.base(t),this.offset=this.attribute("offset").numValue();var e=this.style("stop-color");this.style("stop-opacity").hasValue()&&(e=e.Color.addOpacity(this.style("stop-opacity").value)),this.color=e.value},S.Element.stop.prototype=new S.Element.ElementBase,S.Element.AnimateBase=function(t){this.base=S.Element.ElementBase,this.base(t),S.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").Time.toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").Time.toMilliseconds(),this.getProperty=function(){var t=this.attribute("attributeType").value,e=this.attribute("attributeName").value;return"CSS"==t?this.parent.style(e,!0):this.parent.attribute(e,!0)},this.initialValue=null,this.removed=!1,this.calcValue=function(){return""},this.update=function(t){if(null==this.initialValue&&(this.initialValue=this.getProperty().value),this.duration>this.maxDuration){if("indefinite"!=this.attribute("repeatCount").value)return"remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed&&(this.removed=!0,this.getProperty().value=this.initialValue,!0);this.duration=0}this.duration=this.duration+t;var e=!1;if(this.begin<this.duration){var i=this.calcValue();this.attribute("type").hasValue()&&(i=this.attribute("type").value+"("+i+")"),this.getProperty().value=i,e=!0}return e},this.progress=function(){return(this.duration-this.begin)/(this.maxDuration-this.begin)}},S.Element.AnimateBase.prototype=new S.Element.ElementBase,S.Element.animate=function(t){this.base=S.Element.AnimateBase,this.base(t),this.calcValue=function(){var t=this.attribute("from").numValue();return t+(this.attribute("to").numValue()-t)*this.progress()}},S.Element.animate.prototype=new S.Element.AnimateBase,S.Element.animateColor=function(t){this.base=S.Element.AnimateBase,this.base(t),this.calcValue=function(){var t=new RGBColor(this.attribute("from").value),e=new RGBColor(this.attribute("to").value);if(t.ok&&e.ok){var i=t.r+(e.r-t.r)*this.progress(),n=t.g+(e.g-t.g)*this.progress(),s=t.b+(e.b-t.b)*this.progress();return"rgb("+parseInt(i,10)+","+parseInt(n,10)+","+parseInt(s,10)+")"}return this.attribute("from").value}},S.Element.animateColor.prototype=new S.Element.AnimateBase,S.Element.animateTransform=function(t){this.base=S.Element.animate,this.base(t)},S.Element.animateTransform.prototype=new S.Element.animate,S.Element.font=function(t){this.base=S.Element.ElementBase,this.base(t),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[];for(var e=0;e<this.children.length;e++){var i=this.children[e];"font-face"==i.type?(this.fontFace=i).style("font-family").hasValue()&&(S.Definitions[i.style("font-family").value]=this):"missing-glyph"==i.type?this.missingGlyph=i:"glyph"==i.type&&(""!=i.arabicForm?(this.isRTL=!0,this.isArabic=!0,void 0===this.glyphs[i.unicode]&&(this.glyphs[i.unicode]=[]),this.glyphs[i.unicode][i.arabicForm]=i):this.glyphs[i.unicode]=i)}},S.Element.font.prototype=new S.Element.ElementBase,S.Element.fontface=function(t){this.base=S.Element.ElementBase,this.base(t),this.ascent=this.attribute("ascent").value,this.descent=this.attribute("descent").value,this.unitsPerEm=this.attribute("units-per-em").numValue()},S.Element.fontface.prototype=new S.Element.ElementBase,S.Element.missingglyph=function(t){this.base=S.Element.path,this.base(t),this.horizAdvX=0},S.Element.missingglyph.prototype=new S.Element.path,S.Element.glyph=function(t){this.base=S.Element.path,this.base(t),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.unicode=this.attribute("unicode").value,this.arabicForm=this.attribute("arabic-form").value},S.Element.glyph.prototype=new S.Element.path,S.Element.text=function(t){if(this.base=S.Element.RenderedElementBase,this.base(t),null!=t){this.children=[];for(var e=0;e<t.childNodes.length;e++){var i=t.childNodes[e];1==i.nodeType?this.addChild(i,!0):3==i.nodeType&&this.addChild(new S.Element.tspan(i),!1)}}this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t),this.style("dominant-baseline").hasValue()&&(t.textBaseline=this.style("dominant-baseline").value),this.style("alignment-baseline").hasValue()&&(t.textBaseline=this.style("alignment-baseline").value)},this.renderChildren=function(t){for(var e=this.style("text-anchor").valueOrDefault("start"),i=this.attribute("x").Length.toPixels("x"),n=this.attribute("y").Length.toPixels("y"),s=0;s<this.children.length;s++){var a=this.children[s];a.attribute("x").hasValue()?a.x=a.attribute("x").Length.toPixels("x"):(a.attribute("dx").hasValue()&&(i+=a.attribute("dx").Length.toPixels("x")),a.x=i);var r=a.measureText(t);if("start"!=e&&(0==s||a.attribute("x").hasValue())){for(var o=r,l=s+1;l<this.children.length;l++){var h=this.children[l];if(h.attribute("x").hasValue())break;o+=h.measureText(t)}a.x-="end"==e?o:o/2}i=a.x+r,a.attribute("y").hasValue()?a.y=a.attribute("y").Length.toPixels("y"):(a.attribute("dy").hasValue()&&(n+=a.attribute("dy").Length.toPixels("y")),a.y=n),n=a.y,a.render(t)}}},S.Element.text.prototype=new S.Element.RenderedElementBase,S.Element.TextElementBase=function(t){this.base=S.Element.RenderedElementBase,this.base(t),this.getGlyph=function(t,e,i){var n=e[i],s=null;if(t.isArabic){var a="isolated";(0==i||" "==e[i-1])&&i<e.length-2&&" "!=e[i+1]&&(a="terminal"),0<i&&" "!=e[i-1]&&i<e.length-2&&" "!=e[i+1]&&(a="medial"),0<i&&" "!=e[i-1]&&(i==e.length-1||" "==e[i+1])&&(a="initial"),void 0!==t.glyphs[n]&&null==(s=t.glyphs[n][a])&&"glyph"==t.glyphs[n].type&&(s=t.glyphs[n])}else s=t.glyphs[n];return null==s&&(s=t.missingGlyph),s},this.renderChildren=function(t){var e=this.parent.style("font-family").Definition.getDefinition();if(null==e)""!=t.strokeStyle&&t.strokeText(S.compressSpaces(this.getText()),this.x,this.y),""!=t.fillStyle&&t.fillText(S.compressSpaces(this.getText()),this.x,this.y);else{var i=this.parent.style("font-size").numValueOrDefault(S.Font.Parse(S.ctx.font).fontSize),n=this.parent.style("font-style").valueOrDefault(S.Font.Parse(S.ctx.font).fontStyle),s=this.getText();e.isRTL&&(s=s.split("").reverse().join(""));for(var a=S.ToNumberArray(this.parent.attribute("dx").value),r=0;r<s.length;r++){var o=this.getGlyph(e,s,r),l=i/e.fontFace.unitsPerEm;t.translate(this.x,this.y),t.scale(l,-l);var h=t.lineWidth;t.lineWidth=t.lineWidth*e.fontFace.unitsPerEm/i,"italic"==n&&t.transform(1,0,.4,1,0,0),o.render(t),"italic"==n&&t.transform(1,0,-.4,1,0,0),t.lineWidth=h,t.scale(1/l,-1/l),t.translate(-this.x,-this.y),this.x+=i*(o.horizAdvX||e.horizAdvX)/e.fontFace.unitsPerEm,void 0===a[r]||isNaN(a[r])||(this.x+=a[r])}}},this.getText=function(){},this.measureText=function(t){var e=this.parent.style("font-family").Definition.getDefinition();if(null!=e){var i=this.parent.style("font-size").numValueOrDefault(S.Font.Parse(S.ctx.font).fontSize),n=0,s=this.getText();e.isRTL&&(s=s.split("").reverse().join(""));for(var a=S.ToNumberArray(this.parent.attribute("dx").value),r=0;r<s.length;r++)n+=(this.getGlyph(e,s,r).horizAdvX||e.horizAdvX)*i/e.fontFace.unitsPerEm,void 0===a[r]||isNaN(a[r])||(n+=a[r]);return n}var o=S.compressSpaces(this.getText());if(!t.measureText)return 10*o.length;t.save(),this.setContext(t);var l=t.measureText(o).width;return t.restore(),l}},S.Element.TextElementBase.prototype=new S.Element.RenderedElementBase,S.Element.tspan=function(t){this.base=S.Element.TextElementBase,this.base(t),this.text=3==t.nodeType?t.nodeValue:0<t.childNodes.length?t.childNodes[0].nodeValue:t.text,this.getText=function(){return this.text}},S.Element.tspan.prototype=new S.Element.TextElementBase,S.Element.tref=function(t){this.base=S.Element.TextElementBase,this.base(t),this.getText=function(){var t=this.attribute("xlink:href").Definition.getDefinition();if(null!=t)return t.children[0].getText()}},S.Element.tref.prototype=new S.Element.TextElementBase,S.Element.a=function(t){this.base=S.Element.TextElementBase,this.base(t),this.hasText=!0;for(var e=0;e<t.childNodes.length;e++)3!=t.childNodes[e].nodeType&&(this.hasText=!1);this.text=this.hasText?t.childNodes[0].nodeValue:"",this.getText=function(){return this.text},this.baseRenderChildren=this.renderChildren,this.renderChildren=function(t){if(this.hasText){this.baseRenderChildren(t);var e=new S.Property("fontSize",S.Font.Parse(S.ctx.font).fontSize);S.Mouse.checkBoundingBox(this,new S.BoundingBox(this.x,this.y-e.Length.toPixels("y"),this.x+this.measureText(t),this.y))}else{var i=new S.Element.g;i.children=this.children,i.parent=this,i.render(t)}},this.onclick=function(){window.open(this.attribute("xlink:href").value)},this.onmousemove=function(){S.ctx.canvas.style.cursor="pointer"}},S.Element.a.prototype=new S.Element.TextElementBase,S.Element.image=function(t){this.base=S.Element.RenderedElementBase,this.base(t),S.Images.push(this),this.img=document.createElement("img"),this.loaded=!1;var e=this;this.img.onload=function(){e.loaded=!0},this.img.src=this.attribute("xlink:href").value,this.renderChildren=function(t){var e=this.attribute("x").Length.toPixels("x"),i=this.attribute("y").Length.toPixels("y"),n=this.attribute("width").Length.toPixels("x"),s=this.attribute("height").Length.toPixels("y");0!=n&&0!=s&&(t.save(),t.translate(e,i),S.AspectRatio(t,this.attribute("preserveAspectRatio").value,n,this.img.width,s,this.img.height,0,0),t.drawImage(this.img,0,0),t.restore())}},S.Element.image.prototype=new S.Element.RenderedElementBase,S.Element.g=function(t){this.base=S.Element.RenderedElementBase,this.base(t),this.getBoundingBox=function(){for(var t=new S.BoundingBox,e=0;e<this.children.length;e++)t.addBoundingBox(this.children[e].getBoundingBox());return t}},S.Element.g.prototype=new S.Element.RenderedElementBase,S.Element.symbol=function(t){this.base=S.Element.RenderedElementBase,this.base(t),this.baseSetContext=this.setContext,this.setContext=function(t){if(this.baseSetContext(t),this.attribute("viewBox").hasValue()){var e=S.ToNumberArray(this.attribute("viewBox").value),i=e[0],n=e[1];width=e[2],height=e[3],S.AspectRatio(t,this.attribute("preserveAspectRatio").value,this.attribute("width").Length.toPixels("x"),width,this.attribute("height").Length.toPixels("y"),height,i,n),S.ViewPort.SetCurrent(e[2],e[3])}}},S.Element.symbol.prototype=new S.Element.RenderedElementBase,S.Element.style=function(t){this.base=S.Element.ElementBase,this.base(t);var e=t.childNodes[0].nodeValue+(1<t.childNodes.length?t.childNodes[1].nodeValue:"");e=e.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"");for(var i=(e=S.compressSpaces(e)).split("}"),n=0;n<i.length;n++)if(""!=S.trim(i[n]))for(var s=i[n].split("{"),a=s[0].split(","),r=s[1].split(";"),o=0;o<a.length;o++){var l=S.trim(a[o]);if(""!=l){for(var h={},u=0;u<r.length;u++){var f=r[u].indexOf(":"),c=r[u].substr(0,f),d=r[u].substr(f+1,r[u].length-f);null!=c&&null!=d&&(h[S.trim(c)]=new S.Property(S.trim(c),S.trim(d)))}if(S.Styles[l]=h,"@font-face"==l)for(var m=h["font-family"].value.replace(/"/g,""),p=h.src.value.split(","),g=0;g<p.length;g++)if(0<p[g].indexOf('format("svg")'))for(var y=p[g].indexOf("url"),v=p[g].indexOf(")",y),b=p[g].substr(y+5,v-y-6),x=S.parseXml(S.ajax(b)).getElementsByTagName("font"),w=0;w<x.length;w++){var E=S.CreateElement(x[w]);S.Definitions[m]=E}}}},S.Element.style.prototype=new S.Element.ElementBase,S.Element.use=function(t){this.base=S.Element.RenderedElementBase,this.base(t),this.baseSetContext=this.setContext,this.setContext=function(t){this.baseSetContext(t),this.attribute("x").hasValue()&&t.translate(this.attribute("x").Length.toPixels("x"),0),this.attribute("y").hasValue()&&t.translate(0,this.attribute("y").Length.toPixels("y"))},this.getDefinition=function(){var t=this.attribute("xlink:href").Definition.getDefinition();return this.attribute("width").hasValue()&&(t.attribute("width",!0).value=this.attribute("width").value),this.attribute("height").hasValue()&&(t.attribute("height",!0).value=this.attribute("height").value),t},this.path=function(t){var e=this.getDefinition();null!=e&&e.path(t)},this.renderChildren=function(t){var e=this.getDefinition();null!=e&&e.render(t)}},S.Element.use.prototype=new S.Element.RenderedElementBase,S.Element.mask=function(t){this.base=S.Element.ElementBase,this.base(t),this.apply=function(t,e){var i=this.attribute("x").Length.toPixels("x"),n=this.attribute("y").Length.toPixels("y"),s=this.attribute("width").Length.toPixels("x"),a=this.attribute("height").Length.toPixels("y"),r=e.attribute("mask").value;e.attribute("mask").value="";var o=document.createElement("canvas");o.width=i+s,o.height=n+a;var l=o.getContext("2d");this.renderChildren(l);var h=document.createElement("canvas");h.width=i+s,h.height=n+a;var u=h.getContext("2d");e.render(u),u.globalCompositeOperation="destination-in",u.fillStyle=l.createPattern(o,"no-repeat"),u.fillRect(0,0,i+s,n+a),t.fillStyle=u.createPattern(h,"no-repeat"),t.fillRect(0,0,i+s,n+a),e.attribute("mask").value=r},this.render=function(t){}},S.Element.mask.prototype=new S.Element.ElementBase,S.Element.clipPath=function(t){this.base=S.Element.ElementBase,this.base(t),this.apply=function(t){for(var e=0;e<this.children.length;e++)this.children[e].path&&(this.children[e].path(t),t.clip())},this.render=function(t){}},S.Element.clipPath.prototype=new S.Element.ElementBase,S.Element.filter=function(t){this.base=S.Element.ElementBase,this.base(t),this.apply=function(t,e){var i=e.getBoundingBox(),n=this.attribute("x").Length.toPixels("x"),s=this.attribute("y").Length.toPixels("y");0!=n&&0!=s||(n=i.x1,s=i.y1);var a=this.attribute("width").Length.toPixels("x"),r=this.attribute("height").Length.toPixels("y");0!=a&&0!=r||(a=i.width(),r=i.height());var o=e.style("filter").value;e.style("filter").value="";var l=.2*a,h=.2*r,u=document.createElement("canvas");u.width=a+2*l,u.height=r+2*h;var f=u.getContext("2d");f.translate(l-n,h-s),e.render(f);for(var c=0;c<this.children.length;c++)this.children[c].apply(f,0,0,a+2*l,r+2*h);t.drawImage(u,0,0,a+2*l,r+2*h,n-l,s-h,a+2*l,r+2*h),e.style("filter",!0).value=o},this.render=function(t){}},S.Element.filter.prototype=new S.Element.ElementBase,S.Element.feGaussianBlur=function(t){function r(t,e,i,n,s){for(var a=0;a<s;a++)for(var r=0;r<n;r++)for(var o=m(t,r,a,n,0,3)/255,l=0;l<4;l++){for(var h=i[0]*(0==o?255:m(t,r,a,n,0,l))*(0==o||3==l?1:o),u=1;u<i.length;u++){var f=m(t,Math.max(r-u,0),a,n,0,3)/255,c=m(t,Math.min(r+u,n-1),a,n,0,3)/255;h+=i[u]*((0==f?255:m(t,Math.max(r-u,0),a,n,0,l))*(0==f||3==l?1:f)+(0==c?255:m(t,Math.min(r+u,n-1),a,n,0,l))*(0==c||3==l?1:c))}d=h,e[r*s*4+4*a+l]=d}var d}function m(t,e,i,n,s,a){return t[i*n*4+4*e+a]}function a(t,e,i,n){var s=t.getImageData(0,0,e,i),a=function(t){t=Math.max(t,.01);var e=Math.ceil(4*t)+1;mask=[];for(var i=0;i<e;i++)mask[i]=Math.exp(i/t*-.5*(i/t));return mask}(n);a=function(t){for(var e=0,i=1;i<t.length;i++)e+=Math.abs(t[i]);for(e=2*e+Math.abs(t[0]),i=0;i<t.length;i++)t[i]/=e;return t}(a),tmp=[],r(s.data,tmp,a,e,i),r(tmp,s.data,a,i,e),t.clearRect(0,0,e,i),t.putImageData(s,0,0)}this.base=S.Element.ElementBase,this.base(t),this.apply=function(t,e,i,n,s){a(t,n,s,this.attribute("stdDeviation").numValue())}},S.Element.filter.prototype=new S.Element.feGaussianBlur,S.Element.title=function(t){},S.Element.title.prototype=new S.Element.ElementBase,S.Element.desc=function(t){},S.Element.desc.prototype=new S.Element.ElementBase,S.Element.MISSING=function(t){console.log("ERROR: Element '"+t.nodeName+"' not yet implemented.")},S.Element.MISSING.prototype=new S.Element.ElementBase,S.CreateElement=function(t){var e=t.nodeName.replace(/^[^:]+:/,"");e=e.replace(/\-/g,"");var i=null;return(i=void 0!==S.Element[e]?new S.Element[e](t):new S.Element.MISSING(t)).type=t.nodeName,i},S.load=function(t,e){S.loadXml(t,S.ajax(e))},S.loadXml=function(t,e){S.loadXmlDoc(t,S.parseXml(e))},S.loadXmlDoc=function(s,t){function i(t){for(var e=s.canvas;e;)t.x-=e.offsetLeft,t.y-=e.offsetTop,e=e.offsetParent;return window.scrollX&&(t.x+=window.scrollX),window.scrollY&&(t.y+=window.scrollY),t}function n(){S.ViewPort.Clear(),s.canvas.parentNode&&S.ViewPort.SetCurrent(s.canvas.parentNode.clientWidth,s.canvas.parentNode.clientHeight),1!=S.opts.ignoreDimensions&&(a.style("width").hasValue()&&(s.canvas.width=a.style("width").Length.toPixels("x"),s.canvas.style.width=s.canvas.width+"px"),a.style("height").hasValue()&&(s.canvas.height=a.style("height").Length.toPixels("y"),s.canvas.style.height=s.canvas.height+"px"));var t=s.canvas.clientWidth||s.canvas.width,e=s.canvas.clientHeight||s.canvas.height;if(S.ViewPort.SetCurrent(t,e),null!=S.opts&&null!=S.opts.offsetX&&(a.attribute("x",!0).value=S.opts.offsetX),null!=S.opts&&null!=S.opts.offsetY&&(a.attribute("y",!0).value=S.opts.offsetY),null!=S.opts&&null!=S.opts.scaleWidth&&null!=S.opts.scaleHeight){var i=1,n=1;a.attribute("width").hasValue()&&(i=a.attribute("width").Length.toPixels("x")/S.opts.scaleWidth),a.attribute("height").hasValue()&&(n=a.attribute("height").Length.toPixels("y")/S.opts.scaleHeight),a.attribute("width",!0).value=S.opts.scaleWidth,a.attribute("height",!0).value=S.opts.scaleHeight,a.attribute("viewBox",!0).value="0 0 "+t*i+" "+e*n,a.attribute("preserveAspectRatio",!0).value="none"}1!=S.opts.ignoreClear&&s.clearRect(0,0,t,e),a.render(s),r&&(r=!1,null!=S.opts&&"function"==typeof S.opts.renderCallback&&S.opts.renderCallback())}S.init(s),1!=S.opts.ignoreMouse&&(s.canvas.onclick=function(t){var e=i(new S.Point(null!=t?t.clientX:event.clientX,null!=t?t.clientY:event.clientY));S.Mouse.onclick(e.x,e.y)},s.canvas.onmousemove=function(t){var e=i(new S.Point(null!=t?t.clientX:event.clientX,null!=t?t.clientY:event.clientY));S.Mouse.onmousemove(e.x,e.y)});var a=S.CreateElement(t.documentElement),r=a.root=!0,o=!0;S.ImagesLoaded()&&(o=!1,n()),S.intervalID=setInterval(function(){var t=!1;if(o&&S.ImagesLoaded()&&(t=!(o=!1)),1!=S.opts.ignoreMouse&&(t|=S.Mouse.hasEvents()),1!=S.opts.ignoreAnimation)for(var e=0;e<S.Animations.length;e++)t|=S.Animations[e].update(1e3/S.FRAMERATE);null!=S.opts&&"function"==typeof S.opts.forceRedraw&&1==S.opts.forceRedraw()&&(t=!0),t&&(n(),S.Mouse.runEvents())},1e3/S.FRAMERATE)},S.stop=function(){S.intervalID&&clearInterval(S.intervalID)},S.Mouse=new function(){this.events=[],this.hasEvents=function(){return 0!=this.events.length},this.onclick=function(t,e){this.events.push({type:"onclick",x:t,y:e,run:function(t){t.onclick&&t.onclick()}})},this.onmousemove=function(t,e){this.events.push({type:"onmousemove",x:t,y:e,run:function(t){t.onmousemove&&t.onmousemove()}})},this.eventElements=[],this.checkPath=function(t,e){for(var i=0;i<this.events.length;i++){var n=this.events[i];e.isPointInPath&&e.isPointInPath(n.x,n.y)&&(this.eventElements[i]=t)}},this.checkBoundingBox=function(t,e){for(var i=0;i<this.events.length;i++){var n=this.events[i];e.isPointInBox(n.x,n.y)&&(this.eventElements[i]=t)}},this.runEvents=function(){S.ctx.canvas.style.cursor="";for(var t=0;t<this.events.length;t++)for(var e=this.events[t],i=this.eventElements[t];i;)e.run(i),i=i.parent;this.events=[],this.eventElements=[]}},s=S,t.svg=s):(s=t.svg).stop(),s.opts=n;var a=t.getContext("2d");void 0!==e.documentElement?s.loadXmlDoc(a,e):"<"==e.substr(0,1)?s.loadXml(a,e):s.load(a,e)}else for(var r=document.getElementsByTagName("svg"),o=0;o<r.length;o++){var l=r[o],h=document.createElement("canvas");h.width=l.clientWidth,h.height=l.clientHeight,l.parentNode.insertBefore(h,l),l.parentNode.removeChild(l);var u=document.createElement("div");u.appendChild(l),canvg(h,u.innerHTML)}}}(),CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(t,e,i,n,s){canvg(this.canvas,t,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:e,offsetY:i,scaleWidth:n,scaleHeight:s})}),function(t){var c,d="hidden",h="visible",u="px",f=t.css,e=t.CanVGRenderer,n=t.SVGRenderer,i=t.extend,s=t.merge,m=t.addEvent,p=t.createElement,a=t.discardElement;i(e.prototype,n.prototype),i(e.prototype,{create:function(t,e,i,n){this.setContainer(e,i,n),this.configure(t)},setContainer:function(t,e,i){var n,s=t.style,a=t.parentNode,r=s.left,o=s.top,l=t.offsetWidth,h=t.offsetHeight,u={visibility:d,position:"absolute"};this.init.apply(this,[t,e,i]),n=p("canvas",{width:l,height:h},{position:"relative",left:r,top:o},t),this.canvas=n,this.ttLine=p("div",null,u,a),this.ttDiv=p("div",null,u,a),this.ttTimer=c;var f=p("div",{width:l,height:h},{visibility:d,left:r,top:o},a);(this.hiddenSvg=f).appendChild(this.box)},configure:function(a){var r=this,t=a.options.tooltip,e=t.borderWidth,o=r.ttDiv,i=t.style,l=r.ttLine,n=parseInt(i.padding,10);i=s(i,{padding:n+u,"background-color":t.backgroundColor,"border-style":"solid","border-width":e+u,"border-radius":t.borderRadius+u}),t.shadow&&(i=s(i,{"box-shadow":"1px 1px 3px gray","-webkit-box-shadow":"1px 1px 3px gray"})),f(o,i),f(l,{"border-left":"1px solid darkgray"}),m(a,"tooltipRefresh",function(t){var e,i=a.container,n=i.offsetLeft,s=i.offsetTop;o.innerHTML=t.text,e=a.tooltip.getPosition(o.offsetWidth,o.offsetHeight,{plotX:t.x,plotY:t.y}),f(o,{visibility:h,left:e.x+u,top:e.y+u,"border-color":t.borderColor}),f(l,{visibility:h,left:n+t.x+u,top:s+a.plotTop+u,height:a.plotHeight+u}),r.ttTimer!==c&&clearTimeout(r.ttTimer),r.ttTimer=setTimeout(function(){f(o,{visibility:d}),f(l,{visibility:d})},3e3)})},destroy:function(){var t=this;return a(t.canvas),t.ttTimer!==c&&clearTimeout(t.ttTimer),a(t.ttLine),a(t.ttDiv),a(t.hiddenSvg),n.prototype.destroy.apply(t)},color:function(t,e,i){return t&&t.linearGradient&&(t=t.stops[t.stops.length-1][1]),n.prototype.color.call(this,t,e,i)},draw:function(){window.canvg(this.canvas,this.hiddenSvg.innerHTML)}})}(Highcharts);
|