var ResponsiveBootstrapToolkit=function(n){var i={detectionDivs:{bootstrap:{xs:n('<div class="device-xs visible-xs visible-xs-block"><\/div>'),sm:n('<div class="device-sm visible-sm visible-sm-block"><\/div>'),md:n('<div class="device-md visible-md visible-md-block"><\/div>'),lg:n('<div class="device-lg visible-lg visible-lg-block"><\/div>')},foundation:{small:n('<div class="device-xs show-for-small-only"><\/div>'),medium:n('<div class="device-sm show-for-medium-only"><\/div>'),large:n('<div class="device-md show-for-large-only"><\/div>'),xlarge:n('<div class="device-lg show-for-xlarge-only"><\/div>')}},applyDetectionDivs:function(){n(document).ready(function(){n.each(t.breakpoints,function(n){t.breakpoints[n].appendTo(".responsive-bootstrap-toolkit")})})},isAnExpression:function(n){return n.charAt(0)=="<"||n.charAt(0)==">"},splitExpression:function(n){var i=n.charAt(0),t=n.charAt(1)=="="?!0:!1,r=1+(t?1:0),u=n.slice(r);return{operator:i,orEqual:t,breakpointName:u}},isAnyActive:function(i){var r=!1;return n.each(i,function(n,i){if(t.breakpoints[i].is(":visible"))return r=!0,!1}),r},isMatchingExpression:function(n){var r=i.splitExpression(n),o=Object.keys(t.breakpoints),u=o.indexOf(r.breakpointName),f,e,s;if(u!==-1)return f=0,e=0,r.operator=="<"&&(f=0,e=r.orEqual?++u:u),r.operator==">"&&(f=r.orEqual?u:++u,e=undefined),s=o.slice(f,e),i.isAnyActive(s)}},t={interval:300,framework:null,breakpoints:null,is:function(n){return i.isAnExpression(n)?i.isMatchingExpression(n):t.breakpoints[n]&&t.breakpoints[n].is(":visible")},use:function(n,r){t.framework=n.toLowerCase();t.breakpoints=t.framework==="bootstrap"||t.framework==="foundation"?i.detectionDivs[t.framework]:r;i.applyDetectionDivs()},current:function(){var i="unrecognized";return n.each(t.breakpoints,function(n){t.is(n)&&(i=n)}),i},changed:function(n,i){var r;return function(){clearTimeout(r);r=setTimeout(function(){n()},i||t.interval)}}};return n(document).ready(function(){n('<div class="responsive-bootstrap-toolkit"><\/div>').appendTo("body")}),t.framework===null&&t.use("bootstrap"),t}(jQuery);(function(){"use strict";var t=typeof window!="undefined"&&typeof window.document!="undefined"?window.document:{},r=typeof module!="undefined"&&module.exports,f=typeof Element!="undefined"&&"ALLOW_KEYBOARD_INPUT"in Element,n=function(){for(var i,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n=0,f=r.length,u={};n<f;n++)if(i=r[n],i&&i[1]in t){for(n=0;n<i.length;n++)u[r[0][n]]=i[n];return u}return!1}(),u={change:n.fullscreenchange,error:n.fullscreenerror},i={request:function(i){var r=n.requestFullscreen;i=i||t.documentElement;/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?i[r]():i[r](f?Element.ALLOW_KEYBOARD_INPUT:{})},exit:function(){t[n.exitFullscreen]()},toggle:function(n){this.isFullscreen?this.exit():this.request(n)},onchange:function(n){this.on("change",n)},onerror:function(n){this.on("error",n)},on:function(n,i){var r=u[n];r&&t.addEventListener(r,i,!1)},off:function(n,i){var r=u[n];r&&t.removeEventListener(r,i,!1)},raw:n};if(!n){r?module.exports=!1:window.screenfull=!1;return}Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(t[n.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[n.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(t[n.fullscreenEnabled])}}});r?module.exports=i:window.screenfull=i})();window.matchMedia=window.matchMedia||function(n){var u,i=n.documentElement,f=i.firstElementChild||i.firstChild,r=n.createElement("body"),t=n.createElement("div");return t.id="mq-test-1",t.style.cssText="position:absolute;top:-100em",r.style.background="none",r.appendChild(t),function(n){return t.innerHTML='&shy;<style media="'+n+'"> #mq-test-1 { width: 42px; }<\/style>',i.insertBefore(r,f),u=t.offsetWidth==42,i.removeChild(r),{matches:u,media:n}}}(document),function(n){function d(){a(!0)}if(n.respond={},respond.update=function(){},respond.mediaQueriesSupported=n.matchMedia&&n.matchMedia("only all").matches,!respond.mediaQueriesSupported){var t=n.document,i=t.documentElement,e=[],u=[],r=[],o={},v=30,f=t.getElementsByTagName("head")[0]||i,g=t.getElementsByTagName("base")[0],s=f.getElementsByTagName("link"),h=[],y=function(){for(var f=s,c=f.length,r=0,t,i,u,e;r<c;r++)t=f[r],i=t.href,u=t.media,e=t.rel&&t.rel.toLowerCase()==="stylesheet",!i||!e||o[i]||(t.styleSheet&&t.styleSheet.rawCssText?(w(t.styleSheet.rawCssText,i,u),o[i]=!0):(/^([a-zA-Z:]*\/\/)/.test(i)||g)&&i.replace(RegExp.$1,"").split("/")[0]!==n.location.host||h.push({href:i,media:u}));p()},p=function(){if(h.length){var n=h.shift();nt(n.href,function(t){w(t,n.href,n.media);o[n.href]=!0;p()})}},w=function(n,t,i){var o=n.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi),s=o&&o.length||0,t=t.substring(0,t.lastIndexOf("/")),v=function(n){return n.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+t+"$2$3")},y=!s&&i,h=0,f,c,r,l,p;for(t.length&&(t+="/"),y&&(s=1);h<s;h++)for(f=0,y?(c=i,u.push(v(n))):(c=o[h].match(/@media *([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1,u.push(RegExp.$2&&v(RegExp.$2))),l=c.split(","),p=l.length;f<p;f++)r=l[f],e.push({media:r.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/)&&RegExp.$2||"all",rules:u.length-1,hasquery:r.indexOf("(")>-1,minw:r.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")});a()},c,b,k=function(){var u,r=t.createElement("div"),n=t.body,f=!1;return r.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=f=t.createElement("body"),n.style.background="none"),n.appendChild(r),i.insertBefore(n,i.firstChild),u=r.offsetWidth,f?i.removeChild(n):n.removeChild(r),l=parseFloat(u)},l,a=function(n){var nt="clientWidth",tt=i[nt],it=t.compatMode==="CSS1Compat"&&tt||t.body[nt]||tt,d={},ot=s[s.length-1],rt=(new Date).getTime(),o,h,g;if(n&&c&&rt-c<v){clearTimeout(b);b=setTimeout(a,v);return}c=rt;for(o in e){var y=e[o],p=y.minw,w=y.maxw,ut=p===null,ft=w===null,et="em";!p||(p=parseFloat(p)*(p.indexOf(et)>-1?l||k():1));!w||(w=parseFloat(w)*(w.indexOf(et)>-1?l||k():1));y.hasquery&&(ut&&ft||!(ut||it>=p)||!(ft||it<=w))||(d[y.media]||(d[y.media]=[]),d[y.media].push(u[y.rules]))}for(o in r)r[o]&&r[o].parentNode===f&&f.removeChild(r[o]);for(o in d)h=t.createElement("style"),g=d[o].join("\n"),h.type="text/css",h.media=o,f.insertBefore(h,ot.nextSibling),h.styleSheet?h.styleSheet.cssText=g:h.appendChild(t.createTextNode(g)),r.push(h)},nt=function(n,t){var i=tt();i&&(i.open("GET",n,!0),i.onreadystatechange=function(){i.readyState==4&&(i.status==200||i.status==304)&&t(i.responseText)},i.readyState!=4)&&i.send(null)},tt=function(){var n=!1;try{n=new XMLHttpRequest}catch(t){n=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return n}}();y();respond.update=y;n.addEventListener?n.addEventListener("resize",d,!1):n.attachEvent&&n.attachEvent("onresize",d)}}(this);melt=function(n){"use strict";function u(n){for(var i={},n=n||[],t=0;t<n.length;t++)i[n[t]]=1;return i}function i(n,t){for(var i in t)n[i]=t[i];return n}function r(n,t,r,f,e){var o=[],r=r||"variable",f=f||"value",s=u(t);return n.forEach(function(n,t){var a=e?{}:{_id:t},l=[],v=[],u,h,c;for(u in n)s[u]?a[u]=n[u]:(l.push(u),v.push(n[u]));for(h=0;h<l.length;h++)c={},c[r]=l[h],c[f]=v[h],o.push(i(c,a))}),o}function t(n,t,r){var f=Array.prototype.slice.call(arguments,3),u={},e={};return n.forEach(function(n){var h={},o=t.map(function(t){return h[t]=n[t]}).join('\0'),s;u[o]||(u[o]=i({},h));s=f.slice(0);s.unshift(n,u[o]);u[o]=r.apply(e,s)}),Object.keys(u).map(function(n){return u[n]})}return t.sum=function(t,i,r,u){if(!this.sum){var f=function(n,t,i,r){return t[i]=r.reduce(function(t,i){return t+n[i]},t[i]||0),t};this.sum=function(t,i){return u===n&&(u=r),typeof u=="string"&&(u=[u]),f(t,i,r,u)}}return this.sum(t,i)},t.count=function(n,t,i){return t[i]||(t[i]=0),t[i]+=1,t},r.cast=t,r}();cast=melt.cast,function(n,t){typeof module=="object"&&module.exports?module.exports=t():typeof define=="function"&&define.amd?define(t):n.Spinner=t()}(this,function(){"use strict";function i(n,t){var r=document.createElement(n||"div"),i;for(i in t)r[i]=t[i];return r}function t(n){for(var t=1,i=arguments.length;t<i;t++)n.appendChild(arguments[t]);return n}function a(n,t,i,r){var e=["opacity",t,~~(n*100),i,r].join("-"),o=.01+i/r*100,s=Math.max(1-(1-n)/t*(100-o),n),c=u.substring(0,u.indexOf("Animation")).toLowerCase(),l=c&&"-"+c+"-"||"";return h[e]||(f.insertRule("@"+l+"keyframes "+e+"{0%{opacity:"+s+"}"+o+"%{opacity:"+n+"}"+(o+.01)+"%{opacity:1}"+(o+t)%100+"%{opacity:"+n+"}100%{opacity:"+s+"}}",f.cssRules.length),h[e]=1),e}function o(n,t){var u=n.style,r,i;if(t=t.charAt(0).toUpperCase()+t.slice(1),u[t]!==undefined)return t;for(i=0;i<s.length;i++)if(r=s[i]+t,u[r]!==undefined)return r}function n(n,t){for(var i in t)n.style[o(n,i)||i]=t[i];return n}function c(n){for(var r,i,t=1;t<arguments.length;t++){r=arguments[t];for(i in r)n[i]===undefined&&(n[i]=r[i])}return n}function l(n,t){return typeof n=="string"?n:n[t%n.length]}function r(n){this.opts=c(n||{},r.defaults,v)}function y(){function u(n,t){return i("<"+n+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',t)}f.addRule(".spin-vml","behavior:url(#default#VML)");r.prototype.lines=function(i,r){function s(){return n(u("group",{coordsize:o+" "+o,coordorigin:-e+" "+-e}),{width:o,height:o})}function a(i,f,o){t(c,t(n(s(),{rotation:360/r.lines*i+"deg",left:~~f}),t(n(u("roundrect",{arcsize:r.corners}),{width:e,height:r.scale*r.width,left:r.scale*r.radius,top:-r.scale*r.width>>1,filter:o}),u("fill",{color:l(r.color,i),opacity:r.opacity}),u("stroke",{opacity:0}))))}var e=r.scale*(r.length+r.width),o=r.scale*2*e,h=-(r.width+r.length)*r.scale*2+"px",c=n(s(),{position:"absolute",top:h,left:h}),f;if(r.shadow)for(f=1;f<=r.lines;f++)a(f,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(f=1;f<=r.lines;f++)a(f);return t(i,c)};r.prototype.opacity=function(n,t,i,r){var u=n.firstChild;r=r.shadow&&r.lines||0;u&&t+r<u.childNodes.length&&(u=u.childNodes[t+r],u=u&&u.firstChild,u=u&&u.firstChild,u&&(u.opacity=i))}}var s=["webkit","Moz","ms","O"],h={},u,f,v={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:1/4,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"},e;return r.defaults={},c(r.prototype,{spin:function(t){this.stop();var f=this,r=f.opts,e=f.el=i(null,{className:r.className});if(n(e,{position:r.position,width:0,zIndex:r.zIndex,left:r.left,top:r.top}),t&&t.insertBefore(e,t.firstChild||null),e.setAttribute("role","progressbar"),f.lines(e,f.opts),!u){var s=0,l=(r.lines-1)*(1-r.direction)/2,h,c=r.fps,o=c/r.speed,a=(1-r.opacity)/(o*r.trail/100),v=o/r.lines;(function y(){s++;for(var n=0;n<r.lines;n++)h=Math.max(1-(s+(r.lines-n)*v)%o*a,r.opacity),f.opacity(e,n*r.direction+l,h,r);f.timeout=f.el&&setTimeout(y,~~(1e3/c))})()}return f},stop:function(){var n=this.el;return n&&(clearTimeout(this.timeout),n.parentNode&&n.parentNode.removeChild(n),this.el=undefined),this},lines:function(r,f){function s(t,r){return n(i(),{position:"absolute",width:f.scale*(f.length+f.width)+"px",height:f.scale*f.width+"px",background:t,boxShadow:r,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*e+f.rotate)+"deg) translate("+f.scale*f.radius+"px,0)",borderRadius:(f.corners*f.scale*f.width>>1)+"px"})}for(var e=0,h=(f.lines-1)*(1-f.direction)/2,o;e<f.lines;e++)o=n(i(),{position:"absolute",top:1+~(f.scale*f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:u&&a(f.opacity,f.trail,h+e*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&t(o,n(s("#000","0 0 4px #000"),{top:"2px"})),t(r,t(o,s(l(f.color,e),"0 0 1px rgba(0,0,0,.1)")));return r},opacity:function(n,t,i){t<n.childNodes.length&&(n.childNodes[t].style.opacity=i)}}),typeof document!="undefined"&&(f=function(){var n=i("style",{type:"text/css"});return t(document.getElementsByTagName("head")[0],n),n.sheet||n.styleSheet}(),e=n(i("group"),{behavior:"url(#default#VML)"}),!o(e,"transform")&&e.adj?y():u=o(e,"animation")),r}),function(n){function t(n){var u,f,i,r;this.ok=!1;n.charAt(0)=="#"&&(n=n.substr(1,6));n=n.replace(/ /g,"");n=n.toLowerCase();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(f in u)n==f&&(n=u[f]);for(i=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(n){return[parseInt(n[1]),parseInt(n[2]),parseInt(n[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(n){return[parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(n){return[parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16)]}}],r=0;r<i.length;r++){var o=i[r].re,s=i[r].process,e=o.exec(n);e&&(channels=s(e),this.r=channels[0],this.g=channels[1],this.b=channels[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r;this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g;this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b;this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var n=this.r.toString(16),t=this.g.toString(16),i=this.b.toString(16);return n.length==1&&(n="0"+n),t.length==1&&(t="0"+t),i.length==1&&(i="0"+i),"#"+n+t+i};this.getHelpXML=function(){for(var r=[],s,f,l,e,a,n=0;n<i.length;n++)for(s=i[n].example,f=0;f<s.length;f++)r[r.length]=s[f];for(l in u)r[r.length]=l;for(e=document.createElement("ul"),e.setAttribute("id","rgbcolor-examples"),n=0;n<r.length;n++)try{var h=document.createElement("li"),o=new t(r[n]),c=document.createElement("div");c.style.cssText="margin: 3px; border: 1px solid black; background:"+o.toHex()+"; color:"+o.toHex();c.appendChild(document.createTextNode("test"));a=document.createTextNode(" "+r[n]+" -> "+o.toRGB()+" -> "+o.toHex());h.appendChild(c);h.appendChild(a);e.appendChild(h)}catch(v){}return e}}typeof define!="undefined"&&define.amd?define(function(){return t}):typeof module!="undefined"&&module.exports&&(module.exports=t);n.RGBColor=t}(typeof window!="undefined"?window:this),function(n){function o(n){for(var i=n.data,u=n.width*n.height*4,r,t=0;t<u;t+=4)r=i[t+3]/255,i[t]*=r,i[t+1]*=r,i[t+2]*=r}function s(n){for(var r=n.data,u=n.width*n.height*4,i,t=0;t<u;t+=4)i=r[t+3],i!=0&&(i=255/i,r[t]*=i,r[t+1]*=i,r[t+2]*=i)}function h(n,t,i,r){var h=document.getElementById(n),u=h.naturalWidth,o=h.naturalHeight,s=document.getElementById(t),c;(s.style.width=u+"px",s.style.height=o+"px",s.width=u,s.height=o,c=s.getContext("2d"),c.clearRect(0,0,u,o),c.drawImage(h,0,0),isNaN(i)||i<1)||(r?f(t,0,0,u,o,i):e(t,0,0,u,o,i))}function f(n,i,f,e,h,c){var oi,ti,gt,ei,p,k,lt,at;if(!isNaN(c)&&!(c<1)){c|=0;oi=document.getElementById(n);ti=oi.getContext("2d");try{try{gt=ti.getImageData(i,f,e,h)}catch(si){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");gt=ti.getImageData(i,f,e,h)}catch(si){alert("Cannot access local image");throw new Error("unable to access local image data: "+si);}}}catch(si){alert("Cannot access image");throw new Error("unable to access image data: "+si);}o(gt);for(var l=gt.data,et,dt,v,ri,y,ui,it,rt,ut,ft,vt,yt,pt,wt,ot,st,ht,ct,d,g,nt,tt,bt,hi=c+c+1,ci=e<<2,ii=e-1,fi=h-1,b=c+1,kt=b*(b+1)/2,ni=new t,a=ni,w=1;w<hi;w++)a=a.next=new t,w==b&&(ei=a);for(a.next=ni,p=null,k=null,ui=y=0,lt=r[c],at=u[c],dt=0;dt<h;dt++){for(ot=st=ht=ct=it=rt=ut=ft=0,vt=b*(d=l[y]),yt=b*(g=l[y+1]),pt=b*(nt=l[y+2]),wt=b*(tt=l[y+3]),it+=kt*d,rt+=kt*g,ut+=kt*nt,ft+=kt*tt,a=ni,w=0;w<b;w++)a.r=d,a.g=g,a.b=nt,a.a=tt,a=a.next;for(w=1;w<b;w++)v=y+((ii<w?ii:w)<<2),it+=(a.r=d=l[v])*(bt=b-w),rt+=(a.g=g=l[v+1])*bt,ut+=(a.b=nt=l[v+2])*bt,ft+=(a.a=tt=l[v+3])*bt,ot+=d,st+=g,ht+=nt,ct+=tt,a=a.next;for(p=ni,k=ei,et=0;et<e;et++)l[y]=it*lt>>at,l[y+1]=rt*lt>>at,l[y+2]=ut*lt>>at,l[y+3]=ft*lt>>at,it-=vt,rt-=yt,ut-=pt,ft-=wt,vt-=p.r,yt-=p.g,pt-=p.b,wt-=p.a,v=ui+((v=et+c+1)<ii?v:ii)<<2,ot+=p.r=l[v],st+=p.g=l[v+1],ht+=p.b=l[v+2],ct+=p.a=l[v+3],it+=ot,rt+=st,ut+=ht,ft+=ct,p=p.next,vt+=d=k.r,yt+=g=k.g,pt+=nt=k.b,wt+=tt=k.a,ot-=d,st-=g,ht-=nt,ct-=tt,k=k.next,y+=4;ui+=e}for(et=0;et<e;et++){for(st=ht=ct=ot=rt=ut=ft=it=0,y=et<<2,vt=b*(d=l[y]),yt=b*(g=l[y+1]),pt=b*(nt=l[y+2]),wt=b*(tt=l[y+3]),it+=kt*d,rt+=kt*g,ut+=kt*nt,ft+=kt*tt,a=ni,w=0;w<b;w++)a.r=d,a.g=g,a.b=nt,a.a=tt,a=a.next;for(ri=e,w=1;w<=c;w++)y=ri+et<<2,it+=(a.r=d=l[y])*(bt=b-w),rt+=(a.g=g=l[y+1])*bt,ut+=(a.b=nt=l[y+2])*bt,ft+=(a.a=tt=l[y+3])*bt,ot+=d,st+=g,ht+=nt,ct+=tt,a=a.next,w<fi&&(ri+=e);for(y=et,p=ni,k=ei,dt=0;dt<h;dt++)v=y<<2,l[v]=it*lt>>at,l[v+1]=rt*lt>>at,l[v+2]=ut*lt>>at,l[v+3]=ft*lt>>at,it-=vt,rt-=yt,ut-=pt,ft-=wt,vt-=p.r,yt-=p.g,pt-=p.b,wt-=p.a,v=et+((v=dt+b)<fi?v:fi)*e<<2,it+=ot+=p.r=l[v],rt+=st+=p.g=l[v+1],ut+=ht+=p.b=l[v+2],ft+=ct+=p.a=l[v+3],p=p.next,vt+=d=k.r,yt+=g=k.g,pt+=nt=k.b,wt+=tt=k.a,ot-=d,st-=g,ht-=nt,ct-=tt,k=k.next,y+=e}s(gt);ti.putImageData(gt,i,f)}}function e(n,i,f,e,o,s){var ti,pt,wt,ni,y,d,ct,lt;if(!isNaN(s)&&!(s<1)){s|=0;ti=document.getElementById(n);pt=ti.getContext("2d");try{try{wt=pt.getImageData(i,f,e,o)}catch(ii){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");wt=pt.getImageData(i,f,e,o)}catch(ii){alert("Cannot access local image");throw new Error("unable to access local image data: "+ii);}}}catch(ii){alert("Cannot access image");throw new Error("unable to access image data: "+ii);}for(var c=wt.data,it,ht,a,kt,v,dt,g,nt,tt,et,ot,st,rt,ut,ft,w,b,k,at,ri=s+s+1,ui=e<<2,bt=e-1,gt=o-1,p=s+1,vt=p*(p+1)/2,yt=new t,h=yt,l=1;l<ri;l++)h=h.next=new t,l==p&&(ni=h);for(h.next=yt,y=null,d=null,dt=v=0,ct=r[s],lt=u[s],ht=0;ht<o;ht++){for(rt=ut=ft=g=nt=tt=0,et=p*(w=c[v]),ot=p*(b=c[v+1]),st=p*(k=c[v+2]),g+=vt*w,nt+=vt*b,tt+=vt*k,h=yt,l=0;l<p;l++)h.r=w,h.g=b,h.b=k,h=h.next;for(l=1;l<p;l++)a=v+((bt<l?bt:l)<<2),g+=(h.r=w=c[a])*(at=p-l),nt+=(h.g=b=c[a+1])*at,tt+=(h.b=k=c[a+2])*at,rt+=w,ut+=b,ft+=k,h=h.next;for(y=yt,d=ni,it=0;it<e;it++)c[v]=g*ct>>lt,c[v+1]=nt*ct>>lt,c[v+2]=tt*ct>>lt,g-=et,nt-=ot,tt-=st,et-=y.r,ot-=y.g,st-=y.b,a=dt+((a=it+s+1)<bt?a:bt)<<2,rt+=y.r=c[a],ut+=y.g=c[a+1],ft+=y.b=c[a+2],g+=rt,nt+=ut,tt+=ft,y=y.next,et+=w=d.r,ot+=b=d.g,st+=k=d.b,rt-=w,ut-=b,ft-=k,d=d.next,v+=4;dt+=e}for(it=0;it<e;it++){for(ut=ft=rt=nt=tt=g=0,v=it<<2,et=p*(w=c[v]),ot=p*(b=c[v+1]),st=p*(k=c[v+2]),g+=vt*w,nt+=vt*b,tt+=vt*k,h=yt,l=0;l<p;l++)h.r=w,h.g=b,h.b=k,h=h.next;for(kt=e,l=1;l<=s;l++)v=kt+it<<2,g+=(h.r=w=c[v])*(at=p-l),nt+=(h.g=b=c[v+1])*at,tt+=(h.b=k=c[v+2])*at,rt+=w,ut+=b,ft+=k,h=h.next,l<gt&&(kt+=e);for(v=it,y=yt,d=ni,ht=0;ht<o;ht++)a=v<<2,c[a]=g*ct>>lt,c[a+1]=nt*ct>>lt,c[a+2]=tt*ct>>lt,g-=et,nt-=ot,tt-=st,et-=y.r,ot-=y.g,st-=y.b,a=it+((a=ht+p)<gt?a:gt)*e<<2,g+=rt+=y.r=c[a],nt+=ut+=y.g=c[a+1],tt+=ft+=y.b=c[a+2],y=y.next,et+=w=d.r,ot+=b=d.g,st+=k=d.b,rt-=w,ut-=b,ft-=k,d=d.next,v+=e}pt.putImageData(wt,i,f)}}function t(){this.r=0;this.g=0;this.b=0;this.a=0;this.next=null}var r=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],u=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24],i={image:h,canvasRGBA:f,canvasRGB:e};typeof define!="undefined"&&define.amd?define(function(){return i}):typeof module!="undefined"&&module.exports&&(module.exports=i);n.stackBlur=i}(typeof window!="undefined"?window:this),function(n,t){"use strict";typeof define!="undefined"&&define.amd?define("canvgModule",["rgbcolor","stackblur"],t):typeof module!="undefined"&&module.exports&&(module.exports=t(require("rgbcolor"),require("stackblur")));n.canvg=t(n.RGBColor,n.stackBlur)}(typeof window!="undefined"?window:this,function(n,t){function a(n){var i=[0,0,0],t=function(t,r){var u=n.match(t);u!=null&&(i[r]+=u.length,n=n.replace(t," "))};return n=n.replace(/:not\(([^\)]*)\)/g,"     $1 "),n=n.replace(/{[\s\S]*/gm," "),t(f,1),t(e,0),t(o,1),t(s,2),t(h,1),t(c,1),n=n.replace(/[\*\s\+>~]/g," "),n=n.replace(/[#\.]/g," "),t(l,2),i.join("")}function v(u){var f={opts:u},e;return f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(){},f.opts.log==!0&&typeof console!="undefined"&&(f.log=function(n){console.log(n)}),f.init=function(n){var t=0;f.UniqueId=function(){return t++,"canvg"+t};f.Definitions={};f.Styles={};f.StylesSpecificity={};f.Animations=[];f.Images=[];f.ctx=n;f.ViewPort=new function(){this.viewPorts=[];this.Clear=function(){this.viewPorts=[]};this.SetCurrent=function(n,t){this.viewPorts.push({width:n,height:t})};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(n){return n!=null&&typeof n=="number"?n:n=="x"?this.width():n=="y"?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var n=0;n<f.Images.length;n++)if(!f.Images[n].loaded)return!1;return!0},f.trim=function(n){return n.replace(/^\s+|\s+$/g,"")},f.compressSpaces=function(n){return n.replace(/[\s\r\t\n]+/gm," ")},f.ajax=function(n){var t;return(t=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),t)?(t.open("GET",n,!1),t.send(null),t.responseText):null},f.parseXml=function(n){var r,i,t;if(typeof Windows!="undefined"&&typeof Windows.Data!="undefined"&&typeof Windows.Data.Xml!="undefined")return t=new Windows.Data.Xml.Dom.XmlDocument,r=new Windows.Data.Xml.Dom.XmlLoadSettings,r.prohibitDtd=!1,t.loadXml(n,r),t;if(window.DOMParser)try{return i=new DOMParser,i.parseFromString(n,"image/svg+xml")}catch(u){return i=new DOMParser,i.parseFromString(n,"text/xml")}else return n=n.replace(/<!DOCTYPE svg[^>]*>/,""),t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(n),t},f.Property=function(n,t){this.name=n;this.value=t},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return this.value!=null&&this.value!==""},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var n=parseFloat(this.value);return(this.value+"").match(/%$/)&&(n=n/100),n},f.Property.prototype.valueOrDefault=function(n){return this.hasValue()?this.value:n},f.Property.prototype.numValueOrDefault=function(n){return this.hasValue()?this.numValue():n},f.Property.prototype.addOpacity=function(t){var r=this.value,i;return t.value!=null&&t.value!=""&&typeof this.value=="string"&&(i=new n(this.value),i.ok&&(r="rgba("+i.r+", "+i.g+", "+i.b+", "+t.numValue()+")")),new f.Property(this.name,r)},f.Property.prototype.getDefinition=function(){var n=this.value.match(/#([^\)'"]+)/);return n&&(n=n[1]),n||(n=this.value),f.Definitions[n]},f.Property.prototype.isUrlDefinition=function(){return this.value.indexOf("url(")==0},f.Property.prototype.getFillStyleDefinition=function(n,t){var i=this.getDefinition(),r;return i!=null&&i.createGradient?i.createGradient(f.ctx,n,t):i!=null&&i.createPattern?(i.getHrefAttribute().hasValue()&&(r=i.attribute("patternTransform"),i=i.getHrefAttribute().getDefinition(),r.hasValue()&&(i.attribute("patternTransform",!0).value=r.value)),i.createPattern(f.ctx,n)):null},f.Property.prototype.getDPI=function(){return 96},f.Property.prototype.getEM=function(n){var t=12,i=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return i.hasValue()&&(t=i.toPixels(n)),t},f.Property.prototype.getUnits=function(){var n=this.value+"";return n.replace(/[0-9\.\-]/g,"")},f.Property.prototype.toPixels=function(n,t){var i,r;return this.hasValue()?(i=this.value+"",i.match(/em$/))?this.numValue()*this.getEM(n):i.match(/ex$/)?this.numValue()*this.getEM(n)/2:i.match(/px$/)?this.numValue():i.match(/pt$/)?this.numValue()*this.getDPI(n)*(1/72):i.match(/pc$/)?this.numValue()*15:i.match(/cm$/)?this.numValue()*this.getDPI(n)/2.54:i.match(/mm$/)?this.numValue()*this.getDPI(n)/25.4:i.match(/in$/)?this.numValue()*this.getDPI(n):i.match(/%$/)?this.numValue()*f.ViewPort.ComputeSize(n):(r=this.numValue(),t&&r<1)?r*f.ViewPort.ComputeSize(n):r:0},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var n=this.value+"";return n.match(/s$/)?this.numValue()*1e3:(n.match(/ms$/),this.numValue())},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var n=this.value+"";return n.match(/deg$/)?this.numValue()*(Math.PI/180):n.match(/grad$/)?this.numValue()*(Math.PI/200):n.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)},e={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"},f.Property.prototype.toTextBaseline=function(){return this.hasValue()?e[this.value]:null},f.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(n,t,i,r,u,e){var o=e!=null?this.Parse(e):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:u||o.fontFamily,fontSize:r||o.fontSize,fontStyle:n||o.fontStyle,fontWeight:i||o.fontWeight,fontVariant:t||o.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var n=this;this.Parse=function(t){for(var e={},r=f.trim(f.compressSpaces(t||"")).split(" "),u={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},o="",i=0;i<r.length;i++)u.fontStyle||n.Styles.indexOf(r[i])==-1?u.fontVariant||n.Variants.indexOf(r[i])==-1?u.fontWeight||n.Weights.indexOf(r[i])==-1?u.fontSize?r[i]!="inherit"&&(o+=r[i]):(r[i]!="inherit"&&(e.fontSize=r[i].split("/")[0]),u.fontStyle=u.fontVariant=u.fontWeight=u.fontSize=!0):(r[i]!="inherit"&&(e.fontWeight=r[i]),u.fontStyle=u.fontVariant=u.fontWeight=!0):(r[i]!="inherit"&&(e.fontVariant=r[i]),u.fontStyle=u.fontVariant=!0):(r[i]!="inherit"&&(e.fontStyle=r[i]),u.fontStyle=!0);return o!=""&&(e.fontFamily=o),e}},f.ToNumberArray=function(n){for(var i=f.trim(f.compressSpaces((n||"").replace(/,/g," "))).split(" "),t=0;t<i.length;t++)i[t]=parseFloat(i[t]);return i},f.Point=function(n,t){this.x=n;this.y=t},f.Point.prototype.angleTo=function(n){return Math.atan2(n.y-this.y,n.x-this.x)},f.Point.prototype.applyTransform=function(n){var t=this.x*n[0]+this.y*n[2]+n[4],i=this.x*n[1]+this.y*n[3]+n[5];this.x=t;this.y=i},f.CreatePoint=function(n){var t=f.ToNumberArray(n);return new f.Point(t[0],t[1])},f.CreatePath=function(n){for(var i=f.ToNumberArray(n),r=[],t=0;t<i.length;t+=2)r.push(new f.Point(i[t],i[t+1]));return r},f.BoundingBox=function(n,t,r,u){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(n,t){n!=null&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=n,this.x2=n),n<this.x1&&(this.x1=n),n>this.x2&&(this.x2=n));t!=null&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))};this.addX=function(n){this.addPoint(n,null)};this.addY=function(n){this.addPoint(null,n)};this.addBoundingBox=function(n){this.addPoint(n.x1,n.y1);this.addPoint(n.x2,n.y2)};this.addQuadraticCurve=function(n,t,i,r,u,f){var e=n+2/3*(i-n),o=t+2/3*(r-t),s=e+1/3*(u-n),h=o+1/3*(f-t);this.addBezierCurve(n,t,e,s,o,h,u,f)};this.addBezierCurve=function(n,t,r,u,f,e,o,s){var h=[n,t],p=[r,u],d=[f,e],w=[o,s],a,k,v,y;for(this.addPoint(h[0],h[1]),this.addPoint(w[0],w[1]),i=0;i<=1;i++){var c=function(n){return Math.pow(1-n,3)*h[i]+3*Math.pow(1-n,2)*n*p[i]+3*(1-n)*Math.pow(n,2)*d[i]+Math.pow(n,3)*w[i]},l=6*h[i]-12*p[i]+6*d[i],b=-3*h[i]+9*p[i]-9*d[i]+3*w[i],g=3*p[i]-3*h[i];if(b==0){if(l==0)continue;a=-g/l;0<a&&a<1&&(i==0&&this.addX(c(a)),i==1&&this.addY(c(a)));continue}(k=Math.pow(l,2)-4*g*b,k<0)||(v=(-l+Math.sqrt(k))/(2*b),0<v&&v<1&&(i==0&&this.addX(c(v)),i==1&&this.addY(c(v))),y=(-l-Math.sqrt(k))/(2*b),0<y&&y<1&&(i==0&&this.addX(c(y)),i==1&&this.addY(c(y))))}};this.isPointInBox=function(n,t){return this.x1<=n&&n<=this.x2&&this.y1<=t&&t<=this.y2};this.addPoint(n,t);this.addPoint(r,u)},f.Transform=function(n){var r=this,i,t,u;for(this.Type={},this.Type.translate=function(n){this.p=f.CreatePoint(n);this.apply=function(n){n.translate(this.p.x||0,this.p.y||0)};this.unapply=function(n){n.translate(-1*this.p.x||0,-1*this.p.y||0)};this.applyToPoint=function(n){n.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0])}},this.Type.rotate=function(n){var t=f.ToNumberArray(n);this.angle=new f.Property("angle",t[0]);this.cx=t[1]||0;this.cy=t[2]||0;this.apply=function(n){n.translate(this.cx,this.cy);n.rotate(this.angle.toRadians());n.translate(-this.cx,-this.cy)};this.unapply=function(n){n.translate(this.cx,this.cy);n.rotate(-1*this.angle.toRadians());n.translate(-this.cx,-this.cy)};this.applyToPoint=function(n){var t=this.angle.toRadians();n.applyTransform([1,0,0,1,this.p.x||0,this.p.y||0]);n.applyTransform([Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0]);n.applyTransform([1,0,0,1,-this.p.x||0,-this.p.y||0])}},this.Type.scale=function(n){this.p=f.CreatePoint(n);this.apply=function(n){n.scale(this.p.x||1,this.p.y||this.p.x||1)};this.unapply=function(n){n.scale(1/this.p.x||1,1/this.p.y||this.p.x||1)};this.applyToPoint=function(n){n.applyTransform([this.p.x||0,0,0,this.p.y||0,0,0])}},this.Type.matrix=function(n){this.m=f.ToNumberArray(n);this.apply=function(n){n.transform(this.m[0],this.m[1],this.m[2],this.m[3],this.m[4],this.m[5])};this.unapply=function(n){var h=this.m[0],c=this.m[2],u=this.m[4],f=this.m[1],e=this.m[3],t=this.m[5],o=0,s=0,i=1,r=1/(h*(e*i-t*s)-c*(f*i-t*o)+u*(f*s-e*o));n.transform(r*(e*i-t*s),r*(t*o-f*i),r*(u*s-c*i),r*(h*i-u*o),r*(c*t-u*e),r*(u*f-h*t))};this.applyToPoint=function(n){n.applyTransform(this.m)}},this.Type.SkewBase=function(n){this.base=r.Type.matrix;this.base(n);this.angle=new f.Property("angle",n)},this.Type.SkewBase.prototype=new this.Type.matrix,this.Type.skewX=function(n){this.base=r.Type.SkewBase;this.base(n);this.m=[1,0,Math.tan(this.angle.toRadians()),1,0,0]},this.Type.skewX.prototype=new this.Type.SkewBase,this.Type.skewY=function(n){this.base=r.Type.SkewBase;this.base(n);this.m=[1,Math.tan(this.angle.toRadians()),0,1,0,0]},this.Type.skewY.prototype=new this.Type.SkewBase,this.transforms=[],this.apply=function(n){for(var t=0;t<this.transforms.length;t++)this.transforms[t].apply(n)},this.unapply=function(n){for(var t=this.transforms.length-1;t>=0;t--)this.transforms[t].unapply(n)},this.applyToPoint=function(n){for(var t=0;t<this.transforms.length;t++)this.transforms[t].applyToPoint(n)},i=f.trim(f.compressSpaces(n)).replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/),t=0;t<i.length;t++){var e=f.trim(i[t].split("(")[0]),s=i[t].split("(")[1].replace(")",""),o=this.Type[e];typeof o!="undefined"&&(u=new o(s),u.type=e,this.transforms.push(u))}},f.AspectRatio=function(n,t,i,r,u,e,o,s,h,c){t=f.compressSpaces(t);t=t.replace(/^defer\s/,"");var w=t.split(" ")[0]||"xMidYMid",l=t.split(" ")[1]||"meet",y=i/r,p=u/e,a=Math.min(y,p),v=Math.max(y,p);l=="meet"&&(r*=a,e*=a);l=="slice"&&(r*=v,e*=v);h=new f.Property("refX",h);c=new f.Property("refY",c);h.hasValue()&&c.hasValue()?n.translate(-a*h.toPixels("x"),-a*c.toPixels("y")):(w.match(/^xMid/)&&(l=="meet"&&a==p||l=="slice"&&v==p)&&n.translate(i/2-r/2,0),w.match(/YMid$/)&&(l=="meet"&&a==y||l=="slice"&&v==y)&&n.translate(0,u/2-e/2),w.match(/^xMax/)&&(l=="meet"&&a==p||l=="slice"&&v==p)&&n.translate(i-r,0),w.match(/YMax$/)&&(l=="meet"&&a==y||l=="slice"&&v==y)&&n.translate(0,u-e));w=="none"?n.scale(y,p):l=="meet"?n.scale(a,a):l=="slice"&&n.scale(v,v);n.translate(o==null?0:-o,s==null?0:-s)},f.Element={},f.EmptyProperty=new f.Property("EMPTY",""),f.Element.ElementBase=function(n){var s,h,e,o,u,t,i,a;if(this.attributes={},this.styles={},this.stylesSpecificity={},this.children=[],this.attribute=function(n,t){var i=this.attributes[n];return i!=null?i:(t==!0&&(i=new f.Property(n,""),this.attributes[n]=i),i||f.EmptyProperty)},this.getHrefAttribute=function(){for(var n in this.attributes)if(n=="href"||n.match(/:href$/))return this.attributes[n];return f.EmptyProperty},this.style=function(n,t,i){var r=this.styles[n],u,o,e;return r!=null?r:(u=this.attribute(n),u!=null&&u.hasValue())?(this.styles[n]=u,u):i!=!0&&(o=this.parent,o!=null&&(e=o.style(n),e!=null&&e.hasValue()))?e:(t==!0&&(r=new f.Property(n,""),this.styles[n]=r),r||f.EmptyProperty)},this.render=function(n){var t,i;this.style("display").value!="none"&&this.style("visibility").value!="hidden"&&(n.save(),this.style("mask").hasValue()?(t=this.style("mask").getDefinition(),t!=null&&t.apply(n,this)):this.style("filter").hasValue()?(i=this.style("filter").getDefinition(),i!=null&&i.apply(n,this)):(this.setContext(n),this.renderChildren(n),this.clearContext(n)),n.restore())},this.setContext=function(){},this.clearContext=function(){},this.renderChildren=function(n){for(var t=0;t<this.children.length;t++)this.children[t].render(n)},this.addChild=function(n,t){var i=n;t&&(i=f.CreateElement(n));i.parent=this;i.type!="title"&&this.children.push(i)},this.addStylesFromStyleDefinition=function(){var t,u,o,i,e;for(t in f.Styles)if(t[0]!="@"&&r(n,t)&&(u=f.Styles[t],o=f.StylesSpecificity[t],u!=null))for(i in u)e=this.stylesSpecificity[i],typeof e=="undefined"&&(e="000"),o>e&&(this.styles[i]=u[i],this.stylesSpecificity[i]=o)},s=new RegExp("^[A-Z-]+$"),h=function(n){return s.test(n)?n.toLowerCase():n},n!=null&&n.nodeType==1){for(t=0;t<n.attributes.length;t++)e=n.attributes[t],o=h(e.nodeName),this.attributes[o]=new f.Property(o,e.value);if(this.addStylesFromStyleDefinition(),this.attribute("style").hasValue())for(u=this.attribute("style").value.split(";"),t=0;t<u.length;t++)if(f.trim(u[t])!=""){var c=u[t].split(":"),l=f.trim(c[0]),v=f.trim(c[1]);this.styles[l]=new f.Property(l,v)}for(this.attribute("id").hasValue()&&f.Definitions[this.attribute("id").value]==null&&(f.Definitions[this.attribute("id").value]=this),t=0;t<n.childNodes.length;t++)i=n.childNodes[t],i.nodeType==1&&this.addChild(i,!0),this.captureTextNodes&&(i.nodeType==3||i.nodeType==4)&&(a=i.value||i.text||i.textContent||"",f.compressSpaces(a)!=""&&this.addChild(new f.Element.tspan(i),!1))}},f.Element.RenderedElementBase=function(n){this.base=f.Element.ElementBase;this.base(n);this.setContext=function(n){var t,r,i,o,u,e,h,s;this.style("fill").isUrlDefinition()?(r=this.style("fill").getFillStyleDefinition(this,this.style("fill-opacity")),r!=null&&(n.fillStyle=r)):this.style("fill").hasValue()&&(t=this.style("fill"),t.value=="currentColor"&&(t.value=this.style("color").value),t.value!="inherit"&&(n.fillStyle=t.value=="none"?"rgba(0,0,0,0)":t.value));this.style("fill-opacity").hasValue()&&(t=new f.Property("fill",n.fillStyle),t=t.addOpacity(this.style("fill-opacity")),n.fillStyle=t.value);this.style("stroke").isUrlDefinition()?(r=this.style("stroke").getFillStyleDefinition(this,this.style("stroke-opacity")),r!=null&&(n.strokeStyle=r)):this.style("stroke").hasValue()&&(i=this.style("stroke"),i.value=="currentColor"&&(i.value=this.style("color").value),i.value!="inherit"&&(n.strokeStyle=i.value=="none"?"rgba(0,0,0,0)":i.value));this.style("stroke-opacity").hasValue()&&(i=new f.Property("stroke",n.strokeStyle),i=i.addOpacity(this.style("stroke-opacity")),n.strokeStyle=i.value);this.style("stroke-width").hasValue()&&(o=this.style("stroke-width").toPixels(),n.lineWidth=o==0?.001:o);this.style("stroke-linecap").hasValue()&&(n.lineCap=this.style("stroke-linecap").value);this.style("stroke-linejoin").hasValue()&&(n.lineJoin=this.style("stroke-linejoin").value);this.style("stroke-miterlimit").hasValue()&&(n.miterLimit=this.style("stroke-miterlimit").value);this.style("stroke-dasharray").hasValue()&&this.style("stroke-dasharray").value!="none"&&(u=f.ToNumberArray(this.style("stroke-dasharray").value),typeof n.setLineDash!="undefined"?n.setLineDash(u):typeof n.webkitLineDash!="undefined"?n.webkitLineDash=u:typeof n.mozDash=="undefined"||u.length==1&&u[0]==0||(n.mozDash=u),e=this.style("stroke-dashoffset").numValueOrDefault(1),typeof n.lineDashOffset!="undefined"?n.lineDashOffset=e:typeof n.webkitLineDashOffset!="undefined"?n.webkitLineDashOffset=e:typeof n.mozDashOffset!="undefined"&&(n.mozDashOffset=e));typeof n.font!="undefined"&&(n.font=f.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").toPixels()+"px":"",this.style("font-family").value).toString());this.style("transform",!1,!0).hasValue()&&(h=new f.Transform(this.style("transform",!1,!0).value),h.apply(n));this.style("clip-path",!1,!0).hasValue()&&(s=this.style("clip-path",!1,!0).getDefinition(),s!=null&&s.apply(n));this.style("opacity").hasValue()&&(n.globalAlpha=this.style("opacity").numValue())}},f.Element.RenderedElementBase.prototype=new f.Element.ElementBase,f.Element.PathElementBase=function(n){this.base=f.Element.RenderedElementBase;this.base(n);this.path=function(n){return n!=null&&n.beginPath(),new f.BoundingBox};this.renderChildren=function(n){var t,r,i;if(this.path(n),f.Mouse.checkPath(this,n),n.fillStyle!=""&&(this.style("fill-rule").valueOrDefault("inherit")!="inherit"?n.fill(this.style("fill-rule").value):n.fill()),n.strokeStyle!=""&&n.stroke(),t=this.getMarkers(),t!=null){if(this.style("marker-start").isUrlDefinition()&&(i=this.style("marker-start").getDefinition(),i.render(n,t[0][0],t[0][1])),this.style("marker-mid").isUrlDefinition())for(i=this.style("marker-mid").getDefinition(),r=1;r<t.length-1;r++)i.render(n,t[r][0],t[r][1]);this.style("marker-end").isUrlDefinition()&&(i=this.style("marker-end").getDefinition(),i.render(n,t[t.length-1][0],t[t.length-1][1]))}};this.getBoundingBox=function(){return this.path()};this.getMarkers=function(){return null}},f.Element.PathElementBase.prototype=new f.Element.RenderedElementBase,f.Element.svg=function(n){this.base=f.Element.RenderedElementBase;this.base(n);this.baseClearContext=this.clearContext;this.clearContext=function(n){this.baseClearContext(n);f.ViewPort.RemoveCurrent()};this.baseSetContext=this.setContext;this.setContext=function(n){var t,i,u,e;if(n.strokeStyle="rgba(0,0,0,0)",n.lineCap="butt",n.lineJoin="miter",n.miterLimit=4,typeof n.font!="undefined"&&typeof window.getComputedStyle!="undefined"&&(n.font=window.getComputedStyle(n.canvas).getPropertyValue("font")),this.baseSetContext(n),this.attribute("x").hasValue()||(this.attribute("x",!0).value=0),this.attribute("y").hasValue()||(this.attribute("y",!0).value=0),n.translate(this.attribute("x").toPixels("x"),this.attribute("y").toPixels("y")),t=f.ViewPort.width(),i=f.ViewPort.height(),this.attribute("width").hasValue()||(this.attribute("width",!0).value="100%"),this.attribute("height").hasValue()||(this.attribute("height",!0).value="100%"),typeof this.root=="undefined"&&(t=this.attribute("width").toPixels("x"),i=this.attribute("height").toPixels("y"),u=0,e=0,this.attribute("refX").hasValue()&&this.attribute("refY").hasValue()&&(u=-this.attribute("refX").toPixels("x"),e=-this.attribute("refY").toPixels("y")),this.attribute("overflow").valueOrDefault("hidden")!="visible"&&(n.beginPath(),n.moveTo(u,e),n.lineTo(t,e),n.lineTo(t,i),n.lineTo(u,i),n.closePath(),n.clip())),f.ViewPort.SetCurrent(t,i),this.attribute("viewBox").hasValue()){var r=f.ToNumberArray(this.attribute("viewBox").value),o=r[0],s=r[1];t=r[2];i=r[3];f.AspectRatio(n,this.attribute("preserveAspectRatio").value,f.ViewPort.width(),t,f.ViewPort.height(),i,o,s,this.attribute("refX").value,this.attribute("refY").value);f.ViewPort.RemoveCurrent();f.ViewPort.SetCurrent(r[2],r[3])}}},f.Element.svg.prototype=new f.Element.RenderedElementBase,f.Element.rect=function(n){this.base=f.Element.PathElementBase;this.base(n);this.path=function(n){var t=this.attribute("x").toPixels("x"),i=this.attribute("y").toPixels("y"),u=this.attribute("width").toPixels("x"),e=this.attribute("height").toPixels("y"),r=this.attribute("rx").toPixels("x"),o=this.attribute("ry").toPixels("y");return this.attribute("rx").hasValue()&&!this.attribute("ry").hasValue()&&(o=r),this.attribute("ry").hasValue()&&!this.attribute("rx").hasValue()&&(r=o),r=Math.min(r,u/2),o=Math.min(o,e/2),n!=null&&(n.beginPath(),n.moveTo(t+r,i),n.lineTo(t+u-r,i),n.quadraticCurveTo(t+u,i,t+u,i+o),n.lineTo(t+u,i+e-o),n.quadraticCurveTo(t+u,i+e,t+u-r,i+e),n.lineTo(t+r,i+e),n.quadraticCurveTo(t,i+e,t,i+e-o),n.lineTo(t,i+o),n.quadraticCurveTo(t,i,t+r,i),n.closePath()),new f.BoundingBox(t,i,t+u,i+e)}},f.Element.rect.prototype=new f.Element.PathElementBase,f.Element.circle=function(n){this.base=f.Element.PathElementBase;this.base(n);this.path=function(n){var i=this.attribute("cx").toPixels("x"),r=this.attribute("cy").toPixels("y"),t=this.attribute("r").toPixels();return n!=null&&(n.beginPath(),n.arc(i,r,t,0,Math.PI*2,!0),n.closePath()),new f.BoundingBox(i-t,r-t,i+t,r+t)}},f.Element.circle.prototype=new f.Element.PathElementBase,f.Element.ellipse=function(n){this.base=f.Element.PathElementBase;this.base(n);this.path=function(n){var e=4*((Math.sqrt(2)-1)/3),u=this.attribute("rx").toPixels("x"),r=this.attribute("ry").toPixels("y"),t=this.attribute("cx").toPixels("x"),i=this.attribute("cy").toPixels("y");return n!=null&&(n.beginPath(),n.moveTo(t,i-r),n.bezierCurveTo(t+e*u,i-r,t+u,i-e*r,t+u,i),n.bezierCurveTo(t+u,i+e*r,t+e*u,i+r,t,i+r),n.bezierCurveTo(t-e*u,i+r,t-u,i+e*r,t-u,i),n.bezierCurveTo(t-u,i-e*r,t-e*u,i-r,t,i-r),n.closePath()),new f.BoundingBox(t-u,i-r,t+u,i+r)}},f.Element.ellipse.prototype=new f.Element.PathElementBase,f.Element.line=function(n){this.base=f.Element.PathElementBase;this.base(n);this.getPoints=function(){return[new f.Point(this.attribute("x1").toPixels("x"),this.attribute("y1").toPixels("y")),new f.Point(this.attribute("x2").toPixels("x"),this.attribute("y2").toPixels("y"))]};this.path=function(n){var t=this.getPoints();return n!=null&&(n.beginPath(),n.moveTo(t[0].x,t[0].y),n.lineTo(t[1].x,t[1].y)),new f.BoundingBox(t[0].x,t[0].y,t[1].x,t[1].y)};this.getMarkers=function(){var n=this.getPoints(),t=n[0].angleTo(n[1]);return[[n[0],t],[n[1],t]]}},f.Element.line.prototype=new f.Element.PathElementBase,f.Element.polyline=function(n){this.base=f.Element.PathElementBase;this.base(n);this.points=f.CreatePath(this.attribute("points").value);this.path=function(n){var i=new f.BoundingBox(this.points[0].x,this.points[0].y),t;for(n!=null&&(n.beginPath(),n.moveTo(this.points[0].x,this.points[0].y)),t=1;t<this.points.length;t++)i.addPoint(this.points[t].x,this.points[t].y),n!=null&&n.lineTo(this.points[t].x,this.points[t].y);return i};this.getMarkers=function(){for(var n=[],t=0;t<this.points.length-1;t++)n.push([this.points[t],this.points[t].angleTo(this.points[t+1])]);return n.length>0&&n.push([this.points[this.points.length-1],n[n.length-1][1]]),n}},f.Element.polyline.prototype=new f.Element.PathElementBase,f.Element.polygon=function(n){this.base=f.Element.polyline;this.base(n);this.basePath=this.path;this.path=function(n){var t=this.basePath(n);return n!=null&&(n.lineTo(this.points[0].x,this.points[0].y),n.closePath()),t}},f.Element.polygon.prototype=new f.Element.polyline,f.Element.path=function(n){var t,i;for(this.base=f.Element.PathElementBase,this.base(n),t=this.attribute("d").value,t=t.replace(/,/gm," "),i=0;i<2;i++)t=t.replace(/([MmZzLlHhVvCcSsQqTtAa])([^\s])/gm,"$1 $2");for(t=t.replace(/([^\s])([MmZzLlHhVvCcSsQqTtAa])/gm,"$1 $2"),t=t.replace(/([0-9])([+\-])/gm,"$1 $2"),i=0;i<2;i++)t=t.replace(/(\.[0-9]*)(\.)/gm,"$1 $2");t=t.replace(/([Aa](\s+[0-9]+){3})\s+([01])\s*([01])/gm,"$1 $3 $4 ");t=f.compressSpaces(t);t=f.trim(t);this.PathParser=new function(n){this.tokens=n.split(" ");this.reset=function(){this.i=-1;this.command="";this.previousCommand="";this.start=new f.Point(0,0);this.control=new f.Point(0,0);this.current=new f.Point(0,0);this.points=[];this.angles=[]};this.isEnd=function(){return this.i>=this.tokens.length-1};this.isCommandOrEnd=function(){return this.isEnd()?!0:this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1};this.getToken=function(){return this.i++,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 n=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(n)};this.getAsControlPoint=function(){var n=this.getPoint();return this.control=n,n};this.getAsCurrentPoint=function(){var n=this.getPoint();return this.current=n,n};this.getReflectedControlPoint=function(){if(this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"&&this.previousCommand.toLowerCase()!="q"&&this.previousCommand.toLowerCase()!="t")return this.current;return new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)};this.makeAbsolute=function(n){return this.isRelativeCommand()&&(n.x+=this.current.x,n.y+=this.current.y),n};this.addMarker=function(n,t,i){i!=null&&this.angles.length>0&&this.angles[this.angles.length-1]==null&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(i));this.addMarkerAngle(n,t==null?null:t.angleTo(n))};this.addMarkerAngle=function(n,t){this.points.push(n);this.angles.push(t)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var t,n=0;n<this.angles.length;n++)if(this.angles[n]==null)for(t=n+1;t<this.angles.length;t++)if(this.angles[t]!=null){this.angles[n]=this.angles[t];break}return this.angles}}(t);this.path=function(n){var t=this.PathParser,c,ft,u,y,e,r,i,w;for(t.reset(),c=new f.BoundingBox,n!=null&&n.beginPath();!t.isEnd();){t.nextCommand();switch(t.command){case"M":case"m":for(u=t.getAsCurrentPoint(),t.addMarker(u),c.addPoint(u.x,u.y),n!=null&&n.moveTo(u.x,u.y),t.start=t.current;!t.isCommandOrEnd();)u=t.getAsCurrentPoint(),t.addMarker(u,t.start),c.addPoint(u.x,u.y),n!=null&&n.lineTo(u.x,u.y);break;case"L":case"l":while(!t.isCommandOrEnd())ft=t.current,u=t.getAsCurrentPoint(),t.addMarker(u,ft),c.addPoint(u.x,u.y),n!=null&&n.lineTo(u.x,u.y);break;case"H":case"h":while(!t.isCommandOrEnd())y=new f.Point((t.isRelativeCommand()?t.current.x:0)+t.getScalar(),t.current.y),t.addMarker(y,t.current),t.current=y,c.addPoint(t.current.x,t.current.y),n!=null&&n.lineTo(t.current.x,t.current.y);break;case"V":case"v":while(!t.isCommandOrEnd())y=new f.Point(t.current.x,(t.isRelativeCommand()?t.current.y:0)+t.getScalar()),t.addMarker(y,t.current),t.current=y,c.addPoint(t.current.x,t.current.y),n!=null&&n.lineTo(t.current.x,t.current.y);break;case"C":case"c":while(!t.isCommandOrEnd()){var e=t.current,l=t.getPoint(),r=t.getAsControlPoint(),i=t.getAsCurrentPoint();t.addMarker(i,r,l);c.addBezierCurve(e.x,e.y,l.x,l.y,r.x,r.y,i.x,i.y);n!=null&&n.bezierCurveTo(l.x,l.y,r.x,r.y,i.x,i.y)}break;case"S":case"s":while(!t.isCommandOrEnd()){var e=t.current,l=t.getReflectedControlPoint(),r=t.getAsControlPoint(),i=t.getAsCurrentPoint();t.addMarker(i,r,l);c.addBezierCurve(e.x,e.y,l.x,l.y,r.x,r.y,i.x,i.y);n!=null&&n.bezierCurveTo(l.x,l.y,r.x,r.y,i.x,i.y)}break;case"Q":case"q":while(!t.isCommandOrEnd()){var e=t.current,r=t.getAsControlPoint(),i=t.getAsCurrentPoint();t.addMarker(i,r,r);c.addQuadraticCurve(e.x,e.y,r.x,r.y,i.x,i.y);n!=null&&n.quadraticCurveTo(r.x,r.y,i.x,i.y)}break;case"T":case"t":while(!t.isCommandOrEnd())e=t.current,r=t.getReflectedControlPoint(),t.control=r,i=t.getAsCurrentPoint(),t.addMarker(i,r,r),c.addQuadraticCurve(e.x,e.y,r.x,r.y,i.x,i.y),n!=null&&n.quadraticCurveTo(r.x,r.y,i.x,i.y);break;case"A":case"a":while(!t.isCommandOrEnd()){var e=t.current,o=t.getScalar(),s=t.getScalar(),a=t.getScalar()*(Math.PI/180),ct=t.getScalar(),g=t.getScalar(),i=t.getAsCurrentPoint(),h=new f.Point(Math.cos(a)*(e.x-i.x)/2+Math.sin(a)*(e.y-i.y)/2,-Math.sin(a)*(e.x-i.x)/2+Math.cos(a)*(e.y-i.y)/2),nt=Math.pow(h.x,2)/Math.pow(o,2)+Math.pow(h.y,2)/Math.pow(s,2);nt>1&&(o*=Math.sqrt(nt),s*=Math.sqrt(nt));w=(ct==g?-1:1)*Math.sqrt((Math.pow(o,2)*Math.pow(s,2)-Math.pow(o,2)*Math.pow(h.y,2)-Math.pow(s,2)*Math.pow(h.x,2))/(Math.pow(o,2)*Math.pow(h.y,2)+Math.pow(s,2)*Math.pow(h.x,2)));isNaN(w)&&(w=0);var v=new f.Point(w*o*h.y/s,w*-s*h.x/o),p=new f.Point((e.x+i.x)/2+Math.cos(a)*v.x-Math.sin(a)*v.y,(e.y+i.y)/2+Math.sin(a)*v.x+Math.cos(a)*v.y),et=function(n){return Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2))},b=function(n,t){return(n[0]*t[0]+n[1]*t[1])/(et(n)*et(t))},ot=function(n,t){return(n[0]*t[1]<n[1]*t[0]?-1:1)*Math.acos(b(n,t))},tt=ot([1,0],[(h.x-v.x)/o,(h.y-v.y)/s]),it=[(h.x-v.x)/o,(h.y-v.y)/s],rt=[(-h.x-v.x)/o,(-h.y-v.y)/s],k=ot(it,rt);b(it,rt)<=-1&&(k=Math.PI);b(it,rt)>=1&&(k=0);var ut=1-g?1:-1,d=tt+ut*(k/2),lt=new f.Point(p.x+o*Math.cos(d),p.y+s*Math.sin(d));if(t.addMarkerAngle(lt,d-ut*Math.PI/2),t.addMarkerAngle(i,d-ut*Math.PI),c.addPoint(i.x,i.y),n!=null){var b=o>s?o:s,st=o>s?1:o/s,ht=o>s?s/o:1;n.translate(p.x,p.y);n.rotate(a);n.scale(st,ht);n.arc(0,0,b,tt,tt+k,1-g);n.scale(1/st,1/ht);n.rotate(-a);n.translate(-p.x,-p.y)}}break;case"Z":case"z":n!=null&&n.closePath();t.current=t.start}}return c};this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),r=this.PathParser.getMarkerAngles(),i=[],n=0;n<t.length;n++)i.push([t[n],r[n]]);return i}},f.Element.path.prototype=new f.Element.PathElementBase,f.Element.pattern=function(n){this.base=f.Element.ElementBase;this.base(n);this.createPattern=function(n){var o=this.attribute("width").toPixels("x",!0),s=this.attribute("height").toPixels("y",!0),t=new f.Element.svg,i,r,u,e;for(t.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value),t.attributes.width=new f.Property("width",o+"px"),t.attributes.height=new f.Property("height",s+"px"),t.attributes.transform=new f.Property("transform",this.attribute("patternTransform").value),t.children=this.children,i=document.createElement("canvas"),i.width=o,i.height=s,r=i.getContext("2d"),this.attribute("x").hasValue()&&this.attribute("y").hasValue()&&r.translate(this.attribute("x").toPixels("x",!0),this.attribute("y").toPixels("y",!0)),u=-1;u<=1;u++)for(e=-1;e<=1;e++)r.save(),t.attributes.x=new f.Property("x",u*i.width),t.attributes.y=new f.Property("y",e*i.height),t.render(r),r.restore();return n.createPattern(i,"repeat")}},f.Element.pattern.prototype=new f.Element.ElementBase,f.Element.marker=function(n){this.base=f.Element.ElementBase;this.base(n);this.baseRender=this.render;this.render=function(n,t,i){n.translate(t.x,t.y);this.attribute("orient").valueOrDefault("auto")=="auto"&&n.rotate(i);this.attribute("markerUnits").valueOrDefault("strokeWidth")=="strokeWidth"&&n.scale(n.lineWidth,n.lineWidth);n.save();var r=new f.Element.svg;r.attributes.viewBox=new f.Property("viewBox",this.attribute("viewBox").value);r.attributes.refX=new f.Property("refX",this.attribute("refX").value);r.attributes.refY=new f.Property("refY",this.attribute("refY").value);r.attributes.width=new f.Property("width",this.attribute("markerWidth").value);r.attributes.height=new f.Property("height",this.attribute("markerHeight").value);r.attributes.fill=new f.Property("fill",this.attribute("fill").valueOrDefault("black"));r.attributes.stroke=new f.Property("stroke",this.attribute("stroke").valueOrDefault("none"));r.children=this.children;r.render(n);n.restore();this.attribute("markerUnits").valueOrDefault("strokeWidth")=="strokeWidth"&&n.scale(1/n.lineWidth,1/n.lineWidth);this.attribute("orient").valueOrDefault("auto")=="auto"&&n.rotate(-i);n.translate(-t.x,-t.y)}},f.Element.marker.prototype=new f.Element.ElementBase,f.Element.defs=function(n){this.base=f.Element.ElementBase;this.base(n);this.render=function(){}},f.Element.defs.prototype=new f.Element.ElementBase,f.Element.GradientBase=function(n){var t,i;for(this.base=f.Element.ElementBase,this.base(n),this.stops=[],t=0;t<this.children.length;t++)i=this.children[t],i.type=="stop"&&this.stops.push(i);this.getGradient=function(){};this.gradientUnits=function(){return this.attribute("gradientUnits").valueOrDefault("objectBoundingBox")};this.attributesToInherit=["gradientUnits"];this.inheritStopContainer=function(n){for(var t,i=0;i<this.attributesToInherit.length;i++)t=this.attributesToInherit[i],!this.attribute(t).hasValue()&&n.attribute(t).hasValue()&&(this.attribute(t,!0).value=n.attribute(t).value)};this.createGradient=function(n,t,i){var r=this,v,o,s,h,e,l,u,c,a;if(this.getHrefAttribute().hasValue()&&(r=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(r)),v=function(n){if(i.hasValue()){var t=new f.Property("color",n);return t.addOpacity(i).value}return n},o=this.getGradient(n,t),o==null)return v(r.stops[r.stops.length-1].color);for(s=0;s<r.stops.length;s++)o.addColorStop(r.stops[s].offset,v(r.stops[s].color));return this.attribute("gradientTransform").hasValue()?(h=f.ViewPort.viewPorts[0],e=new f.Element.rect,e.attributes.x=new f.Property("x",-f.MAX_VIRTUAL_PIXELS/3),e.attributes.y=new f.Property("y",-f.MAX_VIRTUAL_PIXELS/3),e.attributes.width=new f.Property("width",f.MAX_VIRTUAL_PIXELS),e.attributes.height=new f.Property("height",f.MAX_VIRTUAL_PIXELS),l=new f.Element.g,l.attributes.transform=new f.Property("transform",this.attribute("gradientTransform").value),l.children=[e],u=new f.Element.svg,u.attributes.x=new f.Property("x",0),u.attributes.y=new f.Property("y",0),u.attributes.width=new f.Property("width",h.width),u.attributes.height=new f.Property("height",h.height),u.children=[l],c=document.createElement("canvas"),c.width=h.width,c.height=h.height,a=c.getContext("2d"),a.fillStyle=o,u.render(a),a.createPattern(c,"no-repeat")):o}},f.Element.GradientBase.prototype=new f.Element.ElementBase,f.Element.linearGradient=function(n){this.base=f.Element.GradientBase;this.base(n);this.attributesToInherit.push("x1");this.attributesToInherit.push("y1");this.attributesToInherit.push("x2");this.attributesToInherit.push("y2");this.getGradient=function(n,t){var i=this.gradientUnits()=="objectBoundingBox"?t.getBoundingBox():null;this.attribute("x1").hasValue()||this.attribute("y1").hasValue()||this.attribute("x2").hasValue()||this.attribute("y2").hasValue()||(this.attribute("x1",!0).value=0,this.attribute("y1",!0).value=0,this.attribute("x2",!0).value=1,this.attribute("y2",!0).value=0);var r=this.gradientUnits()=="objectBoundingBox"?i.x()+i.width()*this.attribute("x1").numValue():this.attribute("x1").toPixels("x"),u=this.gradientUnits()=="objectBoundingBox"?i.y()+i.height()*this.attribute("y1").numValue():this.attribute("y1").toPixels("y"),f=this.gradientUnits()=="objectBoundingBox"?i.x()+i.width()*this.attribute("x2").numValue():this.attribute("x2").toPixels("x"),e=this.gradientUnits()=="objectBoundingBox"?i.y()+i.height()*this.attribute("y2").numValue():this.attribute("y2").toPixels("y");return r==f&&u==e?null:n.createLinearGradient(r,u,f,e)}},f.Element.linearGradient.prototype=new f.Element.GradientBase,f.Element.radialGradient=function(n){this.base=f.Element.GradientBase;this.base(n);this.attributesToInherit.push("cx");this.attributesToInherit.push("cy");this.attributesToInherit.push("r");this.attributesToInherit.push("fx");this.attributesToInherit.push("fy");this.getGradient=function(n,t){var i=t.getBoundingBox(),o;this.attribute("cx").hasValue()||(this.attribute("cx",!0).value="50%");this.attribute("cy").hasValue()||(this.attribute("cy",!0).value="50%");this.attribute("r").hasValue()||(this.attribute("r",!0).value="50%");var r=this.gradientUnits()=="objectBoundingBox"?i.x()+i.width()*this.attribute("cx").numValue():this.attribute("cx").toPixels("x"),u=this.gradientUnits()=="objectBoundingBox"?i.y()+i.height()*this.attribute("cy").numValue():this.attribute("cy").toPixels("y"),f=r,e=u;return this.attribute("fx").hasValue()&&(f=this.gradientUnits()=="objectBoundingBox"?i.x()+i.width()*this.attribute("fx").numValue():this.attribute("fx").toPixels("x")),this.attribute("fy").hasValue()&&(e=this.gradientUnits()=="objectBoundingBox"?i.y()+i.height()*this.attribute("fy").numValue():this.attribute("fy").toPixels("y")),o=this.gradientUnits()=="objectBoundingBox"?(i.width()+i.height())/2*this.attribute("r").numValue():this.attribute("r").toPixels(),n.createRadialGradient(f,e,0,r,u,o)}},f.Element.radialGradient.prototype=new f.Element.GradientBase,f.Element.stop=function(n){this.base=f.Element.ElementBase;this.base(n);this.offset=this.attribute("offset").numValue();this.offset<0&&(this.offset=0);this.offset>1&&(this.offset=1);var t=this.style("stop-color",!0);t.value===""&&(t.value="#000");this.style("stop-opacity").hasValue()&&(t=t.addOpacity(this.style("stop-opacity")));this.color=t.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(n){this.base=f.Element.ElementBase;this.base(n);f.Animations.push(this);this.duration=0;this.begin=this.attribute("begin").toMilliseconds();this.maxDuration=this.begin+this.attribute("dur").toMilliseconds();this.getProperty=function(){var t=this.attribute("attributeType").value,n=this.attribute("attributeName").value;return t=="CSS"?this.parent.style(n,!0):this.parent.attribute(n,!0)};this.initialValue=null;this.initialUnits="";this.removed=!1;this.calcValue=function(){return""};this.update=function(n){var i,t,r;if(this.initialValue==null&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if(this.attribute("repeatCount").value=="indefinite"||this.attribute("repeatDur").value=="indefinite")this.duration=0;else if(this.attribute("fill").valueOrDefault("remove")!="freeze"||this.frozen){if(this.attribute("fill").valueOrDefault("remove")=="remove"&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}return this.duration=this.duration+n,i=!1,this.begin<this.duration&&(t=this.calcValue(),this.attribute("type").hasValue()&&(r=this.attribute("type").value,t=r+"("+t+")"),this.getProperty().value=t,i=!0),i};this.from=this.attribute("from");this.to=this.attribute("to");this.values=this.attribute("values");this.values.hasValue()&&(this.values.value=this.values.value.split(";"));this.progress=function(){var n={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(this.values.hasValue()){var t=n.progress*(this.values.value.length-1),i=Math.floor(t),r=Math.ceil(t);n.from=new f.Property("from",parseFloat(this.values.value[i]));n.to=new f.Property("to",parseFloat(this.values.value[r]));n.progress=(t-i)/(r-i)}else n.from=this.from,n.to=this.to;return n}},f.Element.AnimateBase.prototype=new f.Element.ElementBase,f.Element.animate=function(n){this.base=f.Element.AnimateBase;this.base(n);this.calcValue=function(){var n=this.progress(),t=n.from.numValue()+(n.to.numValue()-n.from.numValue())*n.progress;return t+this.initialUnits}},f.Element.animate.prototype=new f.Element.AnimateBase,f.Element.animateColor=function(t){this.base=f.Element.AnimateBase;this.base(t);this.calcValue=function(){var i=this.progress(),t=new n(i.from.value),r=new n(i.to.value);if(t.ok&&r.ok){var u=t.r+(r.r-t.r)*i.progress,f=t.g+(r.g-t.g)*i.progress,e=t.b+(r.b-t.b)*i.progress;return"rgb("+parseInt(u,10)+","+parseInt(f,10)+","+parseInt(e,10)+")"}return this.attribute("from").value}},f.Element.animateColor.prototype=new f.Element.AnimateBase,f.Element.animateTransform=function(n){this.base=f.Element.AnimateBase;this.base(n);this.calcValue=function(){for(var t=this.progress(),i=f.ToNumberArray(t.from.value),u=f.ToNumberArray(t.to.value),r="",n=0;n<i.length;n++)r+=i[n]+(u[n]-i[n])*t.progress+" ";return r}},f.Element.animateTransform.prototype=new f.Element.animate,f.Element.font=function(n){var i,t;for(this.base=f.Element.ElementBase,this.base(n),this.horizAdvX=this.attribute("horiz-adv-x").numValue(),this.isRTL=!1,this.isArabic=!1,this.fontFace=null,this.missingGlyph=null,this.glyphs=[],i=0;i<this.children.length;i++)t=this.children[i],t.type=="font-face"?(this.fontFace=t,t.style("font-family").hasValue()&&(f.Definitions[t.style("font-family").value]=this)):t.type=="missing-glyph"?this.missingGlyph=t:t.type=="glyph"&&(t.arabicForm!=""?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[t.unicode]=="undefined"&&(this.glyphs[t.unicode]=[]),this.glyphs[t.unicode][t.arabicForm]=t):this.glyphs[t.unicode]=t)},f.Element.font.prototype=new f.Element.ElementBase,f.Element.fontface=function(n){this.base=f.Element.ElementBase;this.base(n);this.ascent=this.attribute("ascent").value;this.descent=this.attribute("descent").value;this.unitsPerEm=this.attribute("units-per-em").numValue()},f.Element.fontface.prototype=new f.Element.ElementBase,f.Element.missingglyph=function(n){this.base=f.Element.path;this.base(n);this.horizAdvX=0},f.Element.missingglyph.prototype=new f.Element.path,f.Element.glyph=function(n){this.base=f.Element.path;this.base(n);this.horizAdvX=this.attribute("horiz-adv-x").numValue();this.unicode=this.attribute("unicode").value;this.arabicForm=this.attribute("arabic-form").value},f.Element.glyph.prototype=new f.Element.path,f.Element.text=function(n){this.captureTextNodes=!0;this.base=f.Element.RenderedElementBase;this.base(n);this.baseSetContext=this.setContext;this.setContext=function(n){this.baseSetContext(n);var t=this.style("dominant-baseline").toTextBaseline();t==null&&(t=this.style("alignment-baseline").toTextBaseline());t!=null&&(n.textBaseline=t)};this.getBoundingBox=function(){var n=this.attribute("x").toPixels("x"),t=this.attribute("y").toPixels("y"),i=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize);return new f.BoundingBox(n,t-i,n+Math.floor(i*2/3)*this.children[0].getText().length,t)};this.renderChildren=function(n){this.x=this.attribute("x").toPixels("x");this.y=this.attribute("y").toPixels("y");this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x"));this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y"));this.x+=this.getAnchorDelta(n,this,0);for(var t=0;t<this.children.length;t++)this.renderChild(n,this,this,t)};this.getAnchorDelta=function(n,t,i){var e=this.style("text-anchor").valueOrDefault("start"),u,r,f;if(e!="start"){for(u=0,r=i;r<t.children.length;r++){if(f=t.children[r],r>i&&f.attribute("x").hasValue())break;u+=f.measureTextRecursive(n)}return-1*(e=="end"?u:u/2)}return 0};this.renderChild=function(n,t,i,r){var u=i.children[r],r;for(u.attribute("x").hasValue()?(u.x=u.attribute("x").toPixels("x")+t.getAnchorDelta(n,i,r),u.attribute("dx").hasValue()&&(u.x+=u.attribute("dx").toPixels("x"))):(u.attribute("dx").hasValue()&&(t.x+=u.attribute("dx").toPixels("x")),u.x=t.x),t.x=u.x+u.measureText(n),u.attribute("y").hasValue()?(u.y=u.attribute("y").toPixels("y"),u.attribute("dy").hasValue()&&(u.y+=u.attribute("dy").toPixels("y"))):(u.attribute("dy").hasValue()&&(t.y+=u.attribute("dy").toPixels("y")),u.y=t.y),t.y=u.y,u.render(n),r=0;r<u.children.length;r++)t.renderChild(n,t,u,r)}},f.Element.text.prototype=new f.Element.RenderedElementBase,f.Element.TextElementBase=function(n){this.base=f.Element.RenderedElementBase;this.base(n);this.getGlyph=function(n,t,i){var u=t[i],r=null,f;return n.isArabic?(f="isolated",(i==0||t[i-1]==" ")&&i<t.length-2&&t[i+1]!=" "&&(f="terminal"),i>0&&t[i-1]!=" "&&i<t.length-2&&t[i+1]!=" "&&(f="medial"),i>0&&t[i-1]!=" "&&(i==t.length-1||t[i+1]==" ")&&(f="initial"),typeof n.glyphs[u]!="undefined"&&(r=n.glyphs[u][f],r==null&&n.glyphs[u].type=="glyph"&&(r=n.glyphs[u]))):r=n.glyphs[u],r==null&&(r=n.missingGlyph),r};this.renderChildren=function(n){var t=this.parent.style("font-family").getDefinition(),e,i,s,r,c;if(t!=null){var o=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),h=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),u=this.getText();for(t.isRTL&&(u=u.split("").reverse().join("")),e=f.ToNumberArray(this.parent.attribute("dx").value),i=0;i<u.length;i++)s=this.getGlyph(t,u,i),r=o/t.fontFace.unitsPerEm,n.translate(this.x,this.y),n.scale(r,-r),c=n.lineWidth,n.lineWidth=n.lineWidth*t.fontFace.unitsPerEm/o,h=="italic"&&n.transform(1,0,.4,1,0,0),s.render(n),h=="italic"&&n.transform(1,0,-.4,1,0,0),n.lineWidth=c,n.scale(1/r,-1/r),n.translate(-this.x,-this.y),this.x+=o*(s.horizAdvX||t.horizAdvX)/t.fontFace.unitsPerEm,typeof e[i]=="undefined"||isNaN(e[i])||(this.x+=e[i]);return}n.fillStyle!=""&&n.fillText(f.compressSpaces(this.getText()),this.x,this.y);n.strokeStyle!=""&&n.strokeText(f.compressSpaces(this.getText()),this.x,this.y)};this.getText=function(){};this.measureTextRecursive=function(n){for(var i=this.measureText(n),t=0;t<this.children.length;t++)i+=this.children[t].measureTextRecursive(n);return i};this.measureText=function(n){var i=this.parent.style("font-family").getDefinition(),u,t,s,o,h;if(i!=null){var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),e=0,r=this.getText();for(i.isRTL&&(r=r.split("").reverse().join("")),u=f.ToNumberArray(this.parent.attribute("dx").value),t=0;t<r.length;t++)s=this.getGlyph(i,r,t),e+=(s.horizAdvX||i.horizAdvX)*c/i.fontFace.unitsPerEm,typeof u[t]=="undefined"||isNaN(u[t])||(e+=u[t]);return e}return(o=f.compressSpaces(this.getText()),!n.measureText)?o.length*10:(n.save(),this.setContext(n),h=n.measureText(o).width,n.restore(),h)}},f.Element.TextElementBase.prototype=new f.Element.RenderedElementBase,f.Element.tspan=function(n){this.captureTextNodes=!0;this.base=f.Element.TextElementBase;this.base(n);this.text=f.compressSpaces(n.value||n.text||n.textContent||"");this.getText=function(){return this.children.length>0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(n){this.base=f.Element.TextElementBase;this.base(n);this.getText=function(){var n=this.getHrefAttribute().getDefinition();if(n!=null)return n.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(n){this.base=f.Element.TextElementBase;this.base(n);this.hasText=n.childNodes.length>0;for(var t=0;t<n.childNodes.length;t++)n.childNodes[t].nodeType!=3&&(this.hasText=!1);this.text=this.hasText?n.childNodes[0].value:"";this.getText=function(){return this.text};this.baseRenderChildren=this.renderChildren;this.renderChildren=function(n){var i,t;this.hasText?(this.baseRenderChildren(n),i=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize),f.Mouse.checkBoundingBox(this,new f.BoundingBox(this.x,this.y-i.toPixels("y"),this.x+this.measureText(n),this.y))):this.children.length>0&&(t=new f.Element.g,t.children=this.children,t.parent=this,t.render(n))};this.onclick=function(){window.open(this.getHrefAttribute().value)};this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(n){var t,i,r;(this.base=f.Element.RenderedElementBase,this.base(n),t=this.getHrefAttribute().value,t!="")&&(i=t.match(/\.svg$/),f.Images.push(this),this.loaded=!1,i?(this.img=f.ajax(t),this.loaded=!0):(this.img=document.createElement("img"),f.opts.useCORS==!0&&(this.img.crossOrigin="Anonymous"),r=this,this.img.onload=function(){r.loaded=!0},this.img.onerror=function(){f.log('ERROR: image "'+t+'" not found');r.loaded=!0},this.img.src=t),this.renderChildren=function(n){var u=this.attribute("x").toPixels("x"),e=this.attribute("y").toPixels("y"),t=this.attribute("width").toPixels("x"),r=this.attribute("height").toPixels("y");t!=0&&r!=0&&(n.save(),i?n.drawSvg(this.img,u,e,t,r):(n.translate(u,e),f.AspectRatio(n,this.attribute("preserveAspectRatio").value,t,this.img.width,r,this.img.height,0,0),n.drawImage(this.img,0,0)),n.restore())},this.getBoundingBox=function(){var n=this.attribute("x").toPixels("x"),t=this.attribute("y").toPixels("y"),i=this.attribute("width").toPixels("x"),r=this.attribute("height").toPixels("y");return new f.BoundingBox(n,t,n+i,t+r)})},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(n){this.base=f.Element.RenderedElementBase;this.base(n);this.getBoundingBox=function(){for(var t=new f.BoundingBox,n=0;n<this.children.length;n++)t.addBoundingBox(this.children[n].getBoundingBox());return t}},f.Element.g.prototype=new f.Element.RenderedElementBase,f.Element.symbol=function(n){this.base=f.Element.RenderedElementBase;this.base(n);this.render=function(){}},f.Element.symbol.prototype=new f.Element.RenderedElementBase,f.Element.style=function(n){var i,c,t,l,r,h,u,g,o,e,v,tt;for(this.base=f.Element.ElementBase,this.base(n),i="",t=0;t<n.childNodes.length;t++)i+=n.childNodes[t].data;for(i=i.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,""),i=f.compressSpaces(i),c=i.split("}"),t=0;t<c.length;t++)if(f.trim(c[t])!=""){var b=c[t].split("{"),k=b[0].split(","),s=b[1].split(";");for(l=0;l<k.length;l++)if(r=f.trim(k[l]),r!=""){for(h=f.Styles[r]||{},u=0;u<s.length;u++){var y=s[u].indexOf(":"),p=s[u].substr(0,y),d=s[u].substr(y+1,s[u].length-y);p!=null&&d!=null&&(h[f.trim(p)]=new f.Property(f.trim(p),f.trim(d)))}if(f.Styles[r]=h,f.StylesSpecificity[r]=a(r),r=="@font-face")for(g=h["font-family"].value.replace(/"/g,""),o=h.src.value.split(","),e=0;e<o.length;e++)if(o[e].indexOf('format("svg")')>0){var w=o[e].indexOf("url"),it=o[e].indexOf(")",w),rt=o[e].substr(w+5,it-w-6),ut=f.parseXml(f.ajax(rt)),nt=ut.getElementsByTagName("font");for(v=0;v<nt.length;v++)tt=f.CreateElement(nt[v]),f.Definitions[g]=tt}}}},f.Element.style.prototype=new f.Element.ElementBase,f.Element.use=function(n){this.base=f.Element.RenderedElementBase;this.base(n);this.baseSetContext=this.setContext;this.setContext=function(n){this.baseSetContext(n);this.attribute("x").hasValue()&&n.translate(this.attribute("x").toPixels("x"),0);this.attribute("y").hasValue()&&n.translate(0,this.attribute("y").toPixels("y"))};var t=this.getHrefAttribute().getDefinition();this.path=function(n){t!=null&&t.path(n)};this.getBoundingBox=function(){if(t!=null)return t.getBoundingBox()};this.renderChildren=function(n){var i,r;t!=null&&(i=t,t.type=="symbol"&&(i=new f.Element.svg,i.type="svg",i.attributes.viewBox=new f.Property("viewBox",t.attribute("viewBox").value),i.attributes.preserveAspectRatio=new f.Property("preserveAspectRatio",t.attribute("preserveAspectRatio").value),i.attributes.overflow=new f.Property("overflow",t.attribute("overflow").value),i.children=t.children),i.type=="svg"&&(this.attribute("width").hasValue()&&(i.attributes.width=new f.Property("width",this.attribute("width").value)),this.attribute("height").hasValue()&&(i.attributes.height=new f.Property("height",this.attribute("height").value))),r=i.parent,i.parent=null,i.render(n),i.parent=r)}},f.Element.use.prototype=new f.Element.RenderedElementBase,f.Element.mask=function(n){this.base=f.Element.ElementBase;this.base(n);this.apply=function(n,t){var o=this.attribute("x").toPixels("x"),s=this.attribute("y").toPixels("y"),i=this.attribute("width").toPixels("x"),r=this.attribute("height").toPixels("y"),u,l,v,h,a,c,e;if(i==0&&r==0){for(u=new f.BoundingBox,l=0;l<this.children.length;l++)u.addBoundingBox(this.children[l].getBoundingBox());var o=Math.floor(u.x1),s=Math.floor(u.y1),i=Math.floor(u.width()),r=Math.floor(u.height())}v=t.attribute("mask").value;t.attribute("mask").value="";h=document.createElement("canvas");h.width=o+i;h.height=s+r;a=h.getContext("2d");this.renderChildren(a);c=document.createElement("canvas");c.width=o+i;c.height=s+r;e=c.getContext("2d");t.render(e);e.globalCompositeOperation="destination-in";e.fillStyle=a.createPattern(h,"no-repeat");e.fillRect(0,0,o+i,s+r);n.fillStyle=e.createPattern(c,"no-repeat");n.fillRect(0,0,o+i,s+r);t.attribute("mask").value=v};this.render=function(){}},f.Element.mask.prototype=new f.Element.ElementBase,f.Element.clipPath=function(n){this.base=f.Element.ElementBase;this.base(n);this.apply=function(n){var e=CanvasRenderingContext2D.prototype.beginPath,r,u,t,i;for(CanvasRenderingContext2D.prototype.beginPath=function(){},r=CanvasRenderingContext2D.prototype.closePath,CanvasRenderingContext2D.prototype.closePath=function(){},e.call(n),u=0;u<this.children.length;u++)t=this.children[u],typeof t.path!="undefined"&&(i=null,t.style("transform",!1,!0).hasValue()&&(i=new f.Transform(t.style("transform",!1,!0).value),i.apply(n)),t.path(n),CanvasRenderingContext2D.prototype.closePath=r,i&&i.unapply(n));r.call(n);n.clip();CanvasRenderingContext2D.prototype.beginPath=e;CanvasRenderingContext2D.prototype.closePath=r};this.render=function(){}},f.Element.clipPath.prototype=new f.Element.ElementBase,f.Element.filter=function(n){this.base=f.Element.ElementBase;this.base(n);this.apply=function(n,t){var e=t.getBoundingBox(),l=Math.floor(e.x1),a=Math.floor(e.y1),o=Math.floor(e.width()),s=Math.floor(e.height()),v=t.style("filter").value,r,u,c,f,h,i;for(t.style("filter").value="",r=0,u=0,i=0;i<this.children.length;i++)c=this.children[i].extraFilterDistance||0,r=Math.max(r,c),u=Math.max(u,c);for(f=document.createElement("canvas"),f.width=o+2*r,f.height=s+2*u,h=f.getContext("2d"),h.translate(-l+r,-a+u),t.render(h),i=0;i<this.children.length;i++)typeof this.children[i].apply=="function"&&this.children[i].apply(h,0,0,o+2*r,s+2*u);n.drawImage(f,0,0,o+2*r,s+2*u,l-r,a-u,o+2*r,s+2*u);t.style("filter",!0).value=v};this.render=function(){}},f.Element.filter.prototype=new f.Element.ElementBase,f.Element.feMorphology=function(n){this.base=f.Element.ElementBase;this.base(n);this.apply=function(){}},f.Element.feMorphology.prototype=new f.Element.ElementBase,f.Element.feComposite=function(n){this.base=f.Element.ElementBase;this.base(n);this.apply=function(){}},f.Element.feComposite.prototype=new f.Element.ElementBase,f.Element.feColorMatrix=function(n){function e(n,t,i,r,u,f){return n[i*r*4+t*4+f]}function o(n,t,i,r,u,f,e){n[i*r*4+t*4+f]=e}function t(n,t){var i=u[n];return i*(i<0?t-255:t)}var u,i,s,r;this.base=f.Element.ElementBase;this.base(n);u=f.ToNumberArray(this.attribute("values").value);switch(this.attribute("type").valueOrDefault("matrix")){case"saturate":i=u[0];u=[.213+.787*i,.715-.715*i,.072-.072*i,0,0,.213-.213*i,.715+.285*i,.072-.072*i,0,0,.213-.213*i,.715-.715*i,.072+.928*i,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":s=u[0]*Math.PI/180;r=function(n,t,i){return n+Math.cos(s)*t+Math.sin(s)*i};u=[r(.213,.787,-.213),r(.715,-.715,-.715),r(.072,-.072,.928),0,0,r(.213,-.213,.143),r(.715,.285,.14),r(.072,-.072,-.283),0,0,r(.213,-.213,-.787),r(.715,-.715,.715),r(.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.apply=function(n,i,r,u,f){for(var s=n.getImageData(0,0,u,f),i,r=0;r<f;r++)for(i=0;i<u;i++){var h=e(s.data,i,r,u,f,0),c=e(s.data,i,r,u,f,1),l=e(s.data,i,r,u,f,2),a=e(s.data,i,r,u,f,3);o(s.data,i,r,u,f,0,t(0,h)+t(1,c)+t(2,l)+t(3,a)+t(4,1));o(s.data,i,r,u,f,1,t(5,h)+t(6,c)+t(7,l)+t(8,a)+t(9,1));o(s.data,i,r,u,f,2,t(10,h)+t(11,c)+t(12,l)+t(13,a)+t(14,1));o(s.data,i,r,u,f,3,t(15,h)+t(16,c)+t(17,l)+t(18,a)+t(19,1))}n.clearRect(0,0,u,f);n.putImageData(s,0,0)}},f.Element.feColorMatrix.prototype=new f.Element.ElementBase,f.Element.feGaussianBlur=function(n){this.base=f.Element.ElementBase;this.base(n);this.blurRadius=Math.floor(this.attribute("stdDeviation").numValue());this.extraFilterDistance=this.blurRadius;this.apply=function(n,i,r,u,e){if(typeof t.canvasRGBA=="undefined"){f.log("ERROR: StackBlur.js must be included for blur to work");return}n.canvas.id=f.UniqueId();n.canvas.style.display="none";document.body.appendChild(n.canvas);t.canvasRGBA(n.canvas.id,i,r,u,e,this.blurRadius);document.body.removeChild(n.canvas)}},f.Element.feGaussianBlur.prototype=new f.Element.ElementBase,f.Element.title=function(){},f.Element.title.prototype=new f.Element.ElementBase,f.Element.desc=function(){},f.Element.desc.prototype=new f.Element.ElementBase,f.Element.MISSING=function(n){f.log("ERROR: Element '"+n.nodeName+"' not yet implemented.")},f.Element.MISSING.prototype=new f.Element.ElementBase,f.CreateElement=function(n){var t=n.nodeName.replace(/^[^:]+:/,""),i;return t=t.replace(/\-/g,""),i=null,i=typeof f.Element[t]!="undefined"?new f.Element[t](n):new f.Element.MISSING(n),i.type=n.nodeName,i},f.load=function(n,t){f.loadXml(n,f.ajax(t))},f.loadXml=function(n,t){f.loadXmlDoc(n,f.parseXml(t))},f.loadXmlDoc=function(n,t){var r,i;f.init(n);r=function(t){for(var i=n.canvas;i;)t.x-=i.offsetLeft,t.y-=i.offsetTop,i=i.offsetParent;return window.scrollX&&(t.x+=window.scrollX),window.scrollY&&(t.y+=window.scrollY),t};f.opts.ignoreMouse!=!0&&(n.canvas.onclick=function(n){var t=r(new f.Point(n!=null?n.clientX:event.clientX,n!=null?n.clientY:event.clientY));f.Mouse.onclick(t.x,t.y)},n.canvas.onmousemove=function(n){var t=r(new f.Point(n!=null?n.clientX:event.clientX,n!=null?n.clientY:event.clientY));f.Mouse.onmousemove(t.x,t.y)});i=f.CreateElement(t.documentElement);i.root=!0;i.addStylesFromStyleDefinition();var e=!0,o=function(){var o,s;if(f.ViewPort.Clear(),n.canvas.parentNode&&f.ViewPort.SetCurrent(n.canvas.parentNode.clientWidth,n.canvas.parentNode.clientHeight),f.opts.ignoreDimensions!=!0&&(i.style("width").hasValue()&&(n.canvas.width=i.style("width").toPixels("x"),n.canvas.style.width=n.canvas.width+"px"),i.style("height").hasValue()&&(n.canvas.height=i.style("height").toPixels("y"),n.canvas.style.height=n.canvas.height+"px")),o=n.canvas.clientWidth||n.canvas.width,s=n.canvas.clientHeight||n.canvas.height,f.opts.ignoreDimensions==!0&&i.style("width").hasValue()&&i.style("height").hasValue()&&(o=i.style("width").toPixels("x"),s=i.style("height").toPixels("y")),f.ViewPort.SetCurrent(o,s),f.opts.offsetX!=null&&(i.attribute("x",!0).value=f.opts.offsetX),f.opts.offsetY!=null&&(i.attribute("y",!0).value=f.opts.offsetY),f.opts.scaleWidth!=null||f.opts.scaleHeight!=null){var r=null,u=null,h=f.ToNumberArray(i.attribute("viewBox").value);f.opts.scaleWidth!=null&&(i.attribute("width").hasValue()?r=i.attribute("width").toPixels("x")/f.opts.scaleWidth:isNaN(h[2])||(r=h[2]/f.opts.scaleWidth));f.opts.scaleHeight!=null&&(i.attribute("height").hasValue()?u=i.attribute("height").toPixels("y")/f.opts.scaleHeight:isNaN(h[3])||(u=h[3]/f.opts.scaleHeight));r==null&&(r=u);u==null&&(u=r);i.attribute("width",!0).value=f.opts.scaleWidth;i.attribute("height",!0).value=f.opts.scaleHeight;i.style("transform",!0,!0).value+=" scale("+1/r+","+1/u+")"}f.opts.ignoreClear!=!0&&n.clearRect(0,0,o,s);i.render(n);e&&(e=!1,typeof f.opts.renderCallback=="function"&&f.opts.renderCallback(t))},u=!0;f.ImagesLoaded()&&(u=!1,o());f.intervalID=setInterval(function(){var n=!1,t;if(u&&f.ImagesLoaded()&&(u=!1,n=!0),f.opts.ignoreMouse!=!0&&(n=n|f.Mouse.hasEvents()),f.opts.ignoreAnimation!=!0)for(t=0;t<f.Animations.length;t++)n=n|f.Animations[t].update(1e3/f.FRAMERATE);typeof f.opts.forceRedraw=="function"&&f.opts.forceRedraw()==!0&&(n=!0);n&&(o(),f.Mouse.runEvents())},1e3/f.FRAMERATE)},f.stop=function(){f.intervalID&&clearInterval(f.intervalID)},f.Mouse=new function(){this.events=[];this.hasEvents=function(){return this.events.length!=0};this.onclick=function(n,t){this.events.push({type:"onclick",x:n,y:t,run:function(n){n.onclick&&n.onclick()}})};this.onmousemove=function(n,t){this.events.push({type:"onmousemove",x:n,y:t,run:function(n){n.onmousemove&&n.onmousemove()}})};this.eventElements=[];this.checkPath=function(n,t){for(var r,i=0;i<this.events.length;i++)r=this.events[i],t.isPointInPath&&t.isPointInPath(r.x,r.y)&&(this.eventElements[i]=n)};this.checkBoundingBox=function(n,t){for(var r,i=0;i<this.events.length;i++)r=this.events[i],t.isPointInBox(r.x,r.y)&&(this.eventElements[i]=n)};this.runEvents=function(){var n,i,t;for(f.ctx.canvas.style.cursor="",n=0;n<this.events.length;n++)for(i=this.events[n],t=this.eventElements[n];t;)i.run(t),t=t.parent;this.events=[];this.eventElements=[]}},f}var u=function(n,t,i){var h,o,r,f,c,e,s;if(n==null&&t==null&&i==null){for(h=document.querySelectorAll("svg"),o=0;o<h.length;o++)r=h[o],f=document.createElement("canvas"),f.width=r.clientWidth,f.height=r.clientHeight,r.parentNode.insertBefore(f,r),r.parentNode.removeChild(r),c=document.createElement("div"),c.appendChild(r),u(f,c.innerHTML);return}typeof n=="string"&&(n=document.getElementById(n));n.svg!=null&&n.svg.stop();e=v(i||{});n.childNodes.length==1&&n.childNodes[0].nodeName=="OBJECT"||(n.svg=e);s=n.getContext("2d");typeof t.documentElement!="undefined"?e.loadXmlDoc(s,t):t.substr(0,1)=="<"?e.loadXml(s,t):e.load(s,t)},r;typeof Element.prototype.matches!="undefined"?r=function(n,t){return n.matches(t)}:typeof Element.prototype.webkitMatchesSelector!="undefined"?r=function(n,t){return n.webkitMatchesSelector(t)}:typeof Element.prototype.mozMatchesSelector!="undefined"?r=function(n,t){return n.mozMatchesSelector(t)}:typeof Element.prototype.msMatchesSelector!="undefined"?r=function(n,t){return n.msMatchesSelector(t)}:typeof Element.prototype.oMatchesSelector!="undefined"?r=function(n,t){return n.oMatchesSelector(t)}:((typeof jQuery=="function"||typeof Zepto=="function")&&(r=function(n,t){return $(n).is(t)}),typeof r=="undefined"&&(r=Sizzle.matchesSelector));var f=/(\[[^\]]+\])/g,e=/(#[^\s\+>~\.\[:]+)/g,o=/(\.[^\s\+>~\.\[:]+)/g,s=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,h=/(:[\w-]+\([^\)]*\))/gi,c=/(:[^\s\+>~\.\[:]+)/g,l=/([^\s\+>~\.\[:]+)/g;return typeof CanvasRenderingContext2D!="undefined"&&(CanvasRenderingContext2D.prototype.drawSvg=function(n,t,i,r,f,e){var s={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:t,offsetY:i,scaleWidth:r,scaleHeight:f},o;for(o in e)e.hasOwnProperty(o)&&(s[o]=e[o]);u(this.canvas,n,s)}),u}),function(){function f(n){return n instanceof HTMLElement||n instanceof SVGElement}function t(n){if(!f(n))throw new Error("an HTMLElement or SVGElement is required; got "+n);}function e(n){return n&&n.lastIndexOf("http",0)==0&&n.lastIndexOf(window.location.host)==-1}function o(n,i){var f;t(n);var o=n.querySelectorAll("image"),r=o.length,u=function(){r===0&&i()};for(u(),f=0;f<o.length;f++)(function(n){var t=n.getAttributeNS("http://www.w3.org/1999/xlink","href");if(t&&e(t.value)){console.warn("Cannot render embedded images linking to external hosts: "+t.value);return}var f=document.createElement("canvas"),o=f.getContext("2d"),i=new Image;i.crossOrigin="anonymous";t=t||n.getAttribute("href");t?(i.src=t,i.onload=function(){f.width=i.width;f.height=i.height;o.drawImage(i,0,0);n.setAttributeNS("http://www.w3.org/1999/xlink","href",f.toDataURL("image/png"));r--;u()},i.onerror=function(){console.log("Could not load "+t);r--;u()}):(r--,u())})(o[f])}function s(n,t,i){function tt(n){for(var r={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},u=Object.keys(r),i,t=0;t<u.length;++t)if(i=u[t],n.indexOf("."+i)>0)return r[i];return console.error("Unknown font format for "+n+"; Fonts may not be working correctly"),"application/octet-stream"}function a(n){function r(t){function u(){var n=i.response,r=it(n);f(t,r)}function r(n){console.warn("Failed to load font from: "+t.url);console.warn(n);e+=t.text+"\n";a()}function f(t,i){var r='url("data:'+t.format+";base64,"+i+'")';e+=t.text.replace(t.fontUrlRegexp,r)+"\n";setTimeout(function(){a(n)},0)}var i=new XMLHttpRequest;i.addEventListener("load",u);i.addEventListener("error",r);i.addEventListener("abort",r);i.open("GET",t.url);i.responseType="arraybuffer";i.send()}if(n.length>0){var t=n.pop();r(t)}else i(e)}function it(n){for(var i="",r=new Uint8Array(n),u=r.byteLength,t=0;t<u;t++)i+=String.fromCharCode(r[t]);return window.btoa(i)}for(var v=t.selectorRemap,y=t.modifyStyle,e="",p=[],o=document.styleSheets,h,c,l,r,s,b,k,f=0;f<o.length;f++){try{h=o[f].cssRules}catch(rt){console.warn("Stylesheet could not be loaded: "+o[f].href);continue}if(h!=null)for(c=0;c<h.length;c++,l=null)if(r=h[c],typeof r.style!="undefined"){try{s=r.selectorText}catch(w){console.warn('The following CSS rule has an invalid selector: "'+r+'"',w)}try{s&&(l=n.querySelector(s)||n.parentNode.querySelector(s))}catch(w){console.warn('Invalid CSS selector "'+s+'"',w)}if(l)b=v?v(r.selectorText):r.selectorText,k=y?y(r.style.cssText):r.style.cssText,e+=b+" { "+k+" }\n";else if(r.cssText.match(/^@font-face/)){var d=/url\(["']?(.+?)["']?\)/,g=r.cssText.match(d),u=g&&g[1]||"",nt=u.match(/^data:/);nt&&(u="");u?(u.startsWith("../")?u=o[f].href+"/../"+u:u.startsWith("./")&&(u=o[f].href+"/."+u),p.push({text:r.cssText,fontUrlRegexp:d,format:tt(u),url:u})):e+=r.cssText+"\n"}}}a(p)}function i(n,t,i){var r=n.viewBox&&n.viewBox.baseVal&&n.viewBox.baseVal[i]||t.getAttribute(i)!==null&&!t.getAttribute(i).match(/%$/)&&parseInt(t.getAttribute(i))||n.getBoundingClientRect()[i]||parseInt(t.style[i])||parseInt(window.getComputedStyle(n).getPropertyValue(i));return typeof r=="undefined"||r===null||isNaN(parseFloat(r))?0:r}function h(n){return n=encodeURIComponent(n),n=n.replace(/%([0-9A-F]{2})/g,function(n,t){var i=String.fromCharCode("0x"+t);return i==="%"?"%25":i}),decodeURIComponent(n)}function r(n){for(var i=window.atob(n.split(",")[1]),u=n.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(i.length),f=new Uint8Array(r),t=0;t<i.length;t++)f[t]=i.charCodeAt(t);return new Blob([r],{type:u})}var n=typeof exports!="undefined"&&exports||typeof define!="undefined"&&{}||this,u='<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [<!ENTITY nbsp "&#160;">]>';n.prepareSvg=function(n,r,u){t(n);r=r||{};r.scale=r.scale||1;r.responsive=r.responsive||!1;var f="http://www.w3.org/2000/xmlns/";o(n,function(){function y(n){var r=document.createElement("style"),f,i;r.setAttribute("type","text/css");r.innerHTML="<![CDATA[\n"+n+"\n]\]>";f=document.createElement("defs");f.appendChild(r);t.insertBefore(f,t.firstChild);u&&(i=v.innerHTML,i=i.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href'),u(i,e,o))}var v=document.createElement("div"),t=n.cloneNode(!0),e,o,h,a,l,c;if(n.tagName=="svg")e=r.width||i(n,t,"width"),o=r.height||i(n,t,"height");else if(n.getBBox)h=n.getBBox(),e=h.x+h.width,o=h.y+h.height,t.setAttribute("transform",t.getAttribute("transform").replace(/translate\(.*?\)/,"")),a=document.createElementNS("http://www.w3.org/2000/svg","svg"),a.appendChild(t),t=a;else{console.error("Attempted to render non-SVG element",n);return}for(t.setAttribute("version","1.1"),t.getAttribute("xmlns")||t.setAttributeNS(f,"xmlns","http://www.w3.org/2000/svg"),t.getAttribute("xmlns:xlink")||t.setAttributeNS(f,"xmlns:xlink","http://www.w3.org/1999/xlink"),r.responsive?(t.removeAttribute("width"),t.removeAttribute("height"),t.setAttribute("preserveAspectRatio","xMinYMin meet")):(t.setAttribute("width",e*r.scale),t.setAttribute("height",o*r.scale)),t.setAttribute("viewBox",[r.left||0,r.top||0,e,o].join(" ")),l=t.querySelectorAll("foreignObject > *"),c=0;c<l.length;c++)l[c].getAttribute("xmlns")||l[c].setAttributeNS(f,"xmlns","http://www.w3.org/1999/xhtml");v.appendChild(t);s(n,r,y)})};n.svgAsDataUri=function(t,i,r){n.prepareSvg(t,i,function(n){var t="data:image/svg+xml;base64,"+window.btoa(h(u+n));r&&r(t)})};n.svgAsPngUri=function(i,r,u){t(i);r=r||{};r.encoderType=r.encoderType||"image/png";r.encoderOptions=r.encoderOptions||.8;var f=function(n,t,i){var f=document.createElement("canvas"),e=f.getContext("2d"),s;f.width=t;f.height=i;r.canvg?r.canvg(f,n):e.drawImage(n,0,0);r.backgroundColor&&(e.globalCompositeOperation="destination-over",e.fillStyle=r.backgroundColor,e.fillRect(0,0,f.width,f.height));try{s=f.toDataURL(r.encoderType,r.encoderOptions)}catch(o){if(typeof SecurityError!="undefined"&&o instanceof SecurityError||o.name=="SecurityError"){console.error("Rendered SVG images cannot be downloaded in this browser.");return}throw o;}u(s)};r.canvg?n.prepareSvg(i,r,f):n.svgAsDataUri(i,r,function(n){var t=new Image;t.onload=function(){f(t,t.width,t.height)};t.onerror=function(){console.error("There was an error loading the data URI as an image on the following SVG\n",window.atob(n.slice(26)),"\n","Open the following link to see browser's diagnosis\n",n)};t.src=n})};n.download=function(n,t){var i,f,e,u;if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(r(t),n);else if(i=document.createElement("a"),f="download"in i,f){i.download=n;i.style.display="none";document.body.appendChild(i);try{e=r(t);u=URL.createObjectURL(e);i.href=u;i.onclick=function(){requestAnimationFrame(function(){URL.revokeObjectURL(u)})}}catch(o){console.warn("This browser does not support object URLs. Falling back to string URL.");i.href=t}i.click();document.body.removeChild(i)}else window.open(t,"_temp","menubar=no,toolbar=no,status=no")};n.saveSvg=function(i,r,u){t(i);u=u||{};n.svgAsDataUri(i,u,function(t){n.download(r,t)})};n.saveSvgAsPng=function(i,r,u){t(i);u=u||{};n.svgAsPngUri(i,u,function(t){n.download(r,t)})};typeof define!="undefined"&&define(function(){return n})}()