.width||0,t.height||0)),this._rect}},s(Le,Pe);var Gn=new Pt(0,0,0,0),Zn=new Pt(0,0,0,0),Qn=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=r({},i||{}),this.dpr=i.devicePixelRatio||vn,this._singleCanvas=n,this.root=t;var a=t.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],s=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var h=t.width,l=t.height;null!=i.width&&(h=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,t.width=h*this.dpr,t.height=l*this.dpr,this._width=h,this._height=l;var u=new Rn(t,this,this.dpr);u.__builtin__=!0,u.initContext(),s[314159]=u,o.push(314159),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=Re(this._width,this._height);t.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Qn.prototype={constructor:Qn,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var r=0;r<i.length;r++){var n=i[r],a=this._layers[n];if(!a.__builtin__&&a.refresh){var o=0===r?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape});i.__from=t,t.__hoverMir=i,i.setStyle(e),this._hoverElements.push(i)}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,r=o(i,e);r>=0&&i.splice(r,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var r=e[i].__from;r&&(r.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){Et(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var r={};i.ctx.save();for(var n=0;n<e;){var a=t[n],o=a.__from;o&&o.__zr?(n++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,r))):(t.splice(n,1),o.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var r=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!r){var n=this;En(function(){n._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(314159).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(r){r.virtual&&t.drawImage(r.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],r=0;r<this._zlevelList.length;r++){var n=this._zlevelList[r];(s=this._layers[n]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,o=0;o<i.length;o++){var s=i[o],h=s.ctx,l={};h.save();var c=e?s.__startIndex:s.__drawIndex,f=!e&&s.incremental&&Date.now,d=f&&Date.now(),p=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,p);else if(c===s.__startIndex){var v=t[c];v.incremental&&v.notClear&&!e||s.clear(!1,p)}-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var g=c;g<s.__endIndex;g++){var _=t[g];if(this._doPaintEl(_,s,e,l),_.__dirty=!1,f&&Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),l.prevElClipPaths&&h.restore(),h.restore()}return xr.wxa&&u(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,i,r){var n=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!De(t,this._width,this._height))){var o=t.__clipPaths;r.prevElClipPaths&&!Ie(o,r.prevElClipPaths)||(r.prevElClipPaths&&(e.ctx.restore(),r.prevElClipPaths=null,r.prevEl=null),o&&(n.save(),Be(o,n),r.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(n),t.brush(n,r.prevEl||null),r.prevEl=t,t.afterBrush&&t.afterBrush(n)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=314159);var r=this._layers[t];return r||((r=new Rn("zr_"+t,this,this.dpr)).zlevel=t,r.__builtin__=!0,this._layerConfig[t]&&i(r,this._layerConfig[t],!0),e&&(r.virtual=e),this.insertLayer(t,r),r.initContext()),r},insertLayer:function(t,e){var i=this._layers,r=this._zlevelList,n=r.length,a=null,o=-1,s=this._domRoot;if(i[t])_n("ZLevel "+t+" has been used already");else if(ze(e)){if(n>0&&t>r[0]){for(o=0;o<n-1&&!(r[o]<t&&r[o+1]>t);o++);a=i[r[o]]}if(r.splice(o+1,0,t),i[t]=e,!e.virtual)if(a){var h=a.dom;h.nextSibling?s.insertBefore(e.dom,h.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else _n("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,r,n=this._zlevelList;for(r=0;r<n.length;r++)i=n[r],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__&&t.call(e,i,r)},eachOtherLayer:function(t,e){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__||t.call(e,i,r)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){i&&(i.__endIndex!==t&&(i.__dirty=!0),i.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(n=1;n<t.length;n++)if((o=t[n]).zlevel!==t[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}for(var i=null,r=0,n=0;n<t.length;n++){var a,o=t[n],s=o.zlevel;o.incremental?((a=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,r=1):a=this.getLayer(s+(r>0?.01:0),this._needsManuallyCompositing),a.__builtin__||_n("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==n&&(a.__dirty=!0),a.__startIndex=n,a.incremental?a.__drawIndex=-1:a.__drawIndex=n,e(n),i=a),o.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?i(r[t],e,!0):r[t]=e;for(var n=0;n<this._zlevelList.length;n++){var a=this._zlevelList[n];a!==t&&a!==t+.01||i(this._layers[a],r[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,r=e[t];r&&(r.dom.parentNode.removeChild(r.dom),delete e[t],i.splice(o(i,t),1))},resize:function(t,e){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts;if(null!=t&&(r.width=t),null!=e&&(r.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!=t||e!=this._height){i.style.width=t+"px",i.style.height=e+"px";for(var n in this._layers)this._layers.hasOwnProperty(n)&&this._layers[n].resize(t,e);u(this._progressiveLayers,function(i){i.resize(t,e)}),this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(314159).resize(t,e)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var e=new Rn("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,r=e.dom.height,n=e.ctx;this.eachLayer(function(t){t.__builtin__?n.drawImage(t.dom,0,0,i,r):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var h=o[s];this._doPaintEl(h,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||Ae(s[i])||Ae(o.style[i]))-(Ae(s[n])||0)-(Ae(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),r=i.getContext("2d"),n=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,h=a.shadowOffsetY*e,l=a.hasStroke()?a.lineWidth:0,u=Math.max(l/2,-s+o),c=Math.max(l/2,s+o),f=Math.max(l/2,-h+o),d=Math.max(l/2,h+o),p=n.width+u+c,v=n.height+f+d;i.width=p*e,i.height=v*e,r.scale(e,e),r.clearRect(0,0,p,v),r.dpr=e;var g={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-n.x,f-n.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(r);var _=new Le({style:{x:0,y:0,image:i}});return null!=g.position&&(_.position=t.position=g.position),null!=g.rotation&&(_.rotation=t.rotation=g.rotation),null!=g.scale&&(_.scale=t.scale=g.scale),_}};var $n="undefined"!=typeof window&&!!window.addEventListener,Kn=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Jn=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Vr.call(this)};Jn.prototype={constructor:Jn,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=o(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,r=i.length,n=[],a=[],o=0;o<r;o++){var s=i[o],h=s.step(t,e);h&&(n.push(h),a.push(s))}for(o=0;o<r;)i[o]._needsRemove?(i[o]=i[r-1],i.pop(),r--):o++;r=n.length;for(o=0;o<r;o++)a[o].fire(n[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(En(t),!e._paused&&e._update())}var e=this;this._running=!0,En(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new dn(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},h(Jn,Vr);var ta=function(){this._track=[]};ta.prototype={constructor:ta,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var r=t.touches;if(r){for(var n={points:[],touches:[],target:e,event:t},a=0,o=r.length;a<o;a++){var s=r[a],h=Oe(i,s,{});n.points.push([h.zrX,h.zrY]),n.touches.push(s)}this._track.push(n)}},_recognize:function(t){for(var e in ea)if(ea.hasOwnProperty(e)){var i=ea[e](this._track,t);if(i)return i}}};var ea={pinch:function(t,e){var i=t.length;if(i){var r=(t[i-1]||{}).points,n=(t[i-2]||{}).points||r;if(n&&n.length>1&&r&&r.length>1){var a=Ve(r)/Ve(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=je(r);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},ia=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ra=["touchstart","touchend","touchmove"],na={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},aa=c(ia,function(t){var e=t.replace("mouse","pointer");return na[e]?e:t}),oa={mousemove:function(t){t=Fe(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Fe(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=Fe(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Xe(this,t,"start"),oa.mousemove.call(this,t),oa.mousedown.call(this,t),Ue(this)},touchmove:function(t){(t=Fe(this.dom,t)).zrByTouch=!0,Xe(this,t,"change"),oa.mousemove.call(this,t),Ue(this)},touchend:function(t){(t=Fe(this.dom,t)).zrByTouch=!0,Xe(this,t,"end"),oa.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&oa.click.call(this,t),Ue(this)},pointerdown:function(t){oa.mousedown.call(this,t)},pointermove:function(t){Ye(t)||oa.mousemove.call(this,t)},pointerup:function(t){oa.mouseup.call(this,t)},pointerout:function(t){Ye(t)||oa.mouseout.call(this,t)}};u(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){oa[t]=function(e){e=Fe(this.dom,e),this.trigger(t,e)}});var sa=Ze.prototype;sa.dispose=function(){for(var t=ia.concat(ra),e=0;e<t.length;e++){var i=t[e];Ne(this.dom,qe(i),this._handlers[i])}},sa.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},h(Ze,Vr);var ha=!xr.canvasSupported,la={canvas:Qn},ua={},ca=function(t,e,i){i=i||{},this.dom=e,this.id=t;var r=this,n=new Sn,a=i.renderer;if(ha){if(!la.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&la[a]||(a="canvas");var o=new la[a](e,n,i,t);this.storage=n,this.painter=o;var s=xr.node||xr.worker?null:new Ze(o.getViewportRoot());this.handler=new Xr(n,o,s,o.root),this.animation=new Jn({stage:{update:f(this.flush,this)}}),this.animation.start(),this._needsRefresh;var h=n.delFromStorage,l=n.addToStorage;n.delFromStorage=function(t){h.call(n,t),t&&t.removeSelfFromZr(r)},n.addToStorage=function(t){l.call(n,t),t.addSelfToZr(r)}};ca.prototype={constructor:ca,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,$e(this.id)}};var fa=Math.pow,da=Math.sqrt,pa=1e-8,va=1e-4,ga=da(3),_a=1/3,ma=M(),ya=M(),xa=M(),wa=Math.min,ba=Math.max,ka=Math.sin,Ta=Math.cos,Ma=2*Math.PI,Sa=M(),Ca=M(),Pa=M(),La=[],Aa=[],za={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Da=[],Ia=[],Ba=[],Ra=[],Ea=Math.min,Oa=Math.max,Ha=Math.cos,Fa=Math.sin,Wa=Math.sqrt,Na=Math.abs,Va="undefined"!=typeof Float32Array,ja=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};ja.prototype={constructor:ja,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Na(1/vn/t)||0,this._uy=Na(1/vn/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(za.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=Na(t-this._xi)>this._ux||Na(e-this._yi)>this._uy||this._len<5;return this.addData(za.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,r,n,a){return this.addData(za.C,t,e,i,r,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,r,n,a):this._ctx.bezierCurveTo(t,e,i,r,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(t,e,i,r){return this.addData(za.Q,t,e,i,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,r):this._ctx.quadraticCurveTo(t,e,i,r)),this._xi=i,this._yi=r,this},arc:function(t,e,i,r,n,a){return this.addData(za.A,t,e,i,i,r,n-r,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,r,n,a),this._xi=Ha(n)*i+t,this._yi=Fa(n)*i+t,this},arcTo:function(t,e,i,r,n){return this._ctx&&this._ctx.arcTo(t,e,i,r,n),this},rect:function(t,e,i,r){return this._ctx&&this._ctx.rect(t,e,i,r),this.addData(za.R,t,e,i,r),this},closePath:function(){this.addData(za.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!Va||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,r=this._len,n=0;n<e;n++)i+=t[n].len();Va&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i));for(n=0;n<e;n++)for(var a=t[n].data,o=0;o<a.length;o++)this.data[r++]=a[o];this._len=r},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,r,n=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,h=this._xi,l=this._yi,u=t-h,c=e-l,f=Wa(u*u+c*c),d=h,p=l,v=o.length;for(u/=f,c/=f,a<0&&(a=n+a),d-=(a%=n)*u,p-=a*c;u>0&&d<=t||u<0&&d>=t||0==u&&(c>0&&p<=e||c<0&&p>=e);)d+=u*(i=o[r=this._dashIdx]),p+=c*i,this._dashIdx=(r+1)%v,u>0&&d<h||u<0&&d>h||c>0&&p<l||c<0&&p>l||s[r%2?"moveTo":"lineTo"](u>=0?Ea(d,t):Oa(d,t),c>=0?Ea(p,e):Oa(p,e));u=d-t,c=p-e,this._dashOffset=-Wa(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,n,a){var o,s,h,l,u,c=this._dashSum,f=this._dashOffset,d=this._lineDash,p=this._ctx,v=this._xi,g=this._yi,_=ti,m=0,y=this._dashIdx,x=d.length,w=0;for(f<0&&(f=c+f),f%=c,o=0;o<1;o+=.1)s=_(v,t,i,n,o+.1)-_(v,t,i,n,o),h=_(g,e,r,a,o+.1)-_(g,e,r,a,o),m+=Wa(s*s+h*h);for(;y<x&&!((w+=d[y])>f);y++);for(o=(w-f)/m;o<=1;)l=_(v,t,i,n,o),u=_(g,e,r,a,o),y%2?p.moveTo(l,u):p.lineTo(l,u),o+=d[y]/m,y=(y+1)%x;y%2!=0&&p.lineTo(n,a),s=n-l,h=a-u,this._dashOffset=-Wa(s*s+h*h)},_dashedQuadraticTo:function(t,e,i,r){var n=i,a=r;i=(i+2*t)/3,r=(r+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,r,n,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Va&&(this.data=new Float32Array(t)))},getBoundingRect:function(){Da[0]=Da[1]=Ba[0]=Ba[1]=Number.MAX_VALUE,Ia[0]=Ia[1]=Ra[0]=Ra[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,r=0,n=0,a=0;a<t.length;){var o=t[a++];switch(1==a&&(r=e=t[a],n=i=t[a+1]),o){case za.M:e=r=t[a++],i=n=t[a++],Ba[0]=r,Ba[1]=n,Ra[0]=r,Ra[1]=n;break;case za.L:fi(e,i,t[a],t[a+1],Ba,Ra),e=t[a++],i=t[a++];break;case za.C:di(e,i,t[a++],t[a++],t[a++],t[a++],t[a],t[a+1],Ba,Ra),e=t[a++],i=t[a++];break;case za.Q:pi(e,i,t[a++],t[a++],t[a],t[a+1],Ba,Ra),e=t[a++],i=t[a++];break;case za.A:var s=t[a++],h=t[a++],l=t[a++],u=t[a++],c=t[a++],f=t[a++]+c,d=(t[a++],1-t[a++]);1==a&&(r=Ha(c)*l+s,n=Fa(c)*u+h),vi(s,h,l,u,c,f,d,Ba,Ra),e=Ha(f)*l+s,i=Fa(f)*u+h;break;case za.R:fi(r=e=t[a++],n=i=t[a++],r+t[a++],n+t[a++],Ba,Ra);break;case za.Z:e=r,i=n}E(Da,Da,Ba),O(Ia,Ia,Ra)}return 0===a&&(Da[0]=Da[1]=Ia[0]=Ia[1]=0),new Pt(Da[0],Da[1],Ia[0]-Da[0],Ia[1]-Da[1])},rebuildPath:function(t){for(var e,i,r,n,a,o,s=this.data,h=this._ux,l=this._uy,u=this._len,c=0;c<u;){var f=s[c++];switch(1==c&&(e=r=s[c],i=n=s[c+1]),f){case za.M:e=r=s[c++],i=n=s[c++],t.moveTo(r,n);break;case za.L:a=s[c++],o=s[c++],(Na(a-r)>h||Na(o-n)>l||c===u-1)&&(t.lineTo(a,o),r=a,n=o);break;case za.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case za.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case za.A:var d=s[c++],p=s[c++],v=s[c++],g=s[c++],_=s[c++],m=s[c++],y=s[c++],x=s[c++],w=v>g?v:g,b=v>g?1:v/g,k=v>g?g/v:1,T=_+m;Math.abs(v-g)>.001?(t.translate(d,p),t.rotate(y),t.scale(b,k),t.arc(0,0,w,_,T,1-x),t.scale(1/b,1/k),t.rotate(-y),t.translate(-d,-p)):t.arc(d,p,w,_,T,1-x),1==c&&(e=Ha(_)*v+d,i=Fa(_)*g+p),r=Ha(T)*v+d,n=Fa(T)*g+p;break;case za.R:e=r=s[c],i=n=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case za.Z:t.closePath(),r=e,n=i}}}},ja.CMD=za;var qa=2*Math.PI,Xa=2*Math.PI,Ua=ja.CMD,Ya=2*Math.PI,Ga=1e-4,Za=[-1,-1,-1],Qa=[-1,-1],$a=Bn.prototype.getCanvasPattern,Ka=Math.abs,Ja=new ja(!0);Ai.prototype={constructor:Ai,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i=this.style,r=this.path||Ja,n=i.hasStroke(),a=i.hasFill(),o=i.fill,s=i.stroke,h=a&&!!o.colorStops,l=n&&!!s.colorStops,u=a&&!!o.image,c=n&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var f;h&&(f=f||this.getBoundingRect(),this._fillGradient=i.getGradient(t,o,f)),l&&(f=f||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,f))}h?t.fillStyle=this._fillGradient:u&&(t.fillStyle=$a.call(o,t)),l?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=$a.call(s,t));var d=i.lineDash,p=i.lineDashOffset,v=!!t.setLineDash,g=this.getGlobalScale();r.setScale(g[0],g[1]),this.__dirtyPath||d&&!v&&n?(r.beginPath(t),d&&!v&&(r.setLineDash(d),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a&&r.fill(t),d&&v&&(t.setLineDash(d),t.lineDashOffset=p),n&&r.stroke(t),d&&v&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new ja},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var r=this.path;r||(r=this.path=new ja),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),t=r.getBoundingRect()}if(this._rect=t,e.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){n.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(n.width+=a/o,n.height+=a/o,n.x-=a/o/2,n.y-=a/o/2)}return n}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),n=this.style;if(t=i[0],e=i[1],r.contain(t,e)){var a=this.path.data;if(n.hasStroke()){var o=n.lineWidth,s=n.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(n.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Li(a,o/s,t,e)))return!0}if(n.hasFill())return Pi(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Pe.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(g(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Ka(t[0]-1)>1e-10&&Ka(t[3]-1)>1e-10?Math.sqrt(Ka(t[0]*t[3]-t[2]*t[1])):1}},Ai.extend=function(t){var e=function(e){Ai.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var n in i)!r.hasOwnProperty(n)&&i.hasOwnProperty(n)&&(r[n]=i[n])}t.init&&t.init.call(this,e)};s(e,Ai);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},s(Ai,Pe);var to=ja.CMD,eo=[[],[],[]],io=Math.sqrt,ro=Math.atan2,no=function(t,e){var i,r,n,a,o,s,h=t.data,l=to.M,u=to.C,c=to.L,f=to.R,d=to.A,p=to.Q;for(n=0,a=0;n<h.length;){switch(i=h[n++],a=n,r=0,i){case l:case c:r=1;break;case u:r=3;break;case p:r=2;break;case d:var v=e[4],g=e[5],_=io(e[0]*e[0]+e[1]*e[1]),m=io(e[2]*e[2]+e[3]*e[3]),y=ro(-e[1]/m,e[0]/_);h[n]*=_,h[n++]+=v,h[n]*=m,h[n++]+=g,h[n++]*=_,h[n++]*=m,h[n++]+=y,h[n++]+=y,a=n+=2;break;case f:s[0]=h[n++],s[1]=h[n++],R(s,s,e),h[a++]=s[0],h[a++]=s[1],s[0]+=h[n++],s[1]+=h[n++],R(s,s,e),h[a++]=s[0],h[a++]=s[1]}for(o=0;o<r;o++)(s=eo[o])[0]=h[n++],s[1]=h[n++],R(s,s,e),h[a++]=s[0],h[a++]=s[1]}},ao=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],oo=Math.sqrt,so=Math.sin,ho=Math.cos,lo=Math.PI,uo=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},co=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(uo(t)*uo(e))},fo=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(co(t,e))},po=(Object.freeze||Object)({createFromString:function(t,e){return new Ai(Ii(t,e))},extendFromString:function(t,e){return Ai.extend(Ii(t,e))},mergePath:function(t,e){for(var i=[],r=t.length,n=0;n<r;n++){var a=t[n];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var o=new Ai(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o}}),vo=Ai.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],r=0;r<i.length;r++)i[r].buildPath(t,i[r].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Ai.prototype.getBoundingRect.call(this)}}),go=function(t){Pe.call(this,t)};go.prototype={constructor:go,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&ue(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var r=i.text;null!=r&&(r+=""),i.bind(t,this,e),Ce(r,i)&&(this.setTransform(t),fe(this,t,r,i),this.restoreTransform(t))},getBoundingRect:function(){var t=this.style;if(this.__dirty&&ue(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=Yt(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,ke(t.textStroke,t.textStrokeWidth)){var r=t.textStrokeWidth;i.x-=r/2,i.y-=r/2,i.width+=r,i.height+=r}this._rect=i}return this._rect}},s(go,Pe),Bi.prototype.incremental=!0,Bi.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Bi.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Bi.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Bi.prototype.eachPendingDisplayable=function(t){for(e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(var e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Bi.prototype.update=function(){this.updateTransform();for(t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var t=0;t<this._temporaryDisplayables.length;t++){var e=this._temporaryDisplayables[t];e.parent=this,e.update(),e.parent=null}},Bi.prototype.brush=function(t,e){for(i=this._cursor;i<this._displayables.length;i++)(r=this._temporaryDisplayables[i]).beforeBrush&&r.beforeBrush(t),r.brush(t,i===this._cursor?null:this._displayables[i-1]),r.afterBrush&&r.afterBrush(t);this._cursor=i;for(var i=0;i<this._temporaryDisplayables.length;i++){var r=this._temporaryDisplayables[i];r.beforeBrush&&r.beforeBrush(t),r.brush(t,0===i?null:this._temporaryDisplayables[i-1]),r.afterBrush&&r.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var _o=[];Bi.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Pt(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],r=i.getBoundingRect().clone();i.needLocalTransform()&&r.applyTransform(i.getLocalTransform(_o)),t.union(r)}this._rect=t}return this._rect},Bi.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(t,e))return!0;return!1},s(Bi,Pe);var mo=Ai.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,r=e.cy,n=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,h=Math.cos(a),l=Math.sin(a);t.moveTo(h*n+i,l*n+r),t.arc(i,r,n,a,o,!s)}}),yo=[],xo=Ai.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,r=e.y1,n=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,h=e.cpx2,l=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,r),null==h||null==l?(u<1&&(ui(i,o,n,u,yo),o=yo[1],n=yo[2],ui(r,s,a,u,yo),s=yo[1],a=yo[2]),t.quadraticCurveTo(o,s,n,a)):(u<1&&(ni(i,o,h,n,u,yo),o=yo[1],h=yo[2],n=yo[3],ni(r,s,l,a,u,yo),s=yo[1],l=yo[2],a=yo[3]),t.bezierCurveTo(o,s,h,l,n,a)))},pointAt:function(t){return Ri(this.shape,t,!1)},tangentAt:function(t){var e=Ri(this.shape,t,!0);return D(e,e)}}),wo=Ai.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),bo=Ai.extend({type:"droplet",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=e.width,a=e.height;t.moveTo(i,r+n),t.bezierCurveTo(i+n,r+n,i+3*n/2,r-n/3,i,r-a),t.bezierCurveTo(i-3*n/2,r-n/3,i-n,r+n,i,r+n),t.closePath()}}),ko=Ai.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,r=e.cx,n=e.cy,a=e.rx,o=e.ry,s=a*i,h=o*i;t.moveTo(r-a,n),t.bezierCurveTo(r-a,n-h,r-s,n-o,r,n-o),t.bezierCurveTo(r+s,n-o,r+a,n-h,r+a,n),t.bezierCurveTo(r+a,n+h,r+s,n+o,r,n+o),t.bezierCurveTo(r-s,n+o,r-a,n+h,r-a,n),t.closePath()}}),To=Ai.extend({type:"heart",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=e.width,a=e.height;t.moveTo(i,r),t.bezierCurveTo(i+n/2,r-2*a/3,i+2*n,r+a/3,i,r+a),t.bezierCurveTo(i-2*n,r+a/3,i-n/2,r-2*a/3,i,r)}}),Mo=Math.PI,So=Math.sin,Co=Math.cos,Po=Ai.extend({type:"isogon",shape:{x:0,y:0,r:0,n:0},buildPath:function(t,e){var i=e.n;if(i&&!(i<2)){var r=e.x,n=e.y,a=e.r,o=2*Mo/i,s=-Mo/2;t.moveTo(r+a*Co(s),n+a*So(s));for(var h=0,l=i-1;h<l;h++)s+=o,t.lineTo(r+a*Co(s),n+a*So(s));t.closePath()}}}),Lo=Ai.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,r=e.y1,n=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(i,r),o<1&&(n=i*(1-o)+n*o,a=r*(1-o)+a*o),t.lineTo(n,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),Ao=function(t,e){for(var i=t.length,r=[],n=0,a=1;a<i;a++)n+=I(t[a-1],t[a]);var o=n/2;o=o<i?i:o;for(a=0;a<o;a++){var s,h,l,u=a/(o-1)*(e?i:i-1),c=Math.floor(u),f=u-c,d=t[c%i];e?(s=t[(c-1+i)%i],h=t[(c+1)%i],l=t[(c+2)%i]):(s=t[0===c?c:c-1],h=t[c>i-2?i-1:c+1],l=t[c>i-3?i-1:c+2]);var p=f*f,v=f*p;r.push([Ei(s[0],d[0],h[0],l[0],f,p,v),Ei(s[1],d[1],h[1],l[1],f,p,v)])}return r},zo=function(t,e,i,r){var n,a,o,s,h=[],l=[],u=[],c=[];if(r){o=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,d=t.length;f<d;f++)E(o,o,t[f]),O(s,s,t[f]);E(o,o,r[0]),O(s,s,r[1])}for(var f=0,d=t.length;f<d;f++){var p=t[f];if(i)n=t[f?f-1:d-1],a=t[(f+1)%d];else{if(0===f||f===d-1){h.push(S(t[f]));continue}n=t[f-1],a=t[f+1]}P(l,a,n),z(l,l,e);var v=I(p,n),g=I(p,a),_=v+g;0!==_&&(v/=_,g/=_),z(u,l,-v),z(c,l,g);var m=C([],p,u),y=C([],p,c);r&&(O(m,m,o),E(m,m,s),O(y,y,o),E(y,y,s)),h.push(m),h.push(y)}return i&&h.push(h.shift()),h},Do=Ai.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Oi(t,e,!0)}}),Io=Ai.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Oi(t,e,!1)}}),Bo=Ai.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,r=e.y,n=e.width,a=e.height;e.r?le(t,e):t.rect(i,r,n,a),t.closePath()}}),Ro=Ai.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=2*Math.PI;t.moveTo(i+e.r,r),t.arc(i,r,e.r,0,n,!1),t.moveTo(i+e.r0,r),t.arc(i,r,e.r0,0,n,!0)}}),Eo=Math.sin,Oo=Math.cos,Ho=Math.PI/180,Fo=Ai.extend({type:"rose",shape:{cx:0,cy:0,r:[],k:0,n:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,r,n,a=e.r,o=e.k,s=e.n,h=e.cx,l=e.cy;t.moveTo(h,l);for(var u=0,c=a.length;u<c;u++){n=a[u];for(var f=0;f<=360*s;f++)i=n*Eo(o/s*f%360*Ho)*Oo(f*Ho)+h,r=n*Eo(o/s*f%360*Ho)*Eo(f*Ho)+l,t.lineTo(i,r)}}}),Wo=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],No=Ai.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:function(t){return xr.browser.ie&&xr.browser.version>=11?function(){var e,i=this.__clipPaths,r=this.style;if(i)for(var n=0;n<i.length;n++){var a=i[n],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(h=0;h<Wo.length;h++)Wo[h][2]=r[Wo[h][0]],r[Wo[h][0]]=Wo[h][1];e=!0;break}}if(t.apply(this,arguments),e)for(var h=0;h<Wo.length;h++)r[Wo[h][0]]=Wo[h][2]}:t}(Ai.prototype.brush),buildPath:function(t,e){var i=e.cx,r=e.cy,n=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,h=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*n+i,u*n+r),t.lineTo(l*a+i,u*a+r),t.arc(i,r,a,o,s,!h),t.lineTo(Math.cos(s)*n+i,Math.sin(s)*n+r),0!==n&&t.arc(i,r,n,s,o,h),t.closePath()}}),Vo=Math.PI,jo=Math.cos,qo=Math.sin,Xo=Ai.extend({type:"star",shape:{cx:0,cy:0,n:3,r0:null,r:0},buildPath:function(t,e){var i=e.n;if(i&&!(i<2)){var r=e.cx,n=e.cy,a=e.r,o=e.r0;null==o&&(o=i>4?a*jo(2*Vo/i)/jo(Vo/i):a/3);var s=Vo/i,h=-Vo/2,l=r+a*jo(h),u=n+a*qo(h);h+=s,t.moveTo(l,u);for(var c,f=0,d=2*i-1;f<d;f++)c=f%2==0?o:a,t.lineTo(r+c*jo(h),n+c*qo(h)),h+=s;t.closePath()}}}),Uo=Math.cos,Yo=Math.sin,Go=Ai.extend({type:"trochoid",shape:{cx:0,cy:0,r:0,r0:0,d:0,location:"out"},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,r,n,a,o=e.r,s=e.r0,h=e.d,l=e.cx,u=e.cy,c="out"==e.location?1:-1;if(!(e.location&&o<=s)){var f,d=0,p=1;i=(o+c*s)*Uo(0)-c*h*Uo(0)+l,r=(o+c*s)*Yo(0)-h*Yo(0)+u,t.moveTo(i,r);do{d++}while(s*d%(o+c*s)!=0);do{f=Math.PI/180*p,n=(o+c*s)*Uo(f)-c*h*Uo((o/s+c)*f)+l,a=(o+c*s)*Yo(f)-h*Yo((o/s+c)*f)+u,t.lineTo(n,a),p++}while(p<=s*d/(o+c*s)*360)}}}),Zo=function(t){this.colorStops=t||[]};Zo.prototype={constructor:Zo,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Qo=function(t,e,i,r,n,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==r?0:r,this.type="linear",this.global=a||!1,Zo.call(this,n)};Qo.prototype={constructor:Qo},s(Qo,Zo);var $o=function(t,e,i,r,n){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=n||!1,Zo.call(this,r)};$o.prototype={constructor:$o},s($o,Zo);var Ko="http://www.w3.org/2000/svg",Jo=ja.CMD,ts=Array.prototype.join,es="none",is=Math.round,rs=Math.sin,ns=Math.cos,as=Math.PI,os=2*Math.PI,ss=180/as,hs=1e-4,ls={};ls.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=Hi("path"),t.__svgEl=i),t.path||t.createPathProxy();var r=t.path;if(t.__dirtyPath){r.beginPath(),t.buildPath(r,t.shape),t.__dirtyPath=!1;var n=Yi(r);n.indexOf("NaN")<0&&qi(i,"d",n)}Ui(i,e),ji(i,t.transform),null!=e.text&&ds(t,t.getBoundingRect())};var us={};us.brush=function(t){var e=t.style,i=e.image;if(i instanceof HTMLImageElement&&(i=i.src),i){var r=e.x||0,n=e.y||0,a=e.width,o=e.height,s=t.__svgEl;s||(s=Hi("image"),t.__svgEl=s),i!==t.__imageSrc&&(Xi(s,"href",i),t.__imageSrc=i),qi(s,"width",a),qi(s,"height",o),qi(s,"x",r),qi(s,"y",n),ji(s,t.transform),null!=e.text&&ds(t,t.getBoundingRect())}};var cs={},fs=new Pt,ds=function(t,e,i){var r=t.style;t.__dirty&&ue(r);var n=r.text;if(null!=n){n+="";var a=t.__textSvgEl;a||(a=Hi("text"),t.__textSvgEl=a);var o,s,h=r.textPosition,l=r.textDistance,u=r.textAlign||"left";"number"==typeof r.fontSize&&(r.fontSize+="px");var c=r.font||[r.fontStyle||"",r.fontWeight||"",r.fontSize||"",r.fontFamily||""].join(" ")||Vn,f=Gi(r.textVerticalAlign),d=(i=Yt(n,c,u,f)).lineHeight;if(h instanceof Array)o=e.x+h[0],s=e.y+h[1];else{var p=Kt(h,e,l);o=p.x,s=p.y,f=Gi(p.textVerticalAlign),u=p.textAlign}qi(a,"alignment-baseline",f),c&&(a.style.font=c);var v=r.textPadding;if(qi(a,"x",o),qi(a,"y",s),Ui(a,r,!0),t instanceof go||t.style.transformText)ji(a,t.transform);else{if(t.transform)fs.copy(e),fs.applyTransform(t.transform),e=fs;else{var g=t.transformCoordToGlobal(e.x,e.y);e.x=g[0],e.y=g[1]}var _=r.textOrigin;"center"===_?(o=i.width/2+o,s=i.height/2+s):_&&(o=_[0]+o,s=_[1]+s),qi(a,"transform","rotate("+180*-r.textRotation/Math.PI+","+o+","+s+")")}var m=n.split("\n"),y=m.length,x=u;"left"===x?(x="start",v&&(o+=v[3])):"right"===x?(x="end",v&&(o-=v[1])):"center"===x&&(x="middle",v&&(o+=(v[3]-v[1])/2));var w=0;if("baseline"===f?(w=-i.height+d,v&&(w-=v[2])):"middle"===f?(w=(-i.height+d)/2,v&&(s+=(v[0]-v[2])/2)):v&&(w+=v[0]),t.__text!==n||t.__textFont!==c){var b=t.__tspanList||[];t.__tspanList=b;for(T=0;T<y;T++)(M=b[T])?M.innerHTML="":(M=b[T]=Hi("tspan"),a.appendChild(M),qi(M,"alignment-baseline",f),qi(M,"text-anchor",x)),qi(M,"x",o),qi(M,"y",s+T*d+w),M.appendChild(document.createTextNode(m[T]));for(;T<b.length;T++)a.removeChild(b[T]);b.length=y,t.__text=n,t.__textFont=c}else if(t.__tspanList.length)for(var k=t.__tspanList.length,T=0;T<k;++T){var M=t.__tspanList[T];M&&(qi(M,"x",o),qi(M,"y",s+T*d+w))}}};cs.drawRectText=ds,cs.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],ds(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},Zi.prototype={diff:function(t,e,i){i||(i=function(t,e){return t===e}),this.equals=i;var r=this;t=t.slice();var n=(e=e.slice()).length,a=t.length,o=1,s=n+a,h=[{newPos:-1,components:[]}],l=this.extractCommon(h[0],e,t,0);if(h[0].newPos+1>=n&&l+1>=a){for(var u=[],c=0;c<e.length;c++)u.push(c);return[{indices:u,count:e.length}]}for(;o<=s;){var f=function(){for(var i=-1*o;i<=o;i+=2){var s,l=h[i-1],u=h[i+1],c=(u?u.newPos:0)-i;l&&(h[i-1]=void 0);var f=l&&l.newPos+1<n,d=u&&0<=c&&c<a;if(f||d){if(!f||d&&l.newPos<u.newPos?(s=$i(u),r.pushComponent(s.components,void 0,!0)):((s=l).newPos++,r.pushComponent(s.components,!0,void 0)),c=r.extractCommon(s,e,t,i),s.newPos+1>=n&&c+1>=a)return Qi(0,s.components);h[i]=s}else h[i]=void 0}o++}();if(f)return f}},pushComponent:function(t,e,i){var r=t[t.length-1];r&&r.added===e&&r.removed===i?t[t.length-1]={count:r.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,r){for(var n=e.length,a=i.length,o=t.newPos,s=o-r,h=0;o+1<n&&s+1<a&&this.equals(e[o+1],i[s+1]);)o++,s++,h++;return h&&t.components.push({count:h}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var ps=new Zi,vs=function(t,e,i){return ps.diff(t,e,i)};Ki.prototype.createElement=Hi,Ki.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var r=e.length-1;r>=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},Ki.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var r=this.add(t);r&&(t[this._domName]=r)}}},Ki.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Ki.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Ki.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return u(this._tagNames,function(i){var r=t.getElementsByTagName(i);e=e.concat([].slice.call(r))}),e},Ki.prototype.markAllUnused=function(){var t=this;u(this.getDoms(),function(e){e[t._markLabel]="0"})},Ki.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Ki.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;u(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},Ki.prototype.getSvgProxy=function(t){return t instanceof Ai?ls:t instanceof Le?us:t instanceof go?cs:ls},Ki.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Ki.prototype.getSvgElement=function(t){return t.__svgEl},s(Ji,Ki),Ji.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;u(["fill","stroke"],function(r){if(e.style[r]&&("linear"===e.style[r].type||"radial"===e.style[r].type)){var n,a=e.style[r],o=i.getDefs(!0);a._dom?(n=a._dom,o.contains(a._dom)||i.addDom(n)):n=i.add(a),i.markUsed(e);var s=n.getAttribute("id");t.setAttribute(r,"url(#"+s+")")}})}},Ji.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return _n("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},Ji.prototype.update=function(t){var e=this;Ki.prototype.update.call(this,t,function(){var i=t.type,r=t._dom.tagName;"linear"===i&&"linearGradient"===r||"radial"===i&&"radialGradient"===r?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},Ji.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void _n("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,r=0,n=i.length;r<n;++r){var a=this.createElement("stop");a.setAttribute("offset",100*i[r].offset+"%"),a.setAttribute("stop-color",i[r].color),e.appendChild(a)}t._dom=e},Ji.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&Ki.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&Ki.prototype.markUsed.call(this,e._dom)}},s(tr,Ki),tr.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},tr.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var r,n,a=this.getDefs(!0),o=e[0],s=i?"_textDom":"_dom";o[s]?(n=o[s].getAttribute("id"),r=o[s],a.contains(r)||a.appendChild(r)):(n="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",n),a.appendChild(r),o[s]=r);var h=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var l=Array.prototype.slice.call(o.transform);U(o.transform,o.parent.invTransform,o.transform),h.brush(o),o.transform=l}else h.brush(o);var u=this.getSvgElement(o);r.innerHTML="",r.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+n+")"),e.length>1&&this.updateDom(r,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},tr.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&u(t.__clipPaths,function(t){t._dom&&Ki.prototype.markUsed.call(e,t._dom),t._textDom&&Ki.prototype.markUsed.call(e,t._textDom)})},s(er,Ki),er.prototype.addWithoutUpdate=function(t,e){if(e&&ir(e.style)){var i,r=e.style;r._shadowDom?(i=r._shadowDom,this.getDefs(!0).contains(r._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}},er.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},er.prototype.update=function(t,e){var i=e.style;if(ir(i)){var r=this;Ki.prototype.update.call(this,e,function(t){r.updateDom(e,t._shadowDom)})}else this.remove(t,i)},er.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},er.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var r,n,a,o,s=t.style,h=t.scale?t.scale[0]||1:1,l=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)r=s.shadowOffsetX||0,n=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);r=s.textShadowOffsetX||0,n=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",r/h),i.setAttribute("dy",n/l),i.setAttribute("flood-color",o);var u=a/2/h+" "+a/2/l;i.setAttribute("stdDeviation",u),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),s._shadowDom=e},er.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&Ki.prototype.markUsed.call(this,e._shadowDom)};var gs=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=r({},i||{});var a=Hi("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("version","1.1"),a.setAttribute("baseProfile","full"),a.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new Ji(n,a),this.clipPathManager=new tr(n,a),this.shadowManager=new er(n,a);var o=document.createElement("div");o.style.cssText="overflow:hidden;position:relative",this._svgRoot=a,this._viewport=o,t.appendChild(o),o.appendChild(a),this.resize(i.width,i.height),this._visibleList=[]};gs.prototype={constructor:gs,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i=this._svgRoot,r=this._visibleList,n=t.length,a=[];for(e=0;e<n;e++){var o=nr(d=t[e]),s=ur(d)||lr(d);d.invisible||(d.__dirty&&(o&&o.brush(d),this.clipPathManager.update(d),d.style&&(this.gradientManager.update(d.style.fill),this.gradientManager.update(d.style.stroke),this.shadowManager.update(s,d)),d.__dirty=!1),a.push(d))}var h,l=vs(r,a);for(e=0;e<l.length;e++)if((c=l[e]).removed)for(f=0;f<c.count;f++){var s=ur(d=r[c.indices[f]]),u=lr(d);hr(i,s),hr(i,u)}for(e=0;e<l.length;e++){var c=l[e];if(c.added)for(f=0;f<c.count;f++){var s=ur(d=a[c.indices[f]]),u=lr(d);h?or(i,s,h):sr(i,s),s?or(i,u,s):h?or(i,u,h):sr(i,u),or(i,u,s),h=u||s||h,this.gradientManager.addWithoutUpdate(s,d),this.shadowManager.addWithoutUpdate(h,d),this.clipPathManager.markUsed(d)}else if(!c.removed)for(var f=0;f<c.count;f++){var d=a[c.indices[f]];h=s=lr(d)||ur(d)||h,this.gradientManager.markUsed(d),this.gradientManager.addWithoutUpdate(s,d),this.shadowManager.markUsed(d),this.shadowManager.addWithoutUpdate(s,d),this.clipPathManager.markUsed(d)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=a},_getDefs:function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(Hi("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var r=e.length-1;r>=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var r=this._opts;if(null!=t&&(r.width=t),null!=e&&(r.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var n=i.style;n.width=t+"px",n.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||rr(s[i])||rr(o.style[i]))-(rr(s[n])||0)-(rr(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},u(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){gs.prototype[t]=cr(t)}),Qe("svg",gs);var _s,ms="urn:schemas-microsoft-com:vml",ys="undefined"==typeof window?null:window,xs=!1,ws=ys&&ys.document;if(ws&&!xr.canvasSupported)try{!ws.namespaces.zrvml&&ws.namespaces.add("zrvml",ms),_s=function(t){return ws.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){_s=function(t){return ws.createElement("<"+t+' xmlns="'+ms+'" class="zrvml">')}}var bs=ja.CMD,ks=Math.round,Ts=Math.sqrt,Ms=Math.abs,Ss=Math.cos,Cs=Math.sin,Ps=Math.max;if(!xr.canvasSupported){var Ls=21600,As=Ls/2,zs=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ls+","+Ls,t.coordorigin="0,0"},Ds=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")},Is=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},Bs=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Rs=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},Es=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},Os=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},Hs=function(t,e,i){var r=lt(e);i=+i,isNaN(i)&&(i=1),r&&(t.color=Is(r[0],r[1],r[2]),t.opacity=i*r[3])},Fs=function(t){var e=lt(t);return[Is(e[0],e[1],e[2]),e[3]]},Ws=function(t,e,i){var r=e.fill;if(null!=r)if(r instanceof Zo){var n,a=0,o=[0,0],s=0,h=1,l=i.getBoundingRect(),u=l.width,c=l.height;if("linear"===r.type){n="gradient";var f=i.transform,d=[r.x*u,r.y*c],p=[r.x2*u,r.y2*c];f&&(R(d,d,f),R(p,p,f));var v=p[0]-d[0],g=p[1]-d[1];(a=180*Math.atan2(v,g)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{n="gradientradial";var d=[r.x*u,r.y*c],f=i.transform,_=i.scale,m=u,y=c;o=[(d[0]-l.x)/m,(d[1]-l.y)/y],f&&R(d,d,f),m/=_[0]*Ls,y/=_[1]*Ls;var x=Ps(m,y);s=0/x,h=2*r.r/x-s}var w=r.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,k=[],T=[],M=0;M<b;M++){var S=w[M],C=Fs(S.color);T.push(S.offset*h+s+" "+C[0]),0!==M&&M!==b-1||k.push(C)}if(b>=2){var P=k[0][0],L=k[1][0],A=k[0][1]*e.opacity,z=k[1][1]*e.opacity;t.type=n,t.method="none",t.focus="100%",t.angle=a,t.color=P,t.color2=L,t.colors=T.join(","),t.opacity=z,t.opacity2=A}"radial"===n&&(t.focusposition=o.join(","))}else Hs(t,r,e.opacity)},Ns=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof Zo||Hs(t,e.stroke,e.opacity)},Vs=function(t,e,i,r){var n="fill"==e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(n||!n&&i.lineWidth)?(t[n?"filled":"stroked"]="true",i[e]instanceof Zo&&Rs(t,a),a||(a=fr(e)),n?Ws(a,i,r):Ns(a,i),Bs(t,a)):(t[n?"filled":"stroked"]="false",Rs(t,a))},js=[[],[],[]],qs=function(t,e){var i,r,n,a,o,s,h=bs.M,l=bs.C,u=bs.L,c=bs.A,f=bs.Q,d=[],p=t.data,v=t.len();for(a=0;a<v;){switch(n=p[a++],r="",i=0,n){case h:r=" m ",i=1,o=p[a++],s=p[a++],js[0][0]=o,js[0][1]=s;break;case u:r=" l ",i=1,o=p[a++],s=p[a++],js[0][0]=o,js[0][1]=s;break;case f:case l:r=" c ",i=3;var g,_,m=p[a++],y=p[a++],x=p[a++],w=p[a++];n===f?(g=x,_=w,x=(x+2*m)/3,w=(w+2*y)/3,m=(o+2*m)/3,y=(s+2*y)/3):(g=p[a++],_=p[a++]),js[0][0]=m,js[0][1]=y,js[1][0]=x,js[1][1]=w,js[2][0]=g,js[2][1]=_,o=g,s=_;break;case c:var b=0,k=0,T=1,M=1,S=0;e&&(b=e[4],k=e[5],T=Ts(e[0]*e[0]+e[1]*e[1]),M=Ts(e[2]*e[2]+e[3]*e[3]),S=Math.atan2(-e[1]/M,e[0]/T));var C=p[a++],P=p[a++],L=p[a++],A=p[a++],z=p[a++]+S,D=p[a++]+z+S;a++;var I=p[a++],B=C+Ss(z)*L,E=P+Cs(z)*A,m=C+Ss(D)*L,y=P+Cs(D)*A,O=I?" wa ":" at ";Math.abs(B-m)<1e-4&&(Math.abs(D-z)>.01?I&&(B+=.0125):Math.abs(E-P)<1e-4?I&&B<C||!I&&B>C?y-=.0125:y+=.0125:I&&E<P||!I&&E>P?m+=.0125:m-=.0125),d.push(O,ks(((C-L)*T+b)*Ls-As),",",ks(((P-A)*M+k)*Ls-As),",",ks(((C+L)*T+b)*Ls-As),",",ks(((P+A)*M+k)*Ls-As),",",ks((B*T+b)*Ls-As),",",ks((E*M+k)*Ls-As),",",ks((m*T+b)*Ls-As),",",ks((y*M+k)*Ls-As)),o=m,s=y;break;case bs.R:var H=js[0],F=js[1];H[0]=p[a++],H[1]=p[a++],F[0]=H[0]+p[a++],F[1]=H[1]+p[a++],e&&(R(H,H,e),R(F,F,e)),H[0]=ks(H[0]*Ls-As),F[0]=ks(F[0]*Ls-As),H[1]=ks(H[1]*Ls-As),F[1]=ks(F[1]*Ls-As),d.push(" m ",H[0],",",H[1]," l ",F[0],",",H[1]," l ",F[0],",",F[1]," l ",H[0],",",F[1]);break;case bs.Z:d.push(" x ")}if(i>0){d.push(r);for(var W=0;W<i;W++){var N=js[W];e&&R(N,N,e),d.push(ks(N[0]*Ls-As),",",ks(N[1]*Ls-As),W<i-1?",":"")}}}return d.join("")};Ai.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=fr("shape"),zs(i),this._vmlEl=i),Vs(i,"fill",e,this),Vs(i,"stroke",e,this);var r=this.transform,n=null!=r,a=i.getElementsByTagName("stroke")[0];if(a){var o=e.lineWidth;if(n&&!e.strokeNoScale){var s=r[0]*r[3]-r[1]*r[2];o*=Ts(Ms(s))}a.weight=o+"px"}var h=this.path||(this.path=new ja);this.__dirtyPath&&(h.beginPath(),this.buildPath(h,this.shape),h.toStatic(),this.__dirtyPath=!1),i.path=qs(h,this.transform),i.style.zIndex=Es(this.zlevel,this.z,this.z2),Bs(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Ai.prototype.onRemove=function(t){Rs(t,this._vmlEl),this.removeRectText(t)},Ai.prototype.onAdd=function(t){Bs(t,this._vmlEl),this.appendRectText(t)};var Xs=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};Le.prototype.brushVML=function(t){var e,i,r=this.style,n=r.image;if(Xs(n)){var a=n.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var o=n.runtimeStyle,s=o.width,h=o.height;o.width="auto",o.height="auto",e=n.width,i=n.height,o.width=s,o.height=h,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}n=a}else n===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(n){var l=r.x||0,u=r.y||0,c=r.width,f=r.height,d=r.sWidth,p=r.sHeight,v=r.sx||0,g=r.sy||0,_=d&&p,m=this._vmlEl;m||(m=ws.createElement("div"),zs(m),this._vmlEl=m);var y,x=m.style,w=!1,b=1,k=1;if(this.transform&&(y=this.transform,b=Ts(y[0]*y[0]+y[1]*y[1]),k=Ts(y[2]*y[2]+y[3]*y[3]),w=y[1]||y[2]),w){var T=[l,u],M=[l+c,u],S=[l,u+f],C=[l+c,u+f];R(T,T,y),R(M,M,y),R(S,S,y),R(C,C,y);var P=Ps(T[0],M[0],S[0],C[0]),L=Ps(T[1],M[1],S[1],C[1]),A=[];A.push("M11=",y[0]/b,",","M12=",y[2]/k,",","M21=",y[1]/b,",","M22=",y[3]/k,",","Dx=",ks(l*b+y[4]),",","Dy=",ks(u*k+y[5])),x.padding="0 "+ks(P)+"px "+ks(L)+"px 0",x.filter="progid:DXImageTransform.Microsoft.Matrix("+A.join("")+", SizingMethod=clip)"}else y&&(l=l*b+y[4],u=u*k+y[5]),x.filter="",x.left=ks(l)+"px",x.top=ks(u)+"px";var z=this._imageEl,D=this._cropEl;z||(z=ws.createElement("div"),this._imageEl=z);var I=z.style;if(_){if(e&&i)I.width=ks(b*e*c/d)+"px",I.height=ks(k*i*f/p)+"px";else{var B=new Image,E=this;B.onload=function(){B.onload=null,e=B.width,i=B.height,I.width=ks(b*e*c/d)+"px",I.height=ks(k*i*f/p)+"px",E._imageWidth=e,E._imageHeight=i,E._imageSrc=n},B.src=n}D||((D=ws.createElement("div")).style.overflow="hidden",this._cropEl=D);var O=D.style;O.width=ks((c+v*c/d)*b),O.height=ks((f+g*f/p)*k),O.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-v*c/d*b+",Dy="+-g*f/p*k+")",D.parentNode||m.appendChild(D),z.parentNode!=D&&D.appendChild(z)}else I.width=ks(b*c)+"px",I.height=ks(k*f)+"px",m.appendChild(z),D&&D.parentNode&&(m.removeChild(D),this._cropEl=null);var H="",F=r.opacity;F<1&&(H+=".Alpha(opacity="+ks(100*F)+") "),H+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+n+", SizingMethod=scale)",I.filter=H,m.style.zIndex=Es(this.zlevel,this.z,this.z2),Bs(t,m),null!=r.text&&this.drawRectText(t,this.getBoundingRect())}},Le.prototype.onRemove=function(t){Rs(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Le.prototype.onAdd=function(t){Bs(t,this._vmlEl),this.appendRectText(t)};var Us,Ys={},Gs=0,Zs=document.createElement("div"),Qs=function(t){var e=Ys[t];if(!e){Gs>100&&(Gs=0,Ys={});var i,r=Zs.style;try{r.font=t,i=r.fontFamily.split(",")[0]}catch(t){}e={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:i||"Microsoft YaHei"},Ys[t]=e,Gs++}return e};!function(t,e){jn[t]=e}("measureText",function(t,e){var i=ws;Us||((Us=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",ws.body.appendChild(Us));try{Us.style.font=e}catch(t){}return Us.innerHTML="",Us.appendChild(i.createTextNode(t)),{width:Us.offsetWidth}});for(var $s=new Pt,Ks=[Yn,Pe,Le,Ai,go],Js=0;Js<Ks.length;Js++){var th=Ks[Js].prototype;th.drawRectText=function(t,e,i,r){var n=this.style;this.__dirty&&ue(n);var a=n.text;if(null!=a&&(a+=""),a){if(n.rich){var o=oe(a,n);a=[];for(var s=0;s<o.lines.length;s++){for(var h=o.lines[s].tokens,l=[],u=0;u<h.length;u++)l.push(h[u].text);a.push(l.join(""))}a=a.join("\n")}var c,f,d=n.textAlign,p=n.textVerticalAlign,v=Qs(n.font),g=v.style+" "+v.variant+" "+v.weight+" "+v.size+'px "'+v.family+'"';i=i||Yt(a,g,d,p);var _=this.transform;if(_&&!r&&($s.copy(e),$s.applyTransform(_),e=$s),r)c=e.x,f=e.y;else{var m=n.textPosition,y=n.textDistance;if(m instanceof Array)c=e.x+Os(m[0],e.width),f=e.y+Os(m[1],e.height),d=d||"left";else{var x=Kt(m,e,y);c=x.x,f=x.y,d=d||x.textAlign,p=p||x.textVerticalAlign}}c=Qt(c,i.width,d),f=$t(f,i.height,p),f+=i.height/2;var w,b,k,T=fr,M=this._textVmlEl;M?b=(w=(k=M.firstChild).nextSibling).nextSibling:(M=T("line"),w=T("path"),b=T("textpath"),k=T("skew"),b.style["v-text-align"]="left",zs(M),w.textpathok=!0,b.on=!0,M.from="0 0",M.to="1000 0.05",Bs(M,k),Bs(M,w),Bs(M,b),this._textVmlEl=M);var S=[c,f],C=M.style;_&&r?(R(S,S,_),k.on=!0,k.matrix=_[0].toFixed(3)+","+_[2].toFixed(3)+","+_[1].toFixed(3)+","+_[3].toFixed(3)+",0,0",k.offset=(ks(S[0])||0)+","+(ks(S[1])||0),k.origin="0 0",C.left="0px",C.top="0px"):(k.on=!1,C.left=ks(c)+"px",C.top=ks(f)+"px"),b.string=Ds(a);try{b.style.font=g}catch(t){}Vs(M,"fill",{fill:n.textFill,opacity:n.opacity},this),Vs(M,"stroke",{stroke:n.textStroke,opacity:n.opacity,lineDash:n.lineDash},this),M.style.zIndex=Es(this.zlevel,this.z,this.z2),Bs(t,M)}},th.removeRectText=function(t){Rs(t,this._textVmlEl),this._textVmlEl=null},th.appendRectText=function(t){Bs(t,this._textVmlEl)}}go.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},go.prototype.onRemove=function(t){this.removeRectText(t)},go.prototype.onAdd=function(t){this.appendRectText(t)}}vr.prototype={constructor:vr,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var r=t[i];r.invisible||r.ignore?(r.__alreadyNotVisible||r.onRemove(e),r.__alreadyNotVisible=!0):(r.__alreadyNotVisible&&r.onAdd(e),r.__alreadyNotVisible=!1,r.__dirty&&(r.beforeBrush&&r.beforeBrush(),(r.brushVML||r.brush).call(r,e),r.afterBrush&&r.afterBrush())),r.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){var t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!=t||this._height!=e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||pr(e.width))-pr(e.paddingLeft)-pr(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||pr(e.height))-pr(e.paddingTop)-pr(e.paddingBottom)|0}},u(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){vr.prototype[t]=gr(t)}),Qe("vml",vr),t.version="4.0.3",t.init=function(t,e){var i=new ca(mr(),t,e);return ua[i.id]=i,i},t.dispose=function(t){if(t)t.dispose();else{for(var e in ua)ua.hasOwnProperty(e)&&ua[e].dispose();ua={}}return this},t.getInstance=function(t){return ua[t]},t.registerPainter=Qe,t.matrix=Yr,t.vector=Wr,t.color=cn,t.path=po,t.util=Br,t.Group=kn,t.Path=Ai,t.Image=Le,t.CompoundPath=vo,t.Text=go,t.IncrementalDisplayable=Bi,t.Arc=mo,t.BezierCurve=xo,t.Circle=wo,t.Droplet=bo,t.Ellipse=ko,t.Heart=To,t.Isogon=Po,t.Line=Lo,t.Polygon=Do,t.Polyline=Io,t.Rect=Bo,t.Ring=Ro,t.Rose=Fo,t.Sector=No,t.Star=Xo,t.Trochoid=Go,t.LinearGradient=Qo,t.RadialGradient=$o,t.Pattern=Bn,t.BoundingRect=Pt}); Kodo/kodo - Gogs: Go Git Service

2 Revīzijas (d9e713e7d028869b69144672ab62fe622df63e56)

Autors SHA1 Ziņojums Datums
  FFIB f678ce19ad consumer_shot_unbinding_list 增加筛选项 2 gadi atpakaļ
  FFIB 0a9dd97a7e 增加解绑功能 2 gadi atpakaļ