/* * 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="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},e(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},i=new function(){this.browser=new r,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(i.wxa=!0,i.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?i.worker=!0:!i.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(i.node=!0,i.svgSupported=!0):function(t,e){var n=e.browser,r=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);r&&(n.firefox=!0,n.version=r[1]);i&&(n.ie=!0,n.version=i[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11);var s=e.domSupported="undefined"!=typeof document;if(s){var l=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in l||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}}(navigator.userAgent,i);var o="12px sans-serif";var a,s,l=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)c=i*t.length;else for(var h=0;h=S&&(w=0),w++}function T(){for(var t=[],e=0;e>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[l]+":0",r[1-s]+":auto",i[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return e.clearMarkers=function(){E(n,function(t){t.parentNode&&t.parentNode.removeChild(t)})},n}(e,a),l=function(t,e,n){for(var r=n?"invTrans":"trans",i=e[r],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),h=2*u,f=c.left,p=c.top;a.push(f,p),l=l&&o&&f===o[h]&&p===o[h+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&i?i:(e.srcCoords=a,e[r]=n?Kt(s,a):Kt(a,s))}(s,a,o);if(l)return l(t,n,r),!0}return!1}function Jt(t){return"CANVAS"===t.nodeName.toUpperCase()}var te=/([&<>"'])/g,ee={"&":"&","<":"<",">":">",'"':""","'":"'"};function ne(t){return null==t?"":(t+"").replace(te,function(t,e){return ee[e]})}var re=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ie=[],oe=i.browser.firefox&&+i.browser.version.split(".")[0]<39;function ae(t,e,n,r){return n=n||{},r?se(t,e,n):oe&&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):se(t,e,n),n}function se(t,e,n){if(i.domSupported&&t.getBoundingClientRect){var r=e.clientX,o=e.clientY;if(Jt(t)){var a=t.getBoundingClientRect();return n.zrX=r-a.left,void(n.zrY=o-a.top)}if(Qt(ie,t,r,o))return n.zrX=ie[0],void(n.zrY=ie[1])}n.zrX=n.zrY=0}function le(t){return t||window.event}function ue(t,e,n){if(null!=(e=le(e)).zrX)return e;var r=e.type;if(r&&r.indexOf("touch")>=0){var i="touchend"!==r?e.targetTouches[0]:e.changedTouches[0];i&&ae(t,i,e,n)}else{ae(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,r=t.deltaY;if(null==n||null==r)return e;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&re.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ce(t,e,n,r){t.removeEventListener(e,n,r)}var he=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var r=t.touches;if(r){for(var i={points:[],touches:[],target:e,event:t},o=0,a=r.length;o1&&i&&i.length>1){var a=fe(i)/fe(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((r=i)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function de(){return[1,0,0,1,0,0]}function ge(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ve(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ye(t,e,n){var r=e[0]*n[0]+e[2]*n[1],i=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function me(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function _e(t,e,n,r){void 0===r&&(r=[0,0]);var i=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(n),h=Math.cos(n);return t[0]=i*h+s*c,t[1]=-i*c+s*h,t[2]=o*h+l*c,t[3]=-o*c+h*l,t[4]=h*(a-r[0])+c*(u-r[1])+r[0],t[5]=h*(u-r[1])-c*(a-r[0])+r[1],t}function xe(t,e,n){var r=n[0],i=n[1];return t[0]=e[0]*r,t[1]=e[1]*i,t[2]=e[2]*r,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*i,t}function be(t,e){var n=e[0],r=e[2],i=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*r;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-r*l,t[3]=n*l,t[4]=(r*s-a*i)*l,t[5]=(o*i-n*s)*l,t):null}var we=Object.freeze({__proto__:null,create:de,identity:ge,copy:ve,mul:ye,translate:me,rotate:_e,scale:xe,invert:be,clone:function(t){var e=[1,0,0,1,0,0];return ve(e,t),e}}),Se=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,r){t.x=e.x+n.x*r,t.y=e.y+n.y*r},t.lerp=function(t,e,n,r){var i=1-r;t.x=i*e.x+r*n.x,t.y=i*e.y+r*n.y},t}(),Me=Math.min,Te=Math.max,ke=Math.abs,Ce=["x","y"],Ie=["width","height"],De=new Se,Ae=new Se,Le=new Se,Pe=new Se,Oe=Xe(),Re=Oe.minTv,Ne=Oe.maxTv,Ee=[0,0],Be=function(){function t(t,e,n,r){ze(this,t,e,n,r)}return t.set=function(t,e,n,r,i){return r<0&&(e+=r,r=-r),i<0&&(n+=i,i=-i),t.x=e,t.y=n,t.width=r,t.height=i,t},t.prototype.union=function(t){var e=Me(t.x,this.x),n=Me(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Te(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Te(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){return Ve([1,0,0,1,0,0],this,t)},t.prototype.intersect=function(e,n,r){return t.intersect(this,e,n,r)},t.intersect=function(e,n,r,i){r&&Se.set(r,0,0);var o=i&&i.outIntersectRect||null,a=i&&i.clamp;if(o&&(o.x=o.y=o.width=o.height=NaN),!e||!n)return!1;e instanceof t||(e=ze(He,e.x,e.y,e.width,e.height)),n instanceof t||(n=ze(We,n.x,n.y,n.width,n.height));var s=!!r;Oe.reset(i,s);var l=Oe.touchThreshold,u=e.x+l,c=e.x+e.width-l,h=e.y+l,f=e.y+e.height-l,p=n.x+l,d=n.x+n.width-l,g=n.y+l,v=n.y+n.height-l;if(u>c||h>f||p>d||g>v)return!1;var y=!(c=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},t.prototype.contain=function(e,n){return t.contain(this,e,n)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){Fe(this,t)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e?e.x:0,e?e.y:0,e?e.width:0,e?e.height:0)},t.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},t.applyTransform=function(t,e,n){if(n){if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],o=n[4],a=n[5];return t.x=e.x*r+o,t.y=e.y*i+a,t.width=e.width*r,t.height=e.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}De.x=Le.x=e.x,De.y=Pe.y=e.y,Ae.x=Pe.x=e.x+e.width,Ae.y=Le.y=e.y+e.height,De.transform(n),Pe.transform(n),Ae.transform(n),Le.transform(n),t.x=Me(De.x,Ae.x,Le.x,Pe.x),t.y=Me(De.y,Ae.y,Le.y,Pe.y);var s=Te(De.x,Ae.x,Le.x,Pe.x),l=Te(De.y,Ae.y,Le.y,Pe.y);t.width=s-t.x,t.height=l-t.y}else t!==e&&Fe(t,e)},t.calculateTransform=function(t,e,n){var r=n.width/e.width,i=n.height/e.height;return me(t=ge(t||[]),t,Ct(Ge,-e.x,-e.y)),xe(t,t,Ct(Ge,r,i)),me(t,t,Ct(Ge,n.x,n.y)),t},t}(),ze=Be.set,Fe=Be.copy,Ve=Be.calculateTransform,He=new Be(0,0,0,0),We=new Be(0,0,0,0),Ge=[];function Ue(t,e,n,r,i,o,a,s){var l=ke(e-n),u=ke(r-t),c=Me(l,u),h=Ce[i],f=Ce[1-i],p=Ie[i];e=u||!Oe.bidirectional)&&(Re[h]=-u,Re[f]=0,Oe.useDir&&Oe.calcDirMTV())))}function Xe(){var t=0,e=new Se,n=new Se,r={minTv:new Se,maxTv:new Se,useDir:!1,dirMinTv:new Se,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){r.touchThreshold=0,i&&null!=i.touchThreshold&&(r.touchThreshold=Te(0,i.touchThreshold)),r.negativeSize=!1,o&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&null!=i.direction&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),t=i.direction,r.bidirectional=null==i.bidirectional||!!i.bidirectional,r.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var o=r.minTv,a=r.dirMinTv,s=o.y*o.y+o.x*o.x,l=Math.sin(t),u=Math.cos(t),c=l*o.y+u*o.x;i(c)?i(o.x)&&i(o.y)&&a.set(0,0):(n.x=s*u/c,n.y=s*l/c,i(n.x)&&i(n.y)?a.set(0,0):(r.bidirectional||e.dot(n)>0)&&n.len()=0;u--){var c=r[u];c===n||c.ignore||c.ignoreCoarsePointer||c.parent&&c.parent.ignoreCoarsePointer||($e.copy(c.getBoundingRect()),c.transform&&$e.applyTransform(c.transform),$e.intersect(l)&&o.push(c))}if(o.length)for(var h=Math.PI/12,f=2*Math.PI,p=0;p=0;o--){var a=t[o],s=void 0;if(a!==i&&!a.ignore&&(s=Je(a,n,r))&&(!e.topTarget&&(e.topTarget=a),s!==Ye)){e.target=a;break}}}function en(t,e,n){var r=t.painter;return e<0||e>r.getWidth()||n<0||n>r.getHeight()}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){Qe.prototype[t]=function(e){var n,r,i=e.zrX,o=e.zrY,a=en(this,i,o);if("mouseup"===t&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Bt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}});function nn(t,e,n,r){var i=e+1;if(i===n)return 1;if(r(t[i++],t[e])<0){for(;i=0;)i++;return i-e}function rn(t,e,n,r,i){for(r===e&&r++;r>>1])<0?l=o:s=o+1;var u=r-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(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function on(t,e,n,r,i,o){var a=0,s=0,l=1;if(o(t,e[n+i])>0){for(s=r-i;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=a;a=i-l,l=i-u}for(a++;a>>1);o(t,e[n+c])>0?a=c+1:l=c}return l}function an(t,e,n,r,i,o){var a=0,s=0,l=1;if(o(t,e[n+i])<0){for(s=i+1;ls&&(l=s);var u=a;a=i-l,l=i-u}else{for(s=r-i;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=i,l+=i}for(a++;a>>1);o(t,e[n+c])<0?l=c:a=c+1}return l}function sn(t,e){var n,r,i=7,o=0,a=[];function s(s){var l=n[s],u=r[s],c=n[s+1],h=r[s+1];r[s]=u+h,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--;var f=an(t[c],t,l,u,0,e);l+=f,0!==(u-=f)&&0!==(h=on(t[l+u-1],t,c,h,h-1,e))&&(u<=h?function(n,r,o,s){var l=0;for(l=0;l=7||p>=7);if(d)break;g<0&&(g=0),g+=2}if((i=g)<1&&(i=1),1===r){for(l=0;l=0;l--)t[p+l]=t[f+l];return void(t[h]=a[c])}var d=i;for(;;){var g=0,v=0,y=!1;do{if(e(a[c],t[u])<0){if(t[h--]=t[u--],g++,v=0,0===--r){y=!0;break}}else if(t[h--]=a[c--],v++,g=0,1===--s){y=!0;break}}while((g|v)=0;l--)t[p+l]=t[f+l];if(0===r){y=!0;break}}if(t[h--]=a[c--],1===--s){y=!0;break}if(0!==(v=s-on(t[u],a,0,s,s-1,e))){for(s-=v,p=(h-=v)+1,f=(c-=v)+1,l=0;l=7||v>=7);if(y)break;d<0&&(d=0),d+=2}(i=d)<1&&(i=1);if(1===s){for(p=(h-=r)+1,f=(u-=r)+1,l=r-1;l>=0;l--)t[p+l]=t[f+l];t[h]=a[c]}else{if(0===s)throw new Error;for(f=h-(s-1),l=0;l1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]=32;)e|=1&t,t>>=1;return t+e}(i);do{if((o=nn(t,n,r,e))s&&(l=s),rn(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),i-=o,n+=o}while(0!==i);a.forceMergeRuns()}}}var un=!1;function cn(){un||(un=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function hn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var fn=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=hn}return t.prototype.traverse=function(t,e){for(var n=0;n=0&&this._roots.splice(r,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),pn=i.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},dn={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=r*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-dn.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*dn.bounceIn(2*t):.5*dn.bounceOut(2*t-1)+.5}},gn=Math.pow,vn=Math.sqrt,yn=1e-8,mn=1e-4,_n=vn(3),xn=1/3,bn=Tt(),wn=Tt(),Sn=Tt();function Mn(t){return t>-1e-8&&tyn||t<-1e-8}function kn(t,e,n,r,i){var o=1-i;return o*o*(o*t+3*i*e)+i*i*(i*r+3*o*n)}function Cn(t,e,n,r,i){var o=1-i;return 3*(((e-t)*o+2*(n-e)*i)*o+(r-n)*i*i)}function In(t,e,n,r,i,o){var a=r+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-i,c=s*s-3*a*l,h=s*l-9*a*u,f=l*l-3*s*u,p=0;if(Mn(c)&&Mn(h)){if(Mn(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[p++]=M)}else{var d=h*h-4*c*f;if(Mn(d)){var g=h/c,v=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[p++]=M),v>=0&&v<=1&&(o[p++]=v)}else if(d>0){var y=vn(d),m=c*s+1.5*a*(-h+y),_=c*s+1.5*a*(-h-y);(M=(-s-((m=m<0?-gn(-m,xn):gn(m,xn))+(_=_<0?-gn(-_,xn):gn(_,xn))))/(3*a))>=0&&M<=1&&(o[p++]=M)}else{var x=(2*c*s-3*a*h)/(2*vn(c*c*c)),b=Math.acos(x)/3,w=vn(c),S=Math.cos(b),M=(-s-2*w*S)/(3*a),T=(v=(-s+w*(S+_n*Math.sin(b)))/(3*a),(-s+w*(S-_n*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[p++]=M),v>=0&&v<=1&&(o[p++]=v),T>=0&&T<=1&&(o[p++]=T)}}return p}function Dn(t,e,n,r,i){var o=6*n-12*e+6*t,a=9*e+3*r-3*t-9*n,s=3*e-3*t,l=0;if(Mn(a)){if(Tn(o))(c=-s/o)>=0&&c<=1&&(i[l++]=c)}else{var u=o*o-4*a*s;if(Mn(u))i[0]=-o/(2*a);else if(u>0){var c,h=vn(u),f=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(i[l++]=c),f>=0&&f<=1&&(i[l++]=f)}}return l}function An(t,e,n,r,i,o){var a=(e-t)*i+t,s=(n-e)*i+e,l=(r-n)*i+n,u=(s-a)*i+a,c=(l-s)*i+s,h=(c-u)*i+u;o[0]=t,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=r}function Ln(t,e,n,r,i,o,a,s,l){for(var u=t,c=e,h=0,f=1/l,p=1;p<=l;p++){var d=p*f,g=kn(t,n,i,a,d),v=kn(e,r,o,s,d),y=g-u,m=v-c;h+=Math.sqrt(y*y+m*m),u=g,c=v}return h}function Pn(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}function On(t,e,n,r){return 2*((1-r)*(e-t)+r*(n-e))}function Rn(t,e,n){var r=t+n-2*e;return 0===r?.5:(t-e)/r}function Nn(t,e,n,r,i){var o=(e-t)*r+t,a=(n-e)*r+e,s=(a-o)*r+o;i[0]=t,i[1]=o,i[2]=s,i[3]=s,i[4]=a,i[5]=n}function En(t,e,n,r,i,o,a){for(var s=t,l=e,u=0,c=1/a,h=1;h<=a;h++){var f=h*c,p=Pn(t,n,i,f),d=Pn(e,r,o,f),g=p-s,v=d-l;u+=Math.sqrt(g*g+v*v),s=p,l=d}return u}var Bn=/cubic-bezier\(([0-9,\.e ]+)\)/;function zn(t){var e=t&&Bn.exec(t);if(e){var n=e[1].split(","),r=+ut(n[0]),i=+ut(n[1]),o=+ut(n[2]),a=+ut(n[3]);if(isNaN(r+i+o+a))return;var s=[];return function(t){return t<=0?0:t>=1?1:In(0,r,o,1,t,s)&&kn(0,i,a,1,s[0])}}}var Fn=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||bt,this.ondestroy=t.ondestroy||bt,this.onrestart=t.onrestart||bt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,r=t-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,a=o?o(i):i;if(this.onframe(a),1===i){if(!this.loop)return!0;var s=r%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=X(t)?t:dn[t]||zn(t)},t}(),Vn=function(t){this.value=t},Hn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Vn(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Wn=function(){function t(t){this._list=new Hn,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,r=this._map,i=null;if(null==r[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Vn(e),a.key=t,n.insertEntry(a),r[t]=a}return i},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),Gn={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Un(t){return(t=Math.round(t))<0?0:t>255?255:t}function Xn(t){return t<0?0:t>1?1:t}function Yn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Un(parseFloat(e)/100*255):Un(parseInt(e,10))}function qn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Xn(parseFloat(e)/100):Xn(parseFloat(e))}function Zn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function jn(t,e,n){return t+(e-t)*n}function Kn(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function $n(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Qn=new Wn(20),Jn=null;function tr(t,e){Jn&&$n(Jn,e),Jn=Qn.put(t,Jn||e.slice())}function er(t,e){if(t){e=e||[];var n=Qn.get(t);if(n)return $n(e,n);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Gn)return $n(e,Gn[r]),tr(t,e),e;var i,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(i=parseInt(r.slice(1,4),16))>=0&&i<=4095?(Kn(e,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,5===o?parseInt(r.slice(4),16)/15:1),tr(t,e),e):void Kn(e,0,0,0,1):7===o||9===o?(i=parseInt(r.slice(1,7),16))>=0&&i<=16777215?(Kn(e,(16711680&i)>>16,(65280&i)>>8,255&i,9===o?parseInt(r.slice(7),16)/255:1),tr(t,e),e):void Kn(e,0,0,0,1):void 0;var a=r.indexOf("("),s=r.indexOf(")");if(-1!==a&&s+1===o){var l=r.substr(0,a),u=r.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Kn(e,+u[0],+u[1],+u[2],1):Kn(e,0,0,0,1);c=qn(u.pop());case"rgb":return u.length>=3?(Kn(e,Yn(u[0]),Yn(u[1]),Yn(u[2]),3===u.length?c:qn(u[3])),tr(t,e),e):void Kn(e,0,0,0,1);case"hsla":return 4!==u.length?void Kn(e,0,0,0,1):(u[3]=qn(u[3]),nr(u,e),tr(t,e),e);case"hsl":return 3!==u.length?void Kn(e,0,0,0,1):(nr(u,e),tr(t,e),e);default:return}}Kn(e,0,0,0,1)}}function nr(t,e){var n=(parseFloat(t[0])%360+360)%360/360,r=qn(t[1]),i=qn(t[2]),o=i<=.5?i*(r+1):i+r-i*r,a=2*i-o;return Kn(e=e||[],Un(255*Zn(a,o,n+1/3)),Un(255*Zn(a,o,n)),Un(255*Zn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function rr(t,e){var n=er(t);if(n){for(var r=0;r<3;r++)n[r]=e<0?n[r]*(1-e)|0:(255-n[r])*e+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ur(n,4===n.length?"rgba":"rgb")}}function ir(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var r=t*(e.length-1),i=Math.floor(r),o=Math.ceil(r),a=e[i],s=e[o],l=r-i;return n[0]=Un(jn(a[0],s[0],l)),n[1]=Un(jn(a[1],s[1],l)),n[2]=Un(jn(a[2],s[2],l)),n[3]=Xn(jn(a[3],s[3],l)),n}}var or=ir;function ar(t,e,n){if(e&&e.length&&t>=0&&t<=1){var r=t*(e.length-1),i=Math.floor(r),o=Math.ceil(r),a=er(e[i]),s=er(e[o]),l=r-i,u=ur([Un(jn(a[0],s[0],l)),Un(jn(a[1],s[1],l)),Un(jn(a[2],s[2],l)),Xn(jn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:i,rightIndex:o,value:r}:u}}var sr=ar;function lr(t,e,n,r){var i,o=er(t);if(t)return o=function(t){if(t){var e,n,r=t[0]/255,i=t[1]/255,o=t[2]/255,a=Math.min(r,i,o),s=Math.max(r,i,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var c=((s-r)/6+l/2)/l,h=((s-i)/6+l/2)/l,f=((s-o)/6+l/2)/l;r===s?e=f-h:i===s?e=1/3+c-f:o===s&&(e=2/3+h-c),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,n,u];return null!=t[3]&&p.push(t[3]),p}}(o),null!=e&&(o[0]=(i=X(e)?e(o[0]):e,(i=Math.round(i))<0?0:i>360?360:i)),null!=n&&(o[1]=qn(X(n)?n(o[1]):n)),null!=r&&(o[2]=qn(X(r)?r(o[2]):r)),ur(nr(o),"rgba")}function ur(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function cr(t,e){var n=er(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var hr=new Wn(100);function fr(t){if(Y(t)){var e=hr.get(t);return e||(e=rr(t,-.1),hr.put(t,e)),e}if(J(t)){var n=I({},t);return n.colorStops=B(t.colorStops,function(t){return{offset:t.offset,color:rr(t.color,-.1)}}),n}return t}var pr=Object.freeze({__proto__:null,parseCssInt:Yn,parseCssFloat:qn,parse:er,lift:rr,toHex:function(t){var e=er(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:ir,fastMapToColor:or,lerp:ar,mapToColor:sr,modifyHSL:lr,modifyAlpha:function(t,e){var n=er(t);if(n&&null!=e)return n[3]=Xn(e),ur(n,"rgba")},stringify:ur,lum:cr,random:function(){return ur([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},liftColor:fr});"undefined"!=typeof Buffer&&Buffer.from;var dr=Array.prototype.slice;function gr(t,e,n){return(e-t)*n+t}function vr(t,e,n,r){for(var i=e.length,o=0;or?e:t,o=Math.min(n,r),a=i[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)r.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var r=this.keyframes,i=r.length,o=!1,a=6,s=e;if(N(e)){var l=function(t){return N(t&&t[0])?2:1}(e);a=l,(1===l&&!Z(e[0])||2===l&&!Z(e[0][0]))&&(o=!0)}else if(Z(e)&&!nt(e))a=0;else if(Y(e))if(isNaN(+e)){var u=er(e);u&&(s=u,a=3)}else a=0;else if(J(e)){var c=I({},s);c.colorStops=B(e.colorStops,function(t){return{offset:t.offset,color:er(t.color)}}),"linear"===e.type?a=4:function(t){return"radial"===t.type}(e)&&(a=5),s=c}0===i?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var h={time:t,value:s,rawValue:e,percent:0};return n&&(h.easing=n,h.easingFunc=X(n)?n:dn[n]||zn(n)),r.push(h),h},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(t,e){return t.time-e.time});for(var r=this.valType,i=n.length,o=n[i-1],a=this.discrete,s=Mr(r),l=Sr(r),u=0;u=0&&!(l[n].percent<=e);n--);n=p(n,u-2)}else{for(n=f;ne);n++);n=p(n-1,u-2)}i=l[n+1],r=l[n]}if(r&&i){this._lastFr=n,this._lastFrP=e;var d=i.percent-r.percent,g=0===d?1:p((e-r.percent)/d,1);i.easingFunc&&(g=i.easingFunc(g));var v=o?this._additiveValue:h?Tr:t[c];if(!Mr(s)&&!h||v||(v=this._additiveValue=[]),this.discrete)t[c]=g<1?r.rawValue:i.rawValue;else if(Mr(s))1===s?vr(v,r[a],i[a],g):function(t,e,n,r){for(var i=e.length,o=i&&e[0].length,a=0;a0&&s.addKeyframe(0,br(l),r),this._trackKeys.push(a)}s.addKeyframe(t,br(e[a]),r)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],r=this._maxTime||0,i=0;i1){var a=o.pop();i.addKeyframe(a.time,t[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},t}();function Ir(){return(new Date).getTime()}var Dr,Ar,Lr=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=Ir()-this._pausedTime,n=e-this._time,r=this._head;r;){var i=r.next;r.step(e,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,pn(function e(){t._running&&(pn(e),!t._paused&&t.update())})},e.prototype.start=function(){this._running||(this._time=Ir(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ir(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ir()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Cr(t,e.loop);return this.addAnimator(n),n},e}(qt),Pr=i.domSupported,Or=(Ar={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Dr=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:B(Dr,function(t){var e=t.replace("mouse","pointer");return Ar.hasOwnProperty(e)?e:t})}),Rr=["mousemove","mouseup"],Nr=["pointermove","pointerup"],Er=!1;function Br(t){var e=t.pointerType;return"pen"===e||"touch"===e}function zr(t){t&&(t.zrByTouch=!0)}function Fr(t,e){for(var n=e,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return r}var Vr=function(t,e){this.stopPropagation=bt,this.stopImmediatePropagation=bt,this.preventDefault=bt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Hr={mousedown:function(t){t=ue(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ue(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ue(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Fr(this,(t=ue(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Er=!0,t=ue(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Er||(t=ue(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){zr(t=ue(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Hr.mousemove.call(this,t),Hr.mousedown.call(this,t)},touchmove:function(t){zr(t=ue(this.dom,t)),this.handler.processGesture(t,"change"),Hr.mousemove.call(this,t)},touchend:function(t){zr(t=ue(this.dom,t)),this.handler.processGesture(t,"end"),Hr.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Hr.click.call(this,t)},pointerdown:function(t){Hr.mousedown.call(this,t)},pointermove:function(t){Br(t)||Hr.mousemove.call(this,t)},pointerup:function(t){Hr.mouseup.call(this,t)},pointerout:function(t){Br(t)||Hr.mouseout.call(this,t)}};E(["click","dblclick","contextmenu"],function(t){Hr[t]=function(e){e=ue(this.dom,e),this.trigger(t,e)}});var Wr={pointermove:function(t){Br(t)||Wr.mousemove.call(this,t)},pointerup:function(t){Wr.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Gr(t,e){var n=e.domHandlers;i.pointerEventsSupported?E(Or.pointer,function(r){Xr(e,r,function(e){n[r].call(t,e)})}):(i.touchEventsSupported&&E(Or.touch,function(r){Xr(e,r,function(i){n[r].call(t,i),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}(e)})}),E(Or.mouse,function(r){Xr(e,r,function(i){i=le(i),e.touching||n[r].call(t,i)})}))}function Ur(t,e){function n(n){Xr(e,n,function(r){r=le(r),Fr(t,r.target)||(r=function(t,e){return ue(t.dom,new Vr(t,e),!0)}(t,r),e.domHandlers[n].call(t,r))},{capture:!0})}i.pointerEventsSupported?E(Nr,n):i.touchEventsSupported||E(Rr,n)}function Xr(t,e,n,r){t.mounted[e]=n,t.listenerOpts[e]=r,function(t,e,n,r){t.addEventListener(e,n,r)}(t.domTarget,e,n,r)}function Yr(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&ce(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var qr=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Zr=function(t){function e(e,n){var r=t.call(this)||this;return r.__pointerCapturing=!1,r.dom=e,r.painterRoot=n,r._localHandlerScope=new qr(e,Hr),Pr&&(r._globalHandlerScope=new qr(document,Wr)),Gr(r,r._localHandlerScope),r}return n(e,t),e.prototype.dispose=function(){Yr(this._localHandlerScope),Pr&&Yr(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Pr&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?Ur(this,e):Yr(e)}},e}(qt),jr=1;i.hasGlobalWindow&&(jr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Kr=jr,$r="#333",Qr="#ccc",Jr=ge,ti=5e-5;function ei(t){return t>ti||t<-5e-5}var ni,ri=[],ii=[],oi=[1,0,0,1,0,0],ai=Math.abs,si=function(){function t(){}var e;return t.prototype.getLocalTransform=function(t){return li(this,t)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return ei(this.rotation)||ei(this.x)||ei(this.y)||ei(this.scaleX-1)||ei(this.scaleY-1)||ei(this.skewX)||ei(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):Jr(n),t&&(e?ye(n,t,n):ve(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||[1,0,0,1,0,0],be(this.invTransform,n)):n&&(Jr(n),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(ri);var n=ri[0]<0?-1:1,r=ri[1]<0?-1:1,i=((ri[0]-n)*e+n)/ri[0]||0,o=((ri[1]-r)*e+r)/ri[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),i=Math.PI/2+r-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],ye(ii,t.invTransform,e),e=ii);var n=this.originX,r=this.originY;(n||r)&&(oi[4]=n,oi[5]=r,ye(ii,e,oi),ii[4]-=n,ii[5]-=r,e=ii),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],r=this.invTransform;return r&&Ht(n,n,r),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],r=this.transform;return r&&Ht(n,n,r),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&ai(t[0]-1)>1e-10&&ai(t[3]-1)>1e-10?Math.sqrt(ai(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){ci(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,r=t.originY||0,i=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,c=t.y,h=t.skewX?Math.tan(t.skewX):0,f=t.skewY?Math.tan(-t.skewY):0;if(n||r||a||s){var p=n+a,d=r+s;e[4]=-p*i-h*d*o,e[5]=-d*o-f*p*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=f*i,e[2]=h*o,l&&_e(e,e,l),e[4]+=n+u,e[5]+=r+c,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),li=si.getLocalTransform,ui=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ci(t,e){return D(t,e,ui)}function hi(t){ni||(ni=new Wn(100)),t=t||o;var e=ni.get(t);return e||(e={font:t,strWidthCache:new Wn(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:u.measureText("国",t).width,asciiCharWidth:u.measureText("a",t).width},ni.put(t,e)),e}var fi=0,pi=5;function di(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=function(t){if(!(fi>=pi)){t=t||o;for(var e=[],n=+new Date,r=0;r<=127;r++)e[r]=u.measureText(String.fromCharCode(r),t).width;var i=+new Date-n;return i>16?fi=pi:i>2&&fi++,e}}(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?null!=t.asciiWidthMap?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function gi(t,e){var n=t.strWidthCache,r=n.get(e);return null==r&&(r=u.measureText(e,t.font).width,n.put(e,r)),r}function vi(t,e,n,r){var i=gi(hi(e),t),o=xi(e),a=mi(0,i,n),s=_i(0,o,r);return new Be(a,s,i,o)}function yi(t,e,n,r){var i=((t||"")+"").split("\n");if(1===i.length)return vi(i[0],e,n,r);for(var o=new Be(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function wi(t,e,n){var r=e.position||"inside",i=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,c="left",h="top";if(r instanceof Array)l+=bi(r[0],n.width),u+=bi(r[1],n.height),c=null,h=null;else switch(r){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+a,u+=s,h="middle";break;case"top":l+=a/2,u-=i,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+i,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=a-i,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=i,c="center";break;case"insideBottom":l+=a/2,u+=o-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=a-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=o-i,h="bottom";break;case"insideBottomRight":l+=a-i,u+=o-i,c="right",h="bottom"}return(t=t||{}).x=l,t.y=u,t.align=c,t.verticalAlign=h,t}var Si="__zr_normal__",Mi=ui.concat(["ignore"]),Ti=z(ui,function(t,e){return t[e]=!0,t},{ignore:!1}),ki={},Ci=new Be(0,0,0,0),Ii=[],Di=function(){function t(t){this.id=M(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,i=e.innerTransformable,o=void 0,a=void 0,s=!1;i.parent=r?this:null;var l=!1;i.copyTransform(e);var u=null!=n.position,c=n.autoOverflowArea,h=void 0;if((c||u)&&(h=Ci,n.layoutRect?h.copy(n.layoutRect):h.copy(this.getBoundingRect()),r||h.applyTransform(this.transform)),u){this.calculateTextPosition?this.calculateTextPosition(ki,n,h):wi(ki,n,h),i.x=ki.x,i.y=ki.y,o=ki.align,a=ki.verticalAlign;var f=n.origin;if(f&&null!=n.rotation){var p=void 0,d=void 0;"center"===f?(p=.5*h.width,d=.5*h.height):(p=bi(f[0],h.width),d=bi(f[1],h.height)),l=!0,i.originX=-i.x+p+(r?0:h.x),i.originY=-i.y+d+(r?0:h.y)}}null!=n.rotation&&(i.rotation=n.rotation);var g=n.offset;g&&(i.x+=g[0],i.y+=g[1],l||(i.originX=-g[0],i.originY=-g[1]));var v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(c){var y=v.overflowRect=v.overflowRect||new Be(0,0,0,0);i.getLocalTransform(Ii),be(Ii,Ii),Be.copy(y,h),y.applyTransform(Ii)}else v.overflowRect=null;var m=void 0,_=void 0,x=void 0;(null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside)&&this.canBeInsideText()?(m=n.insideFill,_=n.insideStroke,null!=m&&"auto"!==m||(m=this.getInsideTextFill()),null!=_&&"auto"!==_||(_=this.getInsideTextStroke(m),x=!0)):(m=n.outsideFill,_=n.outsideStroke,null!=m&&"auto"!==m||(m=this.getOutsideFill()),null!=_&&"auto"!==_||(_=this.getOutsideStroke(m),x=!0)),(m=m||"#000")===v.fill&&_===v.stroke&&x===v.autoStroke&&o===v.align&&a===v.verticalAlign||(s=!0,v.fill=m,v.stroke=_,v.autoStroke=x,v.align=o,v.verticalAlign=a,e.setDefaultTextStyle(v)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Qr:$r},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&er(e);n||(n=[255,255,255,1]);for(var r=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,ur(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},I(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(j(t))for(var n=H(t),r=0;r0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Si,!1,t)},t.prototype.useState=function(t,e,n,r){var i=t===Si;if(this.hasState()||!i){var o=this.currentStates,a=this.stateTransition;if(!(P(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||i){i||this.saveCurrentToNormalState(s);var l=this._textContent,u=Ri(this,l,s,r);u&&!this.__inHover&&(this.__inHover=u),this._applyStateObj(t,s,this._normalState,e,Ei(this,n,a),a);var c=this._textGuide;return l&&l.useState(t,e,n,!!u),c&&c.useState(t,e,n,!!u),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}T("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var r=[],i=this.currentStates,o=t.length,a=o===i.length;if(a)for(var s=0;s=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var r=this.currentStates.slice(),i=P(r,t),o=P(r,e)>=0;i>=0?o?r.splice(i,1):r[i]=e:n&&!o&&r.push(e),this.useStates(r)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},r=0;r=0&&e.splice(n,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,r=n.length,i=[],o=0;o0&&n.during&&o[0].during(function(t,e){n.during(e)});for(var f=0;f0||i.force&&!a.length){var w,S=void 0,M=void 0,T=void 0;if(s){M={},f&&(S={});for(x=0;x<_;x++){M[y=g[x]]=n[y],f?S[y]=r[y]:n[y]=r[y]}}else if(f){T={};for(x=0;x<_;x++){T[y=g[x]]=br(n[y]),Pi(n,r,y)}}(w=new Cr(n,!1,!1,h?F(d,function(t){return t.targetName===e}):null)).targetName=e,i.scope&&(w.scope=i.scope),f&&S&&w.whenWithKeys(0,S,g),T&&w.whenWithKeys(0,T,g),w.whenWithKeys(null==u?500:u,s?M:r,g).delay(c||0),t.addAnimator(w,e),a.push(w)}}function Ri(t,e,n,r){return!(n&&n.hoverLayer||r)||Ni(t)||e&&Ni(e)?0:1}function Ni(t){return"text"===t.type||"tspan"===t.type}function Ei(t,e,n){return!e&&!t.__inHover&&n&&n.duration>0}R(Di,qt),R(Di,si);var Bi=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(r,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=P(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,r=n[e];if(t&&t!==this&&t.parent!==this&&t!==r){n[e]=t,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,r=P(n,t);return r<0||(n.splice(r,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(t<=i)return a;if(t>=o)return s}else{if(t>=i)return a;if(t<=o)return s}else{if(t===i)return a;if(t===o)return s}return(t-i)/l*u+a}var oo=function(t,e,n){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return ao(t,e,n)};function ao(t,e,n){return Y(t)?function(t){return!!(e=t,e.replace(/^\s+|\s+$/g,"")).match(/%$/);var e}(t)?parseFloat(t)/100*e+(n||0):parseFloat(t):null==t?NaN:+t}function so(t,e,n){return isNaN(e)?n?""+t:+t:(e=qi(Zi(0,e),20),t=(+t).toFixed(e),n?t:+t)}function lo(t){return t.sort(function(t,e){return t-e}),t}function uo(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Ki(t*e)/e===t)return n;return co(t)}function co(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),r=n>0?+e.slice(n+1):0,i=n>0?n:e.length,o=e.indexOf(".");return Zi(0,(o<0?0:i-1-o)-r)}function ho(t,e){var n=z(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return[];for(var r=Ji(10,e),i=B(t,function(t){return(isNaN(t)?0:t)/n*r*100}),o=100*r,a=B(i,function(t){return $i(t)}),s=z(a,function(t,e){return t+e},0),l=B(i,function(t,e){return t-a[e]});su&&(u=l[h],c=h);++a[c],l[c]=0,++s}return B(a,function(t){return t/r})}function fo(t,e){var n=Zi(uo(t),uo(e)),r=t+e;return n>20?r:so(r,n)}var po=Ji(2,53)-1;function go(t){var e=2*no;return(t%e+e)%e}function vo(t){return t>-1e-4&&t=10&&e++,e}function bo(t,e){var n=xo(t),r=Ji(10,n),i=t/r;return so(t=(2===e?1:e?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,-n)}function wo(t){var e=parseFloat(t);return e==t&&(0!==e||!Y(t)||t.indexOf("x")<=0)?e:NaN}function So(t){return!isNaN(wo(t))}function Mo(){return Ki(9*ro())}function To(t,e){return 0===e?t:To(e,t%e)}function ko(t,e){return null==t?e:null==e?t:t*e/To(t,e)}function Co(t){return null!=t&&isFinite(t)}var Io={},Do="undefined"!=typeof console&&console.warn&&console.log;function Ao(t,e,n){if(Do){if(n){if(Io[e])return;Io[e]=!0}console[t]("[ECharts] "+e)}}function Lo(t,e){Ao("error",t,e)}function Po(t){0}function Oo(t){throw new Error(t)}function Ro(t,e,n){return(e-t)*n+t}var No="series\0";function Eo(t){return t instanceof Array?t:null==t?[]:[t]}function Bo(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var r=0,i=n.length;rt[1]&&(t[1]=e))}function ra(t,e){oa(e)&&et[1]&&(t[1]=e)}function oa(t){return null!=t&&isFinite(t)}function aa(t,e){return oa(t)&&oa(e)&&t<=e}function sa(){var t="__ec_once_"+la++;return function(e,n){xt(e,t)||(e[t]=1,n())}}var la=Mo();function ua(t,e,n){var r=vt(),i=0;E(t,function(o){var a=e(o);var s=r.get(a)||0;n&&n(o,s),s||n||(t[i++]=o),r.set(a,s+1)}),n||(t.length=i)}function ca(t){return t.value+""}function ha(t){return t+""}function fa(t,e,n){var r=t.getData().count();return{progressiveRender:n.progressiveEnabled&&e.incrementalPrepareRender&&r>=n.threshold,large:t.get("large")&&r>=t.get("largeThreshold"),modDataCount:"mod"===t.get("progressiveChunkMode")?t.getData().count():null}}function pa(t){return{overallReset:t}}var da="___EC__COMPONENT__CONTAINER___",ga="___EC__EXTENDED_CLASS___";function va(t){var e={main:"",sub:""};if(t){var n=t.split(".");e.main=n[0]||"",e.sub=n[1]||""}return e}function ya(t,e){t.$constructor=t,t.extend=function(t){var e,r,i=this;return X(r=i)&&/^class\s/.test(Function.prototype.toString.call(r))?e=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(i):(e=function(){(t.$constructor||i).apply(this,arguments)},O(e,this)),I(e.prototype,t),e[ga]=!0,e.extend=this.extend,e.superCall=xa,e.superApply=ba,e.superClass=i,e}}function ma(t,e){t.extend=e.extend}var _a=Math.round(10*Math.random());function xa(t,e){for(var n=[],r=2;r=0||i&&P(i,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var Ma=Sa([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Ta=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Ma(this,t,e)},t}(),ka=new Wn(50);function Ca(t){if("string"==typeof t){var e=ka.get(t);return e&&e.image}return t}function Ia(t,e,n,r,i){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=ka.get(t),a={hostEl:n,cb:r,cbPayload:i};return o?!Aa(e=o.image)&&o.pending.push(a):((e=u.loadImage(t,Da,Da)).__zrImageSrc=t,ka.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function Da(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var c=gi(a,n);return c>l&&(n="",c=0),l=t-c,i.ellipsis=n,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=t,i}function Ra(t,e,n){var r=n.containerWidth,i=n.contentWidth,o=n.fontMeasureInfo;if(!r)return t.textLine="",void(t.isTruncated=!1);var a=gi(o,e);if(a<=r)return t.textLine=e,void(t.isTruncated=!1);for(var s=0;;s++){if(a<=i||s>=n.maxIterations){e+=n.ellipsis;break}var l=0===s?Na(e,i,o):a>0?Math.floor(e.length*i/a):0;a=gi(o,e=e.substr(0,l))}""===e&&(e=n.placeholder),t.textLine=e,t.isTruncated=!0}function Na(t,e,n){for(var r=0,i=0,o=t.length;i0&&d+r.accumWidth>r.width&&(o=e.split("\n"),h=!0),r.accumWidth=d}else{var g=Wa(e,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=g.accumWidth+p,a=g.linesWidths,o=g.lines}}o||(o=e.split("\n"));for(var v=hi(c),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!Va[t]}function Wa(t,e,n,r,i){for(var o=[],a=[],s="",l="",u=0,c=0,h=hi(e),f=0;fn:i+c+d>n)?c?(s||l)&&(g?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=d):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=d)):g?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(c+=d,g?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return l&&(s+=l),s&&(o.push(s),a.push(c)),1===o.length&&(c+=i),{accumWidth:c,lines:o,linesWidths:a}}function Ga(t,e,n,r,i,o){if(t.baseX=n,t.baseY=r,t.outerWidth=t.outerHeight=null,e){var a=2*e.width,s=2*e.height;Be.set(Ua,mi(n,a,i),_i(r,s,o),a,s),Be.intersect(e,Ua,null,Xa);var l=Xa.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=mi(l.x,l.width,i,!0),t.baseY=_i(l.y,l.height,o,!0)}}var Ua=new Be(0,0,0,0),Xa={outIntersectRect:{},clamp:!0};function Ya(t){return null!=t?t+="":t=""}function qa(t,e,n,r){var i=new Be(mi(t.x||0,e,t.textAlign),_i(t.y||0,n,t.textBaseline),e,n),o=null!=r?r:Za(t)?t.lineWidth:0;return o>0&&(i.x-=o/2,i.y-=o/2,i.width+=o,i.height+=o),i}function Za(t){var e=t.stroke;return null!=e&&"none"!==e&&t.lineWidth>0}var ja="__zr_style_"+Math.round(10*Math.random()),Ka={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},$a={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ka[ja]=!0;var Qa=["z","z2","invisible"],Ja=["invisible"],ts=function(t){function e(e){return t.call(this,e)||this}var r;return n(e,t),e.prototype._init=function(e){for(var n=H(e),r=0;r1e-4)return s[0]=t-n,s[1]=e-r,l[0]=t+n,void(l[1]=e+r);if(ls[0]=as(i)*n+t,ls[1]=os(i)*r+e,us[0]=as(o)*n+t,us[1]=os(o)*r+e,u(s,ls,us),c(l,ls,us),(i%=ss)<0&&(i+=ss),(o%=ss)<0&&(o+=ss),i>o&&!a?o+=ss:ii&&(cs[0]=as(p)*n+t,cs[1]=os(p)*r+e,u(s,cs,s),c(l,cs,l))}var ys={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ms=[],_s=[],xs=[],bs=[],ws=[],Ss=[],Ms=Math.min,Ts=Math.max,ks=Math.cos,Cs=Math.sin,Is=Math.abs,Ds=Math.PI,As=2*Ds,Ls="undefined"!=typeof Float32Array,Ps=[];function Os(t){return Math.round(t/Ds*1e8)/1e8%2*Ds}function Rs(t,e){var n=Os(t[0]);n<0&&(n+=As);var r=n-t[0],i=t[1];i+=r,!e&&i-n>=As?i=n+As:e&&n-i>=As?i=n-As:!e&&n>i?i=n+(As-Os(n-i)):e&&n0&&(this._ux=Is(n/Kr/t)||0,this._uy=Is(n/Kr/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(ys.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=Is(t-this._xi),r=Is(e-this._yi),i=n>this._ux||r>this._uy;if(this.addData(ys.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+r*r;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,r,i,o){return this._drawPendingPt(),this.addData(ys.C,t,e,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,r,i,o),this._xi=i,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,r){return this._drawPendingPt(),this.addData(ys.Q,t,e,n,r),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,r),this._xi=n,this._yi=r,this},t.prototype.arc=function(t,e,n,r,i,o){this._drawPendingPt(),Ps[0]=r,Ps[1]=i,Rs(Ps,o),r=Ps[0];var a=(i=Ps[1])-r;return this.addData(ys.A,t,e,n,n,r,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,r,i,o),this._xi=ks(i)*n+t,this._yi=Cs(i)*n+e,this},t.prototype.arcTo=function(t,e,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,r,i),this},t.prototype.rect=function(t,e,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,r),this.addData(ys.R,t,e,n,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(ys.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){if(this._saveData){var e=t.length;this.data&&this.data.length===e||!Ls||(this.data=new Float32Array(e));for(var n=0;n0&&o))for(var a=0;au.length&&(this._expandData(),u=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){xs[0]=xs[1]=ws[0]=ws[1]=Number.MAX_VALUE,bs[0]=bs[1]=Ss[0]=Ss[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,r=0,i=0,o=0;for(t=0;tn||Is(v)>r||h===e-1)&&(d=Math.sqrt(D*D+v*v),i=g,o=_);break;case ys.C:var y=t[h++],m=t[h++],_=(g=t[h++],t[h++]),x=t[h++],b=t[h++];d=Ln(i,o,y,m,g,_,x,b,10),i=x,o=b;break;case ys.Q:d=En(i,o,y=t[h++],m=t[h++],g=t[h++],_=t[h++],10),i=g,o=_;break;case ys.A:var w=t[h++],S=t[h++],M=t[h++],T=t[h++],k=t[h++],C=t[h++],I=C+k;h+=1,p&&(a=ks(k)*M+w,s=Cs(k)*T+S),d=Ts(M,T)*Ms(As,Math.abs(C)),i=ks(I)*M+w,o=Cs(I)*T+S;break;case ys.R:a=i=t[h++],s=o=t[h++],d=2*t[h++]+2*t[h++];break;case ys.Z:var D=a-i;v=s-o;d=Math.sqrt(D*D+v*v),i=a,o=s}d>=0&&(l[c++]=d,u+=d)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,r,i,o,a,s,l,u,c,h,f=this.data,p=this._ux,d=this._uy,g=this._len,v=e<1,y=0,m=0,_=0;if(!v||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var x=0;x0&&(t.lineTo(c,h),_=0),b){case ys.M:n=i=f[x++],r=o=f[x++],t.moveTo(i,o);break;case ys.L:a=f[x++],s=f[x++];var S=Is(a-i),M=Is(s-o);if(S>p||M>d){if(v){if(y+(Z=l[m++])>u){var T=(u-y)/Z;t.lineTo(i*(1-T)+a*T,o*(1-T)+s*T);break t}y+=Z}t.lineTo(a,s),i=a,o=s,_=0}else{var k=S*S+M*M;k>_&&(c=a,h=s,_=k)}break;case ys.C:var C=f[x++],I=f[x++],D=f[x++],A=f[x++],L=f[x++],P=f[x++];if(v){if(y+(Z=l[m++])>u){An(i,C,D,L,T=(u-y)/Z,ms),An(o,I,A,P,T,_s),t.bezierCurveTo(ms[1],_s[1],ms[2],_s[2],ms[3],_s[3]);break t}y+=Z}t.bezierCurveTo(C,I,D,A,L,P),i=L,o=P;break;case ys.Q:C=f[x++],I=f[x++],D=f[x++],A=f[x++];if(v){if(y+(Z=l[m++])>u){Nn(i,C,D,T=(u-y)/Z,ms),Nn(o,I,A,T,_s),t.quadraticCurveTo(ms[1],_s[1],ms[2],_s[2]);break t}y+=Z}t.quadraticCurveTo(C,I,D,A),i=D,o=A;break;case ys.A:var O=f[x++],R=f[x++],N=f[x++],E=f[x++],B=f[x++],z=f[x++],F=f[x++],V=!f[x++],H=N>E?N:E,W=Is(N-E)>.001,G=B+z,U=!1;if(v)y+(Z=l[m++])>u&&(G=B+z*(u-y)/Z,U=!0),y+=Z;if(W&&t.ellipse?t.ellipse(O,R,N,E,F,B,G,V):t.arc(O,R,H,B,G,V),U)break t;w&&(n=ks(B)*N+O,r=Cs(B)*E+R),i=ks(G)*N+O,o=Cs(G)*E+R;break;case ys.R:n=i=f[x],r=o=f[x+1],a=f[x++],s=f[x++];var X=f[x++],Y=f[x++];if(v){if(y+(Z=l[m++])>u){var q=u-y;t.moveTo(a,s),t.lineTo(a+Ms(q,X),s),(q-=X)>0&&t.lineTo(a+X,s+Ms(q,Y)),(q-=Y)>0&&t.lineTo(a+Ts(X-q,0),s+Y),(q-=X)>0&&t.lineTo(a,s+Ts(Y-q,0));break t}y+=Z}t.rect(a,s,X,Y);break;case ys.Z:if(v){var Z;if(y+(Z=l[m++])>u){T=(u-y)/Z;t.lineTo(i*(1-T)+n*T,o*(1-T)+r*T);break t}y+=Z}t.closePath(),i=n,o=r}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=ys,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}();function Es(t,e,n,r,i,o,a){if(0===i)return!1;var s=i,l=0;if(a>e+s&&a>r+s||at+s&&o>n+s||oe+h&&c>r+h&&c>o+h&&c>s+h||ct+h&&u>n+h&&u>i+h&&u>a+h||u=0&&de+u&&l>r+u&&l>o+u||lt+u&&s>n+u&&s>i+u||s=0&&vn||c+ui&&(i+=Hs);var f=Math.atan2(l,s);return f<0&&(f+=Hs),f>=r&&f<=i||f+Hs>=r&&f+Hs<=i}function Gs(t,e,n,r,i,o){if(o>e&&o>r||oi?s:0}var Us=Ns.CMD,Xs=2*Math.PI;var Ys=[-1,-1,-1],qs=[-1,-1];function Zs(){var t=qs[0];qs[0]=qs[1],qs[1]=t}function js(t,e,n,r,i,o,a,s,l,u){if(u>e&&u>r&&u>o&&u>s||u1&&Zs(),p=kn(e,r,o,s,qs[0]),f>1&&(d=kn(e,r,o,s,qs[1]))),2===f?ve&&s>r&&s>o||s=0&&c<=1&&(i[l++]=c);else{var u=a*a-4*o*s;if(Mn(u))(c=-a/(2*o))>=0&&c<=1&&(i[l++]=c);else if(u>0){var c,h=vn(u),f=(-a-h)/(2*o);(c=(-a+h)/(2*o))>=0&&c<=1&&(i[l++]=c),f>=0&&f<=1&&(i[l++]=f)}}return l}(e,r,o,s,Ys);if(0===l)return 0;var u=Rn(e,r,o);if(u>=0&&u<=1){for(var c=0,h=Pn(e,r,o,u),f=0;fn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Ys[0]=-l,Ys[1]=l;var u=Math.abs(r-i);if(u<1e-4)return 0;if(u>=Xs-1e-4){r=0,i=Xs;var c=o?1:-1;return a>=Ys[0]+t&&a<=Ys[1]+t?c:0}if(r>i){var h=r;r=i,i=h}r<0&&(r+=Xs,i+=Xs);for(var f=0,p=0;p<2;p++){var d=Ys[p];if(d+t>a){var g=Math.atan2(s,d);c=o?1:-1;g<0&&(g=Xs+g),(g>=r&&g<=i||g+Xs>=r&&g+Xs<=i)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),f+=c)}}return f}function Qs(t,e,n,r,i){for(var o,a,s,l,u=t.data,c=t.len(),h=0,f=0,p=0,d=0,g=0,v=0;v1&&(n||(h+=Gs(f,p,d,g,r,i))),m&&(d=f=u[v],g=p=u[v+1]),y){case Us.M:f=d=u[v++],p=g=u[v++];break;case Us.L:if(n){if(Es(f,p,u[v],u[v+1],e,r,i))return!0}else h+=Gs(f,p,u[v],u[v+1],r,i)||0;f=u[v++],p=u[v++];break;case Us.C:if(n){if(Bs(f,p,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],e,r,i))return!0}else h+=js(f,p,u[v++],u[v++],u[v++],u[v++],u[v],u[v+1],r,i)||0;f=u[v++],p=u[v++];break;case Us.Q:if(n){if(zs(f,p,u[v++],u[v++],u[v],u[v+1],e,r,i))return!0}else h+=Ks(f,p,u[v++],u[v++],u[v],u[v+1],r,i)||0;f=u[v++],p=u[v++];break;case Us.A:var _=u[v++],x=u[v++],b=u[v++],w=u[v++],S=u[v++],M=u[v++];v+=1;var T=!!(1-u[v++]);o=Math.cos(S)*b+_,a=Math.sin(S)*w+x,m?(d=o,g=a):h+=Gs(f,p,o,a,r,i);var k=(r-_)*w/b+_;if(n){if(Ws(_,x,w,S,S+M,T,e,k,i))return!0}else h+=$s(_,x,w,S,S+M,T,k,i);f=Math.cos(S+M)*b+_,p=Math.sin(S+M)*w+x;break;case Us.R:if(d=f=u[v++],g=p=u[v++],o=d+u[v++],a=g+u[v++],n){if(Es(d,g,o,g,e,r,i)||Es(o,g,o,a,e,r,i)||Es(o,a,d,a,e,r,i)||Es(d,a,d,g,e,r,i))return!0}else h+=Gs(o,g,o,a,r,i),h+=Gs(d,a,d,g,r,i);break;case Us.Z:if(n){if(Es(f,p,d,g,e,r,i))return!0}else h+=Gs(f,p,d,g,r,i);f=d,p=g}}return n||(s=p,l=g,Math.abs(s-l)<1e-4)||(h+=Gs(f,p,d,g,r,i)||0),0!==h}var Js=A({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ka),tl={style:A({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},$a.style)},el=ui.concat(["invisible","culling","z","z2","zlevel","parent"]),nl=function(t){function e(e){return t.call(this,e)||this}var r;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(t){n.buildPath(t,n.shape)}),i.silent=!0;var o=i.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var s=0;s.5?$r:e>.2?"#eee":Qr}if(t)return Qr}return $r},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(Y(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===cr(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Ns(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||4&this.__dirty)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),t=i.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),i=this.style;if(t=n[0],e=n[1],r.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,r){return Qs(t,e,!0,n,r)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Qs(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:I(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return mt(Js,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=I({},this.shape))},e.prototype._applyStateObj=function(e,n,r,i,o,a){if(t.prototype._applyStateObj.call(this,e,n,r,i,o,a),1!==this.__inHover){var s,l=!(n&&i);if(n&&n.shape?o?i?s=n.shape:(s=I({},r.shape),I(s,n.shape)):(s=I({},i?this.shape:r.shape),I(s,n.shape)):l&&(s=r.shape),s)if(o){this.shape=I({},this.shape);for(var u={},c=H(s),h=0;hu&&(n*=u/(a=n+r),r*=u/a),i+o>u&&(i*=u/(a=i+o),o*=u/a),r+i>c&&(r*=c/(a=r+i),i*=c/a),n+o>c&&(n*=c/(a=n+o),o*=c/a),t.moveTo(s+n,l),t.lineTo(s+u-r,l),0!==r&&t.arc(s+u-r,l+r,r,-Math.PI/2,0),t.lineTo(s+u,l+c-i),0!==i&&t.arc(s+u-i,l+c-i,i,0,Math.PI/2),t.lineTo(s+o,l+c),0!==o&&t.arc(s+o,l+c-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI),t.closePath()}(t,e):t.rect(n,r,i,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(nl);pl.prototype.type="rect";var dl={fill:"#000"},gl={},vl={style:A({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},$a.style)},yl=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=dl,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ey&&p){var _=Math.floor(y/f);d=d||v.length>_,m=(v=v.slice(0,_)).length*f}if(i&&c&&null!=g)for(var x=Oa(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b={},w=0;w0,k=0;kg&&Fa(o,a.substring(g,v),e,d),Fa(o,f[2],e,d,f[1]),g=La.lastIndex}gh){var R=o.lines.length;I>0?(T.tokens=T.tokens.slice(0,I),S(T,C,k),o.lines=o.lines.slice(0,M+1)):o.lines=o.lines.slice(0,M),o.isTruncated=o.isTruncated||o.lines.length=0&&"right"===(C=_[k]).align;)this._placeToken(C,t,b,d,T,"right",v),w-=C.width,T-=C.width,k--;for(M+=(s-(M-p)-(g-T)-w)/2;S<=k;)C=_[S],this._placeToken(C,t,b,d,M+C.width/2,"center",v),M+=C.width,S++;d+=b}},e.prototype._placeToken=function(t,e,n,r,i,a,s){var l=e.rich[t.styleName]||{};l.text=t.text;var u=t.verticalAlign,c=r+n/2;"top"===u?c=r+t.height/2:"bottom"===u&&(c=r+n-t.height/2),!t.isLineHolder&&Il(l)&&this._renderBackground(l,e,"right"===a?i-t.width:"center"===a?i-t.width/2:i,c-t.height/2,t.width,t.height);var h=!!l.backgroundColor,f=t.textPadding;f&&(i=kl(i,a,f),c-=t.height/2-f[0]-t.innerHeight/2);var p=this._getOrCreateChild(il),d=p.createStyle();p.useStyle(d);var g=this._defaultStyle,v=!1,y=0,m=!1,_=Tl("fill"in l?l.fill:"fill"in e?e.fill:(v=!0,g.fill)),x=Ml("stroke"in l?l.stroke:"stroke"in e?e.stroke:h||s||g.autoStroke&&!v?null:(y=2,m=!0,g.stroke)),b=l.textShadowBlur>0||e.textShadowBlur>0;d.text=t.text,d.x=i,d.y=c,b&&(d.shadowBlur=l.textShadowBlur||e.textShadowBlur||0,d.shadowColor=l.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=l.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=l.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=a,d.textBaseline="middle",d.font=t.font||o,d.opacity=ot(l.opacity,e.opacity,1),wl(d,l),x&&(d.lineWidth=ot(l.lineWidth,e.lineWidth,y),d.lineDash=it(l.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=x),_&&(d.fill=_),p.setBoundingRect(qa(d,t.contentWidth,t.contentHeight,m?0:null))},e.prototype._renderBackground=function(t,e,n,r,i,o){var a,s,l,u=t.backgroundColor,c=t.borderWidth,h=t.borderColor,f=u&&u.image,p=u&&!f,d=t.borderRadius,g=this;if(p||t.lineHeight||c&&h){(a=this._getOrCreateChild(pl)).useStyle(a.createStyle()),a.style.fill=null;var v=a.shape;v.x=n,v.y=r,v.width=i,v.height=o,v.r=d,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=it(t.fillOpacity,1);else if(f){(s=this._getOrCreateChild(sl)).onload=function(){g.dirtyStyle()};var y=s.style;y.image=u.image,y.x=n,y.y=r,y.width=i,y.height=o}c&&h&&((l=a.style).lineWidth=c,l.stroke=h,l.strokeOpacity=it(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=ot(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return function(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}(t)&&(e=[t.fontStyle,t.fontWeight,bl(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&ut(e)||t.textFont||t.font},e}(ts),ml={left:!0,right:1,center:1},_l={top:1,bottom:1,middle:1},xl=["fontStyle","fontWeight","fontSize","fontFamily"];function bl(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function wl(t,e){for(var n=0;n=0,o=!1;if(t instanceof nl){var a=Xl(t),s=i&&a.selectFill||a.normalFill,l=i&&a.selectStroke||a.normalStroke;if(eu(s)||eu(l)){var u=(r=r||{}).style||{};"inherit"===u.fill?(o=!0,r=I({},r),(u=I({},u)).fill=s):!eu(u.fill)&&eu(s)?(o=!0,r=I({},r),(u=I({},u)).fill=fr(s)):!eu(u.stroke)&&eu(l)&&(o||(r=I({},r),u=I({},u)),u.stroke=fr(l)),r.style=u}}if(r&&null==r.z2){o||(r=I({},r));var c=t.z2EmphasisLift;r.z2=t.z2+(null!=c?c:10)}return r}(this,0,e,n);if("blur"===t)return function(t,e,n){var r=P(t.currentStates,e)>=0,i=t.style.opacity,o=r?null:function(t,e,n,r){for(var i=t.style,o={},a=0;a0){var o={dataIndex:i,seriesIndex:t.seriesIndex};null!=r&&(o.dataType=r),e.push(o)}})}),e}function Iu(t,e,n){Ou(t,!0),cu(t,pu),function(t,e,n){var r=Dl(t);null!=e?(r.focus=e,r.blurScope=n):r.focus&&(r.focus=null)}(t,e,n)}function Du(t,e,n,r){r?function(t){Ou(t,!1)}(t):Iu(t,e,n)}var Au=["emphasis","blur","select"],Lu={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Pu(t,e,n,r){n=n||"itemStyle";for(var i=0;i1&&(a*=Hu(d),s*=Hu(d));var g=(i===o?-1:1)*Hu((a*a*(s*s)-a*a*(p*p)-s*s*(f*f))/(a*a*(p*p)+s*s*(f*f)))||0,v=g*a*p/s,y=g*-s*f/a,m=(t+n)/2+Gu(h)*v-Wu(h)*y,_=(e+r)/2+Wu(h)*v+Gu(h)*y,x=qu([1,0],[(f-v)/a,(p-y)/s]),b=[(f-v)/a,(p-y)/s],w=[(-1*f-v)/a,(-1*p-y)/s],S=qu(b,w);if(Yu(b,w)<=-1&&(S=Uu),Yu(b,w)>=1&&(S=0),S<0){var M=Math.round(S/Uu*1e6)/1e6;S=2*Uu+M%2*Uu}c.addData(u,m,_,a,s,x,S,h,o)}var ju=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Ku=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var $u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(nl);function Qu(t){return null!=t.setData}function Ju(t,e){var n=function(t){var e=new Ns;if(!t)return e;var n,r=0,i=0,o=r,a=i,s=Ns.CMD,l=t.match(ju);if(!l)return e;for(var u=0;uA*A+L*L&&(M=k,T=C),{cx:M,cy:T,x0:-c,y0:-h,x1:M*(i/b-1),y1:T*(i/b-1)}}function vc(t,e){var n,r=fc(e.r,0),i=fc(e.r0||0,0),o=r>0;if(o||i>0){if(o||(r=i,i=0),i>r){var a=r;r=i,i=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,c=e.cy,h=!!e.clockwise,f=cc(l-s),p=f>oc&&f%oc;if(p>dc&&(f=p),r>dc)if(f>oc-dc)t.moveTo(u+r*sc(s),c+r*ac(s)),t.arc(u,c,r,s,l,!h),i>dc&&(t.moveTo(u+i*sc(l),c+i*ac(l)),t.arc(u,c,i,l,s,h));else{var d=void 0,g=void 0,v=void 0,y=void 0,m=void 0,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0,M=void 0,T=void 0,k=void 0,C=void 0,I=void 0,D=void 0,A=r*sc(s),L=r*ac(s),P=i*sc(l),O=i*ac(l),R=f>dc;if(R){var N=e.cornerRadius;N&&(n=function(t){var e;if(U(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(N),d=n[0],g=n[1],v=n[2],y=n[3]);var E=cc(r-i)/2;if(m=pc(E,v),_=pc(E,y),x=pc(E,d),b=pc(E,g),M=w=fc(m,_),T=S=fc(x,b),(w>dc||S>dc)&&(k=r*sc(l),C=r*ac(l),I=i*sc(s),D=i*ac(s),fdc){var X=pc(v,M),Y=pc(y,M),q=gc(I,D,A,L,r,X,h),Z=gc(k,C,P,O,r,Y,h);t.moveTo(u+q.cx+q.x0,c+q.cy+q.y0),M0&&t.arc(u+q.cx,c+q.cy,X,uc(q.y0,q.x0),uc(q.y1,q.x1),!h),t.arc(u,c,r,uc(q.cy+q.y1,q.cx+q.x1),uc(Z.cy+Z.y1,Z.cx+Z.x1),!h),Y>0&&t.arc(u+Z.cx,c+Z.cy,Y,uc(Z.y1,Z.x1),uc(Z.y0,Z.x0),!h))}else t.moveTo(u+A,c+L),t.arc(u,c,r,s,l,!h);else t.moveTo(u+A,c+L);if(i>dc&&R)if(T>dc){X=pc(d,T),q=gc(P,O,k,C,i,-(Y=pc(g,T)),h),Z=gc(A,L,I,D,i,-X,h);t.lineTo(u+q.cx+q.x0,c+q.cy+q.y0),T0&&t.arc(u+q.cx,c+q.cy,Y,uc(q.y0,q.x0),uc(q.y1,q.x1),!h),t.arc(u,c,i,uc(q.cy+q.y1,q.cx+q.x1),uc(Z.cy+Z.y1,Z.cx+Z.x1),h),X>0&&t.arc(u+Z.cx,c+Z.cy,X,uc(Z.y1,Z.x1),uc(Z.y0,Z.x0),!h))}else t.lineTo(u+P,c+O),t.arc(u,c,i,l,s,h);else t.lineTo(u+P,c+O)}else t.moveTo(u,c);t.closePath()}}}var yc=function(){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},mc=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new yc},e.prototype.buildPath=function(t,e){vc(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(nl);mc.prototype.type="sector";var _c=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},xc=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new _c},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}(nl);function bc(t,e,n){var r=e.smooth,i=e.points;if(i&&i.length>=2){if(r){var o=function(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;fGc[1]){if(i=!1,Uc.negativeSize||n)return i;var s=Hc(Gc[0]-Wc[1]),l=Hc(Wc[0]-Gc[1]);Fc(s,l)>Yc.len()&&(s=l||!Uc.bidirectional)&&(Se.scale(Xc,a,-l*r),Uc.useDir&&Uc.calcDirMTV()))}}return i},t.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var r=this._axes[t],i=this._origin,o=e[0].dot(r)+i[t],a=o,s=o,l=1;l0){var h={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,h):e.animateTo(n,h)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function Qc(t,e,n,r,i,o){$c("update",t,e,n,r,i,o)}function Jc(t,e,n,r,i,o){$c("enter",t,e,n,r,i,o)}function th(t){if(!t.__zr)return!0;for(var e=0;e=0?-e[i]:e[o]>=0?l+e[o]:ji(s)>1e-8?(l-a)*e[i]/s:0):t[n]-=e[i]}function xh(t){var e=t.itemTooltipOption,n=t.componentModel,r=t.itemName,i=Y(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&&E(H(l),function(t){xt(s,t)||(s[t]=l[t],s.$vars.push(t))});var u=Dl(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:r,option:A({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function bh(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function wh(t,e){if(t)if(U(t))for(var n=0;n-1?nf:of;function uf(t,e){t=t.toUpperCase(),sf[t]=new Jh(e),af[t]=e}uf(rf,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),uf(nf,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});function cf(){return null}function hf(t,e){var n=null,r=e.breakOption,i=e.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,t)),i}function ff(t){var e=t.brk;return e?e.breaks:[]}function pf(t){var e=t.brk;return!!e&&e.hasBreaks()}var df=1e3,gf=6e4,vf=36e5,yf=864e5,mf=31536e6,_f={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},xf={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},bf="{yyyy}-{MM}-{dd}",wf={year:"{yyyy}",month:"{yyyy}-{MM}",day:bf,hour:bf+" "+xf.hour,minute:bf+" "+xf.minute,second:bf+" "+xf.second,millisecond:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Sf=["year","month","day","hour","minute","second","millisecond"],Mf=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Tf(t){return Y(t)||X(t)?t:function(t){t=t||{};var e={},n=!0;return E(Sf,function(e){n&&(n=null==t[e])}),E(Sf,function(r,i){var o=t[r];e[r]={};for(var a=null,s=i;s>=0;s--){var l=Sf[s],u=j(o)&&!U(o)?o[l]:o,c=void 0;U(u)?a=(c=u.slice())[0]||"":Y(u)?c=[a=u]:(null==a?a=xf[r]:_f[l].test(a)||(a=e[l][l][0]+" "+a),c=[a],n&&(c[1]="{primary|"+a+"}")),e[r][l]=c}}),e}(t)}function kf(t,e){return"0000".substr(0,e-(t+="").length)+t}function Cf(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function If(t){return t===Cf(t)}function Df(t,e,n,r){var i=mo(t),o=i[Pf(n)](),a=i[Of(n)]()+1,s=Math.floor((a-1)/3)+1,l=i[Rf(n)](),u=i["get"+(n?"UTC":"")+"Day"](),c=i[Nf(n)](),h=(c-1)%12+1,f=i[Ef(n)](),p=i[Bf(n)](),d=i[zf(n)](),g=c>=12?"pm":"am",v=g.toUpperCase(),y=r instanceof Jh?r:function(t){return sf[t]}(r||lf)||sf[of],m=y.getModel("time"),_=m.get("month"),x=m.get("monthAbbr"),b=m.get("dayOfWeek"),w=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,kf(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,kf(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,kf(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,kf(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,kf(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,kf(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,kf(p,2)).replace(/{s}/g,p+"").replace(/{SSS}/g,kf(d,3)).replace(/{S}/g,d+"")}function Af(t,e){var n=mo(t),r=n[Of(e)]()+1,i=n[Rf(e)](),o=n[Nf(e)](),a=n[Ef(e)](),s=n[Bf(e)](),l=0===n[zf(e)](),u=l&&0===s,c=u&&0===a,h=c&&0===o,f=h&&1===i;return f&&1===r?"year":f?"month":h?"day":c?"hour":u?"minute":l?"second":"millisecond"}function Lf(t,e,n){switch(e){case"year":t[Vf(n)](0);case"month":t[Hf(n)](1);case"day":t[Wf(n)](0);case"hour":t[Gf(n)](0);case"minute":t[Uf(n)](0);case"second":t[Xf(n)](0)}return t}function Pf(t){return t?"getUTCFullYear":"getFullYear"}function Of(t){return t?"getUTCMonth":"getMonth"}function Rf(t){return t?"getUTCDate":"getDate"}function Nf(t){return t?"getUTCHours":"getHours"}function Ef(t){return t?"getUTCMinutes":"getMinutes"}function Bf(t){return t?"getUTCSeconds":"getSeconds"}function zf(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Ff(t){return t?"setUTCFullYear":"setFullYear"}function Vf(t){return t?"setUTCMonth":"setMonth"}function Hf(t){return t?"setUTCDate":"setDate"}function Wf(t){return t?"setUTCHours":"setHours"}function Gf(t){return t?"setUTCMinutes":"setMinutes"}function Uf(t){return t?"setUTCSeconds":"setSeconds"}function Xf(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Yf(t){if(!So(t))return Y(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}var qf=st,Zf=["a","b","c","d","e","f","g"],jf=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Kf(t,e,n){U(e)||(e=[e]);var r=e.length;if(!r)return"";for(var i=e[0].$vars||[],o=0;or||l.newline?(o=0,c=g,a+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(d?-d.y+f.y:0);(h=a+v)>i||l.newline?(o+=s+n,a=0,h=v,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=c+n:a=h+n)})}G(sp,"vertical"),G(sp,"horizontal");function lp(t,e){var n=function(t,e){var n,r,i=hp(t,e,{enableLayoutOnlyByCenter:!0}),o=t.getBoxLayoutParams();if(i.type===cp.point)r=i.refPoint,n=up(o,{width:e.getWidth(),height:e.getHeight()});else{var a=t.get("center"),s=U(a)?a:[a,a];n=up(o,i.refContainer),r=2===i.boxCoordFrom?i.refPoint:[oo(s[0],n.width)+n.x,oo(s[1],n.height)+n.y]}return{viewRect:n,center:r}}(t,e),r=n.viewRect,i=n.center,o=t.get("radius");U(o)||(o=[0,o]);var a=oo(r.width,e.getWidth()),s=oo(r.height,e.getHeight()),l=Math.min(a,s),u=oo(o[0],l/2),c=oo(o[1],l/2);return{cx:i[0],cy:i[1],r0:u,r:c,viewRect:r}}function up(t,e,n){n=qf(n||0);var r=e.width,i=e.height,o=oo(t.left,r),a=oo(t.top,i),s=oo(t.right,r),l=oo(t.bottom,i),u=oo(t.width,r),c=oo(t.height,i),h=n[2]+n[0],f=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=r-s-f-o),isNaN(c)&&(c=i-l-h-a),null!=p&&(isNaN(u)&&isNaN(c)&&(p>r/i?u=.8*r:c=.8*i),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(o)&&(o=r-s-u-f),isNaN(a)&&(a=i-l-c-h),t.left||t.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-f}switch(t.top||t.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-h}o=o||0,a=a||0,isNaN(u)&&(u=r-f-o-(s||0)),isNaN(c)&&(c=i-h-a-(l||0));var d=new Be((e.x||0)+o+n[3],(e.y||0)+a+n[0],u,c);return d.margin=n,d}var cp={rect:1,point:2};function hp(t,e,n){var r,i,o,a,s=t.boxCoordinateSystem;if(s){var l=np(t),u=l.coord,c=l.from;if(s.dataToLayout){o=cp.rect,a=c;var h=s.dataToLayout(u);r=h.contentRect||h.rect}else n&&n.enableLayoutOnlyByCenter&&s.dataToPoint&&(o=cp.point,a=c,i=s.dataToPoint(u))}return null==o&&(o=cp.rect),o===cp.rect&&(r||(r={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),i=[r.x+r.width/2,r.y+r.height/2]),{type:o,refContainer:r,refPoint:i,boxCoordFrom:a}}function fp(t){var e=t.layoutMode||t.constructor.layoutMode;return j(e)?e:e?{type:e}:null}function pp(t,e,n){var r=n&&n.ignoreSize;!U(r)&&(r=[r,r]);var i=a(ap[0],0),o=a(ap[1],1);function a(n,i){var o={},a=0,l={},u=0;if(ip(n,function(e){l[e]=t[e]}),ip(n,function(t){xt(e,t)&&(o[t]=l[t]=e[t]),s(o,t)&&a++,s(l,t)&&u++}),r[i])return s(e,n[1])?l[n[2]]=null:s(e,n[2])&&(l[n[1]]=null),l;if(2!==u&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=C(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",r=t+"Id";return Jo(this.ecModel,t,{index:this.get(n,!0),id:this.get(r,!0)},e)},e.prototype.getBoxLayoutParams=function(){return e=!1,{left:(t=this).getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)};var t,e},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=((r=e.prototype).type="component",r.id="",r.name="",r.mainType="",r.subType="",void(r.componentIndex=0)),e}(Jh);ma(vp,Jh),wa(vp),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var r=va(t);e[r.main]=n},t.determineSubType=function(n,r){var i=r.type;if(!i){var o=va(n).main;t.hasSubTypes(n)&&e[o]&&(i=e[o](r))}return i}}(vp),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,i,o){if(t.length){var a=function(t){var r={},i=[];return E(t,function(o){var a=n(r,o),s=function(t,e){var n=[];return E(t,function(t){P(e,t)>=0&&n.push(t)}),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&i.push(o),E(s,function(t){P(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(r,t);P(e.successor,t)<0&&e.successor.push(o)})}),{graph:r,noEntryList:i}}(r),s=a.graph,l=a.noEntryList,u={};for(E(t,function(t){u[t]=!0});l.length;){var c=l.pop(),h=s[c],f=!!u[c];f&&(i.call(o,c,h.originalDeps.slice()),delete u[c]),E(h.successor,f?d:p)}E(u,function(){var t="";throw new Error(t)})}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function d(t){u[t]=!0,p(t)}}}(vp,function(t){var e=[];E(vp.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=B(e,function(t){return va(t).main}),"dataset"!==t&&P(e,"dataset")<=0&&e.unshift("dataset");return e});var yp={color:{},darkColor:{},size:{}},mp=yp.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};for(var _p in I(mp,{primary:mp.neutral80,secondary:mp.neutral70,tertiary:mp.neutral60,quaternary:mp.neutral50,disabled:mp.neutral20,border:mp.neutral30,borderTint:mp.neutral20,borderShade:mp.neutral40,background:mp.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:mp.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:mp.neutral70,axisLineTint:mp.neutral40,axisTick:mp.neutral70,axisTickMinor:mp.neutral60,axisLabel:mp.neutral70,axisSplitLine:mp.neutral15,axisMinorSplitLine:mp.neutral05}),mp)if(mp.hasOwnProperty(_p)){var xp=mp[_p];"theme"===_p?yp.darkColor.theme=mp.theme.slice():"highlight"===_p?yp.darkColor.highlight="rgba(255,231,130,0.4)":0===_p.indexOf("accent")?yp.darkColor[_p]=lr(xp,null,function(t){return.5*t},function(t){return Math.min(1,1.3-t)}):yp.darkColor[_p]=lr(xp,null,function(t){return.9*t},function(t){return 1-Math.pow(t,1.5)})}yp.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var bp="";"undefined"!=typeof navigator&&(bp=navigator.platform||"");var wp="rgba(0, 0, 0, 0.2)",Sp=yp.color.theme[0],Mp=lr(Sp,null,null,.9),Tp={darkMode:"auto",colorBy:"series",color:yp.color.theme,gradientColor:[Mp,Sp],aria:{decal:{decals:[{color:wp,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:wp,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:wp,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:wp,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:wp,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:wp,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:bp.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},kp=1,Cp=2,Ip=3,Dp=Zo();function Ap(t,e,n){var r={},i=Pp(e);if(!i||!t)return r;var o,a,s=[],l=[],u=e.ecModel,c=Dp(u).datasetMap,h=i.uid+"_"+n.seriesLayoutBy;E(t=t.slice(),function(e,n){var i=j(e)?e:t[n]={name:e};"ordinal"===i.type&&null==o&&(o=n,a=d(i)),r[i.name]=[]});var f=c.get(h)||c.set(h,{categoryWayDim:a,valueWayDim:0});function p(t,e,n){for(var r=0;re)return t[r];return t[n-1]}(r,a):n;if((c=c||n)&&c.length){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}var Up="\0_ec_inner";var Xp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,r,i,o){r=r||{},this.option=null,this._theme=new Jh(r),this._locale=new Jh(i),this._optionManager=o},e.prototype.setOption=function(t,e,n){var r=Zp(e);this._optionManager.setOption(t,n,r),this._resetOption(null,r)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Zp(e))},e.prototype._resetOption=function(t,e){var n=!1,r=this._optionManager;if(!t||"recreate"===t){var i=r.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(i,e)):zp(this,i),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=r.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=r.getMediaOption(this);a.length&&E(a,function(t){n=!0,this._mergeOption(t,e)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=vt(),s=e&&e.replaceMergeMainTypeMap;Dp(this).datasetMap=vt(),E(t,function(t,e){null!=t&&(vp.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?k(t):C(n[e],t,!0))}),s&&s.each(function(t,e){vp.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))}),vp.topologicalTravel(o,vp.getAllClassMainTypes(),function(e){var o=function(t,e,n){var r=Np.get(e);if(!r)return n;var i=r(t);return i?n.concat(i):n}(this,e,Eo(t[e])),a=r.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=Ho(a,o,l);(function(t,e,n){E(t,function(t){var r=t.newOption;j(r)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,r){return e.type?e.type:n?n.subType:r.determineSubType(t,e)}(e,r,t.existing,n))})})(u,e,vp),n[e]=null,r.set(e,null),i.set(e,0);var c,h=[],f=[],p=0;E(u,function(t,n){var r=t.existing,i=t.newOption;if(i){var o="series"===e,a=vp.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(c)return void 0;c=!0}if(r&&r.constructor===a)r.name=t.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=I({componentIndex:n},t.keyInfo);I(r=new a(i,this,this,s),s),t.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(h.push(r.option),f.push(r),p++):(h.push(void 0),f.push(void 0))},this),n[e]=h,r.set(e,f),i.set(e,p),"series"===e&&Ep(this)},this),this._seriesIndices||Ep(this)},e.prototype.getOption=function(){var t=k(this.option);return E(t,function(e,n){if(vp.hasClass(n)){for(var r=Eo(e),i=r.length,o=!1,a=i-1;a>=0;a--)r[a]&&!Yo(r[a])?o=!0:(r[a]=null,!o&&i--);r.length=i,t[n]=r}}),delete t[Up],t},e.prototype.setTheme=function(t){this._theme=new Jh(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var r=n[e||0];if(r)return r;if(null==e)for(var i=0;i=e:"max"===n?t<=e:t===e})(r[a],t,o)||(i=!1)}}),i}var Qp=E,Jp=j,td=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function ed(t){var e=t&&t.itemStyle;if(e)for(var n=0,r=td.length;n0?t[n-1].seriesModel:null)}),function(t){E(t,function(e,n){var r=[],i=[NaN,NaN],o=[e.stackResultDimension,e.stackedOverDimension],a=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";a.modify(o,function(o,u,c){var h,f,p=a.get(e.stackedDimension,c);if(isNaN(p))return i;s?f=a.getRawIndex(c):h=a.get(e.stackedByDimension,c);for(var d=NaN,g=n-1;g>=0;g--){var v=t[g];if(s||(f=v.data.rawIndexOf(v.stackedByDimension,h)),f>=0){var y=v.data.getByRawIndex(v.stackResultDimension,f);if("all"===l||"positive"===l&&y>0||"negative"===l&&y<0||"samesign"===l&&p>=0&&y>0||"samesign"===l&&p<=0&&y<0){p=fo(p,y),d=y;break}}}return r[0]=p,r[1]=d,r})})}(t))})});var _d,xd,bd,wd,Sd,Md,Td=function(t){this.data=t.data||(t.sourceFormat===El?{}:[]),this.sourceFormat=t.sourceFormat||zl,this.seriesLayoutBy=t.seriesLayoutBy||Fl,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=p)}s[0]=l,s[1]=u}},r=function(){return this._data?this._data.length/this._dimSize:0};function i(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""}):void 0},t.prototype.getRawValue=function(t,e){return Xd(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function Zd(t){return new jd(t)}var jd=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var i=this.context;i.data=i.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var o,a=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;function c(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!r&&(o||f1&&r>0?s:a}};return o;function a(){return e=t?null:ot.g&&e>=t.ge&&e65535?ug:cg}function gg(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function vg(t,e,n,r,i){var o=pg[n||"float"];if(i){var a=t[e],s=a&&a.length;if(s!==r){for(var l=new o(r),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=B(o,function(t){return t.property}),u=0;uv[1]&&(v[1]=g)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;i=o-1}}return-1},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,r=this._count;if(n===Array){t=new n(r);for(var i=0;i=u&&_<=c||isNaN(_))&&(a[s++]=p),p++}f=!0}else if(2===i){d=h[r[0]];var v=h[r[1]],y=t[r[1]][0],m=t[r[1]][1];for(g=0;g=u&&_<=c||isNaN(_))&&(x>=y&&x<=m||isNaN(x))&&(a[s++]=p),p++}f=!0}}if(!f)if(1===i)for(g=0;g=u&&_<=c||isNaN(_))&&(a[s++]=b)}else for(g=0;gt[M][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return sv[1]&&(v[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,r,i,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),c=this.getRawIndex(0),h=new(dg(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));h[l++]=c;for(var f=1;fn&&(n=r,i=T)}M>0&&Ma&&(d=a-u);for(var g=0;gp&&(p=v,f=u+g)}var y=this.getRawIndex(c),m=this.getRawIndex(f);cu-p&&(s=u-p,a.length=s);for(var d=0;dc[1]&&(c[1]=v),h[f++]=y}return i._count=f,i._indices=h,i._updateGetRawIdx(),i},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,r=this._chunks,i=0,o=this.count();ih&&(h=p))}return a[l]=[c,h]},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],r=this._chunks,i=0;i=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,r){return $d(t[r],this._dimensions[r])}lg={arrayRows:t,objectRows:function(t,e,n,r){return $d(t[e],this._dimensions[r])},keyedColumns:t,original:function(t,e,n,r){var i=t&&(null==t.value?t:t.value);return $d(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(t,e,n,r){return t[r]}}}(),t}(),mg=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,r=this._getUpstreamSourceManagers(),i=!!r.length;if(xg(n)){var o=n,a=void 0,s=void 0,l=void 0;if(i){var u=r[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=$(a=o.get("data",!0))?Bl:Ol,e=[];var c=this._getSourceMetaRawOption()||{},h=l&&l.metaRawOption||{},f=it(c.seriesLayoutBy,h.seriesLayoutBy)||null,p=it(c.sourceHeader,h.sourceHeader),d=it(c.dimensions,h.dimensions);t=f!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||d?[Cd(a,{seriesLayoutBy:f,sourceHeader:p,dimensions:d},s)]:[]}else{var g=n;if(i){var v=this._applyTransform(r);t=v.sourceList,e=v.upstreamSignList}else{t=[Cd(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0);if(null!=i){var o="";1!==t.length&&bg(o)}var a,s=[],l=[];return E(t,function(t){t.prepareSource();var e=t.getSource(i||0),n="";null==i||e||bg(n),s.push(e),l.push(t._getVersionSign())}),r?e=function(t,e){var n=Eo(t),r=n.length,i="";r||Oo(i);for(var o=0,a=r;o1||f&&!c){var d=function(t,e,n,r,i){var o=e.getData(),a=z(t,function(t,e,n){var r=o.getDimensionInfo(n);return t||r&&!1!==r.tooltip&&null!=r.displayName},!1),s=[],l=[],u=[];function c(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(wg("nameValue",{markerType:"subItem",markerColor:i,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return r.length?E(r,function(t){c(Xd(o,n,t),t)}):E(t,c),{inlineValues:s,inlineValueTypes:l,blocks:u}}(h,o,a,u,p);e=d.inlineValues,n=d.inlineValueTypes,r=d.blocks,i=d.inlineValues[0]}else if(c){var g=l.getDimensionInfo(u[0]);i=e=Xd(l,a,u[0]),n=g.type}else i=e=f?h[0]:h;var v=Xo(o),y=v&&o.name||"",m=l.getName(a),_=s?y:m;return wg("section",{header:y,noHeader:s||!v,sortParam:i,blocks:[wg("nameValue",{markerType:"item",markerColor:p,name:_,noName:!ut(_),value:e,valueType:n,rawDataIndex:l.getRawIndex(a)})].concat(r||[])})}var Mg=Zo();function Tg(t,e){return t.getName(e)||t.getId(e)}var kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var r;return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=Zd({count:Ig,reset:Dg}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Mg(this).sourceManager=new mg(this)).prepareSource();var r=this.getInitialData(t,n);Lg(r,this),this.dataTask.context.data=r,Mg(this).dataBeforeProcessed=r,Cg(this),this._initSelectedMapFromData(r)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=fp(this),r=n?dp(t):{},i=this.subType;vp.hasClass(i)&&(i+="Series"),C(t,e.getTheme().get(this.subType)),C(t,this.getDefaultOption()),Bo(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&pp(t,r,n)},e.prototype.mergeOption=function(t,e){t=C(this.option,t,!0),this.fillDataTextStyle(t.data);var n=fp(this);n&&pp(this.option,t,n);var r=Mg(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(t,e);Lg(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Mg(this).dataBeforeProcessed=i,Cg(this),this._initSelectedMapFromData(i)},e.prototype.fillDataTextStyle=function(t){if(t&&!$(t))for(var e=["show"],n=0;n=0&&c<0)&&(u=m,c=y,h=0),y===c&&(l[h++]=d))}return l.length=h,l},e.prototype.formatTooltip=function(t,e,n){return Sg({series:this,dataIndex:t,multipleSeries:e})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(i.node&&(!t||!t.ssr))return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var r=this.ecModel,i=Hp.prototype.getColorFromPalette.call(this,t,e,n);return i||(i=r.getColorFromPalette(t,e,n)),i},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(e);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(i)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(e);return("all"===n||n[Tg(r,t)])&&!r.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,r,i=this.option,o=i.selectedMode,a=e.length;if(o&&a)if("series"===o)i.selectedMap="all";else if("multiple"===o){j(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,l=0;l0&&this._innerSelect(t,e)}},e.registerClass=function(t){return vp.registerClass(t)},e.protoInitialize=((r=e.prototype).type="series.__base__",r.seriesIndex=0,r.ignoreStyleOnData=!1,r.hasSymbolVisual=!1,r.defaultSymbol="circle",r.visualStyleAccessPath="itemStyle",void(r.visualDrawType="fill")),e}(vp);function Cg(t){var e=t.name;Xo(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),r=[];return E(n,function(t){var n=e.getDimensionInfo(t);n.displayName&&r.push(n.displayName)}),r.join(" ")}(t)||e)}function Ig(t){return t.model.getRawData().count()}function Dg(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Ag}function Ag(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Lg(t,e){E(yt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,G(Pg,e))})}function Pg(t,e){var n=Og(t);return n&&n.setOutputEnd((e||this).count()),e}function Og(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(t.uid))}return r}}R(kg,qd),R(kg,Hp),ma(kg,vp);var Rg=function(){function t(){this.group=new Bi,this.uid=ef("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,r){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,r){},t.prototype.updateLayout=function(t,e,n,r){},t.prototype.updateVisual=function(t,e,n,r){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function Ng(){var t=Zo();return function(e){var n=t(e),r=e.pipelineContext,i=!!n.large,o=!!n.progressiveRender,a=n.large=!(!r||!r.large),s=n.progressiveRender=!(!r||!r.progressiveRender);return!(i===a&&o===s)&&"reset"}}ya(Rg),wa(Rg);var Eg=Zo(),Bg=Ng(),zg=function(){function t(){this.group=new Bi,this.uid=ef("viewChart"),this.renderTask=Zd({plan:Hg,reset:Wg}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,r){0},t.prototype.highlight=function(t,e,n,r){var i=t.getData(r&&r.dataType);i&&Vg(i,r,"emphasis")},t.prototype.downplay=function(t,e,n,r){var i=t.getData(r&&r.dataType);i&&Vg(i,r,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,r){this.render(t,e,n,r)},t.prototype.updateVisual=function(t,e,n,r){this.render(t,e,n,r)},t.prototype.eachRendered=function(t){wh(this.group,t)},t.markUpdateMethod=function(t,e){Eg(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Fg(t,e,n){t&&Ru(t)&&("emphasis"===e?vu:yu)(t,n)}function Vg(t,e,n){var r=qo(t,e),i=e&&null!=e.highlightKey?function(t){var e=Ul[t];return null==e&&Gl<=32&&(e=Ul[t]=Gl++),e}(e.highlightKey):null;null!=r?E(Eo(r),function(e){Fg(t.getItemGraphicEl(e),n,i)}):t.eachItemGraphicEl(function(t){Fg(t,n,i)})}function Hg(t){return Bg(t.model)}function Wg(t){var e=t.model,n=t.ecModel,r=t.api,i=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=i&&Eg(i).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,r,i),Gg[l]}ya(zg),wa(zg);var Gg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};function Ug(t,e,n){var r,i,o,a,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,t.apply(o,a||[])}e=e||0;var f=function(){for(var t=[],f=0;f=0?h():c=setTimeout(h,-i),l=r};return f.clear=function(){c&&(clearTimeout(c),c=null)},f.debounceNextCall=function(t){s=t},f}var Xg=Zo(),Yg={itemStyle:Sa(Kh,!0),lineStyle:Sa(qh,!0)},qg={lineStyle:"stroke",itemStyle:"fill"};function Zg(t,e){var n=t.visualStyleMapper||Yg[e];return n||(console.warn("Unknown style type '"+e+"'."),Yg.itemStyle)}function jg(t,e){var n=t.visualDrawType||qg[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var Kg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),r=t.visualStyleAccessPath||"itemStyle",i=t.getModel(r),o=Zg(t,r)(i),a=i.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=jg(t,r),l=o[s],u=X(l)?l:null,c="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||c){var h=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=h,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||X(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||X(o.stroke)?h:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var r=t.getDataParams(n),i=I({},o);i[s]=u(r),e.setItemVisual(n,"style",i)}}}},$g=new Jh,Qg={createOnAllSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData){var n=t.getData(),r=t.visualStyleAccessPath||"itemStyle",i=Zg(t,r),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[r]){$g.option=n[r];var a=i($g);I(t.ensureUniqueItemVisual(e,"style"),a),$g.option.decal&&(t.setItemVisual(e,"decal",$g.option.decal),$g.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Jg={performRawSeries:!0,overallReset:function(t){var e=vt();t.eachSeries(function(t){if(!t.isColorBySeries()){var n=t.type+"-"+t.getColorBy();Xg(t).scope=e.get(n)||e.set(n,{})}}),t.eachSeries(function(t){if(!t.isColorBySeries()){var e=t.getRawData(),n={},r=t.getData(),i=Xg(t).scope,o=t.visualStyleAccessPath||"itemStyle",a=jg(t,o);r.each(function(t){var e=r.getRawIndex(t);n[e]=t}),e.each(function(o){var s=n[o];if(r.getItemVisual(s,"colorFromPalette")){var l=r.ensureUniqueItemVisual(s,"style"),u=e.getName(o)||o+"",c=e.count();l[a]=t.getColorFromPalette(u,i,c)}})}})}},tv=Math.PI;var ev=function(){function t(t,e,n,r){this._stageTaskMap=vt(),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?n.step:null,o=r&&r.modDataCount;return{step:i,modBy:null!=o?Math.ceil(o/i):null,modDataCount:o}}},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.__preparePipelineContext?t.__preparePipelineContext(e,n):fa(t,e,n);t.pipelineContext=n.context=r},t.prototype.restorePipelines=function(t,e){var n=this,r=n._pipelineMap=vt();e.eachSeries(function(e){var i="canvas"===t.painter.type&&e.getProgressive(),o=e.uid;r.set(o,{id:o,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(e,e.dataTask)})},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;E(this._allHandlers,function(r){var i=t.get(r.uid)||t.set(r.uid,{}),o="";lt(!(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))}E(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=vt(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||Zd({plan:av,reset:sv,count:cv}));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||Zd({reset:nv});o.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:i};var a=o.agentStubMap,s=o.agentStubMap=vt(),l=t.seriesType,u=t.getTargetSeries,c=t.dirtyOnOverallProgress,h=!1,f="";function p(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(h=!0,Zd({reset:rv,onDirty:ov})));n.context={model:t,dirtyOnOverallProgress:c},n.agent=o,n.__block=c,i._pipe(t,n)}lt(!t.createOnAllSeries,f),l?n.eachRawSeriesByType(l,p):u?u(n,r).each(p):E(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 X(t)&&(t={overallReset:t,seriesType:hv(t)}),t.uid=ef("stageHandler"),e&&(t.visualType=e),t},t}();function nv(t){t.overallReset(t.ecModel,t.api,t.payload)}function rv(t){return t.dirtyOnOverallProgress&&iv}function iv(){this.agent.dirty(),this.getDownstream().dirty()}function ov(){this.agent&&this.agent.dirty()}function av(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function sv(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Eo(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?B(e,function(t,e){return uv(e)}):lv}var lv=uv(0);function uv(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}(),Sv=["symbol","symbolSize","symbolRotate","symbolOffset"],Mv=Sv.concat(["symbolKeepAspect"]),Tv={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&&qv(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var r=null==e.x?0:e.x,i=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(r=r*n.width+n.x,i=i*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),r=qv(r)?r:0,i=qv(i)?i:1,o=qv(o)?o:0,a=qv(a)?a:0,t.createLinearGradient(r,o,i,a)}(t,e,n),i=e.colorStops,o=0;o0&&(e=r.lineDash,n=r.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:Z(e)?[e]:U(e)?e:null:null),o=r.lineDashOffset;if(i){var a=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(i=B(i,function(t){return t/a}),o/=a)}return[i,o]}var Qv=new Ns(!0);function Jv(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function ty(t){return"string"==typeof t&&"none"!==t}function ey(t){var e=t.fill;return null!=e&&"none"!==e}function ny(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 ry(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 iy(t,e,n){var r=Ia(e.image,e.__image,n);if(Aa(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)*wt),o.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(o)}return i}}var oy=["shadowBlur","shadowOffsetX","shadowOffsetY"],ay=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function sy(t,e,n,r,i){var o=!1;if(!r&&e===(n=n||{}))return!1;if(r||e.opacity!==n.opacity){cy(t,i),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Ka.opacity:a}(r||e.blend!==n.blend)&&(o||(cy(t,i),o=!0),t.globalCompositeOperation=e.blend||Ka.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[Ty])if(this._disposed)im(this.id);else{var r,i,o;if(j(e)&&(n=e.lazyUpdate,r=e.silent,i=e.replaceMerge,o=e.transition,e=e.notMerge),this[Ty]=!0,Qy(this),!this._model||e){var a=new Kp(this._api),s=this._theme,l=this._model=new Xp;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:i},um);var u={seriesTransition:o,optionChanged:!0};if(n)this[Cy]={silent:r,updateParams:u},this[Ty]=!1,this.getZr().wakeUp();else{try{Ry(this),By.update.call(this,null,u)}catch(t){throw this[Cy]=null,this[Ty]=!1,t}this._ssr||this._zr.flush(),this[Cy]=null,this[Ty]=!1,Hy.call(this,r),Wy.call(this,r)}}},e.prototype.setTheme=function(t,e){if(!this[Ty])if(this._disposed)im(this.id);else{var n=this._model;if(n){var r=e&&e.silent,i=null;this[Cy]&&(null==r&&(r=this[Cy].silent),i=this[Cy].updateParams,this[Cy]=null),this[Ty]=!0,Qy(this);try{this._updateTheme(t),n.setTheme(this._theme),Ry(this),By.update.call(this,{type:"setTheme"},i)}catch(t){throw this[Ty]=!1,t}this[Ty]=!1,Hy.call(this,r),Wy.call(this,r)}}},e.prototype._updateTheme=function(t){Y(t)&&(t=hm[t]),t&&((t=k(t))&&yd(t,!0),this._theme=t)},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||i.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(){var t=this._zr;return E(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,r=[],i=this;E(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 E(r,function(t){t.group.ignore=!1}),o}im(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(dm[n]){var a=o,s=o,l=-1/0,c=-1/0,h=[],f=t&&t.pixelRatio||this.getDevicePixelRatio();E(pm,function(o,u){if(o.group===n){var f=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(k(t)),p=o.getDom().getBoundingClientRect();a=r(p.left,a),s=r(p.top,s),l=i(p.right,l),c=i(p.bottom,c),h.push({dom:f,left:p.left,top:p.top})}});var p=(l*=f)-(a*=f),d=(c*=f)-(s*=f),g=u.createCanvas(),v=Wi(g,{renderer:e?"svg":"canvas"});if(v.resize({width:p,height:d}),e){var y="";return E(h,function(t){var e=t.left-a,n=t.top-s;y+=''+t.dom+""}),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new pl({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),E(h,function(t){var e=new sl({style:{x:t.left*f-a,y:t.top*f-s,image:t.dom}});v.add(e)}),v.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}im(this.id)},e.prototype.convertToPixel=function(t,e,n){return zy(this,"convertToPixel",t,e,n)},e.prototype.convertToLayout=function(t,e,n){return zy(this,"convertToLayout",t,e,n)},e.prototype.convertFromPixel=function(t,e,n){return zy(this,"convertFromPixel",t,e,n)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return E(Ko(this._model,t),function(t,r){r.indexOf("Models")>=0&&E(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;im(this.id)},e.prototype.getVisual=function(t,e){var n=Ko(this._model,t,{defaultMainType:"series"}),r=n.seriesModel;var i=r.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?i.indexOfRawIndex(n.dataIndex):null;return null!=o?function(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}(i,o,e):function(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}(i,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;E(rm,function(e){var n=function(n){var r,i=t.getModel(),o=n.target,a="globalout"===e;if(a?r={}:o&&Iv(o,function(t){var e=Dl(t);if(e&&null!=e.dataIndex){var n=e.dataModel||i.getSeriesByIndex(e.seriesIndex);return r=n&&n.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return r=I({},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)});var e=this._messageCenter;E(sm,function(n,r){e.on(r,function(e){t.trigger(r,e)})}),function(t,e,n){t.on("selectchanged",function(t){var r=n.getModel();t.isFromClick?(Cv("map","selectchanged",e,r,t),Cv("pie","selectchanged",e,r,t)):"select"===t.fromAction?(Cv("map","selected",e,r,t),Cv("pie","selected",e,r,t)):"unselect"===t.fromAction&&(Cv("map","unselected",e,r,t),Cv("pie","unselected",e,r,t))})}(e,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?im(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)im(this.id);else{this._disposed=!0,this.getDom()&&ta(this.getDom(),ym,"");var t=this,e=t._api,n=t._model;E(t._componentsViews,function(t){t.dispose(n,e)}),E(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete pm[t.id]}},e.prototype.resize=function(t){if(!this[Ty])if(this._disposed)im(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[Cy]&&(null==r&&(r=this[Cy].silent),n=!0,this[Cy]=null),this[Ty]=!0,Qy(this);try{n&&Ry(this),By.update.call(this,{type:"resize",animation:I({duration:0},t&&t.animation)})}catch(t){throw this[Ty]=!1,t}this[Ty]=!1,Hy.call(this,r),Wy.call(this,r)}}},e.prototype.showLoading=function(t,e){if(this._disposed)im(this.id);else if(j(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),fm[t]){var n=fm[t](this._api,e),r=this._zr;this._loadingFX=n,r.add(n)}},e.prototype.hideLoading=function(){this._disposed?im(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=I({},t);return e.type=am[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)im(this.id);else if(j(e)||(e={silent:!!e}),om[t.type]&&this._model)if(this[Ty])this._pendingActions.push(t);else{var n=e.silent;Vy.call(this,t,n);var r=e.flush;r?this._zr.flush():!1!==r&&i.browser.weChat&&this._throttledZrFlush(),Hy.call(this,n),Wy.call(this,n)}},e.prototype.updateLabelLayout=function(){Dv.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)im(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.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){for(var e=[],n=t.currentStates,r=0;r0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;n.eachRendered(function(t){if(t.states&&t.states.emphasis){if(th(t))return;if(t instanceof nl&&function(t){var e=Xl(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(i){t.stateTransition=a;var r=t.getTextContent(),o=t.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}})}Ry=function(t){var e;e=t._model,Pv(e).prepare={};var n=t._scheduler;n.restorePipelines(t._zr,t._model),n.prepareStageTasks(),Ny(t,!0),Ny(t,!1),n.plan()},Ny=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;lit(e.get("hoverLayerThreshold"),Tp.hoverLayerThreshold)&&!i.node&&!i.worker;(t._usingTHL||a)&&(e.eachSeries(function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered(function(t){var e=t.states.emphasis;e&&2!==e.hoverLayer&&(e.hoverLayer=a?1:0)})}}),t._usingTHL=a)}(t,e),Dv.trigger("series:afterupdate",e,n,l)},Ky=function(t){t[Iy]=!0,t.getZr().wakeUp()},Qy=function(t){t[ky]=(t[ky]+1)%1e6},$y=function(t){t[Iy]&&(t.getZr().storage.traverse(function(t){th(t)||e(t)}),t[Iy]=!1)},Zy=function(t){return new(function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return n(r,e),r.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},r.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},r.prototype.enterEmphasis=function(e,n){vu(e,n),Ky(t)},r.prototype.leaveEmphasis=function(e,n){yu(e,n),Ky(t)},r.prototype.enterBlur=function(e){!function(t){cu(t,ou)}(e),Ky(t)},r.prototype.leaveBlur=function(e){mu(e),Ky(t)},r.prototype.enterSelect=function(e){_u(e),Ky(t)},r.prototype.leaveSelect=function(e){xu(e),Ky(t)},r.prototype.getModel=function(){return t.getModel()},r.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},r.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},r.prototype.getECUpdateCycleVersion=function(){return t[ky]},r.prototype.usingTHL=function(){return t._usingTHL},r}(Wl))(t)},jy=function(t){function e(t,e){for(var n=0;n=0)){Lm.push(n);var a=ev.wrapStageHandler(n,i);a.__prio=e,a.__raw=n,t.push(a)}}function Om(t,e){fm[t]=e}function Rm(t,e,n){var r=Lv("registerMap");r&&r(t,e,n)}var Nm=function(t){var e=(t=k(t)).type,n="";e||Oo(n);var r=e.split(":");2!==r.length&&Oo(n);var i=!1;"echarts"===r[0]&&(e=r[1],i=!0),t.__isBuiltIn=i,og.set(e,t)};function Em(t,e,n,r){return{eventContent:{selected:Cu(n),isFromClick:e.isFromClick||!1}}}Am(wy,Kg),Am(Sy,Qg),Am(Sy,Jg),Am(wy,Tv),Am(Sy,kv),Am(7e3,by),wm(yd),Sm(900,md),Om("default",function(t,e){A(e=e||{},{text:"loading",textColor:yp.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:yp.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Bi,r=new pl({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(r);var i,o=new yl({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 pl({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((i=new Rc({shape:{startAngle:-tv/2,endAngle:-tv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*tv/2}).start("circularInOut"),i.animateShape(!0).when(1e3,{startAngle:3*tv/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}),Cm({type:jl,event:jl,update:jl},bt),Cm({type:Kl,event:Kl,update:Kl},bt),Cm({type:$l,event:tu,update:$l,action:bt,refineEvent:Em,publishNonRefinedEvent:!0}),Cm({type:Ql,event:tu,update:Ql,action:bt,refineEvent:Em,publishNonRefinedEvent:!0}),Cm({type:Jl,event:tu,update:Jl,action:bt,refineEvent:Em,publishNonRefinedEvent:!0}),bm("default",{}),bm("dark",bv);var Bm=[],zm={registerPreprocessor:wm,registerProcessor:Sm,registerPostInit:Mm,registerPostUpdate:Tm,registerUpdateLifecycle:km,registerAction:Cm,registerCoordinateSystem:Im,registerLayout:Dm,registerVisual:Am,registerTransform:Nm,registerLoading:Om,registerMap:Rm,registerImpl:function(t,e){Av[t]=e},PRIORITY:My,ComponentModel:vp,ComponentView:Rg,SeriesModel:kg,ChartView:zg,registerComponentModel:function(t){vp.registerClass(t)},registerComponentView:function(t){Rg.registerClass(t)},registerSeriesModel:function(t){kg.registerClass(t)},registerChartView:function(t){zg.registerClass(t)},registerCustomSeries:function(t,e){},registerSubTypeDefaulter:function(t,e){vp.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Gi(t,e)}};function Fm(t){U(t)?E(t,function(t){Fm(t)}):P(Bm,t)>=0||(Bm.push(t),X(t)&&(t={install:t}),t.install(zm))}function Vm(t){return null==t?0:t.length||1}function Hm(t){return t}var Wm=function(){function t(t,e,n,r,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Hm,this._newKeyGetter=r||Hm,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 Jm,t_,e_,n_,r_,i_,o_,a_=j,s_=B,l_="undefined"==typeof Int32Array?Array:Int32Array,u_=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],c_=["_approximateExtent"],h_=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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r=!1;jm(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.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===Ol&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,r=n[t];r||(r=n[t]={});var i=r[e];return null==i&&(U(i=this.getVisual(e))?i=i.slice():a_(i)&&(i=I({},i)),r[e]=i),i},t.prototype.setItemVisual=function(t,e,n){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,a_(e)?I(r,e):r[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){a_(t)?I(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?I(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){!function(t,e,n,r){if(r){var i=Dl(r);i.dataIndex=n,i.dataType=e,i.seriesIndex=t,i.ssrType="chart","group"===r.type&&r.traverse(function(r){var i=Dl(r);i.seriesIndex=t,i.dataIndex=n,i.dataType=e,i.ssrType="chart"})}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){E(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:s_(this.dimensions,this._getDimInfo,this),this.hostModel)),r_(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];X(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(at(arguments)))})},t.internalField=(Jm=function(t){var e=t._invertedIndicesMap;E(e,function(n,r){var i=t._dimInfos[r],o=i.ordinalMeta,a=t._store;if(o){n=e[r]=new l_(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),r[e]=s}})),t}();function f_(t,e){kd(t)||(t=Id(t));var n=(e=e||{}).coordDimensions||[],r=e.dimensionsDefine||t.dimensionsDefine||[],i=vt(),o=[],a=function(t,e,n,r){var i=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,r||0);return E(e,function(t){var e;j(t)&&(e=t.dimsDef)&&(i=Math.max(i,e.length))}),i}(t,n,r,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Qm(a),l=r===t.dimensionsDefine,u=l?$m(t):Km(r),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,a));for(var h=vt(c),f=new hg(a),p=0;p0&&(t.name=t.name+(e-1))}),new Zm({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function p_(t,e,n){if(n||e.hasKey(t)){for(var r=0;e.hasKey(t+r);)r++;t+=r}return e.set(t,!0),t}var d_=function(t){this.coordSysDims=[],this.axisMap=vt(),this.categoryAxisMap=vt(),this.coordSysName=t};var g_={cartesian2d:function(t,e,n,r){var i=t.getReferringComponents("xAxis",Qo).models[0],o=t.getReferringComponents("yAxis",Qo).models[0];e.coordSysDims=["x","y"],n.set("x",i),n.set("y",o),v_(i)&&(r.set("x",i),e.firstCategoryDimIndex=0),v_(o)&&(r.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,r){var i=t.getReferringComponents("singleAxis",Qo).models[0];e.coordSysDims=["single"],n.set("single",i),v_(i)&&(r.set("single",i),e.firstCategoryDimIndex=0)},polar:function(t,e,n,r){var i=t.getReferringComponents("polar",Qo).models[0],o=i.findAxisModel("radiusAxis"),a=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),v_(o)&&(r.set("radius",o),e.firstCategoryDimIndex=0),v_(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();E(o.parallelAxisIndex,function(t,o){var s=i.getComponent("parallelAxis",t),l=a[o];n.set(l,s),v_(s)&&(r.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))})},matrix:function(t,e,n,r){var i=t.getReferringComponents("matrix",Qo).models[0];e.coordSysDims=["x","y"];var o=i.getDimensionModel("x"),a=i.getDimensionModel("y");n.set("x",o),n.set("y",a),r.set("x",o),r.set("y",a)}};function v_(t){return"category"===t.get("type")}function y_(t,e,n){var r,i,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(t){return!jm(t.schema)}(e)?(i=e.schema,r=i.dimensions,o=e.store):r=e;var l,u,c,h,f=!(!t||!t.get("stack")),p=!0;function d(t){return"ordinal"!==t.type&&"time"!==t.type}if(E(r,function(t,e){Y(t)&&(r[e]=t={name:t}),d(t)||(p=!1)}),E(r,function(t,e){f&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||!d(t)||p&&("x"===t.coordDim||"angle"===t.coordDim)||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 g=u.coordDim,v=u.type,y=0;E(r,function(t){t.coordDim===g&&y++});var m={name:c,coordDim:g,coordDimIndex:y,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},_={name:h,coordDim:h,coordDimIndex:y+1,type:v,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};i?(o&&(m.storeDimIndex=o.ensureCalculationDimension(h,v),_.storeDimIndex=o.ensureCalculationDimension(c,v)),i.appendCalculationDimension(m),i.appendCalculationDimension(_)):(r.push(m),r.push(_))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function m_(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function __(t,e){return m_(t,e)?t.getCalculationInfo("stackResultDimension"):e}function x_(t,e,n){n=n||{};var r,i=e.getSourceManager(),o=!1;t?(o=!0,r=Id(t)):o=(r=i.getSource()).sourceFormat===Ol;var a=function(t){var e=t.get("coordinateSystem"),n=new d_(e),r=g_[e];if(r)return r(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=function(t,e){var n,r=t.get("coordinateSystem"),i=tp.get(r);return e&&e.coordSysDims&&(n=B(e.coordSysDims,function(t){var n={name:t},r=e.axisMap.get(t);if(r){var i=r.get("type");n.type=function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}(i)}return n})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}(e,a),l=n.useEncodeDefaulter,u=X(l)?l:l?G(Ap,s,e):null,c=f_(r,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),h=function(t,e,n){var r,i;return n&&E(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}(c.dimensions,n.createInvertedIndices,a),f=o?null:i.getSharedDataStore(c),p=y_(e,{schema:c,store:f}),d=new h_(c,e);d.setCalculationInfo(p);var g=null!=h&&function(t){if(t.sourceFormat===Ol){return!U(Fo(function(t){var e=0;for(;e=e[0]&&t<=e[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(t){return this._extents[t]},setExtent:function(t,e){O_(this._extents,0,t,e)},setExtent2:function(t,e,n){var r=this._extents;r[t]||(r[t]=r[0].slice()),O_(r,t,e,n)},freeze:function(){0}};function O_(t,e,n,r){aa(n,r)&&(t[e][0]=n,t[e][1]=r)}function R_(t){return N_(t)||B_(t)}function N_(t){return"interval"===t.type}function E_(t){return"time"===t.type}function B_(t){return"log"===t.type}function z_(t){return"ordinal"===t.type}function F_(t){var e=xo(t),n=Ji(10,e),r=Ki(t/n);return r?2===r?r=3:3===r?r=5:r*=2:r=1,so(r*n,-e)}function V_(t){return uo(t)+2}function H_(t,e){return to(t)/to(e)}function W_(t,e,n){var r=n&&n.lookup;if(r)for(var i=0;i1&&o/a>2&&(i=Math.round(Math.ceil(i/a)*a)),i!==r[0]&&l(r[0],!0,!0);for(var s=i;s<=r[1];s+=a)l(s,!1,s===r[0]||s===r[1]);function l(t,e,r){n({value:t,offInterval:e},r)}s-a!==r[1]&&l(r[1],!0,!0)}var Y_=function(t){function e(n){var r=t.call(this)||this;r.type="ordinal",r.parse=e.parse,C_(r,e.decoratedMethods);var i=n.ordinalMeta;i||(i=new S_({})),U(i)&&(i=new S_({categories:B(i,function(t){return j(t)?t.value:t})})),r._ordinalMeta=i;var o=k_(null,0,n.extent||[0,i.categories.length-1]);return r._mapper=o.mapper,I_(r,o.mapper),r}return n(e,t),e.parse=function(t){return null==t?t=NaN:Y(t)?null==(t=this._ordinalMeta.getOrdinal(t))&&(t=NaN):t=Ki(t),t},e.prototype.getTicks=function(){var t=[];return X_(this,0,function(e){t.push(e)}),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=qi(o,e.length);i=0&&t=0&&t=0&&ta[0]&&di[1]||!isFinite(f)||!isFinite(i[1]))break}else{if(p>h)break;f=qi(f,i[1]),p===h&&(f=i[1])}if(u.push({value:f}),f=so(f+n,o),s){var d=s.calcNiceTickMultiple(f,c);d>=0&&(f=so(f+d*n,o))}if(u.length>0&&f===u[u.length-1].value)break;if(u.length>3e3)return[]}var g=u.length?u[u.length-1].value:i[1];return r[1]>g&&u.push({value:t.expandToNicedExtent?so(g+n,o):r[1]}),u},e.prototype.getMinorTicks=function(t){return q_(this,t,ff(this),this._cfg.interval)},e.prototype.getLabel=function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=uo(t.value)||0:"auto"===n&&(n=this._cfg.intervalPrecision),Yf(so(t.value,n,!0))},e.type="interval",e}(b_);b_.registerClass(Z_);var j_=function(t){function e(n){var r=t.call(this)||this;r.type="time",r.parse=e.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0;hf(r,n);var i=k_(r,0,null);return r.brk=i.brk,r}return n(e,t),e.prototype.getLabel=function(t){return Df(t.value,wf[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Cf(this._minLevelUnit))]||wf.second,this._useUTC,this._locale)},e.prototype.getFormattedLabel=function(t,e,n){return function(t,e,n,r,i){var o=null;if(Y(n))o=n;else if(X(n)){var a={time:t.time,level:t.time?t.time.level:0},s=null;s&&s.makeAxisLabelFormatterParamBreak(a,t.break),o=n(t.value,e,a)}else{var l=t.time;if(l){var u=n[l.lowerTimeUnit][l.upperTimeUnit];o=u[Math.min(l.level,u.length-1)]||""}else{var c=Af(t.value,i);o=n[c][c][0]}}return Df(new Date(t.value),o,i,r)}(t,e,n,this._locale,this._useUTC)},e.prototype.getTicks=function(t){var e=this._interval,n=D_(this),r=this.brk,i=[];if(!e)return i;var o=this._useUTC;i=function(t,e,n,r,i,o){var a=3e3,s=Mf,l=0;function u(t,e,n,i,s,u,c){for(var h=function(t,e){var n=new Date(0);n[t](1);var r=n.getTime();n[t](1+e);var i=n.getTime()-r;return function(t,e){return Math.max(0,Math.round((e-t)/i))}}(s,t),f=e,p=new Date(f);fa){0;break}if(p[s](p[i]()+t),f=p.getTime(),o){var d=o.calcNiceTickMultiple(f,h);d>0&&(p[s](p[i]()+d*t),f=p.getTime())}}c.push({value:f,notAdd:f>r[1]})}function c(t,i,o){var a=[],s=!i.length;if(!function(t,e,n,r){return Lf(new Date(e),t,r).getTime()===Lf(new Date(n),t,r).getTime()}(Cf(t),r[0],r[1],n)){s&&(i=[{value:nx(r[0],t,n)},{value:r[1]}]);for(var l=0;l=r[0]&&c<=r[1]&&u(f,c,h,p,d,g,a),"year"===t&&o.length>1&&0===l&&o.unshift({value:o[0].value-f})}}for(l=0;l=r[0]&&_<=r[1]&&p++)}var x=i/e;if(p>1.5*x&&d>x/1.5)break;if(h.push(y),p>x||t===s[g])break}f=[]}}var b=F(B(h,function(t){return F(t,function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd})}),function(t){return t.length>0}),w=b.length-1,S=[];for(g=0;gr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:D,lowerTimeUnit:D},notNice:!0});(!I||I.value16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Q_(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function J_(t){return(t/=vf)>12?12:t>6?6:t>3.5?4:t>2?2:1}function tx(t,e){return(t/=e?gf:df)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function ex(t){return Zi(bo(t,!0),1)}function nx(t,e,n){var r=Math.max(0,P(Sf,e)-1);return Lf(new Date(t),Sf[r],n).getTime()}b_.registerClass(j_);var rx=function(t){function e(n){var r=t.call(this)||this;r.type="log",r.parse=Z_.parse,r.base=n.logBase||10;var i=[],o=[],a=r._lookup={from:i,to:o};i[0]=i[1]=o[0]=o[1]=NaN,C_(r,e.mapperMethods);n.breakOption;var s={lookup:a};return r.powStub=new Z_({breakParsed:s.original}),r.intervalStub=new Z_({breakParsed:s.transformed}),I_(r,r.intervalStub),r}return n(e,t),e.prototype.getTicks=function(t){var e=this.base,n=this.powStub,r=this.intervalStub,i={lookup:{from:r.getExtent(),to:n.getExtent()}};return B(r.getTicks(t||{}),function(t){return{value:W_(t.value,e,i),break:void 0}},this)},e.prototype.getMinorTicks=function(t){return q_(this,t,ff(this.powStub),this.intervalStub.getConfig().interval)},e.prototype.getLabel=function(t,e){return this.intervalStub.getLabel(t,e)},e.type="log",e.mapperMethods={needTransform:function(){return!0},normalize:function(t){return this.intervalStub.normalize(H_(t,this.base))},scale:function(t){return W_(this.intervalStub.scale(t),this.base,null)},transformIn:function(t,e){return t=H_(t,this.base),e&&2===e.depth?t:this.intervalStub.transformIn(t,e)},transformOut:function(t,e){var n=e?e.depth:null;return ix.depth=n,ox.lookup=this._lookup,W_(2===n?t:this.intervalStub.transformOut(t,ix),this.base,ox)},contain:function(t){return this.powStub.contain(t)},setExtent:function(t,e){this.setExtent2(0,t,e)},setExtent2:function(t,e,n){if(!(!aa(e,n)||e<=0||n<=0)){var r=ax,i=ax;if(0===t){var o=this._lookup;r=o.to,i=o.from}this.powStub.setExtent2(t,r[0]=e,r[1]=n);var a=this.base;this.intervalStub.setExtent2(t,i[0]=H_(e,a),i[1]=H_(n,a))}},getFilter:function(){return{g:0}},sanitize:function(t,e){return aa(e[0],e[1])&&Co(t)&&t<=0&&(t=e[0]),t},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(t,e){return null===e?this.powStub.getExtentUnsafe(t,null):this.intervalStub.getExtentUnsafe(t,e)}},e}(b_);b_.registerClass(rx);var ix={},ox={},ax=[],sx={value:1,category:1,time:1,log:1},lx=Zo();function ux(t){var e=t.get("type");return null!=e&&(xt(sx,e)||b_.getClass(e))||(e="value"),e}function cx(t,e,n){var r;switch(e){case"category":return new Y_({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new j_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC"),breakOption:r});case"log":return new rx({logBase:t.get("logBase"),breakOption:r});case"value":return new Z_({breakOption:r});default:return new(b_.getClass(e)||Z_)({})}}var hx=1,fx=2,px=3;function dx(t){var e=t.getLabelModel().get("formatter");if("time"===t.type){var n=Tf(e);return function(e,r){return t.scale.getFormattedLabel(e,r,n)}}if(Y(e))return function(n){var r=t.scale.getLabel(n);return e.replace("{value}",null!=r?r:"")};if(X(e)){if("category"===t.type)return function(n,r){return e(gx(t,n),n.value-t.scale.getExtent()[0],null)};var r=null;return function(n,i){var o=null;return r&&(o=r.makeAxisLabelFormatterParamBreak(o,n.break)),e(gx(t,n),i,o)}}return function(e){return t.scale.getLabel(e)}}function gx(t,e){var n=t.scale;return z_(n)?n.getLabel(e):e.value}function vx(t){var e=t.get("interval");return null==e?"auto":e}function yx(t){return"middle"===t||"center"===t}function mx(t){return t.getShallow("show")}function _x(t,e,n){t.get("breaks",!0)}function xx(t,e,n,r,i,o){var a,s,l=B_(t),u=l?t.intervalStub:t;if(u.setExtent(r[0],r[1]),l){var c=t.powStub,h={depth:2},f=t.transformOut(r[0],h),p=t.transformOut(r[1],h),d=(s=r,[(a=n)[0]!==s[0],a[1]!==s[1]]);e[0]&&!d[0]&&(f=i[0]),e[1]&&!d[1]&&(p=i[1]),c.setExtent(f,p)}u.setConfig(o)}function bx(t,e){return z_(t)?t.getRawOrdinalNumber(e.value):e.value}function Sx(t,e){return z_(t)&&!!e.get("boundaryGap")}var Mx=function(){function t(){}return t.prototype.needIncludeZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),Tx=sa(),kx="|&",Cx=Zo(),Ix=Zo();function Dx(t,e){var n=t.model,r=Cx(Ov(n.ecModel)).keyed,i=r&&r.get(e);return i&&i.get(n.uid)}function Ax(t,e){return Px(Dx(t,e))}function Lx(t,e){var n=Cx(Ov(t)).keyed;n&&n.each(function(t,n){t.each(function(t,r){e(t,n,r)})})}function Px(t){return{liPosMinGap:t?t.liPosMinGap:void 0}}function Ox(t,e,n){var r=Dx(t,e);r&&Rx(t.model.ecModel,r.sers,n)}function Rx(t,e,n){if(e)for(var r=0;r=0}(u)||(u[0]=u[1]=NaN);var c=[],h=[!1,!1],f=e.get("min",!0);"dataMin"===f?(c[0]=u[0],h[0]=!0):(c[0]=Ux(t,X(f)?f({min:u[0],max:u[1]}):f),h[0]=null!=c[0]);var p=e.get("max",!0);"dataMax"===p?(c[1]=u[1],h[1]=!0):(c[1]=Ux(t,X(p)?p({min:u[0],max:u[1]}):p),h[1]=null!=c[1]);var d=function(t,e){var n;if(z_(t))n=[0,0];else{var r=e.get("boundaryGap");"boolean"==typeof r&&(r=null),n=U(r)?r:[r,r]}return[Xx(n[0]),Xx(n[1])]}(t,e),g=a?null:u[1]-u[0]||Math.abs(u[0]);null==c[0]&&(c[0]=a?o?u[0]:s?0:NaN:u[0]-d[0]*g),null==c[1]&&(c[1]=a?o?u[1]:s?s-1:NaN:u[1]+d[1]*g),!oa(c[0])&&(c[0]=NaN),!oa(c[1])&&(c[1]=NaN);var v=o||nt(c[0])||nt(c[1])||a&&!s,y=N_(t),m=y&&e.needIncludeZero&&e.needIncludeZero();m&&(c[0]>0&&c[1]>0&&!h[0]&&(c[0]=0),c[0]<0&&c[1]<0&&!h[1]&&(c[1]=0));var _=!1;c[0]>c[1]&&(c.reverse(),_=!0);var x=Ux(t,e.get("startValue",!0)),b=null!=x;!Co(x)&&r&&(x=t.getDefaultStartValue?t.getDefaultStartValue():0),Co(x)&&(b||!y||m)&&(xc[1]&&!h[1]&&(c[1]=x,h[1]=!0)),Gx(this._i={scale:t,dataMM:u,noZoomEffMM:c,zoomMM:[],fixMM:h,zoomFixMM:[!1,!1],startValue:x,isBlank:v,incl0:m,tggAxInv:_,ctnShp:i},c)}return t.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},t.prototype.makeFinal=function(){var t=this._i,e=t.zoomMM,n=t.noZoomEffMM,r=t.zoomFixMM,i=t.fixMM,o={fixMM:i,zoomFixMM:r,isBlank:t.isBlank,incl0:t.incl0,tggAxInv:t.tggAxInv,ctnShp:t.ctnShp,effMM:n.slice()},a=o.effMM;return null!=e[0]&&(a[0]=e[0],i[0]=r[0]=!0),null!=e[1]&&(a[1]=e[1],i[1]=r[1]=!0),Gx(t,a),o},t.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},t.prototype.setZoomMM=function(t,e){this._i.zoomMM[t]=e},t}();function Gx(t,e){var n,r=t.scale,i=t.dataMM;r.sanitize&&(e[0]=r.sanitize(e[0],i),e[1]=r.sanitize(e[1],i),aa((n=e)[0],n[1])&&n[0]>n[1]&&(n[0]=n[1]))}function Ux(t,e){return null==e?null:nt(e)?NaN:t.parse(e)}function Xx(t){return bi("boolean"==typeof t?0:t,1)||0}function Yx(t){var e=Hx(t.scale);return e.extent||(e.extent=[1/0,-1/0]),e}function qx(t,e){var n=t.scale,r=t.model,i=t.dim;n.rawExtentInfo||function(t,e,n,r,i){var o=Yx(e),a=o.extent,s=!1;!function(t,e){var n=t.model.ecModel,r=Cx(Ov(n)).axSer;r&&Rx(n,r.get(t.model.uid),e)}(e,function(r){if(r.boxCoordinateSystem){var i=np(r).coord,l=o.dimIdxInCoord;if(l>=0){if(U(i)){var u=i[l];null==u||U(u)||na(a,t.parse(u))}}else 0}else if(r.coordinateSystem){var c=r.getData();if(c){var h=t.getFilter?t.getFilter():null;E(function(t,e){var n={};return E(t.mapDimensionsAll(e),function(e){n[__(t,e)]=!0}),H(n)}(c,n),function(t){var e,n;e=a,aa((n=c.getApproximateExtent(t,h))[0],n[1])&&(n[0]e[1]&&(e[1]=n[1]))})}r.__requireStartValue&&r.__requireStartValue(e)&&(s=!0)}});var l=function(t,e,n){var r=Sx(t,n),i=n.get("containShape",!0);null!=i||r||(i=!0);if(!i)return!1;var o=!1;return Nx(e,function(t){o=!!jx.get(t)||o}),o}(t,e,r),u=new Wx(t,r,a,s,l);Zx(t,u,i),o.extent=null}(n,t,i,r,e)}function Zx(t,e,n){t.rawExtentInfo=e,e.from=n}var jx=vt();function Kx(t,e,n,r,i){t.rawExtentInfo||function(t,e){var n=t.scale;Zx(n,new Wx(n,t.model,e,!1,!1),3)}({scale:t,model:e},i||[1/0,-1/0]);var o=t.rawExtentInfo.makeFinal(),a=o.effMM;return t.setExtent(a[0],a[1]),t.setBlank(o.isBlank),r&&o.tggAxInv&&n&&!n.get("legacyMinMaxDontInverseAxis")&&(r.inverse=!r.inverse),o}function $x(t,e,n,r){var i;if(n.ctnShp&&(Nx(t,function(e){var n=jx.get(e);if(n){var o=n(t,r);o&&(ra(i=i||[0,0],o[0]),ia(i,o[1]),function(t){lx(t).noOnMyZero=!0}(t))}}),i)){var o=e.getExtent();if(z_(e))t.onBand||e.setExtent2(1,qi(o[0],o[0]+i[0]),Zi(o[1],o[1]+i[1]));else{var a=o.slice();n.zoomFixMM[0]||(a[0]=qi(a[0],e.transformOut(e.transformIn(a[0],null)+i[0],null))),n.zoomFixMM[1]||(a[1]=Zi(a[1],e.transformOut(e.transformIn(a[1],null)+i[1],null))),(a[0]o[1])&&e.setExtent2(1,a[0],a[1])}}}function Qx(t,e){var n=B_(t),r=n?t.intervalStub:t,i=e.fixMinMax||[],o=n?t.getExtent():null,a=r.getExtent(),s=G_(a,i,e.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var l=n?function(t,e){var n=U_(e.splitNumber,10),r=t.getExtent(),i=L_(t);0;var o=Zi(_o(i),1);n/i*o<=.5&&(o*=10);var a=V_(o),s=[so(Qi(r[0]/o)*o,a),so($i(r[1]/o)*o,a)];return{intervalPrecision:a,interval:o,niceExtent:s}}(r,e):function(t,e){var n=U_(e.splitNumber,5),r=L_(t);0;var i=e.minInterval,o=e.maxInterval,a=bo(r/n,!0);null!=i&&ao&&(a=o);var s=V_(a),l=t.getExtent(),u=[so(Qi(l[0]/a)*a,s),so($i(l[1]/a)*a,s)];return{interval:a,intervalPrecision:s,niceExtent:u}}(r,e),u=l.intervalPrecision,c=l.interval,h=e.userInterval;null!=h&&(l.interval=h,l.intervalPrecision=V_(h)),i[0]||(s[0]=so($i(s[0]/c)*c,u)),i[1]||(s[1]=so(Qi(s[1]/c)*c,u)),null!=h&&(l.niceExtent=s.slice()),xx(t,i,a,s,o,l)}function Jx(t){var e=t.scale,n=t.model,r=n.axis,i=n.ecModel;tb(e,n,r,i,null)}function tb(t,e,n,r,i){var o=Kx(t,e,r,n,i),a=N_(t)||E_(t);!function(t,e){eb[t.type](t,e)}(t,{splitNumber:e.get("splitNumber"),fixMinMax:o.fixMM,userInterval:e.get("interval"),minInterval:a?e.get("minInterval"):null,maxInterval:a?e.get("maxInterval"):null,rawExtentResult:o}),n&&r&&$x(n,t,o,r)}var eb={interval:Qx,log:Qx,time:function(t,e){var n=t.getExtent();if(n[0]===n[1]&&(n[0]-=yf,n[1]+=yf),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-yf}t.setExtent(n[0],n[1]);var i=U_(e.splitNumber,10),o=L_(t)/i,a=e.minInterval,s=e.maxInterval;null!=a&&os&&(o=s);var l=K_.length,u=Math.min(function(t,e,n,r){for(;n>>1;t[i][1]n&&(t=i,n=a)}if(t)return function(t){for(var e=0,n=0,r=0,i=t.length,o=t[i-1][0],a=t[i-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),i=s+=i,o=l+=o,r.push([s/n,l/n])}return r}function gb(t,e){return B(F((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;return null==n&&(n=1024),E(e.features,function(t){var e=t.geometry,r=e.encodeOffsets,i=e.coordinates;if(r)switch(e.type){case"LineString":e.coordinates=db(i,r,n);break;case"Polygon":case"MultiLineString":pb(i,r,n);break;case"MultiPolygon":E(i,function(t,e){return pb(t,r[e],n)})}}),e.UTF8Encoding=!1,e}(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 cb(o[0],o.slice(1)));break;case"MultiPolygon":E(r.coordinates,function(t){t[0]&&i.push(new cb(t[0],t.slice(1)))});break;case"LineString":i.push(new hb([r.coordinates]));break;case"MultiLineString":i.push(new hb(r.coordinates))}var a=new fb(n[e||"name"],i,n.cp);return a.properties=n,a})}var vb=Object.freeze({__proto__:null,linearMap:io,round:function(t,e,n){return null==e&&(e=10),so(t,e,n)},asc:lo,getPrecision:uo,getPrecisionSafe:co,getPixelPrecision:function(t,e){var n=$i(to(t[1]-t[0])/eo),r=Ki(to(ji(e[1]-e[0]))/eo),i=qi(Zi(-n+r,0),20);return isFinite(i)?i:20},getPercentWithPrecision:function(t,e,n){return t[e]&&ho(t,n)[e]||0},parsePercent:oo,MAX_SAFE_INTEGER:po,remRadian:go,isRadianAroundZero:vo,parseDate:mo,quantity:_o,quantityExponent:xo,nice:bo,quantile:function(t,e){var n=(t.length-1)*e+1,r=$i(n),i=+t[r-1],o=n-r;return o?i+o*(t[r]-i):i},reformIntervals:function(t){t.sort(function(t,e){return s(t,e,0)?-1:1});for(var e=-1/0,n=1,r=0;r=n&&o>=i)return{x:n,y:i,width:r-n,height:o-i}},registerShape:uh,getShapeClass:function(t){if(oh.hasOwnProperty(t))return oh[t]},Group:Bi,Image:sl,Text:yl,Circle:ec,Ellipse:rc,Sector:mc,Ring:xc,Polygon:Sc,Polyline:Tc,Rect:pl,Line:Ic,BezierCurve:Pc,Arc:Rc,IncrementalDisplayable:jc,CompoundPath:Nc,LinearGradient:Bc,RadialGradient:zc,BoundingRect:Be}),_b=Object.freeze({__proto__:null,addCommas:Yf,toCamelCase:function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},normalizeCssArray:qf,encodeHTML:ne,formatTpl:Kf,getTooltipMarker:function(t,e){var n=Y(t)?{color:t,extraCssText:e}:t||{},r=n.color,i=n.type;e=n.extraCssText;var o=n.renderMode||"html";return r?"html"===o?"subItem"===i?'':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""},formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var r=mo(e),i=n?"getUTC":"get",o=r[i+"FullYear"](),a=r[i+"Month"]()+1,s=r[i+"Date"](),l=r[i+"Hours"](),u=r[i+"Minutes"](),c=r[i+"Seconds"](),h=r[i+"Milliseconds"]();return t=t.replace("MM",kf(a,2)).replace("M",a).replace("yyyy",o).replace("yy",kf(o%100+"",2)).replace("dd",kf(s,2)).replace("d",s).replace("hh",kf(l,2)).replace("h",l).replace("mm",kf(u,2)).replace("m",u).replace("ss",kf(c,2)).replace("s",c).replace("SSS",kf(h,3))},capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:function(t,e,n,r,i){var o={};return Pa(o,t,e,n,r,i),o.text},getTextRect:function(t,e,n,r,i,o,a,s){return new yl({style:{text:t,font:e,align:n,verticalAlign:r,padding:i,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),xb=Object.freeze({__proto__:null,map:B,each:E,indexOf:P,inherits:O,reduce:z,filter:F,bind:W,curry:G,isArray:U,isString:Y,isObject:j,isFunction:X,extend:I,defaults:A,clone:k,merge:C}),bb=Zo(),wb=Zo(),Sb=1,Mb=2;function Tb(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function kb(t,e){var n=t.getLabelModel().get("customValues");if(n){var r=t.scale;return{labels:B(Ib(n,r),function(e,n){return{formattedLabel:dx(t)(e,n),rawLabel:r.getLabel(e),tick:e}})}}return"category"===t.type?function(t,e){var n=t.getLabelModel(),r=Db(t,n,e);return!n.get("show")||t.scale.isBlank()?{labels:[]}:r}(t,e):function(t){var e=t.scale.getTicks(),n=dx(t);return{labels:B(e,function(e,r){return{formattedLabel:n(e,r),rawLabel:t.scale.getLabel(e),tick:e}})}}(t)}function Cb(t,e,n){var r=t.scale,i=t.getTickModel().get("customValues");return i?{ticks:Ib(i,r)}:"category"===t.type?function(t,e){var n,r,i=Ab(t),o=vx(e),a=Ob(i,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(X(o))n=Bb(t,o,!0);else if("auto"===o){var s=Db(t,t.getLabelModel(),Tb(Mb));r=s.labelCategoryInterval,n=B(s.labels,function(t){return t.tick})}else n=Bb(t,r=o,!0);return Rb(i,o,{ticks:n,tickCategoryInterval:r})}(t,e):{ticks:r.getTicks(n)}}function Ib(t,e){var n=e.getExtent(),r=[];return E(t,function(t){(t=e.parse(t))>=n[0]&&t<=n[1]&&r.push(t)}),ua(r,ha,null),lo(r),B(r,function(t){return{value:t}})}function Db(t,e,n){var r,i,o=Lb(t),a=vx(e),s=n.kind===Sb;if(!s){var l=Ob(o,a);if(l)return l}X(a)?r=Bb(t,a,!1):(i="auto"===a?function(t,e){if(e.kind===Sb){var n=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return wb(t).autoInterval=n,!0}),n}var r=wb(t).autoInterval;return null!=r?r:wb(t).autoInterval=t.calculateCategoryInterval(e)}(t,n):a,r=Bb(t,i,!1));var u={labels:r,labelCategoryInterval:i};return s?n.out.noPxChangeTryDetermine.push(function(){return Rb(o,a,u),!0}):Rb(o,a,u),u}var Ab=Pb("axisTick"),Lb=Pb("axisLabel");function Pb(t){return function(e){return wb(e)[t]||(wb(e)[t]={list:[]})}}function Ob(t,e){for(var n=0;ne&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return o;r.lastTickCount=n,r.lastAutoInterval=e,r.axisExtent0=i[0],r.axisExtent1=i[1]}function Bb(t,e,n){var r=dx(t),i=t.scale,o=[],a=X(e);return X_(i,a?0:e,function(t,s){var l=i.getLabel(t);if(a){var u=!!e(t.value,l);if(t.offInterval=!u,!u&&!s)return}o.push(n?t:{formattedLabel:r(t),rawLabel:l,tick:t})}),o}function zb(t,e){e=e||{};var n,r={w:NaN,w2:NaN},i=t.scale,o=e.fromStat,a=e.min,s=(n=A_(i,3))[1]-n[0];Co(s)||(s=NaN);var l=t.getExtent(),u=ji(l[1]-l[0]);return z_(i)?function(t,e,n,r){var i=e.onBand,o=n+(i?1:0);0===o&&(o=1),t.w=r/o,!i&&n&&r&&(t.w2=t.w*n/r)}(r,t,s,u):o&&function(t,e,n,r,i){0;var o=!1,a=-1/0;E(i.key?[Ax(e,i.key)]:function(t,e){var n=[];return Lx(t.model.ecModel,function(t){for(var r=0;r0?(e>a&&(a=e),o=!1):-2===e&&(o=!0))}),Co(n)&&n>0&&Co(a)?(t.w=r/n*a,t.w2=a):o&&(t.w=.8*r,t.w2=t.w*n/r)}(r,t,s,u,o),null!=a&&(r.w=Co(r.w)?Zi(a,r.w):a),r}var Fb=[0,1],Vb=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(this.scale.parse(t))},t.prototype.getExtent=function(){return this._extent.slice()},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.scale;return io(t=n.normalize(n.parse(t)),Fb,Hb(this),e)},t.prototype.coordToData=function(t,e){var n=io(t,Hb(this),Fb,e);return this.scale.scale(n)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=B(Cb(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}).ticks,function(t){return{coord:this.dataToCoord(bx(this.scale,t)),tick:t}},this),r=function(t,e,n){var r=e.length;if(!t.onBand||n||!r)return!1;var i=zb(t).w;if(!i)return!1;E(e,function(t){t.coord-=i/2});var o=t.scale.getExtent(),a=e[r-1];a.tick.offInterval&&e.pop();return e.push({coord:a.coord+i,tick:{value:o[1]+1}}),!0}(this,n,e.get("alignWithLabel"));return B(n,function(t){return{coord:t.coord,tickValue:t.tick.value,onBand:r}})},t.prototype.getMinorTicksCoords=function(){if(z_(this.scale))return[];var t=this.model.getModel("minorTick").get("splitNumber");return t>0&&t<100||(t=5),B(this.scale.getMinorTicks(t),function(t){return B(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},t.prototype.getViewLabels=function(t){return kb(this,t=t||Tb(Mb)).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){return zb(this,{min:1}).w},t.prototype.calculateCategoryInterval=function(t){return function(t,e){var n=e.kind,r=function(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()}}(t),i=dx(t),o=(r.axisRotate-r.labelRotate)/180*Math.PI,a=t.scale,s=a.getExtent(),l=a.count();if(s[1]-s[0]<1)return 0;var u=1;l>40&&(u=Math.max(1,Math.floor(l/40)));for(var c=s[0],h=t.dataToCoord(c+1)-t.dataToCoord(c),f=Math.abs(h*Math.cos(o)),p=Math.abs(h*Math.sin(o)),d=0,g=0;c<=s[1];c+=u){var v,y,m=yi(i({value:c}),r.font,"center","top");v=1.3*m.width,y=1.3*m.height,d=Math.max(d,v,7),g=Math.max(g,y,7)}var _=d/f,x=g/p;isNaN(_)&&(_=1/0),isNaN(x)&&(x=1/0);var b=Math.max(0,Math.floor(Math.min(_,x)));if(n===Sb)return e.out.noPxChangeTryDetermine.push(W(Nb,null,t,b,l)),b;var w=Eb(t,b,l);return null!=w?w:b}(this,t=t||Tb(Mb))},t}();function Hb(t){var e=t.getExtent();if(t.onBand){var n=(e[1]-e[0])/t.scale.count()/2;e[0]+=n,e[1]-=n}return e}function Wb(t,e,n,r,i,o,a,s){var l=i-t,u=o-e,c=n-t,h=r-e,f=Math.sqrt(c*c+h*h),p=(l*(c/=f)+u*(h/=f))/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var d=a[0]=t+p*c,g=a[1]=e+p*h;return Math.sqrt((d-i)*(d-i)+(g-o)*(g-o))}var Gb=new Se,Ub=new Se,Xb=new Se,Yb=new Se,qb=new Se,Zb=[],jb=new Se;function Kb(t,e){if(e<=180&&e>0){e=e/180*Math.PI,Gb.fromArray(t[0]),Ub.fromArray(t[1]),Xb.fromArray(t[2]),Se.sub(Yb,Gb,Ub),Se.sub(qb,Xb,Ub);var n=Yb.len(),r=qb.len();if(!(n<.001||r<.001)){Yb.scale(1/n),qb.scale(1/r);var i=Yb.dot(qb);if(Math.cos(e)1&&Se.copy(jb,Xb),jb.toArray(t[1])}}}}function $b(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,Gb.fromArray(t[0]),Ub.fromArray(t[1]),Xb.fromArray(t[2]),Se.sub(Yb,Ub,Gb),Se.sub(qb,Xb,Ub);var r=Yb.len(),i=qb.len();if(!(r<.001||i<.001))if(Yb.scale(1/r),qb.scale(1/i),Yb.dot(e)=a)Se.copy(jb,Xb);else{jb.scaleAndAdd(qb,o/Math.tan(Math.PI/2-s));var l=Xb.x!==Ub.x?(jb.x-Ub.x)/(Xb.x-Ub.x):(jb.y-Ub.y)/(Xb.y-Ub.y);if(isNaN(l))return;l<0?Se.copy(jb,Ub):l>1&&Se.copy(jb,Xb)}jb.toArray(t[1])}}}function Qb(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?.3:Math.max(+a,0)||0,o.shape=o.shape||{},o.shape.smooth=a;var s=r.getModel("lineStyle").getLineStyle();i?t.useStyle(s):o.style=s}function Jb(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=Bt(r[0],r[1]),o=Bt(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=Vt([],r[1],r[0],a/i),l=Vt([],r[1],r[2],a/o),u=Vt([],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;c=o)}}for(var u=hw(this),c=u.startIdx;c=0)&&(o=!0)}),o||i.__dirty){var a=n._opts.useDirtyRect&&!cw(i)?i.createRepaintRects(t,e,n._width,n._height):null,s=n._i.layerStack[0],l=!0;if(i.__dirty){l=!1,i.__dirty=!1;var u=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,u,a)}_w(i,function(e){var o=n._paintPerCursor(i,e,t,a,l);r=r&&o})}},Tw),i.wxa&&bw(this._i,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),r},t.prototype._paintPerCursor=function(t,e,n,r,i){var o=t.ctx;if(r)if(r.length)for(var a=this.dpr,s=0;s=e.endIdx},t.prototype._paintPerCursorInRect=function(t,e,n,r,i){for(var o={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},a=t.ctx,s=cw(t),l=s&&u.getTime(),c=e.drawIdx,h=e.notClearIdx,f=h>=0?Math.min(h,c):c;f15){f++;break}}}py(a,o),e.drawIdx=Math.max(f,c)},t.prototype.getLayer=function(t,e){return this._ensureLayer(t,0,e)},t.prototype._ensureLayer=function(t,e,n){e=e||0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(t=dw,e=0);var i=xw(this._i,t)[e];return i||(i=vw("zr_"+t+"."+e,this,t,e),this._layerConfig[t]&&C(i,this._layerConfig[t],!0),(n||r&&t!==dw)&&(i.virtual=!0),this._insertLayer(i,t,e,!1),i.initContext()),i},t.prototype.insertLayer=function(t,e){this._insertLayer(e,t,0,!1)},t.prototype._insertLayer=function(t,e,n,r){var i=this._i,o=i.layers,a=i.layerStack,s=this._domRoot,l=null;if((!o[e]||!o[e][n])&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(t)){for(var u=a.length,c=0;c0&&(l=xw(i,a[c-1].zl)[a[c-1].zl2]),a.splice(c,0,{zl:e,zl2:n}),xw(i,e)[n]=t,!r&&!t.virtual)if(l){var h=l.dom;h.nextSibling?s.insertBefore(t.dom,h.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom);t.painter||(t.painter=this)}},t.prototype.eachLayer=function(t,e){return bw(this._i,function(n,r){t.call(e,n,r)})},t.prototype.eachBuiltinLayer=function(t,e){return bw(this._i,function(n,r){t.call(e,n,r)},ww)},t.prototype.eachOtherLayer=function(t,e){return bw(this._i,function(n,r){t.call(e,n,r)},Sw)},t.prototype.getLayers=function(){var t={};return bw(this._i,function(e,n,r){t[e.id]=e}),t},t.prototype._updateLayerStatus=function(t,e){var n,r=this;if(r._singleCanvas)for(var i=1;i=0;o--){var a=i.get(n[o]);if(a.used){var s=a.endIdxNew;(cw(e)?s=0;r--){var i=e[r];if(i.zl===t){var o=n[t][i.zl2];if(o.__builtin__)continue;if(e.splice(r,1),n[t][i.zl2]=void 0,!o.virtual){var a=o.dom.parentNode;a&&a.removeChild(o.dom)}}}},t.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var r=this._opts,i=this.root;null!=t&&(r.width=t),null!=e&&(r.height=e),t=Kv(i,0,r),e=Kv(i,1,r),n.style.display="",this._width===t&&e===this._height||(n.style.width=t+"px",n.style.height=e+"px",bw(this._i,function(n){n.resize(t,e)}),this.refresh({paintAll:!0})),this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this._ensureLayer(dw).resize(t,e)}return this},t.prototype.clearLayer=function(t){E(this._i.layers[t],function(t){t&&!t.__builtin__&&t.clear()})},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},t.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[314159][0].dom;var e=new fw("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var n=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var r=e.dom.width,i=e.dom.height;bw(this._i,function(t){t.__builtin__?n.drawImage(t.dom,0,0,r,i):t.renderToCanvas&&(n.save(),t.renderToCanvas(n),n.restore())})}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},a=this.storage.getDisplayList(!0),s=0,l=a.length;s-1&&(s.style.stroke=s.style.fill,s.style.fill=yp.color.neutral00,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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},e}(kg);function Iw(t,e){var n=t.mapDimensionsAll("defaultedLabel"),r=n.length;if(1===r){var i=Xd(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 Aw=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.updateData(e,n,r,i),o}return n(e,t),e.prototype._createSymbol=function(t,e,n,r,i,o){this.removeAll();var a=Xv(t,-1,-1,2,2,null,o);a.attr({z2:it(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),a.drift=Lw,this._symbolType=t,this.add(a)},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(){vu(this.childAt(0))},e.prototype.downplay=function(){yu(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=e.getSymbolZ2(t,n),u=o!==this._symbolType,c=i&&i.disableAnimation;if(u){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,l,h)}else{(p=this.childAt(0)).silent=!1;var f={scaleX:s[0]/2,scaleY:s[1]/2};c?p.attr(f):Qc(p,f,a,n),ih(p)}if(this._updateCommon(t,n,s,r,i),u){var p=this.childAt(0);if(!c){f={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,Jc(p,f,a,n)}}c&&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 v=r&&r.itemModel?r.itemModel:t.getItemModel(e),y=v.getModel("emphasis");o=y.getModel("itemStyle").getItemStyle(),s=v.getModel(["select","itemStyle"]).getItemStyle(),a=v.getModel(["blur","itemStyle"]).getItemStyle(),l=y.get("focus"),u=y.get("blurScope"),c=y.get("disabled"),h=Ph(v),f=y.getShallow("scale"),p=v.getShallow("cursor")}var m=t.getItemVisual(e,"symbolRotate");d.attr("rotation",(m||0)*Math.PI/180||0);var _=Yv(t.getItemVisual(e,"symbolOffset"),n);_&&(d.x=_[0],d.y=_[1]),p&&d.attr("cursor",p);var x=t.getItemVisual(e,"style"),b=x.fill;if(d instanceof sl){var w=d.style;d.useStyle(I({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},x))}else d.__isEmptyBrush?d.useStyle(I({},x)):d.useStyle(x),d.style.decal=null,d.setColor(b,i&&i.symbolInnerColor),d.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=d.z2,d.z2+=S):null!=M&&(d.z2=M,this._z2=null);var T=i&&i.useNameLabel;Lh(d,h,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return T?t.getName(e):Iw(t,e)},inheritColor:b,defaultOpacity:x.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var k=d.ensureState("emphasis");k.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;k.scaleX=this._sizeX*C,k.scaleY=this._sizeY*C,this.setSymbolScale(1),Du(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=Dl(this).dataIndex,o=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var a=r.getTextContent();a&&eh(a,{style:{opacity:0}},e,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();eh(r,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:i,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return U(n=t.getItemVisual(e,"symbolSize"))||(n=[+n,+n]),[n[0]||0,n[1]||0];var n},e.getSymbolZ2=function(t,e){return t.getItemVisual(e,"z2")},e}(Bi);function Lw(t,e){this.parent.drift(t,e)}function Pw(t,e,n,r){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function Ow(t){return null==t||j(t)||(t={isIgnore:t}),t||{}}function Rw(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:Ph(e),cursorStyle:e.get("cursor")}}function Nw(t,e,n,r,i,o,a){var s=new t(e,n,r,i);return s.setPosition(o),e.setItemGraphicEl(n,s),a.add(s),s}var Ew=function(){function t(t){this.group=new Bi,this._SymbolCtor=t||Aw}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=Ow(e);var n=this.group,r=t.hostModel,i=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=this._seriesScope=Rw(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);Pw(t,i,r,e)&&Nw(o,t,r,s,l,i,n)}).update(function(c,h){var f=i.getItemGraphicEl(h),p=u(c);if(Pw(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)).setPosition(p);else{f.updateData(t,c,s,l);var v={x:p[0],y:p[1]};a?f.attr(v):Qc(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(t){var e=this._data;if(e)for(var n=this,r=0,i=e.getStore().count();r0?n=r[0]:r[1]<0&&(n=r[1]);return n}(i,n),a=r.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(a),c="x"===s||"radius"===s?1:0,h=B(t.dimensions,function(t){return e.mapDimension(t)}),f=!1,p=e.getCalculationInfo("stackResultDimension");return m_(e,h[0])&&(f=!0,h[0]=p),m_(e,h[1])&&(f=!0,h[1]=p),{dataDimsForPoint:h,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function zw(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 Fw(t,e){return!isFinite(t)||!isFinite(e)}var Vw=typeof Float32Array!==Al?Float32Array:void 0,Hw=typeof Float64Array!==Al?Float64Array:void 0;function Ww(t){return Gw({ctor:Vw},t).arr}function Gw(t,e){var n=t.arr,r=t.ctor;if(e>po&&(e=po),!n||t.typed&&n.length=i||g<0)break;if(Fw(y,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](y,m),h=y,f=m;else{var _=y-u,x=m-c;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===y&&S===m&&v=r||Fw(w,S))p=y,d=m;else{k=w-u,C=S-c;var A=y-u,L=w-y,P=m-c,O=S-m,R=void 0,N=void 0;if("x"===s){var E=k>0?1:-1;p=y-E*(R=Math.abs(A))*a,d=m,I=y+E*(N=Math.abs(L))*a,D=m}else if("y"===s){var B=C>0?1:-1;p=y,d=m-B*(R=Math.abs(P))*a,I=y,D=m+B*(N=Math.abs(O))*a}else R=Math.sqrt(A*A+P*P),p=y-k*a*(1-(T=(N=Math.sqrt(L*L+O*O))/(N+R))),d=m-C*a*(1-T),D=m+C*a*T,I=Uw(I=y+k*a*T,Xw(w,y)),D=Uw(D,Xw(S,m)),I=Xw(I,Uw(w,y)),d=m-(C=(D=Xw(D,Uw(S,m)))-m)*R/N,p=Uw(p=y-(k=I-y)*R/N,Xw(u,y)),d=Uw(d,Xw(c,m)),I=y+(k=y-(p=Xw(p,Uw(u,y))))*N/R,D=m+(C=m-(d=Xw(d,Uw(c,m))))*N/R}t.bezierCurveTo(h,f,p,d,y,m),h=I,f=D}else t.lineTo(y,m)}u=y,c=m,g+=o}return v}var qw=function(){this.smooth=0,this.smoothConstraint=!0},Zw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:yp.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new qw},e.prototype.buildPath=function(t,e){var n=e.points,r=0,i=n.length/2;if(e.connectNulls){for(;i>0&&Fw(n[2*i-2],n[2*i-1]);i--);for(;r=0){var v=a?(c-r)*g+r:(u-n)*g+n;return a?[t,v]:[v,t]}n=u,r=c;break;case o.C:u=i[l++],c=i[l++],h=i[l++],f=i[l++],p=i[l++],d=i[l++];var y=a?In(n,u,h,p,t,s):In(r,c,f,d,t,s);if(y>0)for(var m=0;m=0){v=a?kn(r,c,f,d,_):kn(n,u,h,p,_);return a?[t,v]:[v,t]}}n=p,r=d}}},e}(nl),jw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(qw),Kw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new jw},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&&Fw(n[2*o-2],n[2*o-1]);o--);for(;i=0;a--){var s=t.getDimensionInfo(r[a].dimension);if("x"===(i=s&&s.coordDim)||"y"===i){o=r[a];break}}if(o){var l=e.getAxis(i),u=B(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=function(t,e){var n,r,i=[],o=t.length;function a(t,e,n){var r=t.coord;return{coord:n,color:ar((n-r)/(e.coord-r),[t.color,e.color])}}for(var s=0;se){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}(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=f[0].coord-10,g=f[p-1].coord+10,v=g-d;if(v<.001)return"transparent";E(f,function(t){t.offset=(t.coord-d)/v}),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 y=new Bc(0,0,0,0,f,!0);return y[i]=d,y[i+"2"]=g,y}}}function aS(t,e,n){var r=t.get("showAllSymbol"),i="auto"===r;if(!r||i){var o=n.getAxesByScale("ordinal")[0];if(o&&(!i||!function(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}(o,e))){var a=e.mapDimension(o.dim),s={};return E(o.getViewLabels(),function(t){t.tick.offInterval||(s[bx(o.scale,t.tick)]=1)}),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function sS(t,e){return[t[2*e],t[2*e+1]]}function lS(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(f.getState("emphasis").style.lineWidth=+f.style.lineWidth+1);Dl(f).seriesIndex=t.seriesIndex,Du(f,D,L,P);var O=rS(t.get("smooth")),R=t.get("smoothMonotone");if(f.setShape({smooth:O,smoothMonotone:R,connectNulls:b}),p){var N=o.getCalculationInfo("stackedOnSeries"),E=0;p.useStyle(A(s.getAreaStyle(),{fill:k,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),N&&(E=rS(N.get("smooth"))),p.setShape({smooth:O,stackedOnSmooth:E,smoothMonotone:R,connectNulls:b}),Pu(p,t,"areaStyle"),Dl(p).seriesIndex=t.seriesIndex,Du(p,D,L,P)}var B=this._changePolyState;o.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=B)}),this._polyline.onHoverStateChange=B,this._data=o,this._coordSys=r,this._stackedOnPoints=_,this._points=l,this._step=T,this._valueOrigin=y;var z=t.get("triggerEvent"),F=t.get("triggerLineEvent");var V=!0===F||!0===z||"line"===z,H=!0===F||!0===z||"area"===z;this.packEventData(t,f,V),p&&this.packEventData(t,p,H)},e.prototype.packEventData=function(t,e,n){Dl(e).eventData=n?{componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line",selfType:e===this._polygon?"area":"line"}:null},e.prototype.highlight=function(t,e,n,r){var i=t.getData(),o=qo(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(Fw(l,u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var c=t.get("zlevel")||0,h=t.get("z")||0;(s=new Aw(i,o)).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 zg.prototype.highlight.call(this,t,e,n,r)},e.prototype.downplay=function(t,e,n,r){var i=t.getData(),o=qo(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 zg.prototype.downplay.call(this,t,e,n,r)},e.prototype._changePolyState=function(t){var e=this._polygon;hu(this._polyline,t),e&&hu(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Zw({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 Kw({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");X(l)&&(l=l(null));var u=s.get("animationDelay")||0,c=X(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,v=e.pointToCoord(h);r?(f=g.startAngle,p=g.endAngle,d=-v[1]/180*Math.PI):(f=g.r0,p=g.r,d=v[0])}else{var y=n;r?(f=y.x,p=y.x+y.width,d=t.x):(f=y.y+y.height,p=y.y,d=t.y)}var m=p===f?0:(d-f)/(p-f);a&&(m=1-m);var _=X(u)?u(o):l*m+c,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,e,n){var r=t.getModel("endLabel");if(lS(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 yl({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e=t.length/2;e>0&&Fw(t[2*e-2],t[2*e-1]);e--);return e-1}(a);l>=0&&(Lh(o,Ph(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?Dw(i,n):Iw(i,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,o=r?i?"right":"left":"center",a=r?"middle":i?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(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,_=(g?p:0)*(v?-1:1),x=(g?0:-p)*(v?-1:1),b=g?"x":"y",w=function(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)}}(u,m,b),S=w.range,M=S[1]-S[0],T=void 0;if(M>=1){if(M>1&&!h){var k=sS(u,S[0]);s.attr({x:k[0]+_,y:k[1]+x}),i&&(T=c.getRawValue(S[0]))}else{(k=l.getPointOn(m,b))&&s.attr({x:k[0]+_,y:k[1]+x});var C=c.getRawValue(S[0]),I=c.getRawValue(S[1]);i&&(T=function(t,e,n,r,i){var o=null==e||"auto"===e;if(null==r)return r;if(Z(r))return so(d=Ro(n||0,r,i),o?Math.max(uo(n||0),uo(r)):e);if(Y(r))return i<1?n:r;for(var a=[],s=n,l=r,u=Math.max(s?s.length:0,l.length),c=0;c0?S[0]:0;k=sS(u,D);i&&(T=c.getRawValue(D)),s.attr({x:k[0]+_,y:k[1]+x})}if(i){var A=Fh(s);"function"==typeof A.setLabelText&&A.setLabelText(T)}}},e.prototype._doUpdateAnimation=function(t,e,n,r,i,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,c=function(t,e,n,r,i,o,a){for(var s=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),l=[],u=[],c=[],h=[],f=[],p=[],d=[],g=Bw(i,e,a),v=t.getLayout("points")||[],y=e.getLayout("points")||[],m=0;m3e3||l&&nS(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(),Qc(s,g,u),l&&(l.setShape({points:h,stackedOnPoints:f}),l.stopAnimation(),Qc(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)):"minmax"===i&&t.setData(r.minmaxDownSample(r.mapDimension(l.dim),1/f));var p=void 0;Y(i)?p=hS[i]:X(i)&&(p=i),p&&t.setData(r.downSample(r.mapDimension(l.dim),1/f,p,fS))}}}}}var dS=function(t){function e(e,n,r,i,o){var a=t.call(this,e,n,r)||this;return a.index=0,a.type=i||"value",a.position=o||"bottom",a}return n(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Vb);var gS="expandAxisBreak",vS=Math.PI,yS=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],mS=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],_S=Zo(),xS=Zo(),bS=function(){function t(t){this.recordMap={},this.resolveAxisNameOverlap=t}return t.prototype.ensureRecord=function(t){var e=t.axis.dim,n=t.componentIndex,r=this.recordMap,i=r[e]||(r[e]=[]);return i[n]||(i[n]={ready:{}})},t}();var wS=[1,0,0,1,0,0],SS=new Be(0,0,0,0),MS=function(t,e,n,r,i,o){if(yx(t.nameLocation)){var a=o.stOccupiedRect;a&&TS(function(t,e,n){return t.transform=kh(t.transform,n),t.localRect=Th(t.localRect,e),t.rect=Th(t.rect,e),n&&t.rect.applyTransform(n),t.axisAligned=Sh(n),t.obb=void 0,(t.label=t.label||{}).ignore=!1,t}({},a,o.transGroup.transform),r,i)}else kS(o.labelInfoList,o.dirVec,r,i)};function TS(t,e,n){var r=new Se;lw(t,e,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&function(t,e){if(t){t.label.x+=e.x,t.label.y+=e.y,t.label.markRedraw();var n=t.transform;n&&(n[4]+=e.x,n[5]+=e.y);var r=t.rect;r&&(r.x+=e.x,r.y+=e.y);var i=t.obb;i&&i.fromBoundingRect(t.localRect,n)}}(e,r)}function kS(t,e,n,r){for(var i=Se.dot(r,e)>=0,o=0,a=t.length;o0?"top":"bottom",r="center"):vo(o-vS)?(i=n>0?"bottom":"top",r="center"):(i="middle",r=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:i}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),IS=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],DS={axisLine:function(t,e,n,r,i,o,a){var s=r.get(["axisLine","show"]);if("auto"===s&&(s=!0,null!=t.raw.axisLineAutoShow&&(s=!!t.raw.axisLineAutoShow)),s){var l=r.axis.getExtent(),u=o.transform,c=[l[0],0],h=[l[1],0],f=c[0]>h[0];u&&(Ht(c,c,u),Ht(h,h,u));var p=I({lineCap:"round"},r.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get(["axisLine","breakLine"])&&pf(r.axis.scale))null.buildAxisBreakLine(r,i,o,d);else{var g=new Ic(I({shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]}},d));gh(g.shape,g.style.lineWidth),g.anid="line",i.add(g)}var v=r.get(["axisLine","symbol"]);if(null!=v){var y=r.get(["axisLine","symbolSize"]);Y(v)&&(v=[v,v]),(Y(y)||Z(y))&&(y=[y,y]);var m=Yv(r.get(["axisLine","symbolOffset"])||0,y),_=y[0],x=y[1];E([{rotate:t.rotation+Math.PI/2,offset:m[0],r:0},{rotate:t.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((c[0]-h[0])*(c[0]-h[0])+(c[1]-h[1])*(c[1]-h[1]))}],function(e,n){if("none"!==v[n]&&null!=v[n]){var r=Xv(v[n],-_/2,-x/2,_,x,p.stroke,!0),o=e.r+e.offset,a=f?h:c;r.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(t,e,n,r,i,o,a,s){OS(e,i,s)&&AS(t,e,n,r,i,o,a,Sb)},axisTickLabelDetermine:function(t,e,n,r,i,o,a,s){OS(e,i,s)&&AS(t,e,n,r,i,o,a,Mb);var l=function(t,e,n,r){var i=r.axis,o=r.getModel("axisTick"),a=o.get("show");"auto"===a&&(a=!0,null!=t.raw.axisTickAutoShow&&(a=!!t.raw.axisTickAutoShow));if(!a||i.scale.isBlank())return[];for(var s=o.getModel("lineStyle"),l=t.tickDirection*o.get("length"),u=PS(i.getTicksCoords(),n.transform,l,A(s.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;cr[1],l="start"===e&&!s||"start"!==e&&s;vo(a-vS/2)?(o=l?"bottom":"top",i="center"):vo(a-1.5*vS)?(o=l?"top":"bottom",i="center"):(o="middle",i=a<1.5*vS&&a>vS/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:i,textVerticalAlign:o}}(t.rotation,c,b||0,d),null!=(x=t.raw.axisNameAvailableWidth)&&(x=Math.abs(x/Math.sin(_.rotation)),!isFinite(x)&&(x=null)));var w=f.getFont(),S=r.get("nameTruncate",!0)||{},M=S.ellipsis,T=rt(t.raw.nameTruncateMaxWidth,S.maxWidth,x),k=s.nameMarginLevel||0,C=new yl({x:v.x,y:v.y,rotation:_.rotation,silent:CS.isLabelSilent(r),style:Oh(f,{text:u,font:w,overflow:"truncate",width:T,ellipsis:M,fill:f.getTextColor()||r.get(["axisLine","lineStyle","color"]),align:f.get("align")||_.textAlign,verticalAlign:f.get("verticalAlign")||_.textVerticalAlign}),z2:1});if(xh({el:C,componentModel:r,itemName:u}),C.__fullText=u,C.anid="name",r.get("triggerEvent")){var I=CS.makeAxisEventDataBase(r);I.targetType="axisName",I.name=u,Dl(C).eventData=I}o.add(C),C.updateTransform(),e.nameEl=C;var D=l.nameLayout=rw({label:C,priority:C.z2,defaultAttr:{ignore:C.ignore},marginDefault:yx(c)?yS[k]:mS[k]});if(l.nameLocation=c,i.add(C),C.decomposeTransform(),t.shouldNameMoveOverlap&&D){var A=n.ensureRecord(r);0,n.resolveAxisNameOverlap(t,n,r,D,y,A)}}}};function AS(t,e,n,r,i,o,a,s){RS(e)||function(t,e,n,r,i,o){var a=i.axis,s=rt(t.raw.axisLabelShow,i.get(["axisLabel","show"])),l=new Bi;n.add(l);var u=Tb(r);if(!s||a.scale.isBlank())return void NS(e,[],l,u);var c=i.getModel("axisLabel"),h=a.getViewLabels(u),f=(rt(t.raw.labelRotate,c.get("rotate"))||0)*vS/180,p=CS.innerTextLayout(t.rotation,f,t.labelDirection),d=i.getCategories&&i.getCategories(!0),g=[],v=i.get("triggerEvent"),y=1/0,m=-1/0;E(h,function(t,e){var n,r=t.tick,s=t.formattedLabel,u=t.rawLabel,f=c,_=bx(a.scale,r);if(d&&d[_]){var x=d[_];j(x)&&x.textStyle&&(f=new Jh(x.textStyle,c,i.ecModel))}var b=f.getTextColor()||i.get(["axisLine","lineStyle","color"]),w=f.getShallow("align",!0)||p.textAlign,S=it(f.getShallow("alignMinLabel",!0),w),M=it(f.getShallow("alignMaxLabel",!0),w),T=f.getShallow("verticalAlign",!0)||f.getShallow("baseline",!0)||p.textVerticalAlign,k=it(f.getShallow("verticalAlignMinLabel",!0),T),C=it(f.getShallow("verticalAlignMaxLabel",!0),T),I=10+((null===(n=r.time)||void 0===n?void 0:n.level)||0);y=Math.min(y,I),m=Math.max(m,I);var D=new yl({x:0,y:0,rotation:0,silent:CS.isLabelSilent(i),z2:I,style:Oh(f,{text:s,align:0===e?S:e===h.length-1?M:w,verticalAlign:0===e?k:e===h.length-1?C:T,fill:X(b)?b("category"===a.type?u:"value"===a.type?_+"":_,e):b})});D.anid="label_"+_;var A=_S(D);if(A.labelInfo=t,A.layoutRotation=p.rotation,xh({el:D,componentModel:i,itemName:s,formatterParamsExtra:{isTruncated:function(){return D.isTruncated},value:u,tickIndex:e}}),v){var L=CS.makeAxisEventDataBase(i);L.targetType="axisLabel",L.value=u,L.tickIndex=e;var P=t.tick.break;if(P){var O=P.parsedBreak;L.break={start:O.vmin,end:O.vmax}}"category"===a.type&&(L.dataIndex=_),Dl(D).eventData=L,P&&function(t,e,n,r){n.on("click",function(n){var i={type:gS,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[t.axis.dim+"AxisIndex"]=t.componentIndex,e.dispatchAction(i)})}(i,o,D,P)}g.push(D),l.add(D)});var _=B(g,function(t){return{label:t,priority:_S(t).labelInfo.tick.break?t.z2+(m-y+1):t.z2,defaultAttr:{ignore:t.ignore}}});NS(e,_,l,u)}(t,e,i,s,r,a);var l=e.labelLayoutList;!function(t,e,n,r){var i=e.get(["axisLabel","margin"]);E(n,function(n,o){var a=rw(n);if(a){var s=a.label,l=_S(s);a.suggestIgnore=s.ignore,s.ignore=!1,ci(ES,BS);var u=e.axis;ES.x=u.dataToCoord(bx(u.scale,l.labelInfo.tick)),ES.y=t.labelOffset+t.labelDirection*i,ES.rotation=l.layoutRotation,r.add(ES),ES.updateTransform(),r.remove(ES),ES.decomposeTransform(),ci(s,ES),s.markRedraw(),ew(a,!0),rw(a)}})}(t,r,l,o),t.rotation;var u=t.optionHideOverlap;!function(t,e,n){var r=t.axis,i=t.get(["axisLabel","customValues"]);if(function(t){return"category"===t.type&&0===vx(t.getLabelModel())}(r))return;function o(t,o,a){var s=rw(e[o]),l=rw(e[a]),u=r.scale;if(s&&l){if(null==t){if(!n&&i)return;var c=_S(s.label).labelInfo.tick;if(E_(u)&&c.notNice||z_(u)&&c.offInterval)return void LS(s.label)}if(!1===t||s.suggestIgnore)LS(s.label);else if(l.suggestIgnore)LS(l.label);else{var h=.1;if(!n){var f=[0,0,0,0];s=aw({marginForce:f},s),l=aw({marginForce:f},l)}lw(s,l,null,{touchThreshold:h})&&LS(t?l.label:s.label)}}}var a=t.get(["axisLabel","showMinLabel"]),s=t.get(["axisLabel","showMaxLabel"]),l=e.length;o(a,0,1),o(s,l-1,l-2)}(r,l,u),u&&function(t){var e=[];function n(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}t.sort(function(t,e){return(e.suggestIgnore?1:0)-(t.suggestIgnore?1:0)||e.priority-t.priority});for(var r=0;r.1?"x":"y",c=a.transGroup[u];if(s.sort(function(t,e){return Math.abs(t.label[u]-c)-Math.abs(e.label[u]-c)}),l&&i){var h=o.getExtent(),f=Math.min(h[0],h[1]),p=Math.max(h[0],h[1])-f;i.union(new Be(f,0,p,1))}a.stOccupiedRect=i,a.labelInfoList=s}(t,n,r,l)}function LS(t){t&&(t.ignore=!0)}function PS(t,e,n,r,i){for(var o=[],a=[],s=[],l=0;l=0&&n(r,t,e.getStore())})}var p=0;if(f(function(t,e,n){i.set(e.uid,1),o&&o.hasKey(e.uid)||(r=!0),p+=n.count()}),o&&o.keys().length===i.keys().length||(r=!0),r||null==a){Gw(WS,p);var d=0;f(function(t,e,n){for(var r=0,i=n.count();r0&&m0?-2:-1,n.serUids=i}else e.liPosMinGap=a}var WS=Gw({ctor:Hw},50);function GS(t,e){return t+kx+e}function US(t){return VS(),{liPosMinGap:!z_(t.scale)}}var XS="bar";function YS(t,e,n,r){!function(t,e){var n=Fx(e.seriesType,e.baseAxis,e.coordSysType);Vx.set(n,e),Tx(t,function(){t.registerProcessor(t.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:Ex})})}(t,{key:e,seriesType:n,coordSysType:r,getMetrics:US})}var qS={left:0,right:0,top:0,bottom:0},ZS=["25%","25%"],jS="cartesian2d",KS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.mergeDefaultAndTheme=function(e,n){var r=dp(e.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&e.outerBounds&&pp(e.outerBounds,r)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&pp(this.option.outerBounds,e.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:qS,outerBoundsContain:"all",outerBoundsClampWidth:ZS[0],outerBoundsClampHeight:ZS[1],backgroundColor:yp.color.transparent,borderWidth:1,borderColor:yp.color.neutral30},e}(vp),$S=sa();function QS(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function JS(t,e){var n=function(t,e){var n=GS(e,jS),r=[],i=zb(t,{fromStat:{key:n},min:1});return Ox(t,n,function(t){r.push({barWidth:oo(t.get("barWidth"),i.w),barMaxWidth:oo(t.get("barMaxWidth"),i.w),barMinWidth:oo(t.get("barMinWidth")||(eM(t)?.5:1),i.w),barGap:t.get("barGap"),barCategoryGap:t.get("barCategoryGap"),defaultBarGap:t.get("defaultBarGap"),stackId:QS(t)})}),{bandWidthResult:i,seriesInfo:r}}(t,e);return n.columnMap=function(t){var e,n,r=t.bandWidthResult.w,i=r,o=0,a=[],s={};E(t.seriesInfo,function(t,r){r||(n=t.defaultBarGap||0);var l=t.stackId;xt(s,l)||o++;var u=s[l];u||(u=s[l]={width:0,maxWidth:0},a.push(l));var c=t.barWidth;c&&!u.width&&(u.width=c,c=qi(i,c),i-=c);var h=t.barMaxWidth;h&&(u.maxWidth=h);var f=t.barMinWidth;f&&(u.minWidth=f);var p=t.barGap;null!=p&&(n=p);var d=t.barCategoryGap;null!=d&&(e=d)}),null==e&&(e=Zi(35-4*a.length,15)+"%");var l=oo(e,r),u=oo(n,1),c=(i-l)/(o+(o-1)*u);c=Zi(c,0),E(a,function(t){var e=s[t],n=e.maxWidth,r=e.minWidth;if(e.width){a=e.width;n&&(a=qi(a,n)),r&&(a=Zi(a,r)),e.width=a,i-=a+u*a,o--}else{var a=c;n&&na&&(a=r),a!==c&&(e.width=a,i-=a+u*a,o--)}}),c=Zi(c=(i-l)/(o+(o-1)*u),0);var h,f=0;E(a,function(t){var e=s[t];e.width||(e.width=c),h=e,f+=e.width*(1+u)}),h&&(f-=h.width*u);var p={},d=-f/2;return E(a,function(t){var e=s[t];p[t]=p[t]||{bandWidth:r,offset:d,width:e.width},d+=e.width*(1+u)}),p}(n),n}function tM(t){return{seriesType:t,overallReset:function(e){var n=GS(t,jS);!function(t,e,n){var r=Cx(Ov(t)).keyed,i=r&&r.get(e);i&&i.each(function(t){n(t.axis)})}(e,n,function(e){var r=JS(e,t);Ox(e,n,function(t){var e=r.columnMap[QS(t)];t.getData().setLayout({bandWidth:e.bandWidth,offset:e.offset,size:e.width})})})}}}function eM(t){return t.pipelineContext&&t.pipelineContext.large}function nM(t){return e=GS(t,jS),function(t,n){var r=zb(t,{fromStat:{key:e}});if(Co(r.w2))return[-r.w2/2,r.w2/2]};var e}function rM(t){$S(t,function(){function e(e){var n=GS(e,jS);YS(t,n,e,jS),function(t,e){jx.set(t,e)}(n,nM(e))}e("bar"),e("pictorialBar")})}var iM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return x_(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)E(r.getAxes(),function(t,n){if("category"===t.type&&null!=e){var r=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=i[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),r.length<2)return;if(2===r.length)return void(o[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,c=void 0,h=1,f=0;fs){c=(p+u)/2;break}1===f&&(h=d-r[0].tickValue)}null==c&&(u?u&&(c=r[r.length-1].coord):c=r[0].coord),o[n]=t.toGlobalCoord(c)}});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.prototype.__requireStartValue=function(t){return this.getBaseAxis()!==t},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",defaultBarGap:"10%"},e}(kg);kg.registerClass(iM);var oM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}var r,i;return n(e,t),e.prototype.getInitialData=function(){return x_(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.__preparePipelineContext=function(t,e){var n=fa(this,t,e);return n.progressiveRender&&(n.large=!0),n},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series."+XS,e.dependencies=["grid","polar"],e.defaultOption=(r=iM.defaultOption,i={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:yp.color.primary,borderWidth:2}},realtimeSort:!1},C(C({},r,!0),i,!0)),e}(iM),aM=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},sM=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new aM},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-lo)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){rh(e,t,Dl(e).dataIndex)})):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type=XS,e}(zg),dM={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=hM(e.x,t.x),s=fM(e.x+e.width,i),l=hM(e.y,t.y),u=fM(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=fM(e.r,t.r),o=hM(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}},gM={cartesian2d:function(t,e,n,r,i,o,a,s,l){var u=new pl({shape:I({},r),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[i?"height":"width"]=0);return u},polar:function(t,e,n,r,i,o,a,s,l){var u=!i&&l?sM:mc,c=new u({shape:r,z2:1});c.name="item";var h,f,p=wM(i);if(c.calculateTextPosition=(h=p,f=({isRoundCap:u===sM}||{}).isRoundCap,function(t,e,n){var r=e.position;if(!r||r instanceof Array)return wi(t,e,n);var i=h(r),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,c=a.r0,p=(u+c)/2,d=a.startAngle,g=a.endAngle,v=(d+g)/2,y=f?Math.abs(u-c)/2:0,m=Math.cos,_=Math.sin,x=s+u*m(d),b=l+u*_(d),w="left",S="top";switch(i){case"startArc":x=s+(c-o)*m(v),b=l+(c-o)*_(v),w="center",S="top";break;case"insideStartArc":x=s+(c+o)*m(v),b=l+(c+o)*_(v),w="center",S="bottom";break;case"startAngle":x=s+p*m(d)+lM(d,o+y,!1),b=l+p*_(d)+uM(d,o+y,!1),w="right",S="middle";break;case"insideStartAngle":x=s+p*m(d)+lM(d,-o+y,!1),b=l+p*_(d)+uM(d,-o+y,!1),w="left",S="middle";break;case"middle":x=s+p*m(v),b=l+p*_(v),w="center",S="middle";break;case"endArc":x=s+(u+o)*m(v),b=l+(u+o)*_(v),w="center",S="bottom";break;case"insideEndArc":x=s+(u-o)*m(v),b=l+(u-o)*_(v),w="center",S="top";break;case"endAngle":x=s+p*m(g)+lM(g,o+y,!0),b=l+p*_(g)+uM(g,o+y,!0),w="left",S="middle";break;case"insideEndAngle":x=s+p*m(g)+lM(g,-o+y,!0),b=l+p*_(g)+uM(g,-o+y,!0),w="right",S="middle";break;default:return wi(t,e,n)}return(t=t||{}).x=x,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var d=i?"r":"endAngle",g={};c.shape[d]=i?r.r0:r.startAngle,g[d]=r[d],(s?Qc:Jc)(c,{shape:g},o)}return c}};function vM(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?Qc:Jc)(n,{shape:l},e,i,null),(a?Qc:Jc)(n,{shape:u},e?t.baseAxis.model:null,i)}function yM(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 wM(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 SM(t,e,n,r,i,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape;I(u,cM(r.getModel("itemStyle"),u,!0)),t.setShape(u)}}else{var c=r.get(["itemStyle","borderRadius"])||0;t.setShape("r",c)}t.useStyle(l);var h=r.getShallow("cursor");h&&t.attr("cursor",h);var f=s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?function(t,e){if(0===t.height){return e.getOtherAxis(e.getBaseAxis()).inverse?"bottom":"top"}return t.height>0?"bottom":"top"}(i,o.coordinateSystem):function(t,e){if(0===t.width){return e.getOtherAxis(e.getBaseAxis()).inverse?"left":"right"}return t.width>=0?"right":"left"}(i,o.coordinateSystem),p=Ph(r);Lh(t,p,{labelFetcher:o,labelDataIndex:n,defaultText:Iw(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:f});var d=t.getTextContent();if(s&&d){var g=r.get(["label","position"]);t.textConfig.inside="middle"===g||null,function(t,e,n,r){if(Z(r))t.setTextConfig({rotation:r});else if(U(e))t.setTextConfig({rotation:0});else{var i,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=l;break;case"startAngle":case"insideStartAngle":i=a;break;case"endAngle":case"insideEndAngle":i=s;break;default:return void t.setTextConfig({rotation:0})}var c=1.5*Math.PI-i;"middle"===u&&c>Math.PI/2&&c<1.5*Math.PI&&(c-=Math.PI),t.setTextConfig({rotation:c})}}(t,"outside"===g?f:g,wM(a),r.get(["label","rotate"]))}!function(t,e,n,r){if(t){var i=Fh(t);i.prevValue=i.value,i.value=n;var o=e.normal;i.valueAnimation=o.get("valueAnimation"),i.valueAnimation&&(i.precision=o.get("precision"),i.defaultInterpolatedText=r,i.statesModels=e)}}(d,p,o.getRawValue(n),function(t){return Dw(e,t)});var v=r.getModel(["emphasis"]);Du(t,v.get("focus"),v.get("blurScope"),v.get("disabled")),Pu(t,r),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(i)&&(t.style.fill="none",t.style.stroke="none",E(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var MM=function(){},TM=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new MM},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=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[c]}return-1}(this,t.offsetX,t.offsetY);Dl(this).dataIndex=e>=0?e:null},30,!1);function IM(t,e,n){if(Jw(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}}var o=e;return{cx:(i=n.getArea()).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}}var DM,AM=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),LM="pie",PM=Zo(),OM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new AM(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return function(t,e,n){e=U(e)&&{coordDimensions:e}||I({encodeDefine:t.getEncode()},e);var r=t.getSource(),i=f_(r,e).dimensions,o=new h_(i,t);return o.initData(r,n),o}(this,{coordDimensions:["value"],encodeDefaulter:G(Lp,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),r=PM(n),i=r.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(t){o.push(t)}),i=r.seats=ho(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=i[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){Bo(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series."+LM,e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(kg);DM={fullType:OM.type,getCoord2:function(t){return t.getShallow("center")}},ep.set(DM.fullType,{getCoord2:void 0}).getCoord2=DM.getCoord2;var RM=Math.PI/180;function NM(t,e,n,r,i,o,a,s,l,u){if(!(t.length<2)){for(var c=t.length,h=0;h0&&i&&b(-h/o,0,o);var g,v,y=t[0],m=t[o-1];function _(){g=y.rect[a]-n,v=r-m.rect[a]-m.rect[s]}function x(t,e,n){if(t<0){var r=Math.min(e,-t);if(r>0){b(r*n,0,o);var i=r+t;i<0&&w(-i*n,1)}else w(-t*n,1)}}function b(e,n,r){0!==e&&(c=!0);for(var i=n;i0)for(l=0;l0;l--)b(-r[l-1]*h,l,o)}}function S(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(o-1)),r=0;r0?b(n,0,r+1):b(-n,o-r-1,o),(t-=n)<=0)return}return _(),g<0&&w(-g,.8),v<0&&w(v,.8),_(),x(g,v,1),x(v,g,-1),_(),g<0&&S(-g),v<0&&S(v),c})(t,1,l,l+a)&&function(t){for(var o={list:[],maxY:0},a={list:[],maxY:0},s=0;sn?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)t.unconstrainedWidth?null:f:null;r.setStyle("width",p)}BM(o,r)}}}function BM(t,e){FM.rect=t,iw(FM,e,zM)}var zM={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},FM={};function VM(t){return"center"===t.position}function HM(t){var e,n,r=t.getData(),i=[],o=!1,a=(t.get("minShowLabelAngle")||0)*RM,s=r.getLayout("viewRect"),l=r.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function p(t){t.ignore=!0}r.each(function(t){var s=r.getItemGraphicEl(t),h=s.shape,d=s.getTextContent(),g=s.getTextGuideLine(),v=r.getItemModel(t),y=v.getModel("label"),m=y.get("position")||v.get(["emphasis","label","position"]),_=y.get("distanceToLabelLine"),x=y.get("alignTo"),b=oo(y.get("edgeDistance"),u),w=y.get("bleedMargin");null==w&&(w=Math.min(u,f)>200?10:2);var S=v.getModel("labelLine"),M=S.get("length");M=oo(M,u);var T=S.get("length2");if(T=oo(T,u),Math.abs(h.endAngle-h.startAngle)0?"right":"left":L>0?"left":"right"}var V=Math.PI,H=0,W=y.get("rotate");if(Z(W))H=W*(V/180);else if("center"===m)H=0;else if("radial"===W||!0===W){H=L<0?-A+V:-A}else if("tangential"===W||"tangential-noflip"===W&&"outside"!==m&&"outer"!==m){var G=Math.atan2(L,P);G<0&&(G=2*V+G),P>0&&"tangential-noflip"!==W&&(G=V+G),H=G-V}if(o=!!H,d.x=k,d.y=C,d.rotation=H,d.setStyle({verticalAlign:"middle"}),O){d.setStyle({align:D});var U=d.states.select;U&&(U.x+=d.x,U.y+=d.y)}else{var X=new Be(0,0,0,0);BM(X,d),i.push({label:d,labelLine:g,position:m,len:M,len2:T,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new Se(L,P),linePoints:I,textAlign:D,labelDistance:_,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:X,unconstrainedWidth:X.width,labelStyleWidth:d.style.width})}s.setTextConfig({inside:O})}}),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,r,i,o,a,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=0;fr?c=u=I+b*r/2:(u=I+S,c=i-S),n.setItemLayout(e,{angle:r,startAngle:u,endAngle:c,clockwise:y,cx:o,cy:a,r0:l,r:m?io(t,x,[l,s]):s}),I=i}}),k0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type=LM,e}(zg);var ZM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Qo).models[0]},e.type="cartesian2dAxis",e}(vp);R(ZM,Mx);var jM={show:!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:"auto",onZeroAxisIndex:null,lineStyle:{color:yp.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:yp.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:yp.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[yp.color.backgroundTint,yp.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:yp.color.neutral00,borderColor:yp.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},KM=C({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},jM),$M=C({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:yp.color.axisMinorSplitLine,width:1}}},jM),QM={category:KM,value:$M,time:C({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},$M),log:A({logBase:10},$M)};function JM(t,e,r,i){E(sx,function(o,a){var s=C(C({},QM[a],!0),i,!0),l=function(t){function r(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return n(r,t),r.prototype.mergeDefaultAndTheme=function(t,e){var n=fp(this),r=n?dp(t):{};C(t,e.getTheme().get(a+"Axis")),C(t,this.getDefaultOption()),t.type=tT(t),n&&pp(t,r,n)},r.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=S_.createByAxisModel(this))},r.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},r.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},r.prototype.updateAxisBreaks=function(t){return{breaks:[]}},r.type=e+"Axis."+a,r.defaultOption=s,r}(r);t.registerComponentModel(l)}),t.registerSubTypeDefaulter(e+"Axis",tT)}function tT(t){return t.type||(t.data?"category":"value")}var eT=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return B(this._dimList,function(t){return this._axes[t]},this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),F(this.getAxes(),function(e){return e.scale.type===t})},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),nT=["x","y"];function rT(t){return("interval"===t.type||"time"===t.type)&&!pf(t)}var iT=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type=jS,e.dimensions=nT,e}return n(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(rT(t)&&rT(e)){var n=A_(t,null),r=A_(e,null),i=this.dataToPoint([n[0],r[0]]),o=this.dataToPoint([n[1],r[1]]),a=n[1]-n[0],s=r[1]-r[0];if(a&&s){var l=(o[0]-i[0])/a,u=(o[1]-i[1])/s,c=i[0]-n[0]*l,h=i[1]-r[0]*u,f=this._transform=[l,0,0,u,c,h];this._invTransform=be([],f)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),r=this.dataToPoint(e),i=this.getArea(),o=new Be(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var r=t[0],i=t[1];if(this._transform&&null!=r&&isFinite(r)&&null!=i&&isFinite(i))return Ht(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(r,e)),n[1]=a.toGlobalCoord(a.dataToCoord(i,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent(),a=n.parse(t[0]),s=r.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),a),Math.max(i[0],i[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e,n){if(n=n||[],this._invTransform)return Ht(n,t,this._invTransform);var r=this.getAxis("x"),i=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(t[0]),e),n[1]=i.coordToData(i.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),r=Math.min(e[0],e[1])-t,i=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-r+t,a=Math.max(n[0],n[1])-i+t;return new Be(r,i,o,a)},e}(eT);function oT(t,e){var n=t.scale,r=t.model;var i,o,a,s=Kx(n,r,r.ecModel,t,null),l=B_(n),u=B_(e)?e.intervalStub:e,c=l?n.intervalStub:n,h=n.base,f=u.getTicks(),p=u.getTicks({expandToNicedExtent:!0}),d=f.length-1;if(1===d)i=o=0,a=1;else if(2===d){var g=ji(f[0].value-f[1].value),v=ji(f[1].value-f[2].value);i=o=0,g===v?a=2:(a=1,g=D[1])return!0})):k[1]?(_=D[1],A(function(){if(R(),S=so(w-x*a,b),L(),m<=D[0])return!0})):A(function(){S=so(Qi(D[0]/x)*x,b),w=so($i(D[1]/x)*x,b);var t=Ki((w-S)/x);if(t<=a){var e=a-t,n=void 0,r=s.incl0||l;if(r&&0===D[0])n=[0,e];else if(r&&0===D[1])n=[e,0];else{var i=$i(e/2);n=e%2==0?[i,i]:m+_=D[1])return!0}})}xx(n,k,I,[m,_],C,{interval:x,intervalCount:a,intervalPrecision:b,niceExtent:[S,w]})}var aT=[[3,1],[0,2]],sT=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=nT,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function r(t){for(var e=H(t),n=[],r=e.length-1;r>=0;r--){var i=t[+e[r]];i.__alignTo?n.push(i):Jx(i)}E(n,function(t){var e,n;e=t,n=t.__alignTo,pf(e.scale)||pf(n.scale)||n.scale.getTicks().length<2?Jx(t):oT(t,t.__alignTo.scale)})}E(this._axesList,function(t){qx(t,1);var e=t.scale;z_(e)&&e.setSortInfo(t.model.get("categorySortInfo"))}),r(n.x),r(n.y);var i={};E(n.x,function(t){lT(n,"y",t,i)}),E(n.y,function(t){lT(n,"x",t,i)}),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var r=hp(t,e),i=this._rect=up(t.getBoxLayoutParams(),r.refContainer),o=this._axesMap,a=this._coordsList,s=t.get("containLabel");if(hT(o,i),!n){var l=function(t,e,n,r,i){var o=new bS(gT);return E(n,function(n){return E(n,function(n){if(mx(n.model)){var a=!r;n.axisBuilder=function(t,e,n,r,i,o){for(var a=FS(t,n),s=!1,l=!1,u=0;ue?hx:px:px}(e.scale,0,!1),r=e&&"category"!==e.type&&"time"!==e.type&&n!==px;return r&&"auto"===t&&function(t){return lx(t).noOnMyZero}(e)&&(r=!1),r}function cT(t){for(var e,n=H(t),r=[],i=n.length-1;i>=0;i--){var o=t[+n[i]];R_(o.scale)&&null==_x(o.model,o.type)&&(o.model.get("alignTicks")&&null==o.model.get("interval")?r.push(o):e=o)}e||(e=r.pop()),e&&E(r,function(t){t.__alignTo=e})}function hT(t,e){E(t.x,function(t){return fT(t,e.x,e.width)}),E(t.y,function(t){return fT(t,e.y,e.height)})}function fT(t,e,n){var r=[0,n],i=t.inverse?1:0;t.setExtent(r[i],r[1-i]),function(t,e){var n=t.getExtent(),r=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return r-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return r-t+e}}(t,e)}function pT(t,e,n,r,i,o,a){dT(r,i,Sb,e,!1,a);var s=[0,0,0,0];u(0),u(1),c(r,0,NaN),c(r,1,NaN);var l=null==V(s,function(t){return t>0});return yh(r,s,!0,!0,n),hT(i,r),l;function u(t){E(i[ah[t]],function(e){if(mx(e.model)){var n=o.ensureRecord(e.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!nt(e)&&e>1e-4&&(t/=e),t}}function dT(t,e,n,r,i,o){var a=n===Mb;E(e,function(e){return E(e,function(e){mx(e.model)&&(!function(t,e,n){var r=FS(e,n);t.updateCfg(r)}(e.axisBuilder,t,e.model),e.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};function l(e){s[ah[1-e]]=t[sh[e]]<=.5*o.refContainer[sh[e]]?0:1-e==1?2:1}l(0),l(1),E(e,function(t,e){return E(t,function(t){mx(t.model)&&(("all"===r||a)&&t.axisBuilder.build({axisName:!0},{nameMarginLevel:s[e]}),a&&t.axisBuilder.build({axisLine:!0}))})})}var gT=function(t,e,n,r,i,o){var a="x"===n.axis.dim?"y":"x";MS(t,0,0,r,i,o),yx(t.nameLocation)||E(e.recordMap[a],function(t){t&&t.labelInfoList&&t.dirVec&&kS(t.labelInfoList,t.dirVec,r,i)})};function vT(t){var e,n=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return n&&n.axesInfo[(e=t,e.type+"||"+e.id)]}var yT={},mT=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(e,n,r,i){this.axisPointerClass&&function(t){var e=vT(t);if(e){var n=e.axisPointerModel,r=e.axis.scale,i=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=r.parse(a));var s=function(t){return!!t.get(["handle","show"])}(n);null==o&&(i.status=s?"show":"hide");var l=r.getExtent();(null==a||a>l[1])&&(a=l[1]),a1?a.get(["series","multiple","prefix"]):a.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries(function(e,n){if(n1?a.get(["series","multiple",i]):a.get(["series","single",i]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,b=t.getLocaleModel().get(["series","typeNames"]),b[x]||b.chart)});var s=e.getData();s.count()>u?r+=o(a.get(["data","partialData"]),{displayCnt:u}):r+=a.get(["data","allData"]);for(var c=a.get(["data","separator","middle"]),f=a.get(["data","separator","end"]),d=a.get(["data","excludeDimensionId"]),g=[],v=0;v