/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,i=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(e.firefox=!0,e.version=n[1]);i&&(e.ie=!0,e.version=i[1]);r&&(e.edge=!0,e.version=r[1]);o&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},u=Object.prototype.toString,n=Array.prototype,a=n.forEach,h=n.filter,r=n.slice,c=n.map,d=n.reduce,o={};function f(t,e){"createCanvas"===t&&(y=null),o[t]=e}function b(t){if(null==t||"object"!=typeof t)return t;var e=t,n=u.call(t);if("[object Array]"===n){if(!$(t)){e=[];for(var i=0,r=t.length;i>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),o,r);if(a)return a(t,n,i),!0}return!1}function Ot(t){return"CANVAS"===t.nodeName.toUpperCase()}var Et="undefined"!=typeof window&&!!window.addEventListener,zt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Nt=[];function Bt(t,e,n,i){return n=n||{},i||!v.canvasSupported?Rt(t,e,n):v.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Rt(t,e,n),n}function Rt(t,e,n){if(v.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Ot(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(Lt(Nt,t,i,r))return n.zrX=Nt[0],void(n.zrY=Nt[1])}n.zrX=n.zrY=0}function Vt(t){return t||window.event}function Ft(t,e,n){if(null!=(e=Vt(e)).zrX)return e;var i=e.type;if(i&&0<=i.indexOf("touch")){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&Bt(t,r,e,n)}else Bt(t,e,e,n),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&zt.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function Ht(t,e,n,i){Et?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var Wt=Et?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Gt(t){return 2===t.which||3===t.which}function Zt(){this._track=[]}function Ut(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}Zt.prototype={constructor:Zt,recognize:function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;oi.getWidth()||n<0||n>i.getHeight()}$t.prototype={constructor:$t,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(D(Kt,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,n=t.zrY,i=Jt(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?{x:e,y:n}:this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(n||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var n=this[t];n&&n.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:jt}}(e,t,n);i&&(i[r]&&(o.cancelBubble=i[r].call(i,o)),i.trigger(e,o),i=i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,n){for(var i=this.storage.getDisplayList(),r={x:t,y:e},o=i.length-1;0<=o;o--){var a;if(i[o]!==n&&!i[o].ignore&&(a=Qt(i[o],t,e))&&(r.topTarget||(r.topTarget=i[o]),a!==Yt)){r.target=i[o];break}}return r},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new Zt);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},D(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){$t.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=Jt(this,i,r);if("mouseup"===a&&o||(n=(e=this.findHover(i,r)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4=this._maxSize&&0>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),ze(t,e),e):void Pe(e,0,0,0,1):7===r.length?0<=(i=parseInt(r.substr(1),16))&&i<=16777215?(Pe(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),ze(t,e),e):void Pe(e,0,0,0,1):void 0;var o=r.indexOf("("),a=r.indexOf(")");if(-1!==o&&a+1===r.length){var s=r.substr(0,o),l=r.substr(o+1,a-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Pe(e,0,0,0,1);u=Ae(l.pop());case"rgb":return 3!==l.length?void Pe(e,0,0,0,1):(Pe(e,Te(l[0]),Te(l[1]),Te(l[2]),u),ze(t,e),e);case"hsla":return 4!==l.length?void Pe(e,0,0,0,1):(l[3]=Ae(l[3]),Be(l,e),ze(t,e),e);case"hsl":return 3!==l.length?void Pe(e,0,0,0,1):(Be(l,e),ze(t,e),e);default:return}}Pe(e,0,0,0,1)}}function Be(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Ae(t[1]),r=Ae(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Pe(e=e||[],Ie(255*De(a,o,n+1/3)),Ie(255*De(a,o,n)),Ie(255*De(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Re(t,e){var n=Ne(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255e);n++);n=Math.min(n-1,u-2)}D=e;var i=g[(A=n)+1]-g[n];if(0!=i)if(S=(e-g[n])/i,l)if(I=m[n],M=m[0===n?n:n-1],C=m[u-2=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new Sn(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Sn.create=function(t){return new Sn(t.x,t.y,t.width,t.height)};var Mn=function(t){for(var e in t=t||{},gn.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Mn.prototype={constructor:Mn,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n>>1])<0?l=o:s=1+o;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function Pn(p,g){var a,s,m=Cn,l=0,v=[];function e(t){var e=a[t],n=s[t],i=a[t+1],r=s[t+1];s[t]=n+r,t===l-3&&(a[t+1]=a[t+2],s[t+1]=s[t+2]),l--;var o=kn(p[i],p,e,n,0,g);e+=o,0!==(n-=o)&&0!==(r=Dn(p[e+n-1],p,i,r,r-1,g))&&(n<=r?function(t,e,n,i){var r=0;for(r=0;rs[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(r);do{if((o=Tn(t,n,i,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===a?mi(t,r,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};D.textWidth=li(D.text,w);var S=_.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,u.push(D),S=0;else{if(M){S=D.textWidth;var I=_.textBackgroundColor,C=I&&I.image;C&&ei(C=Qn(C))&&(S=Math.max(S,C.width*b/C.height))}var T=x?x[1]+x[3]:0;S+=T;var A=null!=d?d-v:null;null!=A&&Ai[0]){for(a=0;at);a++);o=n[i[a]]}if(i.splice(a+1,0,t),!(n[t]=e).virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else dn("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var n,i,r=this._zlevelList;for(i=0;i=o.length&&o.push({option:t})}}),o}function Br(t){var a=Q();Ar(t,function(t,e){var n=t.exist;n&&a.set(n.id,t)}),Ar(t,function(t,e){var n=t.option;X(!n||null==n.id||!a.get(n.id)||a.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&a.set(n.id,t),t.keyInfo||(t.keyInfo={})}),Ar(t,function(t,e){var n=t.exist,i=t.option,r=t.keyInfo;if(Dr(i)){if(r.name=null!=i.name?i.name+"":n?n.name:Pr+e,n)r.id=n.id;else if(null!=i.id)r.id=i.id+"";else for(var o=0;r.id="\0"+r.name+"\0"+o++,a.get(r.id););a.set(r.id,t)}})}function Rr(t){var e=t.name;return!(!e||!e.indexOf(Pr))}function Vr(t){return Dr(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Fr(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?O(t.dataIndex)?P(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?O(t.name)?P(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Hr(){var e="__\0ec_inner_"+Wr+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var Wr=0;function Gr(s,l,u){if(z(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||Zr(l,e+"Index")||Zr(l,e+"Id")||Zr(l,e+"Name")||(l[e+"Index"]=0);var h={};return Ar(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var n=e.match(/^(\w+)(Index|Id|Name)$/)||[],i=n[1],r=(n[2]||"").toLowerCase();if(!(!i||!r||null==t||"index"===r&&"none"===t||u&&u.includeMainTypes&&x(u.includeMainTypes,i)<0)){var o={mainType:i};"index"===r&&"all"===t||(o[r]=t);var a=s.queryComponents(o);h[i+"Models"]=a,h[i+"Model"]=a[0]}}else h[e]=t}),h}function Zr(t,e){return t&&t.hasOwnProperty(e)}function Ur(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Xr(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}var Yr=".",jr="___EC__COMPONENT__CONTAINER___";function qr(t){var e={main:"",sub:""};return t&&(t=t.split(Yr),e.main=t[0]||"",e.sub=t[1]||""),e}function $r(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):n.apply(this,arguments)}var n=this;return k(e.prototype,t),e.extend=this.extend,e.superCall=Jr,e.superApply=to,w(e,this),e.superClass=n,e}}var Kr=0;function Qr(t){var e=["__\0is_clz",Kr++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Jr(t,e){var n=Z(arguments,2);return this.superClass.prototype[e].apply(t,n)}function to(t,e,n){return this.superClass.prototype[e].apply(t,n)}function eo(n,t){t=t||{};var r={};if(n.registerClass=function(t,e){if(e)if(function(t){X(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=qr(e)).sub){if(e.sub!==jr){(function(t){var e=r[t.main];e&&e[jr]||((e=r[t.main]={})[jr]=!0);return e})(e)[e.sub]=t}}else r[e.main]=t;return t},n.getClass=function(t,e,n){var i=r[t];if(i&&i[jr]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=qr(t);var n=[],e=r[t.main];return e&&e[jr]?D(e,function(t,e){e!==jr&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=qr(t),!!r[t.main]},n.getAllClassMainTypes=function(){var n=[];return D(r,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=qr(t);var e=r[t.main];return e&&e[jr]},n.parseClassType=qr,t.registerWhenExtend){var i=n.extend;i&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)})}return n}function no(s){for(var t=0;tthis._ux||Ko(e-this._yi)>this._uy||this._len<5;return this.addData(Ho.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,r,o){return this.addData(Ho.C,t,e,n,i,r,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},quadraticCurveTo:function(t,e,n,i){return this.addData(Ho.Q,t,e,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},arc:function(t,e,n,i,r,o){return this.addData(Ho.A,t,e,n,n,i,r-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=jo(r)*n+t,this._yi=qo(r)*n+e,this},arcTo:function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ho.R,t,e,n,i),this},closePath:function(){this.addData(Ho.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;nl||Ko(a-r)>u||c===h-1)&&(t.lineTo(o,a),i=o,r=a);break;case Ho.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case Ho.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],r=s[c-1];break;case Ho.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],_=s[c++],x=s[c++],w=m=ca[i=0]+t&&a<=ca[1]+t?h:0}if(o){l=i;i=ra(r),r=ra(l)}else i=ra(i),r=ra(r);rMath.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function ma(t,e,n,i,r){for(var o=0,a=0,s=0,l=0,u=0,h=0;hMath.abs(o[1])?0=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function Cl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Tl(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Al(t){return t.sort(function(t,e){return t-e}),t}function Dl(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function kl(t){var e=t.toString(),n=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/r}function Ol(t){var e=2*Math.PI;return(t%e+e)%e}function El(t){return-Ml"'])/g,Ul={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xl(t){return null==t?"":(t+"").replace(Zl,function(t,e){return Ul[e]})}function Yl(t,e){return"{"+t+(null==e?"":e)+"}"}var jl=["a","b","c","d","e","f","g"];function ql(t,e,n){O(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:r,content:"{marker"+o+"|} ",style:{color:n}}:""}function Kl(t,e){return"0000".substr(0,e-(t+="").length)+t}function Ql(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Nl(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",Kl(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100).replace("dd",Kl(s,2)).replace("d",s).replace("hh",Kl(l,2)).replace("h",l).replace("mm",Kl(u,2)).replace("m",u).replace("ss",Kl(h,2)).replace("s",h).replace("SSS",Kl(c,3))}function Jl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var tu=fi;var eu=(Object.freeze||Object)({addCommas:Hl,toCamelCase:Wl,normalizeCssArray:Gl,encodeHTML:Xl,formatTpl:ql,formatTplSimple:function(n,t,i){return D(t,function(t,e){n=n.replace("{"+e+"}",i?Xl(t):t)}),n},getTooltipMarker:$l,formatTime:Ql,capitalFirst:Jl,truncateText:tu,getTextBoundingRect:function(t){return ui(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,n,i,r,o,a,s){return ui(t,e,n,i,r,s,o,a)}}),nu=D,iu=["left","right","top","bottom","width","height"],ru=[["width","left","right"],["height","top","bottom"]];function ou(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var n,i,r=t.position,o=t.getBoundingRect(),a=c.childAt(e+1),s=a&&a.getBoundingRect();if("horizontal"===h){var l=o.width+(s?-s.x+o.x:0);v=f<(n=g+l)||t.newline?(g=0,n=l,m+=v+d,o.height):Math.max(v,o.height)}else{var u=o.height+(s?-s.y+o.y:0);v=p<(i=m+u)||t.newline?(g+=v+d,m=0,i=u,o.width):Math.max(v,o.width)}t.newline||(r[0]=g,r[1]=m,"horizontal"===h?g=n+d:m=i+d)})}var au=ou;T(ou,"vertical"),T(ou,"horizontal");function su(t,e,n){n=Gl(n||0);var i=e.width,r=e.height,o=Cl(t.left,i),a=Cl(t.top,r),s=Cl(t.right,i),l=Cl(t.bottom,r),u=Cl(t.width,i),h=Cl(t.height,r),c=n[2]+n[0],d=n[1]+n[3],f=t.aspect;switch(isNaN(u)&&(u=i-s-d-o),isNaN(h)&&(h=r-l-c-a),null!=f&&(isNaN(u)&&isNaN(h)&&(i/re)return t[i];return t[n-1]}(s,n):a;if((l=l||a)&&l.length){var u=l[r];return t&&(o[t]=u),i.colorIdx=(r+1)%l.length,u}}},bu="original",Su="arrayRows",Mu="objectRows",Iu="keyedColumns",Cu="unknown",Tu="typedArray",Au="column",Du="row";function ku(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Iu?{}:[]),this.sourceFormat=t.sourceFormat||Cu,this.seriesLayoutBy=t.seriesLayoutBy||Au,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}ku.seriesDataToSource=function(t){return new ku({data:t,sourceFormat:R(t)?Tu:bu,fromDataset:!1})},Qr(ku);var Pu={Must:1,Might:2,Not:3},Lu=Hr();function Ou(t){var e=t.option,n=e.data,i=R(n)?Tu:bu,r=!1,o=e.seriesLayoutBy,a=e.sourceHeader,s=e.dimensions,l=Ru(t);if(l){var u=l.option;n=u.source,i=Lu(l).sourceFormat,r=!0,o=o||u.seriesLayoutBy,null==a&&(a=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,n,i,r){if(!t)return{dimensionsDefine:Eu(r)};var o,a;if(e===Su)"auto"===i||null==i?zu(function(t){null!=t&&"-"!==t&&(z(t)?null==a&&(a=1):a=0)},n,t,10):a=i?1:0,r||1!==a||(r=[],zu(function(t,e){r[e]=null!=t?t:""},n,t)),o=r?r.length:n===Du?t.length:t[0]?t[0].length:null;else if(e===Mu)r=r||function(t){var e,n=0;for(;n":"\n",f="richText"===c,p={},g=0;function n(t){return{renderMode:c,content:Xl(Hl(t)),style:p}}var m=this.getData(),o=m.mapDimension("defaultedTooltip",!0),i=o.length,a=this.getRawValue(r),s=O(a),v=m.getItemVisual(r,"color");N(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1":"",i=n+u.join(n||", ");return{renderMode:c,content:i,style:p}}(a):n(i?Ah(m,r,o[0]):s?a[0]:a)).content,u=d.seriesIndex+"at"+g,y=$l({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var _=m.getName(r),x=this.name;Rr(this)||(x=""),x=x?Xl(x)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+x+l:x+w+(_?Xl(_)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel,r=wu.getColorFromPalette.call(this,t,e,n);return r=r||i.getColorFromPalette(t,e,n)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function Yh(t){var e=t.name;Rr(t)||(t.name=function(t){var n=t.getRawData(),e=n.mapDimension("seriesName",!0),i=[];return D(e,function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")}(t)||e)}function jh(t){return t.model.getRawData().count()}function qh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),$h}function $h(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Kh(e,n){D(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,T(Qh,n))})}function Qh(t){var e=Jh(t);e&&e.setOutputEnd(this.count())}function Jh(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}S(Xh,Ph),S(Xh,wu);var tc=function(){this.group=new Mn,this.uid=Sl("viewComponent")};tc.prototype={constructor:tc,init:function(t,e){},render:function(t,e,n,i){},dispose:function(){},filterForExposedEvent:null};var ec=tc.prototype;ec.updateView=ec.updateLayout=ec.updateVisual=function(t,e,n,i){},$r(tc),eo(tc,{registerWhenExtend:!0});function nc(){var s=Hr();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,r=e.progressiveRender,o=e.large=n&&n.large,a=e.progressiveRender=n&&n.progressiveRender;return!!(i^o||r^a)&&"reset"}}var ic=Hr(),rc=nc();function oc(){this.group=new Mn,this.uid=Sl("viewChart"),this.renderTask=Lh({plan:uc,reset:hc}),this.renderTask.context={view:this}}var ac=oc.prototype={type:"chart",init:function(t,e){},render:function(t,e,n,i){},highlight:function(t,e,n,i){lc(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){lc(t.getData(),i,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function sc(t,e,n){if(t&&(t.trigger(e,n),t.isGroup&&!Us(t)))for(var i=0,r=t.childCount();ic?n+=p(g("data.partialData"),{displayCnt:c}):n+=g("data.allData");for(var a=[],s=0;sn.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},Sc.getPipeline=function(t){return this._pipelineMap.get(t)},Sc.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},Sc.restorePipelines=function(t){var i=this,r=i._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),zc(i,t,t.dataTask)})},Sc.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),r=this.api;D(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&function(i,r,t,o,a){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=r.seriesType,n=r.getTargetSeries;r.createOnAllSeries?o.eachRawSeries(l):e?o.eachRawSeriesByType(e,l):n&&n(o,a).each(l);function l(t){var e=t.uid,n=s.get(e)||s.set(e,Lh({plan:kc,reset:Pc,count:Ec}));n.context={model:t,ecModel:o,api:a,useClearVisual:r.isVisual&&!r.isLayout,plan:r.plan,reset:r.reset,scheduler:i},zc(i,t,n)}var u=i._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,i,r),t.overallReset&&function(i,t,e,n,r){var o=e.overallTask=e.overallTask||Lh({reset:Cc});o.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var a=o.agentStubMap=o.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,r).each(c):(u=!1,D(n.getSeries(),c));function c(t){var e=t.uid,n=a.get(e);n||(n=a.set(e,Lh({reset:Tc,onDirty:Dc})),o.dirty()),n.context={model:t,overallProgress:u,modifyOutputEnd:h},n.agent=o,n.__block=u,zc(i,t,n)}var d=i._pipelineMap;a.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),a.removeKey(e))})}(this,t,e,i,r)},this)},Sc.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,zc(this,e,r)},Sc.performDataProcessorTasks=function(t,e){Mc(this,this._dataProcessorHandlers,t,e,{block:!0})},Sc.performVisualTasks=function(t,e,n){Mc(this,this._visualHandlers,t,e,n)},Sc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Sc.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)})};var Ic=Sc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Cc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Tc(t,e){return t.overallProgress&&Ac}function Ac(){this.agent.dirty(),this.getDownstream().dirty()}function Dc(){this.agent&&this.agent.dirty()}function kc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Pc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Lr(t.reset(t.model,t.ecModel,t.api,t.payload));return 1t.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=n._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(i,t),xc(i._zr.dom,t)}function Ed(e,n){hd(Wd,function(t){t(e,n)})}wd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[gd]=!0,n&&Md(this),Sd.update.call(this),this[gd]=!1,Ad.call(this,i),Dd.call(this,i)}}},wd.showLoading=function(t,e){if(!this._disposed&&(dd(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Ud[t])){var n=Ud[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},wd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},wd.makeActionFromEvent=function(t){var e=k({},t);return e.type=Vd[t.type],e},wd.dispatchAction=function(t,e){this._disposed||(dd(e)||(e={silent:!!e}),Rd[t.type]&&this._model&&(this[gd]?this._pendingActions.push(t):(Td.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Ad.call(this,e.silent),Dd.call(this,e.silent))))},wd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},wd.on=yd("on",!1),wd.off=yd("off",!1),wd.one=yd("one",!1);var zd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Nd(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Bd(){this.eventInfo}wd._initEvents=function(){hd(zd,function(u){function t(t){var e,n=this.getModel(),i=t.target;if("globalout"===u)e={};else if(i&&null!=i.dataIndex){var r=i.dataModel||n.getSeriesByIndex(i.seriesIndex);e=r&&r.getDataParams(i.dataIndex,i.dataType,i)||{}}else i&&i.eventData&&(e=k({},i.eventData));if(e){var o=e.componentType,a=e.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",a=e.seriesIndex);var s=o&&null!=a&&n.getComponent(o,a),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:i,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),hd(Vd,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},wd.isDisposed=function(){return this._disposed},wd.clear=function(){this._disposed||this.setOption({series:[]},!0)},wd.dispose=function(){if(!this._disposed){this._disposed=!0,Ur(this.getDom(),$d,"");var e=this._api,n=this._model;hd(this._componentsViews,function(t){t.dispose(n,e)}),hd(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete Xd[this.id]}},S(xd,It),Bd.prototype={constructor:Bd,normalizeQuery:function(t){var s={},l={},u={};if(z(t)){var e=fd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};D(t,function(t,e){for(var n=!1,i=0;i_[1]&&(_[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Lf(this)},kf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var n,i=this._chunkSize,r=this._rawData,o=this._storage,a=this.dimensions,s=a.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!r.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=n){var C=a[n],T=o[C][y];if(T){I=T[_];var A=l[C].ordinalMeta;A&&A.categories.length&&(I=A.categories[I])}}var D=null==m?null:m.id;null==D&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},kf.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var r=1/0,o=-1,a=0,s=0,l=this.count();st[I][1])&&(M=!1)}M&&(o[a++]=this.getRawIndex(m))}return aw[1]&&(w[1]=x)}}}return r},kf.downSample=function(t,e,n,i){for(var r=Rf(this,[t]),o=r._storage,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=r._rawExtent[t],d=new(If(this))(u),f=0,p=0;pc[1]&&(c[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=zf,r},kf.getItemModel=function(t){var e=this.hostModel;return new _l(this.getRawDataItem(t),e,e&&e.ecModel)},kf.diff=function(e){var n=this;return new pf(e?e.getIndices():[],this.getIndices(),function(t){return Nf(e,t)},function(t){return Nf(n,t)})},kf.getVisual=function(t){var e=this._visual;return e&&e[t]},kf.setVisual=function(t,e){if(_f(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},kf.setLayout=function(t,e){if(_f(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},kf.getLayout=function(t){return this._layout[t]},kf.getItemLayout=function(t){return this._itemLayouts[t]},kf.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?k(this._itemLayouts[t]||{},e):e},kf.clearItemLayouts=function(){this._itemLayouts.length=0},kf.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],r=i&&i[e];return null!=r||n?r:this.getVisual(e)},kf.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},r=this.hasItemVisual;if(this._itemVisuals[t]=i,_f(e))for(var o in e)e.hasOwnProperty(o)&&(i[o]=e[o],r[o]=!0);else i[e]=n,r[e]=!0},kf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Hf(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Wf(t,e,n){ku.isInstance(e)||(e=ku.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=Q(),o=Q(),l=[],a=function(t,e,n,i){var r=Math.max(t.dimensionsDetectCount||1,e.length,n.length,i||0);return D(e,function(t){var e=t.dimsDef;e&&(r=Math.max(r,e.length))}),r}(e,t,i,n.dimCount),s=0;s=e[0]&&t<=e[1]},Qf.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Qf.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Qf.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Qf.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Qf.prototype.getExtent=function(){return this._extent.slice()},Qf.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Qf.prototype.isBlank=function(){return this._isBlank},Qf.prototype.setBlank=function(t){this._isBlank=t},Qf.prototype.getLabel=null,$r(Qf),eo(Qf,{registerWhenExtend:!0}),Jf.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&P(n,np);return new Jf({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var tp=Jf.prototype;function ep(t){return t._map||(t._map=Q(t.categories))}function np(t){return N(t)&&null!=t.value?t.value:t+""}tp.getOrdinal=function(t){return ep(this).get(t)},tp.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=ep(this);return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e};var ip=Qf.prototype,rp=Qf.extend({type:"ordinal",init:function(t,e){t&&!O(t)||(t=new Jf({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),ip.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return ip.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(ip.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:J,niceExtent:J});rp.create=function(){return new rp};var op=Tl;function ap(t){return kl(t)+2}function sp(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function lp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),sp(t,0,e),sp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var up=Tl,hp=Qf.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),hp.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=ap(t)},getTicks:function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]s&&(t?o.push(up(s+e,r)):o.push(n[1])),o},getMinorTicks:function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h>>1;t[r][1]>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}sg.prototype={constructor:sg,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],r=[],o=[],a=this.geometries,s=0;ss[1];d(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&d(o.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=Tl(t),e=Tl(e),c?ei[0]&&(i[0]=o[0]),o[1]>i[1]&&(i[1]=o[1])}return{min:e?n:i,max:e?i:n}}var Jg=xa.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Va(xa.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,r=n.length,o=Qg(n,e.smoothConstraint);if(e.connectNulls){for(;0i)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return D(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function sm(t,e,n){if("cartesian2d"!==t.type)return nm(t,e,n);var i=t.getBaseAxis().isHorizontal(),r=em(t,e,n);if(!n.get("clip",!0)){var o=r.shape,a=Math.max(o.width,o.height);i?(o.y-=a,o.height+=2*a):(o.x-=a,o.width+=2*a)}return r}oc.extend({type:"line",init:function(){var t=new Mn,e=new Ng;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,r=this.group,o=t.getData(),a=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=o.mapArray(o.getItemLayout),u="polar"===i.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,n){if(!n.valueDim)return[];for(var i=[],r=0,o=e.count();rh[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";D(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new ls(0,0,0,0,h,!0);return m[i]=f,m[i+"2"]=p,m}}}(o,i)||o.getVisual("color");d.useStyle(A(a.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=rm(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var C=o.getCalculationInfo("stackedOnSeries"),T=0;f.useStyle(A(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),C&&(T=rm(C.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:T,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,n,i){var r=t.getData(),o=Fr(r,i);if(!(o instanceof Array)&&null!=o&&0<=o){var a=r.getItemGraphicEl(o);if(!a){var s=r.getItemLayout(o);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(a=new Cg(r,o)).position=s,a.setZ(t.get("zlevel"),t.get("z")),a.ignore=isNaN(s[0])||isNaN(s[1]),a.__temp=!0,r.setItemGraphicEl(o,a),a.stopSymbolAnimation(!0),this.group.add(a)}a.highlight()}else oc.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var r=t.getData(),o=Fr(r,i);if(null!=o&&0<=o){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else oc.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Jg({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new tm({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,o,a,s){for(var l=function(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}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=Hg(r,e,a),v=Hg(o,t,s),y=0;ye&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(gm,_g);var mm={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},vm={};vm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},mm),vm.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},mm),vm.timeAxis=A({scale:!0,min:"dataMin",max:"dataMax"},vm.valueAxis),vm.logAxis=A({scale:!0,logBase:10},vm.valueAxis);function ym(o,t,a,e){D(_m,function(r){t.extend({type:o+"Axis."+r,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?hu(t):{};m(t,e.getTheme().get(r+"Axis")),m(t,this.getDefaultOption()),t.type=a(o,t),n&&uu(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Jf.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:p([{},vm[r+"Axis"],e],!0)})}),mu.registerSubTypeDefaulter(o+"Axis",T(a,o))}var _m=["value","category","time","log"],xm=mu.extend({type:"cartesian2dAxis",axis:null,init:function(){xm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){xm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){xm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function wm(t,e){return e.type||(e.data?"category":"value")}m(xm.prototype,Xp);var bm={offset:0};function Sm(t,e){return t.getCoordSysModel()===e}function Mm(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}ym("x",xm,wm,bm),ym("y",xm,wm,bm),mu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Im=Mm.prototype;function Cm(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],a=n.model,s=a.get("axisLine.onZero"),l=a.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Tm(o[l])&&(r=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&Tm(o[u])&&!i[h(o[u])]){r=o[u];break}r&&(i[h(r)]=!0)}function h(t){return t.dim+"_"+t.index}}function Tm(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(0u[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,Vm(o)?t.labelOffset+a*l:0],d=e.get("nameRotate");null!=d&&(d=d*Lm/180),Vm(o)?i=zm(t.rotation,null!=d?d:t.rotation,a):(i=function(t,e,n,i){var r,o,a=Ol(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;r=El(a-Lm/2)?(o=l?"bottom":"top","center"):El(a-1.5*Lm)?(o=l?"top":"bottom","center"):(o="middle",a<1.5*Lm&&Lm/2l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a=n.r0}}});var Av=Math.PI/180;function Dv(r,t,e,n,i,o,a,s,l,u){function h(t,e,n){for(var i=t;il+a);i++)if(r[i].y+=n,tr[i].y+r[i].height)return void c(i,n/2);c(e-1,n/2)}function c(t,e){for(var n=t;0<=n&&!(r[n].y-er[n-1].y+r[n-1].height));n--);}function d(t,e,n,i,r,o){for(var a=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?v.push(r[y]):m.push(r[y]);d(m,!1,t,e,n,i),d(v,!0,t,e,n,i)}function kv(t){return"center"===t.position}function Pv(k,P,L,t,O,e){var E,z,N=k.getData(),B=[],R=!1,V=(k.get("minShowLabelAngle")||0)*Av;N.each(function(t){var e=N.getItemLayout(t),n=N.getItemModel(t),i=n.getModel("label"),r=i.get("position")||n.get("emphasis.label.position"),o=i.get("distanceToLabelLine"),a=i.get("alignTo"),s=Cl(i.get("margin"),L),l=i.get("bleedMargin"),u=i.getFont(),h=n.getModel("labelLine"),c=h.get("length");c=Cl(c,L);var d=h.get("length2");if(d=Cl(d,L),!(e.anglea)return!0;if(o){var s=Um(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1},makeElOption:function(t,e,n,i,r){},createPointerEl:function(t,e,n,i){var r=e.pointer;if(r){var o=ay(t).pointerEl=new dl[r.type](sy(e.pointer));t.add(o)}},createLabelEl:function(t,e,n,i){if(e.label){var r=ay(t).labelEl=new Ja(sy(e.label));t.add(r),cy(r,i)}},updatePointerEl:function(t,e,n){var i=ay(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var r=ay(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{shape:e.label.shape,position:e.label.position}),cy(r,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=ul(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Wt(t.event)},onmousedown:ly(this._onHandleDragMove,this,0,0),drift:ly(this._onHandleDragMove,this),ondragend:ly(this._onHandleDragEnd,this)}),i.add(r)),fy(r,n,!1);r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");O(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),mc(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){hy(this._axisPointerModel,!e&&this._moveAnimation,this._handle,dy(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(dy(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(dy(i)),ay(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=uy);var vy=uy.extend({makeElOption:function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=yy(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=function(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}(i),c=_y[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}!function(t,e,n,i,r,o){var a=Pm.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),py(e,i,r,o,{position:my(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(e,t,Qm(a.model,n),n,i,r)},getHandleTransform:function(t,e,n){var i=Qm(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:my(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=yy(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function yy(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var _y={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:function(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}([e,n[0]],[e,n[1]],xy(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}([e-i/2,n[0]],[i,r],xy(t))}}};function xy(t){return"x"===t.dim?0:1}jm.registerAxisPointerClass("CartesianAxisPointer",vy),ef(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),nf(pd.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=Gm(t,e)}),rf({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i=t.currTrigger,a=[t.x,t.y],r=t,o=t.dispatchAction||C(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Qv(a)&&(a=Zv({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=Qv(a),u=r.axesInfo,h=s.axesInfo,c="leave"===i||Qv(a),d={},f={},p={list:[],map:{}},g={showPointer:Xv(qv,f),showTooltip:Xv($v,p)};Uv(s.coordSysMap,function(t,e){var o=l||t.containPoint(a);Uv(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&o&&(!u||i)){var r=i&&i.value;null!=r||l||(r=n.pointToData(a)),null!=r&&jv(t,r,g,!1,d)}})});var m={};return Uv(h,function(r,t){var o=r.linkGroup;o&&!f[t]&&Uv(o.axesInfo,function(t,e){var n=f[e];if(t!==r&&n){var i=n.value;o.mapper&&(i=r.axis.scale.parse(o.mapper(i,Kv(t),Kv(r)))),m[r.key]=i}})}),Uv(m,function(t,e){jv(h[e],t,g,!0,d)}),function(r,t,e){var o=e.axesInfo=[];Uv(t,function(t,e){var n=t.axisPointerModel.option,i=r[e];i?(t.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&o.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})})}(f,h,d),function(t,e,n,i){if(Qv(e)||!t.list.length)return i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(p,a,t,o),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=Yv(i)[r]||{},a=Yv(i)[r]={};Uv(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&Uv(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var s=[],l=[];D(o,function(t,e){a[e]||l.push(t)}),D(a,function(t,e){o[e]||s.push(t)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,n),d}}),uf({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var wy=D,by=Wl,Sy=["","-webkit-","-moz-","-o-"];function My(r){var o=[],t=r.get("transitionDuration"),e=r.get("backgroundColor"),n=r.getModel("textStyle"),i=r.get("padding");return t&&o.push(function(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+t+"s "+e+",top "+t+"s "+e;return P(Sy,function(t){return t+"transition:"+n}).join(";")}(t)),e&&(v.canvasSupported?o.push("background-Color:"+e):(o.push("background-Color:#"+Ve(e)),o.push("filter:alpha(opacity=70)"))),wy(["width","color","radius"],function(t){var e="border-"+t,n=by(e),i=r.get(n);null!=i&&o.push(e+":"+i+("color"===t?"":"px"))}),o.push(function(n){var i=[],t=n.get("fontSize"),e=n.getTextColor();return e&&i.push("color:"+e),i.push("font:"+n.getFont()),t&&i.push("line-height:"+Math.round(3*t/2)+"px"),wy(["decoration","align"],function(t){var e=n.get(t);e&&i.push("text-"+t+":"+e)}),i.join(";")}(n)),null!=i&&o.push("padding:"+Gl(i).join("px ")+"px"),o.join(";")+";"}function Iy(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&function(t,e,n,i,r){Lt(Pt,e,i,r,!0)&&Lt(t,n,Pt[0],Pt[1])}(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function Cy(t,e,n){if(v.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],Iy(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!a._enterable){var e=r.handler;Ft(r.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}function Ty(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}Cy.prototype={constructor:Cy,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),n=t.style;"absolute"!==n.position&&"absolute"!==e.position&&(n.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,n=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+My(t)+";left:"+n[0]+"px;top:"+n[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var n=this._styleCoord;Iy(n,this._zr,this._appendToBody,t,e);var i=this.el.style;i.left=n[0]+"px",i.top=n[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(C(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(t+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),e+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:t,height:e}}},Ty.prototype={constructor:Ty,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,n){this.el&&this._zr.remove(this.el);for(var i={},r=t,o="{marker",a=r.indexOf(o);0<=a;){var s=r.indexOf("|}"),l=r.substr(a+o.length,s-a-o.length);-1n[r],f=[-h.x,-h.y];e||(f[i]=s.position[i]);var p=[0,0],g=[-c.x,-c.y],m=W(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[i]+=n[r]-c[r]:p[i]+=c[r]+m);g[1-i]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[r]=d?n[r]:h[r],v[o]=Math.max(h[o],c[o]),v[a]=Math.min(0,c[a]+g[1-i]),l.__rectSize=n[r],d){var y={x:0,y:0};y[r]=Math.max(n[r]-c[r]-m,0),y[o]=v[o],l.setClipPath(new Ja({shape:y})),l.__rectSize=y[r]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&nl(s,{position:_.contentPosition},d&&t),this._updatePageInfoView(t,_),v},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(i,r){var o=this._controllerGroup;D(["pagePrev","pageNext"],function(t){var e=null!=r[t+"DataIndex"],n=o.childOfName(t);n&&(n.setStyle("fill",e?i.get("pageIconColor",!0):i.get("pageIconInactiveColor",!0)),n.cursor=e?"pointer":"default")});var t=o.childOfName("pageText"),e=i.get("pageFormatter"),n=r.pageIndex,a=null!=n?n+1:0,s=r.pageCount;t&&e&&t.setStyle("text",z(e)?e.replace("{current}",a).replace("{total}",s):e({current:a,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=Ky[r],a=Qy[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:n.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[r]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&_(m,v.s)||!(g.i=e&&t.s<=e+i}},_findTargetItemIndex:function(i){return this._showController?(this.getContentGroup().eachChild(function(t,e){var n=t.__legendDataIndex;null==o&&null!=n&&(o=e),n===i&&(r=e)}),null!=r?r:o):0;var r,o}});rf("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})}),uf({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),hf({type:"title",render:function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=W(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Ra({style:js({},r,{text:t.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Ra({style:js({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=su(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]);var y={textAlign:a,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=i.getBoundingRect();var _=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new Ja({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(w)}}});var t_=Hl,e_=Xl;function n_(t){Or(t,"label",["show"])}var i_=uf({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n){this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},isAnimationEnabled:function(){if(v.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,i,e,r){var o=this.constructor,a=this.mainType+"Model";e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=t[a];e&&e.data?(n?n._mergeOption(e,i,!0):(r&&n_(e),D(e.data,function(t){t instanceof Array?(n_(t[0]),n_(t[1])):n_(t)}),k(n=new o(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),t[a]=n):t[a]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=O(n)?P(n,t_).join(", "):t_(n),r=e.getName(t),o=e_(this.name);return null==n&&!r||(o+="
"),r&&(o+=e_(r),null!=n&&(o+=" : ")),null!=n&&(o+=e_(i)),o},getData:function(){return this._data},setData:function(t){this._data=t}});S(i_,Ph),i_.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var r_=x;function o_(t,e,n,i,r,o){var a=[],s=qf(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=d_(e,s,t),u=e.indicesOfNearest(s,l)[0];a[r]=e.get(n,u),a[o]=e.get(s,u);var h=e.get(i,u),c=Dl(e.get(i,u));return 0<=(c=Math.min(c,20))&&(a[o]=+a[o].toFixed(c)),[a,h]}var a_=T,s_={min:a_(o_,"min"),max:a_(o_,"max"),average:a_(o_,"average")};function l_(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!O(e.coord)&&i){var r=i.dimensions,o=u_(e,n,i,t);if((e=b(e)).type&&s_[e.type]&&o.baseAxis&&o.valueAxis){var a=r_(r,o.baseAxis.dim),s=r_(r,o.valueAxis.dim),l=s_[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)s_[u[h]]&&(u[h]=d_(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function u_(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;ro&&(e[1-i]=e[i]+c.sign*o),e}function q_(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:0i[1]&&(i[1]=e[1])})}),i[1]c[1];if(a&&!s&&!l)return!0;a&&(i=!0),s&&(e=!0),l&&(n=!0)}return i&&e&&n}):Q_(h,function(t){if("empty"===r)n.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),Q_(h,function(t){u.setApproximateExtent(c,t)}))})}}};var ex=D,nx=X_,ix=uf({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=rx(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=rx(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var n=this.option;v.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),ox(this,t);var i=this.settledOption;ex([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=i[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var a=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var r=this.dependentModels[t.axis][e],o=r.__dzAxisProxy||(r.__dzAxisProxy=new K_(t.name,e,this,i));a[t.name+"_"+e]=o},this)},_resetTarget:function(){var n=this.option,t=this._judgeAutoMode();nx(function(t){var e=t.axisIndex;n[e]=Lr(n[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1;nx(function(t){null!=e[t.axisIndex]&&(n=!0)},this);var t=e.orient;return null==t&&n?"orient":n?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var o=!0,e=this.get("orient",!0),a=this.option,t=this.dependentModels;if(o){var n="vertical"===e?"y":"x";t[n+"Axis"].length?(a[n+"AxisIndex"]=[0],o=!1):ex(t.singleAxis,function(t){o&&t.get("orient",!0)===e&&(a.singleAxisIndex=[t.componentIndex],o=!1)})}o&&nx(function(t){if(o){var e=[],n=this.dependentModels[t.axis];if(n.length&&!e.length)for(var i=0,r=n.length;ie[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var n;if(cx(this.getTargetCoordInfo(),function(t){if(!n&&t.length){var e=t[0].model.coordinateSystem;n=e.getRect&&e.getRect()}}),!n){var t=this.api.getWidth(),e=this.api.getHeight();n={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return n}});function mx(t){return"vertical"===t?"ns-resize":"ew-resize"}nf({getTargetSeries:function(t){var i=Q();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){D(n.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){i.set(t.uid,t)})})}),i},modifyOutputEnd:!0,overallReset:function(t,i){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).reset(n,i)}),t.eachTargetAxis(function(t,e,n){n.getAxisProxy(t.name,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})})}}),rf("dataZoom",function(n,t){var i=Y_(C(t.eachComponent,t,"dataZoom"),X_,function(t,e){return t.get(e.axisIndex)}),r=[];t.eachComponent({mainType:"dataZoom",query:n},function(t,e){r.push.apply(r,i(t).nodes)}),D(r,function(t,e){t.setRawRange({start:n.start,end:n.end,startValue:n.startValue,endValue:n.endValue})})}),ix.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var vx="\0_ec_interaction_mutex";function yx(t,e){return!!_x(t)[e]}function _x(t){return t[vx]||(t[vx]={})}function xx(n){this.pointerChecker,this._zr=n,this._opt={};var t=C,i=t(bx,this),r=t(Sx,this),o=t(Mx,this),a=t(Ix,this),s=t(Cx,this);It.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=A(b(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",r),n.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",a),n.on("pinch",s))},this.disable=function(){n.off("mousedown",i),n.off("mousemove",r),n.off("mouseup",o),n.off("mousewheel",a),n.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function bx(t){if(!(Gt(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}}function Sx(t){if(this._dragging&&Dx("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!yx(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Wt(t.event),Ax(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n})}}function Mx(t){Gt(t)||(this._dragging=!1)}function Ix(t){var e=Dx("zoomOnMouseWheel",t,this._opt),n=Dx("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=3d.getHeight()&&(n.textPosition="top",o=!0);var a=o?-5-i.height:p+8;r+i.width/2>d.getWidth()?(n.textPosition=["100%",a],n.textAlign="right"):r-i.width/2<0&&(n.textPosition=[0,a],n.textAlign="left")}})}function t(t,e){var n,i=m[t],r=m[e],o=u[i],a=new _l(o,h,h.ecModel);if(l&&null!=l.newTitle&&(o.title=l.newTitle),i&&!r){if(function(t){return 0===t.indexOf("my")}(i))n={model:a,onclick:a.option.onclick,featureName:i};else{var s=Gx(i);if(!s)return;n=new s(a,c,d)}g[i]=n}else{if(!(n=g[r]))return;n.model=a,n.ecModel=c,n.api=d}i||!r?a.get("show")&&!n.unusable?(function(r,o,t){var a=r.getModel("iconStyle"),s=r.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():r.get("icon"),l=r.get("title")||{};if("string"==typeof e){var n=e,i=l;l={},(e={})[t]=n,l[t]=i}var u=r.iconPaths={};D(e,function(t,e){var n=ul(t,{},{x:-p/2,y:-p/2,width:p,height:p});n.setStyle(a.getItemStyle()),n.hoverStyle=s.getItemStyle(),n.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var i=h.getModel("tooltip");i&&i.get("show")&&n.attr("tooltip",k({content:l[e],formatter:i.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:i.get("position",!0)||"bottom"},i.option)),Gs(n),h.get("showTitle")&&(n.__title=l[e],n.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";n.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){n.setStyle({textFill:null,textBackgroundColor:null})})),n.trigger(r.get("iconStatus."+e)||"normal"),f.add(n),n.on("click",C(o.onclick,o,c,d,e)),u[e]=n})}(a,n,i),a.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&i[t].trigger(e)},n.render&&n.render(a,c,d,l)):n.remove&&n.remove(c,d):n.dispose&&n.dispose(c,d)}},updateView:function(t,e,n,i){D(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){D(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){D(this._features,function(t){t.dispose&&t.dispose(e,n)})}});var Ux=_c.toolbox.saveAsImage;function Xx(t){this.model=t}Xx.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:Ux.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:Ux.lang.slice()},Xx.prototype.unusable=!v.canvasSupported,Xx.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r=n.get("type",!0)||"png",o=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var a=atob(o.split(",")[1]),s=a.length,l=new Uint8Array(s);s--;)l[s]=a.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+r)}else{var h=n.get("lang"),c='';window.open().document.write(c)}else{var d=document.createElement("a");d.download=i+"."+r,d.target="_blank",d.href=o;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},Wx("saveAsImage",Xx);var Yx=_c.toolbox.magicType,jx="__ec_magicType_stack__";function qx(t){this.model=t}qx.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:b(Yx.title),option:{},seriesIndex:{}};var $x=qx.prototype;$x.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return D(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var Kx={line:function(t,e,n,i){if("bar"===t)return m({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0)},bar:function(t,e,n,i){if("line"===t)return m({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===jx;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),m({id:e,stack:r?"":jx},i.get("option.stack")||{},!0)}},Qx=[["line","bar"],["stack"]];$x.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(Kx[h]){var n,d={series:[]};if(D(Qx,function(t){0<=x(t,h)&&D(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,n=t.id,i=Kx[h](e,n,t,c);i&&(A(i,t.option),d.series.push(i));var r=t.coordinateSystem;if(r&&"cartesian2d"===r.type&&("line"===h||"bar"===h)){var o=r.getAxesByScale("ordinal")[0];if(o){var a=o.dim+"Axis",s=u.queryComponents({mainType:a,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[a]=d[a]||[];for(var l=0;l<=s;l++)d[a][s]=d[a][s]||{};d[a][s].boundaryGap="bar"===h}}}),"stack"===h)n=d.series&&d.series[0]&&d.series[0].stack===jx?m({stack:Yx.title.tiled},Yx.title):b(Yx.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:n})}},rf({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Wx("magicType",qx);var Jx=_c.toolbox.dataView,tw=new Array(60).join("-"),ew="\t";function nw(t){var e=function(t){var r={},o=[],a=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)o.push(t);else{var n=e.getBaseAxis();if("category"===n.type){var i=n.dim+"_"+n.index;r[i]||(r[i]={categoryAxis:n,valueAxis:e.getOtherAxis(n),series:[]},a.push({axisDim:n.dim,axisIndex:n.index})),r[i].series.push(t)}else o.push(t)}}),{seriesGroupByCategoryAxis:r,other:o,meta:a}}(t);return{value:I([function(t){var h=[];return D(t,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,r=[" "].concat(P(t.series,function(t){return t.name})),o=[n.model.getCategories()];D(t.series,function(t){o.push(t.getRawData().mapArray(i,function(t){return t}))});for(var a=[r.join(ew)],s=0;si.getWidth()||n<0||n>i.getHeight()}(t,e)){var i=t._zr,r=t._covers,o=Aw(t,e,n);if(!t._dragging)for(var a=0;at[1]&&t.reverse(),t}function lb(t,e){return Gr(t,e,{includeMainTypes:rb})}ab.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=db[t.brushType](0,n,e);t.__rangeOffset={offset:pb[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})},ab.matchOutputRanges=function(t,i,r){tb(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&D(t.coordSyses,function(t){var e=db[n.brushType](1,t,n.range);r(n,e.values,t,i)})},this)},ab.setInputRanges=function(t,r){tb(t,function(t){var e=this.findTargetInfo(t,r);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var n=db[t.brushType](0,e.coordSys,t.coordRange),i=t.__rangeOffset;t.range=i?pb[t.brushType](n.values,i.offset,function(t,e){var n=mb(t),i=mb(e),r=[n[0]/i[0],n[1]/i[1]];return isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r}(n.xyMinMax,i.xyMinMax)):n.values}},this)},ab.makePanelOpts=function(n,i){return P(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:function(n){return n=Jw(n),function(t,e){return ll(t,n)}}(e),isTargetByCursor:Qw(e,n,t.coordSysModel),getLinearBrushOtherExtent:function(r,o){return r=Jw(r),function(t){var e=null!=o?o:t,n=e?r.width:r.height,i=e?r.x:r.y;return[i,i+(n||0)]}}(e)}})},ab.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&0<=eb(i.coordSyses,e.coordinateSystem)},ab.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=lb(e,t),r=0;r')}}catch(t){Ab=function(t){return Lb.createElement("<"+t+' xmlns="'+Db+'" class="zrvml">')}}var Eb,zb=Jo.CMD,Nb=Math.round,Bb=Math.sqrt,Rb=Math.abs,Vb=Math.cos,Fb=Math.sin,Hb=Math.max;if(!v.canvasSupported){var Wb=",",Gb="progid:DXImageTransform.Microsoft",Zb=21600,Ub=Zb/2,Xb=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Zb+","+Zb,t.coordorigin="0,0"},Yb=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},jb=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},qb=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},$b=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},Kb=Hi,Qb=function(t,e,n){var i=Ne(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=Yb(i[0],i[1],i[2]),t.opacity=n*i[3])},Jb=function(t,e,n,i){var r="fill"===e,o=t.getElementsByTagName(e)[0];null!=n[e]&&"none"!==n[e]&&(r||!r&&n.lineWidth)?(t[r?"filled":"stroked"]="true",n[e]instanceof rs&&qb(t,o),o=o||Ob(e),r?function(t,e,n){var i,r,o=e.fill;if(null!=o)if(o instanceof rs){var a,s=0,l=[0,0],u=0,h=1,c=n.getBoundingRect(),d=c.width,f=c.height;if("linear"===o.type){a="gradient";var p=n.transform,g=[o.x*d,o.y*f],m=[o.x2*d,o.y2*f];p&&(yt(g,g,p),yt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{a="gradientradial";g=[o.x*d,o.y*f],p=n.transform;var _=n.scale,x=d,w=f;l=[(g[0]-c.x)/x,(g[1]-c.y)/w],p&&yt(g,g,p),x/=_[0]*Zb,w/=_[1]*Zb;var b=Hb(x,w);u=0/b,h=2*o.r/b-u}var S=o.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],C=[],T=0;T=c&&d<=n+1){for(var i=[],r=0;r=c&&d<=r+1)return WS(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var a=o();if(a)return a}},pushComponent:function(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n}:t.push({count:1,added:e,removed:n})},extractCommon:function(t,e,n,i){for(var r=e.length,o=n.length,a=t.newPos,s=a-i,l=0;a+1