0&&t.arc(c+$.cx,h+$.cy,U,Cg($.y0,$.x0),Cg($.y1,$.x1),!f),t.arc(c,h,r,Cg($.cy+$.y1,$.cx+$.x1),Cg(X.cy+X.y1,X.cx+X.x1),!f),Y>0&&t.arc(c+X.cx,h+X.cy,Y,Cg(X.y1,X.x1),Cg(X.y0,X.x0),!f))}else t.moveTo(c+k,h+L),t.arc(c,h,r,l,u,!f);else t.moveTo(c+k,h+L);if(i>Pg&&E)if(A>Pg){U=jg(g,A),Y=jg(v,A),$=Rg(j,P,I,T,i,-Y,f),X=Rg(k,L,C,D,i,-U,f);t.lineTo(c+$.cx+$.x0,h+$.cy+$.y0),A0&&t.arc(c+$.cx,h+$.cy,Y,Cg($.y0,$.x0),Cg($.y1,$.x1),!f),t.arc(c,h,i,Cg($.cy+$.y1,$.cx+$.x1),Cg(X.cy+X.y1,X.cx+X.x1),f),U>0&&t.arc(c+X.cx,h+X.cy,U,Cg(X.y1,X.x1),Cg(X.y0,X.x0),!f))}else t.lineTo(c+j,h+P),t.arc(c,h,i,u,l,f);else t.lineTo(c+j,h+P)}else t.moveTo(c,h);t.closePath()}}}var Bg=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0}return t}(),Vg=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.getDefaultShape=function(){return new Bg},e.prototype.buildPath=function(t,e){zg(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ss);Vg.prototype.type="sector";var Fg=Vg,Gg=function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t}(),Hg=function(t){function e(e){return t.call(this,e)||this}return d(e,t),e.prototype.getDefaultShape=function(){return new Gg},e.prototype.buildPath=function(t,e){var n=e.cx,r=e.cy,i=2*Math.PI;t.moveTo(n+e.r,r),t.arc(n,r,e.r,0,i,!1),t.moveTo(n+e.r0,r),t.arc(n,r,e.r0,0,i,!0)},e}(ss);Hg.prototype.type="ring";var Wg=Hg;function Ug(t,e,n,r){var i,o,a,s,l=[],u=[],c=[],h=[];if(r){a=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,p=t.length;f=2){if(r){var o=Ug(i,r,n,e.smoothConstraint);t.moveTo(i[0][0],i[0][1]);for(var a=i.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],c=i[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(i[0][0],i[0][1]);s=1;for(var h=i.length;sxv[1]){if(a=!1,i)return a;var u=Math.abs(xv[0]-bv[1]),c=Math.abs(bv[0]-xv[1]);Math.min(u,c)>r.len()&&(uMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function $v(t){return!t.isGroup}function Xv(t){return null!=t.shape}function qv(t,e,n){if(t&&e){var r=i(t);e.traverse((function(t){if($v(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),lu(t,i,n,Hs(t).dataIndex)}}}))}function i(t){var e={};return t.traverse((function(t){$v(t)&&t.anid&&(e[t.anid]=t)})),e}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return Xv(t)&&(e.shape=Object(v["extend"])({},t.shape)),e}}function Zv(t,e){return Object(v["map"])(t,(function(t){var n=t[0];n=Tv(n,e.x),n=Cv(n,e.x+e.width);var r=t[1];return r=Tv(r,e.y),r=Cv(r,e.y+e.height),[n,r]}))}function Kv(t,e){var n=Tv(t.x,e.x),r=Cv(t.x+t.width,e.x+e.width),i=Tv(t.y,e.y),o=Cv(t.y+t.height,e.y+e.height);if(r>=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}}function Jv(t,e,n){var r=Object(v["extend"])({rectHover:!0},e),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(i.image=t.slice(8),Object(v["defaults"])(i,n),new gs(r)):Rv(t.replace("path://",""),r,n,"center")}function Qv(t,e,n,r,i){for(var o=0,a=i[i.length-1];o1)return!1;var v=ey(p,d,c,h)/f;return!(v<0||v>1)}function ey(t,e,n,r){return t*r-n*e}function ny(t){return t<=1e-6&&t>=-1e-6}function ry(t){var e=t.itemTooltipOption,n=t.componentModel,r=t.itemName,i=Object(v["isString"])(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:r,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&Object(v["each"])(Object(v["keys"])(l),(function(t){Object(v["hasOwn"])(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=Hs(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:Object(v["defaults"])({content:r,formatterParams:s},i)}}function iy(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function oy(t,e){if(t)if(Object(v["isArray"])(t))for(var n=0;n=0?h():c=setTimeout(h,-i),l=r};return f.clear=function(){c&&(clearTimeout(c),c=null)},f.debounceNextCall=function(t){s=t},f}function by(t,e,n,r){var i=t[e];if(i){var o=i[gy]||i,a=i[yy],s=i[vy];if(s!==n||a!==r){if(null==n||!r)return t[e]=o;i=t[e]=my(o,n,"debounce"===r),i[gy]=o,i[yy]=r,i[vy]=n}return i}}function xy(t,e){var n=t[e];n&&n[gy]&&(n.clear&&n.clear(),t[e]=n[gy])}var _y=Xi(),wy={itemStyle:_o(Fu,!0),lineStyle:_o(zu,!0)},Sy={lineStyle:"stroke",itemStyle:"fill"};function Oy(t,e){var n=t.visualStyleMapper||wy[e];return n||(console.warn("Unknown style type '"+e+"'."),wy.itemStyle)}function My(t,e){var n=t.visualDrawType||Sy[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var Ay={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),r=t.visualStyleAccessPath||"itemStyle",i=t.getModel(r),o=Oy(t,r),a=o(i),s=i.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=My(t,r),u=a[l],c=Object(v["isFunction"])(u)?u:null,h="auto"===a.fill||"auto"===a.stroke;if(!a[l]||c||h){var f=t.getColorFromPalette(t.name,null,e.getSeriesCount());a[l]||(a[l]=f,n.setVisual("colorFromPalette",!0)),a.fill="auto"===a.fill||Object(v["isFunction"])(a.fill)?f:a.fill,a.stroke="auto"===a.stroke||Object(v["isFunction"])(a.stroke)?f:a.stroke}if(n.setVisual("style",a),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var r=t.getDataParams(n),i=Object(v["extend"])({},a);i[l]=c(r),e.setItemVisual(n,"style",i)}}}},Iy=new Uu,Ty={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),r=t.visualStyleAccessPath||"itemStyle",i=Oy(t,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[r]){Iy.option=n[r];var a=i(Iy),s=t.ensureUniqueItemVisual(e,"style");Object(v["extend"])(s,a),Iy.option.decal&&(t.setItemVisual(e,"decal",Iy.option.decal),Iy.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Cy={performRawSeries:!0,overallReset:function(t){var e=Object(v["createHashMap"])();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+n,i=e.get(r);i||(i={},e.set(r,i)),_y(t).scope=i}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),r={},i=e.getData(),o=_y(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=My(e,a);i.each((function(t){var e=i.getRawIndex(t);r[e]=t})),n.each((function(t){var a=r[t],l=i.getItemVisual(a,"colorFromPalette");if(l){var u=i.ensureUniqueItemVisual(a,"style"),c=n.getName(t)||t+"",h=n.count();u[s]=e.getColorFromPalette(c,o,h)}}))}}))}},Dy=Math.PI;function ky(t,e){e=e||{},v["defaults"](e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Nr,r=new Os({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(r);var i,o=new Gs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Os({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&(i=new cv({shape:{startAngle:-Dy/2,endAngle:-Dy/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),i.animateShape(!0).when(1e3,{endAngle:3*Dy/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*Dy/2}).delay(300).start("circularInOut"),n.add(i)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&i.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),r.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}var Ly=function(){function t(t,e,n,r){this._stageTaskMap=Object(v["createHashMap"])(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),r=n.context,i=!e&&n.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=i?n.step:null,a=r&&r.modDataCount,s=null!=a?Math.ceil(a/o):null;return{step:o,modBy:s,modDataCount:a}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),r=t.getData(),i=r.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:s,large:a}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Object(v["createHashMap"])();t.eachSeries((function(t){var r=t.getProgressive(),i=t.uid;n.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:r&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;Object(v["each"])(this._allHandlers,(function(r){var i=t.get(r.uid)||t.set(r.uid,{}),o="";Object(v["assert"])(!(r.reset&&r.overallReset),o),r.reset&&this._createSeriesStageTask(r,i,e,n),r.overallReset&&this._createOverallStageTask(r,i,e,n)}),this)},t.prototype.prepareView=function(t,e,n,r){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=n,o.api=r,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,r){r=r||{};var i=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}Object(v["each"])(t,(function(t,s){if(!r.visualType||r.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,f=c.agentStubMap;f.each((function(t){a(r,t)&&(t.dirty(),h=!0)})),h&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,r.block);f.each((function(t){t.perform(p)})),c.perform(p)&&(i=!0)}else u&&u.each((function(s,l){a(r,s)&&s.dirty();var u=o.getPerformArgs(s,r.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(i=!0)}))}})),this.unfinished=i||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,r){var i=this,o=e.seriesTaskMap,a=e.seriesTaskMap=Object(v["createHashMap"])(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||Ap({plan:Ny,reset:zy,count:Fy}));l.context={model:e,ecModel:n,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,r).each(u)},t.prototype._createOverallStageTask=function(t,e,n,r){var i=this,o=e.overallTask=e.overallTask||Ap({reset:jy});o.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=Object(v["createHashMap"])(),l=t.seriesType,u=t.getTargetSeries,c=!0,h=!1,f="";function p(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(h=!0,Ap({reset:Py,onDirty:Ry})));n.context={model:t,overallProgress:c},n.agent=o,n.__block=c,i._pipe(t,n)}Object(v["assert"])(!t.createOnAllSeries,f),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):(c=!1,Object(v["each"])(n.getSeries(),p)),h&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=e),r.tail&&r.tail.pipe(e),r.tail=e,e.__idxInPipeline=r.count++,e.__pipeline=r},t.wrapStageHandler=function(t,e){return Object(v["isFunction"])(t)&&(t={overallReset:t,seriesType:Gy(t)}),t.uid=$u("stageHandler"),e&&(t.visualType=e),t},t}();function jy(t){t.overallReset(t.ecModel,t.api,t.payload)}function Py(t){return t.overallProgress&&Ey}function Ey(){this.agent.dirty(),this.getDownstream().dirty()}function Ry(){this.agent&&this.agent.dirty()}function Ny(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function zy(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Ai(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?Object(v["map"])(e,(function(t,e){return Vy(e)})):By}var By=Vy(0);function Vy(t){return function(e,n){var r=n.data,i=n.resetDefines[t];if(i&&i.dataEach)for(var o=e.start;o0&&c===i.length-u.length){var h=i.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(i)&&(n[i]=t,s=!0),s||(r[i]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:r}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,i,"name")&&u(l,i,"dataIndex")&&u(l,i,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,r,i));function u(t,e,n,r){return null==t[n]||e[r||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),rm=["symbol","symbolSize","symbolRotate","symbolOffset"],im=rm.concat(["symbolKeepAspect"]),om={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var r={},i={},o=!1,a=0;a=0&&Dm(l)?l:.5;var u=t.createRadialGradient(a,s,0,a,s,l);return u}function jm(t,e,n){for(var r="radial"===e.type?Lm(t,e,n):km(t,e,n),i=e.colorStops,o=0;o0?"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:Object(v["isNumber"])(t)?[t]:Object(v["isArray"])(t)?t:null:null}function zm(t){var e=t.style,n=e.lineDash&&e.lineWidth>0&&Nm(e.lineDash,e.lineWidth),r=e.lineDashOffset;if(n){var i=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;i&&1!==i&&(n=Object(v["map"])(n,(function(t){return t/i})),r/=i)}return[n,r]}var Bm=new Ea(!0);function Vm(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function Fm(t){return"string"===typeof t&&"none"!==t}function Gm(t){var e=t.fill;return null!=e&&"none"!==e}function Hm(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function Wm(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function Um(t,e,n){var r=Io(e.image,e.__image,n);if(Co(r)){var i=t.createPattern(r,e.repeat||"repeat");if("function"===typeof DOMMatrix&&i&&i.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*v["RADIAN_TO_DEGREE"]),o.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(o)}return i}}function Ym(t,e,n,r){var i,o=Vm(n),a=Gm(n),s=n.strokePercent,l=s<1,u=!e.path;e.silent&&!l||!u||e.createPathProxy();var c=e.path||Bm,h=e.__dirty;if(!r){var f=n.fill,p=n.stroke,d=a&&!!f.colorStops,g=o&&!!p.colorStops,v=a&&!!f.image,y=o&&!!p.image,m=void 0,b=void 0,x=void 0,_=void 0,w=void 0;(d||g)&&(w=e.getBoundingRect()),d&&(m=h?jm(t,f,w):e.__canvasFillGradient,e.__canvasFillGradient=m),g&&(b=h?jm(t,p,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),v&&(x=h||!e.__canvasFillPattern?Um(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=x),y&&(_=h||!e.__canvasStrokePattern?Um(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),d?t.fillStyle=m:v&&(x?t.fillStyle=x:a=!1),g?t.strokeStyle=b:y&&(_?t.strokeStyle=_:o=!1)}var S,O,M=e.getGlobalScale();c.setScale(M[0],M[1],e.segmentIgnoreThreshold),t.setLineDash&&n.lineDash&&(i=zm(e),S=i[0],O=i[1]);var A=!0;(u||h&pe)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),A=!1),c.reset(),e.buildPath(c,e.shape,r),c.toStatic(),e.pathUpdated()),A&&c.rebuildPath(t,l?s:1),S&&(t.setLineDash(S),t.lineDashOffset=O),r||(n.strokeFirst?(o&&Wm(t,n),a&&Hm(t,n)):(a&&Hm(t,n),o&&Wm(t,n))),S&&t.setLineDash([])}function $m(t,e,n){var r=e.__image=Io(n.image,e.__image,e,e.onload);if(r&&Co(r)){var i=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=r.width/r.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;t.drawImage(r,u,c,n.sWidth,n.sHeight,i,o,a,s)}else if(n.sx&&n.sy){u=n.sx,c=n.sy;var h=a-u,f=s-c;t.drawImage(r,u,c,h,f,i,o,a,s)}else t.drawImage(r,i,o,a,s)}}function Xm(t,e,n){var r,i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||fr["a"],t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var o=void 0,a=void 0;t.setLineDash&&n.lineDash&&(r=zm(e),o=r[0],a=r[1]),o&&(t.setLineDash(o),t.lineDashOffset=a),n.strokeFirst?(Vm(n)&&t.strokeText(i,n.x,n.y),Gm(n)&&t.fillText(i,n.x,n.y)):(Gm(n)&&t.fillText(i,n.x,n.y),Vm(n)&&t.strokeText(i,n.x,n.y)),o&&t.setLineDash([])}}var qm=["shadowBlur","shadowOffsetX","shadowOffsetY"],Zm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Km(t,e,n,r,i){var o=!1;if(!r&&(n=n||{},e===n))return!1;if(r||e.opacity!==n.opacity){lb(t,i),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Yo.opacity:a}(r||e.blend!==n.blend)&&(o||(lb(t,i),o=!0),t.globalCompositeOperation=e.blend||Yo.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[$b])if(this._disposed)Ix(this.id);else{var r,i,o;if(Object(v["isObject"])(e)&&(n=e.lazyUpdate,r=e.silent,i=e.replaceMerge,o=e.transition,e=e.notMerge),this[$b]=!0,!this._model||e){var a=new wf(this._api),s=this._theme,l=this._model=new uf;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:i},kx);var u={seriesTransition:o,optionChanged:!0};if(n)this[Xb]={silent:r,updateParams:u},this[$b]=!1,this.getZr().wakeUp();else{try{ix(this),sx.update.call(this,null,u)}catch(c){throw this[Xb]=null,this[$b]=!1,c}this._ssr||this._zr.flush(),this[Xb]=null,this[$b]=!1,hx.call(this,r),fx.call(this,r)}}},e.prototype.setTheme=function(){Jh("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||g["a"].hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var e=this._zr.painter;return e.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var e=this._zr.painter;return e.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(g["a"].svgSupported){var t=this._zr,e=t.storage.getDisplayList();return Object(v["each"])(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,n=this._model,r=[],i=this;Object(v["each"])(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=i._componentsMap[t.__viewId];e.group.ignore||(r.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Object(v["each"])(r,(function(t){t.group.ignore=!1})),o}Ix(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,r=Math.min,i=Math.max,o=1/0;if(Rx[n]){var a=o,s=o,l=-o,u=-o,c=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();Object(v["each"])(Ex,(function(o,h){if(o.group===n){var f=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(Object(v["clone"])(t)),p=o.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=i(p.right,l),u=i(p.bottom,u),c.push({dom:f,left:p.left,top:p.top})}})),a*=h,s*=h,l*=h,u*=h;var f=l-a,p=u-s,d=fr["d"].createCanvas(),g=Hr(d,{renderer:e?"svg":"canvas"});if(g.resize({width:f,height:p}),e){var y="";return Object(v["each"])(c,(function(t){var e=t.left-a,n=t.top-s;y+=''+t.dom+""})),g.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&g.painter.setBackgroundColor(t.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return t.connectedBackgroundColor&&g.add(new Os({shape:{x:0,y:0,width:f,height:p},style:{fill:t.connectedBackgroundColor}})),Object(v["each"])(c,(function(t){var e=new gs({style:{x:t.left*h-a,y:t.top*h-s,image:t.dom}});g.add(e)})),g.refreshImmediately(),d.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}Ix(this.id)},e.prototype.convertToPixel=function(t,e){return lx(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return lx(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,r=this._model,i=Zi(r,t);return Object(v["each"])(i,(function(t,r){r.indexOf("Models")>=0&&Object(v["each"])(t,(function(t){var i=t.coordinateSystem;if(i&&i.containPoint)n=n||!!i.containPoint(e);else if("seriesModels"===r){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n}Ix(this.id)},e.prototype.getVisual=function(t,e){var n=this._model,r=Zi(n,t,{defaultMainType:"series"}),i=r.seriesModel;var o=i.getData(),a=r.hasOwnProperty("dataIndexInside")?r.dataIndexInside:r.hasOwnProperty("dataIndex")?o.indexOfRawIndex(r.dataIndex):null;return null!=a?sm(o,a,e):lm(o,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;Object(v["each"])(Ax,(function(e){var n=function(n){var r,i=t.getModel(),o=n.target,a="globalout"===e;if(a?r={}:o&&pm(o,(function(t){var e=Hs(t);if(e&&null!=e.dataIndex){var n=e.dataModel||i.getSeriesByIndex(e.seriesIndex);return r=n&&n.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return r=Object(v["extend"])({},e.eventData),!0}),!0),r){var s=r.componentType,l=r.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=r.seriesIndex);var u=s&&null!=l&&i.getComponent(s,l),c=u&&t["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,r.event=n,r.type=e,t._$eventProcessor.eventInfo={targetEl:o,packedEvent:r,model:u,view:c},t.trigger(e,r)}};n.zrEventfulCallAtLast=!0,t._zr.on(e,n,t)})),Object(v["each"])(Cx,(function(e,n){t._messageCenter.on(n,(function(t){this.trigger(n,t)}),t)})),Object(v["each"])(["selectchanged"],(function(e){t._messageCenter.on(e,(function(t){this.trigger(e,t)}),t)})),fm(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?Ix(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)Ix(this.id);else{this._disposed=!0;var t=this.getDom();t&&eo(this.getDom(),Bx,"");var e=this,n=e._api,r=e._model;Object(v["each"])(e._componentsViews,(function(t){t.dispose(r,n)})),Object(v["each"])(e._chartsViews,(function(t){t.dispose(r,n)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete Ex[e.id]}},e.prototype.resize=function(t){if(!this[$b])if(this._disposed)Ix(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),r=t&&t.silent;this[Xb]&&(null==r&&(r=this[Xb].silent),n=!0,this[Xb]=null),this[$b]=!0;try{n&&ix(this),sx.update.call(this,{type:"resize",animation:Object(v["extend"])({duration:0},t&&t.animation)})}catch(i){throw this[$b]=!1,i}this[$b]=!1,hx.call(this,r),fx.call(this,r)}}},e.prototype.showLoading=function(t,e){if(this._disposed)Ix(this.id);else if(Object(v["isObject"])(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Px[t]){var n=Px[t](this._api,e),r=this._zr;this._loadingFX=n,r.add(n)}},e.prototype.hideLoading=function(){this._disposed?Ix(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=Object(v["extend"])({},t);return e.type=Cx[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)Ix(this.id);else if(Object(v["isObject"])(e)||(e={silent:!!e}),Tx[t.type]&&this._model)if(this[$b])this._pendingActions.push(t);else{var n=e.silent;cx.call(this,t,n);var r=e.flush;r?this._zr.flush():!1!==r&&g["a"].browser.weChat&&this._throttledZrFlush(),hx.call(this,n),fx.call(this,n)}},e.prototype.updateLabelLayout=function(){Ob.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)Ix(this.id);else{var e=t.seriesIndex,n=this.getModel(),r=n.getSeriesByIndex(e);0,r.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){var e=[],n=[],r=!1;if(t.eachComponent((function(t,i){var o=i.get("zlevel")||0,a=i.get("z")||0,s=i.getZLevelKey();r=r||!!s,("series"===t?n:e).push({zlevel:o,z:a,idx:i.componentIndex,type:t,key:s})})),r){var i,o,a=e.concat(n);ce(a,(function(t,e){return t.zlevel===e.zlevel?t.z-e.z:t.zlevel-e.zlevel})),Object(v["each"])(a,(function(e){var n=t.getComponent(e.type,e.idx),r=e.zlevel,a=e.key;null!=i&&(r=Math.max(i,r)),a?(r===i&&a!==o&&r++,o=a):o&&(r===i&&r++,o=""),i=r,n.setZLevel(r)}))}}function n(t){for(var e=[],n=t.currentStates,r=0;re.get("hoverLayerThreshold")&&!g["a"].node&&!g["a"].worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}function i(t,e){var n=t.get("blendMode")||null;e.eachRendered((function(t){t.isGroup||(t.style.blend=n)}))}function o(t,e){if(!t.preventAutoZ){var n=t.get("z")||0,r=t.get("zlevel")||0;e.eachRendered((function(t){return a(t,n,r,-1/0),!0}))}}function a(t,e,n,r){var i=t.getTextContent(),o=t.getTextGuideLine(),s=t.isGroup;if(s)for(var l=t.childrenRef(),u=0;u0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;e.eachRendered((function(t){if(t.states&&t.states.emphasis){if(cu(t))return;if(t instanceof ss&&iu(t),t.__dirty){var e=t.prevStates;e&&t.useStates(e)}if(i){t.stateTransition=a;var r=t.getTextContent(),o=t.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&n(t)}}))}ix=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),ox(t,!0),ox(t,!1),e.plan()},ox=function(t,e){for(var n=t._model,r=t._scheduler,i=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;l=0)){i_.push(n);var o=$y.wrapStageHandler(n,i);o.__prio=e,o.__raw=n,t.push(o)}}function a_(t,e){Px[t]=e}function s_(t){Object(fr["e"])({createCanvas:t})}function l_(t,e,n){var r=Ib("registerMap");r&&r(t,e,n)}function u_(t){var e=Ib("getMap");return e&&e(t)}var c_=Wp;r_(zb,Ay),r_(Fb,Ty),r_(Fb,Cy),r_(zb,om),r_(Fb,am),r_(Ub,wb),Xx(Yf),qx(Lb,$f),a_("default",ky),Qx({type:nl,event:nl,update:nl},v["noop"]),Qx({type:rl,event:rl,update:rl},v["noop"]),Qx({type:il,event:il,update:il},v["noop"]),Qx({type:ol,event:ol,update:ol},v["noop"]),Qx({type:al,event:al,update:al},v["noop"]),$x("light",qy),$x("dark",em);var h_={},f_=[],p_={registerPreprocessor:Xx,registerProcessor:qx,registerPostInit:Zx,registerPostUpdate:Kx,registerUpdateLifecycle:Jx,registerAction:Qx,registerCoordinateSystem:t_,registerLayout:n_,registerVisual:r_,registerTransform:c_,registerLoading:a_,registerMap:l_,registerImpl:Ab,PRIORITY:Yb,ComponentModel:yh,ComponentView:$d,SeriesModel:Ud,ChartView:dy,registerComponentModel:function(t){yh.registerClass(t)},registerComponentView:function(t){$d.registerClass(t)},registerSeriesModel:function(t){Ud.registerClass(t)},registerChartView:function(t){dy.registerClass(t)},registerSubTypeDefaulter:function(t,e){yh.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){$r(t,e)}};function d_(t){Object(v["isArray"])(t)?Object(v["each"])(t,(function(t){d_(t)})):Object(v["indexOf"])(f_,t)>=0||(f_.push(t),Object(v["isFunction"])(t)&&(t={install:t}),t.install(p_))}function g_(t){return null==t?0:t.length||1}function v_(t){return t}var y_=function(){function t(t,e,n,r,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||v_,this._newKeyGetter=r||v_,this.context=i,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,i,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(e,r,o,"_newKeyGetter");for(var a=0;a1&&1===h)this._updateManyToOne&&this._updateManyToOne(u,l),r[s]=null;else if(1===c&&h>1)this._updateOneToMany&&this._updateOneToMany(u,l),r[s]=null;else if(1===c&&1===h)this._update&&this._update(u,l),r[s]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(u,l),r[s]=null;else if(c>1)for(var f=0;f1)for(var a=0;a30}var j_,P_,E_,R_,N_,z_,B_,V_=v["isObject"],F_=v["map"],G_="undefined"===typeof Int32Array?Array:Int32Array,H_="e\0\0",W_=-1,U_=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Y_=["_approximateExtent"],$_=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;C_(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,n=t),n=n||["x","y"];for(var i={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store,r=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,a=r.getSource().sourceFormat,s=a===wh;if(s&&!r.pure)for(var l=[],u=t;u0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,r=n[t];r||(r=n[t]={});var i=r[e];return null==i&&(i=this.getVisual(e),v["isArray"](i)?i=i.slice():V_(i)&&(i=v["extend"]({},i)),r[e]=i),i},t.prototype.setItemVisual=function(t,e,n){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,V_(e)?v["extend"](r,e):r[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){V_(t)?v["extend"](this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?v["extend"](this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Ws(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){v["each"](this._graphicEls,(function(n,r){n&&t&&t.call(e,n,r)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:F_(this.dimensions,this._getDimInfo,this),this.hostModel)),N_(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];v["isFunction"](n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(v["slice"](arguments)))})},t.internalField=function(){j_=function(t){var e=t._invertedIndicesMap;v["each"](e,(function(n,r){var i=t._dimInfos[r],o=i.ordinalMeta,a=t._store;if(o){n=e[r]=new G_(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),r[e]=s}}}(),t}(),X_=$_;function q_(t,e){return Z_(t,e).dimensions}function Z_(t,e){ep(t)||(t=rp(t)),e=e||{};var n=e.coordDimensions||[],r=e.dimensionsDefine||t.dimensionsDefine||[],i=Object(v["createHashMap"])(),o=[],a=J_(t,n,r,e.dimensionsCount),s=e.canOmitUnusedDimensions&&L_(a),l=r===t.dimensionsDefine,u=l?k_(t):D_(r),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,a));for(var h=Object(v["createHashMap"])(c),f=new Jp(a),p=0;p0&&(r.name=i+(o-1)),o++,e.set(i,o)}}function J_(t,e,n,r){var i=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,r||0);return Object(v["each"])(e,(function(t){var e;Object(v["isObject"])(t)&&(e=t.dimsDef)&&(i=Math.max(i,e.length))})),i}function Q_(t,e,n){if(n||e.hasKey(t)){var r=0;while(e.hasKey(t+r))r++;t+=r}return e.set(t,!0),t}var tw=function(){function t(t){this.coordSysDims=[],this.axisMap=Object(v["createHashMap"])(),this.categoryAxisMap=Object(v["createHashMap"])(),this.coordSysName=t}return t}();function ew(t){var e=t.get("coordinateSystem"),n=new tw(e),r=nw[e];if(r)return r(t,n,n.axisMap,n.categoryAxisMap),n}var nw={cartesian2d:function(t,e,n,r){var i=t.getReferringComponents("xAxis",Ji).models[0],o=t.getReferringComponents("yAxis",Ji).models[0];e.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),rw(i)&&(r.set("x",i),e.firstCategoryDimIndex=0),rw(o)&&(r.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,r){var i=t.getReferringComponents("singleAxis",Ji).models[0];e.coordSysDims=["single"],n.set("single",i),rw(i)&&(r.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,n,r){var i=t.getReferringComponents("polar",Ji).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),rw(o)&&(r.set("radius",o),e.firstCategoryDimIndex=0),rw(a)&&(r.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,r){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var i=t.ecModel,o=i.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();Object(v["each"])(o.parallelAxisIndex,(function(t,o){var s=i.getComponent("parallelAxis",t),l=a[o];n.set(l,s),rw(s)&&(r.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function rw(t){return"category"===t.get("type")}function iw(t,e,n){n=n||{};var r,i,o,a=n.byIndex,s=n.stackedCoordDimension;ow(e)?r=e:(i=e.schema,r=i.dimensions,o=e.store);var l,u,c,h,f=!(!t||!t.get("stack"));if(Object(v["each"])(r,(function(t,e){Object(v["isString"])(t)&&(r[e]=t={name:t}),f&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+t.id,h="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,d=u.type,g=0;Object(v["each"])(r,(function(t){t.coordDim===p&&g++}));var y={name:c,coordDim:p,coordDimIndex:g,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},m={name:h,coordDim:h,coordDimIndex:g+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(y.storeDimIndex=o.ensureCalculationDimension(h,d),m.storeDimIndex=o.ensureCalculationDimension(c,d)),i.appendCalculationDimension(y),i.appendCalculationDimension(m)):(r.push(y),r.push(m))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function ow(t){return!C_(t.schema)}function aw(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function sw(t,e){return aw(t,e)?t.getCalculationInfo("stackResultDimension"):e}function lw(t,e){var n,r=t.get("coordinateSystem"),i=gf.get(r);return e&&e.coordSysDims&&(n=v["map"](e.coordSysDims,(function(t){var n={name:t},r=e.axisMap.get(t);if(r){var i=r.get("type");n.type=w_(i)}return n}))),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function uw(t,e,n){var r,i;return n&&v["each"](t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==r&&(r=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(i=!0)})),i||null==r||(t[r].otherDims.itemName=0),r}function cw(t,e,n){n=n||{};var r,i=e.getSourceManager(),o=!1;t?(o=!0,r=rp(t)):(r=i.getSource(),o=r.sourceFormat===wh);var a=ew(e),s=lw(e,a),l=n.useEncodeDefaulter,u=v["isFunction"](l)?l:l?v["curry"](jh,s,e):null,c={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o},h=Z_(r,c),f=uw(h.dimensions,n.createInvertedIndices,a),p=o?null:i.getSharedDataStore(h),d=iw(e,{schema:h,store:p}),g=new X_(h,e);g.setCalculationInfo(d);var y=null!=f&&hw(r)?function(t,e,n,r){return r===f?n:this.defaultDimValueGetter(t,e,n,r)}:null;return g.hasItemOption=!1,g.initData(o?r:p,null,y),g}function hw(t){if(t.sourceFormat===wh){var e=fw(t.data||[]);return!v["isArray"](Ci(e))}}function fw(t){var e=0;while(ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();xo(dw);var gw=dw,vw=0,yw=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++vw}return t.createByAxisModel=function(e){var n=e.option,r=n.data,i=r&&Object(v["map"])(r,mw);return new t({categories:i,needCollect:!i,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!Object(v["isString"])(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return e=r.get(t),null==e&&(n?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Object(v["createHashMap"])(this.categories))},t}();function mw(t){return Object(v["isObject"])(t)&&null!=t.value?t.value:t+""}var bw=yw;function xw(t){return"interval"===t.type||"log"===t.type}function _w(t,e,n,r){var i={},o=t[1]-t[0],a=i.interval=gi(o/e,!0);null!=n&&ar&&(a=i.interval=r);var s=i.intervalPrecision=Sw(a),l=i.niceTickExtent=[ti(Math.ceil(t[0]/a)*a,s),ti(Math.floor(t[1]/a)*a,s)];return Mw(l,t),i}function ww(t){var e=Math.pow(10,di(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,ti(n*e)}function Sw(t){return ni(t)+2}function Ow(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Mw(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Ow(t,0,e),Ow(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Aw(t,e){return t>=e[0]&&t<=e[1]}function Iw(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Tw(t,e){return t*(e[1]-e[0])+e[0]}var Cw=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new bw({})),Object(v["isArray"])(r)&&(r=new bw({categories:Object(v["map"])(r,(function(t){return Object(v["isObject"])(t)?t.value:t}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return d(e,t),e.prototype.parse=function(t){return null==t?NaN:Object(v["isString"])(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),Aw(t,this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Iw(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Tw(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){var t=[],e=this._extent,n=e[0];while(n<=e[1])t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);i=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(gw);gw.registerClass(Cw);var Dw=Cw,kw=ti,Lw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return d(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Aw(t,this._extent)},e.prototype.normalize=function(t){return Iw(t,this._extent)},e.prototype.scale=function(t){return Tw(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Sw(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(!e)return o;var a=1e4;n[0]a)return[]}var l=o.length?o[o.length-1].value:r[1];return n[1]>l&&(t?o.push({value:kw(l+e,i)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],r=this.getExtent(),i=1;ir[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[r]=o}}return n}function Hw(t){var e=Gw(t),n=[];return Object(v["each"])(t,(function(t){var r,i=t.coordinateSystem,o=i.getBaseAxis(),a=o.getExtent();if("category"===o.type)r=o.getBandWidth();else if("value"===o.type||"time"===o.type){var s=o.dim+"_"+o.index,l=e[s],u=Math.abs(a[1]-a[0]),c=o.scale.getExtent(),h=Math.abs(c[1]-c[0]);r=l?u/h*l:u}else{var f=t.getData();r=Math.abs(a[1]-a[0])/f.count()}var p=Qr(t.get("barWidth"),r),d=Qr(t.get("barMaxWidth"),r),g=Qr(t.get("barMinWidth")||(qw(t)?.5:1),r),v=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:r,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:v,barCategoryGap:y,axisKey:Bw(o),stackId:zw(t)})})),Ww(n)}function Ww(t){var e={};Object(v["each"])(t,(function(t,n){var r=t.axisKey,i=t.bandWidth,o=e[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[r]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var c=t.barMinWidth;c&&(a[s].minWidth=c);var h=t.barGap;null!=h&&(o.gap=h);var f=t.barCategoryGap;null!=f&&(o.categoryGap=f)}));var n={};return Object(v["each"])(e,(function(t,e){n[e]={};var r=t.stacks,i=t.bandWidth,o=t.categoryGap;if(null==o){var a=Object(v["keys"])(r).length;o=Math.max(35-4*a,15)+"%"}var s=Qr(o,i),l=Qr(t.gap,1),u=t.remainedWidth,c=t.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),Object(v["each"])(r,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){r=t.width;e&&(r=Math.min(r,e)),n&&(r=Math.max(r,n)),t.width=r,u-=r+l*r,c--}else{var r=h;e&&er&&(r=n),r!==h&&(t.width=r,u-=r+l*r,c--)}})),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var f,p=0;Object(v["each"])(r,(function(t,e){t.width||(t.width=h),f=t,p+=t.width*(1+l)})),f&&(p-=f.width*l);var d=-p/2;Object(v["each"])(r,(function(t,r){n[e][r]=n[e][r]||{bandWidth:i,offset:d,width:t.width},d+=t.width*(1+l)}))})),n}function Uw(t,e,n){if(t&&e){var r=t[Bw(e)];return null!=r&&null!=n?r[zw(n)]:r}}function Yw(t,e){var n=Fw(t,e),r=Hw(n);Object(v["each"])(n,(function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=zw(t),a=r[Bw(i)][o],s=a.offset,l=a.width;e.setLayout({bandWidth:a.bandWidth,offset:s,size:l})}))}function $w(t){return{seriesType:t,plan:Xd(),reset:function(t){if(Xw(t)){var e=t.getData(),n=t.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),o=e.getDimensionIndex(e.mapDimension(i.dim)),a=e.getDimensionIndex(e.mapDimension(r.dim)),s=t.get("showBackground",!0),l=e.mapDimension(i.dim),u=e.getCalculationInfo("stackResultDimension"),c=aw(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),f=Zw(r,i),p=qw(t),d=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),v=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(t,e){var r,i=t.count,l=p&&Rw(3*i),u=p&&s&&Rw(3*i),m=p&&Rw(i),b=n.master.getRect(),x=h?b.width:b.height,_=e.getStore(),w=0;while(null!=(r=t.next())){var S=_.get(c?g:o,r),O=_.get(a,r),M=f,A=void 0;c&&(A=+S-_.get(o,r));var I=void 0,T=void 0,C=void 0,D=void 0;if(h){var k=n.dataToPoint([S,O]);if(c){var L=n.dataToPoint([A,O]);M=L[0]}I=M,T=k[1]+y,C=k[0]-M,D=v,Math.abs(C)>>1;t[i][1]n&&(this._approxInterval=n);var o=Qw.length,a=Math.min(Kw(Qw,this._approxInterval,0,o),o-1);this._interval=Qw[a][1],this._minLevelUnit=Qw[Math.max(a-1,0)][0]},e.prototype.parse=function(t){return Object(v["isNumber"])(t)?t:+fi(t)},e.prototype.contain=function(t){return Aw(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Iw(this.parse(t),this._extent)},e.prototype.scale=function(t){return Tw(t,this._extent)},e.type="time",e}(jw),Qw=[["second",uc],["minute",cc],["hour",hc],["quarter-day",6*hc],["half-day",12*hc],["day",1.2*fc],["half-week",3.5*fc],["week",7*fc],["month",31*fc],["quarter",95*fc],["half-year",pc/2],["year",pc]];function tS(t,e,n,r){var i=fi(e),o=fi(n),a=function(t){return Ac(i,t,r)===Ac(o,t,r)},s=function(){return a("year")},l=function(){return s()&&a("month")},u=function(){return l()&&a("day")},c=function(){return u()&&a("hour")},h=function(){return c()&&a("minute")},f=function(){return h()&&a("second")},p=function(){return f()&&a("millisecond")};switch(t){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return h();case"second":return f();case"millisecond":return p()}}function eS(t,e){return t/=fc,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function nS(t){var e=30*fc;return t/=e,t>6?6:t>3?3:t>2?2:1}function rS(t){return t/=hc,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function iS(t,e){return t/=e?cc:uc,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function oS(t){return gi(t,!0)}function aS(t,e,n){var r=new Date(t);switch(xc(e)){case"year":case"month":r[Ec(n)](0);case"day":r[Rc(n)](1);case"hour":r[Nc(n)](0);case"minute":r[zc(n)](0);case"second":r[Bc(n)](0),r[Vc(n)](0)}return r.getTime()}function sS(t,e,n,r){var i=1e4,o=mc,a=0;function s(t,e,n,i,o,a,s){var l=new Date(e),u=e,c=l[i]();while(u1&&0===u&&o.unshift({value:o[0].value-f})}}for(u=0;u=r[0]&&b<=r[1]&&h++)}var x=(r[1]-r[0])/e;if(h>1.5*x&&f>x/1.5)break;if(u.push(y),h>x||t===o[p])break}c=[]}}}var _=Object(v["filter"])(Object(v["map"])(u,(function(t){return Object(v["filter"])(t,(function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd}))})),(function(t){return t.length>0})),w=[],S=_.length-1;for(p=0;p<_.length;++p)for(var O=_[p],M=0;M0)r*=10;var o=[ti(pS(e[0]/r)*r),ti(fS(e[1]/r)*r)];this._interval=r,this._niceExtent=o}},e.prototype.calcNiceExtent=function(t){cS.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=gS(t)/gS(this.base),Aw(t,this._extent)},e.prototype.normalize=function(t){return t=gS(t)/gS(this.base),Iw(t,this._extent)},e.prototype.scale=function(t){return t=Tw(t,this._extent),dS(this.base,t)},e.type="log",e}(gw),yS=vS.prototype;function mS(t,e){return hS(t,ni(e))}yS.getMinorTicks=cS.getMinorTicks,yS.getLabel=cS.getLabel,gw.registerClass(vS);var bS=vS,xS=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var h=this._determinedMin,f=this._determinedMax;return null!=h&&(a=h,l=!0),null!=f&&(s=f,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:c}},t.prototype.modifyDataMinMax=function(t,e){this[wS[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=_S[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),_S={min:"_determinedMin",max:"_determinedMax"},wS={min:"_dataMin",max:"_dataMax"};function SS(t,e,n){var r=t.rawExtentInfo;return r||(r=new xS(t,e,n),t.rawExtentInfo=r,r)}function OS(t,e){return null==e?null:Object(v["eqNaN"])(e)?NaN:t.parse(e)}function MS(t,e){var n=t.type,r=SS(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var i=r.min,o=r.max,a=e.ecModel;if(a&&"time"===n){var s=Fw("bar",a),l=!1;if(v["each"](s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=Hw(s),c=AS(i,o,e,u);i=c.min,o=c.max}}return{extent:[i,o],fixMin:r.minFixed,fixMax:r.maxFixed}}function AS(t,e,n,r){var i=n.axis.getExtent(),o=i[1]-i[0],a=Uw(r,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;v["each"](a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;v["each"](a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-t,h=1-(s+l)/o,f=c/h-c;return e+=f*(l/u),t-=f*(s/u),{min:t,max:e}}function IS(t,e){var n=e,r=MS(t,n),i=r.extent,o=n.get("splitNumber");t instanceof bS&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(i[0],i[1]),t.calcNiceExtent({splitNumber:o,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function TS(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Dw({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new lS({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(gw.getClass(e)||jw)}}function CS(t){var e=t.scale.getExtent(),n=e[0],r=e[1];return!(n>0&&r>0||n<0&&r<0)}function DS(t){var e=t.getLabelModel().get("formatter"),n="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?function(e){return function(n,r){return t.scale.getFormattedLabel(n,r,e)}}(e):v["isString"](e)?function(e){return function(n){var r=t.scale.getLabel(n),i=e.replace("{value}",null!=r?r:"");return i}}(e):v["isFunction"](e)?function(e){return function(r,i){return null!=n&&(i=r.value-n),e(kS(t,r),i,null!=r.level?{level:r.level}:null)}}(e):function(e){return t.scale.getLabel(e)}}function kS(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function LS(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent();n instanceof Dw?i=n.count():(r=n.getTicks(),i=r.length);var a,s=t.getLabelModel(),l=DS(t),u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;ct[1]&&(t[1]=r[1])}))}var zS=function(){function t(){}return t.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},t.prototype.getCoordSysModel=function(){},t}();function BS(t){return pw(null,t)}var VS={isDimensionStacked:aw,enableDataStack:iw,getStackedDimension:sw};function FS(t,e){var n=e;e instanceof Uu||(n=new Uu(e));var r=TS(n);return r.setExtent(t[0],t[1]),IS(r,n),r}function GS(t){v["mixin"](t,zS)}function HS(t,e){return e=e||{},_u(t,null,null,"normal"!==e.state)}var WS=1e-8;function US(t,e){return Math.abs(t-e)n&&(t=i,n=a)}if(t)return ZS(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},e.prototype.getBoundingRect=function(t){var e=this._rect;if(e&&!t)return e;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return Object(v["each"])(i,(function(e){"polygon"===e.type?qS(e.exterior,n,r,t):Object(v["each"])(e.points,(function(e){qS(e,n,r,t)}))})),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),e=new Gt(n[0],n[1],r[0]-n[0],r[1]-n[1]),t||(this._rect=e),e},e.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var r=0,i=n.length;r>1^-(1&s),l=l>>1^-(1&l),s+=i,l+=o,i=s,o=l,r.push([s/n,l/n])}return r}function oO(t,e){return t=nO(t),v["map"](v["filter"](t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,r=t.geometry,i=[];switch(r.type){case"Polygon":var o=r.coordinates;i.push(new JS(o[0],o.slice(1)));break;case"MultiPolygon":v["each"](r.coordinates,(function(t){t[0]&&i.push(new JS(t[0],t.slice(1)))}));break;case"LineString":i.push(new QS([r.coordinates]));break;case"MultiLineString":i.push(new QS(r.coordinates))}var a=new tO(n[e||"name"],i,n.cp);return a.properties=n,a}))}var aO=Xi();function sO(t){return"category"===t.type?uO(t):fO(t)}function lO(t,e){return"category"===t.type?hO(t,e):{ticks:v["map"](t.scale.getTicks(),(function(t){return t.value}))}}function uO(t){var e=t.getLabelModel(),n=cO(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function cO(t,e){var n,r,i=pO(t,"labels"),o=PS(e),a=dO(i,o);return a||(v["isFunction"](o)?n=xO(t,o):(r="auto"===o?vO(t):o,n=bO(t,r)),gO(i,o,{labels:n,labelCategoryInterval:r}))}function hO(t,e){var n,r,i=pO(t,"ticks"),o=PS(e),a=dO(i,o);if(a)return a;if(e.get("show")&&!t.scale.isBlank()||(n=[]),v["isFunction"](o))n=xO(t,o,!0);else if("auto"===o){var s=cO(t,t.getLabelModel());r=s.labelCategoryInterval,n=v["map"](s.labels,(function(t){return t.tickValue}))}else r=o,n=bO(t,r,!0);return gO(i,o,{ticks:n,tickCategoryInterval:r})}function fO(t){var e=t.scale.getTicks(),n=DS(t);return{labels:v["map"](e,(function(e,r){return{level:e.level,formattedLabel:n(e,r),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}function pO(t,e){return aO(t)[e]||(aO(t)[e]=[])}function dO(t,e){for(var n=0;n40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),c=Math.abs(u*Math.cos(r)),h=Math.abs(u*Math.sin(r)),f=0,p=0;l<=o[1];l+=s){var d=0,g=0,v=vr(n({value:l}),e.font,"center","top");d=1.3*v.width,g=1.3*v.height,f=Math.max(f,d,7),p=Math.max(p,g,7)}var y=f/c,m=p/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var b=Math.max(0,Math.floor(Math.min(y,m))),x=aO(t.model),_=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-b)<=1&&Math.abs(S-a)<=1&&w>b&&x.axisExtent0===_[0]&&x.axisExtent1===_[1]?b=w:(x.lastTickCount=a,x.lastAutoInterval=b,x.axisExtent0=_[0],x.axisExtent1=_[1]),b}function mO(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function bO(t,e,n){var r=DS(t),i=t.scale,o=i.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=o[0],c=i.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=ES(t),f=a.get("showMinLabel")||h,p=a.get("showMaxLabel")||h;f&&u!==o[0]&&g(o[0]);for(var d=u;d<=o[1];d+=l)g(d);function g(t){var e={value:t};s.push(n?t:{formattedLabel:r(e),rawLabel:i.getLabel(e),tickValue:t})}return p&&d-l!==o[1]&&g(o[1]),s}function xO(t,e,n){var r=t.scale,i=DS(t),o=[];return v["each"](r.getTicks(),(function(t){var a=r.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:i(t),rawLabel:a,tickValue:s})})),o}var _O=[0,1],wO=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),r=Math.max(e[0],e[1]);return t>=n&&t<=r},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return ii(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&"ordinal"===r.type&&(n=n.slice(),SO(n,r.count())),Jr(t,_O,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&(n=n.slice(),SO(n,r.count()));var i=Jr(t,n,_O,e);return this.scale.scale(i)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=lO(this,e),r=n.ticks,i=Object(v["map"])(r,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this),o=e.get("alignWithLabel");return OO(this,i,o,t.clamp),i},t.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),r=Object(v["map"])(n,(function(t){return Object(v["map"])(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this);return r},t.prototype.getViewLabels=function(){return sO(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(t[1]-t[0]);return Math.abs(r)/n},t.prototype.calculateCategoryInterval=function(){return yO(this)},t}();function SO(t,e){var n=t[1]-t[0],r=e,i=n/r/2;t[0]+=i,t[1]-=i}function OO(t,e,n,r){var i=e.length;if(t.onBand&&!n&&i){var o,a,s=t.getExtent();if(1===i)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;Object(v["each"])(e,(function(t){t.coord-=u/2}));var c=t.scale.getExtent();a=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*a},e.push(o)}var h=s[0]>s[1];f(e[0].coord,s[0])&&(r?e[0].coord=s[0]:e.shift()),r&&f(s[0],e[0].coord)&&e.unshift({coord:s[0]}),f(s[1],o.coord)&&(r?o.coord=s[1]:e.pop()),r&&f(o.coord,s[1])&&e.push({coord:s[1]})}function f(t,e){return t=ti(t),e=ti(e),h?t>e:ti&&(i+=DO);var p=Math.atan2(s,a);if(p<0&&(p+=DO),p>=r&&p<=i||p+DO>=r&&p+DO<=i)return l[0]=c,l[1]=h,u-n;var d=n*Math.cos(r)+t,g=n*Math.sin(r)+e,v=n*Math.cos(i)+t,y=n*Math.sin(i)+e,m=(d-a)*(d-a)+(g-s)*(g-s),b=(v-a)*(v-a)+(y-s)*(y-s);return m0){e=e/180*Math.PI,VO.fromArray(t[0]),FO.fromArray(t[1]),GO.fromArray(t[2]),Lt.sub(HO,VO,FO),Lt.sub(WO,GO,FO);var n=HO.len(),r=WO.len();if(!(n<.001||r<.001)){HO.scale(1/n),WO.scale(1/r);var i=HO.dot(WO),o=Math.cos(e);if(o1&&Lt.copy($O,GO),$O.toArray(t[1])}}}}function qO(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,VO.fromArray(t[0]),FO.fromArray(t[1]),GO.fromArray(t[2]),Lt.sub(HO,FO,VO),Lt.sub(WO,GO,FO);var r=HO.len(),i=WO.len();if(!(r<.001||i<.001)){HO.scale(1/r),WO.scale(1/i);var o=HO.dot(e),a=Math.cos(n);if(o=l)Lt.copy($O,GO);else{$O.scaleAndAdd(WO,s/Math.tan(Math.PI/2-c));var h=GO.x!==FO.x?($O.x-FO.x)/(GO.x-FO.x):($O.y-FO.y)/(GO.y-FO.y);if(isNaN(h))return;h<0?Lt.copy($O,FO):h>1&&Lt.copy($O,GO)}$O.toArray(t[1])}}}}function ZO(t,e,n,r){var i="normal"===n,o=i?t:t.ensureState(n);o.ignore=e;var a=r.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=r.getModel("lineStyle").getLineStyle();i?t.useStyle(s):o.style=s}function KO(t,e){var n=e.smooth,r=e.points;if(r)if(t.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=P(r[0],r[1]),o=P(r[1],r[2]);if(!i||!o)return t.lineTo(r[1][0],r[1][1]),void t.lineTo(r[2][0],r[2][1]);var a=Math.min(i,o)*n,s=z([],r[1],r[0],a/i),l=z([],r[1],r[2],a/o),u=z([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c0&&o&&w(-h/a,0,a);var v,y,m=t[0],b=t[a-1];return x(),v<0&&S(-v,.8),y<0&&S(y,.8),x(),_(v,y,1),_(y,v,-1),x(),v<0&&O(-v),y<0&&O(y),u}function x(){v=m.rect[e]-r,y=i-b.rect[e]-b.rect[n]}function _(t,e,n){if(t<0){var r=Math.min(e,-t);if(r>0){w(r*n,0,a);var i=r+t;i<0&&S(-i*n,1)}else S(-t*n,1)}}function w(n,r,i){0!==n&&(u=!0);for(var o=r;o0)for(l=0;l0;l--){f=o[l-1]*h;w(-f,l,a)}}}function O(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),r=0;r0?w(n,0,r+1):w(-n,a-r-1,a),t-=n,t<=0)return}}function nM(t,e,n,r){return eM(t,"x","width",e,n,r)}function rM(t,e,n,r){return eM(t,"y","height",e,n,r)}function iM(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new Gt(0,0,0,0);function r(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var i=0;i=0&&n.attr(i.oldLayoutSelect),Object(v["indexOf"])(c,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),lu(n,l,e,s)}else if(n.attr(l),!Du(n).valueAnimation){var h=Object(v["retrieve2"])(n.style.opacity,1);n.style.opacity=0,uu(n,{style:{opacity:h}},e,s)}if(i.oldLayout=l,n.states.select){var f=i.oldLayoutSelect={};hM(f,l,fM),hM(f,n.states.select,fM)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};hM(p,l,fM),hM(p,n.states.emphasis,fM)}Lu(n,s,u,e,e)}if(r&&!r.ignore&&!r.invisible){i=cM(r),o=i.oldLayout;var d={points:r.shape.points};o?(r.attr({shape:o}),lu(r,{shape:d},e)):(r.setShape(d),r.style.strokePercent=0,uu(r,{style:{strokePercent:1}},e)),i.oldLayout=d}},t}(),dM=pM,gM=Xi();function vM(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var r=gM(e).labelManager;r||(r=gM(e).labelManager=new dM),r.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var r=gM(e).labelManager;n.updatedSeries.forEach((function(t){r.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),r.updateLayoutConfig(e),r.layout(e),r.processLabelsOverall()}))}function yM(t,e,n){var r=fr["d"].createCanvas(),i=e.getWidth(),o=e.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=i+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",t)),r.width=i*n,r.height=o*n,r}d_(vM);var mM=function(t){function e(e,n,r){var i,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,r=r||qn,"string"===typeof e?i=yM(e,n,r):v["isObject"](e)&&(i=e,e=i.id),o.id=e,o.dom=i;var a=i.style;return a&&(v["disableUserSelect"](i),i.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=n,o.dpr=r,o}return d(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=yM("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i,o=[],a=this.maxRepaintRectCount,s=!1,l=new Gt(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length){var e=new Gt(0,0,0,0);e.copy(t),o.push(e)}else{for(var n=!1,r=1/0,i=0,u=0;u=a)}}for(var c=this.__startIndex;c15)break}}n.prevElClipPaths&&h.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var x=f.dpr,_=0;_0&&t>r[0]){for(s=0;st)break;a=n[r[s]]}if(r.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,r=0;r0?wM:0),this._needsManuallyCompositing),u.__builtin__||v["logError"]("ZLevel "+l+" has been used by unkown layer "+u.id),u!==a&&(u.__used=!0,u.__startIndex!==o&&(u.__dirty=!0),u.__startIndex=o,u.incremental?u.__drawIndex=-1:u.__drawIndex=o,e(o),a=u),r.__dirty&he&&!r.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=o))}e(o),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)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,v["each"](this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?v["merge"](n[t],e,!0):n[t]=e;for(var r=0;r=LM:-l>=LM),f=l>0?l%LM:l%LM+LM,p=!1;p=!!h||!Object(Qe["j"])(c)&&f>=kM===!!u;var d=t+n*DM(o),g=e+r*CM(o);this._start&&this._add("M",d,g);var v=Math.round(i*jM);if(h){var y=1/this._p,m=(u?1:-1)*(LM-y);this._add("A",n,r,v,1,+u,t+n*DM(o+m),e+r*CM(o+m)),y>.01&&this._add("A",n,r,v,0,+u,d,g)}else{var b=t+n*DM(a),x=e+r*CM(a);this._add("A",n,r,v,+p,+u,b,x)}},t.prototype.rect=function(t,e,n,r){this._add("M",t,e),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,r,i,o,a,s,l){for(var u=[],c=this._p,h=1;h"}function ZM(t){return""+t+">"}function KM(t,e){e=e||{};var n=e.newline?"\n":"";function r(t){var e=t.children,i=t.tag,o=t.attrs,a=t.text;return qM(i,o)+("style"!==i?ot(a):a||"")+(e?""+n+Object(v["map"])(e,(function(t){return r(t)})).join(n)+n:"")+ZM(i)}return r(t)}function JM(t,e,n){n=n||{};var r=n.newline?"\n":"",i=" {"+r,o=r+"}",a=Object(v["map"])(Object(v["keys"])(t),(function(e){return e+i+Object(v["map"])(Object(v["keys"])(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(r)+o})).join(r),s=Object(v["map"])(Object(v["keys"])(e),(function(t){return"@keyframes "+t+i+Object(v["map"])(Object(v["keys"])(e[t]),(function(n){return n+i+Object(v["map"])(Object(v["keys"])(e[t][n]),(function(r){var i=e[t][n][r];return"d"===r&&(i='path("'+i+'")'),r+":"+i+";"})).join(r)+o})).join(r)+o})).join(r);return a||s?[""].join(r):""}function QM(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function tA(t,e,n,r){return XM("svg","root",{width:t,height:e,xmlns:HM,"xmlns:xlink":WM,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+t+" "+e},n)}var eA={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},nA="transform-origin";function rA(t,e,n){var r=Object(v["extend"])({},t.shape);Object(v["extend"])(r,e),t.buildPath(n,r);var i=new EM;return i.reset(Object(Qe["f"])(t)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function iA(t,e){var n=e.originX,r=e.originY;(n||r)&&(t[nA]=n+"px "+r+"px")}var oA={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function aA(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function sA(t,e,n){var r,i,o=t.shape.paths,a={};if(Object(v["each"])(o,(function(t){var e=QM(n.zrId);e.animation=!0,uA(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=Object(v["keys"])(o),u=l.length;if(u){i=l[u-1];var c=o[i];for(var h in c){var f=c[h];a[h]=a[h]||{d:""},a[h].d+=f.d||""}for(var p in s){var d=s[p].animation;d.indexOf(i)>=0&&(r=d)}}})),r){e.d=!1;var s=aA(a,n);return r.replace(i,s)}}function lA(t){return Object(v["isString"])(t)?eA[t]?"cubic-bezier("+eA[t]+")":qe(t)?t:"":""}function uA(t,e,n,r){var i=t.animators,o=i.length,a=[];if(t instanceof fv){var s=sA(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0})).length){var D=aA(c,n);return D+" "+i[0]+" both"}}for(var y in l){s=g(l[y]);s&&a.push(s)}if(a.length){var m=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+m]={animation:a.join(",")},e["class"]=m}}var cA=Math.round;function hA(t){return t&&Object(v["isString"])(t.src)}function fA(t){return t&&Object(v["isFunction"])(t.toDataURL)}function pA(t,e,n,r){GM((function(i,o){var a="fill"===i||"stroke"===i;a&&Object(Qe["k"])(o)?IA(e,t,i,r):a&&Object(Qe["n"])(o)?TA(n,t,i,r):t[i]=o}),e,n,!1),AA(n,t,r)}function dA(t){return Object(Qe["j"])(t[0]-1)&&Object(Qe["j"])(t[1])&&Object(Qe["j"])(t[2])&&Object(Qe["j"])(t[3]-1)}function gA(t){return Object(Qe["j"])(t[4])&&Object(Qe["j"])(t[5])}function vA(t,e,n){if(e&&(!gA(e)||!dA(e))){var r=n?10:1e4;t.transform=dA(e)?"translate("+cA(e[4]*r)/r+" "+cA(e[5]*r)/r+")":Object(Qe["e"])(e)}}function yA(t,e,n){for(var r=t.points,i=[],o=0;ou?(a=null==n[f+1]?null:n[f+1].elm,UA(t,a,n,l,f)):YA(t,e,s,u))}function qA(t,e){var n=e.elm=t.elm,r=t.children,i=e.children;t!==e&&($A(t,e),VA(e.text)?FA(r)&&FA(i)?r!==i&&XA(n,r,i):FA(i)?(FA(t.text)&&RA(n,""),UA(n,null,i,0,i.length-1)):FA(r)?YA(n,r,0,r.length-1):FA(t.text)&&RA(n,""):t.text!==e.text&&(FA(r)&&YA(n,r,0,r.length-1),RA(n,e.text)))}function ZA(t,e){if(HA(t,e))qA(t,e);else{var n=t.elm,r=PA(n);WA(e),null!==r&&(kA(r,e.elm,EA(n)),YA(r,[t],0,0))}return e}var KA=0,JA=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=QA("refreshHover"),this.configLayer=QA("configLayer"),this.storage=e,this._opts=n=Object(v["extend"])({},n),this.root=t,this._id="zr"+KA++,this._oldVNode=tA(n.width,n.height),t&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=$M("svg");$A(null,this._oldVNode),r.appendChild(i),t.appendChild(r)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",ZA(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return MA(t,QM(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=QM(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress;var o=[],a=this._bgVNode=tI(n,r,this._backgroundColor,i);a&&o.push(a);var s=t.compress?null:this._mainVNode=XM("g","main",{},[]);this._paintList(e,i,s?s.children:o),s&&o.push(s);var l=Object(v["map"])(Object(v["keys"])(i.defs),(function(t){return i.defs[t]}));if(l.length&&o.push(XM("defs","defs",{},l)),t.animation){var u=JM(i.cssNodes,i.cssAnims,{newline:!0});if(u){var c=XM("style","stl",{},[],u);o.push(c)}}return tA(n,r,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},KM(this.renderToVNode({animation:Object(v["retrieve2"])(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Object(v["retrieve2"])(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var r,i,o=t.length,a=[],s=0,l=0,u=0;u=0;d--)if(h&&i&&h[d]===i[d])break;for(var g=p-1;g>d;g--)s--,r=a[s-1];for(var v=d+1;v-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Ud),iI=rI;function oI(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=wp(t,e,n[0]);return null!=i?i+"":null}if(r){for(var o=[],a=0;a=0&&r.push(e[o])}return r.join(" ")}var sI=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.updateData(e,n,r,i),o}return d(e,t),e.prototype._createSymbol=function(t,e,n,r,i){this.removeAll();var o=Im(t,-1,-1,2,2,null,i);o.attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=lI,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Tl(this.childAt(0))},e.prototype.downplay=function(){Cl(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,r,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=i&&i.disableAnimation;if(l){var c=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,c)}else{var h=this.childAt(0);h.silent=!1;var f={scaleX:s[0]/2,scaleY:s[1]/2};u?h.attr(f):lu(h,f,a,n),du(h)}if(this._updateCommon(t,n,s,r,i),l){h=this.childAt(0);if(!u){f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,uu(h,f,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,r,i){var o,a,s,l,u,c,h,f,p,d=this.childAt(0),g=t.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,s=r.selectItemStyle,l=r.focus,u=r.blurScope,h=r.labelStatesModels,f=r.hoverScale,p=r.cursorStyle,c=r.emphasisDisabled),!r||t.hasItemOption){var y=r&&r.itemModel?r.itemModel:t.getItemModel(e),m=y.getModel("emphasis");o=m.getModel("itemStyle").getItemStyle(),s=y.getModel(["select","itemStyle"]).getItemStyle(),a=y.getModel(["blur","itemStyle"]).getItemStyle(),l=m.get("focus"),u=m.get("blurScope"),c=m.get("disabled"),h=xu(y),f=m.getShallow("scale"),p=y.getShallow("cursor")}var b=t.getItemVisual(e,"symbolRotate");d.attr("rotation",(b||0)*Math.PI/180||0);var x=Cm(t.getItemVisual(e,"symbolOffset"),n);x&&(d.x=x[0],d.y=x[1]),p&&d.attr("cursor",p);var _=t.getItemVisual(e,"style"),w=_.fill;if(d instanceof gs){var S=d.style;d.useStyle(Object(v["extend"])({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},_))}else d.__isEmptyBrush?d.useStyle(Object(v["extend"])({},_)):d.useStyle(_),d.style.decal=null,d.setColor(w,i&&i.symbolInnerColor),d.style.strokeNoScale=!0;var O=t.getItemVisual(e,"liftZ"),M=this._z2;null!=O?null==M&&(this._z2=d.z2,d.z2+=O):null!=M&&(d.z2=M,this._z2=null);var A=i&&i.useNameLabel;function I(e){return A?t.getName(e):oI(t,e)}bu(d,h,{labelFetcher:g,labelDataIndex:e,defaultText:I,inheritColor:w,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var T=d.ensureState("emphasis");T.style=o,d.ensureState("select").style=s,d.ensureState("blur").style=a;var C=null==f||!0===f?Math.max(1.1,3/this._sizeY):isFinite(f)&&f>0?+f:1;T.scaleX=this._sizeX*C,T.scaleY=this._sizeY*C,this.setSymbolScale(1),$l(this,l,u,c)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var r=this.childAt(0),i=Hs(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&hu(a,{style:{opacity:0}},e,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();hu(r,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:i,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return Tm(t.getItemVisual(e,"symbolSize"))},e}(Nr);function lI(t,e){this.parent.drift(t,e)}var uI=sI;function cI(t,e,n,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function hI(t){return null==t||Object(v["isObject"])(t)||(t={isIgnore:t}),t||{}}function fI(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:xu(e),cursorStyle:e.get("cursor")}}var pI=function(){function t(t){this.group=new Nr,this._SymbolCtor=t||uI}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=hI(e);var n=this.group,r=t.hostModel,i=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=fI(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};i||n.removeAll(),t.diff(i).add((function(r){var i=u(r);if(cI(t,i,r,e)){var a=new o(t,r,s,l);a.setPosition(i),t.setItemGraphicEl(r,a),n.add(a)}})).update((function(c,h){var f=i.getItemGraphicEl(h),p=u(c);if(cI(t,p,c,e)){var d=t.getItemVisual(c,"symbol")||"circle",g=f&&f.getSymbolType&&f.getSymbolType();if(!f||g&&g!==d)n.remove(f),f=new o(t,c,s,l),f.setPosition(p);else{f.updateData(t,c,s,l);var v={x:p[0],y:p[1]};a?f.attr(v):lu(f,v,r)}n.add(f),t.setItemGraphicEl(c,f)}else n.remove(f)})).remove((function(t){var e=i.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),r)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var r=t._getSymbolPoint(n);e.setPosition(r),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=fI(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function r(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=hI(n);for(var i=t.start;i0?n=r[0]:r[1]<0&&(n=r[1]),n}function yI(t,e,n,r){var i=NaN;t.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,r),a[1-o]=i,e.dataToPoint(a)}function mI(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}function bI(t,e,n,r,i,o,a,s){for(var l=mI(t,e),u=[],c=[],h=[],f=[],p=[],d=[],g=[],v=gI(i,e,a),y=t.getLayout("points")||[],m=e.getLayout("points")||[],b=0;b=i||g<0)break;if(wI(y,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](y,m),h=y,f=m;else{var b=y-u,x=m-c;if(b*b+x*x<.5){g+=o;continue}if(a>0){var _=g+o,w=e[2*_],S=e[2*_+1];while(w===y&&S===m&&v=r||wI(w,S))p=y,d=m;else{A=w-u,I=S-c;var D=y-u,k=w-y,L=m-c,j=S-m,P=void 0,E=void 0;if("x"===s){P=Math.abs(D),E=Math.abs(k);var R=A>0?1:-1;p=y-R*P*a,d=m,T=y+R*E*a,C=m}else if("y"===s){P=Math.abs(L),E=Math.abs(j);var N=I>0?1:-1;p=y,d=m-N*P*a,T=y,C=m+N*E*a}else P=Math.sqrt(D*D+L*L),E=Math.sqrt(k*k+j*j),M=E/(E+P),p=y-A*a*(1-M),d=m-I*a*(1-M),T=y+A*a*M,C=m+I*a*M,T=xI(T,_I(w,y)),C=xI(C,_I(S,m)),T=_I(T,xI(w,y)),C=_I(C,xI(S,m)),A=T-y,I=C-m,p=y-A*P/E,d=m-I*P/E,p=xI(p,_I(u,y)),d=xI(d,_I(c,m)),p=_I(p,xI(u,y)),d=_I(d,xI(c,m)),A=y-p,I=m-d,T=y+A*E/P,C=m+I*E/P}t.bezierCurveTo(h,f,p,d,y,m),h=T,f=C}else t.lineTo(y,m)}u=y,c=m,g+=o}return v}var OI=function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t}(),MI=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return d(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new OI},e.prototype.buildPath=function(t,e){var n=e.points,r=0,i=n.length/2;if(e.connectNulls){for(;i>0;i--)if(!wI(n[2*i-2],n[2*i-1]))break;for(;r=0){var m=s?(f-r)*y+r:(h-n)*y+n;return s?[t,m]:[m,t]}n=h,r=f;break;case a.C:h=o[u++],f=o[u++],p=o[u++],d=o[u++],g=o[u++],v=o[u++];var b=s?Re(n,h,p,g,t,l):Re(r,f,d,v,t,l);if(b>0)for(var x=0;x=0){m=s?Pe(r,f,d,v,_):Pe(n,h,p,g,_);return s?[t,m]:[m,t]}}n=g,r=v;break}}},e}(ss),AI=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e}(OI),II=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return d(e,t),e.prototype.getDefaultShape=function(){return new AI},e.prototype.buildPath=function(t,e){var n=e.points,r=e.stackedOnPoints,i=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0;o--)if(!wI(n[2*o-2],n[2*o-1]))break;for(;ie){r?i.push(a(r,l,e)):n&&i.push(a(n,l,0),a(n,l,e));break}n&&(i.push(a(n,l,0)),n=null),i.push(l),r=l}}return i}function BI(t,e,n){var r=t.getVisual("visualMeta");if(r&&r.length&&t.count()&&"cartesian2d"===e.type){for(var i,o,a=r.length-1;a>=0;a--){var s=t.getDimensionInfo(r[a].dimension);if(i=s&&s.coordDim,"x"===i||"y"===i){o=r[a];break}}if(o){var l=e.getAxis(i),u=v["map"](o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),c=u.length,h=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=zI(u,"x"===i?n.getWidth():n.getHeight()),p=f.length;if(!p&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var d=10,g=f[0].coord-d,y=f[p-1].coord+d,m=y-g;if(m<.001)return"transparent";v["each"](f,(function(t){t.offset=(t.coord-g)/m})),f.push({offset:p?f[p-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:p?f[0].offset:.5,color:h[0]||"transparent"});var b=new vv(0,0,0,0,f,!0);return b[i]=g,b[i+"2"]=y,b}}}function VI(t,e,n){var r=t.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!FI(o,e))){var a=e.mapDimension(o.dim),s={};return v["each"](o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function FI(t,e){var n=t.getExtent(),r=Math.abs(n[1]-n[0])/t.scale.count();isNaN(r)&&(r=0);for(var i=e.count(),o=Math.max(1,Math.round(i/5)),a=0;ar)return!1;return!0}function GI(t,e){return isNaN(t)||isNaN(e)}function HI(t){for(var e=t.length/2;e>0;e--)if(!GI(t[2*e-2],t[2*e-1]))break;return e-1}function WI(t,e){return[t[2*e],t[2*e+1]]}function UI(t,e,n){for(var r,i,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||r>=e&&i<=e){l=u;break}s=u,r=i}else r=i;return{range:[s,l],t:(e-r)/(i-r)}}function YI(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"])){var E=p.getState("emphasis").style;E.lineWidth=+p.style.lineWidth+1}Hs(p).seriesIndex=t.seriesIndex,$l(p,L,j,P);var R=EI(t.get("smooth")),N=t.get("smoothMonotone");if(p.setShape({smooth:R,smoothMonotone:N,connectNulls:S}),d){var z=a.getCalculationInfo("stackedOnSeries"),B=0;d.useStyle(v["defaults"](l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),z&&(B=EI(z.get("smooth"))),d.setShape({smooth:R,stackedOnSmooth:B,smoothMonotone:N,connectNulls:S}),Kl(d,t,"areaStyle"),Hs(d).seriesIndex=t.seriesIndex,$l(d,L,j,P)}var V=function(t){r._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=V)})),this._polyline.onHoverStateChange=V,this._data=a,this._coordSys=i,this._stackedOnPoints=_,this._points=u,this._step=I,this._valueOrigin=b,t.get("triggerLineEvent")&&(this.packEventData(t,p),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,e){Hs(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,r){var i=t.getData(),o=$i(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=i.getLayout("points"),s=i.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel")||0,h=t.get("z")||0;s=new uI(i,o),s.x=l,s.y=u,s.setZ(c,h);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=c,f.z=h,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else dy.prototype.highlight.call(this,t,e,n,r)},e.prototype.downplay=function(t,e,n,r){var i=t.getData(),o=$i(i,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=i.getItemGraphicEl(o);a&&(a.__temp?(i.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else dy.prototype.downplay.call(this,t,e,n,r)},e.prototype._changePolyState=function(t){var e=this._polygon;bl(this._polyline,t),e&&bl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new MI({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new II({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var r,i,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(r=o.isHorizontal(),i=!1):"polar"===e.type&&(r="angle"===o.dim,i=!0);var s=t.hostModel,l=s.get("animationDuration");v["isFunction"](l)&&(l=l(null));var u=s.get("animationDelay")||0,c=v["isFunction"](u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var h=[t.x,t.y],f=void 0,p=void 0,d=void 0;if(n)if(i){var g=n,y=e.pointToCoord(h);r?(f=g.startAngle,p=g.endAngle,d=-y[1]/180*Math.PI):(f=g.r0,p=g.r,d=y[0])}else{var m=n;r?(f=m.x,p=m.x+m.width,d=t.x):(f=m.y+m.height,p=m.y,d=t.y)}var b=p===f?0:(d-f)/(p-f);a&&(b=1-b);var x=v["isFunction"](u)?u(o):l*b+c,_=s.getSymbolPath(),w=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),w&&w.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var r=t.getModel("endLabel");if(YI(t)){var i=t.getData(),o=this._polyline,a=i.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||(s=this._endLabel=new Gs({z2:200}),s.ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=HI(a);l>=0&&(bu(o,xu(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?aI(i,n):oI(i,t)},enableTextSetter:!0},XI(r,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,r,i,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==r.originalX&&(r.originalX=s.x,r.originalY=s.y);var u=n.getLayout("points"),c=n.hostModel,h=c.get("connectNulls"),f=o.get("precision"),p=o.get("distance")||0,d=a.getBaseAxis(),g=d.isHorizontal(),v=d.inverse,y=e.shape,m=v?g?y.x:y.y+y.height:g?y.x+y.width:y.y,b=(g?p:0)*(v?-1:1),x=(g?0:-p)*(v?-1:1),_=g?"x":"y",w=UI(u,m,_),S=w.range,O=S[1]-S[0],M=void 0;if(O>=1){if(O>1&&!h){var A=WI(u,S[0]);s.attr({x:A[0]+b,y:A[1]+x}),i&&(M=c.getRawValue(S[0]))}else{A=l.getPointOn(m,_);A&&s.attr({x:A[0]+b,y:A[1]+x});var I=c.getRawValue(S[0]),T=c.getRawValue(S[1]);i&&(M=oo(n,f,I,T,w.t))}r.lastFrameIndex=S[0]}else{var C=1===t||r.lastFrameIndex>0?S[0]:0;A=WI(u,C);i&&(M=c.getRawValue(C)),s.attr({x:A[0]+b,y:A[1]+x})}i&&Du(s).setLabelText(M)}},e.prototype._doUpdateAnimation=function(t,e,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,c=bI(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),h=c.current,f=c.stackedOnCurrent,p=c.next,d=c.stackedOnNext;if(i&&(h=NI(c.current,n,i,a),f=NI(c.stackedOnCurrent,n,i,a),p=NI(c.next,n,i,a),d=NI(c.stackedOnNext,n,i,a)),PI(h,p)>3e3||l&&PI(f,d)>3e3)return s.stopAnimation(),s.setShape({points:p}),void(l&&(l.stopAnimation(),l.setShape({points:p,stackedOnPoints:d})));s.shape.__points=c.current,s.shape.points=h;var g={shape:{points:p}};c.current!==h&&(g.shape.__points=c.next),s.stopAnimation(),lu(s,g,u),l&&(l.setShape({points:h,stackedOnPoints:f}),l.stopAnimation(),lu(l,{shape:{stackedOnPoints:d}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var v=[],y=c.status,m=0;me&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&i){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(u[1]-u[0])*(c||1),f=Math.round(a/h);if(isFinite(f)&&f>1){"lttb"===i&&t.setData(r.lttbDownSample(r.mapDimension(l.dim),1/f));var p=void 0;Object(v["isString"])(i)?p=JI[i]:Object(v["isFunction"])(i)&&(p=i),p&&t.setData(r.downSample(r.mapDimension(l.dim),1/f,p,QI))}}}}}function eT(t){t.registerChartView(ZI),t.registerSeriesModel(iI),t.registerLayout(KI("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,tT("line"))}var nT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return d(e,t),e.prototype.getInitialData=function(t,e){return pw(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(t),o=r.dataToPoint(i);if(n)Object(v["each"])(r.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var r=t.getTicksCoords(),a=i[n],s="x1"===e[n]||"y1"===e[n];if(s&&(a+=1),r.length<2)return;if(2===r.length)return void(o[n]=t.toGlobalCoord(t.getExtent()[s?1:0]));for(var l=void 0,u=void 0,c=1,h=0;ha){u=(f+l)/2;break}1===h&&(c=p-r[0].tickValue)}null==u&&(l?l&&(u=r[r.length-1].coord):u=r[0].coord),o[n]=t.toGlobalCoord(u)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=r.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Ud);Ud.registerClass(nT);var rT=nT,iT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return d(e,t),e.prototype.getInitialData=function(){return pw(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Zu(rT.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(rT),oT=iT,aT=function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0}return t}(),sT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return d(e,t),e.prototype.getDefaultShape=function(){return new aT},e.prototype.buildPath=function(t,e){var n=e.cx,r=e.cy,i=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-i),s=i+a,l=e.startAngle,u=e.endAngle,c=e.clockwise,h=2*Math.PI,f=c?u-lMath.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),t.setTextConfig({rotation:c})}}function hT(t,e,n){return e*Math.sin(t)*(n?-1:1)}function fT(t,e,n){return e*Math.cos(t)*(n?1:-1)}function pT(t,e,n){var r=t.get("borderRadius");if(null==r)return n?{cornerRadius:0}:null;Object(v["isArray"])(r)||(r=[r,r,r,r]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:Object(v["map"])(r,(function(t){return xr(t,i)}))}}var dT=Math.max,gT=Math.min;function vT(t,e){var n=t.getArea&&t.getArea();if(kI(t,"cartesian2d")){var r=t.getBaseAxis();if("category"!==r.type||!r.onBand){var i=e.getLayout("bandWidth");r.isHorizontal()?(n.x-=i,n.width+=2*i):(n.y-=i,n.height+=2*i)}}return n}var yT=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return d(e,t),e.prototype.render=function(t,e,n,r){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var i=t.get("coordinateSystem");("cartesian2d"===i||"polar"===i)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,r))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._progressiveEls=[],this._incrementalRenderLarge(t,e)},e.prototype.eachRendered=function(t){oy(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,r){var i,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?i=u.isHorizontal():"polar"===l.type&&(i="angle"===u.dim);var c=t.isAnimationEnabled()?t:null,h=xT(t,l);h&&this._enableRealtimeSort(h,a,n);var f=t.get("clip",!0)||h,p=vT(l,a);o.removeClipPath();var d=t.get("roundCap",!0),g=t.get("showBackground",!0),v=t.getModel("backgroundStyle"),y=v.get("borderRadius")||0,m=[],b=this._backgroundEls,x=r&&r.isInitSort,_=r&&"changeAxisOrder"===r.type;function w(t){var e=AT[l.type](a,t),n=NT(l,i,e);return n.useStyle(v.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",y):n.setShape("cornerRadius",y),m[t]=n,n}a.diff(s).add((function(e){var n=a.getItemModel(e),r=AT[l.type](a,e,n);if(g&&w(e),a.hasValue(e)&&MT[l.type](r)){var s=!1;f&&(s=mT[l.type](p,r));var v=bT[l.type](t,a,e,r,i,c,u.model,!1,d);h&&(v.forceLabelAnimation=!0),CT(v,a,e,n,r,t,i,"polar"===l.type),x?v.attr({shape:r}):h?_T(h,c,v,r,e,i,!1,!1):uu(v,{shape:r},t,e),a.setItemGraphicEl(e,v),o.add(v),v.ignore=s}})).update((function(e,n){var r=a.getItemModel(e),S=AT[l.type](a,e,r);if(g){var O=void 0;0===b.length?O=w(n):(O=b[n],O.useStyle(v.getItemStyle()),"cartesian2d"===l.type?O.setShape("r",y):O.setShape("cornerRadius",y),m[e]=O);var M=AT[l.type](a,e),A=RT(i,M,l);lu(O,{shape:A},c,e)}var I=s.getItemGraphicEl(n);if(a.hasValue(e)&&MT[l.type](S)){var T=!1;if(f&&(T=mT[l.type](p,S),T&&o.remove(I)),I?du(I):I=bT[l.type](t,a,e,S,i,c,u.model,!!I,d),h&&(I.forceLabelAnimation=!0),_){var C=I.getTextContent();if(C){var D=Du(C);null!=D.prevValue&&(D.prevValue=D.value)}}else CT(I,a,e,r,S,t,i,"polar"===l.type);x?I.attr({shape:S}):h?_T(h,c,I,S,e,i,!0,_):lu(I,{shape:S},t,e,null),a.setItemGraphicEl(e,I),I.ignore=T,o.add(I)}else o.remove(I)})).remove((function(e){var n=s.getItemGraphicEl(e);n&&pu(n,t,e)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new Nr);S.removeAll();for(var O=0;Oo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,r=n.getExtent(),i=Math.max(0,r[0]),o=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(t.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,r){if(this._isOrderChangedWithinSameData(t,e,n)){var i=this._dataSort(t,n,e);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:i}))}},e.prototype._dispatchInitSort=function(t,e,n){var r=e.baseAxis,i=this._dataSort(t,r,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){pu(e,t,Hs(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(dy),mT={cartesian2d:function(t,e){var n=e.width<0?-1:1,r=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var i=t.x+t.width,o=t.y+t.height,a=dT(e.x,t.x),s=gT(e.x+e.width,i),l=dT(e.y,t.y),u=gT(e.y+e.height,o),c=si?s:a,e.y=h&&l>o?u:l,e.width=c?0:s-a,e.height=h?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),c||h},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var r=e.r;e.r=e.r0,e.r0=r}var i=gT(e.r,t.r),o=dT(e.r0,t.r0);e.r=i,e.r0=o;var a=i-o<0;if(n<0){r=e.r;e.r=e.r0,e.r0=r}return a}},bT={cartesian2d:function(t,e,n,r,i,o,a,s,l){var u=new Os({shape:Object(v["extend"])({},r),z2:1});if(u.__dataIndex=n,u.name="item",o){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(t,e,n,r,i,o,a,s,l){var u=!i&&l?lT:Fg,c=new u({shape:r,z2:1});c.name="item";var h=TT(i);if(c.calculateTextPosition=uT(h,{isRoundCap:u===lT}),o){var f=c.shape,p=i?"r":"endAngle",d={};f[p]=i?r.r0:r.startAngle,d[p]=r[p],(s?lu:uu)(c,{shape:d},o)}return c}};function xT(t,e){var n=t.get("realtimeSort",!0),r=e.getBaseAxis();if(n&&"category"===r.type&&"cartesian2d"===e.type)return{baseAxis:r,otherAxis:e.getOtherAxis(r)}}function _T(t,e,n,r,i,o,a,s){var l,u;o?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(a?lu:uu)(n,{shape:l},e,i,null);var c=e?t.baseAxis.model:null;(a?lu:uu)(n,{shape:u},c,i)}function wT(t,e){for(var n=0;n0?1:-1,a=r.height>0?1:-1;return{x:r.x+o*i/2,y:r.y+a*i/2,width:r.width-o*i,height:r.height-a*i}},polar:function(t,e,n){var r=t.getItemLayout(e);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function IT(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function TT(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function CT(t,e,n,r,i,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape,c=pT(r.getModel("itemStyle"),u,!0);Object(v["extend"])(u,c),t.setShape(u)}}else{var h=r.get(["itemStyle","borderRadius"])||0;t.setShape("r",h)}t.useStyle(l);var f=r.getShallow("cursor");f&&t.attr("cursor",f);var p=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=xu(r);bu(t,d,{labelFetcher:o,labelDataIndex:n,defaultText:oI(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var g=t.getTextContent();if(s&&g){var y=r.get(["label","position"]);t.textConfig.inside="middle"===y||null,cT(t,"outside"===y?p:y,TT(a),r.get(["label","rotate"]))}ku(g,d,o.getRawValue(n),(function(t){return aI(e,t)}));var m=r.getModel(["emphasis"]);$l(t,m.get("focus"),m.get("blurScope"),m.get("disabled")),Kl(t,r),IT(i)&&(t.style.fill="none",t.style.stroke="none",Object(v["each"])(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}function DT(t,e){var n=t.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;var r=t.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),o=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(r,i,o)}var kT=function(){function t(){}return t}(),LT=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return d(e,t),e.prototype.getDefaultShape=function(){return new kT},e.prototype.buildPath=function(t,e){for(var n=e.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=0?n:null}),30,!1);function ET(t,e,n){for(var r=t.baseDimIdx,i=1-r,o=t.shape.points,a=t.largeDataIndices,s=[],l=[],u=t.barWidth,c=0,h=o.length/3;c=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}function RT(t,e,n){if(kI(n,"cartesian2d")){var r=e,i=n.getArea();return{x:t?r.x:i.x,y:t?i.y:r.y,width:t?r.width:i.width,height:t?i.height:r.height}}i=n.getArea();var o=e;return{cx:i.cx,cy:i.cy,r0:t?i.r0:o.r0,r:t?i.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}function NT(t,e,n){var r="polar"===t.type?Fg:Os;return new r({shape:RT(e,n,t),silent:!0,z2:0})}var zT=yT;function BT(t){t.registerChartView(zT),t.registerSeriesModel(oT),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,v["curry"](Yw,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,$w("bar")),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,tT("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},(function(e){t.sortInfo&&e.axis.setCategorySortInfo(t.sortInfo)}))}))}var VT=2*Math.PI,FT=Math.PI/180;function GT(t,e){return sh(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function HT(t,e){var n=GT(t,e),r=t.get("center"),i=t.get("radius");v["isArray"](i)||(i=[0,i]);var o,a,s=Qr(n.width,e.getWidth()),l=Qr(n.height,e.getHeight()),u=Math.min(s,l),c=Qr(i[0],u/2),h=Qr(i[1],u/2),f=t.coordinateSystem;if(f){var p=f.dataToPoint(r);o=p[0]||0,a=p[1]||0}else v["isArray"](r)||(r=[r,r]),o=Qr(r[0],s)+n.x,a=Qr(r[1],l)+n.y;return{cx:o,cy:a,r0:c,r:h}}function WT(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),r=e.mapDimension("value"),i=GT(t,n),o=HT(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,c=-t.get("startAngle")*FT,h=t.get("minAngle")*FT,f=0;e.each(r,(function(t){!isNaN(t)&&f++}));var p=e.getSum(r),d=Math.PI/(p||f)*2,g=t.get("clockwise"),v=t.get("roseType"),y=t.get("stillShowZeroSum"),m=e.getDataExtent(r);m[0]=0;var b=VT,x=0,_=c,w=g?1:-1;if(e.setLayout({viewRect:i,r:l}),e.each(r,(function(t,n){var r;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:a,cy:s,r0:u,r:v?NaN:l});else{r="area"!==v?0===p&&y?d:t*d:VT/f,rn?a:o,c=Math.abs(l.label.y-n);if(c>=u.maxY){var h=l.label.x-e-l.len2*i,f=r+l.len,d=Math.abs(h)