functiont(t,e,i,n){functionr(e){vari=l[e],n=l[e+1];s==i&&a==n||(t.beginPath(),t.moveTo(s,a),t.lineTo(i,n),t.stroke(),t.beginPath(),t.arc(i,n,o,0,2*Math.PI,!0),t.fill())}if(!(n<=0))for(vars,a,o=n/2,h=n-2,u=o-1,l=newArray(6),c=0,f=e.length;c<f;c++){vard=e[c],_=d._selection;if(d._transformCoordinates(i,l),s=l[0],a=l[1],2&_&&r(2),4&_&&r(4),t.fillRect(s-o,a-o,n,n),h>0&&!(1&_)){varg=t.fillStyle;t.fillStyle="#ffffff",t.fillRect(s-u,a-u,h,h),t.fillStyle=g}}}functione(t,e,i){functionn(e){if(i)e._transformCoordinates(i,_),r=_[0],s=_[1];else{varn=e._point;r=n._x,s=n._y}if(g)t.moveTo(r,s),g=!1;else{if(i)h=_[2],u=_[3];else{varf=e._handleIn;h=r+f._x,u=s+f._y}h===r&&u===s&&l===a&&c===o?t.lineTo(r,s):t.bezierCurveTo(l,c,h,u,r,s)}if(a=r,o=s,i)l=_[4],c=_[5];else{varf=e._handleOut;l=a+f._x,c=o+f._y}}for(varr,s,a,o,h,u,l,c,f=e._segments,d=f.length,_=newArray(6),g=!0,v=0;v<d;v++)n(f[v]);e._closed&&d>0&&n(f[0])}return{_draw:function(t,i,n,r){functions(t){returnc[(t%f+f)%f]}vara=i.dontStart,o=i.dontFinish||i.clip,h=this.getStyle(),u=h.hasFill(),l=h.hasStroke(),c=h.getDashArray(),f=!st.support.nativeDash&&l&&c&&c.length;if(a||t.beginPath(),(u||l&&!f||o)&&(e(t,this,r),this._closed&&t.closePath()),!o&&(u||l)&&(this._setStyles(t,i,n),u&&(t.fill(h.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),l)){if(f){a||t.beginPath();vard,_=newE(this,.25,32,(!1),r),g=_.length,v=-h.getDashOffset(),p=0;for(v%=g;v>0;)v-=s(p--)+s(p--);for(;v<g;)d=v+s(p++),(v>0||d>0)&&_.drawPart(t,Math.max(v,0),Math.max(d,0)),v=d+s(p++)}t.stroke()}},_drawSelected:function(i,n){i.beginPath(),e(i,this,n),i.stroke(),t(i,this._segments,n,st.settings.handleSize)}}},newfunction(){functiont(t){vare=t._segments;if(!e.length)thrownewError("Use a moveTo() command first");returne[e.length-1]}return{moveTo:function(){vart=this._segments;1===t.length&&this.removeSegment(0),t.length||this._add([newO(f.read(arguments))])},moveBy:function(){thrownewError("moveBy() is unsupported on Path items.")},lineTo:function(){this._add([newO(f.read(arguments))])},cubicCurveTo:function(){vare=f.read(arguments),i=f.read(arguments),n=f.read(arguments),r=t(this);r.setHandleOut(e.subtract(r._point)),this._add([newO(n,i.subtract(n))])},quadraticCurveTo:function(){vare=f.read(arguments),i=f.read(arguments),n=t(this)._point;this.cubicCurveTo(e.add(n.subtract(e).multiply(1/3)),e.add(i.subtract(e).multiply(1/3)),i)},curveTo:function(){vare=f.read(arguments),i=f.read(arguments),n=r.pick(r.read(arguments),.5),s=1-n,a=t(this)._point,o=e.subtract(a.multiply(s*s)).subtract(i.multiply(n*n)).divide(2*n*s);if(o.isNaN())thrownewError("Cannot put a curve through points with parameter = "+n);this.quadraticCurveTo(o,i)},arcTo:function(){vare,i,n,s,a,o=Math.abs,h=Math.sqrt,u=t(this),c=u._point,d=f.read(arguments),g=r.peek(arguments),v=r.pick(g,!0);if("boolean"==typeofv)varp=c.add(d).divide(2),e=p.add(p.subtract(c).rotate(v?-90:90));elseif(r.remain(arguments)<=2)e=d,d=f.read(arguments);elseif(!c.equals(d)){varw=_.read(arguments),x=l.isZero;if(x(w.width)||x(w.height))returnthis.lineTo(d);varb=r.read(arguments),v=!!r.read(arguments),C=!!r.read(arguments),p=c.add(d).divide(2),S=c.subtract(p).rotate(-b),P=S.x,I=S.y,M=o(w.width),T=o(w.height),z=M*M,k=T*T,A=P*P,L=I*I,N=h(A/z+L/k);if(N>1&&(M*=N,T*=N,z=M*M,k=T*T),N=(z*k-z*L-k*A)/(z*L+k*A),o(N)<1e-12&&(N=0),N<0)thrownewError("Cannot create an arc with the given arguments");i=newf(M*I/T,-T*P/M).multiply((C===v?-1:1)*h(N)).rotate(b).add(p),a=(newm).translate(i).rotate(b).scale(M,T),s=a._inverseTransform(c),n=s.getDirectedAngle(a._inverseTransform(d)),!v&&n>0?n-=360:v&&n<0&&(n+=360)}if(e){varB=newy(c.add(e).divide(2),e.subtract(c).rotate(90),(!0)),E=newy(e.add(d).divide(2),d.subtract(e).rotate(90),(!0)),j=newy(c,d),F=j.getSide(e);if(i=B.intersect(E,!0),!i){if(!F)returnthis.lineTo(d);thrownewError("Cannot create an arc with the given arguments")}s=c.subtract(i),n=s.getDirectedAngle(d.subtract(i));varD=j.getSide(i,!0);0===D?n=F*o(n):F===D&&(n+=n<0?360:-360)}if(n){for(varR=1e-7,q=o(n),V=q>=360?4:Math.ceil((q-R)/90),H=n/V,Z=H*Math.PI/360,U=4/3*
this.canvases.length?r=this.canvases.pop():(r=n.createElement("canvas"),s=!1);vara=r.getContext("2d");if(!a)thrownewError("Canvas "+r+" is unable to provide a 2D context.");returnr.width===t&&r.height===e?s&&a.clearRect(0,0,t+1,e+1):(r.width=t,r.height=e),a.save(),r},getContext:function(t,e){vari=this.getCanvas(t,e);returni?i.getContext("2d"):null},release:function(t){vare=t&&t.canvas?t.canvas:t;e&&e.getContext&&(e.getContext("2d").restore(),this.canvases.push(e))}},it=newfunction(){functiont(t,e,i){return.2989*t+.587*e+.114*i}functione(e,i,n,r){vars=r-t(e,i,n);d=e+s,_=i+s,g=n+s;varr=t(d,_,g),a=v(d,_,g),o=p(d,_,g);if(a<0){varh=r-a;d=r+(d-r)*r/h,_=r+(_-r)*r/h,g=r+(g-r)*r/h}if(o>255){varu=255-r,l=o-r;d=r+(d-r)*u/l,_=r+(_-r)*u/l,g=r+(g-r)*u/l}}functioni(t,e,i){returnp(t,e,i)-v(t,e,i)}functionn(t,e,i,n){varr,s=[t,e,i],a=p(t,e,i),o=v(t,e,i);o=o===t?0:o===e?1:2,a=a===t?0:a===e?1:2,r=0===v(o,a)?1===p(o,a)?2:1:0,s[a]>s[o]?(s[r]=(s[r]-s[o])*n/(s[a]-s[o]),s[a]=n):s[r]=s[a]=0,s[o]=0,d=s[0],_=s[1],g=s[2]}vars,a,o,h,u,l,c,f,d,_,g,v=Math.min,p=Math.max,m=Math.abs,y={multiply:function(){d=u*s/255,_=l*a/255,g=c*o/255},screen:function(){d=u+s-u*s/255,_=l+a-l*a/255,g=c+o-c*o/255},overlay:function(){d=u<128?2*u*s/255:255-2*(255-u)*(255-s)/255,_=l<128?2*l*a/255:255-2*(255-l)*(255-a)/255,g=c<128?2*c*o/255:255-2*(255-c)*(255-o)/255},"soft-light":function(){vart=s*u/255;d=t+u*(255-(255-u)*(255-s)/255-t)/255,t=a*l/255,_=t+l*(255-(255-l)*(255-a)/255-t)/255,t=o*c/255,g=t+c*(255-(255-c)*(255-o)/255-t)/255},"hard-light":function(){d=s<128?2*s*u/255:255-2*(255-s)*(255-u)/255,_=a<128?2*a*l/255:255-2*(255-a)*(255-l)/255,g=o<128?2*o*c/255:255-2*(255-o)*(255-c)/255},"color-dodge":function(){d=0===u?0:255===s?255:v(255,255*u/(255-s)),_=0===l?0:255===a?255:v(255,255*l/(255-a)),g=0===c?0:255===o?255:v(255,255*c/(255-o))},"color-burn":function(){d=255===u?255:0===s?0:p(0,255-255*(255-u)/s),_=255===l?255:0===a?0:p(0,255-255*(255-l)/a),g=255===c?255:0===o?0:p(0,255-255*(255-c)/o)},darken:function(){d=u<s?u:s,_=l<a?l:a,g=c<o?c:o},lighten:function(){d=u>s?u:s,_=l>a?l:a,g=c>o?c:o},difference:function(){d=u-s,d<0&&(d=-d),_=l-a,_<0&&(_=-_),g=c-o,g<0&&(g=-g)},exclusion:function(){d=u+s*(255-u-u)/255,_=l+a*(255-l-l)/255,g=c+o*(255-c-c)/255},hue:function(){n(s,a,o,i(u,l,c)),e(d,_,g,t(u,l,c))},saturation:function(){n(u,l,c,i(s,a,o)),e(d,_,g,t(u,l,c))},luminosity:function(){e(u,l,c,t(s,a,o))},color:function(){e(s,a,o,t(u,l,c))},add:function(){d=v(u+s,255),_=v(l+a,255),g=v(c+o,255)},subtract:function(){d=p(u-s,0),_=p(l-a,0),g=p(c-o,0)},average:function(){d=(u+s)/2,_=(l+a)/2,g=(c+o)/2},negation:function(){d=255-m(255-s-u),_=255-m(255-a-l),g=255-m(255-o-c)}},w=this.nativeModes=r.each(["source-over","source-in","source-out","source-atop","destination-over","destination-in","destination-out","destination-atop","lighter","darker","copy","xor"],function(t){this[t]=!0},{}),x=et.getContext(1,1);x&&(r.each(y,function(t,e){vari="darken"===e,n=!1;x.save();try{x.fillStyle=i?"#300":"#a00",x.fillRect(0,0,1,1),x.globalCompositeOperation=e,x.globalCompositeOperation===e&&(x.fillStyle=i?"#a00":"#300",x.fillRect(0,0,1,1),n=x.getImageData(0,0,1,1).data[0]!==i?170:51)}catch(r){}x.restore(),w[e]=n}),et.release(x)),this.process=function(t,e,i,n,r){varv=e.canvas,p="normal"===t;if(p||w[t])i.save(),i.setTransform(1,0,0,1,0,0),i.globalAlpha=n,p||(i.globalCompositeOperation=t),i.drawImage(v,r.x,r.y),i.restore();else{varm=y[t];if(!m)return;for(varx=i.getImageData(r.x,r.y,v.width,v.height),b=x.data,C=e.getImageData(0,0,v.width,v.height).data,S=0,P=b.length;S<P;S+=4){s=C[S],u=b[S],a=C[S+1],l=b[S+1],o=C[S+2],c=b[S+2],h=C[S+3],f=b[S+3],m();varI=h*n/255,M=1-I;b[S]=I*d+M*u,b[S+1]=I*_+M*l,b[S+2]=I*g+M*c,b[S+3]=h*n+M*f}i.putImageData(x,r.x,r.y)}}},nt=newfunction(){functiont(t,e,s){returni(n.createElementNS(r,t),e,s)}functione(t,e){vari=o[e],n=i?t.getAttributeNS(i,e):t.getAttribute(e);return"null"===n?null:n}functioni(t,e,i){for(varnine){varr=e[n],s=o[n];"number"==typeofr&&i&&(r=i.number(r)),s?t.setAttributeNS(s,n,r):t.setAttribute(n,r)}returnt}varr="http://www.w3.org