function RGBColor(t){this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6));t=(t=t.replace(/ /g,"")).toLowerCase();var e,h={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(e in h)t==e&&(t=h[e]);var u=[{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)]}}];for(e=0;e "+r.toRGB()+" -> "+r.toHex());a.appendChild(o),a.appendChild(l),i.appendChild(a)}catch(t){}return i}}window.console||(window.console={},window.console.log=function(){},window.console.dir=function(){}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t){for(var e=0;e]*>/,"");var e=new ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e},p.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 p.Property(n.name,e)}},this.Definition={getDefinition:function(){var t=n.value.replace(/^(url\()?#([^\)]+)\)?$/,"$2");return p.Definitions[t]},isUrl:function(){return 0==n.value.indexOf("url(")},getFillStyle:function(t){var e=this.getDefinition();return null!=e&&e.createGradient?e.createGradient(p.ctx,t):null!=e&&e.createPattern?e.createPattern(p.ctx,t):null}},this.Length={DPI:function(){return 96},EM:function(t){var e=12,i=new p.Property("fontSize",p.Font.Parse(p.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()*p.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)}}},p.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".split(","),this.CreateFont=function(t,e,i,n,s,a){return a=null!=a?this.Parse(a):this.CreateFont("","","","","",p.ctx.font),{fontFamily:s||a.fontFamily,fontSize:n||a.fontSize,fontStyle:t||a.fontStyle,fontWeight:i||a.fontWeight,fontVariant:e||a.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var l=this;this.Parse=function(t){for(var e={},i=(t=p.trim(p.compressSpaces(t||"")).split(" "),!1),n=!1,s=!1,a=!1,r="",o=0;othis.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y2=this.y1=e),ethis.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){i=t+2/3*(i-t),n=e+2/3*(n-e),this.addBezierCurve(t,e,i,i+1/3*(s-t),n,n+1/3*(a-e),s,a)},this.addBezierCurve=function(t,e,n,s,a,r,o,l){var h=[t,e],u=[n,s],c=[a,r],d=[o,l];for(this.addPoint(h[0],h[1]),this.addPoint(d[0],d[1]),i=0;i<=1;i++)t=function(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)*c[i]+Math.pow(t,3)*d[i]},e=6*h[i]-12*u[i]+6*c[i],n=-3*h[i]+9*u[i]-9*c[i]+3*d[i],s=3*u[i]-3*h[i],0==n?0!=e&&(0<(e=-s/e)&&e<1&&(0==i&&this.addX(t(e)),1==i&&this.addY(t(e)))):(s=Math.pow(e,2)-4*s*n)<0||(0<(a=(-e+Math.sqrt(s))/(2*n))&&a<1&&(0==i&&this.addX(t(a)),1==i&&this.addY(t(a))),0<(e=(-e-Math.sqrt(s))/(2*n))&&e<1&&(0==i&&this.addX(t(e)),1==i&&this.addY(t(e))))},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)},p.Transform=function(t){var e=this;this.Type={},this.Type.translate=function(t){this.p=p.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){t=p.ToNumberArray(t),this.angle=new p.Property("angle",t[0]),this.cx=t[1]||0,this.cy=t[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=p.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=p.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 p.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.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+=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(){return this.makeAbsolute(new p.Point(this.getScalar(),this.getScalar()))},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 p.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&&0this.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}return this.duration+=t,t=!1,this.begin