blob: fad39fe878cda8234368ef46d08d23a3b8507ff3 [file] [log] [blame]
/*
* 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=t||self).echarts={})}(this,function(t){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function l(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var h=function(){return(h=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),r=0,e=0;e<n;e++)for(var o=arguments[e],a=0,s=o.length;a<s;a++,r++)i[r]=o[a];return i}var e=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.weChat=!1},w=new function(){this.browser=new e,this.node=!1,this.wxa=!1,this.worker=!1,this.canvasSupported=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(w.wxa=!0,w.canvasSupported=!0,w.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?(w.worker=!0,w.canvasSupported=!0):"undefined"==typeof navigator?(w.node=!0,w.canvasSupported=!0,w.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),t=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1]);t&&(n.weChat=!0);e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&11<=+n.version),e.domSupported="undefined"!=typeof document}(navigator.userAgent,w);var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},u={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},c=Object.prototype.toString,n=Array.prototype,p=n.forEach,d=n.filter,r=n.slice,f=n.map,o=function(){}.constructor,g=o?o.prototype:null,y={};var m=2311;function v(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function D(t){if(null==t||"object"!=typeof t)return t;var e=t,n=c.call(t);if("[object Array]"===n){if(!tt(t)){e=[];for(var i=0,r=t.length;i<r;i++)e[i]=D(t[i])}}else if(u[n]){if(!tt(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(i=0,r=t.length;i<r;i++)e[i]=D(t[i])}}}else if(!s[n]&&!tt(t)&&!G(t))for(var a in e={},t)t.hasOwnProperty(a)&&(e[a]=D(t[a]));return e}function _(t,e,n){if(!V(e)||!V(t))return n?D(e):t;for(var i in e){var r,o;e.hasOwnProperty(i)&&(r=t[i],!V(o=e[i])||!V(r)||N(o)||N(r)||G(o)||G(r)||H(o)||H(r)||tt(o)||tt(r)?!n&&i in t||(t[i]=D(e[i])):_(r,o,n))}return t}function I(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function A(t,e,n){for(var i=R(e),r=0;r<i.length;r++){var o=i[r];(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}return t}var k=function(){return y.createCanvas()};function L(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function x(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;r<i.length;r++){var o=i[r];"constructor"!==o&&(n?null!=e[o]:null==t[o])&&(t[o]=e[o])}else A(t,e,n)}function P(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function E(t,e,n){if(t&&e)if(t.forEach&&t.forEach===p)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function O(t,e,n){if(!t)return[];if(!e)return Z(t);if(t.map&&t.map===f)return t.map(e,n);for(var i=[],r=0,o=t.length;r<o;r++)i.push(e.call(n,t[r],r,t));return i}function b(t,e,n,i){if(t&&e){for(var r=0,o=t.length;r<o;r++)n=e.call(i,n,t[r],r,t);return n}}function S(t,e,n){if(!t)return[];if(!e)return Z(t);if(t.filter&&t.filter===d)return t.filter(e,n);for(var i=[],r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function R(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);return n}y.createCanvas=function(){return document.createElement("canvas")};var M=g&&C(g.bind)?g.call.bind(g.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(r.call(arguments)))}};function T(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(r.call(arguments)))}}function N(t){return Array.isArray?Array.isArray(t):"[object Array]"===c.call(t)}function C(t){return"function"==typeof t}function z(t){return"string"==typeof t}function B(t){return"[object String]"===c.call(t)}function F(t){return"number"==typeof t}function V(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function H(t){return s[c.call(t)]}function W(t){return!!u[c.call(t)]}function G(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function U(t){return t!=t}function Y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function X(t,e){return null!=t?t:e}function q(t,e,n){return null!=t?t:null!=e?e:n}function Z(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return r.apply(t,e)}function j(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function K(t,e){if(!t)throw new Error(e)}function $(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var Q="__ec_primitive__";function J(t){t[Q]=!0}function tt(t){return t[Q]}var et=(nt.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},nt.prototype.set=function(t,e){return this.data[t]=e},nt.prototype.each=function(t,e){for(var n in this.data)this.data.hasOwnProperty(n)&&t.call(e,this.data[n],n)},nt.prototype.keys=function(){return R(this.data)},nt.prototype.removeKey=function(t){delete this.data[t]},nt);function nt(t){this.data={};var n=N(t);this.data={};var i=this;function e(t,e){n?i.set(t,e):i.set(e,t)}t instanceof nt?t.each(e):t&&E(t,e)}function it(t){return new et(t)}function rt(t,e){var n=Object.create?Object.create(t):((n=function(){}).prototype=t,new n);return e&&I(n,e),n}function ot(t,e){return t.hasOwnProperty(e)}function at(){}function st(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function lt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ut(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function ht(t,e){var n,n=(n=e,Math.sqrt((n=n)[0]*n[0]+n[1]*n[1]));return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function ct(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var pt=ct;var dt=function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])};function ft(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function gt(t,e,n){var i=e[0],e=e[1];return t[0]=n[0]*i+n[2]*e+n[4],t[1]=n[1]*i+n[3]*e+n[5],t}function yt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function mt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var vt=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},_t=(xt.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new vt(e,t),"dragstart",t.event))},xt.prototype._drag=function(t){var e,n,i,r,o=this._draggingTarget;o&&(i=t.offsetX,r=t.offsetY,e=i-this._x,n=r-this._y,this._x=i,this._y=r,o.drift(e,n,t),this.handler.dispatchToElement(new vt(o,t),"drag",t.event),i=this.handler.findHover(i,r,o).target,r=this._dropTarget,o!==(this._dropTarget=i)&&(r&&i!==r&&this.handler.dispatchToElement(new vt(r,t),"dragleave",t.event),i&&i!==r&&this.handler.dispatchToElement(new vt(i,t),"dragenter",t.event)))},xt.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new vt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new vt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},xt);function xt(t){(this.handler=t).on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}var bt=(wt.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var r=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),r[t]||(r[t]=[]);for(var a=0;a<r[t].length;a++)if(r[t][a].h===n)return this;o={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},e=r[t].length-1,i=r[t][e];return i&&i.callAtLast?r[t].splice(e,0,o):r[t].push(o),this},wt.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},wt.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],r=0,o=n[t].length;r<o;r++)n[t][r].h!==e&&i.push(n[t][r]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},wt.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],r=this._$eventProcessor;if(i)for(var o=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!r||!r.filter||null==l.query||r.filter(t,l.query))switch(o){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return r&&r.afterTrigger&&r.afterTrigger(t),this},wt.prototype.triggerWithContext=function(t){if(!this._$handlers)return this;var e=this._$handlers[t],n=this._$eventProcessor;if(e)for(var i=arguments,r=i.length,o=i[r-1],a=e.length,s=0;s<a;s++){var l=e[s];if(!n||!n.filter||null==l.query||n.filter(t,l.query))switch(r){case 0:l.h.call(o);break;case 1:l.h.call(o,i[0]);break;case 2:l.h.call(o,i[0],i[1]);break;default:l.h.apply(o,i.slice(1,r-1))}}return n&&n.afterTrigger&&n.afterTrigger(t),this},wt);function wt(t){t&&(this._$eventProcessor=t)}var St=Math.log(2);function Mt(t,e,n,i,r,o){var a=i+"-"+r,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~r)/St);return t[n][l]}for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,p=0,d=0;p<s;p++){var f=1<<p;f&r||(c+=(d%2?-1:1)*t[n][p]*Mt(t,e-1,h,u,r|f,o),d++)}return o[a]=c}function Tt(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},r=Mt(n,8,0,0,0,i);if(0!==r){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*Mt(n,7,0===a?1:0,1<<a,1<<s,i)/r*e[a];return function(t,e,n){var i=e*o[6]+n*o[7]+1;t[0]=(e*o[0]+n*o[1]+o[2])/i,t[1]=(e*o[3]+n*o[4]+o[5])/i}}}var Ct="___zrEVENTSAVED";function Dt(t,e,n,i,r){if(e.getBoundingClientRect&&w.domSupported&&!It(e)){var o=e[Ct]||(e[Ct]={}),r=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,h=h.top;a.push(p,h),l=l&&o&&p===o[c]&&h===o[1+c],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?Tt(s,a):Tt(a,s))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=a.style,l=o%2,u=(o>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),o,r);if(r)return r(t,n,i),1}}function It(t){return"CANVAS"===t.nodeName.toUpperCase()}var At="undefined"!=typeof window&&!!window.addEventListener,kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Lt=[];function Pt(t,e,n,i){return n=n||{},i||!w.canvasSupported?Ot(t,e,n):w.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Ot(t,e,n),n}function Ot(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(It(t)){e=t.getBoundingClientRect();return n.zrX=i-e.left,void(n.zrY=r-e.top)}if(Dt(Lt,t,i,r))return n.zrX=Lt[0],void(n.zrY=Lt[1])}n.zrX=n.zrY=0}function Rt(t){return t||window.event}function Et(t,e,n){if(null!=(e=Rt(e)).zrX)return e;var i=e.type;i&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Pt(t,i,e,n):(Pt(t,e,e,n),r=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,t=t.deltaY;return null!=n&&null!=t?3*(0!==t?Math.abs(t):Math.abs(n))*(0<t||!(t<0)&&0<n?-1:1):e}(e),e.zrDelta=r?r/120:-(e.detail||0)/3);var r=e.button;return null==e.which&&void 0!==r&&kt.test(e.type)&&(e.which=1&r?1:2&r?3:4&r?2:0),e}var Nt=At?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0},zt=(Bt.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},Bt.prototype.clear=function(){return this._track.length=0,this},Bt.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o<a;o++){var s=i[o],l=Pt(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},Bt.prototype._recognize=function(t){for(var e in Vt)if(Vt.hasOwnProperty(e)){var n=Vt[e](this._track,t);if(n)return n}},Bt);function Bt(){this._track=[]}function Ft(t){var e=t[1][0]-t[0][0],t=t[1][1]-t[0][1];return Math.sqrt(e*e+t*t)}var Vt={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,n=(t[n-2]||{}).points||i;if(n&&1<n.length&&i&&1<i.length){n=Ft(i)/Ft(n);isFinite(n)||(n=1),e.pinchScale=n;i=[((i=i)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=i[0],e.pinchY=i[1],{type:"pinch",target:t[0].target,event:e}}}}},Ht="silent";function Wt(){Nt(this.event)}var Gt,Ut=(l(Yt,Gt=bt),Yt.prototype.dispose=function(){},Yt.prototype.setCursor=function(){},Yt);function Yt(){var t=null!==Gt&&Gt.apply(this,arguments)||this;return t.handler=null,t}var Xt,qt=function(t,e){this.x=t,this.y=e},Zt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],jt=(l(Kt,Xt=bt),Kt.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(E(Zt,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},Kt.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=$t(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);i=this._hovered=i?new qt(e,n):this.findHover(e,n),e=i.target,n=this.proxy;n.setCursor&&n.setCursor(e?e.cursor:"default"),o&&e!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(i,"mousemove",t),e&&e!==o&&this.dispatchToElement(i,"mouseover",t)},Kt.prototype.mouseout=function(t){var e=t.zrEventControl,n=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(n||this.trigger("globalout",{type:"globalout",event:t}))},Kt.prototype.resize=function(){this._hovered=new qt(0,0)},Kt.prototype.dispatch=function(t,e){t=this[t];t&&t.call(this,e)},Kt.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},Kt.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},Kt.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o={type:e,event:n=n,target:(t=t).target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Wt};i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget||i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)}))}},Kt.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new qt(t,e),o=i.length-1;0<=o;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}a=i.__hostTarget;i=a||i.parent}return!r||Ht}return!1}(i[o],t,e))&&(r.topTarget||(r.topTarget=i[o]),a!==Ht)){r.target=i[o];break}}return r},Kt.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new zt);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);"end"===e&&n.clear(),i&&(n=i.type,t.gestureEvent=n,(t=new qt).target=i.target,this.dispatchToElement(t,n,i.event))},Kt);function Kt(t,e,n,i){var r=Xt.call(this)||this;return r._hovered=new qt(0,0),r.storage=t,r.painter=e,r.painterRoot=i,n=n||new Ut,r.proxy=null,r.setHandlerProxy(n),r._draggingMgr=new _t(r),r}function $t(t,e,n){t=t.painter;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}function Qt(){return[1,0,0,1,0,0]}function Jt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function te(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 ee(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=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],e=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=e,t}function ne(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 ie(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],e=Math.sin(n),n=Math.cos(n);return t[0]=i*n+a*e,t[1]=-i*e+a*n,t[2]=r*n+s*e,t[3]=-r*e+n*s,t[4]=n*o+e*l,t[5]=n*l-e*o,t}function re(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],e=n*a-o*i;return e?(e=1/e,t[0]=a*e,t[1]=-o*e,t[2]=-i*e,t[3]=n*e,t[4]=(i*s-a*r)*e,t[5]=(o*r-n*s)*e,t):null}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){jt.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=$t(this,i,r);if("mouseup"===a&&o||(n=(e=this.findHover(i,r)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4<pt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var oe=Jt;function ae(t){return 5e-5<t||t<-5e-5}var se=[],le=[],ue=Qt(),he=Math.abs,ce=(pe.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},pe.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},pe.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},pe.prototype.needLocalTransform=function(){return ae(this.rotation)||ae(this.x)||ae(this.y)||ae(this.scaleX-1)||ae(this.scaleY-1)},pe.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||Qt(),n?this.getLocalTransform(i):oe(i),e&&(n?ee(i,t.transform,i):te(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&oe(i)},pe.prototype._resolveGlobalScaleRatio=function(t){var e,n,i=this.globalScaleRatio;null!=i&&1!==i&&(this.getGlobalScale(se),e=((se[0]-(n=se[0]<0?-1:1))*i+n)/se[0]||0,n=((se[1]-(n=se[1]<0?-1:1))*i+n)/se[1]||0,t[0]*=e,t[1]*=e,t[2]*=n,t[3]*=n),this.invTransform=this.invTransform||Qt(),re(this.invTransform,t)},pe.prototype.getLocalTransform=function(t){return pe.getLocalTransform(this,t)},pe.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},pe.prototype.setLocalTransform=function(t){var e,n;t&&(e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],ae(e-1)&&(e=Math.sqrt(e)),ae(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n)},pe.prototype.decomposeTransform=function(){var t,e,n;this.transform&&(n=this.parent,t=this.transform,n&&n.transform&&(ee(le,n.invTransform,t),t=le),e=this.originX,n=this.originY,(e||n)&&(ue[4]=e,ue[5]=n,ee(le,t,ue),le[4]-=e,le[5]-=n,t=le),this.setLocalTransform(t))},pe.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[0]=1,t[1]=1),t},pe.prototype.transformCoordToLocal=function(t,e){t=[t,e],e=this.invTransform;return e&&gt(t,t,e),t},pe.prototype.transformCoordToGlobal=function(t,e){t=[t,e],e=this.transform;return e&&gt(t,t,e),t},pe.prototype.getLineScale=function(){var t=this.transform;return t&&1e-10<he(t[0]-1)&&1e-10<he(t[3]-1)?Math.sqrt(he(t[0]*t[3]-t[2]*t[1])):1},pe.getLocalTransform=function(t,e){oe(e=e||[]);var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.rotation||0,s=t.x,t=t.y;return e[4]-=n,e[5]-=i,e[0]*=r,e[1]*=o,e[2]*=r,e[3]*=o,e[4]*=r,e[5]*=o,a&&ie(e,e,a),e[4]+=n,e[5]+=i,e[4]+=s,e[5]+=t,e},pe.initDefaultProps=((vh=pe.prototype).x=0,vh.y=0,vh.scaleX=1,vh.scaleY=1,vh.originX=0,vh.originY=0,vh.rotation=0,void(vh.globalScaleRatio=1)),pe);function pe(){}var de={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:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.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;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-de.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*de.bounceIn(2*t):.5*de.bounceOut(2*t-1)+.5}},fe=(ge.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,i="string"==typeof i?de[i]:i,i="function"==typeof i?i(n):n;if(this.onframe&&this.onframe(i),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},ge.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},ge.prototype.pause=function(){this._paused=!0},ge.prototype.resume=function(){this._paused=!1},ge);function ge(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var ye=function(t){this.value=t},me=(ve.prototype.insert=function(t){t=new ye(t);return this.insertEntry(t),t},ve.prototype.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},ve.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--},ve.prototype.len=function(){return this._len},ve.prototype.clear=function(){this.head=this.tail=null,this._len=0},ve);function ve(){this._len=0}var _e=(xe.prototype.put=function(t,e){var n,i,r=this._list,o=this._map,a=null;return null==o[t]&&(i=r.len(),n=this._lastRemovedEntry,i>=this._maxSize&&0<i&&(i=r.head,r.remove(i),delete o[i.key],a=i.value,this._lastRemovedEntry=i),n?n.value=e:n=new ye(e),n.key=t,r.insertEntry(n),o[t]=n),a},xe.prototype.get=function(t){var e=this._map[t],t=this._list;if(null!=e)return e!==t.tail&&(t.remove(e),t.insertEntry(e)),e.value},xe.prototype.clear=function(){this._list.clear(),this._map={}},xe.prototype.len=function(){return this._list.len()},xe);function xe(t){this._list=new me,this._maxSize=10,this._map={},this._maxSize=t}var be={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 we(t){return(t=Math.round(t))<0?0:255<t?255:t}function Se(t){return t<0?0:1<t?1:t}function Me(t){return t.length&&"%"===t.charAt(t.length-1)?we(parseFloat(t)/100*255):we(parseInt(t,10))}function Te(t){return t.length&&"%"===t.charAt(t.length-1)?Se(parseFloat(t)/100):Se(parseFloat(t))}function Ce(t,e,n){return n<0?n+=1:1<n&&--n,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function De(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Ie(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Ae=new _e(20),ke=null;function Le(t,e){ke&&Ie(ke,e),ke=Ae.put(t,ke||e.slice())}function Pe(t,e){if(t){e=e||[];var n=Ae.get(t);if(n)return Ie(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in be)return Ie(e,be[i]),Le(t,e),e;var r=i.length;if("#"===i.charAt(0))return 4===r||5===r?0<=(o=parseInt(i.slice(1,4),16))&&o<=4095?(De(e,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===r?parseInt(i.slice(4),16)/15:1),Le(t,e),e):void De(e,0,0,0,1):7===r||9===r?0<=(o=parseInt(i.slice(1,7),16))&&o<=16777215?(De(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===r?parseInt(i.slice(7),16)/255:1),Le(t,e),e):void De(e,0,0,0,1):void 0;var n=i.indexOf("("),o=i.indexOf(")");if(-1!==n&&o+1===r){r=i.substr(0,n),o=i.substr(n+1,o-(n+1)).split(","),n=1;switch(r){case"rgba":if(4!==o.length)return 3===o.length?De(e,+o[0],+o[1],+o[2],1):De(e,0,0,0,1);n=Te(o.pop());case"rgb":return 3!==o.length?void De(e,0,0,0,1):(De(e,Me(o[0]),Me(o[1]),Me(o[2]),n),Le(t,e),e);case"hsla":return 4!==o.length?void De(e,0,0,0,1):(o[3]=Te(o[3]),Oe(o,e),Le(t,e),e);case"hsl":return 3!==o.length?void De(e,0,0,0,1):(Oe(o,e),Le(t,e),e);default:return}}De(e,0,0,0,1)}}function Oe(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Te(t[1]),r=Te(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return De(e=e||[],we(255*Ce(r,i,n+1/3)),we(255*Ce(r,i,n)),we(255*Ce(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Re(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 Ee(t,e){t=Pe(t);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var Ne=Array.prototype.slice;function ze(t,e,n){return(e-t)*n+t}function Be(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=ze(e[o],n[o],i)}function Fe(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=e[o]+n[o]*i;return t}function Ve(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a<r;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function He(t,e){var n=t.length;if(n===e.length){for(var i=0;i<n;i++)if(t[i]!==e[i])return;return 1}}function We(t,e,n,i,r,o,a){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*a+(-3*(e-n)-2*t-i)*o+t*r+e}function Ge(t,e,n,i,r,o,a,s){for(var l=e.length,u=0;u<l;u++)t[u]=We(e[u],n[u],i[u],r[u],o,a,s)}function Ue(t){if(P(t)){var e=t.length;if(P(t[0])){for(var n=[],i=0;i<e;i++)n.push(Ne.call(t[i]));return n}return Ne.call(t)}return t}function Ye(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}var Xe=[0,0,0,0],qe=(Ze.prototype.isFinished=function(){return this._finished},Ze.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},Ze.prototype.needsAnimate=function(){return!this._isAllValueEqual&&2<=this.keyframes.length&&this.interpolable},Ze.prototype.getAdditiveTrack=function(){return this._additiveTrack},Ze.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(P(e)){var r,o=P((o=e)&&o[0])?2:1;if(0<i&&this.arrDim!==o)return void(this.interpolable=!1);if(1==o&&"number"!=typeof e[0]||2==o&&"number"!=typeof e[0][0])return void(this.interpolable=!1);0<i&&(r=n[i-1],this._isAllValueEqual&&(1==o&&He(e,r.value)||(this._isAllValueEqual=!1))),this.arrDim=o}else{if(0<this.arrDim)return void(this.interpolable=!1);if("string"==typeof e){o=Pe(e);o?(e=o,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e)return void(this.interpolable=!1);this._isAllValueEqual&&0<i&&(r=n[i-1],(this.isValueColor&&!He(r.value,e)||r.value!==e)&&(this._isAllValueEqual=!1))}e={time:t,value:e,percent:0};return this.keyframes.push(e),e},Ze.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort(function(t,e){return t.time-e.time});for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o<i;o++)e[o].percent=e[o].time/this.maxTime,0<n&&o!==i-1&&function(t,e,n){var i=t,r=e;if(i.push&&r.push){var e=i.length,o=r.length;if(e!==o)if(o<e)i.length=o;else for(var a=e;a<o;a++)i.push(1===n?r[a]:Ne.call(r[a]));for(var s=i[0]&&i[0].length,a=0;a<i.length;a++)if(1===n)isNaN(i[a])&&(i[a]=r[a]);else for(var l=0;l<s;l++)isNaN(i[a][l])&&(i[a][l]=r[a][l])}}(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;for(var a=e[0].value,o=0;o<i;o++)0===n?this.isValueColor?e[o].additiveValue=Fe([],e[o].value,a,-1):e[o].additiveValue=e[o].value-a:1===n?e[o].additiveValue=Fe([],e[o].value,a,-1):2===n&&(e[o].additiveValue=Ve([],e[o].value,a,-1))}},Ze.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=null!=this._additiveTrack,i=n?"additiveValue":"value",r=this.keyframes,o=this.keyframes.length,a=this.propName,s=this.arrDim,l=this.isValueColor;if(e<0)u=0;else if(e<this._lastFramePercent){for(var u=Math.min(this._lastFrame+1,o-1);0<=u&&!(r[u].percent<=e);u--);u=Math.min(u,o-2)}else{for(u=this._lastFrame;u<o&&!(r[u].percent>e);u++);u=Math.min(u-1,o-2)}var h,c,p,d,f,g,y,m=r[u+1],v=r[u];v&&m&&(this._lastFrame=u,this._lastFramePercent=e,0!=(g=m.percent-v.percent)&&(h=(e-v.percent)/g,c=n?this._additiveValue:l?Xe:t[a],(0<s||l)&&!c&&(c=this._additiveValue=[]),this.useSpline?(p=r[u][i],d=r[0===u?u:u-1][i],f=r[o-2<u?o-1:u+1][i],g=r[o-3<u?o-1:u+2][i],0<s?(1===s?Ge:function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h<l;h++){t[h]||(t[1]=[]);for(var c=0;c<u;c++)t[h][c]=We(e[h][c],n[h][c],i[h][c],r[h][c],o,a,s)}})(c,d,p,f,g,h,h*h,h*h*h):l?(Ge(c,d,p,f,g,h,h*h,h*h*h),n||(t[a]=Ye(c))):(y=void 0,y=this.interpolable?We(d,p,f,g,h,h*h,h*h*h):f,n?this._additiveValue=y:t[a]=y)):0<s?(1===s?Be:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a<r;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=ze(e[a][s],n[a][s],i)}})(c,v[i],m[i],h):l?(Be(c,v[i],m[i],h),n||(t[a]=Ye(c))):(y=void 0,y=this.interpolable?ze(v[i],m[i],h):(v=v[i],i=m[i],.5<h?i:v),n?this._additiveValue=y:t[a]=y),n&&this._addToTarget(t)))}},Ze.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(Pe(t[n],Xe),Fe(Xe,Xe,i,1),t[n]=Ye(Xe)):t[n]=t[n]+i:1===e?Fe(t[n],t[n],i,1):2===e&&Ve(t[n],t[n],i,1)},Ze);function Ze(t){this.keyframes=[],this.maxTime=0,this.arrDim=0,this.interpolable=!0,this._needsSort=!1,this._isAllValueEqual=!0,this._lastFrame=0,this._lastFramePercent=0,this.propName=t}var je=(Ke.prototype.getTarget=function(){return this._target},Ke.prototype.changeTarget=function(t){this._target=t},Ke.prototype.when=function(t,e){return this.whenWithKeys(t,e,R(e))},Ke.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r<n.length;r++){var o=n[r],a=i[o];if(!a){a=i[o]=new qe(o);var s,l=void 0,u=this._getAdditiveTrack(o);if(u?(l=(s=u.keyframes[u.keyframes.length-1])&&s.value,u.isValueColor&&l&&(l=Ye(l))):l=this._target[o],null==l)continue;0!==t&&a.addKeyframe(0,Ue(l)),this._trackKeys.push(o)}a.addKeyframe(t,Ue(e[o]))}return this._maxTime=Math.max(this._maxTime,t),this},Ke.prototype.pause=function(){this._clip.pause(),this._paused=!0},Ke.prototype.resume=function(){this._clip.resume(),this._paused=!1},Ke.prototype.isPaused=function(){return!!this._paused},Ke.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneList;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},Ke.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedList;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},Ke.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},Ke.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var r=n[i].getTrack(t);r&&(e=r)}return e},Ke.prototype.start=function(t,e){if(!(0<this._started)){this._started=1;for(var o=this,a=[],n=0;n<this._trackKeys.length;n++){var i=this._trackKeys[n],r=this._tracks[i],s=this._getAdditiveTrack(i),i=r.keyframes;r.prepare(s),r.needsAnimate()?a.push(r):r.interpolable||(i=i[i.length-1])&&(o._target[r.propName]=i.value)}return a.length||e?(e=new fe({life:this._maxTime,loop:this._loop,delay:this._delay,onframe:function(t){o._started=2;var e=o._additiveAnimators;if(e){for(var n=!1,i=0;i<e.length;i++)if(e[i]._clip){n=!0;break}n||(o._additiveAnimators=null)}for(i=0;i<a.length;i++)a[i].step(o._target,t);var r=o._onframeList;if(r)for(i=0;i<r.length;i++)r[i](o._target,t)},ondestroy:function(){o._doneCallback()}}),this._clip=e,this.animation&&this.animation.addClip(e),t&&"spline"!==t&&(e.easing=t)):this._doneCallback(),this}},Ke.prototype.stop=function(t){var e;this._clip&&(e=this._clip,t&&e.onframe(1),this._abortedCallback())},Ke.prototype.delay=function(t){return this._delay=t,this},Ke.prototype.during=function(t){return t&&(this._onframeList||(this._onframeList=[]),this._onframeList.push(t)),this},Ke.prototype.done=function(t){return t&&(this._doneList||(this._doneList=[]),this._doneList.push(t)),this},Ke.prototype.aborted=function(t){return t&&(this._abortedList||(this._abortedList=[]),this._abortedList.push(t)),this},Ke.prototype.getClip=function(){return this._clip},Ke.prototype.getTrack=function(t){return this._tracks[t]},Ke.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,r=0;r<t.length;r++){var o=n[t[r]];o&&(e?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}for(var a=!0,r=0;r<i.length;r++)if(!n[i[r]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},Ke.prototype.saveFinalToTarget=function(t,e){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var i,r=e[n],o=this._tracks[r];o&&!o.isFinished()&&((i=(i=o.keyframes)[i.length-1])&&(i=Ue(i.value),o.isValueColor&&(i=Ye(i)),t[r]=i))}}},Ke.prototype.__changeFinalValue=function(t,e){e=e||R(t);for(var n=0;n<e.length;n++){var i,r=e[n],o=this._tracks[r];o&&(1<(i=o.keyframes).length&&(i=i.pop(),o.addKeyframe(i.time,t[r]),o.prepare(o.getAdditiveTrack())))}},Ke);function Ke(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,(this._loop=e)&&n?v("Can' use additive animation on looped animation."):this._additiveAnimators=n}var $e=(Qe.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},Qe.prototype.clone=function(){return new Qe(this.x,this.y)},Qe.prototype.set=function(t,e){return this.x=t,this.y=e,this},Qe.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},Qe.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},Qe.prototype.scale=function(t){this.x*=t,this.y*=t},Qe.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},Qe.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},Qe.prototype.dot=function(t){return this.x*t.x+this.y*t.y},Qe.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Qe.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},Qe.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},Qe.prototype.distance=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Qe.prototype.distanceSquare=function(t){var e=this.x-t.x,t=this.y-t.y;return e*e+t*t},Qe.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},Qe.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}},Qe.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},Qe.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},Qe.set=function(t,e,n){t.x=e,t.y=n},Qe.copy=function(t,e){t.x=e.x,t.y=e.y},Qe.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},Qe.lenSquare=function(t){return t.x*t.x+t.y*t.y},Qe.dot=function(t,e){return t.x*e.x+t.y*e.y},Qe.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},Qe.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},Qe.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},Qe.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},Qe.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},Qe);function Qe(t,e){this.x=t||0,this.y=e||0}var Je=Math.min,tn=Math.max,en=new $e,nn=new $e,rn=new $e,on=new $e,an=new $e,sn=new $e,ln=(un.prototype.union=function(t){var e=Je(t.x,this.x),n=Je(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=tn(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=tn(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},un.prototype.applyTransform=function(t){un.applyTransform(this,this,t)},un.prototype.calculateTransform=function(t){var e,n,i=t.width/this.width,r=t.height/this.height,o=Qt();return ne(o,o,[-this.x,-this.y]),n=e=o,r=(i=[i,r])[0],i=i[1],e[0]=n[0]*r,e[1]=n[1]*i,e[2]=n[2]*r,e[3]=n[3]*i,e[4]=n[4]*r,e[5]=n[5]*i,ne(o,o,[t.x,t.y]),o},un.prototype.intersect=function(t,e){if(!t)return!1;t instanceof un||(t=un.create(t));var n,i,r,o,a,s,l=this,u=l.x,h=l.x+l.width,c=l.y,p=l.y+l.height,d=t.x,f=t.x+t.width,g=t.y,y=t.y+t.height,m=!(h<d||f<u||p<g||y<c);return e&&(n=1/0,i=0,r=Math.abs(h-d),o=Math.abs(f-u),a=Math.abs(p-g),s=Math.abs(y-c),l=Math.min(r,o),t=Math.min(a,s),h<d||f<u?i<l&&(i=l,r<o?$e.set(sn,-r,0):$e.set(sn,o,0)):l<n&&(n=l,r<o?$e.set(an,r,0):$e.set(an,-o,0)),p<g||y<c?i<t&&(i=t,a<s?$e.set(sn,0,-a):$e.set(sn,0,s)):l<n&&(n=l,a<s?$e.set(an,0,a):$e.set(an,0,-s))),e&&$e.copy(e,m?an:sn),m},un.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},un.prototype.clone=function(){return new un(this.x,this.y,this.width,this.height)},un.prototype.copy=function(t){un.copy(this,t)},un.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},un.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},un.prototype.isZero=function(){return 0===this.width||0===this.height},un.create=function(t){return new un(t.x,t.y,t.width,t.height)},un.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},un.applyTransform=function(t,e,n){if(n){if(n[1]<1e-5&&-1e-5<n[1]&&n[2]<1e-5&&-1e-5<n[2]){var i=n[0],r=n[3],o=n[4],a=n[5];return t.x=e.x*i+o,t.y=e.y*r+a,t.width=e.width*i,t.height=e.height*r,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}en.x=rn.x=e.x,en.y=on.y=e.y,nn.x=on.x=e.x+e.width,nn.y=rn.y=e.y+e.height,en.transform(n),on.transform(n),nn.transform(n),rn.transform(n),t.x=Je(en.x,nn.x,rn.x,on.x),t.y=Je(en.y,nn.y,rn.y,on.y);r=tn(en.x,nn.x,rn.x,on.x),n=tn(en.y,nn.y,rn.y,on.y);t.width=r-t.x,t.height=n-t.y}else t!==e&&un.copy(t,e)},un);function un(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}var hn,cn,pn={},dn="12px sans-serif";var fn={measureText:function(t,e){return hn=hn||k().getContext("2d"),cn!==e&&(cn=hn.font=e||dn),hn.measureText(t)}};function gn(t,e){var n=pn[e=e||dn],i=(n=n||(pn[e]=new _e(500))).get(t);return null==i&&(i=fn.measureText(t,e).width,n.put(t,i)),i}function yn(t,e,n,i){t=gn(t,e),e=xn(e),n=vn(0,t,n),i=_n(0,e,i);return new ln(n,i,t,e)}function mn(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return yn(r[0],e,n,i);for(var o=new ln(0,0,0,0),a=0;a<r.length;a++){var s=yn(r[a],e,n,i);0===a?o.copy(s):o.union(s)}return o}function vn(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function _n(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function xn(t){return gn("国",t)}function bn(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function wn(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",e="top";if(i instanceof Array)l+=bn(i[0],n.width),u+=bn(i[1],n.height),e=h=null;else switch(i){case"left":l-=r,u+=s,h="right",e="middle";break;case"right":l+=r+a,u+=s,e="middle";break;case"top":l+=a/2,u-=r,h="center",e="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",e="middle";break;case"insideLeft":l+=r,u+=s,e="middle";break;case"insideRight":l+=a-r,u+=s,h="right",e="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",e="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,e="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",e="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=e,t}var Sn=1;"undefined"!=typeof window&&(Sn=Math.max(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Mn=Sn,Tn="#333",Cn="#ccc",Dn="__zr_normal__",In=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],An={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},kn={},Ln=new ln(0,0,0,0),Pn=(On.prototype._init=function(t){this.attr(t)},On.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},On.prototype.beforeUpdate=function(){},On.prototype.afterUpdate=function(){},On.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},On.prototype.updateInnerText=function(t){var e,n,i,r,o,a,s,l,u,h,c=this._textContent;!c||c.ignore&&!t||(this.textConfig||(this.textConfig={}),a=(e=this.textConfig).local,i=n=void 0,r=!1,(u=c.attachedTransform).parent=a?this:null,l=!1,u.x=c.x,u.y=c.y,u.originX=c.originX,u.originY=c.originY,u.rotation=c.rotation,u.scaleX=c.scaleX,u.scaleY=c.scaleY,null!=e.position&&(s=Ln,e.layoutRect?s.copy(e.layoutRect):s.copy(this.getBoundingRect()),a||s.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(kn,e,s):wn(kn,e,s),u.x=kn.x,u.y=kn.y,n=kn.align,i=kn.verticalAlign,(o=e.origin)&&null!=e.rotation&&(h=t=void 0,h="center"===o?(t=.5*s.width,.5*s.height):(t=bn(o[0],s.width),bn(o[1],s.height)),l=!0,u.originX=-u.x+t+(a?0:s.x),u.originY=-u.y+h+(a?0:s.y))),null!=e.rotation&&(u.rotation=e.rotation),(h=e.offset)&&(u.x+=h[0],u.y+=h[1],l||(u.originX=-h[0],u.originY=-h[1])),a=null==e.inside?"string"==typeof e.position&&0<=e.position.indexOf("inside"):e.inside,s=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),h=u=l=void 0,a&&this.canBeInsideText()?(l=e.insideFill,u=e.insideStroke,null!=l&&"auto"!==l||(l=this.getInsideTextFill()),null!=u&&"auto"!==u||(u=this.getInsideTextStroke(l),h=!0)):(l=e.outsideFill,u=e.outsideStroke,null!=l&&"auto"!==l||(l=this.getOutsideFill()),null!=u&&"auto"!==u||(u=this.getOutsideStroke(l),h=!0)),(l=l||"#000")===s.fill&&u===s.stroke&&h===s.autoStroke&&n===s.align&&i===s.verticalAlign||(r=!0,s.fill=l,s.stroke=u,s.autoStroke=h,s.align=n,s.verticalAlign=i,c.setDefaultTextStyle(s)),r&&c.dirtyStyle(),c.markRedraw())},On.prototype.canBeInsideText=function(){return!0},On.prototype.getInsideTextFill=function(){return"#fff"},On.prototype.getInsideTextStroke=function(t){return"#000"},On.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Cn:Tn},On.prototype.getOutsideStroke=function(t){for(var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&Pe(e),i=(n=n||[255,255,255,1])[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,Re(n,"rgba")},On.prototype.traverse=function(t,e){},On.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},On.prototype.hide=function(){this.ignore=!0,this.markRedraw()},On.prototype.show=function(){this.ignore=!1,this.markRedraw()},On.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(V(t))for(var n=R(t),i=0;i<n.length;i++){var r=n[i];this.attrKV(r,t[r])}return this.markRedraw(),this},On.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],r=i.__fromStateTransition;r&&r!==Dn||(r=(r=i.targetName)?e[r]:e,i.saveFinalToTarget(r))}},On.prototype._innerSaveToNormal=function(t){var e=(e=this._normalState)||(this._normalState={});t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,In)},On.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var r=n[i];null==t[r]||r in e||(e[r]=this[r])}},On.prototype.hasState=function(){return 0<this.currentStates.length},On.prototype.getState=function(t){return this.states[t]},On.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},On.prototype.clearStates=function(t){this.useState(Dn,!1,t)},On.prototype.useState=function(t,e,n){var i=t===Dn;if(this.hasState()||!i){var r,o=this.currentStates,a=this.stateTransition;if(!(0<=L(o,t))||!e&&1!==o.length){if(this.stateProxy&&!i&&(r=this.stateProxy(t)),(r=r||this.states&&this.states[t])||i){i||this.saveCurrentToNormalState(r);o=!(!r||!r.hoverLayer);return o&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,r,this._normalState,e,!n&&!this.__inHover&&a&&0<a.duration,a),this._textContent&&this._textContent.useState(t,e),this._textGuide&&this._textGuide.useState(t,e),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!o&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~On.REDARAW_BIT),r}v("State "+t+" not exists.")}}},On.prototype.useStates=function(t,e){if(t.length){var n=[],i=this.currentStates,r=t.length,o=r===i.length;if(o)for(var a=0;a<r;a++)if(t[a]!==i[a]){o=!1;break}if(!o){for(a=0;a<r;a++){var s=t[a],l=void 0;this.stateProxy&&(l=this.stateProxy(s,t)),(l=l||this.states[s])&&n.push(l)}var u=!(!n[r-1]||!n[r-1].hoverLayer);u&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(n),c=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(t.join(","),h,this._normalState,!1,!e&&!this.__inHover&&c&&0<c.duration,c),this._textContent&&this._textContent.useStates(t),this._textGuide&&this._textGuide.useStates(t),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~On.REDARAW_BIT)}}else this.clearStates()},On.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},On.prototype.removeState=function(t){var e=L(this.currentStates,t);0<=e&&((t=this.currentStates.slice()).splice(e,1),this.useStates(t))},On.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=L(i,t),t=0<=L(i,e);0<=r?t?i.splice(r,1):i[r]=e:n&&!t&&i.push(e),this.useStates(i)},On.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},On.prototype._mergeStates=function(t){for(var e,n={},i=0;i<t.length;i++){var r=t[i];I(n,r),r.textConfig&&I(e=e||{},r.textConfig)}return e&&(n.textConfig=e),n},On.prototype._applyStateObj=function(t,e,n,i,r,o){var a=!(e&&i);e&&e.textConfig?(this.textConfig=I({},(i?this:n).textConfig),I(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<In.length;u++){var h=In[u],c=r&&An[h];e&&null!=e[h]?c?(l=!0,s[h]=e[h]):this[h]=e[h]:a&&null!=n[h]&&(c?(l=!0,s[h]=n[h]):this[h]=n[h])}if(!r)for(u=0;u<this.animators.length;u++){var p=this.animators[u],d=p.targetName;p.__changeFinalValue(d?(e||n)[d]:e||n)}l&&this._transitionState(t,s,o)},On.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");if(t===this)throw new Error("Recursive component attachment.");var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},On.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},On.prototype.getClipPath=function(){return this._clipPath},On.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},On.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},On.prototype.getTextContent=function(){return this._textContent},On.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.attachedTransform=new ce,this._attachComponent(t),this._textContent=t,this.markRedraw()}},On.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),I(this.textConfig,t),this.markRedraw()},On.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.attachedTransform=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},On.prototype.getTextGuideLine=function(){return this._textGuide},On.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},On.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},On.prototype.markRedraw=function(){this.__dirty|=On.REDARAW_BIT;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},On.prototype.dirty=function(){this.markRedraw()},On.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},On.prototype.addSelfToZr=function(t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)},On.prototype.removeSelfFromZr=function(t){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)},On.prototype.animate=function(t,e){var n=t?this[t]:this;if(n){e=new je(n,e);return this.addAnimator(e,t),e}v('Property "'+t+'" is not existed in element '+this.id)},On.prototype.addAnimator=function(n,t){var e=this.__zr,i=this;n.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,e=L(t,n);0<=e&&t.splice(e,1)}),this.animators.push(n),e&&e.animation.addAnimator(n),e&&e.wakeUp()},On.prototype.updateDuringAnimation=function(t){this.markRedraw()},On.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o<i;o++){var a=n[o];t&&t!==a.scope?r.push(a):a.stop(e)}return this.animators=r,this},On.prototype.animateTo=function(t,e,n){Rn(this,t,e,n)},On.prototype.animateFrom=function(t,e,n){Rn(this,t,e,n,!0)},On.prototype._transitionState=function(t,e,n,i){for(var r=Rn(this,e,n,i),o=0;o<r.length;o++)r[o].__fromStateTransition=t},On.prototype.getBoundingRect=function(){return null},On.prototype.getPaintRect=function(){return null},On.REDARAW_BIT=1,On.initDefaultProps=function(){var t=On.prototype;t.type="element",t.name="",t.ignore=!1,t.silent=!1,t.isGroup=!1,t.draggable=!1,t.dragging=!1,t.ignoreClip=!1,t.__inHover=!1,t.__dirty=On.REDARAW_BIT;var i={};function a(t,e,n){i[t+e+n]||(console.warn("DEPRECATED: '"+t+"' has been deprecated. use '"+e+"', '"+n+"' instead"),i[t+e+n]=!0)}function e(e,n,i,r){function o(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[r]},set:function(t){e[r]=t}})}Object.defineProperty(t,e,{get:function(){var t;return a(e,i,r),this[n]||(t=this[n]=[],o(this,t)),this[n]},set:function(t){a(e,i,r),this[i]=t[0],this[r]=t[1],this[n]=t,o(this,t)}})}Object.defineProperty&&(!w.browser.ie||8<w.browser.version)&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))}(),On);function On(t){this.id=m++,this.animators=[],this.currentStates=[],this.states={},this._init(t)}function Rn(t,e,n,i,r){var o=[];!function t(e,n,i,r,o,a,s,l){var u=[];var h=[];var c=R(r);var p=o.duration;var d=o.delay;var f=o.additive;var g=o.setToFinal;var y=!V(a);for(var m=0;m<c.length;m++){var v=c[m];null!=i[v]&&null!=r[v]&&(y||a[v])?V(r[v])&&!P(r[v])?n?l||(i[v]=r[v],e.updateDuringAnimation(n)):t(e,v,i[v],r[v],o,a&&a[v],s,l):(u.push(v),h.push(v)):l||(i[v]=r[v],e.updateDuringAnimation(n),h.push(v))}var _=u.length;if(0<_||o.force&&!s.length){for(var x=e.animators,b=[],w=0;w<x.length;w++)x[w].targetName===n&&b.push(x[w]);if(!f&&b.length)for(var w=0;w<b.length;w++){var S=b[w].stopTracks(h);S&&(S=L(x,b[w]),x.splice(S,1))}var M=void 0,T=void 0,C=void 0;if(l){T={},g&&(M={});for(var w=0;w<_;w++){var v=u[w];T[v]=i[v],g?M[v]=r[v]:i[v]=r[v]}}else if(g){C={};for(var w=0;w<_;w++){var v=u[w];C[v]=Ue(i[v]),Nn(i,r,v)}}var f=new je(i,!1,f?b:null);f.targetName=n,o.scope&&(f.scope=o.scope),g&&M&&f.whenWithKeys(0,M,u),C&&f.whenWithKeys(0,C,u),f.whenWithKeys(null==p?500:p,l?T:r,u).delay(d||0),e.addAnimator(f,n),s.push(f)}}(t,"",t,e,n=n||{},i,o,r);function a(){u=!0,--l<=0&&(u?h&&h():c&&c())}function s(){--l<=0&&(u?h&&h():c&&c())}var l=o.length,u=!1,h=n.done,c=n.aborted;l||h&&h(),0<o.length&&n.during&&o[0].during(function(t,e){n.during(e)});for(var p=0;p<o.length;p++){var d=o[p];d.done(a),d.aborted(s),d.start(n.easing,n.force)}return o}function En(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}function Nn(t,e,n){if(P(e[n]))if(P(t[n])||(t[n]=[]),W(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),En(t[n],e[n],i))}else{var r=e[n],o=t[n],a=r.length;if(P(r[0]))for(var s=r[0].length,l=0;l<a;l++)o[l]?En(o[l],r[l],s):o[l]=Array.prototype.slice.call(r[l]);else En(o,r,a);o.length=r.length}else t[n]=e[n]}x(Pn,bt),x(Pn,ce);var zn=32,Bn=7;function Fn(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r<n&&i(t[r],t[r-1])<0;)r++;!function(t,e,n){n--;for(;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,r)}else for(;r<n&&0<=i(t[r],t[r-1]);)r++;return r-e}function Vn(t,e,n,i,r){for(i===e&&i++;i<n;i++){for(var o,a=t[i],s=e,l=i;s<l;)r(a,t[o=s+l>>>1])<0?l=o:s=1+o;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Hn(t,e,n,i,r,o){var a=0,s=0,l=1;if(0<o(t,e[n+r])){for(s=i-r;l<s&&0<o(t,e[n+r+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&o(t,e[n+r-l])<=0;)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s);i=a,a=r-l,l=r-i}for(a++;a<l;){var u=a+(l-a>>>1);0<o(t,e[n+u])?a=u+1:l=u}return l}function Wn(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;l<s&&o(t,e[n+r-l])<0;)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=a,a=r-l,l=r-u}else{for(s=i-r;l<s&&0<=o(t,e[n+r+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=r,l+=r}for(a++;a<l;){var h=a+(l-a>>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function Gn(f,g){var o,a,y=Bn,s=0,m=(f.length,[]);function e(t){var e=o[t],n=a[t],i=o[t+1],r=a[t+1];a[t]=n+r,t===s-3&&(o[t+1]=o[t+2],a[t+1]=a[t+2]),s--;t=Wn(f[i],f,e,n,0,g);e+=t,0!=(n-=t)&&0!==(r=Hn(f[e+n-1],f,i,r,r-1,g))&&(n<=r?function(t,e,n,i){var r=0;for(r=0;r<e;r++)m[r]=f[t+r];var o=0,a=n,s=t;if(f[s++]=f[a++],0==--i){for(r=0;r<e;r++)f[s+r]=m[o+r];return}if(1===e){for(r=0;r<i;r++)f[s+r]=f[a+r];return f[s+i]=m[o]}var l,u,h,c=y;for(;;){u=l=0,h=!1;do{if(g(f[a],m[o])<0){if(f[s++]=f[a++],u++,(l=0)==--i){h=!0;break}}else if(f[s++]=m[o++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=Wn(f[a],m,o,e,0,g))){for(r=0;r<l;r++)f[s+r]=m[o+r];if(s+=l,o+=l,(e-=l)<=1){h=!0;break}}if(f[s++]=f[a++],0==--i){h=!0;break}if(0!==(u=Hn(m[o],f,a,i,0,g))){for(r=0;r<u;r++)f[s+r]=f[a+r];if(s+=u,a+=u,0===(i-=u)){h=!0;break}}if(f[s++]=m[o++],1==--e){h=!0;break}}while(c--,Bn<=l||Bn<=u);if(h)break;c<0&&(c=0),c+=2}if((y=c)<1&&(y=1),1===e){for(r=0;r<i;r++)f[s+r]=f[a+r];f[s+i]=m[o]}else{if(0===e)throw new Error;for(r=0;r<e;r++)f[s+r]=m[o+r]}}:function(t,e,n,i){var r=0;for(r=0;r<i;r++)m[r]=f[n+r];var o=t+e-1,a=i-1,s=n+i-1,l=0,u=0;if(f[s--]=f[o--],0==--e){for(l=s-(i-1),r=0;r<i;r++)f[l+r]=m[r];return}if(1===i){for(u=(s-=e)+1,l=(o-=e)+1,r=e-1;0<=r;r--)f[u+r]=f[l+r];return f[s]=m[a]}var h=y;for(;;){var c=0,p=0,d=!1;do{if(g(m[a],f[o])<0){if(f[s--]=f[o--],c++,(p=0)==--e){d=!0;break}}else if(f[s--]=m[a--],p++,c=0,1==--i){d=!0;break}}while((c|p)<h);if(d)break;do{if(0!==(c=e-Wn(m[a],f,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(o-=c)+1,r=c-1;0<=r;r--)f[u+r]=f[l+r];if(0===e){d=!0;break}}if(f[s--]=m[a--],1==--i){d=!0;break}if(0!==(p=i-Hn(f[o],m,0,i,i-1,g))){for(i-=p,u=(s-=p)+1,l=(a-=p)+1,r=0;r<p;r++)f[u+r]=m[l+r];if(i<=1){d=!0;break}}if(f[s--]=f[o--],0==--e){d=!0;break}}while(h--,Bn<=c||Bn<=p);if(d)break;h<0&&(h=0),h+=2}(y=h)<1&&(y=1);if(1===i){for(u=(s-=e)+1,l=(o-=e)+1,r=e-1;0<=r;r--)f[u+r]=f[l+r];f[s]=m[a]}else{if(0===i)throw new Error;for(l=s-(i-1),r=0;r<i;r++)f[l+r]=m[r]}})(e,n,i,r)}return o=[],a=[],{mergeRuns:function(){for(;1<s;){var t=s-2;if(1<=t&&a[t-1]<=a[t]+a[t+1]||2<=t&&a[t-2]<=a[t]+a[t-1])a[t-1]<a[t+1]&&t--;else if(a[t]>a[t+1])break;e(t)}},forceMergeRuns:function(){for(;1<s;){var t=s-2;0<t&&a[t-1]<a[t+1]&&t--,e(t)}},pushRun:function(t,e){o[s]=t,a[s]=e,s+=1}}}function Un(t,e,n,i){n=n||0;var r=(i=i||t.length)-n;if(!(r<2)){var o=0;if(r<zn)Vn(t,n,i,n+(o=Fn(t,n,i,e)),e);else{var a,s=Gn(t,e),l=function(t){for(var e=0;zn<=t;)e|=1&t,t>>=1;return t+e}(r);do{}while((o=Fn(t,n,i,e))<l&&(l<(a=r)&&(a=l),Vn(t,n,n+a,n+o,e),o=a),s.pushRun(n,o),s.mergeRuns(),n+=o,0!==(r-=o));s.forceMergeRuns()}}}var Yn=!1;function Xn(){Yn||(Yn=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function qn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Zn=(jn.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},jn.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},jn.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,r=e.length;i<r;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,w.canvasSupported&&Un(n,qn)},jn.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e=e?e.slice():[];for(var r=i,o=t;r;)r.parent=o,r.updateTransform(),e.push(r),r=(o=r).getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=Pn.REDARAW_BIT),this._updateAndAddDisplayable(l,e,n)}t.__dirty=0}else{var u=t;e&&e.length?u.__clipPaths=e:u.__clipPaths&&0<u.__clipPaths.length&&(u.__clipPaths=[]),isNaN(u.z)&&(Xn(),u.z=0),isNaN(u.z2)&&(Xn(),u.z2=0),isNaN(u.zlevel)&&(Xn(),u.zlevel=0),this._displayList[this._displayListLen++]=u}u=t.getDecalElement&&t.getDecalElement();u&&this._updateAndAddDisplayable(u,e,n);u=t.getTextGuideLine();u&&this._updateAndAddDisplayable(u,e,n);u=t.getTextContent();u&&this._updateAndAddDisplayable(u,e,n)}},jn.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},jn.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var i=L(this._roots,t);0<=i&&this._roots.splice(i,1)}},jn.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},jn.prototype.getRoots=function(){return this._roots},jn.prototype.dispose=function(){this._displayList=null,this._roots=null},jn);function jn(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=qn}var Kn,$n="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},Qn=(l(Jn,Kn=bt),Jn.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?((this._clipsTail.next=t).prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},Jn.prototype.addAnimator=function(t){t.animation=this;t=t.getClip();t&&this.addClip(t)},Jn.prototype.removeClip=function(t){var e,n;t.animation&&(e=t.prev,n=t.next,e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null)},Jn.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},Jn.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;)var r=i.next,i=(i.step(e,n)&&(i.ondestroy&&i.ondestroy(),this.removeClip(i)),r);this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},Jn.prototype._startLoop=function(){var e=this;this._running=!0,$n(function t(){e._running&&($n(t),e._paused||e.update())})},Jn.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},Jn.prototype.stop=function(){this._running=!1},Jn.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},Jn.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},Jn.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},Jn.prototype.isFinished=function(){return null==this._clipsHead},Jn.prototype.animate=function(t,e){e=e||{},this.start();e=new je(t,e.loop);return this.addAnimator(e),e},Jn);function Jn(t){var e=Kn.call(this)||this;return e._running=!1,e._time=0,e._pausedTime=0,e._pauseStart=0,e._paused=!1,t=t||{},e.stage=t.stage||{},e.onframe=t.onframe||function(){},e}var ti,ei=w.domSupported,ni=(ti={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Bh=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:O(Bh,function(t){var e=t.replace("mouse","pointer");return ti.hasOwnProperty(e)?e:t})}),ii=["mousemove","mouseup"],ri=["pointermove","pointerup"],oi=!1;function ai(t){t=t.pointerType;return"pen"===t||"touch"===t}function si(t){t&&(t.zrByTouch=!0)}function li(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var ui=function(t,e){this.stopPropagation=at,this.stopImmediatePropagation=at,this.preventDefault=at,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},hi={mousedown:function(t){t=Et(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Et(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=Et(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){var e;t.target===this.dom&&(t=Et(this.dom,t),this.__pointerCapturing&&(t.zrEventControl="no_globalout"),e=t.toElement||t.relatedTarget,t.zrIsToLocalDOM=li(this,e),this.trigger("mouseout",t))},wheel:function(t){oi=!0,t=Et(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){oi||(t=Et(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){si(t=Et(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),hi.mousemove.call(this,t),hi.mousedown.call(this,t)},touchmove:function(t){si(t=Et(this.dom,t)),this.handler.processGesture(t,"change"),hi.mousemove.call(this,t)},touchend:function(t){si(t=Et(this.dom,t)),this.handler.processGesture(t,"end"),hi.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&hi.click.call(this,t)},pointerdown:function(t){hi.mousedown.call(this,t)},pointermove:function(t){ai(t)||hi.mousemove.call(this,t)},pointerup:function(t){hi.mouseup.call(this,t)},pointerout:function(t){ai(t)||hi.mouseout.call(this,t)}};E(["click","dblclick","contextmenu"],function(e){hi[e]=function(t){t=Et(this.dom,t),this.trigger(e,t)}});var ci={pointermove:function(t){ai(t)||ci.mousemove.call(this,t)},pointerup:function(t){ci.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 pi(i,r){var o=r.domHandlers;w.pointerEventsSupported?E(ni.pointer,function(e){fi(r,e,function(t){o[e].call(i,t)})}):(w.touchEventsSupported&&E(ni.touch,function(n){fi(r,n,function(t){var e;o[n].call(i,t),(e=r).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),E(ni.mouse,function(e){fi(r,e,function(t){t=Rt(t),r.touching||o[e].call(i,t)})}))}function di(r,o){function t(i){fi(o,i,function(t){var e,n;t=Rt(t),li(r,t.target)||(n=t,t=Et((e=r).dom,new ui(e,n),!0),o.domHandlers[i].call(r,t))},{capture:!0})}w.pointerEventsSupported?E(ri,t):w.touchEventsSupported||E(ii,t)}function fi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,t=t.domTarget,e=e,n=n,i=i,At?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}function gi(t){var e,n,i,r,o,a=t.mounted;for(e in a)a.hasOwnProperty(e)&&(n=t.domTarget,r=a[i=e],o=t.listenerOpts[e],At?n.removeEventListener(i,r,o):n.detachEvent("on"+i,r));t.mounted={}}var yi,mi=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},vi=(l(_i,yi=bt),_i.prototype.dispose=function(){gi(this._localHandlerScope),ei&&gi(this._globalHandlerScope)},_i.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},_i.prototype.__togglePointerCapture=function(t){var e;this.__mayPointerCapture=null,ei&&+this.__pointerCapturing^+t&&(this.__pointerCapturing=t,e=this._globalHandlerScope,t?di(this,e):gi(e))},_i);function _i(t,e){var n=yi.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=e,n._localHandlerScope=new mi(t,hi),ei&&(n._globalHandlerScope=new mi(document,ci)),pi(n,n._localHandlerScope),n}var xi="__zr_style_"+Math.round(10*Math.random()),bi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},wi={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};bi[xi]=!0;var Si,Mi=["z","z2","invisible"],Ti=(l(Ci,Si=Pn),Ci.prototype._init=function(t){for(var e=R(t),n=0;n<e.length;n++){var i=e[n];"style"===i?this.useStyle(t[i]):Si.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},Ci.prototype.beforeBrush=function(){},Ci.prototype.afterBrush=function(){},Ci.prototype.innerBeforeBrush=function(){},Ci.prototype.innerAfterBrush=function(){},Ci.prototype.shouldBePainted=function(t,e,n,i){var r=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(t,e,n){Di.copy(t.getBoundingRect()),t.transform&&Di.applyTransform(t.transform);return Ii.width=e,Ii.height=n,!Di.intersect(Ii)}(this,t,e)||r&&!r[0]&&!r[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(i&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},Ci.prototype.contain=function(t,e){return this.rectContain(t,e)},Ci.prototype.traverse=function(t,e){t.call(e,this)},Ci.prototype.rectContain=function(t,e){e=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(e[0],e[1])},Ci.prototype.getPaintRect=function(){var t,e,n,i,r,o=this._paintRect;return this._paintRect&&!this.__dirty||(t=this.transform,e=this.getBoundingRect(),r=(i=this.style).shadowBlur||0,n=i.shadowOffsetX||0,i=i.shadowOffsetY||0,o=this._paintRect||(this._paintRect=new ln(0,0,0,0)),t?ln.applyTransform(o,e,t):o.copy(e),(r||n||i)&&(o.width+=2*r+Math.abs(n),o.height+=2*r+Math.abs(i),o.x=Math.min(o.x,o.x+n-r),o.y=Math.min(o.y,o.y+i-r)),r=this.dirtyRectTolerance,o.isZero()||(o.x=Math.floor(o.x-r),o.y=Math.floor(o.y-r),o.width=Math.ceil(o.width+1+2*r),o.height=Math.ceil(o.height+1+2*r))),o},Ci.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new ln(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},Ci.prototype.getPrevPaintRect=function(){return this._prevPaintRect},Ci.prototype.animateStyle=function(t){return this.animate("style",t)},Ci.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},Ci.prototype.attrKV=function(t,e){"style"!==t?Si.prototype.attrKV.call(this,t,e):this.style?this.setStyle(e):this.useStyle(e)},Ci.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:I(this.style,t),this.dirtyStyle(),this},Ci.prototype.dirtyStyle=function(){this.markRedraw(),this.__dirty|=Ci.STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},Ci.prototype.dirty=function(){this.dirtyStyle()},Ci.prototype.styleChanged=function(){return!!(this.__dirty&Ci.STYLE_CHANGED_BIT)},Ci.prototype.styleUpdated=function(){this.__dirty&=~Ci.STYLE_CHANGED_BIT},Ci.prototype.createStyle=function(t){return rt(bi,t)},Ci.prototype.useStyle=function(t){t[xi]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},Ci.prototype.isStyleObject=function(t){return t[xi]},Ci.prototype._innerSaveToNormal=function(t){Si.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.style&&!e.style&&(e.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,e,Mi)},Ci.prototype._applyStateObj=function(t,e,n,i,r,o){Si.prototype._applyStateObj.call(this,t,e,n,i,r,o);var a,s=!(e&&i);if(e&&e.style?r?i?a=e.style:(a=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(a,e.style)):(a=this._mergeStyle(this.createStyle(),(i?this:n).style),this._mergeStyle(a,e.style)):s&&(a=n.style),a)if(r){var l=this.style;if(this.style=this.createStyle(s?{}:l),s)for(var u=R(l),h=0;h<u.length;h++){(p=u[h])in a&&(a[p]=a[p],this.style[p]=l[p])}for(var c=R(a),h=0;h<c.length;h++){var p=c[h];this.style[p]=this.style[p]}this._transitionState(t,{style:a},o,this.getAnimationStyleProps())}else this.useStyle(a);for(h=0;h<Mi.length;h++){p=Mi[h];e&&null!=e[p]?this[p]=e[p]:s&&null!=n[p]&&(this[p]=n[p])}},Ci.prototype._mergeStates=function(t){for(var e,n=Si.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var r=t[i];r.style&&(e=e||{},this._mergeStyle(e,r.style))}return e&&(n.style=e),n},Ci.prototype._mergeStyle=function(t,e){return I(t,e),t},Ci.prototype.getAnimationStyleProps=function(){return wi},Ci.STYLE_CHANGED_BIT=2,Ci.initDefaultProps=((rd=Ci.prototype).type="displayable",rd.invisible=!1,rd.z=0,rd.z2=0,rd.zlevel=0,rd.culling=!1,rd.cursor="pointer",rd.rectHover=!1,rd.incremental=!1,rd._rect=null,rd.dirtyRectTolerance=0,void(rd.__dirty=Pn.REDARAW_BIT|Ci.STYLE_CHANGED_BIT)),Ci);function Ci(t){return Si.call(this,t)||this}var Di=new ln(0,0,0,0),Ii=new ln(0,0,0,0);var Ai=Math.pow,ki=Math.sqrt,Li=1e-8,Pi=1e-4,Oi=ki(3),Ri=1/3,Ei=st(),Ni=st(),zi=st();function Bi(t){return-Li<t&&t<Li}function Fi(t){return Li<t||t<-Li}function Vi(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function Hi(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Wi(t,e,n,i,r,o){var a,s,l,u=i+3*(e-n)-t,h=3*(n-2*e+t),i=3*(e-t),n=t-r,e=h*h-3*u*i,t=h*i-9*u*n,r=i*i-3*h*n,n=0;return Bi(e)&&Bi(t)?Bi(h)?o[0]=0:0<=(s=-i/h)&&s<=1&&(o[n++]=s):Bi(i=t*t-4*e*r)?(l=-(r=t/e)/2,0<=(s=-h/u+r)&&s<=1&&(o[n++]=s),0<=l&&l<=1&&(o[n++]=l)):0<i?(a=e*h+1.5*u*(-t-(i=ki(i))),0<=(s=(-h-((i=(i=e*h+1.5*u*(-t+i))<0?-Ai(-i,Ri):Ai(i,Ri))+(a=a<0?-Ai(-a,Ri):Ai(a,Ri))))/(3*u))&&s<=1&&(o[n++]=s)):(a=(2*e*h-3*u*t)/(2*ki(e*e*e)),t=Math.acos(a)/3,s=(-h-2*(a=ki(e))*(e=Math.cos(t)))/(3*u),l=(-h+a*(e+Oi*Math.sin(t)))/(3*u),u=(-h+a*(e-Oi*Math.sin(t)))/(3*u),0<=s&&s<=1&&(o[n++]=s),0<=l&&l<=1&&(o[n++]=l),0<=u&&u<=1&&(o[n++]=u)),n}function Gi(t,e,n,i,r){var o,a=6*n-12*e+6*t,i=9*e+3*i-3*t-9*n,n=3*e-3*t,e=0;return Bi(i)?Fi(a)&&0<=(o=-n/a)&&o<=1&&(r[e++]=o):Bi(t=a*a-4*i*n)?r[0]=-a/(2*i):0<t&&(t=(-a-(n=ki(t)))/(2*i),0<=(o=(-a+n)/(2*i))&&o<=1&&(r[e++]=o),0<=t&&t<=1&&(r[e++]=t)),e}function Ui(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,e=(i-n)*r+n,n=(s-a)*r+a,s=(e-s)*r+s,r=(s-n)*r+n;o[0]=t,o[1]=a,o[2]=n,o[3]=r,o[4]=r,o[5]=s,o[6]=e,o[7]=i}function Yi(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g=.005,y=1/0;Ei[0]=l,Ei[1]=u;for(var m=0;m<1;m+=.05)Ni[0]=Vi(t,n,r,a,m),Ni[1]=Vi(e,i,o,s,m),(d=dt(Ei,Ni))<y&&(c=m,y=d);y=1/0;for(var v=0;v<32&&!(g<Pi);v++)f=c-g,p=c+g,Ni[0]=Vi(t,n,r,a,f),Ni[1]=Vi(e,i,o,s,f),d=dt(Ni,Ei),0<=f&&d<y?(c=f,y=d):(zi[0]=Vi(t,n,r,a,p),zi[1]=Vi(e,i,o,s,p),f=dt(zi,Ei),p<=1&&f<y?(c=p,y=f):g*=.5);return h&&(h[0]=Vi(t,n,r,a,c),h[1]=Vi(e,i,o,s,c)),ki(y)}function Xi(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function qi(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function Zi(t,e,n){n=t+n-2*e;return 0==n?.5:(t-e)/n}function ji(t,e,n,i,r){var o=(e-t)*i+t,e=(n-e)*i+e,i=(e-o)*i+o;r[0]=t,r[1]=o,r[2]=i,r[3]=i,r[4]=e,r[5]=n}function Ki(t,e,n,i,r,o,a,s,l){var u,h=.005,c=1/0;Ei[0]=a,Ei[1]=s;for(var p=0;p<1;p+=.05){Ni[0]=Xi(t,n,r,p),Ni[1]=Xi(e,i,o,p),(y=dt(Ei,Ni))<c&&(u=p,c=y)}c=1/0;for(var d=0;d<32&&!(h<Pi);d++){var f=u-h,g=u+h;Ni[0]=Xi(t,n,r,f),Ni[1]=Xi(e,i,o,f);var y=dt(Ni,Ei);0<=f&&y<c?(u=f,c=y):(zi[0]=Xi(t,n,r,g),zi[1]=Xi(e,i,o,g),f=dt(zi,Ei),g<=1&&f<c?(u=g,c=f):h*=.5)}return l&&(l[0]=Xi(t,n,r,u),l[1]=Xi(e,i,o,u)),ki(c)}var $i=Math.min,Qi=Math.max,Ji=Math.sin,tr=Math.cos,er=2*Math.PI,nr=st(),ir=st(),rr=st();function or(t,e,n,i,r,o){r[0]=$i(t,n),r[1]=$i(e,i),o[0]=Qi(t,n),o[1]=Qi(e,i)}var ar=[],sr=[];var lr={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ur=[],hr=[],cr=[],pr=[],dr=[],fr=[],gr=Math.min,yr=Math.max,mr=Math.cos,vr=Math.sin,_r=Math.sqrt,xr=Math.abs,br=Math.PI,wr=2*br,Sr="undefined"!=typeof Float32Array,Mr=[];function Tr(t){return Math.round(t/br*1e8)/1e8%2*br}function Cr(t,e){var n=Tr(t[0]);n<0&&(n+=wr);var i=n-t[0],r=t[1];r+=i,!e&&wr<=r-n?r=n+wr:e&&wr<=n-r?r=n-wr:!e&&r<n?r=n+(wr-Tr(n-r)):e&&n<r&&(r=n-(wr-Tr(r-n))),t[0]=n,t[1]=r}var Dr=(Ir.prototype.increaseVersion=function(){this._version++},Ir.prototype.getVersion=function(){return this._version},Ir.prototype.setScale=function(t,e,n){0<(n=n||0)&&(this._ux=xr(n/Mn/t)||0,this._uy=xr(n/Mn/e)||0)},Ir.prototype.setDPR=function(t){this.dpr=t},Ir.prototype.setContext=function(t){this._ctx=t},Ir.prototype.getContext=function(){return this._ctx},Ir.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},Ir.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},Ir.prototype.moveTo=function(t,e){return this.addData(lr.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},Ir.prototype.lineTo=function(t,e){var n=xr(t-this._xi)>this._ux||xr(e-this._yi)>this._uy||this._len<5;return this.addData(lr.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},Ir.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData(lr.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},Ir.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(lr.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},Ir.prototype.arc=function(t,e,n,i,r,o){Mr[0]=i,Mr[1]=r,Cr(Mr,o),i=Mr[0];var a=(r=Mr[1])-i;return this.addData(lr.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=mr(r)*n+t,this._yi=vr(r)*n+e,this},Ir.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},Ir.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(lr.R,t,e,n,i),this},Ir.prototype.closePath=function(){this.addData(lr.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},Ir.prototype.fill=function(t){t&&t.fill(),this.toStatic()},Ir.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},Ir.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e,this._needsDash=!0}else this._lineDash=null,this._needsDash=!1;return this},Ir.prototype.setLineDashOffset=function(t){return this._dashOffset=t,this},Ir.prototype.len=function(){return this._len},Ir.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Sr||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},Ir.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,r=0;r<e;r++)n+=t[r].len();Sr&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(r=0;r<e;r++)for(var o=t[r].data,a=0;a<o.length;a++)this.data[i++]=o[a];this._len=i},Ir.prototype.addData=function(t,e,n,i,r,o,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var h=0;h<arguments.length;h++)u[this._len++]=arguments[h]}},Ir.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},Ir.prototype._dashedLineTo=function(t,e){var n,i,r=this._dashSum,o=this._lineDash,a=this._ctx,s=this._dashOffset,l=this._xi,u=this._yi,h=t-l,c=e-u,p=_r(h*h+c*c),d=l,f=u,g=o.length;for(s<0&&(s=r+s),d-=(s%=r)*(h/=p),f-=s*(c/=p);0<h&&d<=t||h<0&&t<=d||0===h&&(0<c&&f<=e||c<0&&e<=f);)d+=h*(n=o[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,0<h&&d<l||h<0&&l<d||0<c&&f<u||c<0&&u<f||a[i%2?"moveTo":"lineTo"]((0<=h?gr:yr)(d,t),(0<=c?gr:yr)(f,e));h=d-t,c=f-e,this._dashOffset=-_r(h*h+c*c)},Ir.prototype._dashedBezierTo=function(t,e,n,i,r,o){var a,s,l,u,h,c=this._ctx,p=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._xi,y=this._yi,m=0,v=this._dashIdx,_=f.length,x=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=Vi(g,t,n,r,a+.1)-Vi(g,t,n,r,a),l=Vi(y,e,i,o,a+.1)-Vi(y,e,i,o,a),m+=_r(s*s+l*l);for(;v<_&&!(d<(x+=f[v]));v++);for(a=(x-d)/m;a<=1;)u=Vi(g,t,n,r,a),h=Vi(y,e,i,o,a),v%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[v]/m,v=(v+1)%_;v%2!=0&&c.lineTo(r,o),s=r-u,l=o-h,this._dashOffset=-_r(s*s+l*l)},Ir.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},Ir.prototype.toStatic=function(){var t;!this._saveData||(t=this.data)instanceof Array&&(t.length=this._len,Sr&&11<this._len&&(this.data=new Float32Array(t)))},Ir.prototype.getBoundingRect=function(){cr[0]=cr[1]=dr[0]=dr[1]=Number.MAX_VALUE,pr[0]=pr[1]=fr[0]=fr[1]=-Number.MAX_VALUE;for(var t,e,n,i=this.data,r=0,o=0,a=0,s=0,l=0;l<this._len;){var u=i[l++],h=1===l;switch(h&&(a=r=i[l],s=o=i[l+1]),u){case lr.M:r=a=i[l++],o=s=i[l++],dr[0]=a,dr[1]=s,fr[0]=a,fr[1]=s;break;case lr.L:or(r,o,i[l],i[l+1],dr,fr),r=i[l++],o=i[l++];break;case lr.C:!function(t,e,n,i,r,o,a,s,l,u){var h=Gi,c=Vi,p=h(t,n,r,a,ar);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<p;d++){var f=c(t,n,r,a,ar[d]);l[0]=$i(f,l[0]),u[0]=Qi(f,u[0])}for(p=h(e,i,o,s,sr),d=0;d<p;d++){var g=c(e,i,o,s,sr[d]);l[1]=$i(g,l[1]),u[1]=Qi(g,u[1])}l[0]=$i(t,l[0]),u[0]=Qi(t,u[0]),l[0]=$i(a,l[0]),u[0]=Qi(a,u[0]),l[1]=$i(e,l[1]),u[1]=Qi(e,u[1]),l[1]=$i(s,l[1]),u[1]=Qi(s,u[1])}(r,o,i[l++],i[l++],i[l++],i[l++],i[l],i[l+1],dr,fr),r=i[l++],o=i[l++];break;case lr.Q:c=r,g=o,t=i[l++],e=i[l++],p=i[l],y=i[l+1],n=dr,f=fr,m=d=m=d=u=void 0,u=Xi,d=Qi($i((m=Zi)(c,t,p),1),0),m=Qi($i(m(g,e,y),1),0),d=u(c,t,p,d),m=u(g,e,y,m),n[0]=$i(c,p,d),n[1]=$i(g,y,m),f[0]=Qi(c,p,d),f[1]=Qi(g,y,m),r=i[l++],o=i[l++];break;case lr.A:var c=i[l++],p=i[l++],d=i[l++],f=i[l++],g=i[l++],y=i[l++]+g;l+=1;var m=!i[l++];h&&(a=mr(g)*d+c,s=vr(g)*f+p),function(t,e,n,i,r,o,a,s,l){var u=yt,h=mt,c=Math.abs(r-o);if(c%er<1e-4&&1e-4<c)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;nr[0]=tr(r)*n+t,nr[1]=Ji(r)*i+e,ir[0]=tr(o)*n+t,ir[1]=Ji(o)*i+e,u(s,nr,ir),h(l,nr,ir),(r%=er)<0&&(r+=er),(o%=er)<0&&(o+=er),o<r&&!a?o+=er:r<o&&a&&(r+=er),a&&(a=o,o=r,r=a);for(var p=0;p<o;p+=Math.PI/2)r<p&&(rr[0]=tr(p)*n+t,rr[1]=Ji(p)*i+e,u(s,rr,s),h(l,rr,l))}(c,p,d,f,g,y,m,dr,fr),r=mr(y)*d+c,o=vr(y)*f+p;break;case lr.R:or(a=r=i[l++],s=o=i[l++],a+i[l++],s+i[l++],dr,fr);break;case lr.Z:r=a,o=s}yt(cr,cr,dr),mt(pr,pr,fr)}return 0===l&&(cr[0]=cr[1]=pr[0]=pr[1]=0),new ln(cr[0],cr[1],pr[0]-cr[0],pr[1]-cr[1])},Ir.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,r=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,h=0,c=0;c<e;){var p=t[c++],d=1===c;d&&(a=r=t[c],s=o=t[c+1]);var f=-1;switch(p){case lr.M:r=a=t[c++],o=s=t[c++];break;case lr.L:var g=t[c++],y=(_=t[c++])-o;(xr(C=g-r)>n||xr(y)>i||c===e-1)&&(f=Math.sqrt(C*C+y*y),r=g,o=_);break;case lr.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],b=t[c++],f=function(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=Vi(t,n,r,a,f),y=Vi(e,i,o,s,f),m=g-u,f=y-h;c+=Math.sqrt(m*m+f*f),u=g,h=y}return c}(r,o,m,v,g,_,x,b,10),r=x,o=b;break;case lr.Q:f=function(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=Xi(t,n,r,p),f=Xi(e,i,o,p),g=d-s,p=f-l;u+=Math.sqrt(g*g+p*p),s=d,l=f}return u}(r,o,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case lr.A:var w=t[c++],S=t[c++],M=t[c++],T=t[c++],p=t[c++],x=t[c++],b=x+p;c+=1;t[c++];d&&(a=mr(p)*M+w,s=vr(p)*T+S),f=yr(M,T)*gr(wr,Math.abs(x)),r=mr(b)*M+w,o=vr(b)*T+S;break;case lr.R:a=r=t[c++],s=o=t[c++];f=2*t[c++]+2*t[c++];break;case lr.Z:var C=a-r,y=s-o;f=Math.sqrt(C*C+y*y),r=a,o=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},Ir.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,c=this._ux,p=this._uy,d=this._len,f=e<1,g=0,y=0;if(!f||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var m=0;m<d;){var v=h[m++],_=1===m;switch(_&&(n=r=h[m],i=o=h[m+1]),v){case lr.M:n=r=h[m++],i=o=h[m++],t.moveTo(r,o);break;case lr.L:if(a=h[m++],s=h[m++],xr(a-r)>c||xr(s-o)>p||m===d-1){if(f){if(u<g+(N=l[y++])){var x=(u-g)/N;t.lineTo(r*(1-x)+a*x,o*(1-x)+s*x);break t}g+=N}t.lineTo(a,s),r=a,o=s}break;case lr.C:var b=h[m++],w=h[m++],S=h[m++],M=h[m++],T=h[m++],C=h[m++];if(f){if(u<g+(N=l[y++])){Ui(r,b,S,T,x=(u-g)/N,ur),Ui(o,w,M,C,x,hr),t.bezierCurveTo(ur[1],hr[1],ur[2],hr[2],ur[3],hr[3]);break t}g+=N}t.bezierCurveTo(b,w,S,M,T,C),r=T,o=C;break;case lr.Q:b=h[m++],w=h[m++],S=h[m++],M=h[m++];if(f){if(u<g+(N=l[y++])){ji(r,b,S,x=(u-g)/N,ur),ji(o,w,M,x,hr),t.quadraticCurveTo(ur[1],hr[1],ur[2],hr[2]);break t}g+=N}t.quadraticCurveTo(b,w,S,M),r=S,o=M;break;case lr.A:var D=h[m++],I=h[m++],A=h[m++],k=h[m++],L=h[m++],P=h[m++],O=h[m++],R=!h[m++],v=k<A?A:k,T=.001<xr(A-k),E=L+P,C=!1;if(f&&(u<g+(N=l[y++])&&(E=L+P*(u-g)/N,C=!0),g+=N),T&&t.ellipse?t.ellipse(D,I,A,k,O,L,E,R):t.arc(D,I,v,L,E,R),C)break t;_&&(n=mr(L)*A+D,i=vr(L)*k+I),r=mr(E)*A+D,o=vr(E)*k+I;break;case lr.R:n=r=h[m],i=o=h[m+1],a=h[m++],s=h[m++];var N,E=h[m++],k=h[m++];if(f){if(u<g+(N=l[y++])){I=u-g;t.moveTo(a,s),t.lineTo(a+gr(I,E),s),0<(I-=E)&&t.lineTo(a+E,s+gr(I,k)),0<(I-=k)&&t.lineTo(a+yr(E-I,0),s+k),0<(I-=E)&&t.lineTo(a,s+yr(k-I,0));break t}g+=N}t.rect(a,s,E,k);break;case lr.Z:if(f){if(u<g+(N=l[y++])){x=(u-g)/N;t.lineTo(r*(1-x)+n*x,o*(1-x)+i*x);break t}g+=N}t.closePath(),r=n,o=i}}},Ir.CMD=lr,Ir.initDefaultProps=((Ic=Ir.prototype)._saveData=!0,Ic._needsDash=!1,Ic._dashOffset=0,Ic._dashIdx=0,Ic._dashSum=0,Ic._ux=0,void(Ic._uy=0)),Ir);function Ir(t){this.dpr=1,this._version=0,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function Ar(t,e,n,i,r,o,a){if(0!==r){var s=r,r=0;if(!(e+s<a&&i+s<a||a<e-s&&a<i-s||t+s<o&&n+s<o||o<t-s&&o<n-s)){if(t===n)return Math.abs(o-t)<=s/2;n=(r=(e-i)/(t-n))*o-a+(t*i-n*e)/(t-n);return n*n/(r*r+1)<=s/2*s/2}}}var kr=2*Math.PI;function Lr(t){return(t%=kr)<0&&(t+=kr),t}var Pr=2*Math.PI;function Or(t,e,n,i,r,o){if(e<o&&i<o||o<e&&o<i)return 0;if(i===e)return 0;var a=(o-e)/(i-e),o=i<e?1:-1;1!=a&&0!=a||(o=i<e?.5:-.5);t=a*(n-t)+t;return t===r?1/0:r<t?o:0}var Rr=Dr.CMD,Er=2*Math.PI,Nr=1e-4;var zr=[-1,-1,-1],Br=[-1,-1];function Fr(t,e,n,i,r,o,a,s,l,u){if(e<u&&i<u&&o<u&&s<u||u<e&&u<i&&u<o&&u<s)return 0;var h=Wi(e,i,o,s,u,zr);if(0===h)return 0;for(var c,p=0,d=-1,f=void 0,g=void 0,y=0;y<h;y++){var m=zr[y],v=0===m||1===m?.5:1;Vi(t,n,r,a,m)<l||(d<0&&(d=Gi(e,i,o,s,Br),Br[1]<Br[0]&&1<d&&(c=void 0,c=Br[0],Br[0]=Br[1],Br[1]=c),f=Vi(e,i,o,s,Br[0]),1<d&&(g=Vi(e,i,o,s,Br[1]))),2===d?m<Br[0]?p+=f<e?v:-v:m<Br[1]?p+=g<f?v:-v:p+=s<g?v:-v:m<Br[0]?p+=f<e?v:-v:p+=s<f?v:-v)}return p}function Vr(t,e,n,i,r,o,a,s){if(e<s&&i<s&&o<s||s<e&&s<i&&s<o)return 0;var l,u,h,c,p,d,f=(c=zr,d=(l=e)-2*(u=i)+(h=o),h=2*(u-l),u=l-(s=s),l=0,Bi(d)?Fi(h)&&0<=(p=-u/h)&&p<=1&&(c[l++]=p):Bi(s=h*h-4*d*u)?0<=(p=-h/(2*d))&&p<=1&&(c[l++]=p):0<s&&(s=(-h-(u=ki(s)))/(2*d),0<=(p=(-h+u)/(2*d))&&p<=1&&(c[l++]=p),0<=s&&s<=1&&(c[l++]=s)),l);if(0===f)return 0;var g=Zi(e,i,o);if(0<=g&&g<=1){for(var y=0,m=Xi(e,i,o,g),v=0;v<f;v++){var _=0===zr[v]||1===zr[v]?.5:1;Xi(t,n,r,zr[v])<a||(zr[v]<g?y+=m<e?_:-_:y+=o<m?_:-_)}return y}_=0===zr[0]||1===zr[0]?.5:1;return Xi(t,n,r,zr[0])<a?0:o<e?_:-_}function Hr(t,e,n,i,r){for(var o,a=t.data,s=t.len(),l=0,u=0,h=0,c=0,p=0,d=0;d<s;){var f=a[d++],g=1===d;switch(f===Rr.M&&1<d&&(n||(l+=Or(u,h,c,p,i,r))),g&&(c=u=a[d],p=h=a[d+1]),f){case Rr.M:u=c=a[d++],h=p=a[d++];break;case Rr.L:if(n){if(Ar(u,h,a[d],a[d+1],e,i,r))return!0}else l+=Or(u,h,a[d],a[d+1],i,r)||0;u=a[d++],h=a[d++];break;case Rr.C:if(n){if(function(t,e,n,i,r,o,a,s,l,u,h){if(0!==l){l=l;return e+l<h&&i+l<h&&o+l<h&&s+l<h||h<e-l&&h<i-l&&h<o-l&&h<s-l||t+l<u&&n+l<u&&r+l<u&&a+l<u||u<t-l&&u<n-l&&u<r-l&&u<a-l?void 0:Yi(t,e,n,i,r,o,a,s,u,h,null)<=l/2}}(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,i,r))return!0}else l+=Fr(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,r)||0;u=a[d++],h=a[d++];break;case Rr.Q:if(n){if(function(t,e,n,i,r,o,a,s,l){if(0!==a){a=a;return e+a<l&&i+a<l&&o+a<l||l<e-a&&l<i-a&&l<o-a||t+a<s&&n+a<s&&r+a<s||s<t-a&&s<n-a&&s<r-a?void 0:Ki(t,e,n,i,r,o,s,l,null)<=a/2}}(u,h,a[d++],a[d++],a[d],a[d+1],e,i,r))return!0}else l+=Vr(u,h,a[d++],a[d++],a[d],a[d+1],i,r)||0;u=a[d++],h=a[d++];break;case Rr.A:var y=a[d++],m=a[d++],v=a[d++],_=a[d++],x=a[d++],b=a[d++];d+=1;var f=!!(1-a[d++]),w=Math.cos(x)*v+y,S=Math.sin(x)*_+m;g?(c=w,p=S):l+=Or(u,h,w,S,i,r);g=(i-y)*_/v+y;if(n){if(function(t,e,n,i,r,o,a,s,l){if(0!==a){a=a;s-=t,l-=e;e=Math.sqrt(s*s+l*l);if(!(n<e-a||e+a<n)){if(Math.abs(i-r)%Pr<1e-4)return 1;(r=o?(o=i,i=Lr(r),Lr(o)):(i=Lr(i),Lr(r)))<i&&(r+=Pr);s=Math.atan2(l,s);return s<0&&(s+=Pr),i<=s&&s<=r||i<=s+Pr&&s+Pr<=r}}}(y,m,_,x,x+b,f,e,g,r))return!0}else l+=function(t,e,n,i,r,o,a,s){if(n<(s-=e)||s<-n)return 0;if(n=Math.sqrt(n*n-s*s),zr[0]=-n,zr[1]=n,(n=Math.abs(i-r))<1e-4)return 0;if(Er-1e-4<=n){r=Er;var l=o?1:-1;return a>=zr[i=0]+t&&a<=zr[1]+t?l:0}r<i&&(n=i,i=r,r=n),i<0&&(i+=Er,r+=Er);for(var u=0,h=0;h<2;h++){var c=zr[h];a<c+t&&(l=o?1:-1,(c=Math.atan2(s,c))<0&&(c=Er+c),(i<=c&&c<=r||i<=c+Er&&c+Er<=r)&&(c>Math.PI/2&&c<1.5*Math.PI&&(l=-l),u+=l))}return u}(y,m,_,x,x+b,f,g,r);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case Rr.R:c=u=a[d++],p=h=a[d++];if(w=c+a[d++],S=p+a[d++],n){if(Ar(c,p,w,p,e,i,r)||Ar(w,p,w,S,e,i,r)||Ar(w,S,c,S,e,i,r)||Ar(c,S,c,p,e,i,r))return!0}else l+=Or(w,p,w,S,i,r),l+=Or(c,S,c,p,i,r);break;case Rr.Z:if(n){if(Ar(u,h,c,p,e,i,r))return!0}else l+=Or(u,h,c,p,i,r);u=c,h=p}}return n||(o=h,t=p,Math.abs(o-t)<Nr)||(l+=Or(u,h,c,p,i,r)||0),0!==l}var Wr,Gr=A({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},bi),Ur={style:A({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},wi.style)},Yr=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],Xr=(l(qr,Wr=Ti),qr.prototype.update=function(){var e=this;Wr.prototype.update.call(this);var t=this.style;if(t.decal){var n=this._decalEl=this._decalEl||new qr;n.buildPath===qr.prototype.buildPath&&(n.buildPath=function(t){e.buildPath(t,e.shape)}),n.silent=!0;var i,r=n.style;for(i in t)r[i]!==t[i]&&(r[i]=t[i]);r.fill=t.fill?t.decal:null,r.decal=null,r.shadowColor=null,t.strokeFirst&&(r.stroke=null);for(var o=0;o<Yr.length;++o)n[Yr[o]]=this[Yr[o]];n.__dirty|=Pn.REDARAW_BIT}else this._decalEl&&(this._decalEl=null)},qr.prototype.getDecalElement=function(){return this._decalEl},qr.prototype._init=function(t){var e=R(t);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var i=0;i<e.length;i++){var r=e[i],o=t[r];"style"===r?this.style?I(this.style,o):this.useStyle(o):"shape"===r?I(this.shape,o):Wr.prototype.attrKV.call(this,r,o)}this.style||this.useStyle({})},qr.prototype.getDefaultStyle=function(){return null},qr.prototype.getDefaultShape=function(){return{}},qr.prototype.canBeInsideText=function(){return this.hasFill()},qr.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(z(t)){var e=Ee(t,0);return.5<e?Tn:.2<e?"#eee":Cn}if(t)return Cn}return Tn},qr.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(z(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==Ee(t,0)<.4)return e}},qr.prototype.buildPath=function(t,e,n){},qr.prototype.pathUpdated=function(){this.__dirty&=~qr.SHAPE_CHANGED_BIT},qr.prototype.createPathProxy=function(){this.path=new Dr(!1)},qr.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))},qr.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},qr.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n&&(r=!1,this.path||(r=!0,this.createPathProxy()),i=this.path,(r||this.__dirty&qr.SHAPE_CHANGED_BIT)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),t=i.getBoundingRect()),this._rect=t,this.hasStroke()&&this.path&&0<this.path.len()){var i,r=this._rectWithStroke||(this._rectWithStroke=t.clone());return(this.__dirty||n)&&(r.copy(t),i=e.strokeNoScale?this.getLineScale():1,n=e.lineWidth,this.hasFill()||(e=this.strokeContainThreshold,n=Math.max(n,null==e?4:e)),1e-10<i&&(r.width+=n/i,r.height+=n/i,r.x-=n/i/2,r.y-=n/i/2)),r}return t},qr.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){n=this.path;if(this.hasStroke()){i=r.lineWidth,r=r.strokeNoScale?this.getLineScale():1;if(1e-10<r&&(this.hasFill()||(i=Math.max(i,this.strokeContainThreshold)),Hr(n,i/r,!0,t,e)))return!0}if(this.hasFill())return Hr(n,0,!1,t,e)}return!1},qr.prototype.dirtyShape=function(){this.__dirty|=qr.SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},qr.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},qr.prototype.animateShape=function(t){return this.animate("shape",t)},qr.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},qr.prototype.attrKV=function(t,e){"shape"===t?this.setShape(e):Wr.prototype.attrKV.call(this,t,e)},qr.prototype.setShape=function(t,e){var n=(n=this.shape)||(this.shape={});return"string"==typeof t?n[t]=e:I(n,t),this.dirtyShape(),this},qr.prototype.shapeChanged=function(){return!!(this.__dirty&qr.SHAPE_CHANGED_BIT)},qr.prototype.createStyle=function(t){return rt(Gr,t)},qr.prototype._innerSaveToNormal=function(t){Wr.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.shape&&!e.shape&&(e.shape=I({},this.shape))},qr.prototype._applyStateObj=function(t,e,n,i,r,o){Wr.prototype._applyStateObj.call(this,t,e,n,i,r,o);var a,s=!(e&&i);if(e&&e.shape?r?i?a=e.shape:(a=I({},n.shape),I(a,e.shape)):(a=I({},(i?this:n).shape),I(a,e.shape)):s&&(a=n.shape),a)if(r){this.shape=I({},this.shape);for(var l={},u=R(a),h=0;h<u.length;h++){var c=u[h];"object"==typeof a[c]?this.shape[c]=a[c]:l[c]=a[c]}this._transitionState(t,{shape:l},o)}else this.shape=a,this.dirtyShape()},qr.prototype._mergeStates=function(t){for(var e,n=Wr.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var r=t[i];r.shape&&(e=e||{},this._mergeStyle(e,r.shape))}return e&&(n.shape=e),n},qr.prototype.getAnimationStyleProps=function(){return Ur},qr.prototype.isZeroArea=function(){return!1},qr.extend=function(n){var i,t,e=(l(r,i=qr),r.prototype.getDefaultStyle=function(){return D(n.style)},r.prototype.getDefaultShape=function(){return D(n.shape)},r);function r(t){var e=i.call(this,t)||this;return n.init&&n.init.call(e,t),e}for(t in n)"function"==typeof n[t]&&(e.prototype[t]=n[t]);return e},qr.SHAPE_CHANGED_BIT=4,qr.initDefaultProps=((Ac=qr.prototype).type="path",Ac.strokeContainThreshold=5,Ac.segmentIgnoreThreshold=0,Ac.subPixelOptimize=!1,Ac.autoBatch=!1,void(Ac.__dirty=Pn.REDARAW_BIT|Ti.STYLE_CHANGED_BIT|qr.SHAPE_CHANGED_BIT)),qr);function qr(t){return Wr.call(this,t)||this}var Zr=Dr.CMD,jr=[[],[],[]],Kr=Math.sqrt,$r=Math.atan2;var Qr=Math.sqrt,Jr=Math.sin,to=Math.cos,eo=Math.PI;function no(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function io(t,e){return(t[0]*e[0]+t[1]*e[1])/(no(t)*no(e))}function ro(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(io(t,e))}function oo(t,e,n,i,r,o,a,s,l,u,h){var c=l*(eo/180),p=to(c)*(t-n)/2+Jr(c)*(e-i)/2,d=-1*Jr(c)*(t-n)/2+to(c)*(e-i)/2,l=p*p/(a*a)+d*d/(s*s);1<l&&(a*=Qr(l),s*=Qr(l));l=(r===o?-1:1)*Qr((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,r=l*a*d/s,l=l*-s*p/a,t=(t+n)/2+to(c)*r-Jr(c)*l,n=(e+i)/2+Jr(c)*r+to(c)*l,e=ro([1,0],[(p-r)/a,(d-l)/s]),i=[(p-r)/a,(d-l)/s],d=[(-1*p-r)/a,(-1*d-l)/s],l=ro(i,d);io(i,d)<=-1&&(l=eo),1<=io(i,d)&&(l=0),l<0&&(d=Math.round(l/eo*1e6)/1e6,l=2*eo+d%2*eo),h.addData(u,t,n,a,s,e,l,c,o)}var ao=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,so=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var lo,uo=(l(ho,lo=Xr),ho.prototype.applyTransform=function(t){},ho);function ho(){return null!==lo&&lo.apply(this,arguments)||this}function co(t,e){var n=function(t){if(!t)return new Dr;for(var e,n=0,i=0,r=n,o=i,a=new Dr,s=Dr.CMD,l=t.match(ao),u=0;u<l.length;u++){for(var h=l[u],c=h.charAt(0),p=void 0,d=h.match(so)||[],f=d.length,g=0;g<f;g++)d[g]=parseFloat(d[g]);for(var y=0;y<f;){var m=void 0,v=void 0,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0,M=n,T=i,C=void 0,D=void 0;switch(c){case"l":n+=d[y++],i+=d[y++],p=s.L,a.addData(p,n,i);break;case"L":n=d[y++],i=d[y++],p=s.L,a.addData(p,n,i);break;case"m":n+=d[y++],i+=d[y++],p=s.M,a.addData(p,n,i),r=n,o=i,c="l";break;case"M":n=d[y++],i=d[y++],p=s.M,a.addData(p,n,i),r=n,o=i,c="L";break;case"h":n+=d[y++],p=s.L,a.addData(p,n,i);break;case"H":n=d[y++],p=s.L,a.addData(p,n,i);break;case"v":i+=d[y++],p=s.L,a.addData(p,n,i);break;case"V":i=d[y++],p=s.L,a.addData(p,n,i);break;case"C":p=s.C,a.addData(p,d[y++],d[y++],d[y++],d[y++],d[y++],d[y++]),n=d[y-2],i=d[y-1];break;case"c":p=s.C,a.addData(p,d[y++]+n,d[y++]+i,d[y++]+n,d[y++]+i,d[y++]+n,d[y++]+i),n+=d[y-2],i+=d[y-1];break;case"S":m=n,v=i,C=a.len(),D=a.data,e===s.C&&(m+=n-D[C-4],v+=i-D[C-3]),p=s.C,M=d[y++],T=d[y++],n=d[y++],i=d[y++],a.addData(p,m,v,M,T,n,i);break;case"s":m=n,v=i,C=a.len(),D=a.data,e===s.C&&(m+=n-D[C-4],v+=i-D[C-3]),p=s.C,M=n+d[y++],T=i+d[y++],n+=d[y++],i+=d[y++],a.addData(p,m,v,M,T,n,i);break;case"Q":M=d[y++],T=d[y++],n=d[y++],i=d[y++],p=s.Q,a.addData(p,M,T,n,i);break;case"q":M=d[y++]+n,T=d[y++]+i,n+=d[y++],i+=d[y++],p=s.Q,a.addData(p,M,T,n,i);break;case"T":m=n,v=i,C=a.len(),D=a.data,e===s.Q&&(m+=n-D[C-4],v+=i-D[C-3]),n=d[y++],i=d[y++],p=s.Q,a.addData(p,m,v,n,i);break;case"t":m=n,v=i,C=a.len(),D=a.data,e===s.Q&&(m+=n-D[C-4],v+=i-D[C-3]),n+=d[y++],i+=d[y++],p=s.Q,a.addData(p,m,v,n,i);break;case"A":_=d[y++],x=d[y++],b=d[y++],w=d[y++],S=d[y++],oo(M=n,T=i,n=d[y++],i=d[y++],w,S,_,x,b,p=s.A,a);break;case"a":_=d[y++],x=d[y++],b=d[y++],w=d[y++],S=d[y++],oo(M=n,T=i,n+=d[y++],i+=d[y++],w,S,_,x,b,p=s.A,a)}}"z"!==c&&"Z"!==c||(p=s.Z,a.addData(p),n=r,i=o),e=p}return a.toStatic(),a}(t),e=I({},e);return e.buildPath=function(t){var e;null!=t.setData?(t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e,1)):(e=t,n.rebuildPath(e,1))},e.applyTransform=function(t){!function(t,e){for(var n,i,r,o=t.data,a=t.len(),s=Zr.M,l=Zr.C,u=Zr.L,h=Zr.R,c=Zr.A,p=Zr.Q,d=0,f=0;d<a;){switch(_=o[d++],f=d,n=0,_){case s:case u:n=1;break;case l:n=3;break;case p:n=2;break;case c:var g=e[4],y=e[5],m=Kr(e[0]*e[0]+e[1]*e[1]),v=Kr(e[2]*e[2]+e[3]*e[3]),_=$r(-e[1]/v,e[0]/m);o[d]*=m,o[d++]+=g,o[d]*=v,o[d++]+=y,o[d++]*=m,o[d++]*=v,o[d++]+=_,o[d++]+=_,f=d+=2;break;case h:r[0]=o[d++],r[1]=o[d++],gt(r,r,e),o[f++]=r[0],o[f++]=r[1],r[0]+=o[d++],r[1]+=o[d++],gt(r,r,e),o[f++]=r[0],o[f++]=r[1]}for(i=0;i<n;i++){var x=jr[i];x[0]=o[d++],x[1]=o[d++],gt(x,x,e),o[f++]=x[0],o[f++]=x[1]}}t.increaseVersion()}(n,t),this.dirtyShape()},e}var po,fo=(l(go,po=Pn),go.prototype.childrenRef=function(){return this._children},go.prototype.children=function(){return this._children.slice()},go.prototype.childAt=function(t){return this._children[t]},go.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},go.prototype.childCount=function(){return this._children.length},go.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),t.__hostTarget))throw"This elemenet has been used as an attachment";return this},go.prototype.addBefore=function(t,e){var n;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&(0<=(e=(n=this._children).indexOf(e))&&(n.splice(e,0,t),this._doAdd(t))),this},go.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];return t&&t!==this&&t.parent!==this&&t!==i&&(n[e]=t,i.parent=null,(e=this.__zr)&&i.removeSelfFromZr(e),this._doAdd(t)),this},go.prototype._doAdd=function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},go.prototype.remove=function(t){var e=this.__zr,n=this._children,i=L(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},go.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var i=t[n];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},go.prototype.eachChild=function(t,e){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];t.call(e,r,i)}return this},go.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n],r=t.call(e,i);i.isGroup&&!r&&i.traverse(t,e)}return this},go.prototype.addSelfToZr=function(t){po.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++){this._children[e].addSelfToZr(t)}},go.prototype.removeSelfFromZr=function(t){po.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++){this._children[e].removeSelfFromZr(t)}},go.prototype.getBoundingRect=function(t){for(var e=new ln(0,0,0,0),n=t||this._children,i=[],r=null,o=0;o<n.length;o++){var a,s=n[o];s.ignore||s.invisible||(a=s.getBoundingRect(),(s=s.getLocalTransform(i))?(ln.applyTransform(e,a,s),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a))}return r||e},go);function go(t){var e=po.call(this)||this;return e.isGroup=!0,e._children=[],e.attr(t),e}fo.prototype.type="group";var yo=A({x:0,y:0},bi),mo={style:A({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},wi.style)};var vo,_o=(l(xo,vo=Ti),xo.prototype.createStyle=function(t){return rt(yo,t)},xo.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;n=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!n)return 0;var i="width"===t?"height":"width",e=e[i];return null==e?n[t]:n[t]/n[i]*e},xo.prototype.getWidth=function(){return this._getSize("width")},xo.prototype.getHeight=function(){return this._getSize("height")},xo.prototype.getAnimationStyleProps=function(){return mo},xo.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ln(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},xo);function xo(){return null!==vo&&vo.apply(this,arguments)||this}_o.prototype.type="image";var bo,wo=function(){this.cx=0,this.cy=0,this.r=0},So=(l(Mo,bo=Xr),Mo.prototype.getDefaultShape=function(){return new wo},Mo.prototype.buildPath=function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},Mo);function Mo(t){return bo.call(this,t)||this}So.prototype.type="circle";var To=Math.round;function Co(t,e,n){if(!e)return t;t=To(2*t);return(t+To(e))%2==0?t/2:(t+(n?1:-1))/2}var Do,Io=function(){this.x=0,this.y=0,this.width=0,this.height=0},Ao={},ko=(l(Lo,Do=Xr),Lo.prototype.getDefaultShape=function(){return new Io},Lo.prototype.buildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p,d,f,g;this.subPixelOptimize?(n=(g=function(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,e=e.height;t.x=i,t.y=r,t.width=o,t.height=e;n=n&&n.lineWidth;return n?(t.x=Co(i,n,!0),t.y=Co(r,n,!0),t.width=Math.max(Co(i+o,n,!1)-t.x,0===o?0:1),t.height=Math.max(Co(r+e,n,!1)-t.y,0===e?0:1),t):t}}(Ao,e,this.style)).x,i=g.y,r=g.width,o=g.height,g.r=e.r,e=g):(n=e.x,i=e.y,r=e.width,o=e.height),e.r?(a=t,d=(s=e).x,f=s.y,g=s.width,e=s.height,s=s.r,g<0&&(d+=g,g=-g),e<0&&(f+=e,e=-e),"number"==typeof s?l=u=h=c=s:s instanceof Array?1===s.length?l=u=h=c=s[0]:2===s.length?(l=h=s[0],u=c=s[1]):3===s.length?(l=s[0],u=c=s[1],h=s[2]):(l=s[0],u=s[1],h=s[2],c=s[3]):l=u=h=c=0,g<l+u&&(l*=g/(p=l+u),u*=g/p),g<h+c&&(h*=g/(p=h+c),c*=g/p),e<u+h&&(u*=e/(p=u+h),h*=e/p),e<l+c&&(l*=e/(p=l+c),c*=e/p),a.moveTo(d+l,f),a.lineTo(d+g-u,f),0!==u&&a.arc(d+g-u,f+u,u,-Math.PI/2,0),a.lineTo(d+g,f+e-h),0!==h&&a.arc(d+g-h,f+e-h,h,0,Math.PI/2),a.lineTo(d+c,f+e),0!==c&&a.arc(d+c,f+e-c,c,Math.PI/2,Math.PI),a.lineTo(d,f+l),0!==l&&a.arc(d+l,f+l,l,Math.PI,1.5*Math.PI)):t.rect(n,i,r,o)},Lo.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},Lo);function Lo(t){return Do.call(this,t)||this}ko.prototype.type="rect";var Po,Oo=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0};function Ro(t){return Po.call(this,t)||this}(l(Ro,Po=Xr),Ro.prototype.getDefaultShape=function(){return new Oo},Ro.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=e.rx,o=e.ry,a=.5522848*r,e=.5522848*o;t.moveTo(n-r,i),t.bezierCurveTo(n-r,i-e,n-a,i-o,n,i-o),t.bezierCurveTo(n+a,i-o,n+r,i-e,n+r,i),t.bezierCurveTo(n+r,i+e,n+a,i+o,n,i+o),t.bezierCurveTo(n-a,i+o,n-r,i+e,n-r,i),t.closePath()},Ro).prototype.type="ellipse";var Eo,No={},zo=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},Bo=(l(Fo,Eo=Xr),Fo.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Fo.prototype.getDefaultShape=function(){return new zo},Fo.prototype.buildPath=function(t,e){var n,i,r,o;o=this.subPixelOptimize?(n=(o=function(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,e=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=e;n=n&&n.lineWidth;return n?(To(2*i)===To(2*r)&&(t.x1=t.x2=Co(i,n,!0)),To(2*o)===To(2*e)&&(t.y1=t.y2=Co(o,n,!0)),t):t}}(No,e,this.style)).x1,i=o.y1,r=o.x2,o.y2):(n=e.x1,i=e.y1,r=e.x2,e.y2);e=e.percent;0!==e&&(t.moveTo(n,i),e<1&&(r=n*(1-e)+r*e,o=i*(1-e)+o*e),t.lineTo(r,o))},Fo.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},Fo);function Fo(t){return Eo.call(this,t)||this}function Vo(t,e,n,i,r,o,a){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*a+(-3*(e-n)-2*t-i)*o+t*r+e}function Ho(t,e,n){var i=e.smooth,r=e.points;if(r&&2<=r.length){if(i&&"spline"!==i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;p<d;p++)yt(a,a,t[p]),mt(s,s,t[p]);yt(a,a,i[0]),mt(s,s,i[1])}for(p=0,d=t.length;p<d;p++){var f=t[p];if(n)r=t[p?p-1:d-1],o=t[(p+1)%d];else{if(0===p||p===d-1){l.push([(y=t[p])[0],y[1]]);continue}r=t[p-1],o=t[p+1]}m=r,(g=u)[0]=(y=o)[0]-m[0],g[1]=y[1]-m[1],ut(u,u,e);var g=ct(f,r),y=ct(f,o),m=g+y;0!==m&&(g/=m,y/=m),ut(h,u,-g),ut(c,u,y);y=lt([],f,h),f=lt([],f,c);i&&(mt(y,y,a),yt(y,y,s),mt(f,f,a),yt(f,f,s)),l.push(y),l.push(f)}return n&&l.push(l.shift()),l}(r,i,n,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var a=r.length,s=0;s<(n?a:a-1);s++){var l=o[2*s],u=o[2*s+1],h=r[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===i&&(r=function(t,e){for(var n=t.length,i=[],r=0,o=1;o<n;o++)r+=ct(t[o-1],t[o]);for(var a=(a=r/2)<n?n:a,o=0;o<a;o++){var s=o/(a-1)*(e?n:n-1),l=Math.floor(s),u=s-l,h=void 0,c=t[l%n],p=void 0,d=void 0,d=e?(h=t[(l-1+n)%n],p=t[(l+1)%n],t[(l+2)%n]):(h=t[0===l?l:l-1],p=t[n-2<l?n-1:l+1],t[n-3<l?n-1:l+2]),s=u*u,l=u*s;i.push([Vo(h[0],c[0],p[0],d[0],u,s,l),Vo(h[1],c[1],p[1],d[1],u,s,l)])}return i}(r,n)),t.moveTo(r[0][0],r[0][1]);for(var s=1,c=r.length;s<c;s++)t.lineTo(r[s][0],r[s][1])}n&&t.closePath()}}Bo.prototype.type="line";var Wo,Go=function(){this.points=null,this.smooth=0,this.smoothConstraint=null};function Uo(t){return Wo.call(this,t)||this}(l(Uo,Wo=Xr),Uo.prototype.getDefaultShape=function(){return new Go},Uo.prototype.buildPath=function(t,e){Ho(t,e,!0)},Uo).prototype.type="polygon";var Yo,Xo=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},qo=(l(Zo,Yo=Xr),Zo.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Zo.prototype.getDefaultShape=function(){return new Xo},Zo.prototype.buildPath=function(t,e){Ho(t,e,!1)},Zo);function Zo(t){return Yo.call(this,t)||this}qo.prototype.type="polyline";var jo=(Ko.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},Ko);function Ko(t){this.colorStops=t||[]}var $o,Qo=(l(Jo,$o=jo),Jo);function Jo(t,e,n,i,r,o){r=$o.call(this,r)||this;return r.x=null==t?0:t,r.y=null==e?0:e,r.x2=null==n?1:n,r.y2=null==i?0:i,r.type="linear",r.global=o||!1,r}var ta,ea=A({strokeFirst:!0,font:dn,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},Gr),na=(l(ia,ta=Ti),ia.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&0<t.lineWidth},ia.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},ia.prototype.createStyle=function(t){return rt(ea,t)},ia.prototype.setBoundingRect=function(t){this._rect=t},ia.prototype.getBoundingRect=function(){var t,e=this.style;return this._rect||(null!=(t=e.text)?t+="":t="",(t=mn(t,e.font,e.textAlign,e.textBaseline)).x+=e.x||0,t.y+=e.y||0,this.hasStroke()&&(e=e.lineWidth,t.x-=e/2,t.y-=e/2,t.width+=e,t.height+=e),this._rect=t),this._rect},ia.initDefaultProps=void(ia.prototype.dirtyRectTolerance=10),ia);function ia(){return null!==ta&&ta.apply(this,arguments)||this}na.prototype.type="tspan";var ra=Math.PI,oa=2*ra,aa=Math.sin,sa=Math.cos,la=Math.acos,ua=Math.atan2,ha=Math.abs,ca=Math.sqrt,pa=Math.max,da=Math.min,fa=1e-4;function ga(t,e,n,i,r,o,a){var s=t-n,l=e-i,u=(a?o:-o)/ca(s*s+l*l),h=u*l,c=-u*s,p=t+h,d=e+c,a=n+h,l=i+c,u=(p+a)/2,s=(d+l)/2,t=a-p,e=l-d,n=t*t+e*e,i=r-o,o=p*l-a*d,p=(e<0?-1:1)*ca(pa(0,i*i*n-o*o)),l=(o*e-t*p)/n,a=(-o*t-e*p)/n,d=(o*e+t*p)/n,e=(-o*t+e*p)/n,p=l-u,n=a-s,u=d-u,s=e-s;return u*u+s*s<p*p+n*n&&(l=d,a=e),{cx:l,cy:a,x01:-h,y01:-c,x11:l*(r/i-1),y11:a*(r/i-1)}}function ya(t,e){var n,i,r,o,a,s,l,u,h,c,p,d,f,g,y,m,v,_,x,b,w,S,M,T=pa(e.r,0),C=pa(e.r0||0,0),D=0<T;(D||0<C)&&(D||(T=C,C=0),T<C&&(w=T,T=C,C=w),n=!!e.clockwise,Cr(m=[i=e.startAngle,r=e.endAngle],!n),o=ha(m[0]-m[1]),a=e.cx,s=e.cy,f=e.cornerRadius||0,y=e.innerCornerRadius||0,fa<T?oa-fa<o?(t.moveTo(a+T*sa(i),s+T*aa(i)),t.arc(a,s,T,i,r,!n),fa<C&&(t.moveTo(a+C*sa(r),s+C*aa(r)),t.arc(a,s,C,r,i,n))):(g=ha(T-C)/2,l=da(g,f),v=u=da(g,y),_=l,h=T*sa(i),c=T*aa(i),p=C*sa(r),d=C*aa(r),w=D=b=x=void 0,(fa<l||fa<u)&&(x=T*sa(r),b=T*aa(r),D=C*sa(i),w=C*aa(i),o<ra&&((m=function(t,e,n,i,r,o,a,s){var l=n-t,n=i-e,i=a-r;if(!((s=(a=s-o)*l-i*n)*s<fa))return[t+(s=(i*(e-o)-a*(t-r))/s)*l,e+s*n]}(h,c,D,w,x,b,p,d))&&(e=h-m[0],f=c-m[1],g=x-m[0],y=b-m[1],y=1/aa(la((e*g+f*y)/(ca(e*e+f*f)*ca(g*g+y*y)))/2),m=ca(m[0]*m[0]+m[1]*m[1]),v=da(u,(C-m)/(y-1)),_=da(l,(T-m)/(1+y))))),fa<o?fa<_?(S=ga(D,w,h,c,T,_,n),M=ga(x,b,p,d,T,_,n),t.moveTo(a+S.cx+S.x01,s+S.cy+S.y01),_<l?t.arc(a+S.cx,s+S.cy,_,ua(S.y01,S.x01),ua(M.y01,M.x01),!n):(t.arc(a+S.cx,s+S.cy,_,ua(S.y01,S.x01),ua(S.y11,S.x11),!n),t.arc(a,s,T,ua(S.cy+S.y11,S.cx+S.x11),ua(M.cy+M.y11,M.cx+M.x11),!n),t.arc(a+M.cx,s+M.cy,_,ua(M.y11,M.x11),ua(M.y01,M.x01),!n))):(t.moveTo(a+h,s+c),t.arc(a,s,T,i,r,!n)):t.moveTo(a+h,s+c),fa<C&&fa<o?fa<v?(S=ga(p,d,x,b,C,-v,n),M=ga(h,c,D,w,C,-v,n),t.lineTo(a+S.cx+S.x01,s+S.cy+S.y01),v<u?t.arc(a+S.cx,s+S.cy,v,ua(S.y01,S.x01),ua(M.y01,M.x01),!n):(t.arc(a+S.cx,s+S.cy,v,ua(S.y01,S.x01),ua(S.y11,S.x11),!n),t.arc(a,s,C,ua(S.cy+S.y11,S.cx+S.x11),ua(M.cy+M.y11,M.cx+M.x11),n),t.arc(a+M.cx,s+M.cy,v,ua(M.y11,M.x11),ua(M.y01,M.x01),!n))):(t.lineTo(a+p,s+d),t.arc(a,s,C,r,i,n)):t.lineTo(a+p,s+d)):t.moveTo(a,s),t.closePath())}var ma,va=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,this.innerCornerRadius=0},_a=(l(xa,ma=Xr),xa.prototype.getDefaultShape=function(){return new va},xa.prototype.buildPath=function(t,e){ya(t,e)},xa.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},xa);function xa(t){return ma.call(this,t)||this}_a.prototype.type="sector";var ba;l(wa,ba=Xr),wa.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},wa.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},wa.prototype.buildPath=function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},wa.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},wa.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Xr.prototype.getBoundingRect.call(this)};function wa(){var t=null!==ba&&ba.apply(this,arguments)||this;return t.type="compound",t}var Sa,Ma=[],Ta=(l(Ca,Sa=Ti),Ca.prototype.traverse=function(t,e){t.call(e,this)},Ca.prototype.useStyle=function(){this.style={}},Ca.prototype.getCursor=function(){return this._cursor},Ca.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},Ca.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},Ca.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},Ca.prototype.addDisplayable=function(t,e){(e?this._temporaryDisplayables:this._displayables).push(t),this.markRedraw()},Ca.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Ca.prototype.getDisplayables=function(){return this._displayables},Ca.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},Ca.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Ca.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(var e,t=0;t<this._temporaryDisplayables.length;t++){(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Ca.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new ln(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(Ma)),t.union(i)}this._rect=t}return this._rect},Ca.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(t,e))return!0}return!1},Ca);function Ca(){var t=null!==Sa&&Sa.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}var Da=new _e(50);function Ia(t,e,n,i,r){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var o=Da.get(t),r={hostEl:n,cb:i,cbPayload:r};return o?ka(e=o.image)||o.pending.push(r):((e=new Image).onload=e.onerror=Aa,Da.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function Aa(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function ka(t){return t&&t.width&&t.height}var La=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Pa(t,e,n,i){var r=I({},i=i||{});r.font=e,n=X(n,"..."),r.maxIterations=X(i.maxIterations,2);var o=r.minChar=X(i.minChar,0);r.cnCharWidth=gn("国",e);var a=r.ascCharWidth=gn("a",e);r.placeholder=X(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<o&&a<=s;l++)s-=a;e=gn(n,e);return s<e&&(n="",e=0),s=t-e,r.ellipsis=n,r.ellipsisWidth=e,r.contentWidth=s,r.containerWidth=t,r}function Oa(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";if((s=gn(t,i))<=n)return t;for(var o=0;;o++){if(s<=r||o>=e.maxIterations){t+=e.ellipsis;break}var a=0===o?function(t,e,n,i){for(var r=0,o=0,a=t.length;o<a&&r<e;o++){var s=t.charCodeAt(o);r+=0<=s&&s<=127?n:i}return o}(t,r,e.ascCharWidth,e.cnCharWidth):0<s?Math.floor(t.length*r/s):0,s=gn(t=t.substr(0,a),i)}return""===t&&(t=e.placeholder),t}var Ra=function(){},Ea=function(t){this.tokens=[],t&&(this.tokens=t)},Na=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function za(t,e){var n=new Na;if(null!=t&&(t+=""),!t)return n;for(var i,r=e.width,o=e.height,a=e.overflow,s="break"!==a&&"breakAll"!==a||null==r?null:{width:r,accumWidth:0,breakAll:"breakAll"===a},l=La.lastIndex=0;null!=(i=La.exec(t));){var u=i.index;l<u&&Ba(n,t.substring(l,u),e,s),Ba(n,i[2],e,s,i[1]),l=La.lastIndex}l<t.length&&Ba(n,t.substring(l,t.length),e,s);var h=[],c=0,p=0,d=e.padding,f="truncate"===a,g="truncate"===e.lineOverflow;function y(t,e,n){t.width=e,t.lineHeight=n,c+=n,p=Math.max(p,e)}t:for(var m=0;m<n.lines.length;m++){for(var v=n.lines[m],_=0,x=0,b=0;b<v.tokens.length;b++){var w=(A=v.tokens[b]).styleName&&e.rich[A.styleName]||{},S=A.textPadding=w.padding,M=S?S[1]+S[3]:0,T=A.font=w.font||e.font;A.contentHeight=xn(T);var C=X(w.height,A.contentHeight);if(A.innerHeight=C,S&&(C+=S[0]+S[2]),A.height=C,A.lineHeight=q(w.lineHeight,e.lineHeight,C),A.align=w&&w.align||e.align,A.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=o&&c+A.lineHeight>o){0<b?(v.tokens=v.tokens.slice(0,b),y(v,x,_),n.lines=n.lines.slice(0,m+1)):n.lines=n.lines.slice(0,m);break t}var D,I=w.width,S=null==I||"auto"===I;"string"==typeof I&&"%"===I.charAt(I.length-1)?(A.percentWidth=I,h.push(A),A.contentWidth=gn(A.text,T)):(!S||(D=(I=w.backgroundColor)&&I.image)&&ka(D="string"!=typeof(I=D)?I:(I=Da.get(I))&&I.image)&&(A.width=Math.max(A.width,D.width*C/D.height)),null!=(D=f&&null!=r?r-x:null)&&D<A.width?!S||D<M?(A.text="",A.width=A.contentWidth=0):(A.text=function(t,e,n,i,r){if(!e)return"";var o=(t+"").split("\n");r=Pa(e,n,i,r);for(var a=0,s=o.length;a<s;a++)o[a]=Oa(o[a],r);return o.join("\n")}(A.text,D-M,T,e.ellipsis,{minChar:e.truncateMinChar}),A.width=A.contentWidth=gn(A.text,T)):A.contentWidth=gn(A.text,T)),A.width+=M,x+=A.width,w&&(_=Math.max(_,A.lineHeight))}y(v,x,_)}n.outerWidth=n.width=X(r,p),n.outerHeight=n.height=X(o,c),n.contentHeight=c,n.contentWidth=p,d&&(n.outerWidth+=d[1]+d[3],n.outerHeight+=d[0]+d[2]);for(m=0;m<h.length;m++){var A,k=(A=h[m]).percentWidth;A.width=parseInt(k,10)/100*n.width}return n}function Ba(t,e,n,i,r){var o,a,s,l=""===e,u=r&&n.rich[r]||{},h=t.lines,c=u.font||n.font,p=!1;i?(n=(n=u.padding)?n[1]+n[3]:0,null!=u.width&&"auto"!==u.width?(s=function(t,e){if("string"!=typeof t)return t;if(0<=t.lastIndexOf("%"))return parseFloat(t)/100*e;return parseFloat(t)}(u.width,i.width)+n,0<h.length&&s+i.accumWidth>i.width&&(o=e.split("\n"),p=!0),i.accumWidth=s):(s=Va(e,c,i.width,i.breakAll,i.accumWidth),i.accumWidth=s.accumWidth+n,a=s.linesWidths,o=s.lines)):o=e.split("\n");for(var d=0;d<o.length;d++){var f,g,y=o[d],m=new Ra;m.styleName=r,m.text=y,m.isLineHolder=!y&&!l,m.width="number"==typeof u.width?u.width:a?a[d]:gn(y,c),d||p?h.push(new Ea([m])):1===(g=(f=(h[h.length-1]||(h[0]=new Ea)).tokens).length)&&f[0].isLineHolder?f[0]=m:!y&&g&&!l||f.push(m)}}var Fa=b(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function Va(t,e,n,i,r){for(var o,a=[],s=[],l="",u="",h=0,c=0,p=0;p<t.length;p++){var d,f,g=t.charAt(p);"\n"!==g?(d=gn(g,e),f=!i&&(o=void 0,!(!(33<=(o=(o=f=g).charCodeAt(0))&&o<=255)||!!Fa[f])),(a.length?n<c+d:n<r+c+d)?c?(l||u)&&(c=f?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=g,l="",h+=d):(u&&(l+=u,c+=h,u="",h=0),a.push(l),s.push(c),l=g,d)):f?(a.push(u),s.push(h),u=g,h=d):(a.push(g),s.push(d)):(c+=d,f?(u+=g,h+=d):(u&&(l+=u,u="",h=0),l+=g))):(u&&(l+=u,c+=h),a.push(l),s.push(c),u=l="",c=h=0)}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=r),{accumWidth:c,lines:a,linesWidths:s}}var Ha,Wa={fill:"#000"},Ga={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},wi.style)},Ua=(l(Ya,Ha=Ti),Ya.prototype.childrenRef=function(){return this._children},Ya.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var e=this._children[t];e.zlevel=this.zlevel,e.z=this.z,e.z2=this.z2,e.culling=this.culling,e.cursor=this.cursor,e.invisible=this.invisible}var n=this.attachedTransform;n?(n.updateTransform(),(n=n.transform)?(this.transform=this.transform||[],te(this.transform,n)):this.transform=null):Ha.prototype.update.call(this)},Ya.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),this.attachedTransform?this.attachedTransform.getComputedTransform():Ha.prototype.getComputedTransform.call(this)},Ya.prototype._updateSubTexts=function(){var t;this._childCursor=0,Za(t=this.style),E(t.rich,Za),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},Ya.prototype.addSelfToZr=function(t){Ha.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=t},Ya.prototype.removeSelfFromZr=function(t){Ha.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=null},Ya.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new ln(0,0,0,0),e=this._children,n=[],i=null,r=0;r<e.length;r++){var o=e[r],a=o.getBoundingRect(),o=o.getLocalTransform(n);o?(t.copy(a),t.applyTransform(o),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},Ya.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Wa},Ya.prototype.setTextContent=function(t){throw new Error("Can't attach text on another text")},Ya.prototype._mergeStyle=function(t,e){if(!e)return t;var n=e.rich,i=t.rich||n&&{};return I(t,e),n&&i?(this._mergeRich(i,n),t.rich=i):i&&(t.rich=i),t},Ya.prototype._mergeRich=function(t,e){for(var n=R(e),i=0;i<n.length;i++){var r=n[i];t[r]=t[r]||{},I(t[r],e[r])}},Ya.prototype.getAnimationStyleProps=function(){return Ga},Ya.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),(this._children[this._childCursor++]=e).__zr=this.__zr,e.parent=this,e},Ya.prototype._updatePlainTexts=function(){var t,e,n=this.style,i=n.font||dn,r=n.padding,o=function(t,e){null!=t&&(t+="");var n,i=e.overflow,r=e.padding,o=e.font,a="truncate"===i,s=xn(o),l=X(e.lineHeight,s),u="truncate"===e.lineOverflow,h=e.width,c=(n=null!=h&&"break"===i||"breakAll"===i?t?Va(t,e.font,h,"breakAll"===i,0).lines:[]:t?t.split("\n"):[]).length*l;(i=X(e.height,c))<c&&u&&(p=Math.floor(i/l),n=n.slice(0,p));var u=i,p=h;if(r&&(u+=r[0]+r[2],null!=p&&(p+=r[1]+r[3])),t&&a&&null!=p)for(var d=Pa(h,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),f=0;f<n.length;f++)n[f]=Oa(n[f],d);if(null==h){for(var g=0,f=0;f<n.length;f++)g=Math.max(gn(n[f],o),g);h=g}return{lines:n,height:i,outerHeight:u,lineHeight:l,calculatedLineHeight:s,contentHeight:c,width:h}}($a(n),n),a=Qa(n),s=!!n.backgroundColor,l=o.outerHeight,u=o.lines,h=o.lineHeight,c=this._defaultStyle,p=n.x||0,d=n.y||0,f=n.align||c.align||"left",g=n.verticalAlign||c.verticalAlign||"top",y=p,m=_n(d,o.contentHeight,g);(a||r)&&(t=o.width,r&&(t+=r[1]+r[3]),e=vn(p,t,f),d=_n(d,l,g),a&&this._renderBackground(n,n,e,d,t,l)),m+=h/2,r&&(y=Ka(p,f,r),"top"===g?m+=r[0]:"bottom"===g&&(m-=r[2]));for(var v=0,g=!1,_=(null==(r="fill"in n?n.fill:(g=!0,c.fill))||"none"===r?null:r.image||r.colorStops?"#000":r),x=(ja("stroke"in n?n.stroke:s||c.autoStroke&&!g?null:(v=2,c.stroke))),b=0<n.textShadowBlur,w=null!=n.width&&("truncate"===n.overflow||"break"===n.overflow||"breakAll"===n.overflow),S=o.calculatedLineHeight,M=0;M<u.length;M++){var T=this._getOrCreateChild(na),C=T.createStyle();T.useStyle(C),C.text=u[M],C.x=y,C.y=m,f&&(C.textAlign=f),C.textBaseline="middle",C.opacity=n.opacity,C.strokeFirst=!0,b&&(C.shadowBlur=n.textShadowBlur||0,C.shadowColor=n.textShadowColor||"transparent",C.shadowOffsetX=n.textShadowOffsetX||0,C.shadowOffsetY=n.textShadowOffsetY||0),x&&(C.stroke=x,C.lineWidth=n.lineWidth||v,C.lineDash=n.lineDash,C.lineDashOffset=n.lineDashOffset||0),_&&(C.fill=_),C.font=i,m+=h,w&&T.setBoundingRect(new ln(vn(C.x,n.width,C.textAlign),_n(C.y,S,C.textBaseline),n.width,S))}},Ya.prototype._updateRichTexts=function(){var t=this.style,e=za($a(t),t),n=e.width,i=e.outerWidth,r=e.outerHeight,o=t.padding,a=t.x||0,s=t.y||0,l=this._defaultStyle,u=t.align||l.align,l=t.verticalAlign||l.verticalAlign,u=vn(a,i,u),l=_n(s,r,l),h=u,c=l;o&&(h+=o[3],c+=o[0]);var p=h+n;Qa(t)&&this._renderBackground(t,t,u,l,i,r);for(var d=!!t.backgroundColor,f=0;f<e.lines.length;f++){for(var g=e.lines[f],y=g.tokens,m=y.length,v=g.lineHeight,_=g.width,x=0,b=h,w=p,S=m-1,M=void 0;x<m&&(!(M=y[x]).align||"left"===M.align);)this._placeToken(M,t,v,c,b,"left",d),_-=M.width,b+=M.width,x++;for(;0<=S&&"right"===(M=y[S]).align;)this._placeToken(M,t,v,c,w,"right",d),_-=M.width,w-=M.width,S--;for(b+=(n-(b-h)-(p-w)-_)/2;x<=S;)M=y[x],this._placeToken(M,t,v,c,b+M.width/2,"center",d),b+=M.width,x++;c+=v}},Ya.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&Qa(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var h=!!s.backgroundColor,c=t.textPadding;c&&(r=Ka(r,o,c),u-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(na),d=p.createStyle();p.useStyle(d);l=this._defaultStyle,i=!1,n=0,c=ja("fill"in s?s.fill:"fill"in e?e.fill:(i=!0,l.fill)),i=ja("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||l.autoStroke&&!i?null:(n=2,l.stroke)),l=0<s.textShadowBlur||0<e.textShadowBlur;d.text=t.text,d.x=r,d.y=u,l&&(d.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,d.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=o,d.textBaseline="middle",d.font=t.font||dn,d.opacity=q(s.opacity,e.opacity,1),i&&(d.lineWidth=q(s.lineWidth,e.lineWidth,n),d.lineDash=X(s.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=i),c&&(d.fill=c);c=t.contentWidth,t=t.contentHeight;p.setBoundingRect(new ln(vn(d.x,c,d.textAlign),_n(d.y,t,d.textBaseline),c,t))},Ya.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=z(u),d=t.borderRadius,f=this;(p||h&&c)&&((a=this._getOrCreateChild(ko)).useStyle(a.createStyle()),a.style.fill=null,(s=a.shape).x=n,s.y=i,s.width=r,s.height=o,s.r=d,a.dirtyShape()),p?((l=a.style).fill=u||null,l.fillOpacity=X(t.fillOpacity,1)):u&&u.image&&((g=this._getOrCreateChild(_o)).onload=function(){f.dirtyStyle()},(p=g.style).image=u.image,p.x=n,p.y=i,p.width=r,p.height=o),h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=X(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 g=(a||g).style;g.shadowBlur=t.shadowBlur||0,g.shadowColor=t.shadowColor||"transparent",g.shadowOffsetX=t.shadowOffsetX||0,g.shadowOffsetY=t.shadowOffsetY||0,g.opacity=q(t.opacity,e.opacity,1)},Ya.makeFont=function(t){var e,n="";return(t.fontSize||t.fontFamily||t.fontWeight)&&(e="",e="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,n=[t.fontStyle,t.fontWeight,e,t.fontFamily||"sans-serif"].join(" ")),n&&$(n)||t.textFont||t.font},Ya);function Ya(t){var e=Ha.call(this)||this;return e.type="text",e._children=[],e._defaultStyle=Wa,e.attr(t),e}var Xa={left:!0,right:1,center:1},qa={top:1,bottom:1,middle:1};function Za(t){var e;t&&(t.font=Ua.makeFont(t),"middle"===(e=t.align)&&(e="center"),t.align=null==e||Xa[e]?e:"left","center"===(e=t.verticalAlign)&&(e="middle"),t.verticalAlign=null==e||qa[e]?e:"top",t.padding&&(t.padding=j(t.padding)))}function ja(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ka(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function $a(t){t=t.text;return null!=t&&(t+=""),t}function Qa(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var Ja,ts=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},es=(l(ns,Ja=Xr),ns.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},ns.prototype.getDefaultShape=function(){return new ts},ns.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(o),e=Math.sin(o);t.moveTo(l*r+n,e*r+i),t.arc(n,i,r,o,a,!s)},ns);function ns(t){return Ja.call(this,t)||this}es.prototype.type="arc";var is,rs=[],os=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function as(t,e,n){var i=t.cpx2,r=t.cpy2;return null===i||null===r?[(n?Hi:Vi)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?Hi:Vi)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?qi:Xi)(t.x1,t.cpx1,t.x2,e),(n?qi:Xi)(t.y1,t.cpy1,t.y2,e)]}function ss(t){return is.call(this,t)||this}(l(ss,is=Xr),ss.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},ss.prototype.getDefaultShape=function(){return new os},ss.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,r=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,e=e.percent;0!==e&&(t.moveTo(n,i),null==l||null==u?(e<1&&(ji(n,a,r,e,rs),a=rs[1],r=rs[2],ji(i,s,o,e,rs),s=rs[1],o=rs[2]),t.quadraticCurveTo(a,s,r,o)):(e<1&&(Ui(n,a,l,r,e,rs),a=rs[1],l=rs[2],r=rs[3],Ui(i,s,u,o,e,rs),s=rs[1],u=rs[2],o=rs[3]),t.bezierCurveTo(a,s,l,u,r,o)))},ss.prototype.pointAt=function(t){return as(this.shape,t,!1)},ss.prototype.tangentAt=function(t){t=as(this.shape,t,!0);return ht(t,t)},ss).prototype.type="bezier-curve";var ls,us=function(){this.cx=0,this.cy=0,this.width=0,this.height=0};function hs(t){return ls.call(this,t)||this}(l(hs,ls=Xr),hs.prototype.getDefaultShape=function(){return new us},hs.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=e.width,e=e.height;t.moveTo(n,i+r),t.bezierCurveTo(n+r,i+r,n+3*r/2,i-r/3,n,i-e),t.bezierCurveTo(n-3*r/2,i-r/3,n-r,i+r,n,i+r),t.closePath()},hs).prototype.type="droplet";var cs,ps=function(){this.cx=0,this.cy=0,this.width=0,this.height=0};function ds(t){return cs.call(this,t)||this}(l(ds,cs=Xr),ds.prototype.getDefaultShape=function(){return new ps},ds.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=e.width,e=e.height;t.moveTo(n,i),t.bezierCurveTo(n+r/2,i-2*e/3,n+2*r,i+e/3,n,i+e),t.bezierCurveTo(n-2*r,i+e/3,n-r/2,i-2*e/3,n,i)},ds).prototype.type="heart";var fs,gs=Math.PI,ys=Math.sin,ms=Math.cos,vs=function(){this.x=0,this.y=0,this.r=0,this.n=0};function _s(t){return fs.call(this,t)||this}(l(_s,fs=Xr),_s.prototype.getDefaultShape=function(){return new vs},_s.prototype.buildPath=function(t,e){var n=e.n;if(n&&!(n<2)){var i=e.x,r=e.y,o=e.r,a=2*gs/n,s=-gs/2;t.moveTo(i+o*ms(s),r+o*ys(s));for(var l=0,u=n-1;l<u;l++)s+=a,t.lineTo(i+o*ms(s),r+o*ys(s));t.closePath()}},_s).prototype.type="isogon";var xs,bs=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0};function ws(t){return xs.call(this,t)||this}(l(ws,xs=Xr),ws.prototype.getDefaultShape=function(){return new bs},ws.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},ws).prototype.type="ring";var Ss,Ms=Math.sin,Ts=Math.cos,Cs=Math.PI/180,Ds=function(){this.cx=0,this.cy=0,this.r=[],this.k=0,this.n=1};function Is(t){return Ss.call(this,t)||this}(l(Is,Ss=Xr),Is.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Is.prototype.getDefaultShape=function(){return new Ds},Is.prototype.buildPath=function(t,e){var n,i,r,o=e.r,a=e.k,s=e.n,l=e.cx,u=e.cy;t.moveTo(l,u);for(var h=0,c=o.length;h<c;h++){r=o[h];for(var p=0;p<=360*s;p++)n=r*Ms(a/s*p%360*Cs)*Ts(p*Cs)+l,i=r*Ms(a/s*p%360*Cs)*Ms(p*Cs)+u,t.lineTo(n,i)}},Is).prototype.type="rose";var As,ks=Math.PI,Ls=Math.cos,Ps=Math.sin,Os=function(){this.cx=0,this.cy=0,this.n=3,this.r=0};function Rs(t){return As.call(this,t)||this}(l(Rs,As=Xr),Rs.prototype.getDefaultShape=function(){return new Os},Rs.prototype.buildPath=function(t,e){var n=e.n;if(n&&!(n<2)){var i=e.cx,r=e.cy,o=e.r,a=e.r0;null==a&&(a=4<n?o*Ls(2*ks/n)/Ls(ks/n):o/3);var s=ks/n,l=-ks/2,u=i+o*Ls(l),e=r+o*Ps(l);l+=s,t.moveTo(u,e);for(var h,c=0,p=2*n-1;c<p;c++)h=c%2==0?a:o,t.lineTo(i+h*Ls(l),r+h*Ps(l)),l+=s;t.closePath()}},Rs).prototype.type="star";var Es,Ns=Math.cos,zs=Math.sin,Bs=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0,this.d=0,this.location="out"};function Fs(t){return Es.call(this,t)||this}(l(Fs,Es=Xr),Fs.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Fs.prototype.getDefaultShape=function(){return new Bs},Fs.prototype.buildPath=function(t,e){var n,i=e.r,r=e.r0,o=e.d,a=e.cx,s=e.cy,l="out"===e.location?1:-1;if(!(e.location&&i<=r)){var u,h=0,c=1,p=(i+l*r)*Ns(0)-l*o*Ns(0)+a,e=(i+l*r)*zs(0)-o*zs(0)+s;for(t.moveTo(p,e);r*++h%(i+l*r)!=0;);for(;u=Math.PI/180*c,n=(i+l*r)*Ns(u)-l*o*Ns((i/r+l)*u)+a,u=(i+l*r)*zs(u)-o*zs((i/r+l)*u)+s,t.lineTo(n,u),++c<=r*h/(i+l*r)*360;);}},Fs).prototype.type="trochoid";var Vs;l(Hs,Vs=jo);function Hs(t,e,n,i,r){i=Vs.call(this,i)||this;return i.x=null==t?.5:t,i.y=null==e?.5:e,i.r=null==n?.5:n,i.type="radial",i.global=r||!1,i}var Ws=[0,0],Gs=[0,0],Us=new $e,Ys=new $e,Xs=(qs.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,r=t.x,o=t.y,a=r+t.width,t=o+t.height;if(n[0].set(r,o),n[1].set(a,o),n[2].set(a,t),n[3].set(r,t),e)for(var s=0;s<4;s++)n[s].transform(e);$e.sub(i[0],n[1],n[0]),$e.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(s=0;s<2;s++)this._origin[s]=i[s].dot(n[0])},qs.prototype.intersect=function(t,e){var n=!0,i=!e;return Us.set(1/0,1/0),Ys.set(0,0),!this._intersectCheckOneSide(this,t,Us,Ys,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,Us,Ys,i,-1)&&(n=!1,i)||i||$e.copy(e,n?Us:Ys),n},qs.prototype._intersectCheckOneSide=function(t,e,n,i,r,o){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,Ws),this._getProjMinMaxOnAxis(s,e._corners,Gs),Ws[1]<Gs[0]||Gs[1]<Ws[0]){if(a=!1,r)return a;var u=Math.abs(Gs[0]-Ws[1]),h=Math.abs(Ws[0]-Gs[1]);Math.min(u,h)>i.len()&&(u<h?$e.scale(i,l,-u*o):$e.scale(i,l,h*o))}else{n&&(u=Math.abs(Gs[0]-Ws[1]),h=Math.abs(Ws[0]-Gs[1]),Math.min(u,h)<n.len()&&(u<h?$e.scale(n,l,u*o):$e.scale(n,l,-h*o)))}}return a},qs.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],r=this._origin,o=e[0].dot(i)+r[t],a=o,s=o,l=1;l<e.length;l++)var u=e[l].dot(i)+r[t],a=Math.min(u,a),s=Math.max(u,s);n[0]=a,n[1]=s},qs);function qs(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new $e;for(n=0;n<2;n++)this._axes[n]=new $e;t&&this.fromBoundingRect(t,e)}var Zs=!w.canvasSupported,js={};var Ks=($s.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},$s.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},$s.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},$s.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return Ee(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r<i;r++)n+=Ee(e[r].color,1);return(n/=i)<.4}return!1}(t)},$s.prototype.getBackgroundColor=function(){return this._backgroundColor},$s.prototype.setDarkMode=function(t){this._darkMode=t},$s.prototype.isDarkMode=function(){return this._darkMode},$s.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},$s.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},$s.prototype.flush=function(){this._flush(!1)},$s.prototype._flush=function(t){var e,n=(new Date).getTime();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());t=(new Date).getTime();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:t-n})):0<this._sleepAfterStill&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},$s.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},$s.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},$s.prototype.addHover=function(t){},$s.prototype.removeHover=function(t){},$s.prototype.clearHover=function(){},$s.prototype.refreshHover=function(){this._needsRefreshHover=!0},$s.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},$s.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},$s.prototype.clearAnimation=function(){this.animation.clear()},$s.prototype.getWidth=function(){return this.painter.getWidth()},$s.prototype.getHeight=function(){return this.painter.getHeight()},$s.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},$s.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},$s.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},$s.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},$s.prototype.off=function(t,e){this.handler.off(t,e)},$s.prototype.trigger=function(t,e){this.handler.trigger(t,e)},$s.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof fo&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},$s.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this.id},$s);function $s(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var r=new Zn,o=n.renderer;if(Zs){if(!js.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o=o||"canvas";if(!js[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;n=new js[o](e,r,n,t);this.storage=r,this.painter=n;t=w.node||w.worker?null:new vi(n.getViewportRoot(),n.root);this.handler=new jt(r,n,t,n.root),this.animation=new Qn({stage:{update:function(){return i._flush(!0)}}}),this.animation.start()}function Qs(t,e){return new Ks(m++,t,e)}var Js=1e-4;function tl(t,e,n,i){var r=e[1]-e[0],o=n[1]-n[0];if(0==r)return 0==o?n[0]:(n[0]+n[1])/2;if(i)if(0<r){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function el(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function nl(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function il(t){var e=t.toString(),t=e.indexOf("e");if(0<t){var n=+e.slice(t+1);return n<0?-n:0}n=e.indexOf(".");return n<0?0:e.length-1-n}function rl(t){var e=2*Math.PI;return(t%e+e)%e}function ol(t){return-Js<t&&t<Js}var al=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function sl(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=al.exec(t);if(!e)return new Date(NaN);if(e[8]){t=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}function ll(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}function ul(t,e){var n=ll(t),i=Math.pow(10,n),r=t/i,r=e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10;return t=r*i,-20<=n?+t.toFixed(n<0?-n:0):t}function hl(t){return!isNaN((e=t,(t=parseFloat(e))==e&&(0!==t||"string"!=typeof e||e.indexOf("x")<=0)?t:NaN));var e}function cl(t,e){return null==t?e:null==e?t:t*e/function t(e,n){return 0===n?e:t(n,e%n)}(t,e)}function pl(){0}function dl(t){throw new Error(t)}var fl="series\0",gl="\0_ec_\0";function yl(t){return t instanceof Array?t:null==t?[]:[t]}function ml(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}var vl=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function _l(t){return!V(t)||N(t)||t instanceof Date?t:t.value}function xl(t,n,e){var i="normalMerge"===e,r="replaceMerge"===e,o="replaceAll"===e;t=t||[],n=(n||[]).slice();var a=it();E(n,function(t,e){V(t)||(n[e]=null)});var s,l,u,h,c,p,d,f,g,y,e=function(t,e,n){var i=[];if("replaceAll"===n)return i;for(var r=0;r<t.length;r++){var o=t[r];o&&null!=o.id&&e.set(o.id,r),i.push({existing:"replaceMerge"===n||Tl(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}(t,a,e);return(i||r)&&(s=e,l=t,u=a,E(h=n,function(t,e){var n,i,r;t&&null!=t.id&&(n=wl(t.id),null!=(i=u.get(n))&&(K(!(r=s[i]).newOption,'Duplicated option on id "'+n+'".'),r.newOption=t,r.existing=l[i],h[e]=null))})),i&&(c=e,E(p=n,function(t,e){if(t&&null!=t.name)for(var n=0;n<c.length;n++){var i=c[n].existing;if(!c[n].newOption&&i&&(null==i.id||null==t.id)&&!Tl(t)&&!Tl(i)&&bl("name",i,t))return c[n].newOption=t,void(p[e]=null)}})),i||r?(f=e,g=r,E(n,function(t){if(t){for(var e,n=0;(e=f[n])&&(e.newOption||Tl(e.existing)||e.existing&&null!=t.id&&!bl("id",t,e.existing));)n++;e?(e.newOption=t,e.brandNew=g):f.push({newOption:t,brandNew:g,existing:null,keyInfo:null}),n++}})):o&&(d=e,E(n,function(t){d.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})),o=e,y=it(),E(o,function(t){var e=t.existing;e&&y.set(e.id,t)}),E(o,function(t){var e=t.newOption;K(!e||null==e.id||!y.get(e.id)||y.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&y.set(e.id,t),t.keyInfo||(t.keyInfo={})}),E(o,function(t,e){var n=t.existing,i=t.newOption,r=t.keyInfo;if(V(i)){if(r.name=null!=i.name?wl(i.name):n?n.name:fl+e,n)r.id=wl(n.id);else if(null!=i.id)r.id=wl(i.id);else for(var o=0;r.id="\0"+r.name+"\0"+o++,y.get(r.id););y.set(r.id,t)}}),e}function bl(t,e,n){e=Sl(e[t],null),t=Sl(n[t],null);return null!=e&&null!=t&&e===t}function wl(t){return Sl(t,"")}function Sl(t,e){if(null==t)return e;var n=typeof t;return"string"==n?t:"number"==n||B(t)?t+"":e}function Ml(t){t=t.name;return!(!t||!t.indexOf(fl))}function Tl(t){return t&&null!=t.id&&0===wl(t.id).indexOf(gl)}function Cl(t,r,o){E(t,function(t){var e,n,i=t.newOption;V(i)&&(t.keyInfo.mainType=r,t.keyInfo.subType=(e=r,n=i,i=t.existing,t=o,n.type||(i?i.subType:t.determineSubType(e,n))))})}function Dl(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?N(t.dataIndex)?O(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?N(t.name)?O(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function Il(){var e="__ec_inner_"+Al++;return function(t){return t[e]||(t[e]={})}}var Al=Math.round(9*Math.random());function kl(n,t,r){var e,t=z(t)?((e={})[t+"Index"]=0,e):t,o=it(),a={},s=!1;E(t,function(t,e){var n,i;"dataIndex"!==e&&"dataIndexInside"!==e?(n=(i=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],i=(i[2]||"").toLowerCase(),!n||!i||r&&r.includeMainTypes&&L(r.includeMainTypes,n)<0||(s=s||!!n,(o.get(n)||o.set(n,{}))[i]=t)):a[e]=t});var i=r?r.defaultMainType:null;return!s&&i&&o.set(i,{}),o.each(function(t,e){t=Pl(n,e,t,{useDefault:i===e,enableAll:!r||null==r.enableAll||r.enableAll,enableNone:!r||null==r.enableNone||r.enableNone});a[e+"Models"]=t.models,a[e+"Model"]=t.models[0]}),a}var Ll={useDefault:!0,enableAll:!1,enableNone:!1};function Pl(t,e,n,i){i=i||Ll;var r=n.index,o=n.id,a=n.name,n={models:null,specified:null!=r||null!=o||null!=a};if(n.specified)return"none"===r||!1===r?(K(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),n.models=[]):("all"===r&&(K(i.enableAll,'`"all"` is not a valid value on index option.'),r=o=a=null),n.models=t.queryComponents({mainType:e,index:r,id:o,name:a})),n;a=void 0;return n.models=i.useDefault&&(a=t.getComponent(e))?[a]:[],n}function Ol(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function Rl(t,e,n,i,r){var o=null==e||"auto"===e;if(null==i)return i;if("number"==typeof i)return nl(l=ze(n||0,i,r),o?Math.max(il(n||0),il(i)):e);if("string"==typeof i)return r<1?n:i;for(var a,s,l,u=[],h=n||[],c=i,p=Math.max(h.length,c.length),d=0;d<p;++d){"ordinal"===t.getDimensionInfo(d).type?u[d]=(r<1?h:c)[d]:(a=h&&h[d]?h[d]:0,s=c[d],l=null==h?i[d]:ze(a,s,r),u[d]=nl(l,o?Math.max(il(a),il(s)):e))}return u}var El=".",Nl="___EC__COMPONENT__CONTAINER___",zl="___EC__EXTENDED_CLASS___";function Bl(t){var e={main:"",sub:""};return t&&(t=t.split(El),e.main=t[0]||"",e.sub=t[1]||""),e}function Fl(t){(t.$constructor=t).extend=function(i){var r=this;function o(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(i.$constructor)i.$constructor.apply(this,arguments);else{if("function"==typeof(t=r)&&/^class\s/.test(Function.prototype.toString.call(t)))return rt(o.prototype,new(r.bind.apply(r,a([void 0],e))));r.apply(this,arguments)}}return o[zl]=!0,I(o.prototype,i),o.extend=this.extend,o.superCall=Wl,o.superApply=Gl,function(t,e){var n,i=t.prototype;function r(){}for(n in r.prototype=e.prototype,t.prototype=new r,i)i.hasOwnProperty(n)&&(t.prototype[n]=i[n]);(t.prototype.constructor=t).superClass=e}(o,this),o.superClass=r,o}}function Vl(t,e){t.extend=e.extend}var Hl=Math.round(10*Math.random());function Wl(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function Gl(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Ul(e,t){t=t||{};var n,r={};e.registerClass=function(t){var e,n=t.type||t.prototype.type;return n&&(K(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e=n),'componentType "'+e+'" illegal'),(n=Bl(t.prototype.type=n)).sub?n.sub!==Nl&&(function(t){var e=r[t.main];e&&e[Nl]||((e=r[t.main]={})[Nl]=!0);return e}(n)[n.sub]=t):r[n.main]=t),t},e.getClass=function(t,e,n){var i=r[t];if(i&&i[Nl]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},e.getClassesByMainType=function(t){var t=Bl(t),n=[],t=r[t.main];return t&&t[Nl]?E(t,function(t,e){e!==Nl&&n.push(t)}):n.push(t),n},e.hasClass=function(t){t=Bl(t);return!!r[t.main]},e.getAllClassMainTypes=function(){var n=[];return E(r,function(t,e){n.push(e)}),n},e.hasSubTypes=function(t){t=Bl(t),t=r[t.main];return t&&t[Nl]},!t.registerWhenExtend||(n=e.extend)&&(e.extend=function(t){t=n.call(this,t);return e.registerClass(t)})}function Yl(a,s){for(var t=0;t<a.length;t++)a[t][1]||(a[t][1]=a[t][0]);return s=s||!1,function(t,e,n){for(var i={},r=0;r<a.length;r++){var o=a[r][1];e&&0<=L(e,o)||n&&L(n,o)<0||null!=(o=t.getShallow(o,s))&&(i[a[r][0]]=o)}return i}}var Xl=Yl([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),ql=(Zl.prototype.getAreaStyle=function(t,e){return Xl(this,t,e)},Zl);function Zl(){}var jl=Il(),Kl=1,$l={},Ql=Il(),Jl=0,tu=1,eu=2,nu=["emphasis","blur","select"],iu=["normal","emphasis","blur","select"],ru=10,ou=9,au="highlight",su="downplay",lu="select",uu="unselect",hu="toggleSelect";function cu(t){return null!=t&&"none"!==t}var pu=new _e(100);function du(t){if("string"!=typeof t)return t;var e=pu.get(t);return e||(e=function(t,e){var n=Pe(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:n[i]<0&&(n[i]=0);return Re(n,4===n.length?"rgba":"rgb")}}(t,-.1),pu.put(t,e)),e}function fu(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function gu(t){fu(t,"emphasis",eu)}function yu(t){t.hoverState===eu&&fu(t,"normal",Jl)}function mu(t){fu(t,"blur",tu)}function vu(t){t.hoverState===tu&&fu(t,"normal",Jl)}function _u(t){t.selected=!0}function xu(t){t.selected=!1}function bu(t,e,n){e(t,n)}function wu(t,e,n){bu(t,e,n),t.isGroup&&t.traverse(function(t){bu(t,e,n)})}function Su(t,e){switch(e){case"emphasis":t.hoverState=eu;break;case"normal":t.hoverState=Jl;break;case"blur":t.hoverState=tu;break;case"select":t.selected=!0}}function Mu(t,e,n){var i=0<=L(t.currentStates,e),r=t.style.opacity,t=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a<e.length;a++){var s=e[a],l=r[s];o[s]=null==l?i&&i[s]:l}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveFinalToTarget(o,e)}return o}(t,["opacity"],e,{opacity:1}),e=(n=n||{}).style||{};return null==e.opacity&&(n=I({},n),e=I({opacity:i?r:.1*t.opacity},e),n.style=e),n}function Tu(t,e){var n,i,r,o,a,s=this.states[t];if(this.style){if("emphasis"===t)return n=this,r=s,o=(i=e)&&0<=L(i,"select"),a=!1,n instanceof Xr&&(e=Ql(n),i=o&&e.selectFill||e.normalFill,o=o&&e.selectStroke||e.normalStroke,(cu(i)||cu(o))&&(!cu((e=(r=r||{}).style||{}).fill)&&cu(i)?(a=!0,r=I({},r),(e=I({},e)).fill=du(i)):!cu(e.stroke)&&cu(o)&&(a||(r=I({},r),e=I({},e)),e.stroke=du(o)),r.style=e)),r&&null==r.z2&&(a||(r=I({},r)),a=n.z2EmphasisLift,r.z2=n.z2+(null!=a?a:ru)),r;if("blur"===t)return Mu(this,t,s);if("select"===t)return a=this,(r=s)&&null==r.z2&&(r=I({},r),t=a.z2SelectLift,r.z2=a.z2+(null!=t?t:ou)),r}return s}function Cu(t){t.stateProxy=Tu;var e=t.getTextContent(),t=t.getTextGuideLine();e&&(e.stateProxy=Tu),t&&(t.stateProxy=Tu)}function Du(t,e){t.__highByOuter|=1<<(e||0),wu(t,gu)}function Iu(t,e){(t.__highByOuter&=~(1<<(e||0)))||wu(t,yu)}function Au(t){wu(t,vu)}function ku(t){wu(t,_u)}function Lu(t){wu(t,xu)}function Pu(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ou(t,o,a,s,e){var n,l,u,h,i=s.getModel();function c(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&Au(i)}}a=a||"coordinateSystem",e?null!=t&&o&&"none"!==o&&(l=i.getSeriesByIndex(t),(u=l.coordinateSystem)&&u.master&&(u=u.master),h=[],i.eachSeries(function(t){var e=l===t,n=t.coordinateSystem;if(n&&n.master&&(n=n.master),!("series"===a&&!e||"coordinateSystem"===a&&!(n&&u?n===u:e)||"series"===o&&e)){if(s.getViewOfSeriesModel(t).group.traverse(function(t){mu(t)}),P(o))c(t.getData(),o);else if(V(o))for(var i=R(o),r=0;r<i.length;r++)c(t.getData(i[r]),o[i[r]]);h.push(t)}}),i.eachComponent(function(t,e){"series"===t||(e=s.getViewOfComponentModel(e))&&e.blurSeries&&e.blurSeries(h,i)})):(n=s).getModel().eachComponent(function(t,e){("series"===t?n.getViewOfSeriesModel(e):n.getViewOfComponentModel(e)).group.traverse(function(t){vu(t)})})}function Ru(i){E(i.getAllData(),function(t){var e=t.data,n=t.type;e.eachItemGraphicEl(function(t,e){(i.isSelected(e,n)?ku:Lu)(t)})})}function Eu(t,e,n){!function(t,e){var n=!1===e,e=t;t.highDownSilentOnTouch&&(e.__highDownSilentOnTouch=t.highDownSilentOnTouch);n&&!e.__highDownDispatcher||(e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n)}(t,!0),wu(t,Cu),function(t,e,n){t=jl(t);null!=e?(t.focus=e,t.blurScope=n):t.focus&&(t.focus=null)}(t,e,n)}var Nu=["emphasis","blur","select"],zu={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Bu(t,e,n,i){n=n||"itemStyle";for(var r=0;r<Nu.length;r++){var o=Nu[r],a=e.getModel([o,n]);t.ensureState(o).style=i?i(a):a[zu[n]]()}}function Fu(t){return!(!t||!t.__highDownDispatcher)}function Vu(t){t=t.type;return t===lu||t===uu||t===hu}function Hu(t){t=t.type;return t===au||t===su}function Wu(t,e,n,i){e=new uo(co(t,e));return n&&("center"===i&&(n=Gu(n,e.getBoundingRect())),function(t,e){if(!t.applyTransform)return;e=t.getBoundingRect().calculateTransform(e);t.applyTransform(e)}(e,n)),e}function Gu(t,e){var n=e.width/e.height,e=t.height*n,n=e<=t.width?t.height:(e=t.width)/n;return{x:t.x+t.width/2-e/2,y:t.y+t.height/2-n/2,width:e,height:n}}function Uu(t,e,n,i,r,o,a){var s,l=!1;"function"==typeof r?(a=o,o=r,r=null):V(r)&&(o=r.cb,a=r.during,l=r.isFrom,s=r.removeOpt,r=r.dataIndex);var u,h="update"===t,c="remove"===t;i&&i.ecModel&&(u=(d=i.ecModel.getUpdatePayload())&&d.animation);var p,d,f=i&&i.isAnimationEnabled();c||e.stopAnimation("remove"),f?(f=d=p=void 0,"function"==typeof(f=u?(p=u.duration||0,d=u.easing||"cubicOut",u.delay||0):c?(p=X((s=s||{}).duration,200),d=X(s.easing,"cubicOut"),0):(p=i.getShallow(h?"animationDurationUpdate":"animationDuration"),d=i.getShallow(h?"animationEasingUpdate":"animationEasing"),i.getShallow(h?"animationDelayUpdate":"animationDelay")))&&(f=f(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof p&&(p=p(r)),0<p?l?e.animateFrom(n,{duration:p,delay:f||0,easing:d,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:p,delay:f||0,easing:d,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),l||e.attr(n),o&&o())):(e.stopAnimation(),l||e.attr(n),a&&a(1),o&&o())}function Yu(t,e,n,i,r,o){Uu("update",t,e,n,i,r,o)}function Xu(t,e,n,i,r,o){Uu("init",t,e,n,i,r,o)}function qu(t,e,n,i,r,o){Ku(t)||Uu("remove",t,e,n,i,r,o)}function Zu(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),qu(t,{style:{opacity:0}},e,n,i)}function ju(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||Zu(t,e,n,i)}):Zu(t,e,n,i)}function Ku(t){if(!t.__zr)return 1;for(var e=0;e<t.animators.length;e++){if("remove"===t.animators[e].scope)return 1}}function $u(t){return!t.isGroup}var Qu={};function Ju(t,e){for(var n=0;n<nu.length;n++){var i=nu[n],r=e[i],i=t.ensureState(i);i.style=i.style||{},i.style.text=r}var o=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(o,!0)}function th(t,e,n){var i,r=t.labelFetcher,o=t.labelDataIndex,a=t.labelDimIndex,s=e.normal;r&&(i=r.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{value:n}:null)),null==i&&(i=C(t.defaultText)?t.defaultText(o,t,n):t.defaultText);for(var l={normal:i},u=0;u<nu.length;u++){var h=nu[u],c=e[h];l[h]=X(r?r.getFormattedLabel(o,h,null,a,c&&c.get("formatter")):null,i)}return l}function eh(t,e,n,i){n=n||Qu;for(var r=t instanceof Ua,o=!1,a=0;a<iu.length;a++){if((p=e[iu[a]])&&p.getShallow("show")){o=!0;break}}var s=r?t:t.getTextContent();if(o){r||(s||(s=new Ua,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var l=th(n,e),u=e.normal,h=!!u.getShallow("show"),c=ih(u,i&&i.normal,n,!1,!r);c.text=l.normal,r||t.setTextConfig(rh(u,n,!1));for(a=0;a<nu.length;a++){var p,d,f,g=nu[a];(p=e[g])&&(d=s.ensureState(g),(f=!!X(p.getShallow("show"),h))!=h&&(d.ignore=!f),d.style=ih(p,i&&i[g],n,!0,!r),d.style.text=l[g],r||(t.ensureState(g).textConfig=rh(p,n,!0)))}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(c.x=s.style.x),null!=s.style.y&&(c.y=s.style.y),s.ignore=!h,s.useStyle(c),s.dirty(),n.enableTextSetter&&(uh(s).setLabelText=function(t){t=th(n,e,t);Ju(s,t)})}else s&&(s.ignore=!0);t.dirty()}function nh(t,e){e=e||"label";for(var n={normal:t.getModel(e)},i=0;i<nu.length;i++){var r=nu[i];n[r]=t.getModel([r,e])}return n}function ih(t,e,n,i,r){var o={};return function(t,e,n,i,r){n=n||Qu;var o,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){var e;for(;t&&t!==t.ecModel;){var n=(t.option||Qu).rich;if(n){e=e||{};for(var i=R(n),r=0;r<i.length;r++){var o=i[r];e[o]=1}}t=t.parentModel}return e}(e);if(l)for(var u in o={},l){var h;l.hasOwnProperty(u)&&(h=e.getModel(["rich",u]),lh(o[u]={},h,s,n,i,r,!1,!0))}o&&(t.rich=o);a=e.get("overflow");a&&(t.overflow=a);a=e.get("minMargin");null!=a&&(t.margin=a);lh(t,e,s,n,i,r,!0,!1)}(o,t,n,i,r),e&&I(o,e),o}function rh(t,e,n){e=e||{};var i={},r=t.getShallow("rotate"),o=X(t.getShallow("distance"),n?null:5),a=t.getShallow("offset"),n=t.getShallow("position")||(n?null:"inside");return"outside"===n&&(n=e.defaultOutsidePosition||"top"),null!=n&&(i.position=n),null!=a&&(i.offset=a),null!=r&&(r*=Math.PI/180,i.rotation=r),null!=o&&(i.distance=o),i.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",i}var oh=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],ah=["align","lineHeight","width","height","tag","verticalAlign"],sh=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function lh(t,e,n,i,r,o,a,s){n=!r&&n||Qu;var l=i&&i.inheritColor,u=e.getShallow("color"),h=e.getShallow("textBorderColor"),c=X(e.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||(u=l||null),"inherit"!==h&&"auto"!==h||(h=l||null),o||(u=u||n.color,h=h||n.textBorderColor),null!=u&&(t.fill=u),null!=h&&(t.stroke=h);h=X(e.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(t.lineWidth=h);h=X(e.getShallow("textBorderType"),n.textBorderType);null!=h&&(t.lineDash=h);h=X(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=h&&(t.lineDashOffset=h),r||null!=c||s||(c=i&&i.defaultOpacity),null!=c&&(t.opacity=c),r||o||null==t.fill&&i.inheritColor&&(t.fill=i.inheritColor);for(var p=0;p<oh.length;p++){var d=oh[p];null!=(f=X(e.getShallow(d),n[d]))&&(t[d]=f)}for(p=0;p<ah.length;p++){d=ah[p];null!=(f=e.getShallow(d))&&(t[d]=f)}if(null!=t.verticalAlign||null!=(o=e.getShallow("baseline"))&&(t.verticalAlign=o),!a||!i.disableBox){for(p=0;p<sh.length;p++){var f,d=sh[p];null!=(f=e.getShallow(d))&&(t[d]=f)}i=e.getShallow("borderType");null!=i&&(t.borderDash=i),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||(t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||(t.borderColor=l)}}var uh=Il();function hh(e,n,i,t){var r,o,a,s=uh(e);s.valueAnimation&&(r=s.defaultInterpolatedText,o=s.prevValue,a=s.value,(null==o?Xu:Yu)(e,{},t,n,null,function(t){t=Rl(i,s.precision,o,a,t),t=th({labelDataIndex:n,defaultText:r?r(t):t+""},s.statesModels,t),Ju(e,t)}))}var ch=["textStyle","color"],ph=new Ua,dh=(fh.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(ch):null)},fh.prototype.getFont=function(){return t={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},e=(e=this.ecModel)&&e.getModel("textStyle"),$([t.fontStyle||e&&e.getShallow("fontStyle")||"",t.fontWeight||e&&e.getShallow("fontWeight")||"",(t.fontSize||e&&e.getShallow("fontSize")||12)+"px",t.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "));var t,e},fh.prototype.getTextRect=function(t){return ph.useStyle({text:t,fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily"),verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline"),padding:this.getShallow("padding"),lineHeight:this.getShallow("lineHeight"),rich:this.getShallow("rich")}),ph.update(),ph.getBoundingRect()},fh);function fh(){}var n=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],gh=Yl(n),o=(yh.prototype.getLineStyle=function(t){return gh(this,t)},yh);function yh(){}var g=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],mh=Yl(g),vh=(_h.prototype.getItemStyle=function(t,e){return mh(this,t,e)},_h);function _h(){}var xh,bh,wh=(Sh.prototype.init=function(t,e,n){for(var i=[],r=3;r<arguments.length;r++)i[r-3]=arguments[r]},Sh.prototype.mergeOption=function(t,e){_(this.option,t,!0)},Sh.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},Sh.prototype.getShallow=function(t,e){var n=this.option,n=null==n?n:n[t];return null!=n||e||(e=this.parentModel)&&(n=e.getShallow(t)),n},Sh.prototype.getModel=function(t,e){var n=null!=t,t=n?this.parsePath(t):null;return new Sh(n?this._doGet(t):this.option,e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(t)),this.ecModel)},Sh.prototype.isEmpty=function(){return null==this.option},Sh.prototype.restoreData=function(){},Sh.prototype.clone=function(){return new this.constructor(D(this.option))},Sh.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},Sh.prototype.resolveParentPath=function(t){return t},Sh.prototype.isAnimationEnabled=function(){if(!w.node&&this.option)return null!=this.option.animation?!!this.option.animation:this.parentModel?this.parentModel.isAnimationEnabled():void 0},Sh.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"==typeof n?n[t[i]]:null));i++);return null==n&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},Sh);function Sh(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}Fl(wh),xh=wh,bh=["__\0is_clz",Hl++].join("_"),xh.prototype[bh]=!0,xh.isInstance=function(t){return!(!t||!t[bh])},x(wh,o),x(wh,vh),x(wh,ql),x(wh,dh);var Mh=Math.round(10*Math.random());function Th(t){return[t||"",Mh++].join("_")}var Ch="ZH",Dh="EN",Ih=Dh,Ah={},kh={},Lh=w.domSupported&&-1<(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(Ch)?Ch:Ih;function Ph(t,e){t=t.toUpperCase(),kh[t]=new wh(e),Ah[t]=e}Ph(Dh,{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:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},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:". "}}}}),Ph(Ch,{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:"旭日图"}},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:""}}}});var Oh=1e3,Rh=60*Oh,Eh=60*Rh,Nh=24*Eh,Sn=365*Nh,zh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},Bh="{yyyy}-{MM}-{dd}",Fh={year:"{yyyy}",month:"{yyyy}-{MM}",day:Bh,hour:Bh+" "+zh.hour,minute:Bh+" "+zh.minute,second:Bh+" "+zh.second,millisecond:zh.none},Vh=["year","month","day","hour","minute","second","millisecond"],Hh=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Wh(t,e){return"0000".substr(0,e-(t+="").length)+t}function Gh(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 Uh(t,e,n,i){var r=sl(t),o=r[qh(n)](),a=r[Zh(n)]()+1,s=Math.floor((a-1)/4)+1,l=r[jh(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[Kh(n)](),c=(h-1)%12+1,p=r[$h(n)](),d=r[Qh(n)](),f=r[Jh(n)](),t=(i instanceof wh?i:kh[i||Lh]||kh[Ih]).getModel("time"),r=t.get("month"),n=t.get("monthAbbr"),i=t.get("dayOfWeek"),t=t.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,r[a-1]).replace(/{MMM}/g,n[a-1]).replace(/{MM}/g,Wh(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Wh(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,i[u]).replace(/{ee}/g,t[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Wh(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Wh(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Wh(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Wh(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Wh(f,3)).replace(/{S}/g,f+"")}function Yh(t,e){var n=sl(t),i=n[Zh(e)]()+1,r=n[jh(e)](),o=n[Kh(e)](),a=n[$h(e)](),t=n[Qh(e)](),e=0===n[Jh(e)](),t=e&&0===t,a=t&&0===a,o=a&&0===o,r=o&&1===r;return r&&1===i?"year":r?"month":o?"day":a?"hour":t?"minute":e?"second":"millisecond"}function Xh(t,e,n){var i="number"==typeof t?sl(t):t;switch(e=e||Yh(t,n)){case"year":return i[qh(n)]();case"half-year":return 6<=i[Zh(n)]()?1:0;case"quarter":return Math.floor((i[Zh(n)]()+1)/4);case"month":return i[Zh(n)]();case"day":return i[jh(n)]();case"half-day":return i[Kh(n)]()/24;case"hour":return i[Kh(n)]();case"minute":return i[$h(n)]();case"second":return i[Qh(n)]();case"millisecond":return i[Jh(n)]()}}function qh(t){return t?"getUTCFullYear":"getFullYear"}function Zh(t){return t?"getUTCMonth":"getMonth"}function jh(t){return t?"getUTCDate":"getDate"}function Kh(t){return t?"getUTCHours":"getHours"}function $h(t){return t?"getUTCMinutes":"getMinutes"}function Qh(t){return t?"getUTCSeconds":"getSeconds"}function Jh(t){return t?"getUTCSeconds":"getSeconds"}function tc(t){return t?"setUTCMonth":"setMonth"}function ec(t){return t?"setUTCDate":"setDate"}function nc(t){return t?"setUTCHours":"setHours"}function ic(t){return t?"setUTCMinutes":"setMinutes"}function rc(t){return t?"setUTCSeconds":"setSeconds"}function oc(t){return t?"setUTCSeconds":"setSeconds"}var ac=j,sc=/([&<>"'])/g,lc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function uc(t,e){return"{"+t+(null==e?"":e)+"}"}var hc=["a","b","c","d","e","f","g"];function cc(t,e,n){N(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o<r.length;o++){var a=hc[o];t=t.replace(uc(a),uc(a,0))}for(var s,l=0;l<i;l++)for(var u=0;u<r.length;u++){var h=e[l][r[u]];t=t.replace(uc(hc[u],l),n?null==(s=h)?"":(s+"").replace(sc,function(t,e){return lc[e]}):h)}return t}var pc=E,dc=["left","right","top","bottom","width","height"],fc=[["width","left","right"],["height","top","bottom"]];function gc(a,s,l,u,h){var c=0,p=0;null==u&&(u=1/0),null==h&&(h=1/0);var d=0;s.eachChild(function(t,e){var n,i,r=t.getBoundingRect(),o=s.childAt(e+1),e=o&&o.getBoundingRect();d="horizontal"===a?(o=r.width+(e?-e.x+r.x:0),u<(n=c+o)||t.newline?(c=0,n=o,p+=d+l,r.height):Math.max(d,r.height)):(e=r.height+(e?-e.y+r.y:0),h<(i=p+e)||t.newline?(c+=d+l,p=0,i=e,r.width):Math.max(d,r.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}T(gc,"vertical"),T(gc,"horizontal");function yc(t,e,n){n=ac(n||0);var i=e.width,r=e.height,o=el(t.left,i),a=el(t.top,r),s=el(t.right,i),l=el(t.bottom,r),u=el(t.width,i),h=el(t.height,r),c=n[2]+n[0],p=n[1]+n[3],e=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=e&&(isNaN(u)&&isNaN(h)&&(i/r<e?u=.8*i:h=.8*r),isNaN(u)&&(u=e*h),isNaN(h)&&(h=u/e)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));h=new ln(o+n[3],a+n[0],u,h);return h.margin=n,h}function mc(t){t=t.layoutMode||t.constructor.layoutMode;return V(t)?t:t?{type:t}:null}function vc(l,u,t){var h=t&&t.ignoreSize;N(h)||(h=[h,h]);var e=n(fc[0],0),t=n(fc[1],1);function n(t,e){var n={},i=0,r={},o=0;if(pc(t,function(t){r[t]=l[t]}),pc(t,function(t){c(u,t)&&(n[t]=r[t]=u[t]),p(n,t)&&i++,p(r,t)&&o++}),h[e])return p(u,t[1])?r[t[2]]=null:p(u,t[2])&&(r[t[1]]=null),r;if(2!==o&&i){if(2<=i)return n;for(var a=0;a<t.length;a++){var s=t[a];if(!c(n,s)&&c(l,s)){n[s]=l[s];break}}return n}return r}function c(t,e){return t.hasOwnProperty(e)}function p(t,e){return null!=t[e]&&"auto"!==t[e]}function i(t,e,n){pc(t,function(t){e[t]=n[t]})}i(fc[0],l,e),i(fc[1],l,t)}function _c(t){return e={},(n=t)&&e&&pc(dc,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e;var e,n}var xc,bc,wc,Sc,Mc=Il(),Tc=(l(Cc,xc=wh),Cc.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},Cc.prototype.mergeDefaultAndTheme=function(t,e){var n=mc(this),i=n?_c(t):{};_(t,e.getTheme().get(this.mainType)),_(t,this.getDefaultOption()),n&&vc(t,i,n)},Cc.prototype.mergeOption=function(t,e){_(this.option,t,!0);var n=mc(this);n&&vc(this.option,t,n)},Cc.prototype.optionUpdated=function(t,e){},Cc.prototype.getDefaultOption=function(){var t=this.constructor;if(!(e=t)||!e[zl])return t.defaultOption;var e=Mc(this);if(!e.defaultOption){for(var n=[],i=t;i;){var r=i.prototype.defaultOption;r&&n.push(r),i=i.superClass}for(var o={},a=n.length-1;0<=a;a--)o=_(o,n[a],!0);e.defaultOption=o}return e.defaultOption},Cc.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Pl(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},Cc.prototype.getBoxLayoutParams=function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}},Cc.protoInitialize=((rd=Cc.prototype).type="component",rd.id="",rd.name="",rd.mainType="",rd.subType="",void(rd.componentIndex=0)),Cc);function Cc(t,e,n){n=xc.call(this,t,e,n)||this;return n.uid=Th("ec_cpt_model"),n}function Dc(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}Vl(Tc,wh),Ul(Tc,{registerWhenExtend:!0}),wc={},(bc=Tc).registerSubTypeDefaulter=function(t,e){t=Bl(t);wc[t.main]=e},bc.determineSubType=function(t,e){var n,i=e.type;return i||(n=Bl(t).main,bc.hasSubTypes(t)&&wc[n]&&(i=wc[n](e))),i},Sc=function(t){var e=[];E(Tc.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=O(e,function(t){return Bl(t).main}),"dataset"!==t&&L(e,"dataset")<=0&&e.unshift("dataset");return e},Tc.topologicalTravel=function(t,e,n,i){if(t.length){var o,a,s,e=(a={},s=[],E(o=e,function(n){var e,i,r=Dc(a,n),t=r.originalDeps=Sc(n),t=(e=o,i=[],E(t,function(t){0<=L(e,t)&&i.push(t)}),i);r.entryCount=t.length,0===r.entryCount&&s.push(n),E(t,function(t){L(r.predecessor,t)<0&&r.predecessor.push(t);var e=Dc(a,t);L(e.successor,t)<0&&e.successor.push(n)})}),{graph:a,noEntryList:s}),r=e.graph,l=e.noEntryList,u={};for(E(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=r[h],p=!!u[h];p&&(n.call(i,h,c.originalDeps.slice()),delete u[h]),E(c.successor,p?f:d)}E(u,function(){var t="";throw new Error(t)})}function d(t){r[t].entryCount--,0===r[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}};var Ic="";"undefined"!=typeof navigator&&(Ic=navigator.platform||"");var Ac="rgba(0, 0, 0, 0.2)",kc={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Ac,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ac,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ac,dashArrayX:[1,0],dashArrayY:[4,3],dashLineOffset:0,rotation:-Math.PI/4},{color:Ac,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ac,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ac,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Ic.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},Lc=it(["tooltip","label","itemName","itemId","seriesName"]),Pc="original",Oc="arrayRows",Rc="objectRows",Ec="keyedColumns",Nc="typedArray",zc="unknown",Bc="column",Fc="row",Vc={Must:1,Might:2,Not:3},Hc=Il();function Wc(t,e){var n=t?t.metaRawOption:null;return{seriesLayoutBy:X(e.seriesLayoutBy,n?n.seriesLayoutBy:null),sourceHeader:X(e.sourceHeader,t?t.startIndex:null),dimensions:X(e.dimensions,t?t.dimensionsDefine:null)}}function Gc(n,t,e){var r={},i=Yc(t);if(!i||!n)return r;var o,a,s=[],l=[],t=t.ecModel,t=Hc(t).datasetMap,e=i.uid+"_"+e.seriesLayoutBy;E(n=n.slice(),function(t,e){t=V(t)?t:n[e]={name:t};"ordinal"===t.type&&null==o&&(o=e,a=c(t)),r[t.name]=[]});var u=t.get(e)||t.set(e,{categoryWayDim:a,valueWayDim:0});function h(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function c(t){t=t.dimsDef;return t?t.length:1}return E(n,function(t,e){var n,i=t.name,t=c(t);null==o?(n=u.valueWayDim,h(r[i],n,t),h(l,n,t),u.valueWayDim+=t):o===e?(h(r[i],0,t),h(s,0,t)):(n=u.categoryWayDim,h(r[i],n,t),h(l,n,t),u.categoryWayDim+=t)}),s.length&&(r.itemName=s),l.length&&(r.seriesName=l),r}function Uc(t,l,u){var e={};if(!Yc(t))return e;var h,c=l.sourceFormat,p=l.dimensionsDefine;c!==Rc&&c!==Ec||E(p,function(t,e){"name"===(V(t)?t.name:t)&&(h=e)});t=function(){for(var t={},e={},n=[],i=0,r=Math.min(5,u);i<r;i++){var o=Xc(l.data,c,l.seriesLayoutBy,p,l.startIndex,i);n.push(o);var a=o===Vc.Not;if(a&&null==t.v&&i!==h&&(t.v=i),null!=t.n&&t.n!==t.v&&(a||n[t.n]!==Vc.Not)||(t.n=i),s(t)&&n[t.n]!==Vc.Not)return t;a||(o===Vc.Might&&null==e.v&&i!==h&&(e.v=i),null!=e.n&&e.n!==e.v||(e.n=i))}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}();return t&&(e.value=[t.v],t=null!=h?h:t.n,e.itemName=[t],e.seriesName=[t]),e}function Yc(t){if(!t.get("data",!0))return Pl(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},Ll).models[0]}function Xc(t,e,n,i,r,o){var a,s,l;if(W(t))return Vc.Not;if(i&&(V(i=i[o])?(s=i.name,l=i.type):z(i)&&(s=i)),null!=l)return"ordinal"===l?Vc.Must:Vc.Not;if(e===Oc){var u=t;if(n===Fc){for(var h=u[o],c=0;c<(h||[]).length&&c<5;c++)if(null!=(a=m(h[r+c])))return a}else for(c=0;c<u.length&&c<5;c++){var p=u[r+c];if(p&&null!=(a=m(p[o])))return a}}else if(e===Rc){var d=t;if(!s)return Vc.Not;for(c=0;c<d.length&&c<5;c++){if((g=d[c])&&null!=(a=m(g[s])))return a}}else if(e===Ec){if(!s)return Vc.Not;if(!(h=t[s])||W(h))return Vc.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(a=m(h[c])))return a}else if(e===Pc)for(var f=t,c=0;c<f.length&&c<5;c++){var g,y=_l(g=f[c]);if(!N(y))return Vc.Not;if(null!=(a=m(y[o])))return a}function m(t){var e=z(t);return null!=t&&isFinite(t)&&""!==t?e?Vc.Might:Vc.Not:e&&"-"!==t?Vc.Must:void 0}return Vc.Not}var qc=it();var Zc,jc,Kc,$c=Il(),Qc=Il(),Jc=(tp.prototype.getColorFromPalette=function(t,e,n){var i=yl(this.get("color",!0)),r=this.get("colorLayer",!0);return np(this,$c,i,r,t,e,n)},tp.prototype.clearColorPalette=function(){var t,e;(e=$c)(t=this).paletteIdx=0,e(t).paletteNameMap={}},tp);function tp(){}function ep(t,e,n,i){var r=yl(t.get(["aria","decal","decals"]));return np(t,Qc,r,null,e,n,i)}function np(t,e,n,i,r,o,a){e=e(o=o||t),t=e.paletteIdx||0,o=e.paletteNameMap=e.paletteNameMap||{};if(o.hasOwnProperty(r))return o[r];a=null!=a&&i?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(i,a):n;if((a=a||n)&&a.length){n=a[t];return r&&(o[r]=n),e.paletteIdx=(t+1)%a.length,n}}var ip,rp="\0_ec_inner",op=(l(ap,ip=wh),ap.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new wh(i),this._locale=new wh(r),this._optionManager=o},ap.prototype.setOption=function(t,e,n){K(!(rp in t),"please use chart.getOption()");e=up(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},ap.prototype.resetOption=function(t,e){return this._resetOption(t,up(e))},ap.prototype._resetOption=function(t,e){var n,i=!1,r=this._optionManager;return t&&"recreate"!==t||(n=r.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Kc(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=r.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(r=r.getMediaOption(this)).length&&E(r,function(t){i=!0,this._mergeOption(t,e)},this),i},ap.prototype.mergeOption=function(t){this._mergeOption(t,null)},ap.prototype._mergeOption=function(i,t){var r=this.option,u=this._componentsMap,h=this._componentsCount,n=[],o=it(),c=t&&t.replaceMergeMainTypeMap;Hc(this).datasetMap=it(),E(i,function(t,e){null!=t&&(Tc.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?D(t):_(r[e],t,!0))}),c&&c.each(function(t,e){Tc.hasClass(e)&&!o.get(e)&&(n.push(e),o.set(e,!0))}),Tc.topologicalTravel(n,Tc.getAllClassMainTypes(),function(o){var t=function(t,e,n){return(e=qc.get(e))&&(t=e(t))?n.concat(t):n}(this,o,yl(i[o])),e=u.get(o),n=e?c&&c.get(o)?"replaceMerge":"normalMerge":"replaceAll",n=xl(e,t,n);Cl(n,o,Tc),r[o]=null,u.set(o,null),h.set(o,0);var a=[],s=[],l=0;E(n,function(t,e){var n,i=t.existing,r=t.newOption;r?(n=Tc.getClass(o,t.keyInfo.subType,!0),i&&i.constructor===n?(i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1)):(e=I({componentIndex:e},t.keyInfo),I(i=new n(r,this,this,e),e),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0))):i&&(i.mergeOption({},this),i.optionUpdated({},!1)),i?(a.push(i.option),s.push(i),l++):(a.push(void 0),s.push(void 0))},this),r[o]=a,u.set(o,s),h.set(o,l),"series"===o&&Zc(this)},this),this._seriesIndices||Zc(this)},ap.prototype.getOption=function(){var a=D(this.option);return E(a,function(t,e){if(Tc.hasClass(e)){for(var n=yl(t),i=n.length,r=!1,o=i-1;0<=o;o--)n[o]&&!Tl(n[o])?r=!0:(n[o]=null,r||i--);n.length=i,a[e]=n}}),delete a[rp],a},ap.prototype.getTheme=function(){return this._theme},ap.prototype.getLocaleModel=function(){return this._locale},ap.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},ap.prototype.setUpdatePayload=function(t){this._payload=t},ap.prototype.getUpdatePayload=function(){return this._payload},ap.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},ap.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,r=t.id,o=t.name,a=this._componentsMap.get(e);return a&&a.length?(null!=i?(n=[],E(yl(i),function(t){a[t]&&n.push(a[t])})):n=null!=r?sp("id",r,a):null!=o?sp("name",o,a):S(a,function(t){return!!t}),lp(n,t)):[]},ap.prototype.findComponents=function(t){var e,n,i,r,o,a=t.query,s=t.mainType,l=(n=s+"Index",i=s+"Id",r=s+"Name",!(e=a)||null==e[n]&&null==e[i]&&null==e[r]?null:{mainType:s,index:e[n],id:e[i],name:e[r]}),l=l?this.queryComponents(l):S(this._componentsMap.get(s),function(t){return!!t});return o=lp(l,t),t.filter?S(o,t.filter):o},ap.prototype.eachComponent=function(t,e,n){var i=this._componentsMap;if(C(t)){var r=e,o=t;i.each(function(t,e){for(var n=0;t&&n<t.length;n++){var i=t[n];i&&o.call(r,e,i,i.componentIndex)}})}else for(var a=z(t)?i.get(t):V(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var l=a[s];l&&e.call(n,l,l.componentIndex)}},ap.prototype.getSeriesByName=function(t){var e=Sl(t,null);return S(this._componentsMap.get("series"),function(t){return!!t&&null!=e&&t.name===e})},ap.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},ap.prototype.getSeriesByType=function(e){return S(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},ap.prototype.getSeries=function(){return S(this._componentsMap.get("series").slice(),function(t){return!!t})},ap.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},ap.prototype.eachSeries=function(n,i){jc(this),E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},ap.prototype.eachRawSeries=function(e,n){E(this._componentsMap.get("series"),function(t){t&&e.call(n,t,t.componentIndex)})},ap.prototype.eachSeriesByType=function(n,i,r){jc(this),E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(r,e,t)},this)},ap.prototype.eachRawSeriesByType=function(t,e,n){return E(this.getSeriesByType(t),e,n)},ap.prototype.isSeriesFiltered=function(t){return jc(this),null==this._seriesIndicesMap.get(t.componentIndex)},ap.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},ap.prototype.filterSeries=function(n,i){jc(this);var r=[];E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)&&r.push(t)},this),this._seriesIndices=r,this._seriesIndicesMap=it(r)},ap.prototype.restoreData=function(n){Zc(this);var t=this._componentsMap,i=[];t.each(function(t,e){Tc.hasClass(e)&&i.push(e)}),Tc.topologicalTravel(i,Tc.getAllClassMainTypes(),function(e){E(t.get(e),function(t){!t||"series"===e&&function(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,e=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=e&&t.name!==e}}(t,n)||t.restoreData()})})},ap.internalField=(Zc=function(t){var e=t._seriesIndices=[];E(t._componentsMap.get("series"),function(t){t&&e.push(t.componentIndex)}),t._seriesIndicesMap=it(e)},jc=function(t){0},void(Kc=function(t,e){t.option={},t.option[rp]=1,t._componentsMap=it({series:[]}),t._componentsCount=it();var n,i,r=e.aria;V(r)&&null==r.enabled&&(r.enabled=!0),n=e,r=t._theme.option,i=n.color&&!n.colorLayer,E(r,function(t,e){"colorLayer"===e&&i||Tc.hasClass(e)||("object"==typeof t?n[e]=n[e]?_(n[e],t,!1):D(t):null==n[e]&&(n[e]=t))}),_(e,kc,!1),t._mergeOption(e,null)})),ap);function ap(){return null!==ip&&ip.apply(this,arguments)||this}function sp(e,t,n){if(N(t)){var i=it();return E(t,function(t){null!=t&&null!=Sl(t,null)&&i.set(t,!0)}),S(n,function(t){return t&&i.get(t[e])})}var r=Sl(t,null);return S(n,function(t){return t&&null!=r&&t[e]===r})}function lp(t,e){return e.hasOwnProperty("subType")?S(t,function(t){return t&&t.subType===e.subType}):t}function up(t){var e=it();return t&&E(yl(t.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}x(op,Jc);function hp(e){E(cp,function(t){this[t]=M(e[t],e)},this)}var cp=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],pp={},dp=(fp.prototype.create=function(n,i){var r=[];E(pp,function(t,e){t=t.create(n,i);r=r.concat(t||[])}),this._coordinateSystems=r},fp.prototype.update=function(e,n){E(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},fp.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},fp.register=function(t,e){pp[t]=e},fp.get=function(t){return pp[t]},fp);function fp(){this._coordinateSystems=[]}var gp=/^(min|max)?(.+)$/,yp=(mp.prototype.setOption=function(t,e,n){t&&(E(yl(t.series),function(t){t&&t.data&&W(t.data)&&J(t.data)}),E(yl(t.dataset),function(t){t&&t.source&&W(t.source)&&J(t.source)})),t=D(t);var i=this._optionBackup,e=function(t,n,i){var e,r,o=[],a=t.baseOption,s=t.timeline,l=t.options,u=t.media,h=!!t.media,c=!!(l||s||a&&a.timeline);a?(r=a).timeline||(r.timeline=s):((c||h)&&(t.options=t.media=null),r=t);h&&N(u)&&E(u,function(t){t&&t.option&&(t.query?o.push(t):e=e||t)});function p(e){E(n,function(t){t(e,i)})}return p(r),E(l,p),E(o,function(t){return p(t.option)}),{baseOption:r,timelineOptions:l||[],mediaDefault:e,mediaList:o}}(t,e,!i);this._newBaseOption=e.baseOption,i?(e.timelineOptions.length&&(i.timelineOptions=e.timelineOptions),e.mediaList.length&&(i.mediaList=e.mediaList),e.mediaDefault&&(i.mediaDefault=e.mediaDefault)):this._optionBackup=e},mp.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],D(t?e.baseOption:this._newBaseOption)},mp.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;return!n.length||(t=t.getComponent("timeline"))&&(e=D(n[t.getCurrentIndex()])),e},mp.prototype.getMediaOption=function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,r=this._mediaDefault,o=[],a=[];if(!i.length&&!r)return a;for(var s,l,u=0,h=i.length;u<h;u++)!function(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return E(t,function(t,e){var n=e.match(gp);n&&n[1]&&n[2]&&(e=n[1],n=n[2].toLowerCase(),n=i[n],t=t,("min"===(e=e)?t<=n:"max"===e?n<=t:n===t)||(r=!1))}),r}(i[u].query,e,n)||o.push(u);return!o.length&&r&&(o=[-1]),o.length&&(s=o,l=this._currentMediaIndices,s.join(",")!==l.join(","))&&(a=O(o,function(t){return D((-1===t?r:i[t]).option)})),this._currentMediaIndices=o,a},mp);function mp(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}var vp=E,_p=V,xp=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function bp(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=xp.length;n<i;n++){var r=xp[n],o=e.normal,a=e.emphasis;o&&o[r]&&(t[r]=t[r]||{},t[r].normal?_(t[r].normal,o[r]):t[r].normal=o[r],o[r]=null),a&&a[r]&&(t[r]=t[r]||{},t[r].emphasis?_(t[r].emphasis,a[r]):t[r].emphasis=a[r],a[r]=null)}}function wp(t,e,n){var i,r;t&&t[e]&&(t[e].normal||t[e].emphasis)&&(i=t[e].normal,r=t[e].emphasis,i&&(n?(t[e].normal=t[e].emphasis=null,A(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},(t.emphasis[e]=r).focus&&(t.emphasis.focus=r.focus),r.blurScope&&(t.emphasis.blurScope=r.blurScope)))}function Sp(t){wp(t,"itemStyle"),wp(t,"lineStyle"),wp(t,"areaStyle"),wp(t,"label"),wp(t,"labelLine"),wp(t,"upperLabel"),wp(t,"edgeLabel")}function Mp(t,e){var n=_p(t)&&t[e],i=_p(n)&&n.textStyle;if(i){0;for(var r=0,o=vl.length;r<o;r++){var a=vl[r];i.hasOwnProperty(a)&&(n[a]=i[a])}}}function Tp(t){t&&(Sp(t),Mp(t,"label"),t.emphasis&&Mp(t.emphasis,"label"))}function Cp(t){return N(t)?t:t?[t]:[]}function Dp(t){return(N(t)?t[0]:t)||{}}function Ip(e,t){vp(Cp(e.series),function(t){_p(t)&&function(t){if(_p(t)){bp(t),Sp(t),Mp(t,"label"),Mp(t,"upperLabel"),Mp(t,"edgeLabel"),t.emphasis&&(Mp(t.emphasis,"label"),Mp(t.emphasis,"upperLabel"),Mp(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(bp(e),Tp(e));var n=t.markLine;n&&(bp(n),Tp(n));var i=t.markArea;i&&Tp(i);var r=t.data;if("graph"===t.type){r=r||t.nodes;var o=t.links||t.edges;if(o&&!W(o))for(var a=0;a<o.length;a++)Tp(o[a]);E(t.categories,function(t){Sp(t)})}if(r&&!W(r))for(a=0;a<r.length;a++)Tp(r[a]);if((e=t.markPoint)&&e.data)for(var s=e.data,a=0;a<s.length;a++)Tp(s[a]);if((n=t.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)N(l[a])?(Tp(l[a][0]),Tp(l[a][1])):Tp(l[a]);"gauge"===t.type?(Mp(t,"axisLabel"),Mp(t,"title"),Mp(t,"detail")):"treemap"===t.type?(wp(t.breadcrumb,"itemStyle"),E(t.levels,function(t){Sp(t)})):"tree"===t.type&&Sp(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),vp(n,function(t){vp(Cp(e[t]),function(t){t&&(Mp(t,"axisLabel"),Mp(t.axisPointer,"label"))})}),vp(Cp(e.parallel),function(t){t=t&&t.parallelAxisDefault;Mp(t,"axisLabel"),Mp(t&&t.axisPointer,"label")}),vp(Cp(e.calendar),function(t){wp(t,"itemStyle"),Mp(t,"dayLabel"),Mp(t,"monthLabel"),Mp(t,"yearLabel")}),vp(Cp(e.radar),function(t){Mp(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap)}),vp(Cp(e.geo),function(t){_p(t)&&(Tp(t),vp(Cp(t.regions),function(t){Tp(t)}))}),vp(Cp(e.timeline),function(t){Tp(t),wp(t,"label"),wp(t,"itemStyle"),wp(t,"controlStyle",!0);t=t.data;N(t)&&E(t,function(t){V(t)&&(wp(t,"label"),wp(t,"itemStyle"))})}),vp(Cp(e.toolbox),function(t){wp(t,"iconStyle"),vp(t.feature,function(t){wp(t,"iconStyle")})}),Mp(Dp(e.axisPointer),"label"),Mp(Dp(e.tooltip).axisPointer,"label")}function Ap(e){e&&E(kp,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var kp=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Lp=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Pp=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Op(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<Pp.length;n++){var i=Pp[n][1],r=Pp[n][0];null!=e[i]&&(e[r]=e[i])}}function Rp(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function Ep(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function Np(e,t){Ip(e,t),e.series=yl(e.series),E(e.series,function(t){if(V(t)){var e,n,i=t.type;if("line"===i)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===i||"gauge"===i){if(null!=t.clockWise&&(t.clockwise=t.clockWise),Rp(t.label),(e=t.data)&&!W(e))for(var r=0;r<e.length;r++)Rp(e[r]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===i){var o=function(t,e){for(var n=e.split(","),i=t,r=0;r<n.length&&null!=(i=i&&i[n[r]]);r++);return i}(t,"pointer.color");null!=o&&function(t,e,n,i){for(var r,o=e.split(","),a=t,s=0;s<o.length-1;s++)null==a[r=o[s]]&&(a[r]={}),a=a[r];!i&&null!=a[o[s]]||(a[o[s]]=n)}(t,"itemStyle.color",o)}else if("bar"===i){if(Op(t),Op(t.backgroundStyle),Op(t.emphasis),(e=t.data)&&!W(e))for(r=0;r<e.length;r++)"object"==typeof e[r]&&(Op(e[r]),Op(e[r]&&e[r].emphasis))}else{"sunburst"===i?((n=t.highlightPolicy)&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=n)),Ep(t),function t(e,n){if(e)for(var i=0;i<e.length;i++)n(e[i]),e[i]&&t(e[i].children,n)}(t.data,Ep)):"graph"===i||"sankey"===i?(n=t)&&null!=n.focusNodeAdjacency&&(n.emphasis=n.emphasis||{},null==n.emphasis.focus&&(n.emphasis.focus="adjacency")):"map"===i&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&A(t,t.mapLocation))}null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),Ap(t)}}),e.dataRange&&(e.visualMap=e.dataRange),E(Lp,function(t){t=e[t];t&&(N(t)||(t=[t]),E(t,function(t){Ap(t)}))})}function zp(g){E(g,function(u,h){var c=[],p=[NaN,NaN],t=[u.stackResultDimension,u.stackedOverDimension],d=u.data,f=u.isStackedByIndex,t=d.map(t,function(t,e,n){var i,r,o=d.get(u.stackedDimension,n);if(isNaN(o))return p;f?r=d.getRawIndex(n):i=d.get(u.stackedByDimension,n);for(var a=NaN,s=h-1;0<=s;s--){var l=g[s];if(f||(r=l.data.rawIndexOf(l.stackedByDimension,i)),0<=r){l=l.data.getByRawIndex(l.stackResultDimension,r);if(0<=o&&0<l||o<=0&&l<0){o+=l,a=l;break}}}return c[0]=o,c[1]=a,c});d.hostModel.setData(t),u.data=t})}var Bp,Fp,Vp=function(t){this.data=t.data||(t.sourceFormat===Ec?{}:[]),this.sourceFormat=t.sourceFormat||zc,this.seriesLayoutBy=t.seriesLayoutBy||Bc,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function Hp(t){return t instanceof Vp}function Wp(t,e,n,i){n=n||function(t){var e=zc;if(W(t))e=Nc;else if(N(t)){0===t.length&&(e=Oc);for(var n=0,i=t.length;n<i;n++){var r=t[n];if(null!=r){if(N(r)){e=Oc;break}if(V(r)){e=Rc;break}}}}else if(V(t)){for(var o in t)if(ot(t,o)&&P(t[o])){e=Ec;break}}else if(null!=t)throw new Error("Invalid data");return e}(t);var r=e.seriesLayoutBy,o=function(t,e,n,i,r){var o,a;if(!t)return{dimensionsDefine:Yp(r),startIndex:a,dimensionsDetectedCount:o};{var s;e===Oc?(s=t,"auto"===i||null==i?Xp(function(t){null!=t&&"-"!==t&&(z(t)?null==a&&(a=1):a=0)},n,s,10):a=F(i)?i:i?1:0,r||1!==a||(r=[],Xp(function(t,e){r[e]=null!=t?t+"":""},n,s,1/0)),o=r?r.length:n===Fc?s.length:s[0]?s[0].length:null):e===Rc?r=r||function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e){var i=[];return E(e,function(t,e){i.push(e)}),i}}(t):e===Ec?r||(r=[],E(t,function(t,e){r.push(e)})):e===Pc&&(t=_l(t[0]),o=N(t)&&t.length||1)}return{startIndex:a,dimensionsDefine:Yp(r),dimensionsDetectedCount:o}}(t,n,r,e.sourceHeader,e.dimensions);return new Vp({data:t,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:o.dimensionsDefine,startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount,encodeDefine:Up(i),metaRawOption:D(e)})}function Gp(t){return new Vp({data:t,sourceFormat:W(t)?Nc:Pc})}function Up(t){return t?it(t):null}function Yp(t){if(t){var i=it();return O(t,function(t,e){var n={name:(t=V(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==name)return n;n.name+="",null==n.displayName&&(n.displayName=n.name);t=i.get(n.name);return t?n.name+="-"+t.count++:i.set(n.name,{count:1}),n})}}function Xp(t,e,n,i){if(e===Fc)for(var r=0;r<n.length&&r<i;r++)t(n[r]?n[r][0]:null,r);else for(var o=n[0]||[],r=0;r<o.length&&r<i;r++)t(o[r],r)}var qp=(Zp.prototype.getSource=function(){return this._source},Zp.prototype.count=function(){return 0},Zp.prototype.getItem=function(t,e){},Zp.prototype.appendData=function(t){},Zp.prototype.clean=function(){},Zp.protoInitialize=((Ti=Zp.prototype).pure=!1,void(Ti.persistent=!0)),Zp.internalField=function(){var t;Fp=function(t,e,n){var i=n.sourceFormat,r=n.seriesLayoutBy,o=n.startIndex,a=n.dimensionsDefine,n=Bp[ed(i,r)];I(t,n),i===Nc?(t.getItem=s,t.count=u,t.fillStorage=l):(n=Kp(i,r),t.getItem=M(n,null,e,o,a),r=Qp(i,r),t.count=M(r,null,e,o,a))};var s=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,r=i*t,o=0;o<i;o++)e[o]=n[r+o];return e},l=function(t,e,n,i){for(var r=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],h=e-t,c=n[a],p=0;p<h;p++){var d=r[(t+p)*o+a];(c[t+p]=d)<l&&(l=d),u<d&&(u=d)}s[0]=l,s[1]=u}},u=function(){return this._data?this._data.length/this._dimSize:0};function e(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[Oc+"_"+Bc]={pure:!0,appendData:e},t[Oc+"_"+Fc]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Rc]={pure:!0,appendData:e},t[Ec]={pure:!0,appendData:function(t){var r=this._data;E(t,function(t,e){for(var n=r[e]||(r[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},t[Pc]={appendData:e},t[Nc]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},Bp=t}(),Zp);function Zp(t,e){var n=Hp(t)?t:Gp(t);this._source=n;t=this._data=n.data;n.sourceFormat===Nc&&(this._offset=0,this._dimSize=e,this._data=t),Fp(this,t,n)}var jo=function(t,e,n,i){return t[i]},jp=((o={})[Oc+"_"+Bc]=function(t,e,n,i){return t[i+e]},o[Oc+"_"+Fc]=function(t,e,n,i){i+=e;for(var r=[],o=t,a=0;a<o.length;a++){var s=o[a];r.push(s?s[i]:null)}return r},o[Rc]=jo,o[Ec]=function(t,e,n,i){for(var r=[],o=0;o<n.length;o++){var a=n[o].name;0;a=t[a];r.push(a?a[i]:null)}return r},o[Pc]=jo,o);function Kp(t,e){e=jp[ed(t,e)];return e}var vh=function(t,e,n){return t.length},$p=((ql={})[Oc+"_"+Bc]=function(t,e,n){return Math.max(0,t.length-e)},ql[Oc+"_"+Fc]=function(t,e,n){t=t[0];return t?Math.max(0,t.length-e):0},ql[Rc]=vh,ql[Ec]=function(t,e,n){n=n[0].name;n=t[n];return n?n.length:0},ql[Pc]=vh,ql);function Qp(t,e){e=$p[ed(t,e)];return e}var dh=function(t,e,n){return null!=e?t[e]:t},Jp=((Bh={})[Oc]=dh,Bh[Rc]=function(t,e,n){return null!=e?t[n]:t},Bh[Ec]=dh,Bh[Pc]=function(t,e,n){t=_l(t);return null!=e&&t instanceof Array?t[e]:t},Bh[Nc]=dh,Bh);function td(t){t=Jp[t];return t}function ed(t,e){return t===Oc?t+"_"+e:t}function nd(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var r,o,e=t.getProvider().getSource().sourceFormat,n=t.getDimensionInfo(n);return n&&(r=n.name,o=n.index),td(e)(i,o,r)}}}var id=/\{@(.+?)\}/g,rd=(od.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),r=n.getRawIndex(t),o=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,t=this.mainType,s="series"===t,n=n.userOutput;return{componentType:t,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:s?this.subType:null,seriesIndex:this.seriesIndex,seriesId:s?this.id:null,seriesName:s?this.name:null,name:o,dataIndex:r,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:n?n.dimensionNames:null,encode:n?n.encode:null,$vars:["seriesName","name","value"]}},od.prototype.getFormattedLabel=function(i,t,e,n,r,o){t=t||"normal";var a=this.getData(e),e=this.getDataParams(i,e);return o&&I(e,o),null!=n&&e.value instanceof Array&&(e.value=e.value[n]),"function"==typeof(r=r||a.getItemModel(i).get("normal"===t?["label","formatter"]:[t,"label","formatter"]))?(e.status=t,e.dimensionIndex=n,r(e)):"string"==typeof r?cc(r,e).replace(id,function(t,e){var n=e.length;return"["===e.charAt(0)&&"]"===e.charAt(n-1)&&(e=+e.slice(1,n-1)),nd(a,i,e)}):void 0},od.prototype.getRawValue=function(t,e){return nd(this.getData(e),t)},od.prototype.formatTooltip=function(t,e,n){},od);function od(){}function ad(t){return new sd(t)}var sd=(ld.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;this._dirty&&n&&((o=this.context).data=o.outputData=n.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var r=l(this._modBy),o=this._modDataCount||0,a=l(t&&t.modBy),s=t&&t.modDataCount||0;function l(t){return 1<=t||(t=1),t}r===a&&o===s||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,d=this._doReset(i)),this._modBy=a,this._modDataCount=s;t=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var u=this._dueIndex,h=Math.min(null!=t?this._dueIndex+t:1/0,this._dueEnd);if(!i&&(d||u<h)){var c=this._progress;if(N(c))for(var p=0;p<c.length;p++)this._doProgress(c[p],u,h,a,s);else this._doProgress(c,u,h,a,s)}this._dueIndex=h;var d=null!=this._settedOutputEnd?this._settedOutputEnd:h;0,this._outputDueEnd=d}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},ld.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},ld.prototype._doProgress=function(t,e,n,i,r){gd.reset(e,n,i,r),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:gd.next},this.context)},ld.prototype._doReset=function(t){var e;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((n=this._reset(this.context))&&n.progress&&(e=n.forceFirstProgress,n=n.progress),N(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),e},ld.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},ld.prototype.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},ld.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},ld.prototype.getUpstream=function(){return this._upstream},ld.prototype.getDownstream=function(){return this._downstream},ld.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},ld);function ld(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}var ud,hd,cd,pd,dd,fd,gd=fd={reset:function(t,e,n,i){hd=t,ud=e,cd=n,pd=i,dd=Math.ceil(pd/cd),fd.next=1<cd&&0<pd?md:yd}};function yd(){return hd<ud?hd++:null}function md(){var t=hd%dd*cd+Math.ceil(hd/dd),t=ud<=hd?null:t<pd?t:hd;return hd++,t}function vd(t,e){var n=e&&e.type;if("ordinal"!==n)return"time"===n&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+sl(t)),null==t||""===t?NaN:+t;e=e&&e.ordinalMeta;return e?e.parseAndCollect(t):t}it({number:function(t){return parseFloat(t)},time:function(t){return+sl(t)},trim:function(t){return"string"==typeof t?$(t):t}});var _d=(xd.prototype.getRawData=function(){throw new Error("not supported")},xd.prototype.getRawDataItem=function(t){throw new Error("not supported")},xd.prototype.cloneRawData=function(){},xd.prototype.getDimensionInfo=function(t){},xd.prototype.cloneAllDimensionInfo=function(){},xd.prototype.count=function(){},xd.prototype.retrieveValue=function(t,e){},xd.prototype.retrieveValueFromItem=function(t,e){},xd.prototype.convertValue=vd,xd);function xd(){}function bd(t){var e=t.sourceFormat,n=t.data;if(e===Oc||e===Rc||!n||N(n)&&!n.length)return t.data;t="";dl(t)}function wd(t){var e=t.sourceFormat,n=t.data;if(!n)return n;if(N(n)&&!n.length)return[];if(e===Oc){for(var i=[],r=0,o=n.length;r<o;r++)i.push(n[r].slice());return i}if(e===Rc){for(i=[],r=0,o=n.length;r<o;r++)i.push(I({},n[r]));return i}}function Sd(t,e,n){if(null!=n)return"number"==typeof n||!isNaN(n)&&!ot(e,n)?t[n]:ot(e,n)?e[n]:void 0}function Md(t){return D(t)}var Td=it();function Cd(t,e){var n=yl(t),i=n.length,t="";i||dl(t);for(var r=0,o=i;r<o;r++){e=function(t,i){var e="";i.length||dl(e);V(t)||dl(e);var n=t.type,r=Td.get(n);r||dl(e);e=O(i,function(t){return function(t,e){var n=new _d,i=t.data,r=n.sourceFormat=t.sourceFormat,o=t.startIndex,a=[],s={},l=t.dimensionsDefine;if(l)E(l,function(t,e){var n=t.name,e={index:e,name:n,displayName:t.displayName};a.push(e),null!=n&&(t="",ot(s,n)&&dl(t),s[n]=e)});else for(var u=0;u<t.dimensionsDetectedCount;u++)a.push({index:u});var h=Kp(r,Bc);e.__isBuiltIn&&(n.getRawDataItem=function(t){return h(i,o,a,t)},n.getRawData=M(bd,null,t)),n.cloneRawData=M(wd,null,t),e=Qp(r,Bc),n.count=M(e,null,i,o,a);var c=td(r);n.retrieveValue=function(t,e){t=h(i,o,a,t);return p(t,e)};var p=n.retrieveValueFromItem=function(t,e){if(null!=t){var n=a[e];return n?c(t,e,n.name):void 0}};return n.getDimensionInfo=M(Sd,null,a,s),n.cloneAllDimensionInfo=M(Md,null,a),n}(t,r)}),t=yl(r.transform({upstream:e[0],upstreamList:e,config:D(t.config)}));{}return O(t,function(t){var e="";V(t)||dl(e);var n=t.data;return null!=n?V(n)||P(n)||dl(e):n=i[0].data,Wp(n,Wc(i[0],{seriesLayoutBy:Bc,sourceHeader:0,dimensions:t.dimensions}),null,null)})}(n[r],e),r!==o-1&&(e.length=Math.max(e.length,1))}return e}var Dd=(Id.prototype.dirty=function(){this._setLocalSource([],[])},Id.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,9e10<this._versionSignBase&&(this._versionSignBase=0)},Id.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},Id.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},Id.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n,i,r,o=this._sourceHost,a=this._getUpstreamSourceManagers(),s=!!a.length;kd(o)?(r=o,n=e=t=void 0,i=s?((i=a[0]).prepareSource(),t=(n=i.getSource()).data,e=n.sourceFormat,[i._getVersionSign()]):(e=W(t=r.get("data",!0))?Nc:Pc,[]),r=[Wp(t,Wc(n,this._getSourceMetaRawOption()),e,r.get("encode",!0))]):(o=o,i=s?(r=(a=this._applyTransform(a)).sourceList,a.upstreamSignList):(r=[Wp(o.get("source",!0),this._getSourceMetaRawOption(),null,null)],[])),this._setLocalSource(r,i)},Id.prototype._applyTransform=function(t){var e,n,i=this._sourceHost,r=i.get("transform",!0),o=i.get("fromTransformResult",!0);null!=o&&(e="",1!==t.length&&Ld(e));var a=[],s=[];return E(t,function(t){t.prepareSource();var e=t.getSource(o||0),n="";null==o||e||Ld(n),a.push(e),s.push(t._getVersionSign())}),r?n=Cd(r,a,i.componentIndex):null!=o&&(n=[(i=a[0],new Vp({data:i.data,sourceFormat:i.sourceFormat,seriesLayoutBy:i.seriesLayoutBy,dimensionsDefine:D(i.dimensionsDefine),startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,encodeDefine:Up(i.encodeDefine)}))]),{sourceList:n,upstreamSignList:s}},Id.prototype._isDirty=function(){if(!this._sourceList.length)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},Id.prototype.getSource=function(t){return this._sourceList[t||0]},Id.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(kd(t)){var e=Yc(t);return e?[e.getSourceManager()]:[]}return O((t=t).get("transform",!0)||t.get("fromTransformResult",!0)?Pl(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},Ll).models:[],function(t){return t.getSourceManager()})},Id.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;return kd(i)?(t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(t=(i=i).get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:t,sourceHeader:e,dimensions:n}},Id);function Id(t){this._sourceList=[],this._upstreamSignList=[],this._versionSignBase=0,this._sourceHost=t}function Ad(t){t.option.transform&&J(t.option.transform)}function kd(t){return"series"===t.mainType}function Ld(t){throw new Error(t)}function Pd(t,e){return e.type=t,e}function Od(t,e){var n,t=t.getData().getItemVisual(e,"style")[t.visualDrawType];return n=n||"transparent",z(t=t)?t:V(t)&&t.colorStops&&(t.colorStops[0]||{}).color||n}function Rd(t){var e,n,i,r,o,a,s,l,u,h,c,p=t.series,d=t.dataIndex,f=t.multipleSeries,g=p.getData(),y=g.mapDimensionsAll("defaultedTooltip"),m=y.length,v=p.getRawValue(d),_=N(v),t=Od(p,d);function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Pd("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1<m||_&&!m?(e=(n=(i=v,r=d,o=y,a=t,s=p.getData(),l=b(i,function(t,e,n){n=s.getDimensionInfo(n);return t||n&&!1!==n.tooltip&&null!=n.displayName},!1),u=[],h=[],c=[],o.length?E(o,function(t){x(nd(s,r,t),t)}):E(i,x),{inlineValues:u,inlineValueTypes:h,blocks:c})).inlineValueTypes,o=n.blocks,n=(i=n.inlineValues)[0]):m?(m=g.getDimensionInfo(y[0]),n=i=nd(g,d,y[0]),e=m.type):n=i=_?v[0]:v;v=Ml(p),p=v&&p.name||"",d=g.getName(d),d=f?p:d;return Pd("section",{header:p,noHeader:f||!v,sortParam:n,blocks:[Pd("nameValue",{markerType:"item",markerColor:t,name:d,noName:!$(d),value:i,valueType:e})].concat(o||[])})}var Ed=Il();function Nd(t,e){return t.getName(e)||t.getId(e)}var zd,Bd=(l(Fd,zd=Tc),Fd.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=ad({count:Hd,reset:Wd}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(Ed(this).sourceManager=new Dd(this)).prepareSource();n=this.getInitialData(t,n);Ud(n,this),this.dataTask.context.data=n,Ed(this).dataBeforeProcessed=n,Vd(this),this._initSelectedMapFromData(n)},Fd.prototype.mergeDefaultAndTheme=function(t,e){var n=mc(this),i=n?_c(t):{},r=this.subType;Tc.hasClass(r),_(t,e.getTheme().get(this.subType)),_(t,this.getDefaultOption()),ml(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&vc(t,i,n)},Fd.prototype.mergeOption=function(t,e){t=_(this.option,t,!0),this.fillDataTextStyle(t.data);var n=mc(this);n&&vc(this.option,t,n);n=Ed(this).sourceManager;n.dirty(),n.prepareSource();e=this.getInitialData(t,e);Ud(e,this),this.dataTask.dirty(),this.dataTask.context.data=e,Ed(this).dataBeforeProcessed=e,Vd(this),this._initSelectedMapFromData(e)},Fd.prototype.fillDataTextStyle=function(t){if(t&&!W(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&ml(t[n],"label",e)},Fd.prototype.getInitialData=function(t,e){},Fd.prototype.appendData=function(t){this.getRawData().appendData(t.data)},Fd.prototype.getData=function(t){var e=Xd(this);if(e){e=e.context.data;return null==t?e:e.getLinkedData(t)}return Ed(this).data},Fd.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},Fd.prototype.setData=function(t){var e,n=Xd(this);n&&((e=n.context).outputData=t,n!==this.dataTask&&(e.data=t)),Ed(this).data=t},Fd.prototype.getSource=function(){return Ed(this).sourceManager.getSource()},Fd.prototype.getRawData=function(){return Ed(this).dataBeforeProcessed},Fd.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},Fd.prototype.formatTooltip=function(t,e,n){return Rd({series:this,dataIndex:t,multipleSeries:e})},Fd.prototype.isAnimationEnabled=function(){if(w.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),!!t},Fd.prototype.restoreData=function(){this.dataTask.dirty()},Fd.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Jc.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},Fd.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},Fd.prototype.getProgressive=function(){return this.get("progressive")},Fd.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},Fd.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},Fd.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r<t.length;r++){var o=Nd(i,t[r]);n[o]=!1,this._selectedDataIndicesMap[o]=-1}},Fd.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},Fd.prototype.getSelectedDataIndices=function(){for(var t=this._selectedDataIndicesMap,e=R(t),n=[],i=0;i<e.length;i++){var r=t[e[i]];0<=r&&n.push(r)}return n},Fd.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[Nd(this.getData(e),t)]||!1},Fd.prototype._innerSelect=function(t,e){var n,i=this.option.selectedMode,r=e.length;if(i&&r)if("multiple"===i)for(var o=this.option.selectedMap||(this.option.selectedMap={}),a=0;a<r;a++){var s,l=e[a];o[s=Nd(t,l)]=!0,this._selectedDataIndicesMap[s]=t.getRawIndex(l)}else"single"!==i&&!0!==i||(s=Nd(t,n=e[r-1]),this.option.selectedMap=((i={})[s]=!0,i),this._selectedDataIndicesMap=((i={})[s]=t.getRawIndex(n),i))},Fd.prototype._initSelectedMapFromData=function(n){var i;this.option.selectedMap||(i=[],n.hasItemOption&&n.each(function(t){var e=n.getRawDataItem(t);"object"==typeof e&&e.selected&&i.push(t)}),0<i.length&&this._innerSelect(n,i))},Fd.registerClass=function(t){return Tc.registerClass(t)},Fd.protoInitialize=((Ac=Fd.prototype).type="series.__base__",Ac.seriesIndex=0,Ac.useColorPaletteOnData=!1,Ac.ignoreStyleOnData=!1,Ac.hasSymbolVisual=!1,Ac.defaultSymbol="circle",Ac.visualStyleAccessPath="itemStyle",void(Ac.visualDrawType="fill")),Fd);function Fd(){var t=null!==zd&&zd.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}function Vd(t){var e,n,i=t.name;Ml(t)||(t.name=(t=(e=(t=t).getRawData()).mapDimensionsAll("seriesName"),n=[],E(t,function(t){t=e.getDimensionInfo(t);t.displayName&&n.push(t.displayName)}),n.join(" ")||i))}function Hd(t){return t.model.getRawData().count()}function Wd(t){t=t.model;return t.setData(t.getRawData().cloneShallow()),Gd}function Gd(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Ud(e,n){E(a(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,T(Yd,n))})}function Yd(t,e){t=Xd(t);return t&&t.setOutputEnd((e||this).count()),e}function Xd(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){e=n.currentTask;return!e||(n=e.agentStubMap)&&(e=n.get(t.uid)),e}}x(Bd,rd),x(Bd,Jc),Vl(Bd,Tc);var qd=(Zd.prototype.init=function(t,e){},Zd.prototype.render=function(t,e,n,i){},Zd.prototype.dispose=function(t,e){},Zd.prototype.updateView=function(t,e,n,i){},Zd.prototype.updateLayout=function(t,e,n,i){},Zd.prototype.updateVisual=function(t,e,n,i){},Zd.prototype.blurSeries=function(t,e){},Zd);function Zd(){this.group=new fo,this.uid=Th("viewComponent")}function jd(){var o=Il();return function(t){var e=o(t),n=t.pipelineContext,i=!!e.large,r=!!e.progressiveRender,t=e.large=!(!n||!n.large),n=e.progressiveRender=!(!n||!n.progressiveRender);return!(i==t&&r==n)&&"reset"}}Fl(qd),Ul(qd,{registerWhenExtend:!0});var Kd=Il(),$d=jd(),Qd=(Jd.prototype.init=function(t,e){},Jd.prototype.render=function(t,e,n,i){},Jd.prototype.highlight=function(t,e,n,i){ef(t.getData(),i,"emphasis")},Jd.prototype.downplay=function(t,e,n,i){ef(t.getData(),i,"normal")},Jd.prototype.remove=function(t,e){this.group.removeAll()},Jd.prototype.dispose=function(t,e){},Jd.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Jd.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Jd.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Jd.markUpdateMethod=function(t,e){Kd(t).updateMethod=e},Jd.protoInitialize=void(Jd.prototype.type="chart"),Jd);function Jd(){this.group=new fo,this.uid=Th("viewChart"),this.renderTask=ad({plan:nf,reset:rf}),this.renderTask.context={view:this}}function tf(t,e,n){t&&("emphasis"===e?Du:Iu)(t,n)}function ef(e,t,n){var i,r=Dl(e,t),o=t&&null!=t.highlightKey?(i=t.highlightKey,null==(t=$l[i])&&Kl<=32&&(t=$l[i]=Kl++),t):null;null!=r?E(yl(r),function(t){tf(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){tf(t,n,o)})}function nf(t){return $d(t.model)}function rf(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,t=r&&Kd(r).updateMethod,t=o?"incrementalPrepareRender":t&&a[t]?t:"render";return"render"!==t&&a[t](e,n,i,r),of[t]}Fl(Qd),Ul(Qd,{registerWhenExtend:!0});var of={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 af(t,r,o){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}r=r||0;function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a=(new Date).getTime(),l=this,u=t;var n=h||r,i=h||o;h=null,s=a-(i?c:p)-n,clearTimeout(d),i?d=setTimeout(f,n):0<=s?f():d=setTimeout(f,-s),c=a}return e.clear=function(){d&&(clearTimeout(d),d=null)},e.debounceNextCall=function(t){h=t},e}var sf=Il(),lf={itemStyle:Yl(g,!0),lineStyle:Yl(n,!0)},uf={lineStyle:"stroke",itemStyle:"fill"};function hf(t,e){t=t.visualStyleMapper||lf[e];return t||(console.warn("Unkown style type '"+e+"'."),lf.itemStyle)}function cf(t,e){t=t.visualDrawType||uf[e];return t||(console.warn("Unkown style type '"+e+"'."),"fill")}var Ic={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),o=hf(r,n)(i),i=i.getShallow("decal");i&&(e.setVisual("decal",i),i.dirty=!0);var a=cf(r,n),n=o[a],s=C(n)?n:null;if(o[a]&&!s||(o[a]=r.getColorFromPalette(r.name,null,t.getSeriesCount()),e.setVisual("colorFromPalette",!0)),e.setVisual("style",o),e.setVisual("drawType",a),!t.isSeriesFiltered(r)&&s)return e.setVisual("colorFromPalette",!1),{dataEach:function(t,e){var n=r.getDataParams(e),i=I({},o);i[a]=s(n),t.setItemVisual(e,"style",i)}}}},pf=new wh,Ti={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var e=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=hf(t,i),o=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(t,e){var n=t.getRawDataItem(e);n&&n[i]&&(pf.option=n[i],n=r(pf),I(t.ensureUniqueItemVisual(e,"style"),n),pf.option.decal&&(t.setItemVisual(e,"decal",pf.option.decal),pf.option.decal.dirty=!0),o in n&&t.setItemVisual(e,"colorFromPalette",!1))}:null}}}},jo={performRawSeries:!0,overallReset:function(e){var n=it();e.eachSeries(function(t){var e;t.useColorPaletteOnData&&((e=n.get(t.type))||(e={},n.set(t.type,e)),sf(t).scope=e)}),e.eachSeries(function(i){var r,o,a,s,t,l;i.useColorPaletteOnData&&!e.isSeriesFiltered(i)&&(r=i.getRawData(),o={},a=i.getData(),s=sf(i).scope,t=i.visualStyleAccessPath||"itemStyle",l=cf(i,t),a.each(function(t){var e=a.getRawIndex(t);o[e]=t}),r.each(function(t){var e,n=o[t];a.getItemVisual(n,"colorFromPalette")&&(e=a.ensureUniqueItemVisual(n,"style"),n=r.getName(t)||t+"",t=r.count(),e[l]=i.getColorFromPalette(n,s,t))}))})}},df=Math.PI;var ff=(gf.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){t=t.overallTask;t&&t.dirty()})},gf.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,n=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,i=i&&i.modDataCount;return{step:n,modBy:null!=i?Math.ceil(i/n):null,modDataCount:i}}},gf.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},gf.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,e=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:i,large:e}},gf.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=it();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},gf.prototype.prepareStageTasks=function(){var i=this._stageTaskMap,r=this.api.getModel(),o=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,{}),n="";K(!(t.reset&&t.overallReset),n),t.reset&&this._createSeriesStageTask(t,e,r,o),t.overallReset&&this._createOverallStageTask(t,e,r,o)},this)},gf.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},gf.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},gf.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},gf.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}E(t,function(i,t){var e,n,r,o,a;u.visualType&&u.visualType!==i.visualType||(e=(o=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=o.overallTask)?((o=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),r=!0)}),r&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),o.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},gf.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},gf.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},gf.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},gf.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=it(),e=n.seriesType,t=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||ad({plan:xf,reset:bf,count:Mf}));e.context={model:t,ecModel:i,api:r,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:o},o._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):e?i.eachRawSeriesByType(e,l):t&&t(i,r).each(l)},gf.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||ad({reset:yf});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=it(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,e="";function p(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(c=!0,ad({reset:mf,onDirty:_f})));e.context={model:t,overallProgress:h},e.agent=o,e.__block=h,r._pipe(t,e)}K(!t.createOnAllSeries,e),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(h=!1,E(n.getSeries(),p)),c&&o.dirty()},gf.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},gf.wrapStageHandler=function(t,e){return C(t)&&(t={overallReset:t,seriesType:function(t){Tf=null;try{t(Cf,Df)}catch(t){}return Tf}(t)}),t.uid=Th("stageHandler"),e&&(t.visualType=e),t},gf);function gf(t,e,n,i){this._stageTaskMap=it(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function yf(t){t.overallReset(t.ecModel,t.api,t.payload)}function mf(t){return t.overallProgress&&vf}function vf(){this.agent.dirty(),this.getDownstream().dirty()}function _f(){this.agent&&this.agent.dirty()}function xf(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function bf(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=yl(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<t.length?O(t,function(t,e){return Sf(e)}):wf}var wf=Sf(0);function Sf(o){return function(t,e){var n=e.data,i=e.resetDefines[o];if(i&&i.dataEach)for(var r=t.start;r<t.end;r++)i.dataEach(n,r);else i&&i.progress&&i.progress(t,n)}}function Mf(t){return t.data.count()}var Tf,Cf={},Df={};function If(t,e){for(var n in e.prototype)t[n]=at}If(Cf,op),If(Df,hp),Cf.eachSeriesByType=Cf.eachRawSeriesByType=function(t){Tf=t},Cf.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Tf=t.subType)};var o=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],vh={color:o,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],o]},Af="#B9B8CE",ql="#100C2A",dh=function(){return{axisLine:{lineStyle:{color:Af}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Bh=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Ac={darkMode:!0,color:Bh,backgroundColor:ql,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Af}},textStyle:{color:Af},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Af}},dataZoom:{borderColor:"#71708A",textStyle:{color:Af},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Af}},timeline:{lineStyle:{color:Af},label:{color:Af},controlStyle:{color:Af,borderColor:Af}},calendar:{itemStyle:{color:ql},dayLabel:{color:Af},monthLabel:{color:Af},yearLabel:{color:Af}},timeAxis:dh(),logAxis:dh(),valueAxis:dh(),categoryAxis:dh(),line:{symbol:"circle"},graph:{color:Bh},gauge:{title:{color:Af},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Af},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}};Ac.categoryAxis.splitLine.show=!1;var kf,rd=(l(Lf,kf=Tc),Lf.prototype.init=function(t,e,n){kf.prototype.init.call(this,t,e,n),this._sourceManager=new Dd(this),Ad(this)},Lf.prototype.mergeOption=function(t,e){kf.prototype.mergeOption.call(this,t,e),Ad(this)},Lf.prototype.optionUpdated=function(){this._sourceManager.dirty()},Lf.prototype.getSourceManager=function(){return this._sourceManager},Lf.type="dataset",Lf.defaultOption={seriesLayoutBy:Bc},Lf);function Lf(){var t=null!==kf&&kf.apply(this,arguments)||this;return t.type="dataset",t}Tc.registerClass(rd);var Pf,g=(l(Of,Pf=qd),Of.type="dataset",Of);function Of(){var t=null!==Pf&&Pf.apply(this,arguments)||this;return t.type="dataset",t}qd.registerClass(g);var Rf=it(),Ef=function(t,e,n){var i,n=N(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:((i=e.geoJson||e.geoJSON)&&!e.features&&(n=e.specialAreas,e=i),[{type:"geoJSON",source:e,specialAreas:n}]);return E(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");e=zf[e];e(t)}),Rf.set(t,n)},Nf=function(t){return Rf.get(t)},zf={geoJSON:function(t){var e=t.source;t.geoJSON=z(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=function(t){z(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}(t.source)}},Bf=(Ff.prototype.normalizeQuery=function(t){var e,a,s,l={},u={},h={};return z(t)?(e=Bl(t),l.mainType=e.main||null,l.subType=e.sub||null):(a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1},E(t,function(t,e){for(var n=!1,i=0;i<a.length;i++){var r=a[i],o=e.lastIndexOf(r);0<o&&o===e.length-r.length&&("data"!==(o=e.slice(0,o))&&(l.mainType=o,l[r.toLowerCase()]=t,n=!0))}s.hasOwnProperty(e)&&(u[e]=t,n=!0),n||(h[e]=t)})),{cptQuery:l,dataQuery:u,otherQuery:h}},Ff.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,n=e.dataQuery;return l(s,o,"mainType")&&l(s,o,"subType")&&l(s,o,"index","componentIndex")&&l(s,o,"name")&&l(s,o,"id")&&l(n,r,"name")&&l(n,r,"dataIndex")&&l(n,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function l(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},Ff.prototype.afterTrigger=function(){this.eventInfo=null},Ff);function Ff(){}n={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendSymbol&&e.setVisual("legendSymbol",r.legendSymbol),r.hasSymbolVisual){var o=r.get("symbol"),a=r.get("symbolSize"),n=r.get("symbolKeepAspect"),s=r.get("symbolRotate"),l=C(o),u=C(a),h=C(s),i=l||u||h,c=!l&&o?o:r.defaultSymbol,p=u?null:a,d=h?null:s;if(e.setVisual({legendSymbol:r.legendSymbol||c,symbol:c,symbolSize:p,symbolKeepAspect:n,symbolRotate:d}),!t.isSeriesFiltered(r))return{dataEach:i?function(t,e){var n=r.getRawValue(e),i=r.getDataParams(e);l&&t.setItemVisual(e,"symbol",o(n,i)),u&&t.setItemVisual(e,"symbolSize",a(n,i)),h&&t.setItemVisual(e,"symbolRotate",s(n,i))}:null}}}},o={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=(o=t.getItemModel(e)).getShallow("symbol",!0),i=o.getShallow("symbolSize",!0),r=o.getShallow("symbolRotate",!0),o=o.getShallow("symbolKeepAspect",!0);null!=n&&t.setItemVisual(e,"symbol",n),null!=i&&t.setItemVisual(e,"symbolSize",i),null!=r&&t.setItemVisual(e,"symbolRotate",r),null!=o&&t.setItemVisual(e,"symbolKeepAspect",o)}:null}}};var Vf=2*Math.PI,Hf=Dr.CMD,Wf=["top","right","bottom","left"];function Gf(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,n=i-e,i=Math.sqrt(h*h+n*n),u=(l*(h/=i)+u*(n/=i))/i;s&&(u=Math.min(Math.max(u,0),1)),u*=i;h=a[0]=t+u*h,n=a[1]=e+u*n;return Math.sqrt((h-r)*(h-r)+(n-o)*(n-o))}function Uf(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);n=t+n,i=e+i,n=a[0]=Math.min(Math.max(r,t),n),i=a[1]=Math.min(Math.max(o,e),i);return Math.sqrt((n-r)*(n-r)+(i-o)*(i-o))}var Yf=[];function Xf(t,e,n){for(var i=0,r=0,o=0,a=0,s=1/0,l=e.data,u=t.x,h=t.y,c=0;c<l.length;){var p=l[c++];1===c&&(o=i=l[c],a=r=l[c+1]);var d=s;switch(p){case Hf.M:i=o=l[c++],r=a=l[c++];break;case Hf.L:d=Gf(i,r,l[c],l[c+1],u,h,Yf,!0),i=l[c++],r=l[c++];break;case Hf.C:d=Yi(i,r,l[c++],l[c++],l[c++],l[c++],l[c],l[c+1],u,h,Yf),i=l[c++],r=l[c++];break;case Hf.Q:d=Ki(i,r,l[c++],l[c++],l[c],l[c+1],u,h,Yf),i=l[c++],r=l[c++];break;case Hf.A:var f=l[c++],g=l[c++],y=l[c++],m=l[c++],v=l[c++],_=l[c++];c+=1;var x=!!(1-l[c++]),b=Math.cos(v)*y+f,p=Math.sin(v)*m+g;c<=1&&(o=b,a=p);d=function(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%Vf<1e-4)return l[0]=h,l[1]=c,u-n;(r=o?(p=i,i=Lr(r),Lr(p)):(i=Lr(i),Lr(r)))<i&&(r+=Vf);var p=Math.atan2(s,a);return p<0&&(p+=Vf),i<=p&&p<=r||i<=p+Vf&&p+Vf<=r?(l[0]=h,l[1]=c,u-n):(u=n*Math.cos(i)+t,i=n*Math.sin(i)+e,t=n*Math.cos(r)+t,r=n*Math.sin(r)+e,(e=(u-a)*(u-a)+(i-s)*(i-s))<(s=(t-a)*(t-a)+(r-s)*(r-s))?(l[0]=u,l[1]=i,Math.sqrt(e)):(l[0]=t,l[1]=r,Math.sqrt(s)))}(f,g,m,v,v+_,x,(u-f)*m/y+f,h,Yf),i=Math.cos(v+_)*y+f,r=Math.sin(v+_)*m+g;break;case Hf.R:d=Uf(o=i=l[c++],a=r=l[c++],l[c++],l[c++],u,h,Yf);break;case Hf.Z:d=Gf(i,r,o,a,u,h,Yf,!0),i=o,r=a}d<s&&(s=d,n.set(Yf[0],Yf[1]))}return s}var qf=new $e,Zf=new $e,jf=new $e,Kf=new $e,$f=new $e;function Qf(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var r=t.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=r.candidates||Wf,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=r.anchor,h=t.getComputedTransform(),c=h&&re([],h),p=e.get("length2")||0;u&&jf.copy(u);for(var d,f=0;f<a.length;f++){!function(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}(a[f],0,s,qf,Kf),$e.scaleAndAdd(Zf,qf,Kf,p),Zf.transform(c);var g=t.getBoundingRect(),y=u?u.distance(Zf):t instanceof Xr?Xf(Zf,t.path,jf):(y=Zf,d=jf,y=Uf((g=g).x,g.y,g.width,g.height,y.x,y.y,Yf),d.set(Yf[0],Yf[1]),y);y<l&&(l=y,Zf.transform(h),jf.transform(h),jf.toArray(o[0]),Zf.toArray(o[1]),qf.toArray(o[2]))}eg(o,e.get("minTurnAngle")),n.setShape({points:o})}}}var Jf=[],tg=new $e;function eg(t,e){var n,i;e<=180&&0<e&&(e=e/180*Math.PI,qf.fromArray(t[0]),Zf.fromArray(t[1]),jf.fromArray(t[2]),$e.sub(Kf,qf,Zf),$e.sub($f,jf,Zf),n=Kf.len(),i=$f.len(),n<.001||i<.001||(Kf.scale(1/n),$f.scale(1/i),i=Kf.dot($f),Math.cos(e)<i&&(i=Gf(Zf.x,Zf.y,jf.x,jf.y,qf.x,qf.y,Jf,!1),tg.fromArray(Jf),tg.scaleAndAdd($f,i/Math.tan(Math.PI-e)),e=jf.x!==Zf.x?(tg.x-Zf.x)/(jf.x-Zf.x):(tg.y-Zf.y)/(jf.y-Zf.y),isNaN(e)||(e<0?$e.copy(tg,Zf):1<e&&$e.copy(tg,jf),tg.toArray(t[1])))))}function ng(t,e,n,i){var r="normal"===n,n=r?t:t.ensureState(n);n.ignore=e;e=i.get("smooth");e&&!0===e&&(e=.3),n.shape=n.shape||{},0<e&&(n.shape.smooth=e);i=i.getModel("lineStyle").getLineStyle();r?t.useStyle(i):n.style=i}function ig(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),0<n&&3<=i.length){var r=pt(i[0],i[1]),e=pt(i[1],i[2]);if(!r||!e)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);n=Math.min(r,e)*n,r=ft([],i[1],i[0],n/r),n=ft([],i[1],i[2],n/e),e=ft([],r,n,.5);t.bezierCurveTo(r[0],r[1],r[0],r[1],e[0],e[1]),t.bezierCurveTo(n[0],n[1],n[0],n[1],i[2][0],i[2][1])}else for(var o=1;o<i.length;o++)t.lineTo(i[o][0],i[o][1])}function rg(t,e,n){var i=t.getTextGuideLine(),r=t.getTextContent();if(r){for(var o=e.normal,a=o.get("show"),s=r.ignore,l=0;l<iu.length;l++){var u,h=iu[l],c=e[h],p="normal"===h;c&&(u=c.get("show"),!(p?s:X(r.states[h]&&r.states[h].ignore,s))&&X(u,a)?(i||(i=new qo,t.setTextGuideLine(i),p||!s&&a||ng(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),ng(i,!1,h,c)):(p=p?i:i&&i.states.normal)&&(p.ignore=!0))}i&&(A(i.style,n),i.style.fill=null,o=o.get("showAbove"),(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=o||!1,i.buildPath=ig)}else i&&t.removeTextGuideLine()}function og(t,e){e=e||"labelLine";for(var n={normal:t.getModel(e)},i=0;i<nu.length;i++){var r=nu[i];n[r]=t.getModel([r,e])}return n}function ag(s,l,u,t,e,n){var h=s.length;if(!(h<2)){s.sort(function(t,e){return t.rect[l]-e.rect[l]});for(var i=0,o=!1,r=0,a=0;a<h;a++){var c,p=s[a],d=p.rect;(c=d[l]-i)<0&&(d[l]-=c,p.label[l]-=c,o=!0),r+=Math.max(-c,0),i=d[l]+d[u]}0<r&&n&&x(-r/h,0,h);var f,g,y=s[0],m=s[h-1];return v(),f<0&&b(-f,.8),g<0&&b(g,.8),v(),_(f,g,1),_(g,f,-1),v(),f<0&&w(-f),g<0&&w(g),o}function v(){f=y.rect[l]-t,g=e-m.rect[l]-m.rect[u]}function _(t,e,n){t<0&&(0<(e=Math.min(e,-t))?(x(e*n,0,h),(e=e+t)<0&&b(-e*n,1)):b(-t*n,1))}function x(t,e,n){0!==t&&(o=!0);for(var i=e;i<n;i++){var r=s[i];r.rect[l]+=t,r.label[l]+=t}}function b(t,e){for(var n=[],i=0,r=1;r<h;r++){var o=s[r-1].rect,o=Math.max(s[r].rect[l]-o[l]-o[u],0);n.push(o),i+=o}if(i){var a=Math.min(Math.abs(t)/i,e);if(0<t)for(r=0;r<h-1;r++){x(n[r]*a,0,r+1)}else for(r=h-1;0<r;r--){x(-(n[r-1]*a),r,h)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(h-1)),i=0;i<h-1;i++)if(0<e?x(n,0,i+1):x(-n,h-i-1,h),(t-=n)<=0)return}}function sg(t,e,n,i){return ag(t,"y","height",e,n,i)}function lg(t,e){var n=t.label,e=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:function(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}(e&&e.shape.points)}}var ug=["align","verticalAlign","width","height","fontSize"],hg=new ce,cg=Il(),pg=Il();function dg(t,e,n){for(var i=0;i<n.length;i++){var r=n[i];null!=e[r]&&(t[r]=e[r])}}var fg=["x","y","rotation"],gg=(yg.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},yg.prototype._addLabel=function(t,e,n,i,r){var o=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();ln.applyTransform(l,l,s),s?hg.setLocalTransform(s):(hg.x=hg.y=hg.rotation=hg.originX=hg.originY=0,hg.scaleX=hg.scaleY=1);var u,h=i.__hostTarget;h&&(u=h.getBoundingRect().plain(),s=h.getComputedTransform(),ln.applyTransform(u,u,s));h=u&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:h,seriesModel:n,dataIndex:t,dataType:e,layoutOption:r,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:h&&h.ignore,x:hg.x,y:hg.y,rotation:hg.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},yg.prototype.addLabelsOfSeries=function(t){var n=this;this._chartViewList.push(t);var i=t.__model,r=i.get("labelLayout");(C(r)||R(r).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var e=t.getTextContent(),t=jl(t);e&&!e.disableLabelLayout&&n._addLabel(t.dataIndex,t.dataType,i,e,r)})},yg.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();for(var i=0;i<this._labelList.length;i++){var r=this._labelList[i],o=r.label,a=o.__hostTarget,s=r.defaultAttr,l=void 0;l=(l="function"==typeof r.layoutOption?r.layoutOption(lg(r,a)):r.layoutOption)||{},r.computedLayoutOption=l;var u=Math.PI/180;a&&a.setTextConfig({local:!1,position:null!=l.x||null!=l.y?null:s.attachedPos,rotation:null!=l.rotate?l.rotate*u:s.attachedRot,offset:[l.dx||0,l.dy||0]});var h,c=!1;null!=l.x?(o.x=el(l.x,e),o.setStyle("x",0),c=!0):(o.x=s.x,o.setStyle("x",s.style.x)),null!=l.y?(o.y=el(l.y,n),o.setStyle("y",0),c=!0):(o.y=s.y,o.setStyle("y",s.style.y)),!l.labelLinePoints||(h=a.getTextGuideLine())&&(h.setShape({points:l.labelLinePoints}),c=!1),cg(o).needsUpdateLabelLine=c,o.rotation=null!=l.rotate?l.rotate*u:s.rotation;for(var p=0;p<ug.length;p++){var d=ug[p];o.setStyle(d,(null!=l[d]?l:s.style)[d])}l.draggable?(o.draggable=!0,o.cursor="move",a&&(u=r.seriesModel,null!=r.dataIndex&&(u=r.seriesModel.getData(r.dataType).getItemModel(r.dataIndex)),o.on("drag",function(t,e){return function(){Qf(t,e)}}(a,u.getModel("labelLine"))))):(o.off("drag"),o.cursor=s.cursor)}},yg.prototype.layout=function(t){var e,n=t.getWidth(),i=t.getHeight(),r=function(t){for(var e=[],n=0;n<t.length;n++){var i,r,o,a,s,l,u=t[n];u.defaultAttr.ignore||(r=(i=u.label).getComputedTransform(),o=i.getBoundingRect(),a=!r||r[1]<1e-5&&r[2]<1e-5,l=i.style.margin||0,(s=o.clone()).applyTransform(r),s.x-=l/2,s.y-=l/2,s.width+=l,s.height+=l,l=a?new Xs(o,r):null,e.push({label:i,labelLine:u.labelLine,rect:s,localRect:o,obb:l,priority:u.priority,defaultAttr:u.defaultAttr,layoutOption:u.computedLayoutOption,axisAligned:a,transform:r}))}return e}(this._labelList),o=S(r,function(t){return"shiftX"===t.layoutOption.moveOverlap}),t=S(r,function(t){return"shiftY"===t.layoutOption.moveOverlap});ag(o,"x","width",0,n,e),sg(t,0,i),function(t){var e=[];t.sort(function(t,e){return e.priority-t.priority});var n=new ln(0,0,0,0);function i(t){var e;t.ignore||null==(e=t.ensureState("emphasis")).ignore&&(e.ignore=!1),t.ignore=!0}for(var r=0;r<t.length;r++){var o=t[r],a=o.axisAligned,s=o.localRect,l=o.transform,u=o.label,h=o.labelLine;n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var c=o.obb,p=!1,d=0;d<e.length;d++){var f=e[d];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new Xs(f.localRect,f.transform)),(c=c||new Xs(s,l)).intersect(f.obb)){p=!0;break}}}p?(i(u),h&&i(h)):(u.attr("ignore",o.defaultAttr.ignore),h&&h.attr("ignore",o.defaultAttr.labelGuideIgnore),e.push(o))}}(S(r,function(t){return t.layoutOption.hideOverlap}))},yg.prototype.processLabelsOverall=function(){var a=this;E(this._chartViewList,function(t){var i=t.__model,r=t.ignoreLabelLineUpdate,o=i.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore)return!0;var e=!r,n=t.getTextContent();!e&&n&&(e=cg(n).needsUpdateLabelLine),e&&a._updateLabelLine(t,i),o&&a._animateLabels(t,i)})})},yg.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=jl(t),r=i.dataIndex;n&&null!=r&&(e=(n=e.getData(i.dataType)).getItemModel(r),i={},r=n.getItemVisual(r,"style"),n=n.getVisual("drawType"),i.stroke=r[n],n=e.getModel("labelLine"),rg(t,og(e),i),Qf(t,n))},yg.prototype._animateLabels=function(t,e){var n,i,r,o,a,s,l,u=t.getTextContent(),h=t.getTextGuideLine();!u||u.ignore||u.invisible||t.disableLabelAnimation||Ku(t)||(s=(a=cg(u)).oldLayout,n=(l=jl(t)).dataIndex,i={x:u.x,y:u.y,rotation:u.rotation},l=e.getData(l.dataType),s?(u.attr(s),(r=t.prevStates)&&(0<=L(r,"select")&&u.attr(a.oldLayoutSelect),0<=L(r,"emphasis")&&u.attr(a.oldLayoutEmphasis)),Yu(u,i,e,n)):(u.attr(i),uh(u).valueAnimation||(r=X(u.style.opacity,1),u.style.opacity=0,Xu(u,{style:{opacity:r}},e,n))),a.oldLayout=i,u.states.select&&(dg(o=a.oldLayoutSelect={},i,fg),dg(o,u.states.select,fg)),u.states.emphasis&&(dg(o=a.oldLayoutEmphasis={},i,fg),dg(o,u.states.emphasis,fg)),hh(u,n,l,e)),!h||h.ignore||h.invisible||(s=(a=pg(h)).oldLayout,l={points:h.shape.points},s?(h.attr({shape:s}),Yu(h,{shape:l},e)):(h.setShape(l),h.style.strokePercent=0,Xu(h,{style:{strokePercent:1}},e)),a.oldLayout=l)},yg);function yg(){this._labelList=[],this._chartViewList=[]}function mg(t,e,a,n,s){var l=t+e;a.isSilent(l)||n.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e,n,i=t.seriesIndex,r=s.selected,o=0;o<r.length;o++){r[o].seriesIndex===i&&(n=Dl(e=t.getData(),s.fromActionPayload),a.trigger(l,{type:l,seriesId:t.id,name:N(n)?e.getName(n[0]):e.getName(n),selected:I({},t.option.selectedMap)}))}})}function vg(t,e,n){for(var i,r,o,a,s,l,u,h,c,p="radial"===e.type?(i=t,r=e,a=(o=n).width,s=o.height,l=Math.min(a,s),u=null==r.x?.5:r.x,h=null==r.y?.5:r.y,c=null==r.r?.5:r.r,r.global||(u=u*a+o.x,h=h*s+o.y,c*=l),i.createRadialGradient(u,h,0,u,h,c)):(l=t,i=n,h=null==(u=e).x?0:u.x,c=null==u.x2?1:u.x2,t=null==u.y?0:u.y,n=null==u.y2?0:u.y2,u.global||(h=h*i.width+i.x,c=c*i.width+i.x,t=t*i.height+i.y,n=n*i.height+i.y),h=isNaN(h)?0:h,c=isNaN(c)?1:c,t=isNaN(t)?0:t,n=isNaN(n)?0:n,l.createLinearGradient(h,t,c,n)),d=e.colorStops,f=0;f<d.length;f++)p.addColorStop(d[f].offset,d[f].color);return p}function _g(t,e){return t&&"solid"!==t&&0<e?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:F(t)?[t]:N(t)?t:null):null}var xg=new Dr(!0);function bg(t){var e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))}function wg(t){t=t.fill;return null!=t&&"none"!==t}function Sg(t,e){var n;null!=e.fillOpacity&&1!==e.fillOpacity?(n=t.globalAlpha,t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n):t.fill()}function Mg(t,e){var n;null!=e.strokeOpacity&&1!==e.strokeOpacity?(n=t.globalAlpha,t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n):t.stroke()}function Tg(t,e,n){n=Ia(e.image,e.__image,n);if(ka(n)){t=t.createPattern(n,e.repeat||"repeat");return"function"==typeof DOMMatrix&&((n=new DOMMatrix).rotateSelf(0,0,(e.rotation||0)/Math.PI*180),n.scaleSelf(e.scaleX||1,e.scaleY||1),n.translateSelf(e.x||0,e.y||0),t.setTransform(n)),t}}var Cg=["shadowBlur","shadowOffsetX","shadowOffsetY"],Dg=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Ig(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;!i&&e.opacity===n.opacity||(o||(Eg(t,r),o=!0),t.globalAlpha=(null==e.opacity?bi:e).opacity),!i&&e.blend===n.blend||(o||(Eg(t,r),o=!0),t.globalCompositeOperation=e.blend||bi.blend);for(var a=0;a<Cg.length;a++){var s=Cg[a];!i&&e[s]===n[s]||(o||(Eg(t,r),o=!0),t[s]=t.dpr*(e[s]||0))}return!i&&e.shadowColor===n.shadowColor||(o||(Eg(t,r),o=!0),t.shadowColor=e.shadowColor||bi.shadowColor),o}function Ag(t,e,n,i,r){var o=Ng(e,r.inHover),a=i?null:n&&Ng(n,r.inHover)||{};if(o!==a){var s=Ig(t,o,a,i,r);!i&&o.fill===a.fill||(s||(Eg(t,r),s=!0),t.fillStyle=o.fill),!i&&o.stroke===a.stroke||(s||(Eg(t,r),s=!0),t.strokeStyle=o.stroke),!i&&o.opacity===a.opacity||(s||(Eg(t,r),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()&&(e=o.lineWidth/(o.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1),t.lineWidth!==e&&(s||(Eg(t,r),s=!0),t.lineWidth=e));for(var l=0;l<Dg.length;l++){var u=Dg[l],h=u[0];!i&&o[h]===a[h]||(s||(Eg(t,r),s=!0),t[h]=o[h]||u[1])}return s}}function kg(t,e){var n=e.transform,e=t.dpr||1;n?t.setTransform(e*n[0],e*n[1],e*n[2],e*n[3],e*n[4],e*n[5]):t.setTransform(e,0,0,e,0,0)}var Lg=1,Pg=2,Og=3,Rg=4;function Eg(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Ng(t,e){return e&&t.__hoverStyle||t.style}function zg(t,e){Bg(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Bg(t,e,n,i){var r=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return e.__dirty&=~Pn.REDARAW_BIT,void(e.__isRendered=!1);var o,a,s,l,u,h,c,p,d,f,g,y,m,v=e.__clipPaths,_=n.prevElClipPaths,x=!1,b=!1;_&&!function(t,e){if(t!==e&&(t||e)){if(!t||!e||t.length!==e.length)return 1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return 1}}(v,_)||(_&&_.length&&(Eg(t,n),t.restore(),b=x=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),v&&v.length&&(Eg(t,n),t.save(),function(t,e,n){for(var i=!1,r=0;r<t.length;r++){var o=t[r],i=i||o.isZeroArea();kg(e,o),e.beginPath(),o.buildPath(e,o.shape),e.clip()}n.allClipped=i}(v,t,n),x=!0),n.prevElClipPaths=v),n.allClipped?e.__isRendered=!1:(e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush(),(u=n.prevEl)||(b=x=!0),o=e instanceof Xr&&e.autoBatch&&(o=e.style,_=wg(o),v=bg(o),!(o.lineDash||!(+_^+v)||_&&"string"!=typeof o.fill||v&&"string"!=typeof o.stroke||o.strokePercent<1||o.strokeOpacity<1||o.fillOpacity<1)),x||(a=r,c=u.transform,a&&c?a[0]!==c[0]||a[1]!==c[1]||a[2]!==c[2]||a[3]!==c[3]||a[4]!==c[4]||a[5]!==c[5]:a||c)?(Eg(t,n),kg(t,e)):o||Eg(t,n),a=Ng(e,n.inHover),e instanceof Xr?(n.lastDrawType!==Lg&&(b=!0,n.lastDrawType=Lg),Ag(t,e,u,b,n),o&&(n.batchFill||n.batchStroke)||t.beginPath(),function(t,e,n,i){var r=bg(n),o=wg(n),a=n.strokePercent,s=a<1,l=!e.path;e.silent&&!s||!l||e.createPathProxy();var u,h,c,p,d,f,g,y=e.path||xg;i||(u=n.fill,h=n.stroke,c=o&&!!u.colorStops,v=r&&!!h.colorStops,p=o&&!!u.image,x=r&&!!h.image,g=b=f=_=d=void 0,(c||v)&&(g=e.getBoundingRect()),c&&(d=e.__dirty?vg(t,u,g):e.__canvasFillGradient,e.__canvasFillGradient=d),v&&(_=e.__dirty?vg(t,h,g):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),p&&(f=e.__dirty||!e.__canvasFillPattern?Tg(t,u,e):e.__canvasFillPattern,e.__canvasFillPattern=f),x&&(b=e.__dirty||!e.__canvasStrokePattern?Tg(t,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=f),c?t.fillStyle=d:p&&(f?t.fillStyle=f:o=!1),v?t.strokeStyle=_:x&&(b?t.strokeStyle=b:r=!1));var m,v=n.lineDash&&0<n.lineWidth&&_g(n.lineDash,n.lineWidth),_=n.lineDashOffset,x=!!t.setLineDash,b=e.getGlobalScale();y.setScale(b[0],b[1],e.segmentIgnoreThreshold),!v||(m=n.strokeNoScale&&e.getLineScale?e.getLineScale():1)&&1!==m&&(v=O(v,function(t){return t/m}),_/=m),b=!0,(l||e.__dirty&Xr.SHAPE_CHANGED_BIT||v&&!x&&r)&&(y.setDPR(t.dpr),s?y.setContext(null):(y.setContext(t),b=!1),y.reset(),v&&!x&&(y.setLineDash(v),y.setLineDashOffset(_)),e.buildPath(y,e.shape,i),y.toStatic(),e.pathUpdated()),b&&y.rebuildPath(t,s?a:1),v&&x&&(t.setLineDash(v),t.lineDashOffset=_),i||(n.strokeFirst?(r&&Mg(t,n),o&&Sg(t,n)):(o&&Sg(t,n),r&&Mg(t,n))),v&&x&&t.setLineDash([])}(t,e,a,o),o&&(n.batchFill=a.fill||"",n.batchStroke=a.stroke||"")):e instanceof na?(n.lastDrawType!==Og&&(b=!0,n.lastDrawType=Og),Ag(t,e,u,b,n),h=t,c=e,null!=(m=(p=a).text)&&(m+=""),m&&(h.font=p.font||dn,h.textAlign=p.textAlign,h.textBaseline=p.textBaseline,d=void 0,h.setLineDash&&(f=p.lineDash&&0<p.lineWidth&&_g(p.lineDash,p.lineWidth),g=p.lineDashOffset,f&&((y=p.strokeNoScale&&c.getLineScale?c.getLineScale():1)&&1!==y&&(f=O(f,function(t){return t/y}),g/=y),h.setLineDash(f),h.lineDashOffset=g,d=!0)),p.strokeFirst?(bg(p)&&h.strokeText(m,p.x,p.y),wg(p)&&h.fillText(m,p.x,p.y)):(wg(p)&&h.fillText(m,p.x,p.y),bg(p)&&h.strokeText(m,p.x,p.y)),d&&h.setLineDash([]))):e instanceof _o?(n.lastDrawType!==Pg&&(b=!0,n.lastDrawType=Pg),f=u,g=b,Ig(t,Ng(e,(m=n).inHover),f&&Ng(f,m.inHover),g,m),p=t,d=a,(u=(h=e).__image=Ia(d.image,h.__image,h,h.onload))&&ka(u)&&(f=d.x||0,g=d.y||0,m=h.getWidth(),a=h.getHeight(),h=u.width/u.height,null==m&&null!=a?m=a*h:null==a&&null!=m?a=m/h:null==m&&null==a&&(m=u.width,a=u.height),d.sWidth&&d.sHeight?(s=d.sx||0,l=d.sy||0,p.drawImage(u,s,l,d.sWidth,d.sHeight,f,g,m,a)):d.sx&&d.sy?(h=m-(s=d.sx),d=a-(l=d.sy),p.drawImage(u,s,l,h,d,f,g,m,a)):p.drawImage(u,f,g,m,a))):e instanceof Ta&&(n.lastDrawType!==Rg&&(b=!0,n.lastDrawType=Rg),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o<a;o++){(h=i[o]).beforeBrush&&h.beforeBrush(),h.innerBeforeBrush(),Bg(t,h,s,o===a-1),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),s.prevEl=h}for(var l=0,u=r.length;l<u;l++){var h;(h=r[l]).beforeBrush&&h.beforeBrush(),h.innerBeforeBrush(),Bg(t,h,s,l===u-1),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),s.prevEl=h}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,n)),o&&i&&Eg(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),(n.prevEl=e).__dirty=0,e.__isRendered=!0)}function Fg(){return!1}function Vg(t,e,n){var i=k(),r=e.getWidth(),o=e.getHeight(),e=i.style;return e&&(e.position="absolute",e.left="0",e.top="0",e.width=r+"px",e.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var Hg,Wg=(l(Gg,Hg=bt),Gg.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},Gg.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},Gg.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},Gg.prototype.setUnpainted=function(){this.__firstTimePaint=!0},Gg.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Vg("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},Gg.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],l=this.maxRepaintRectCount,u=!1,h=new ln(0,0,0,0);function r(t){if(t.isFinite()&&!t.isZero())if(0===s.length){(e=new ln(0,0,0,0)).copy(t),s.push(e)}else{for(var e,n=!1,i=0,r=0;r<s.length;++r){var o=s[r];if(o.intersect(t)){var a=new ln(0,0,0,0);a.copy(o),a.union(t),s[r]=a,n=!0;break}u&&(h.copy(t),h.union(o),a=t.width*t.height,o=o.width*o.height,h.width*h.height-a-o<1/0&&(i=r))}u&&(s[i].union(t),n=!0),n||((e=new ln(0,0,0,0)).copy(t),s.push(e)),u=u||s.length>=l}}for(var o,a=this.__startIndex;a<this.__endIndex;++a){(p=t[a])&&(f=p.shouldBePainted(n,i,!0,!0),(d=p.__isRendered&&(p.__dirty&Pn.REDARAW_BIT||!f)?p.getPrevPaintRect():null)&&r(d),(o=f&&(p.__dirty&Pn.REDARAW_BIT||!p.__isRendered)?p.getPaintRect():null)&&r(o))}for(var c,a=this.__prevStartIndex;a<this.__prevEndIndex;++a){var p,d,f=(p=e[a]).shouldBePainted(n,i,!0,!0);!p||f&&p.__zr||!p.__isRendered||(d=p.getPrevPaintRect())&&r(d)}do{c=!1;for(a=0;a<s.length;)if(s[a].isZero())s.splice(a,1);else{for(var g=a+1;g<s.length;)s[a].intersect(s[g])?(c=!0,s[a].union(s[g]),s.splice(g,1)):g++;a++}}while(c);return this._paintRects=s},Gg.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},Gg.prototype.resize=function(t,e){var n=this.dpr,i=this.dom,r=i.style,o=this.domBack;r&&(r.width=t+"px",r.height=e+"px"),i.width=t*n,i.height=e*n,o&&(o.width=t*n,o.height=e*n,1!==n&&this.ctxBack.scale(n,n))},Gg.prototype.clear=function(t,o,e){var n=this.dom,a=this.ctx,i=n.width,r=n.height;o=o||this.clearColor;var s=this.motionBlur&&!t,l=this.lastFrameAlpha,u=this.dpr,h=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,i/u,r/u));var c=this.domBack;function p(t,e,n,i){var r;a.clearRect(t,e,n,i),o&&"transparent"!==o&&(r=void 0,null!=o.colorStops?(r=o.__canvasGradient||vg(a,o,{x:0,y:0,width:n,height:i}),o.__canvasGradient=r):null!=o.image&&(r=Tg(a,o,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}})),a.save(),a.fillStyle=r||o,a.fillRect(t,e,n,i),a.restore()),s&&(a.save(),a.globalAlpha=l,a.drawImage(c,t,e,n,i),a.restore())}!e||s?p(0,0,i,r):e.length&&E(e,function(t){p(t.x*u,t.y*u,t.width*u,t.height*u)})},Gg);function Gg(t,e,n){var i,r=Hg.call(this)||this;r.motionBlur=!1,r.lastFrameAlpha=.7,r.dpr=1,r.virtual=!1,r.config={},r.incremental=!1,r.zlevel=0,r.maxRepaintRectCount=5,r.__dirty=!0,r.__firstTimePaint=!0,r.__used=!1,r.__drawIndex=0,r.__startIndex=0,r.__endIndex=0,r.__prevStartIndex=null,r.__prevEndIndex=null,n=n||Mn,"string"==typeof t?i=Vg(t,e,n):V(t)&&(t=(i=t).id),r.id=t;t=(r.dom=i).style;return t&&(i.onselectstart=Fg,t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none",t.padding="0",t.margin="0",t.borderWidth="0"),r.domBack=null,r.ctxBack=null,r.painter=e,r.config=null,r.dpr=n,r}var Ug=314159;function Yg(t){return parseInt(t,10)}var Xg,ql=(qg.prototype.getType=function(){return"canvas"},qg.prototype.isSingleCanvas=function(){return this._singleCanvas},qg.prototype.getViewportRoot=function(){return this._domRoot},qg.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},qg.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var r=0;r<i.length;r++){var o=i[r],a=this._layers[o];!a.__builtin__&&a.refresh&&(o=0===r?this._backgroundColor:null,a.refresh(o))}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},qg.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},qg.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){for(var i,r={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<e;o++){var a=t[o];a.__inHover&&(n=n||(this._hoverlayer=this.getLayer(1e5)),i||(i=n.ctx).save(),Bg(i,a,r,o===e-1))}i&&i.restore()}},qg.prototype.getHoverLayer=function(){return this.getLayer(1e5)},qg.prototype.paintOne=function(t,e){zg(t,e)},qg.prototype._paintList=function(t,e,n,i){var r,o,a;this._redrawId===i&&(n=n||!1,this._updateLayerStatus(t),r=(o=this._doPaintList(t,e,n)).finished,o=o.needsRefreshHover,this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(t),r?this.eachLayer(function(t){t.afterBrush&&t.afterBrush()}):(a=this,$n(function(){a._paintList(t,e,n,i)})))},qg.prototype._compositeManually=function(){var e=this.getLayer(Ug).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},qg.prototype._doPaintList=function(d,f,g){for(var y=this,m=[],v=this._opts.useDirtyRect,t=0;t<this._zlevelList.length;t++){var e=this._zlevelList[t],e=this._layers[e];e.__builtin__&&e!==this._hoverlayer&&(e.__dirty||g)&&m.push(e)}for(var _=!0,x=!1,b=this,n=0;n<m.length;n++)!function(t){var i=m[t],r=i.ctx,e=v&&i.createRepaintRects(d,f,b._width,b._height);r.save();var o,a=g?i.__startIndex:i.__drawIndex,s=!g&&i.incremental&&Date.now,l=s&&Date.now(),n=i.zlevel===b._zlevelList[0]?b._backgroundColor:null;i.__startIndex===i.__endIndex?i.clear(!1,n,e):a===i.__startIndex&&((t=d[a]).incremental&&t.notClear&&!g||i.clear(!1,n,e)),-1===a&&(console.error("For some unknown reason. drawIndex is -1"),a=i.__startIndex);function u(t){var e={inHover:!1,allClipped:!1,prevEl:null,viewWidth:y._width,viewHeight:y._height};for(o=a;o<i.__endIndex;o++){var n=d[o];if(n.__inHover&&(x=!0),y._doPaintEl(n,i,v,t,e,o===i.__endIndex-1),s)if(15<Date.now()-l)break}e.prevElClipPaths&&r.restore()}if(e)if(0===e.length)o=i.__endIndex;else for(var h=b.dpr,c=0;c<e.length;++c){var p=e[c];r.save(),r.beginPath(),r.rect(p.x*h,p.y*h,p.width*h,p.height*h),r.clip(),u(p),r.restore()}else r.save(),u(),r.restore();i.__drawIndex=o,i.__drawIndex<i.__endIndex&&(_=!1)}(n);return w.wxa&&E(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),{finished:_,needsRefreshHover:x}},qg.prototype._doPaintEl=function(t,e,n,i,r,o){e=e.ctx;n?(n=t.getPaintRect(),(!i||n&&n.intersect(i))&&(Bg(e,t,r,o),t.setPrevPaintRect(n))):Bg(e,t,r,o)},qg.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=Ug);var n=this._layers[t];return n||((n=new Wg("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?_(n,this._layerConfig[t],!0):this._layerConfig[t-.01]&&_(n,this._layerConfig[t-.01],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},qg.prototype.insertLayer=function(t,e){var n,i=this._layers,r=this._zlevelList,o=r.length,a=this._domRoot,s=null,l=-1;if(i[t])v("ZLevel "+t+" has been used already");else if((n=e)&&(n.__builtin__||"function"==typeof n.resize&&"function"==typeof n.refresh)){if(0<o&&t>r[0]){for(l=0;l<o-1&&!(r[l]<t&&r[l+1]>t);l++);s=i[r[l]]}r.splice(l+1,0,t),(i[t]=e).virtual||(s?(s=s.dom).nextSibling?a.insertBefore(e.dom,s.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.__painter=this}else v("Layer of zlevel "+t+" is not valid")},qg.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i];t.call(e,this._layers[r],r)}},qg.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__&&t.call(e,o,r)}},qg.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var r=n[i],o=this._layers[r];o.__builtin__||t.call(e,o,r)}},qg.prototype.getLayers=function(){return this._layers},qg.prototype._updateLayerStatus=function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++){if((s=t[n]).zlevel!==t[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}for(var i,r=null,o=0,a=0;a<t.length;a++){var s,l=(s=t[a]).zlevel,u=void 0;i!==l&&(i=l,o=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,o=1):u=this.getLayer(l+(0<o?.01:0),this._needsManuallyCompositing),u.__builtin__||v("ZLevel "+l+" has been used by unkown layer "+u.id),u!==r&&(u.__used=!0,u.__startIndex!==a&&(u.__dirty=!0),u.__startIndex=a,u.incremental?u.__drawIndex=-1:u.__drawIndex=a,e(a),r=u),s.__dirty&Pn.REDARAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=a))}e(a),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},qg.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},qg.prototype._clearLayer=function(t){t.clear()},qg.prototype.setBackgroundColor=function(t){this._backgroundColor=t,E(this._layers,function(t){t.setUnpainted()})},qg.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?_(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];r!==t&&r!==t+.01||_(this._layers[r],n[t],!0)}}},qg.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(L(n,t),1))},qg.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){for(var r in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(Ug).resize(t,e)}return this},qg.prototype.clearLayer=function(t){t=this._layers[t];t&&t.clear()},qg.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},qg.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[Ug].dom;var e=new Wg("image",this,t.pixelRatio||this.dpr),n=e.ctx;if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,r=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,r):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){Bg(n,s[l],a,l===u-1)}return e.dom},qg.prototype.getWidth=function(){return this._width},qg.prototype.getHeight=function(){return this._height},qg.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);t=this.root,e=document.defaultView.getComputedStyle(t);return(t[i]||Yg(e[n])||Yg(t.style[n]))-(Yg(e[r])||0)-(Yg(e[o])||0)|0},qg.prototype.pathToImage=function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=t.getBoundingRect(),o=t.style,a=o.shadowBlur*e,s=o.shadowOffsetX*e,l=o.shadowOffsetY*e,u=t.hasStroke()?o.lineWidth:0,h=Math.max(u/2,a-s),o=Math.max(u/2,s+a),s=Math.max(u/2,a-l),a=Math.max(u/2,l+a),o=r.width+h+o,a=r.height+s+a;n.width=o*e,n.height=a*e,i.scale(e,e),i.clearRect(0,0,o,a),i.dpr=e;e={x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,originX:t.originX,originY:t.originY};t.x=h-r.x,t.y=s-r.y,t.rotation=0,t.scaleX=1,t.scaleY=1,t.updateTransform(),t&&Bg(i,t,{inHover:!1,viewWidth:this._width,viewHeight:this._height},!0);n=new _o({style:{x:0,y:0,image:n}});return I(t,e),n},qg);function qg(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=I({},n||{}),this.dpr=n.devicePixelRatio||Mn,this._singleCanvas=r;var o=(this.root=t).style;o&&(o.webkitTapHighlightColor="transparent",o.webkitUserSelect="none",o.userSelect="none",o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList;this._prevDisplayList=[];var s,o=this._layers;r?(e=(s=t).width,r=s.height,null!=n.width&&(e=n.width),null!=n.height&&(r=n.height),this.dpr=n.devicePixelRatio||1,s.width=e*this.dpr,s.height=r*this.dpr,this._width=e,this._height=r,(s=new Wg(s,this,this.dpr)).__builtin__=!0,s.initContext(),(o[Ug]=s).zlevel=Ug,a.push(Ug),this._domRoot=t):(this._width=this._getSize(0),this._height=this._getSize(1),a=this._domRoot=(o=this._width,s=this._height,(a=document.createElement("div")).style.cssText=["position:relative","width:"+o+"px","height:"+s+"px","padding:0","margin:0","border-width:0"].join(";")+";",a),t.appendChild(a))}function Zg(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}Xg=ql,js["canvas"]=Xg;var jg=Math.round(9*Math.random()),dh=(Kg.prototype.get=function(t){return this._guard(t)[this._id]},Kg.prototype.set=function(t,e){t=this._guard(t);return"function"==typeof Object.defineProperty?Object.defineProperty(t,this._id,{value:e,enumerable:!1,configurable:!0}):t[this._id]=e,this},Kg.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},Kg.prototype.has=function(t){return!!this._guard(t)[this._id]},Kg.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},Kg);function Kg(){this._id="__ec_inner_"+jg++}var Bh=Xr.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+r,i+e),t.lineTo(n-r,i+e),t.closePath()}}),rd=Xr.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+r,i),t.lineTo(n,i+e),t.lineTo(n-r,i),t.closePath()}}),g=Xr.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),a=r/2,s=a*a/(o-a),l=i-o+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),e=Math.cos(u),r=.6*a,o=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*r,l+s+e*r,n,i-o,n,i),t.bezierCurveTo(n,i-o,n-h+c*r,l+s+e*r,n-h,l+s),t.closePath()}}),ql=Xr.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,e=e.y,i=i/3*2;t.moveTo(r,e),t.lineTo(r+i,e+n),t.lineTo(r,e+n/4*3),t.lineTo(r-i,e+n),t.lineTo(r,e),t.closePath()}}),$g={line:function(t,e,n,i,r){r.x=t,r.y=e+i/2-1,r.width=n,r.height=2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){i=Math.min(n,i);r.x=t,r.y=e,r.width=i,r.height=i},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},Qg={};E({line:ko,rect:ko,roundRect:ko,square:ko,circle:So,diamond:rd,pin:g,arrow:ql,triangle:Bh},function(t,e){Qg[e]=new t});var Jg=Xr.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=wn(t,e,n),t=this.shape;return t&&"pin"===t.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i,r=e.symbolType;"none"!==r&&(i=(i=Qg[r])||Qg[r="rect"],$g[r](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,n))}});function ty(t,e){var n;"image"!==this.type&&(n=this.style,this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):n.fill=t,this.markRedraw())}function ey(t,e,n,i,r,o,a){var s,l,u,h,c=0===t.indexOf("empty");return c&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(r=0===t.indexOf("image://")?(s=t.slice(8),l=new ln(e,n,i,r),u=a?"center":"cover",h=new _o({style:{image:s,x:l.x,y:l.y,width:l.width,height:l.height},onload:function(t){"center"===u&&(t={width:t.width,height:t.height},h.setStyle(Gu(l,t)))}})):0===t.indexOf("path://")?Wu(t.slice(7),{},new ln(e,n,i,r),a?"center":"cover"):new Jg({shape:{symbolType:t,x:e,y:n,width:i,height:r}})).__isEmptyBrush=c,r.setColor=ty,o&&r.setColor(o),r}var ny=new dh,iy=new _e(100),ry=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","dashLineOffset","maxTileWidth","maxTileHeight"];function oy(t,e){if("none"===t)return null;var M=e.getDevicePixelRatio(),T=e.getZr(),C="svg"===T.painter.type;t.dirty&&ny.delete(t);e=ny.get(t);if(e)return e;var D=A(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,dashLineOffset:0,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===D.backgroundColor&&(D.backgroundColor=null);e={repeat:"repeat"};return function(t){for(var e,n=[M],i=!0,r=0;r<ry.length;++r){var o=D[ry[r]],a=typeof o;if(null!=o&&!N(o)&&"string"!=a&&"number"!=a&&"boolean"!=a){i=!1;break}n.push(o)}{var s;i&&(e=n.join(",")+(C?"-svg":""),(s=iy.get(e))&&(C?t.svgElement=s:t.image=s))}var y,m=function t(e){if(!e||0===e.length)return[[0,0]];if("number"==typeof e){var n=Math.ceil(e);return[[n,n]]}var i=!0;for(var r=0;r<e.length;++r)if("number"!=typeof e[r]){i=!1;break}if(i)return t([e]);var o=[];for(var r=0;r<e.length;++r){"number"==typeof e[r]?(n=Math.ceil(e[r]),o.push([n,n])):(n=O(e[r],function(t){return Math.ceil(t)})).length%2==1?o.push(n.concat(n)):o.push(n)}return o}(D.dashArrayX),v=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if("number"==typeof t){var e=Math.ceil(t);return[e,e]}e=O(t,function(t){return Math.ceil(t)});return t.length%2?e.concat(e):e}(D.dashArrayY),_=function t(e){if(!e||0===e.length)return[["rect"]];if("string"==typeof e)return[[e]];var n=!0;for(var i=0;i<e.length;++i)if("string"!=typeof e[i]){n=!1;break}if(n)return t([e]);var r=[];for(var i=0;i<e.length;++i)"string"==typeof e[i]?r.push([e[i]]):r.push(e[i]);return r}(D.symbol),l=function(t){return O(t,ay)}(m),x=ay(v),b=!C&&k(),w=C&&T.painter.createSVGElement("g"),S=function(){for(var t=1,e=0,n=l.length;e<n;++e)t=cl(t,l[e]);for(var i=1,e=0,n=_.length;e<n;++e)i=cl(i,_[e].length);t*=i;var r=x*l.length*_.length;{}return{width:Math.max(1,Math.min(t,D.maxTileWidth)),height:Math.max(1,Math.min(r,D.maxTileHeight))}}();b&&(b.width=S.width*M,b.height=S.height*M,y=b.getContext("2d"));(function(){y&&(y.clearRect(0,0,b.width,b.height),D.backgroundColor&&(y.fillStyle=D.backgroundColor,y.fillRect(0,0,b.width,b.height)));for(var t=0,e=0;e<v.length;++e)t+=v[e];if(t<=0)return;var n=-x,i=0,r=0,o=0;for(;n<S.height;){if(i%2==0){for(var a=r/2%_.length,s=0,l=0,u=0;s<2*S.width;){for(var h,c,p,d,f,g=0,e=0;e<m[o].length;++e)g+=m[o][e];if(g<=0)break;l%2==0&&(f=.5*(1-D.symbolSize),h=s+m[o][l]*f,c=n+v[i]*f,p=m[o][l]*D.symbolSize,d=v[i]*D.symbolSize,f=u/2%_[a].length,function(t,e,n,i,r){var o=C?1:M,o=ey(r,t*o,e*o,n*o,i*o,D.color,D.symbolKeepAspect);C?w.appendChild(T.painter.paintOne(o)):zg(y,o)}(h,c,p,d,_[a][f])),s+=m[o][l],++u,++l===m[o].length&&(l=0)}++o===m.length&&(o=0)}n+=v[i],++r,++i===v.length&&(i=0)}})(),i&&iy.put(e,b||w);t.image=b,t.svgElement=w,t.svgWidth=S.width,t.svgHeight=S.height}(e),e.rotation=D.rotation,e.scaleX=e.scaleY=C?1:1/M,ny.set(t,e),t.dirty=!1,e}function ay(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}var sy=K,ly=E,uy=C,hy=V,ql={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},cy="__flagInMainProcess",py="__optionUpdated",dy="__needsUpdateStatus",fy=/^[a-zA-Z0-9_]+$/,gy="__connectUpdateStatus";function yy(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!this.isDisposed())return vy(this,n,t);$y(this.id)}}function my(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return vy(this,n,t)}}function vy(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),bt.prototype[e].apply(t,n)}var _y,xy=(l(by,_y=bt),by);function by(){return null!==_y&&_y.apply(this,arguments)||this}var wy,Sy,My,Ty,Cy,Dy,Iy,Ay,ky,Ly,Py,Oy,Ry,Ey,Ny,zy,By,Fy,Vy,Hy,Wy,Bh=xy.prototype;Bh.on=my("on"),Bh.off=my("off");var Gy,Uy=(l(Yy,Gy=bt),Yy.prototype._onframe=function(){if(!this._disposed){Wy(this);var t=this._scheduler;if(this[py]){var e=this[py].silent;this[cy]=!0,wy(this),Ty.update.call(this),this._zr.flush(),this[cy]=!1,this[py]=!1,Ay.call(this,e),ky.call(this,e)}else if(t.unfinished){var n=1,i=this._model,r=this._api;t.unfinished=!1;do{var o=+new Date}while(t.performSeriesTasks(i),t.performDataProcessorTasks(i),Dy(this,i),t.performVisualTasks(i),Ny(this,this._model,r,"remain"),0<(n-=+new Date-o)&&t.unfinished);t.unfinished||this._zr.flush()}}},Yy.prototype.getDom=function(){return this._dom},Yy.prototype.getId=function(){return this.id},Yy.prototype.getZr=function(){return this._zr},Yy.prototype.setOption=function(t,e,n){var i,r,o,a,s;this._disposed?$y(this.id):(hy(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[cy]=!0,this._model&&!e||(a=new yp(this._api),s=this._theme,(e=this._model=new op).scheduler=this._scheduler,e.init(null,null,null,s,this._locale,a)),this._model.setOption(t,{replaceMerge:r},em),Vy(this,o),n?(this[py]={silent:i},this[cy]=!1,this.getZr().wakeUp()):(wy(this),Ty.update.call(this),this._zr.flush(),this[py]=!1,this[cy]=!1,Ay.call(this,i),ky.call(this,i)))},Yy.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Yy.prototype.getModel=function(){return this._model},Yy.prototype.getOption=function(){return this._model&&this._model.getOption()},Yy.prototype.getWidth=function(){return this._zr.getWidth()},Yy.prototype.getHeight=function(){return this._zr.getHeight()},Yy.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Yy.prototype.getRenderedCanvas=function(t){if(w.canvasSupported)return(t=I({},t||{})).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},Yy.prototype.getSvgDataURL=function(){if(w.svgSupported){var t=this._zr;return E(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},Yy.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;ly(e,function(t){n.eachComponent({mainType:t},function(t){t=r._componentsMap[t.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)})});t="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return ly(i,function(t){t.group.ignore=!1}),t}$y(this.id)},Yy.prototype.getConnectedDataURL=function(i){if(this._disposed)$y(this.id);else if(w.canvasSupported){var r="svg"===i.type,o=this.group,a=Math.min,s=Math.max;if(lm[o]){var l=1/0,u=1/0,h=-1/0,c=-1/0,p=[],e=i&&i.pixelRatio||1;E(sm,function(t,e){var n;t.group===o&&(n=r?t.getZr().painter.getSvgDom().innerHTML:t.getRenderedCanvas(D(i)),t=t.getDom().getBoundingClientRect(),l=a(t.left,l),u=a(t.top,u),h=s(t.right,h),c=s(t.bottom,c),p.push({dom:n,left:t.left,top:t.top}))});var t=(h*=e)-(l*=e),n=(c*=e)-(u*=e),d=k(),f=Qs(d,{renderer:r?"svg":"canvas"});if(f.resize({width:t,height:n}),r){var g="";return ly(p,function(t){var e=t.left-l,n=t.top-u;g+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()}return i.connectedBackgroundColor&&f.add(new ko({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),ly(p,function(t){t=new _o({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png"))}return this.getDataURL(i)}},Yy.prototype.convertToPixel=function(t,e){return Cy(this,"convertToPixel",t,e)},Yy.prototype.convertFromPixel=function(t,e){return Cy(this,"convertFromPixel",t,e)},Yy.prototype.containPixel=function(t,r){var o;if(!this._disposed)return E(kl(this._model,t),function(t,i){0<=i.indexOf("Models")&&E(t,function(t){var e,n=t.coordinateSystem;n&&n.containPoint?o=o||!!n.containPoint(r):"seriesModels"===i&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(o=o||e.containPoint(r,t))},this)},this),!!o;$y(this.id)},Yy.prototype.getVisual=function(t,e){var n=kl(this._model,t,{defaultMainType:"series"}),t=n.seriesModel;t=t.getData(),n=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?t.indexOfRawIndex(n.dataIndex):null;return null!=n?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);default:0}}(t,n,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);default:0}}(t,e)},Yy.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Yy.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},Yy.prototype._initEvents=function(){var t,e,n,s=this;ly(Ky,function(a){function t(t){var n,e,i=s.getModel(),r=t.target,o="globalout"===a;o?n={}:r&&Zg(r,function(t){var e=jl(t);if(e&&null!=e.dataIndex){t=e.dataModel||i.getSeriesByIndex(e.seriesIndex);return n=t&&t.getDataParams(e.dataIndex,e.dataType)||{},1}return e.eventData&&(n=I({},e.eventData),1)},!0),n&&(e=n.componentType,o=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",o=n.seriesIndex),o=(e=e&&null!=o&&i.getComponent(e,o))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:e,view:o},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),ly(Jy,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),ly(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,n=(e=this)._model,t.on("selectchanged",function(t){t.isFromClick?(mg("map","selectchanged",e,n,t),mg("pie","selectchanged",e,n,t)):"select"===t.fromAction?(mg("map","selected",e,n,t),mg("pie","selected",e,n,t)):"unselect"===t.fromAction&&(mg("map","unselected",e,n,t),mg("pie","unselected",e,n,t))})},Yy.prototype.isDisposed=function(){return this._disposed},Yy.prototype.clear=function(){this._disposed?$y(this.id):this.setOption({series:[]},!0)},Yy.prototype.dispose=function(){var e,n;this._disposed?$y(this.id):(this._disposed=!0,Ol(this.getDom(),cm,""),e=this._api,n=this._model,ly(this._componentsViews,function(t){t.dispose(n,e)}),ly(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete sm[this.id])},Yy.prototype.resize=function(t){var e;this._disposed?$y(this.id):(this._zr.resize(t),e=this._model,this._loadingFX&&this._loadingFX.resize(),e&&(e=e.resetOption("media"),t=t&&t.silent,this[cy]=!0,e&&wy(this),Ty.update.call(this,{type:"resize",animation:{duration:0}}),this[cy]=!1,Ay.call(this,t),ky.call(this,t)))},Yy.prototype.showLoading=function(t,e){this._disposed?$y(this.id):(hy(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),am[t]&&(t=am[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},Yy.prototype.hideLoading=function(){this._disposed?$y(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},Yy.prototype.makeActionFromEvent=function(t){var e=I({},t);return e.type=Jy[t.type],e},Yy.prototype.dispatchAction=function(t,e){var n;this._disposed?$y(this.id):(hy(e)||(e={silent:!!e}),Qy[t.type]&&this._model&&(this[cy]?this._pendingActions.push(t):(n=e.silent,Iy.call(this,t,n),(e=e.flush)?this._zr.flush():!1!==e&&w.browser.weChat&&this._throttledZrFlush(),Ay.call(this,n),ky.call(this,n))))},Yy.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},Yy.prototype.appendData=function(t){var e;this._disposed?$y(this.id):(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},Yy.internalField=(wy=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Sy(t,!0),Sy(t,!1),e.plan()},Sy=function(t,r){for(var o=t._model,a=t._scheduler,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;e<s.length;e++)s[e].__alive=!1;function n(t){var e=t.__requireNewView;t.__requireNewView=!1;var n="_ec_"+t.id+"_"+t.type,i=!e&&l[n];i||(e=Bl(t.type),(i=new(r?qd.getClass(e.main,e.sub):Qd.getClass(e.sub))).init(o,h),l[n]=i,s.push(i),u.add(i.group)),t.__viewId=i.__id=n,i.__alive=!0,i.__model=t,i.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},r||a.prepareView(i,t,o,h)}r?o.eachComponent(function(t,e){"series"!==t&&n(e)}):o.eachSeries(n);for(e=0;e<s.length;){var i=s[e];i.__alive?e++:(r||i.renderTask.dispose(),u.remove(i.group),i.dispose(o,h),s.splice(e,1),l[i.__id]===i&&delete l[i.__id],i.__id=i.group.__ecComponentInfo=null)}},My=function(o,e,a,s,t){var n,l,i=o._model;function u(t){t&&t.__alive&&t[e]&&t[e](t.__model,i,o._api,a)}i.setUpdatePayload(a),s?((n={})[s+"Id"]=a[s+"Id"],n[s+"Index"]=a[s+"Index"],n[s+"Name"]=a[s+"Name"],n={mainType:s,query:n},t&&(n.subType=t),null!=(t=a.excludeSeriesId)&&(l=it(),ly(yl(t),function(t){t=Sl(t,null);null!=t&&l.set(t,!0)})),i&&i.eachComponent(n,function(t){var e,n,i,r;l&&null!=l.get(t.id)||(Hu(a)&&!a.notBlur?t instanceof Bd&&function(t,e,n){if(Hu(e)){var i,r=e.type===au,o=t.seriesIndex,a=t.getData(e.dataType),e=(N(e=Dl(a,e))?e[0]:e)||0,s=a.getItemGraphicEl(e);if(!s)for(var l=a.count(),u=0;!s&&u<l;)s=a.getItemGraphicEl(u++);s?Ou(o,(i=jl(s)).focus,i.blurScope,n,r):(i=t.get(["emphasis","focus"]),t=t.get(["emphasis","blurScope"]),null!=i&&Ou(o,i,t,n,r))}}(t,a,o._api):Vu(a)&&t instanceof Bd&&(e=t,n=a,o._api,Vu(n)&&(i=n.dataType,N(r=Dl(e.getData(i),n))||(r=[r]),e[n.type===hu?"toggleSelect":n.type===lu?"select":"unselect"](r,i)),Ru(t),Hy(o)),u(o["series"===s?"_chartsMap":"_componentsMap"][t.__viewId]))},o)):ly([].concat(o._componentsViews).concat(o._chartsViews),u)},Ty={prepareAndUpdate:function(t){wy(this),Ty.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,o=this._scheduler;e&&(e.setUpdatePayload(t),o.restoreData(e,t),o.performSeriesTasks(e),r.create(e,n),o.performDataProcessorTasks(e,t),Dy(this,e),r.update(e,n),Oy(e),o.performVisualTasks(e,t),Ry(this,e,n,t),o=e.get("backgroundColor")||"transparent",t=e.get("darkMode"),w.canvasSupported?(i.setBackgroundColor(o),null!=t&&"auto"!==t&&i.setDarkMode(t)):(o=Re(t=Pe(o),"rgb"),0===t[3]&&(o="transparent")),zy(e,n))},updateTransform:function(n){var i,r,o=this,a=this._model,s=this._api;a&&(a.setUpdatePayload(n),i=[],a.eachComponent(function(t,e){"series"===t||(t=o.getViewOfComponentModel(e))&&t.__alive&&(!t.updateTransform||(e=t.updateTransform(e,a,s,n))&&e.update)&&i.push(t)}),r=it(),a.eachSeries(function(t){var e=o._chartsMap[t.__viewId];(!e.updateTransform||(e=e.updateTransform(t,a,s,n))&&e.update)&&r.set(t.uid,1)}),Oy(a),this._scheduler.performVisualTasks(a,n,{setDirty:!0,dirtyMap:r}),Ny(this,a,s,n,r),zy(a,this._api))},updateView:function(t){var e=this._model;e&&(e.setUpdatePayload(t),Qd.markUpdateMethod(t,"updateView"),Oy(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Ry(this,this._model,this._api,t),zy(e,this._api))},updateVisual:function(n){var i=this,r=this._model;r&&(r.setUpdatePayload(n),r.eachSeries(function(t){t.getData().clearAllVisual()}),Qd.markUpdateMethod(n,"updateVisual"),Oy(r),this._scheduler.performVisualTasks(r,n,{visualType:"visual",setDirty:!0}),r.eachComponent(function(t,e){"series"===t||(t=i.getViewOfComponentModel(e))&&t.__alive&&t.updateVisual(e,r,i._api,n)}),r.eachSeries(function(t){i._chartsMap[t.__viewId].updateVisual(t,r,i._api,n)}),zy(r,this._api))},updateLayout:function(t){Ty.update.call(this,t)}},Cy=function(t,e,n,i){if(t._disposed)$y(t.id);else{for(var r,o=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=kl(o,n),l=0;l<a.length;l++){var u=a[l];if(u[e]&&null!=(r=u[e](o,s,i)))return r}0}},Dy=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})},Iy=function(e,t){var n=this,i=this.getModel(),r=e.type,o=e.escapeConnect,a=Qy[r],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),h=null!=l[0]&&Bl(l[0]);this[cy]=!0;var c=[e],p=!1;e.batch&&(p=!0,c=O(e.batch,function(t){return(t=A(I({},t),e)).batch=null,t}));var d,f,g=[],l=Vu(e),y=Hu(e)||l;ly(c,function(t){(d=(d=a.action(t,n._model,n._api))||I({},t)).type=s.event||d.type,g.push(d),y?(My(n,u,t,"series"),Hy(n)):h&&My(n,u,t,h.main,h.sub)}),"none"===u||y||h||(this[py]?(wy(this),Ty.update.call(this,e),this[py]=!1):Ty[u].call(this,e)),d=p?{type:s.event||r,escapeConnect:o,batch:g}:g[0],this[cy]=!1,t||((t=this._messageCenter).trigger(d.type,d),l&&(i={type:"selectchanged",escapeConnect:o,selected:(f=[],i.eachSeries(function(n){E(n.getAllData(),function(t){t.data;var e=t.type,t=n.getSelectedDataIndices();0<t.length&&(t={dataIndex:t,seriesIndex:n.seriesIndex},null!=e&&(t.dataType=e),f.push(t))})}),f),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e},t.trigger(i.type,i)))},Ay=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();Iy.call(this,n,t)}},ky=function(t){t||this.trigger("updated")},Ly=function(e,n){e.on("rendered",function(t){n.trigger("rendered",t),!e.animation.isFinished()||n[py]||n._scheduler.unfinished||n._pendingActions.length||n.trigger("finished")})},Py=function(t,i){t.on("mouseover",function(t){var e,n=Zg(t.target,Fu);n&&(Ou((e=jl(n)).seriesIndex,e.focus,e.blurScope,i._api,!0),Pu(n=n,t)||n.__highByOuter||wu(n,gu),Hy(i))}).on("mouseout",function(t){var e,n=Zg(t.target,Fu);n&&(Ou((e=jl(n)).seriesIndex,e.focus,e.blurScope,i._api,!1),Pu(n=n,t)||n.__highByOuter||wu(n,yu),Hy(i))}).on("click",function(t){var e=Zg(t.target,function(t){return null!=jl(t).dataIndex},!0);e&&(t=e.selected?"unselect":"select",e=jl(e),i._api.dispatchAction({type:t,dataType:e.dataType,dataIndexInside:e.dataIndex,seriesIndex:e.seriesIndex,isFromClick:!0}))})},Oy=function(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})},Ry=function(t,e,n,i){Ey(t,e,n,i),ly(t._chartsViews,function(t){t.__alive=!1}),Ny(t,e,n,i),ly(t._chartsViews,function(t){t.__alive||t.remove(e,n)})},Ey=function(t,n,i,r,e){ly(e||t._componentsViews,function(t){var e=t.__model;Zy(0,t),t.render(e,n,i,r),qy(e,t),jy(e,t)})},Ny=function(i,t,e,r,o){var a=i._scheduler,s=i._labelManager;s.clearLabels();var n,l,u=!1;t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];e.__alive=!0;var n=e.renderTask;a.updatePayload(n,r),Zy(0,e),o&&o.get(t.uid)&&n.dirty(),n.perform(a.getPerformArgs(n))&&(u=!0),t.__transientTransitionOpt=null,e.group.silent=!!t.get("silent"),function(t,e){var n=t.get("blendMode")||null;0;e.group.traverse(function(t){t.isGroup||(t.style.blend=n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.style.blend=n})})}(t,e),Ru(t),s.addLabelsOfSeries(e)}),a.unfinished=u||a.unfinished,s.updateLayoutConfig(e),s.layout(e),s.processLabelsOverall(),t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];qy(t,e),jy(t,e)}),e=t,t=(n=i)._zr.storage,l=0,t.traverse(function(t){t.isGroup||l++}),l>e.get("hoverLayerThreshold")&&!w.node&&!w.worker&&e.eachSeries(function(t){t.preventUsingHoverLayer||(t=n._chartsMap[t.__viewId]).__alive&&t.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})})},zy=function(e,n){ly(im,function(t){t(e,n)})},Hy=function(t){t[dy]=!0,t.getZr().wakeUp()},Wy=function(t){t[dy]&&(t.getZr().storage.traverse(function(t){Ku(t)||Xy(t)}),t[dy]=!1)},By=function(n){return l(t,e=hp),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){Du(t,e),Hy(n)},t.prototype.leaveEmphasis=function(t,e){Iu(t,e),Hy(n)},t.prototype.enterBlur=function(t){wu(t,mu),Hy(n)},t.prototype.leaveBlur=function(t){Au(t),Hy(n)},t.prototype.enterSelect=function(t){ku(t),Hy(n)},t.prototype.leaveSelect=function(t){Lu(t),Hy(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},Fy=function(i){function r(t,e){for(var n=0;n<t.length;n++){t[n][gy]=e}}ly(Jy,function(t,e){i._messageCenter.on(e,function(t){var e,n;lm[i.group]&&0!==i[gy]&&(t&&t.escapeConnect||(e=i.makeActionFromEvent(t),n=[],ly(sm,function(t){t!==i&&t.group===i.group&&n.push(t)}),r(n,0),ly(n,function(t){1!==t[gy]&&t.dispatchAction(e)}),r(n,2)))})})},void(Vy=function(t,e){var a=t._model;E(yl(e),function(t){var e,n=t.from,i=t.to;null==i&&dl(e);var r={includeMainTypes:["series"],enableAll:!1,enableNone:!1},o=n?kl(a,n,r):null,r=kl(a,i,r).seriesModel;null==r&&(e=""),o&&o.seriesModel!==r&&(e=""),null!=e&&dl(e),r.__transientTransitionOpt={from:n?n.dimension:null,to:i.dimension,dividingMethod:t.dividingMethod}})})),Yy);function Yy(t,e,n){var i=Gy.call(this,new Bf)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},"string"==typeof e&&(e=om[e]),i._dom=t;"undefined"==typeof window&&global;var r="canvas",o=!1,o=i._zr=Qs(t,{renderer:n.renderer||r,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,useDirtyRect:null==n.useDirtyRect?o:n.useDirtyRect});i._throttledZrFlush=af(M(o.flush,o),17),(e=D(e))&&Np(e,!0),i._theme=e,i._locale=function(t){if(z(t)){var e=Ah[t.toUpperCase()]||{};return t===Ch||t===Dh?D(e):_(D(e),D(Ah[Ih]),!1)}return _(D(t),D(Ah[Ih]),!1)}(n.locale||Lh),i._coordSysMgr=new dp;n=i._api=By(i);function a(t,e){return t.__prio-e.__prio}return Un(rm,a),Un(tm,a),i._scheduler=new ff(i,n,tm,rm),i._messageCenter=new xy,i._labelManager=new gg,i._initEvents(),i.resize=M(i.resize,i),o.animation.on("frame",i._onframe,i),Ly(o,i),Py(o,i),J(i),i}function Xy(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var r=n[i];"emphasis"!==r&&"blur"!==r&&"select"!==r&&e.push(r)}t.selected&&t.states.select&&e.push("select"),t.hoverState===eu&&t.states.emphasis?e.push("emphasis"):t.hoverState===tu&&t.states.blur&&e.push("blur"),t.useStates(e)}function qy(t,e){var i,r;t.preventAutoZ||(i=t.get("z"),r=t.get("zlevel"),e.group.traverse(function(t){var e,n;t.isGroup||(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),n=t.getTextContent(),e=t.getTextGuideLine(),n&&(n.z=t.z,n.zlevel=t.zlevel,n.z2=t.z2+2),e&&(n=t.textGuideLineConfig&&t.textGuideLineConfig.showAbove,e.z=t.z,e.zlevel=t.zlevel,e.z2=t.z2+(n?1:-1)))}))}function Zy(t,e){e.group.traverse(function(t){var e,n;Ku(t)||(e=t.getTextContent(),n=t.getTextGuideLine(),t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null))})}function jy(t,e){var n=t.getModel("stateAnimation"),r=t.isAnimationEnabled(),t=n.get("duration"),o=0<t?{duration:t,delay:n.get("delay"),easing:n.get("easing")}:null;e.group.traverse(function(t){var e,n,i;t.states&&t.states.emphasis&&(Ku(t)||(t instanceof Xr&&((i=Ql(n=t)).normalFill=n.style.fill,i.normalStroke=n.style.stroke,n=n.states.select||{},i.selectFill=n.style&&n.style.fill||null,i.selectStroke=n.style&&n.style.stroke||null),!t.__dirty||(e=t.prevStates)&&t.useStates(e),r&&(t.stateTransition=o,n=t.getTextContent(),e=t.getTextGuideLine(),n&&(n.stateTransition=o),e&&(e.stateTransition=o)),t.__dirty&&Xy(t)))})}dh=Uy.prototype;dh.on=yy("on"),dh.off=yy("off"),dh.one=function(i,r,t){var o=this;pl(),this.on.call(this,i,function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r&&r.apply&&r.apply(this,e),o.off(i,t)},t)};var Ky=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function $y(){0}var Qy={},Jy={},tm=[],em=[],nm=[],im=[],rm=[],om={},am={},sm={},lm={},um=+new Date,hm=+new Date,cm="_echarts_instance_";function pm(t){lm[t]=!1}Bh=pm;function dm(t){return sm[e=cm,(t=t).getAttribute?t.getAttribute(e):t[e]];var e}function fm(t,e){om[t]=e}function gm(t){em.push(t)}function ym(t,e){xm(tm,t,e,2e3)}function mm(t,e,n){"function"==typeof e&&(n=e,e="");var i=hy(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,sy(fy.test(i)&&fy.test(e)),Qy[i]||(Qy[i]={action:n,actionInfo:t}),Jy[e]=i}function vm(t,e){xm(rm,t,e,1e3,"layout")}function _m(t,e){xm(rm,t,e,3e3,"visual")}function xm(t,e,n,i,r){(uy(e)||hy(e))&&(n=e,e=i);r=ff.wrapStageHandler(n,r);r.__prio=e,r.__raw=n,t.push(r)}function bm(t,e){am[t]=e}dh=function(t){var e=(t=D(t)).type,n="";e||dl(n);var i=e.split(":");2!==i.length&&dl(n),n=!1,"echarts"===i[0]&&(e=i[1],n=!0),t.__isBuiltIn=n,Td.set(e,t)};_m(2e3,Ic),_m(4500,Ti),_m(4500,jo),_m(2e3,n),_m(4500,o),_m(7e3,function(e,i){e.eachRawSeries(function(t){var n;e.isSeriesFiltered(t)||((n=t.getData()).hasItemVisual()&&n.each(function(t){var e=n.getItemVisual(t,"decal");e&&(n.ensureUniqueItemVisual(t,"style").decal=oy(e,i))}),(t=n.getVisual("decal"))&&(n.getVisual("style").decal=oy(t,i)))})}),gm(Np),ym(900,function(t){var i=it();t.eachSeries(function(t){var e,n=t.get("stack");n&&(e=i.get(n)||i.set(n,[]),(t={stackResultDimension:(n=t.getData()).getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:t}).stackedDimension&&(t.isStackedByIndex||t.stackedByDimension)&&(e.length&&n.setCalculationInfo("stackedOnSeries",e[e.length-1].seriesModel),e.push(t)))}),i.each(zp)}),bm("default",function(i,r){A(r=r||{},{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new fo,o=new ko({style:{fill:r.maskColor},zlevel:r.zlevel,z:1e4});t.add(o);var a,s=r.fontSize+" sans-serif",l=new ko({style:{fill:"none"},textContent:new Ua({style:{text:r.text,fill:r.textColor,font:s}}),textConfig:{position:"right",distance:10},zlevel:r.zlevel,z:10001});return t.add(l),r.showSpinner&&((a=new es({shape:{startAngle:-df/2,endAngle:-df/2+.1,r:r.spinnerRadius},style:{stroke:r.color,lineCap:"round",lineWidth:r.lineWidth},zlevel:r.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*df/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*df/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var t=gn(r.text,s),e=r.showSpinner?r.spinnerRadius:0,n=(i.getWidth()-2*e-(r.showSpinner&&t?10:0)-t)/2-(r.showSpinner?0:t/2),t=i.getHeight()/2;r.showSpinner&&a.setShape({cx:n,cy:t}),l.setShape({x:n-e,y:t-e,width:2*e,height:2*e}),o.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},t.resize(),t}),mm({type:au,event:au,update:au},at),mm({type:su,event:su,update:su},at),mm({type:lu,event:lu,update:lu},at),mm({type:uu,event:uu,update:uu},at),mm({type:hu,event:hu,update:hu},at),fm("light",vh),fm("dark",Ac);function wm(t){return null==t?0:t.length||1}function Sm(t){return t}var Mm=(Tm.prototype.add=function(t){return this._add=t,this},Tm.prototype.update=function(t){return this._update=t,this},Tm.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},Tm.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},Tm.prototype.remove=function(t){return this._remove=t,this},Tm.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},Tm.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o<t.length;o++){var a,s=i[o],l=n[s],u=wm(l);1<u?(a=l.shift(),1===l.length&&(n[s]=l[0]),this._update&&this._update(a,o)):1===u?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},Tm.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a<r.length;a++){var s=r[a],l=n[s],u=i[s],h=wm(l),c=wm(u);if(1<h&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&1<c)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(1<h)for(var p=0;p<h;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(o,i)},Tm.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e[i],o=wm(r);if(1<o)for(var a=0;a<o;a++)this._add&&this._add(r[a]);else 1===o&&this._add&&this._add(r);e[i]=null}},Tm.prototype._initIndexMap=function(t,e,n,i){for(var r=this._diffModeMultiple,o=0;o<t.length;o++){var a,s,l="_ec_"+this[i](t[o],o);r||(n[o]=l),e&&(0===(s=wm(a=e[l]))?(e[l]=o,r&&n.push(l)):1===s?e[l]=[a,o]:a.push(o))}},Tm);function Tm(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||Sm,this._newKeyGetter=i||Sm,this.context=r,this._diffModeMultiple="multiple"===o}function Cm(o){var t={},a=t.encode={},s=it(),l=[],u=[],h=t.userOutput={dimensionNames:o.dimensions.slice(),encode:{}};E(o.dimensions,function(t){var e,n,i=o.getDimensionInfo(t),r=i.coordDim;r&&(e=i.coordDimIndex,Dm(a,r)[e]=t,i.isExtraCoord||(s.set(r,1),"ordinal"===(n=i.type)||"time"===n||(l[0]=t),Dm(h.encode,r)[e]=i.index),i.defaultTooltip&&u.push(t)),Lc.each(function(t,e){var n=Dm(a,e),e=i.otherDims[e];null!=e&&!1!==e&&(n[e]=i.name)})});var i=[],r={};s.each(function(t,e){var n=a[e];r[e]=n[0],i=i.concat(n)}),t.dataDimsOnCoord=i,t.encodeFirstDimNotExtra=r;var e=a.label;e&&e.length&&(l=e.slice());e=a.tooltip;return e&&e.length?u=e.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,t}function Dm(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}var Im,Am,km,Lm,Pm,Om,Rm,Em,Nm,zm,Bm,Fm,Vm,Hm,Wm=function(t){this.otherDims={},null!=t&&I(this,t)},Gm=Math.floor,Um=V,Ym=O,vh="undefined",Xm={float:typeof Float64Array==vh?Array:Float64Array,int:typeof Int32Array==vh?Array:Int32Array,ordinal:Array,number:Array,time:Array},qm=typeof Uint32Array==vh?Array:Uint32Array,Zm=typeof Int32Array==vh?Array:Int32Array,jm=typeof Uint16Array==vh?Array:Uint16Array,Km=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx","_nameRepeatCount"],$m=["_extent","_approximateExtent","_rawExtent"],Qm=(Jm.prototype.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},Jm.prototype.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Jm.prototype.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Jm.prototype.mapDimension=function(t,e){var n=this._dimensionsSummary;if(null==e)return n.encodeFirstDimNotExtra[t];t=n.encode[t];return t?t[e]:null},Jm.prototype.mapDimensionsAll=function(t){return(this._dimensionsSummary.encode[t]||[]).slice()},Jm.prototype.initData=function(t,e,n){var i=Hp(t)||P(t),i=i?new qp(t,this.dimensions.length):t;t=(this._rawData=i).getSource().sourceFormat;this._storage={},this._indices=null,this._dontMakeIdFromName=null!=this._idDimIdx||t===Nc||!!i.fillStorage,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Im[t],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Im.arrayRows,this._rawExtent={},this._initDataFromProvider(0,i.count()),i.pure&&(this.hasItemOption=!1)},Jm.prototype.getProvider=function(){return this._rawData},Jm.prototype.appendData=function(t){var e=this._rawData,n=this.count();e.appendData(t);t=e.count();e.persistent||(t+=n),this._initDataFromProvider(n,t,!0)},Jm.prototype.appendValues=function(t,e){for(var n=this._storage,i=this.dimensions,r=i.length,o=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e?e.length:0),l=0;l<r;l++){var u=i[l];o[u]||(o[u]=Fm()),Lm(n,this._dimensionInfos[u],s,!0)}for(var h=Ym(i,function(t){return o[t]}),c=this._storageArr=Ym(i,function(t){return n[t]}),p=[],d=a;d<s;d++){for(var f=d-a,g=0;g<r;g++){var u=i[g],y=this._dimValueGetterArrayRows(t[f]||p,u,f,g);c[g][d]=y;var m=h[g];y<m[0]&&(m[0]=y),y>m[1]&&(m[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||Nm(this,d))}this._rawCount=this._count=s,this._extent={},Am(this)},Jm.prototype._initDataFromProvider=function(t,e,n){if(!(e<=t)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,c=i.getSource().sourceFormat===Pc,p=0;p<a;p++){var d=o[p];h[d]||(h[d]=Fm()),Lm(r,s[d],e,n)}var f=this._storageArr=Ym(o,function(t){return r[t]}),g=Ym(o,function(t){return h[t]});if(i.fillStorage)i.fillStorage(t,e,f,g);else for(var y=[],m=t;m<e;m++){y=i.getItem(m,y);for(var v,_=0;_<a;_++){var d=o[_],x=f[_],b=this._dimValueGetter(y,d,m,_);x[m]=b;x=g[_];b<x[0]&&(x[0]=b),b>x[1]&&(x[1]=b)}c&&!i.pure&&y&&(v=y.name,null==l[m]&&null!=v&&(l[m]=Sl(v,null)),v=y.id,null==u[m]&&null!=v&&(u[m]=Sl(v,null))),this._dontMakeIdFromName||Nm(this,m)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},Am(this)}},Jm.prototype.count=function(){return this._count},Jm.prototype.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array){r=new e(n);for(var i=0;i<n;i++)r[i]=t[i]}else r=new e(t.buffer,0,n)}else for(var r=new(e=km(this))(this.count()),i=0;i<r.length;i++)r[i]=i;return r},Jm.prototype.getByDimIdx=function(t,e){if(!(0<=e&&e<this._count))return NaN;t=this._storageArr[t];return t?t[this.getRawIndex(e)]:NaN},Jm.prototype.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;t=this._storage[t];return t?t[this.getRawIndex(e)]:NaN},Jm.prototype.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;t=this._storage[t];return t?t[e]:NaN},Jm.prototype.getValues=function(t,e){var n=[];N(t)||(e=t,t=this.dimensions);for(var i=0,r=t.length;i<r;i++)n.push(this.get(t[i],e));return n},Jm.prototype.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this.get(e[n],t)))return!1;return!0},Jm.prototype.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],n=Fm();if(!e)return n;var i,r=this.count();if(!this._indices)return this._rawExtent[t].slice();if(i=this._extent[t])return i.slice();for(var o=(i=n)[0],a=i[1],s=0;s<r;s++){var l=e[this.getRawIndex(s)];l<o&&(o=l),a<l&&(a=l)}return i=[o,a],this._extent[t]=i},Jm.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Jm.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Jm.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},Jm.prototype.setCalculationInfo=function(t,e){Um(t)?I(this._calculationInfo,t):this._calculationInfo[t]=e},Jm.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n<i;n++){var r=this.get(t,n);isNaN(r)||(e+=r)}return e},Jm.prototype.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var n=e.sort(function(t,e){return t-e}),t=this.count();return 0===t?0:t%2==1?n[(t-1)/2]:(n[t/2]+n[t/2-1])/2},Jm.prototype.rawIndexOf=function(t,e){t=t&&this._invertedIndicesMap[t];e=t[e];return null==e||isNaN(e)?-1:e},Jm.prototype.indexOfName=function(t){for(var e=0,n=this.count();e<n;e++)if(this.getName(e)===t)return e;return-1},Jm.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,r=this._count-1;i<=r;){var o=(i+r)/2|0;if(e[o]<t)i=1+o;else{if(!(e[o]>t))return o;r=o-1}}return-1},Jm.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var h=e-i[this.getRawIndex(l)],c=Math.abs(h);c<=n&&((c<o||c===o&&0<=h&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},Jm.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];e.push(this.get(i,t))}return e},Jm.prototype.getName=function(t){var e=this.getRawIndex(t),t=this._nameList[e];return null==t&&null!=this._nameDimIdx&&(t=Em(this,this._nameDimIdx,this._nameOrdinalMeta,e)),null==t&&(t=""),t},Jm.prototype.getId=function(t){return Rm(this,this.getRawIndex(t))},Jm.prototype.each=function(t,e,n,i){var r=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);var o=n||i||this,t=Ym(zm(t),this.getDimension,this);0;for(var a=t.length,s=Ym(t,function(t){return r._dimensionInfos[t].index}),l=this._storageArr,u=0,h=this.count();u<h;u++){var c=this.getRawIndex(u);switch(a){case 0:e.call(o,u);break;case 1:e.call(o,l[s[0]][c],u);break;case 2:e.call(o,l[s[0]][c],l[s[1]][c],u);break;default:for(var p=0,d=[];p<a;p++)d[p]=l[s[p]][c];d[p]=u,e.apply(o,d)}}}},Jm.prototype.filterSelf=function(t,e,n,i){var r=this;if(this._count){"function"==typeof t&&(i=n,n=e,e=t,t=[]);var o=n||i||this,t=Ym(zm(t),this.getDimension,this);0;for(var a=this.count(),s=new(km(this))(a),l=[],u=t.length,h=0,c=Ym(t,function(t){return r._dimensionInfos[t].index}),p=c[0],d=this._storageArr,f=0;f<a;f++){var g=void 0,y=this.getRawIndex(f);if(0===u)g=e.call(o,f);else if(1===u)var m=d[p][y],g=e.call(o,m,f);else{for(var v=0;v<u;v++)l[v]=d[c[v]][y];l[v]=f,g=e.apply(o,l)}g&&(s[h++]=y)}return h<a&&(this._indices=s),this._count=h,this._extent={},this.getRawIndex=this._indices?Om:Pm,this}},Jm.prototype.selectRange=function(t){var e=this,n=this._count;if(n){var i,r=[];for(i in t)t.hasOwnProperty(i)&&r.push(i);0;var o=r.length;if(o){var a=this.count(),s=new(km(this))(a),l=0,u=r[0],h=Ym(r,function(t){return e._dimensionInfos[t].index}),c=t[u][0],p=t[u][1],d=this._storageArr,u=!1;if(!this._indices){var f=0;if(1===o){for(var g=d[h[0]],y=0;y<n;y++){(c<=(x=g[y])&&x<=p||isNaN(x))&&(s[l++]=f),f++}u=!0}else if(2===o){for(var g=d[h[0]],m=d[h[1]],v=t[r[1]][0],_=t[r[1]][1],y=0;y<n;y++){var x=g[y],b=m[y];(c<=x&&x<=p||isNaN(x))&&(v<=b&&b<=_||isNaN(b))&&(s[l++]=f),f++}u=!0}}if(!u)if(1===o)for(y=0;y<a;y++){var w=this.getRawIndex(y);(c<=(x=d[h[0]][w])&&x<=p||isNaN(x))&&(s[l++]=w)}else for(y=0;y<a;y++){for(var S=!0,w=this.getRawIndex(y),M=0;M<o;M++){var T=r[M];((x=d[h[M]][w])<t[T][0]||x>t[T][1])&&(S=!1)}S&&(s[l++]=this.getRawIndex(y))}return l<a&&(this._indices=s),this._count=l,this._extent={},this.getRawIndex=this._indices?Om:Pm,this}}},Jm.prototype.mapArray=function(t,e,n,i){"function"==typeof t&&(i=n,n=e,e=t,t=[]),n=n||i||this;var r=[];return this.each(t,function(){r.push(e&&e.apply(this,arguments))},n),r},Jm.prototype.map=function(t,e,n,i){var r=n||i||this,o=Ym(zm(t),this.getDimension,this);var t=Bm(this,o),a=t._storage;t._indices=this._indices,t.getRawIndex=t._indices?Om:Pm;for(var s=[],l=o.length,u=this.count(),h=[],c=t._rawExtent,p=0;p<u;p++){for(var d=0;d<l;d++)h[d]=this.get(o[d],p);h[l]=p;var f=e&&e.apply(r,h);if(null!=f){"object"!=typeof f&&(s[0]=f,f=s);for(var g=this.getRawIndex(p),y=0;y<f.length;y++){var m=o[y],v=f[y],_=c[m],m=a[m];m&&(m[g]=v),v<_[0]&&(_[0]=v),v>_[1]&&(_[1]=v)}}}return t},Jm.prototype.downSample=function(t,e,n,i){for(var r=Bm(this,[t]),o=r._storage,a=[],s=Gm(1/e),l=o[t],u=this.count(),h=r._rawExtent[t],c=new(km(this))(u),p=0,d=0;d<u;d+=s){u-d<s&&(s=u-d,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(d+f);a[f]=l[g]}var y=n(a),m=this.getRawIndex(Math.min(d+i(a,y)||0,u-1));(l[m]=y)<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),c[p++]=m}return r._count=p,r._indices=c,r.getRawIndex=Om,r},Jm.prototype.lttbDownSample=function(t,e){var n,i=Bm(this,[]),r=i._storage[t],o=this.count(),a=new(km(this))(o),s=0,l=Gm(1/e),u=this.getRawIndex(0);a[s++]=u;for(var h=1;h<o-1;h+=l){for(var c=Math.min(h+l,o-1),p=Math.min(h+2*l,o),d=(p+c)/2,f=0,g=c;g<p;g++){var y=r[w=this.getRawIndex(g)];isNaN(y)||(f+=y)}f/=p-c;for(var c=h,m=Math.min(h+l,o),v=h-1,_=r[u],x=-1,b=c,g=c;g<m;g++){var w,y=r[w=this.getRawIndex(g)];isNaN(y)||x<(n=Math.abs((v-d)*(y-_)-(v-g)*(f-_)))&&(x=n,b=w)}u=a[s++]=b}return a[s++]=this.getRawIndex(o-1),i._count=s,i._indices=a,i.getRawIndex=Om,i},Jm.prototype.getItemModel=function(t){var e=this.hostModel,t=this.getRawDataItem(t);return new wh(t,e,e&&e.ecModel)},Jm.prototype.diff=function(e){var n=this;return new Mm(e?e.getIndices():[],this.getIndices(),function(t){return Rm(e,t)},function(t){return Rm(n,t)})},Jm.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},Jm.prototype.setVisual=function(t,e){this._visual=this._visual||{},Um(t)?I(this._visual,t):this._visual[t]=e},Jm.prototype.getItemVisual=function(t,e){t=this._itemVisuals[t],t=t&&t[e];return null==t?this.getVisual(e):t},Jm.prototype.hasItemVisual=function(){return 0<this._itemVisuals.length},Jm.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t],t=(i=i||(n[t]={}))[e];return null==t&&(N(t=this.getVisual(e))?t=t.slice():Um(t)&&(t=I({},t)),i[e]=t),t},Jm.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Um(e)?I(i,e):i[e]=n},Jm.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},Jm.prototype.setLayout=function(t,e){if(Um(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},Jm.prototype.getLayout=function(t){return this._layout[t]},Jm.prototype.getItemLayout=function(t){return this._itemLayouts[t]},Jm.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?I(this._itemLayouts[t]||{},e):e},Jm.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},Jm.prototype.setItemGraphicEl=function(t,e){var n,i=this.hostModel;e&&((n=jl(e)).dataIndex=t,n.dataType=this.dataType,n.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(Vm,e)),this._graphicEls[t]=e},Jm.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},Jm.prototype.eachItemGraphicEl=function(n,i){E(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},Jm.prototype.cloneShallow=function(t){if((t=t||new Jm(Ym(this.dimensions,this.getDimensionInfo,this),this.hostModel))._storage=this._storage,t._storageArr=this._storageArr,Hm(t,this),this._indices){var e=this._indices.constructor;if(e===Array){var n=this._indices.length;t._indices=new e(n);for(var i=0;i<n;i++)t._indices[i]=this._indices[i]}else t._indices=new e(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Om:Pm,t},Jm.prototype.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(Z(arguments)))})},Jm.internalField=(Im={arrayRows:tv,objectRows:function(t,e,n,i){return vd(t[e],this._dimensionInfos[e])},keyedColumns:tv,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return this._rawData.pure||(!V(t=t)||t instanceof Array)||(this.hasItemOption=!0),vd(r instanceof Array?r[i]:r,this._dimensionInfos[e])},typedArray:function(t,e,n,i){return t[i]}},Am=function(r){var o=r._invertedIndicesMap;E(o,function(t,e){var n=r._dimensionInfos[e].ordinalMeta;if(n){t=o[e]=new Zm(n.categories.length);for(var i=0;i<t.length;i++)t[i]=-1;for(i=0;i<r._count;i++)t[r.get(e,i)]=i}})},Em=function(t,e,n,i){var r,e=t._storageArr[e];return e&&(r=e[i],n&&n.categories.length&&(r=n.categories[r])),Sl(r,null)},km=function(t){return 65535<t._rawCount?qm:jm},Lm=function(t,e,n,i){var r=Xm[e.type],e=e.name;if(i){var o=t[e],a=o&&o.length;if(a!==n){for(var s=new r(n),l=0;l<a;l++)s[l]=o[l];t[e]=s}}else t[e]=new r(n)},Pm=function(t){return t},Om=function(t){return t<this._count&&0<=t?this._indices[t]:-1},Rm=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=Em(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},zm=function(t){return N(t)||(t=null!=t?[t]:[]),t},Bm=function(t,e){var n=t.dimensions,i=new Jm(Ym(n,t.getDimensionInfo,t),t.hostModel);Hm(i,t);for(var r,o,a=i._storage={},s=t._storage,l=i._storageArr=[],u=0;u<n.length;u++){var h=n[u];s[h]&&(0<=L(e,h)?(a[h]=(r=s[h],o=void 0,(o=r.constructor)===Array?r.slice():new o(r)),i._rawExtent[h]=Fm(),i._extent[h]=null):a[h]=s[h],l.push(a[h]))}return i},Fm=function(){return[1/0,-1/0]},Vm=function(t){var e=jl(t),t=jl(this);e.seriesIndex=t.seriesIndex,e.dataIndex=t.dataIndex,e.dataType=t.dataType},Hm=function(e,n){E(Km.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,E($m,function(t){e[t]=D(n[t])}),e._calculationInfo=I({},n._calculationInfo)},void(Nm=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];null==a&&null!=r&&(n[e]=a=Em(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=Em(t,o,t._idOrdinalMeta,e)),null==s&&null!=a&&(s=a,1<(a=(t=t._nameRepeatCount)[a]=(t[a]||0)+1)&&(s+="__ec__"+a),i[e]=s)})),Jm);function Jm(t,e){this.type="list",this._count=0,this._rawCount=0,this._storage={},this._storageArr=[],this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._rawExtent={},this._extent={},this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!0,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"],this.getRawIndex=Pm,t=t||["x","y"];for(var n={},i=[],r={},o=0;o<t.length;o++){var a=t[o],s=z(a)?new Wm({name:a}):a instanceof Wm?a:new Wm(a),l=s.name;s.type=s.type||"float",s.coordDim||(s.coordDim=l,s.coordDimIndex=0);a=s.otherDims=s.otherDims||{};i.push(l),(n[l]=s).index=o,s.createInvertedIndices&&(r[l]=[]),0===a.itemName&&(this._nameDimIdx=o,this._nameOrdinalMeta=s.ordinalMeta),0===a.itemId&&(this._idDimIdx=o,this._idOrdinalMeta=s.ordinalMeta)}this.dimensions=i,this._dimensionInfos=n,this.hostModel=e,this._dimensionsSummary=Cm(this),this._invertedIndicesMap=r,this.userOutput=this._dimensionsSummary.userOutput}function tv(t,e,n,i){return vd(t[i],this._dimensionInfos[e])}function ev(t,e,n){Hp(e)||(e=Gp(e)),n=n||{},t=(t||[]).slice();for(var i,r,o,a,s=(n.dimsDef||[]).slice(),l=it(),u=it(),h=[],c=(i=e,y=t,r=s,o=n.dimCount,a=Math.max(i.dimensionsDetectedCount||1,y.length,r.length,o||0),E(y,function(t){var e;V(t)&&(e=t.dimsDef)&&(a=Math.max(a,e.length))}),a),p=0;p<c;p++){var d=s[p],f=s[p]=I({},V(d)?d:{name:d}),d=f.name,g=h[p]=new Wm;null!=d&&null==l.get(d)&&(g.name=g.displayName=d,l.set(d,p)),null!=f.type&&(g.type=f.type),null!=f.displayName&&(g.displayName=f.displayName)}var y=n.encodeDef;!y&&n.encodeDefaulter&&(y=n.encodeDefaulter(e,c));var m=it(y);m.each(function(t,n){var i,t=yl(t).slice();1===t.length&&!z(t[0])&&t[0]<0?m.set(n,!1):(i=m.set(n,[]),E(t,function(t,e){t=z(t)?l.get(t):t;null!=t&&t<c&&(i[e]=t,_(h[t],n,e))}))});var v=0;function _(t,e,n){null!=Lc.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,u.set(e,!0))}E(t,function(t){var n,i,r,o;z(t)?(n=t,o={}):(n=(o=t).name,t=o.ordinalMeta,o.ordinalMeta=null,(o=D(o)).ordinalMeta=t,i=o.dimsDef,r=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null);var e=m.get(n);if(!1!==e){if(!(e=yl(e)).length)for(var a=0;a<(i&&i.length||1);a++){for(;v<h.length&&null!=h[v].coordDim;)v++;v<h.length&&e.push(v++)}E(e,function(t,e){t=h[t];_(A(t,o),n,e),null==t.name&&i&&(V(e=i[e])||(e={name:e}),t.name=t.displayName=e.name,t.defaultTooltip=e.defaultTooltip),r&&A(t.otherDims,r)})}});for(var x,b,w=n.generateCoord,S=null!=(M=n.generateCoordCount),M=w?M||1:0,T=w||"value",C=0;C<c;C++){null==(g=h[C]=h[C]||new Wm).coordDim&&(g.coordDim=nv(T,u,S),g.coordDimIndex=0,(!w||M<=0)&&(g.isExtraCoord=!0),M--),null==g.name&&(g.name=nv(g.coordDim,l,!1)),null==g.type&&(b=C,Xc((x=e).data,x.sourceFormat,x.seriesLayoutBy,x.dimensionsDefine,x.startIndex,b)===Vc.Must||g.isExtraCoord&&(null!=g.otherDims.itemName||null!=g.otherDims.seriesName))&&(g.type="ordinal")}return h}function nv(t,e,n){if(n||null!=e.get(t)){for(var i=0;null!=e.get(t+i);)i++;t+=i}return e.set(t,!0),t}function iv(t,e){return ev((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})}var rv=function(t){this.coordSysDims=[],this.axisMap=it(),this.categoryAxisMap=it(),this.coordSysName=t};var ov={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",Ll).models[0],t=t.getReferringComponents("yAxis",Ll).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",t),av(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),av(t)&&(i.set("y",t),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){t=t.getReferringComponents("singleAxis",Ll).models[0];e.coordSysDims=["single"],n.set("single",t),av(t)&&(i.set("single",t),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",Ll).models[0],t=r.findAxisModel("radiusAxis"),r=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",t),n.set("angle",r),av(t)&&(i.set("radius",t),e.firstCategoryDimIndex=0),av(r)&&(i.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,i,r,o){var a=t.ecModel,t=a.getComponent("parallel",t.get("parallelIndex")),s=i.coordSysDims=t.dimensions.slice();E(t.parallelAxisIndex,function(t,e){var n=a.getComponent("parallelAxis",t),t=s[e];r.set(t,n),av(n)&&(o.set(t,n),null==i.firstCategoryDimIndex&&(i.firstCategoryDimIndex=e))})}};function av(t){return"category"===t.get("type")}function sv(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function lv(t,e,n){n=n||{},Hp(t)||(t=Gp(t));var i=e.get("coordinateSystem"),i=dp.get(i),r=function(t){var e=t.get("coordinateSystem"),n=new rv(e);if(e=ov[e])return e(t,n,n.axisMap,n.categoryAxisMap),n}(e);r&&r.coordSysDims&&(s=O(r.coordSysDims,function(t){var e={name:t},t=r.axisMap.get(t);return t&&(t=t.get("type"),e.type="category"===(t=t)?"ordinal":"time"===t?"time":"float"),e})),s=s||(i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]);var o,a,i=n.useEncodeDefaulter,i=iv(t,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefaulter:C(i)?i:i?T(Gc,s,e):null});r&&E(i,function(t,e){var n=t.coordDim,n=r.categoryAxisMap.get(n);n&&(null==o&&(o=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(a=!0)}),a||null==o||(i[o].otherDims.itemName=0);var s,l,u,h,c,p,d,f,g,y,m,v=(s=e,l=i,g=(u=u||{}).byIndex,y=u.stackedCoordDimension,m=!(!s||!s.get("stack")),E(l,function(t,e){z(t)&&(l[e]=t={name:t}),m&&!t.isExtraCoord&&(g||h||!t.ordinalMeta||(h=t),c||"ordinal"===t.type||"time"===t.type||y&&y!==t.coordDim||(c=t))}),!c||g||h||(g=!0),c&&(v="__\0ecstackresult",p="__\0ecstackedover",h&&(h.createInvertedIndices=!0),d=c.coordDim,s=c.type,f=0,E(l,function(t){t.coordDim===d&&f++}),l.push({name:v,coordDim:d,coordDimIndex:f,type:s,isExtraCoord:!0,isCalculationCoord:!0}),f++,l.push({name:p,coordDim:p,coordDimIndex:f,type:s,isExtraCoord:!0,isCalculationCoord:!0})),{stackedDimension:c&&c.name,stackedByDimension:h&&h.name,isStackedByIndex:g,stackedOverDimension:p,stackResultDimension:v}),e=new Qm(i,e);e.setCalculationInfo(v);var v=null!=o&&function(t){if(t.sourceFormat===Pc){t=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=t&&!N(_l(t))}}(t)?function(t,e,n,i){return i===o?n:this.defaultDimValueGetter(t,e,n,i)}:null;return e.hasItemOption=!1,e.initData(t,null,v),e}var uv,Ac=(l(hv,uv=Bd),hv.prototype.getInitialData=function(t){return lv(this.getSource(),this,{useEncodeDefaulter:!0})},hv.type="series.line",hv.dependencies=["grid","polar"],hv.defaultOption={zlevel:0,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,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0},hv);function hv(){var t=null!==uv&&uv.apply(this,arguments)||this;return t.type=hv.type,t.hasSymbolVisual=!0,t.legendSymbol="line",t}function cv(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i)return nd(t,e,n[0]);if(i){for(var r=[],o=0;o<n.length;o++)r.push(nd(t,e,n[o]));return r.join(" ")}}function pv(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!N(e))return e+"";for(var i=[],r=0;r<n.length;r++){var o=t.getDimensionInfo(n[r]);o&&i.push(e[o.index])}return i.join(" ")}Bd.registerClass(Ac);var dv,fv=(l(gv,dv=fo),gv.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();r=ey(t,-1,-1,2,2,null,r);r.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),r.drift=yv,this._symbolType=t,this.add(r)},gv.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},gv.prototype.getSymbolPath=function(){return this.childAt(0)},gv.prototype.highlight=function(){Du(this.childAt(0))},gv.prototype.downplay=function(){Iu(this.childAt(0))},gv.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},gv.prototype.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},gv.prototype.updateData=function(t,e,n,i){this.silent=!1;var r,o,a,s=t.getItemVisual(e,"symbol")||"circle",l=t.hostModel,u=gv.getSymbolSize(t,e),h=s!==this._symbolType,c=i&&i.disableAnimation;h?(r=t.getItemVisual(e,"symbolKeepAspect"),this._createSymbol(s,t,e,u,r)):((o=this.childAt(0)).silent=!1,a={scaleX:u[0]/2,scaleY:u[1]/2},c?o.attr(a):Yu(o,a,l,e)),this._updateCommon(t,e,u,n,i),h&&(o=this.childAt(0),c||(a={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:o.style.opacity}},o.scaleX=o.scaleY=0,o.style.opacity=0,Xu(o,a,l,e))),c&&this.childAt(0).stopAnimation("remove"),this._seriesModel=l},gv.prototype._updateCommon=function(e,t,n,i,r){var o,a,s,l,u,h,c=this.childAt(0),p=e.hostModel;i&&(o=i.emphasisItemStyle,s=i.blurItemStyle,a=i.selectItemStyle,l=i.focus,u=i.blurScope,f=i.symbolOffset,h=i.labelStatesModels,v=i.hoverScale,g=i.cursorStyle),i&&!e.hasItemOption||(o=(i=(d=i&&i.itemModel?i.itemModel:e.getItemModel(t)).getModel("emphasis")).getModel("itemStyle").getItemStyle(),a=d.getModel(["select","itemStyle"]).getItemStyle(),s=d.getModel(["blur","itemStyle"]).getItemStyle(),l=i.get("focus"),u=i.get("blurScope"),f=d.getShallow("symbolOffset"),h=nh(d),v=i.getShallow("scale"),g=d.getShallow("cursor"));var d=e.getItemVisual(t,"symbolRotate");c.attr("rotation",(d||0)*Math.PI/180||0),f&&(c.x=el(f[0],n[0]),c.y=el(f[1],n[1])),g&&c.attr("cursor",g);var d=e.getItemVisual(t,"style"),f=d.fill;c instanceof _o?(y=c.style,c.useStyle(I({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},d))):(c.__isEmptyBrush?c.useStyle(I({},d)):c.useStyle(d),c.style.decal=null,c.setColor(f,r&&r.symbolInnerColor),c.style.strokeNoScale=!0);var g=e.getItemVisual(t,"liftZ"),y=this._z2;null!=g?null==y&&(this._z2=c.z2,c.z2+=g):null!=y&&(c.z2=y,this._z2=null);var m=r&&r.useNameLabel;eh(c,h,{labelFetcher:p,labelDataIndex:t,defaultText:function(t){return m?e.getName(t):cv(e,t)},inheritColor:f,defaultOpacity:d.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var v,n=c.ensureState("emphasis");n.style=o,c.ensureState("select").style=a,c.ensureState("blur").style=s,v&&(v=Math.max(1.1,3/this._sizeY),n.scaleX=this._sizeX*v,n.scaleY=this._sizeY*v),this.setSymbolScale(1),Eu(this,l,u)},gv.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},gv.prototype.fadeOut=function(t,e){var n=this.childAt(0),i=this._seriesModel,r=jl(this).dataIndex,o=e&&e.animation;this.silent=n.silent=!0,e&&e.fadeLabel?(e=n.getTextContent())&&qu(e,{style:{opacity:0}},i,{dataIndex:r,removeOpt:o,cb:function(){n.removeTextContent()}}):n.removeTextContent(),qu(n,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:r,cb:t,removeOpt:o})},gv.getSymbolSize=function(t,e){e=t.getItemVisual(e,"symbolSize");return e instanceof Array?e.slice():[+e,+e]},gv);function gv(t,e,n,i){var r=dv.call(this)||this;return r.updateData(t,e,n,i),r}function yv(t,e){this.parent.drift(t,e)}function mv(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&(!i.isIgnore||!i.isIgnore(n))&&(!i.clipShape||i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function vv(t){return null==t||V(t)||(t={isIgnore:t}),t||{}}function _v(t){var e=t.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverScale:t.get("scale"),labelStatesModels:nh(e),cursorStyle:e.get("cursor")}}var xv=(bv.prototype.updateData=function(r,o){o=vv(o);var a=this.group,s=r.hostModel,l=this._data,u=this._SymbolCtor,h=o.disableAnimation,c=_v(r),p={disableAnimation:h},d=o.getSymbolPoint||function(t){return r.getItemLayout(t)};l||a.removeAll(),r.diff(l).add(function(t){var e,n=d(t);mv(r,n,t,o)&&((e=new u(r,t,c,p)).setPosition(n),r.setItemGraphicEl(t,e),a.add(e))}).update(function(t,e){var n=l.getItemGraphicEl(e),i=d(t);mv(r,i,t,o)?(n?(n.updateData(r,t,c,p),e={x:i[0],y:i[1]},h?n.attr(e):Yu(n,e,s)):(n=new u(r,t)).setPosition(i),a.add(n),r.setItemGraphicEl(t,n)):a.remove(n)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){a.remove(e)})}).execute(),this._getSymbolPoint=d,this._data=r},bv.prototype.isPersistent=function(){return!0},bv.prototype.updateLayout=function(){var n=this,t=this._data;t&&t.eachItemGraphicEl(function(t,e){e=n._getSymbolPoint(e);t.setPosition(e),t.markRedraw()})},bv.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=_v(t),this._data=null,this.group.removeAll()},bv.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}n=vv(n);for(var r=t.start;r<t.end;r++){var o,a=e.getItemLayout(r);mv(e,a,r,n)&&((o=new this._SymbolCtor(e,r,this._seriesScope)).traverse(i),o.setPosition(a),this.group.add(o),e.setItemGraphicEl(r,o))}},bv.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()},bv);function bv(t){this.group=new fo,this._SymbolCtor=t||fv}function wv(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=function(t,e){var n=0,t=t.scale.getExtent();"start"===e?n=t[0]:"end"===e?n=t[1]:0<t[0]?n=t[0]:t[1]<0&&(n=t[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),n="x"===s||"radius"===s?1:0,i=O(t.dimensions,function(t){return e.mapDimension(t)}),r=!1,t=e.getCalculationInfo("stackResultDimension");return sv(e,i[0])&&(r=!0,i[0]=t),sv(e,i[1])&&(r=!0,i[1]=t),{dataDimsForPoint:i,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!r,valueDim:l,baseDim:u,baseDataOffset:n,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Sv(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var Mv="undefined"!=typeof Float32Array,Tv=Mv?Float32Array:Array;function Cv(t){return N(t)?Mv?new Float32Array(t):t:new Tv(t)}var Dv=Math.min,Iv=Math.max;function Av(t,e){return isNaN(t)||isNaN(e)}function kv(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y<i;y++){var m=e[2*g],v=e[2*g+1];if(r<=g||g<0)break;if(Av(m,v)){if(l){g+=o;continue}break}if(g===n)t[0<o?"moveTo":"lineTo"](m,v),c=m,p=v;else{var _=m-u,x=v-h;if(_*_+x*x<.5){g+=o;continue}if(0<a){var b=g+o,w=e[2*b],S=e[2*b+1],M=y+1;if(l)for(;Av(w,S)&&M<i;)M++,w=e[2*(b+=o)],S=e[2*b+1];var T,C,D,I,A,k,L,P=void 0,O=void 0;i<=M||Av(w,S)?(d=m,f=v):(C=w-u,D=S-h,I=m-u,A=w-m,k=v-h,L=S-v,x=_=void 0,O="x"===s?(_=Math.abs(I),x=Math.abs(A),d=m-_*a,P=m+_*a,f=v):"y"===s?(_=Math.abs(k),x=Math.abs(L),f=v-_*a,P=d=m,v+_*a):(_=Math.sqrt(I*I+k*k),d=m-C*a*(1-(T=(x=Math.sqrt(A*A+L*L))/(x+_))),f=v-D*a*(1-T),O=v+D*a*T,P=Dv(P=m+C*a*T,Iv(w,m)),O=Dv(O,Iv(S,v)),P=Iv(P,Dv(w,m)),f=v-((O=Iv(O,Dv(S,v)))-v)*_/x,d=Dv(d=m-(P-m)*_/x,Iv(u,m)),f=Dv(f,Iv(h,v)),P=m+(m-(d=Iv(d,Dv(u,m))))*x/_,v+(v-(f=Iv(f,Dv(h,v))))*x/_)),t.bezierCurveTo(c,p,d,f,m,v),c=P,p=O}else t.lineTo(m,v)}u=m,h=v,g+=o}return y}var Lv,Pv=function(){this.smooth=0,this.smoothConstraint=!0},Ov=(l(Rv,Lv=Xr),Rv.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Rv.prototype.getDefaultShape=function(){return new Pv},Rv.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;0<r&&Av(n[2*r-2],n[2*r-1]);r--);for(;i<r&&Av(n[2*i],n[2*i+1]);i++);}for(;i<r;)i+=kv(t,n,i,r,r,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},Rv.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,r=this.path.data,o=Dr.CMD,a="x"===e,s=[],l=0;l<r.length;){var u,h,c,p,d,f=void 0,g=void 0;switch(r[l++]){case o.M:n=r[l++],i=r[l++];break;case o.L:if(f=r[l++],g=r[l++],(d=a?(t-n)/(f-n):(t-i)/(g-i))<=1&&0<=d){var y=a?(g-i)*d+i:(f-n)*d+n;return a?[t,y]:[y,t]}n=f,i=g;break;case o.C:f=r[l++],g=r[l++],u=r[l++],h=r[l++],c=r[l++],p=r[l++];var m=a?Wi(n,f,u,c,t,s):Wi(i,g,h,p,t,s);if(0<m)for(var v=0;v<m;v++){var _=s[v];if(_<=1&&0<=_){y=a?Vi(i,g,h,p,_):Vi(n,f,u,c,_);return a?[t,y]:[y,t]}}n=c,i=p}}},Rv);function Rv(t){t=Lv.call(this,t)||this;return t.type="ec-polyline",t}var Ev,Nv=(l(zv,Ev=Pv),zv);function zv(){return null!==Ev&&Ev.apply(this,arguments)||this}var Bv,Fv=(l(Vv,Bv=Xr),Vv.prototype.getDefaultShape=function(){return new Nv},Vv.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;0<o&&Av(n[2*o-2],n[2*o-1]);o--);for(;r<o&&Av(n[2*r],n[2*r+1]);r++);}for(;r<o;){var s=kv(t,n,r,o,o,1,e.smooth,a,e.connectNulls);kv(t,i,r+s-1,s,o,-1,e.stackedOnSmooth,a,e.connectNulls),r+=s+1,t.closePath()}},Vv);function Vv(t){t=Bv.call(this,t)||this;return t.type="ec-polygon",t}function Hv(t,e,n,i,r){var o=t.getArea(),a=o.x,s=o.y,l=o.width,u=o.height,o=n.get(["lineStyle","width"])||2;a-=o/2,s-=o/2,l+=o,u+=o,a=Math.floor(a),l=Math.round(l);var h=new ko({shape:{x:a,y:s,width:l,height:u}});return e&&(t=(e=t.getBaseAxis()).isHorizontal(),e=e.inverse,t?(e&&(h.shape.x+=l),h.shape.width=0):(e||(h.shape.y+=u),h.shape.height=0),Xu(h,{shape:{width:l,height:u,x:a,y:s}},n,null,i,"function"==typeof r?function(t){r(t,h)}:null)),h}function Wv(t,e,n){var i=t.getArea(),r=nl(i.r0,1),o=nl(i.r,1),a=new _a({shape:{cx:nl(t.cx,1),cy:nl(t.cy,1),r0:r,r:o,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=r,Xu(a,{shape:{endAngle:i.endAngle,r:o}},n)),a}function Gv(t,e){return t.type===e}function Uv(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return 1}}function Yv(t){for(var e=1/0,n=1/0,i=-1/0,r=-1/0,o=0;o<t.length;){var a=t[o++],s=t[o++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),r=Math.max(s,r))}return[[e,n],[i,r]]}function Xv(t,e){var n=Yv(t),i=n[0],t=n[1],n=Yv(e),e=n[0],n=n[1];return Math.max(Math.abs(i[0]-e[0]),Math.abs(i[1]-e[1]),Math.abs(t[0]-n[0]),Math.abs(t[1]-n[1]))}function qv(t){return"number"==typeof t?t:t?.5:0}function Zv(t,e,n){for(var e=e.getBaseAxis(),i="x"===e.dim||"radius"===e.dim?0:1,r=[],o=0,a=[],s=[],l=[];o<t.length-2;o+=2)switch(l[0]=t[o+2],l[1]=t[o+3],s[0]=t[o],s[1]=t[o+1],r.push(s[0],s[1]),n){case"end":a[i]=l[i],a[1-i]=s[1-i],r.push(a[0],a[1]);break;case"middle":var u=(s[i]+l[i])/2,h=[];a[i]=h[i]=u,a[1-i]=s[1-i],h[1-i]=l[1-i],r.push(a[0],a[1]),r.push(h[0],h[1]);break;default:a[i]=s[i],a[1-i]=l[1-i],r.push(a[0],a[1])}return r.push(t[o++],t[o++]),r}function jv(t,e,n){var i=t.get("showAllSymbol"),t="auto"===i;if(!i||t){n=n.getAxesByScale("ordinal")[0];if(n&&(!t||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;a<r;a+=o)if(1.5*fv.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}(n,e))){var r=e.mapDimension(n.dim),o={};return E(n.getViewLabels(),function(t){o[t.tickValue]=1}),function(t){return!o.hasOwnProperty(e.get(r,t))}}}}function Kv(t){for(var e,n,i=t.length/2;0<i&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}function $v(t,e){return[t[2*e],t[2*e+1]]}function Qv(n,i,e,t){if(Gv(i,"cartesian2d")){var r,o=t.getModel("endLabel"),a=o.get("show"),s=o.get("valueAnimation"),l=t.getData(),u={lastFrameIndex:0},h=a?function(t,e){n._endLabelOnDuring(t,e,l,u,s,o,i)}:null,c=i.getBaseAxis().isHorizontal(),p=Hv(i,e,t,function(){var t=n._endLabel;t&&e&&null!=u.originalX&&t.attr({x:u.originalX,y:u.originalY})},h);return t.get("clip",!0)||(r=p.shape,a=Math.max(r.width,r.height),c?(r.y-=a,r.height+=2*a):(r.x-=a,r.width+=2*a)),h&&h(1,p),p}return Wv(i,e,t)}var Jv,vh=(l(t_,Jv=Qd),t_.prototype.init=function(){var t=new fo,e=new xv;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},t_.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===r.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,y=t.get("animation"),m=!l.isEmpty(),v=l.get("origin"),_=wv(r,a,v),x=m&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=Cv(2*i),o=0;o<i;o++){var a=Sv(n,t,e,o);r[2*o]=a[0],r[2*o+1]=a[1]}return r}(r,a,_),b=t.get("showSymbol"),w=b&&!h&&jv(t,a,r),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),S.setItemGraphicEl(e,null))}),b||p.remove(),o.add(g);_=!h&&t.get("step");r&&r.getArea&&t.get("clip",!0)&&(null!=(M=r.getArea()).width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M,d&&c.type===r.type&&_===this._step?(m&&!f?f=this._newPolygon(u,x):f&&!m&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,r),g.setClipPath(Qv(this,r,!1,t)),b&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),Uv(this._stackedOnPoints,x)&&Uv(this._points,u)||(y?this._doUpdateAnimation(a,x,r,n,_,v):(_&&(u=Zv(u,r,_),x=x&&Zv(x,r,_)),d.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:x})))):(b&&p.updateData(a,{isIgnore:w,clipShape:M,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,r,M),_&&(u=Zv(u,r,_),x=x&&Zv(x,r,_)),d=this._newPolyline(u),m&&(f=this._newPolygon(u,x)),h||this._initOrUpdateEndLabel(t,r),g.setClipPath(Qv(this,r,!0,t)));var w=function(t,e){var n=t.getVisual("visualMeta");if(n&&n.length&&t.count()&&"cartesian2d"===e.type){for(var i,r=n.length-1;0<=r;r--){var o,a=n[r].dimension,a=t.dimensions[a],a=t.getDimensionInfo(a);if("x"===(o=a&&a.coordDim)||"y"===o){i=n[r];break}}if(i){var s=e.getAxis(o),l=O(i.stops,function(t){return{offset:0,coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}}),u=l.length,h=i.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),h.reverse());var c=l[0].coord-10,e=l[u-1].coord+10,p=e-c;if(p<.001)return"transparent";E(l,function(t){t.offset=(t.coord-c)/p}),l.push({offset:u?l[u-1].offset:.5,color:h[1]||"transparent"}),l.unshift({offset:u?l[0].offset:.5,color:h[0]||"transparent"});l=new Qo(0,0,0,0,l,!0);return l[o]=c,l[o+"2"]=e,l}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")],y=t.get(["emphasis","focus"]),M=t.get(["emphasis","blurScope"]);d.useStyle(A(s.getLineStyle(),{fill:"none",stroke:w,lineJoin:"bevel"})),Bu(d,t,"lineStyle"),0<d.style.lineWidth&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(d.getState("emphasis").style.lineWidth=d.style.lineWidth+1),jl(d).seriesIndex=t.seriesIndex,Eu(d,y,M);m=qv(t.get("smooth")),h=t.get("smoothMonotone"),g=t.get("connectNulls");d.setShape({smooth:m,smoothMonotone:h,connectNulls:g}),f&&(s=a.getCalculationInfo("stackedOnSeries"),d=0,f.useStyle(A(l.getAreaStyle(),{fill:w,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),s&&(d=qv(s.get("smooth"))),f.setShape({smooth:m,stackedOnSmooth:d,smoothMonotone:h,connectNulls:g}),Bu(f,t,"areaStyle"),jl(f).seriesIndex=t.seriesIndex,Eu(f,y,M));function T(t){i._changePolyState(t)}a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=T)}),this._polyline.onHoverStateChange=T,this._data=a,this._coordSys=r,this._stackedOnPoints=x,this._points=u,this._step=_,this._valueOrigin=v},t_.prototype.dispose=function(){},t_.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Dl(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&0<=o){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],a=a[2*o+1];if(isNaN(l)||isNaN(a))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,a))return;(s=new fv(r,o)).x=l,s.y=a,s.setZ(t.get("zlevel"),t.get("z")),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Qd.prototype.highlight.call(this,t,e,n,i)},t_.prototype.downplay=function(t,e,n,i){var r,o=t.getData(),a=Dl(o,i);this._changePolyState("normal"),null!=a&&0<=a?(r=o.getItemGraphicEl(a))&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay()):Qd.prototype.downplay.call(this,t,e,n,i)},t_.prototype._changePolyState=function(t){var e=this._polygon;Su(this._polyline,t),e&&Su(e,t)},t_.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Ov({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e},t_.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Fv({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n},t_.prototype._initSymbolLabelAnimation=function(t,l,u){var h,c,e=l.getBaseAxis(),p=e.inverse;"cartesian2d"===l.type?(h=e.isHorizontal(),c=!1):"polar"===l.type&&(h="angle"===e.dim,c=!0);var e=t.hostModel,d=e.get("animationDuration");"function"==typeof d&&(d=d(null));var f=e.get("animationDelay")||0,g="function"==typeof f?f(null):f;t.eachItemGraphicEl(function(t,e){var n,i,r,o,a,s=t;s&&(i=[t.x,t.y],r=a=o=void 0,r=c?(n=u,i=l.pointToCoord(i),h?(o=n.startAngle,a=n.endAngle,-i[1]/180*Math.PI):(o=n.r0,a=n.r,i[0])):h?(o=u.x,a=u.x+u.width,t.x):(o=u.y+u.height,a=u.y,t.y),a=a===o?0:(r-o)/(a-o),p&&(a=1-a),o="function"==typeof f?f(e):d*a+g,a=(e=s.getSymbolPath()).getTextContent(),s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:o}),a&&a.animateFrom({style:{opacity:0}},{duration:300,delay:o}),e.disableLabelAnimation=!0)})},t_.prototype._initOrUpdateEndLabel=function(t,e){var i,n,r,o=t.getModel("endLabel");o.get("show")?(i=t.getData(),r=this._polyline,(n=this._endLabel)||((n=this._endLabel=new Ua({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0),0<=(r=Kv(i.getLayout("points")))&&eh(n,nh(t,"endLabel"),{labelFetcher:t,labelDataIndex:r,defaultText:function(t,e,n){return n?pv(i,n):cv(i,t)},enableTextSetter:!0},(t=o,e=(o=(r=e).getBaseAxis()).isHorizontal(),r=o.inverse,o=e?r?"right":"left":"center",r=e?"middle":r?"top":"bottom",{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||r,padding:t.get("distance")||0}}))):this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t_.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s,l,u,h,c,p,d,f,g=this._endLabel,y=this._polyline;g&&(t<1&&null==i.originalX&&(i.originalX=g.x,i.originalY=g.y),s=n.getLayout("points"),u=(l=n.hostModel).get("connectNulls"),h=o.get("precision"),p=(d=a.getBaseAxis()).isHorizontal(),c=d.inverse,o=e.shape,a=void 0,1<=(p=(o=(c=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<o;u++)if(r=t[2*u+a],!isNaN(r)&&!isNaN(t[2*u+1-a]))if(0!==u){if(i<=e&&e<=r||e<=i&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(s,d=c?p?o.x:o.y+o.height:p?o.x+o.width:o.y,e=p?"x":"y")).range)[1]-o[0])?(1<p&&!u?(f=$v(s,o[0]),g.attr({x:f[0],y:f[1]}),r&&(a=l.getRawValue(o[0]))):((f=y.getPointOn(d,e))&&g.attr({x:f[0],y:f[1]}),d=l.getRawValue(o[0]),e=l.getRawValue(o[1]),r&&(a=Rl(n,h,d,e,c.t))),i.lastFrameIndex=o[0]):(f=$v(s,o=1===t||0<i.lastFrameIndex?o[0]:0),r&&(a=l.getRawValue(o)),g.attr({x:f[0],y:f[1]})),r&&uh(g).setLabelText(a))},t_.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,o,a,s){for(var l,u,h=(l=t,u=[],e.diff(l).add(function(t){u.push({cmd:"+",idx:t})}).update(function(t,e){u.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){u.push({cmd:"-",idx:t})}).execute(),u),c=[],p=[],d=[],f=[],g=[],y=[],m=[],v=wv(r,e,a),_=wv(o,t,s),x=t.getLayout("points")||[],b=e.getLayout("points")||[],w=0;w<h.length;w++){var S=h[w],M=!0,T=void 0,C=void 0;switch(S.cmd){case"=":T=2*S.idx,C=2*S.idx1;var D=x[T],I=x[T+1],A=b[C],k=b[C+1];(isNaN(D)||isNaN(I))&&(D=A,I=k),c.push(D,I),p.push(A,k),d.push(n[T],n[T+1]),f.push(i[C],i[C+1]),m.push(e.getRawIndex(S.idx1));break;case"+":var L=S.idx,P=v.dataDimsForPoint,P=r.dataToPoint([e.get(P[0],L),e.get(P[1],L)]),C=2*L;c.push(P[0],P[1]),p.push(b[C],b[C+1]);P=Sv(v,r,e,L);d.push(P[0],P[1]),f.push(i[C],i[C+1]),m.push(e.getRawIndex(L));break;case"-":P=S.idx,C=t.getRawIndex(P),L=_.dataDimsForPoint,T=2*P;C!==P?(L=o.dataToPoint([t.get(L[0],P),t.get(L[1],P)]),P=Sv(_,o,t,P),c.push(x[T],x[T+1]),p.push(L[0],L[1]),d.push(n[T],n[T+1]),f.push(P[0],P[1]),m.push(C)):M=!1}M&&(g.push(S),y.push(y.length))}y.sort(function(t,e){return m[t]-m[e]});for(var O=Cv(s=c.length),R=Cv(s),E=Cv(s),N=Cv(s),z=[],w=0;w<y.length;w++){var B=y[w],F=2*w,V=2*B;O[F]=c[V],O[1+F]=c[1+V],R[F]=p[V],R[1+F]=p[1+V],E[F]=d[V],E[1+F]=d[1+V],N[F]=f[V],N[1+F]=f[1+V],z[w]=g[B]}return{current:O,next:R,stackedOnCurrent:E,stackedOnNext:N,status:z}}(this._data,t,this._stackedOnPoints,e,this._coordSys,n,this._valueOrigin,o),h=u.current,c=u.stackedOnCurrent,e=u.next,o=u.stackedOnNext;if(r&&(h=Zv(u.current,n,r),c=Zv(u.stackedOnCurrent,n,r),e=Zv(u.next,n,r),o=Zv(u.stackedOnNext,n,r)),3e3<Xv(h,e)||s&&3e3<Xv(c,o))return a.setShape({points:e}),void(s&&s.setShape({points:e,stackedOnPoints:o}));a.shape.__points=u.current,a.shape.points=h;e={shape:{points:e}};u.current!==h&&(e.shape.__points=u.next),a.stopAnimation(),Yu(a,e,l),s&&(s.setShape({points:h,stackedOnPoints:c}),s.stopAnimation(),Yu(s,{shape:{stackedOnPoints:o}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var p,d=[],f=u.status,g=0;g<f.length;g++){"="!==f[g].cmd||(p=t.getItemGraphicEl(f[g].idx1))&&d.push({el:p,ptIdx:g})}a.animators&&a.animators.length&&a.animators[0].during(function(){s&&s.dirtyShape();for(var t=a.shape.__points,e=0;e<d.length;e++){var n=d[e].el,i=2*d[e].ptIdx;n.x=t[i],n.y=t[1+i],n.markRedraw()}})},t_.prototype.remove=function(t){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t_.type="line",t_);function t_(){return null!==Jv&&Jv.apply(this,arguments)||this}Qd.registerClass(vh);function e_(t){return Math.round(t.length/2)}var n_={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}};function i_(t){return{seriesType:t,reset:function(t,e,n){var i,r=t.getData(),o=t.get("sampling"),a=t.coordinateSystem,s=r.count();10<s&&"cartesian2d"===a.type&&o&&(i=a.getBaseAxis(),a=a.getOtherAxis(i),i=i.getExtent(),n=n.getDevicePixelRatio(),n=Math.abs(i[1]-i[0])*(n||1),1<(s=Math.round(s/n))&&("lttb"===o&&t.setData(r.lttbDownSample(r.mapDimension(a.dim),1/s)),n=void 0,"string"==typeof o?n=n_[o]:"function"==typeof o&&(n=o),n&&t.setData(r.downSample(r.mapDimension(a.dim),1/s,n,e_))))}}}var Ac={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},vh=_({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Ac),Ac=_({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Ac),r_={category:vh,value:Ac,time:_({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Ac),log:A({scale:!0,logBase:10},Ac)},o_=(a_.createByAxisModel=function(t){var e=t.option,t=e.data,t=t&&O(t,s_);return new a_({categories:t,needCollect:!t,deduplication:!1!==e.dedplication})},a_.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},a_.prototype.parseAndCollect=function(t){var e=this._needCollect;if("string"!=typeof t&&!e)return t;if(e&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,n;var n,i=this._getOrCreateMap();return null==(n=i.get(t))&&(e?(n=this.categories.length,this.categories[n]=t,i.set(t,n)):n=NaN),n},a_.prototype._getOrCreateMap=function(){return this._map||(this._map=it(this.categories))},a_);function a_(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}function s_(t){return V(t)&&null!=t.value?t.value:t+""}var l_={value:1,category:1,time:1,log:1};function u_(o,a,s){E(l_,function(t,r){var i,e=_(_({},r_[r],!0),s,!0),e=(l(n,i=a),n.prototype.mergeDefaultAndTheme=function(t,e){var n=mc(this),i=n?_c(t):{};_(t,e.getTheme().get(r+"Axis")),_(t,this.getDefaultOption()),t.type=h_(t),n&&vc(t,i,n)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=o_.createByAxisModel(this))},n.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=o+"Axis."+r,n.defaultOption=e,n);function n(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=i.apply(this,t)||this;return n.type=o+"Axis."+r,n}Tc.registerClass(e)}),Tc.registerSubTypeDefaulter(o+"Axis",h_)}function h_(t){return t.type||(t.data?"category":"value")}c_.prototype.getNeedCrossZero=function(){return!this.option.scale},c_.prototype.getCoordSysModel=function(){},vh=c_;function c_(){}var p_,Ac=(l(d_,p_=Tc),d_.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Ll).models[0]},d_.type="cartesian2dAxis",d_);function d_(){return null!==p_&&p_.apply(this,arguments)||this}x(Ac,vh);vh={offset:0,categorySortInfo:[]};u_("x",Ac,vh),u_("y",Ac,vh);var f_=(g_.prototype.getSetting=function(t){return this._setting[t]},g_.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},g_.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},g_.prototype.getExtent=function(){return this._extent.slice()},g_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},g_.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},g_.prototype.isBlank=function(){return this._isBlank},g_.prototype.setBlank=function(t){this._isBlank=t},g_);function g_(t){this._setting=t||{},this._extent=[1/0,-1/0]}Ul(f_,{registerWhenExtend:!0});var y_=nl;function m_(t,e,n,i){var r={},o=t[1]-t[0],e=r.interval=ul(o/e,!0);null!=n&&e<n&&(e=r.interval=n),null!=i&&i<e&&(e=r.interval=i);i=r.intervalPrecision=v_(e),i=r.niceTickExtent=[y_(Math.ceil(t[0]/e)*e,i),y_(Math.floor(t[1]/e)*e,i)];return i=i,t=t,isFinite(i[0])||(i[0]=t[0]),isFinite(i[1])||(i[1]=t[1]),__(i,0,t),__(i,1,t),i[0]>i[1]&&(i[0]=i[1]),r}function v_(t){return il(t)+2}function __(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function x_(t,e){return t>=e[0]&&t<=e[1]}function b_(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function w_(t,e){return t*(e[1]-e[0])+e[0]}var S_,M_=(l(T_,S_=f_),T_.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},T_.prototype.contain=function(t){return x_(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},T_.prototype.normalize=function(t){return b_(t=this.getCategoryIndex(this.parse(t)),this._extent)},T_.prototype.scale=function(t){return t=this.getCategoryIndex(t),Math.round(w_(t,this._extent))},T_.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:this.getCategoryIndex(n)}),n++;return t},T_.prototype.getMinorTicks=function(t){},T_.prototype.setCategorySortInfo=function(t){this._categorySortInfo=t},T_.prototype.getCategorySortInfo=function(){return this._categorySortInfo},T_.prototype.getCategoryIndex=function(t){return this._categorySortInfo.length?this._categorySortInfo[t].beforeSortIndex:t},T_.prototype.getRawIndex=function(t){return this._categorySortInfo.length?this._categorySortInfo[t].ordinalNumber:t},T_.prototype.getLabel=function(t){if(!this.isBlank()){t=this.getRawIndex(t.value),t=this._ordinalMeta.categories[t];return null==t?"":t+""}},T_.prototype.count=function(){return this._extent[1]-this._extent[0]+1},T_.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},T_.prototype.isInExtentRange=function(t){return t=this.getCategoryIndex(t),this._extent[0]<=t&&this._extent[1]>=t},T_.prototype.getOrdinalMeta=function(){return this._ordinalMeta},T_.prototype.niceTicks=function(){},T_.prototype.niceExtent=function(){},T_.type="ordinal",T_);function T_(t){var e=S_.call(this,t)||this;e.type="ordinal";t=e.getSetting("ordinalMeta");return N(t=t||new o_({}))&&(t=new o_({categories:O(t,function(t){return V(t)?t.value:t})})),e._ordinalMeta=t,e._categorySortInfo=[],e._extent=e.getSetting("extent")||[0,t.categories.length-1],e}f_.registerClass(M_);var C_,D_=nl,I_=(l(A_,C_=f_),A_.prototype.parse=function(t){return t},A_.prototype.contain=function(t){return x_(t,this._extent)},A_.prototype.normalize=function(t){return b_(t,this._extent)},A_.prototype.scale=function(t){return w_(t,this._extent)},A_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},A_.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},A_.prototype.getInterval=function(){return this._interval},A_.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=v_(t)},A_.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]<i[0]&&(t?o.push({value:D_(i[0]-e,r)}):o.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(o.push({value:a}),(a=D_(a+e,r))!==o[o.length-1].value);)if(1e4<o.length)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:D_(s+e,r)}):o.push({value:n[1]})),o},A_.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;r<e.length;r++){for(var o=e[r],a=e[r-1],s=0,l=[],u=(o.value-a.value)/t;s<t-1;){var h=D_(a.value+(s+1)*u);h>i[0]&&h<i[1]&&l.push(h),s++}n.push(l)}return n},A_.prototype.getLabel=function(t,e){if(null==t)return"";var e=e&&e.precision;null==e?e=il(t.value)||0:"auto"===e&&(e=this._intervalPrecision);e=D_(t.value,e,!0);return hl(e=e)?(e=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<e.length?"."+e[1]:""):z(e)?e:"-"},A_.prototype.niceTicks=function(t,e,n){t=t||5;var i=this._extent,r=i[1]-i[0];isFinite(r)&&(r<0&&i.reverse(),n=m_(i,t,e,n),this._intervalPrecision=n.intervalPrecision,this._interval=n.interval,this._niceExtent=n.niceTickExtent)},A_.prototype.niceExtent=function(t){var e=this._extent;e[0]===e[1]&&(0!==e[0]?(n=e[0],t.fixMax||(e[1]+=n/2),e[0]-=n/2):e[1]=1);var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);n=this._interval;t.fixMin||(e[0]=D_(Math.floor(e[0]/n)*n)),t.fixMax||(e[1]=D_(Math.ceil(e[1]/n)*n))},A_.type="interval",A_);function A_(){var t=null!==C_&&C_.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}f_.registerClass(I_);var k_="__ec_stack_",L_="undefined"!=typeof Float32Array?Float32Array:Array;function P_(t){return t.get("stack")||k_+t.seriesIndex}function O_(t){return t.dim+t.index}function R_(t,e){var n=[];return e.eachSeriesByType(t,function(t){z_(t)&&!B_(t)&&n.push(t)}),n}function E_(t){var l=function(t){var l={};E(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var n=t.getData(),i=e.dim+"_"+e.index,r=n.mapDimension(e.dim),o=0,a=n.count();o<a;++o){var s=n.get(r,o);l[i]?l[i].push(s):l[i]=[s]}});var e,n={};for(e in l)if(l.hasOwnProperty(e)){var i=l[e];if(i){i.sort(function(t,e){return t-e});for(var r=null,o=1;o<i.length;++o){var a=i[o]-i[o-1];0<a&&(r=null===r?a:Math.min(r,a))}n[e]=r}}return n}(t),u=[];return E(t,function(t){var e,n=t.coordinateSystem.getBaseAxis(),i=n.getExtent();e="category"===n.type?n.getBandWidth():"value"===n.type||"time"===n.type?(r=n.dim+"_"+n.index,o=l[r],a=Math.abs(i[1]-i[0]),e=n.scale.getExtent(),r=Math.abs(e[1]-e[0]),o?a/r*o:a):(s=t.getData(),Math.abs(i[1]-i[0])/s.count());var r=el(t.get("barWidth"),e),o=el(t.get("barMaxWidth"),e),a=el(t.get("barMinWidth")||1,e),i=t.get("barGap"),s=t.get("barCategoryGap");u.push({bandWidth:e,barWidth:r,barMaxWidth:o,barMinWidth:a,barGap:i,barCategoryGap:s,axisKey:O_(n),stackId:P_(t)})}),function(t){var a={};E(t,function(t,e){var n=t.axisKey,i=t.bandWidth,r=a[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},o=r.stacks;a[n]=r;i=t.stackId;o[i]||r.autoWidthCount++,o[i]=o[i]||{width:0,maxWidth:0};n=t.barWidth;n&&!o[i].width&&(o[i].width=n,n=Math.min(r.remainedWidth,n),r.remainedWidth-=n);n=t.barMaxWidth;n&&(o[i].maxWidth=n);n=t.barMinWidth;n&&(o[i].minWidth=n);n=t.barGap;null!=n&&(r.gap=n);t=t.barCategoryGap;null!=t&&(r.categoryGap=t)});var d={};return E(a,function(t,n){d[n]={};var e,i=t.stacks,r=t.bandWidth,o=t.categoryGap;null==o&&(e=R(i).length,o=Math.max(35-4*e,15)+"%");var o=el(o,r),a=el(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*a),u=Math.max(u,0);E(i,function(t){var e,n=t.maxWidth,i=t.minWidth;t.width?(e=t.width,n&&(e=Math.min(e,n)),i&&(e=Math.max(e,i)),t.width=e,s-=e+a*e,l--):(e=u,n&&n<e&&(e=Math.min(n,s)),i&&e<i&&(e=i),e!==u&&(t.width=e,s-=e+a*e,l--))}),u=(s-o)/(l+(l-1)*a),u=Math.max(u,0);var h,c=0;E(i,function(t,e){t.width||(t.width=u),c+=(h=t).width*(1+a)}),h&&(c-=h.width*a);var p=-c/2;E(i,function(t,e){d[n][e]=d[n][e]||{bandWidth:r,offset:p,width:t.width},p+=t.width*(1+a)})}),d}(u)}function N_(t,e,n){if(t&&e){e=t[O_(e)];return null!=e&&null!=n?e[P_(n)]:e}}Ac={seriesType:"bar",plan:jd(),reset:function(t){if(z_(t)&&B_(t)){var e=t.getData(),c=t.coordinateSystem,p=c.master.getRect(),n=c.getBaseAxis(),d=c.getOtherAxis(n),f=e.mapDimension(d.dim),g=e.mapDimension(n.dim),y=d.isHorizontal(),m=y?0:1,v=N_(E_([t]),n,t).width;return.5<v||(v=.5),{progress:function(t,e){for(var n,i=t.count,r=new L_(2*i),o=new L_(2*i),a=new L_(i),s=[],l=[],u=0,h=0;null!=(n=t.next());)l[m]=e.get(f,n),l[1-m]=e.get(g,n),s=c.dataToPoint(l,null,s),o[u]=y?p.x+p.width:s[0],r[u++]=s[0],o[u]=y?s[1]:p.y+p.height,r[u++]=s[1],a[h++]=n;e.setLayout({largePoints:r,largeDataIndices:a,largeBackgroundPoints:o,barWidth:v,valueAxisStart:F_(0,d),backgroundStart:y?p.x:p.y,valueAxisHorizontal:y})}}}}};function z_(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function B_(t){return t.pipelineContext&&t.pipelineContext.large}function F_(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var V_,H_=(l(W_,V_=I_),W_.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return Uh(t.value,Fh[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Gh(this._minLevelUnit))]||Fh.second,e,this.getSetting("locale"))},W_.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=I({},zh);if(0<t.level)for(var s=0;s<Vh.length;++s)a[Vh[s]]="{primary|"+a[Vh[s]]+"}";var l=n?!1===n.inherit?n:A(n,a):a,u=Yh(t.value,r);if(l[u])o=l[u];else if(l.inherit){for(s=Hh.indexOf(u)-1;0<=s;--s)if(l[u]){o=l[u];break}o=o||a.none}N(o)&&(n=null==t.level?0:0<=t.level?t.level:o.length+t.level,o=o[n=Math.min(n,o.length-1)])}return Uh(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},W_.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});e=this.getSetting("useUTC"),e=function(t,d,f,g){var e=Hh,n=0;function i(t,e,n){var i=[],r=!e.length;if(!function(t,e,n,i){function r(t){return Xh(c,t,i)===Xh(p,t,i)}function o(){return r("year")}function a(){return o()&&r("month")}function s(){return a()&&r("day")}function l(){return s()&&r("hour")}function u(){return l()&&r("minute")}function h(){return u()&&r("second")}var c=sl(e),p=sl(n);switch(t){case"year":return o();case"month":return a();case"day":return s();case"hour":return l();case"minute":return u();case"second":return h();case"millisecond":return h()&&r("millisecond")}}(Gh(t),g[0],g[1],f)){r&&(e=[{value:function(t,e,n){t=new Date(t);switch(Gh(e)){case"year":case"month":t[tc(n)](0);case"day":t[ec(n)](1);case"hour":t[nc(n)](0);case"minute":t[ic(n)](0);case"second":t[rc(n)](0),t[oc(n)](0)}return t.getTime()}(new Date(g[0]),t,f)},{value:g[1]}]);for(var o,a,s=0;s<e.length-1;s++){var l=e[s].value,u=e[s+1].value;if(l!==u){var h=void 0,c=void 0,p=void 0;switch(t){case"year":h=Math.max(1,Math.round(d/Nh/365)),c=qh(f),p=f?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":a=d,h=6<(a/=30*Nh)?6:3<a?3:2<a?2:1,c=Zh(f),p=tc(f);break;case"week":case"half-week":case"day":o=d,h=16<(o/=Nh)?16:7.5<o?7:3.5<o?4:1.5<o?2:1,c=jh(f),p=ec(f),0;break;case"half-day":case"quarter-day":case"hour":o=d,h=12<(o/=Eh)?12:6<o?6:3.5<o?4:2<o?2:1,c=Kh(f),p=nc(f);break;case"minute":h=U_(d,!0),c=$h(f),p=ic(f);break;case"second":h=U_(d,!1),c=Qh(f),p=rc(f);break;case"millisecond":h=ul(d,!0),c=Jh(f),p=oc(f)}!function(t,e,n,i,r,o){for(var a=new Date(e),s=e,l=a[i]();s<n&&s<=g[1];)o.push({value:s}),l+=t,a[r](l),s=a.getTime();o.push({value:s,notAdd:!0})}(h,l,u,c,p,i),"year"===t&&1<n.length&&0===s&&n.unshift({value:n[0].value-h})}}for(s=0;s<i.length;s++)n.push(i[s]);return 1}}for(var r=[],o=[],a=0,s=0,l=0;l<e.length&&n++<1e4;++l){var u=Gh(e[l]);if(function(t){return t===Gh(t)}(e[l])){i(e[l],r[r.length-1]||[],o);var h=e[l+1]?Gh(e[l+1]):null;if(u!==h){if(o.length){s=a,o.sort(function(t,e){return t.value-e.value});for(var c=[],p=0;p<o.length;++p){var y=o[p].value;0!==p&&o[p-1].value===y||(c.push(o[p]),y>=g[0]&&y<=g[1]&&a++)}h=(g[1]-g[0])/d;if(1.5*h<a&&h/1.5<s)break;if(r.push(c),h<a||t===e[l])break}o=[]}}}0;for(var m=S(O(r,function(t){return S(t,function(t){return t.value>=g[0]&&t.value<=g[1]&&!t.notAdd})}),function(t){return 0<t.length}),v=[],_=m.length-1,l=0;l<m.length;++l)for(var x=m[l],b=0;b<x.length;++b)v.push({value:x[b].value,level:_-l});v.sort(function(t,e){return t.value-e.value});for(var w=[],l=0;l<v.length;++l)0!==l&&v[l].value===v[l-1].value||w.push(v[l]);return w}(this._minLevelUnit,this._approxInterval,e,n);return(i=i.concat(e)).push({value:n[1],level:0}),i},W_.prototype.niceExtent=function(t){var e,n=this._extent;n[0]===n[1]&&(n[0]-=Nh,n[1]+=Nh),n[1]===-1/0&&n[0]===1/0&&(e=new Date,n[1]=+new Date(e.getFullYear(),e.getMonth(),e.getDate()),n[0]=n[1]-Nh),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval)},W_.prototype.niceTicks=function(t,e,n){t=t||10;var i=this._extent,i=i[1]-i[0];this._approxInterval=i/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n);n=G_.length,n=Math.min(function(t,e,n,i){for(;n<i;){var r=n+i>>>1;t[r][1]<e?n=1+r:i=r}return n}(G_,this._approxInterval,0,n),n-1);this._interval=G_[n][1],this._minLevelUnit=G_[Math.max(n-1,0)][0]},W_.prototype.parse=function(t){return"number"==typeof t?t:+sl(t)},W_.prototype.contain=function(t){return x_(this.parse(t),this._extent)},W_.prototype.normalize=function(t){return b_(this.parse(t),this._extent)},W_.prototype.scale=function(t){return w_(t,this._extent)},W_.type="time",W_);function W_(t){t=V_.call(this,t)||this;return t.type="time",t}var G_=[["second",Oh],["minute",Rh],["hour",Eh],["quarter-day",6*Eh],["half-day",12*Eh],["day",1.2*Nh],["half-week",3.5*Nh],["week",7*Nh],["month",31*Nh],["quarter",95*Nh],["half-year",Sn/2],["year",Sn]];function U_(t,e){return 30<(t/=e?Rh:Oh)?30:20<t?20:15<t?15:10<t?10:5<t?5:2<t?2:1}f_.registerClass(H_);var Y_,X_=f_.prototype,q_=I_.prototype,Z_=il,j_=nl,K_=Math.floor,$_=Math.ceil,Q_=Math.pow,J_=Math.log,tx=(l(ex,Y_=f_),ex.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return O(q_.getTicks.call(this,t),function(t){var e=t.value,t=nl(Q_(this.base,e)),t=e===n[0]&&this._fixMin?nx(t,i[0]):t;return{value:t=e===n[1]&&this._fixMax?nx(t,i[1]):t}},this)},ex.prototype.setExtent=function(t,e){var n=this.base;t=J_(t)/J_(n),e=J_(e)/J_(n),q_.setExtent.call(this,t,e)},ex.prototype.getExtent=function(){var t=this.base,e=X_.getExtent.call(this);e[0]=Q_(t,e[0]),e[1]=Q_(t,e[1]);t=this._originalScale.getExtent();return this._fixMin&&(e[0]=nx(e[0],t[0])),this._fixMax&&(e[1]=nx(e[1],t[1])),e},ex.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=J_(t[0])/J_(e),t[1]=J_(t[1])/J_(e),X_.unionExtent.call(this,t)},ex.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},ex.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n==1/0||n<=0)){var i,r=(i=n,Math.pow(10,ll(i)));for(t/n*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&0<Math.abs(r);)r*=10;e=[nl($_(e[0]/r)*r),nl(K_(e[1]/r)*r)];this._interval=r,this._niceExtent=e}},ex.prototype.niceExtent=function(t){q_.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},ex.prototype.parse=function(t){return t},ex.prototype.contain=function(t){return x_(t=J_(t)/J_(this.base),this._extent)},ex.prototype.normalize=function(t){return b_(t=J_(t)/J_(this.base),this._extent)},ex.prototype.scale=function(t){return t=w_(t,this._extent),Q_(this.base,t)},ex.type="log",ex);function ex(){var t=null!==Y_&&Y_.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new I_,t._interval=0,t}vh=tx.prototype;function nx(t,e){return j_(t,Z_(e))}vh.getMinorTicks=q_.getMinorTicks,vh.getLabel=q_.getLabel,f_.registerClass(tx);var ix=(rx.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===t.type;this._needCrossZero=e.getNeedCrossZero&&e.getNeedCrossZero();var r=this._modelMinRaw=e.get("min",!0);C(r)?this._modelMinNum=lx(t,r({min:n[0],max:n[1]})):"dataMin"!==r&&(this._modelMinNum=lx(t,r));r=this._modelMaxRaw=e.get("max",!0);C(r)?this._modelMaxNum=lx(t,r({min:n[0],max:n[1]})):"dataMax"!==r&&(this._modelMaxNum=lx(t,r)),i?this._axisDataLen=e.getCategories().length:"boolean"==typeof(e=N(e=e.get("boundaryGap"))?e:[e||0,e||0])[0]||"boolean"==typeof e[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[bn(e[0],1),bn(e[1],1)]},rx.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,r=this._boundaryGapInner,o=t?null:n-e||Math.abs(e),a="dataMin"===this._modelMinRaw?e:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=t?i?0:NaN:e-r[0]*o),null==s&&(s=t?i?i-1:NaN:n+r[1]*o),null!=a&&isFinite(a)||(a=NaN),null!=s&&isFinite(s)||(s=NaN),s<a&&(s=a=NaN);o=U(a)||U(s)||t&&!i;this._needCrossZero&&(0<a&&0<s&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));t=this._determinedMin,i=this._determinedMax;return null!=t&&(a=t,l=!0),null!=i&&(s=i,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:o}},rx.prototype.modifyDataMinMax=function(t,e){this[ax[t]]=e},rx.prototype.setDeterminedMinMax=function(t,e){t=ox[t];this[t]=e},rx.prototype.freeze=function(){this.frozen=!0},rx);function rx(t,e,n){this._prepareParams(t,e,n)}var ox={min:"_determinedMin",max:"_determinedMax"},ax={min:"_dataMin",max:"_dataMax"};function sx(t,e,n){var i=t.rawExtentInfo;return i||(i=new ix(t,e,n),t.rawExtentInfo=i)}function lx(t,e){return null==e?null:U(e)?NaN:t.parse(e)}function ux(t,e){var n=t.type,i=sx(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r,o=i.min,a=i.max,t=e.ecModel;return t&&"time"===n&&(t=R_("bar",t),r=!1,E(t,function(t){r=r||t.getBaseAxis()===e.axis}),r&&(t=E_(t),o=(t=function(t,e,n,i){var r=n.axis.getExtent(),r=r[1]-r[0],i=N_(i,n.axis);if(void 0===i)return{min:t,max:e};var o=1/0;E(i,function(t){o=Math.min(t.offset,o)});var a=-1/0;E(i,function(t){a=Math.max(t.offset+t.width,a)}),o=Math.abs(o),a=Math.abs(a);n=o+a,i=e-t,i=i/(1-(o+a)/r)-i;return{min:t-=o/n*i,max:e+=a/n*i}}(o,a,e,t)).min,a=t.max)),{extent:[o,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function hx(t,e){var n=ux(t,e),i=n.extent,r=e.get("splitNumber");t instanceof tx&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});e=e.get("interval");null!=e&&t.setInterval&&t.setInterval(e)}function cx(r){var o,e,n,t=r.getLabelModel().get("formatter"),a="category"===r.type?r.scale.getExtent()[0]:null;return"time"===r.scale.type?(n=t,function(t,e){return r.scale.getFormattedLabel(t,e,n)}):"string"==typeof t?(e=t,function(t){t=r.scale.getLabel(t);return e.replace("{value}",null!=t?t:"")}):"function"==typeof t?(o=t,function(t,e){return null!=a&&(e=t.value-a),o((i=t,"category"===(n=r).type?n.scale.getLabel(i):i.value),e,null!=t.level?{level:t.level}:null);var n,i}):function(t){return r.scale.getLabel(t)}}function px(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent(),a=n instanceof M_?n.count():(i=n.getTicks()).length,s=t.getLabelModel(),l=cx(t),u=1;40<a&&(u=Math.ceil(a/40));for(var h,c,p=0;p<a;p+=u){var d=l(i?i[p]:{value:o[0]+p},p),f=s.getTextRect(d),g=(h=f,c=s.get("rotate")||0,g=f=d=g=void 0,g=c*Math.PI/180,d=h.width,f=h.height,c=d*Math.abs(Math.cos(g))+Math.abs(f*Math.sin(g)),g=d*Math.abs(Math.sin(g))+Math.abs(f*Math.cos(g)),new ln(h.x,h.y,c,g));r?r.union(g):r=g}return r}}function dx(t){t=t.get("interval");return null==t?"auto":t}function fx(t){return"category"===t.type&&0===dx(t.getLabelModel())}function gx(n,t){var i={};return E(n.mapDimensionsAll(t),function(t){var e;i[sv(e=n,t=t)?e.getCalculationInfo("stackResultDimension"):t]=!0}),R(i)}function yx(e,n,t){n&&E(gx(n,t),function(t){t=n.getApproximateExtent(t);t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])})}var mx=Math.PI,vx=(_x.prototype.hasBuilder=function(t){return!!xx[t]},_x.prototype.add=function(t){xx[t](this.opt,this.axisModel,this.group,this._transformGroup)},_x.prototype.getGroup=function(){return this.group},_x.innerTextLayout=function(t,e,n){var i,t=rl(e-t),n=ol(t)?(i=0<n?"top":"bottom","center"):ol(t-mx)?(i=0<n?"bottom":"top","center"):(i="middle",0<t&&t<mx?0<n?"right":"left":0<n?"left":"right");return{rotation:t,textAlign:n,textVerticalAlign:i}},_x.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},_x.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},_x);function _x(t,e){this.group=new fo,this.opt=e,this.axisModel=t,A(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});e=new fo({x:e.position[0],y:e.position[1],rotation:e.rotation});e.updateTransform(),this._transformGroup=e}var xx={axisLine:function(i,t,r,e){var o,a,s,l,u,n=t.get(["axisLine","show"]);"auto"===n&&i.handleAutoShown&&(n=i.handleAutoShown("axisLine")),n&&(n=t.axis.getExtent(),e=e.transform,o=[n[0],0],n=[n[1],0],e&&(gt(o,o,e),gt(n,n,e)),a=I({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),(e=new Bo({subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:n[0],y2:n[1]},style:a,strokeContainThreshold:i.strokeContainThreshold||5,silent:!0,z2:1})).anid="line",r.add(e),s=t.get(["axisLine","symbol"]),e=t.get(["axisLine","symbolSize"]),"number"==typeof(t=t.get(["axisLine","symbolOffset"])||0)&&(t=[t,t]),null!=s&&("string"==typeof s&&(s=[s,s]),"string"!=typeof e&&"number"!=typeof e||(e=[e,e]),l=e[0],u=e[1],E([{rotate:i.rotation+Math.PI/2,offset:t[0],r:0},{rotate:i.rotation-Math.PI/2,offset:t[1],r:Math.sqrt((o[0]-n[0])*(o[0]-n[0])+(o[1]-n[1])*(o[1]-n[1]))}],function(t,e){var n;"none"!==s[e]&&null!=s[e]&&(n=ey(s[e],-l/2,-u/2,l,u,a.stroke,!0),e=t.r+t.offset,n.attr({rotation:t.rotate,x:o[0]+e*Math.cos(i.rotation),y:o[1]-e*Math.sin(i.rotation),silent:!0,z2:11}),r.add(n))})))},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var a=o.getModel("lineStyle"),o=i.tickDirection*o.get("length"),s=Tx(r.getTicksCoords(),e.transform,o,A(a.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),l=0;l<s.length;l++)t.add(s[l]);return s}(n,i,e,t);!function(t,e,n){if(fx(t.axis))return;var i=t.get(["axisLabel","showMinLabel"]),r=t.get(["axisLabel","showMaxLabel"]);n=n||[];var o=(e=e||[])[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],t=n[1],e=n[n.length-1],n=n[n.length-2];!1===i?(bx(o),bx(u)):Sx(o,a)&&(i?(bx(a),bx(t)):(bx(o),bx(u)));!1===r?(bx(s),bx(e)):Sx(l,s)&&(r?(bx(l),bx(n)):(bx(s),bx(e)))}(e,function(s,l,u,h){var c=u.axis;if(!Y(h.axisLabelShow,u.get(["axisLabel","show"]))||c.scale.isBlank())return;var p=u.getModel("axisLabel"),d=p.get("margin"),t=c.getViewLabels(),e=(Y(h.labelRotate,p.get("rotate"))||0)*mx/180,f=vx.innerTextLayout(h.rotation,e,h.labelDirection),g=u.getCategories&&u.getCategories(!0),y=[],m=vx.isLabelSilent(u),v=u.get("triggerEvent");return E(t,function(t,e){var n="ordinal"===c.scale.type?c.scale.getRawIndex(t.tickValue):t.tickValue,i=t.formattedLabel,r=t.rawLabel,o=p;g&&g[n]&&(V(a=g[n])&&a.textStyle&&(o=new wh(a.textStyle,p,u.ecModel)));var t=o.getTextColor()||u.get(["axisLine","lineStyle","color"]),a=c.dataToCoord(n),t=new Ua({x:a,y:h.labelOffset+h.labelDirection*d,rotation:f.rotation,silent:m,z2:10,style:ih(o,{text:i,align:o.getShallow("align",!0)||f.textAlign,verticalAlign:o.getShallow("verticalAlign",!0)||o.getShallow("baseline",!0)||f.textVerticalAlign,fill:"function"==typeof t?t("category"===c.type?r:"value"===c.type?n+"":n,e):t})});t.anid="label_"+n,v&&((n=vx.makeAxisEventDataBase(u)).targetType="axisLabel",n.value=r,jl(t).eventData=n),l.add(t),t.updateTransform(),y.push(t),s.add(t),t.decomposeTransform()}),y}(n,i,e,t),r),function(t,e,n,i){var r=n.axis,o=n.getModel("minorTick");if(!o.get("show")||r.scale.isBlank())return;var a=r.getMinorTicksCoords();if(!a.length)return;for(var r=o.getModel("lineStyle"),s=i*o.get("length"),l=A(r.getLineStyle(),A(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),u=0;u<a.length;u++)for(var h=Tx(a[u],e.transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.add(h[c])}(n,i,e,t.tickDirection)},axisName:function(t,e,n,i){var r,o,a,s,l,u,h,c,p=Y(t.axisName,e.get("name"));p&&(u=e.get("nameLocation"),a=t.nameDirection,r=e.getModel("nameTextStyle"),s=e.get("nameGap")||0,o=(l=e.axis.getExtent())[0]>l[1]?-1:1,o=["start"===u?l[0]-o*s:"end"===u?l[1]+o*s:(l[0]+l[1])/2,Mx(u)?t.labelOffset+a*s:0],null!=(s=e.get("nameRotate"))&&(s=s*mx/180),Mx(u)?c=vx.innerTextLayout(t.rotation,null!=s?s:t.rotation,a):(c=function(t,e,n,i){var r,t=rl(n-t),i=i[0]>i[1],i="start"===e&&!i||"start"!==e&&i;i=ol(t-mx/2)?(r=i?"bottom":"top","center"):ol(t-1.5*mx)?(r=i?"top":"bottom","center"):(r="middle",t<1.5*mx&&mx/2<t?i?"left":"right":i?"right":"left");return{rotation:t,textAlign:i,textVerticalAlign:r}}(t.rotation,u,s||0,l),null!=(h=t.axisNameAvailableWidth)&&(h=Math.abs(h/Math.sin(c.rotation)),isFinite(h)||(h=null))),a=r.getFont(),s=(u=e.get("nameTruncate",!0)||{}).ellipsis,l=Y(t.nameTruncateMaxWidth,u.maxWidth,h),t=e.get("tooltip",!0),(h={componentType:u=e.mainType,name:p,$vars:["name"]})[u+"Index"]=e.componentIndex,(c=new Ua({x:o[0],y:o[1],rotation:c.rotation,silent:vx.isLabelSilent(e),style:ih(r,{text:p,font:a,overflow:"truncate",width:l,ellipsis:s,fill:r.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:r.get("align")||c.textAlign,verticalAlign:r.get("verticalAlign")||c.textVerticalAlign}),z2:1})).tooltip=t&&t.show?I({content:p,formatter:function(){return p},formatterParams:h},t):null,c.__fullText=p,c.anid="name",e.get("triggerEvent")&&((e=vx.makeAxisEventDataBase(e)).targetType="axisName",e.name=p,jl(c).eventData=e),i.add(c),c.updateTransform(),n.add(c),c.decomposeTransform())}};function bx(t){t&&(t.ignore=!0)}function Sx(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=Jt([]);return ie(r,r,-t.rotation),n.applyTransform(ee([],r,t.getLocalTransform())),i.applyTransform(ee([],r,e.getLocalTransform())),n.intersect(i)}}function Mx(t){return"middle"===t||"center"===t}function Tx(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;a[0]=u,s[a[1]=0]=u,s[1]=n,e&&(gt(a,a,e),gt(s,s,e));u=new Bo({subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});u.anid=r+"_"+t[l].tickValue,o.push(u)}return o}function Cx(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[(t=t).type+"||"+t.id]}var Dx,Ix={},Sn=(l(Ax,Dx=qd),Ax.prototype.render=function(t,e,n,i){var r,o,a,s,l,u;!this.axisPointerClass||(u=Cx(r=t))&&(s=u.axisPointerModel,l=u.axis.scale,o=s.option,a=s.get("status"),null!=(r=s.get("value"))&&(r=l.parse(r)),s=!!s.get(["handle","show"]),null==a&&(o.status=s?"show":"hide"),(l=l.getExtent().slice())[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r<l[0]&&(r=l[0]),o.value=r,s&&(o.status=u.axis.scale.isBlank()?"hide":"show")),Dx.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},Ax.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},Ax.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},Ax.prototype.dispose=function(t,e){this._disposeAxisPointer(e),Dx.prototype.dispose.apply(this,arguments)},Ax.prototype._doUpdateAxisPointerClass=function(t,e,n){var i,r=Ax.getAxisPointerClass(this.axisPointerClass);r&&((i=(i=Cx(i=t))&&i.axisPointerModel)?(this._axisPointer||(this._axisPointer=new r)).render(t,i,e,n):this._disposeAxisPointer(e))},Ax.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},Ax.registerAxisPointerClass=function(t,e){Ix[t]=e},Ax.getAxisPointerClass=function(t){return t&&Ix[t]},Ax.type="axis",Ax);function Ax(){var t=null!==Dx&&Dx.apply(this,arguments)||this;return t.type=Ax.type,t}function kx(t){return"cartesian2d"===t.get("coordinateSystem")}function Lx(i){var r={xAxisModel:null,yAxisModel:null};return E(r,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,Ll).models[0];r[e]=n}),r}var Px=Il();var Ox,Rx=["axisLine","axisTickLabel","axisName"],Ex=["splitArea","splitLine","minorSplitLine"],vh=(l(Nx,Ox=Sn),Nx.prototype.render=function(r,t,e,n){this.group.removeAll();var o,i,a,s,l,u=this._axisGroup;function h(t){var e={x:t.x,y:t.y,rotation:t.rotation};return null!=t.shape&&(e.shape=I({},t.shape)),e}this._axisGroup=new fo,this.group.add(this._axisGroup),r.get("show")&&(i=function(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,t=[(h=i.getRect()).x,h.x+h.width,h.y,h.y+h.height],r={left:0,right:1,top:0,bottom:1,onZero:2},i=e.get("offset")||0,h="x"===u?[t[2]-i,t[3]+i]:[t[0]-i,t[1]+i];return a&&(i=a.toGlobalCoord(a.dataToCoord(0)),h[r.onZero]=Math.max(Math.min(i,h[1]),h[0])),o.position=["y"===u?h[r[l]]:t[0],"x"===u?h[r[l]]:t[3]],o.rotation=Math.PI/2*("x"===u?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?h[r[s]]-h[r.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Y(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection),e=e.get(["axisLabel","rotate"]),o.labelRotate="top"===l?-e:e,o.z2=1,o}(o=r.getCoordSysModel(),r),i=new vx(r,I({handleAutoShown:function(t){for(var e=o.coordinateSystem.getCartesians(),n=0;n<e.length;n++){var i=e[n].getOtherAxis(r.axis).type;if("value"===i||"log"===i)return!0}return!1}},i)),E(Rx,i.add,i),this._axisGroup.add(i.getGroup()),E(Ex,function(t){r.get([t,"show"])&&Bx[t](this,this._axisGroup,r,o)},this),i=u,u=this._axisGroup,a=r,i&&u&&(l={},i.traverse(function(t){$u(t)&&t.anid&&(l[t.anid]=t)}),s=l,u.traverse(function(t){var e,n;$u(t)&&t.anid&&((e=s[t.anid])&&(n=h(t),t.attr(h(e)),Yu(t,n,a,jl(t).dataIndex)))})),Ox.prototype.render.call(this,r,t,e,n))},Nx.prototype.remove=function(){Px(this).splitAreaColors=null},Nx.type="cartesianAxis",Nx);function Nx(){var t=null!==Ox&&Ox.apply(this,arguments)||this;return t.type=Nx.type,t.axisPointerClass="CartesianAxisPointer",t}var zx,Bx={splitLine:function(t,e,n,i){var r=n.axis;if(!r.scale.isBlank())for(var o=n.getModel("splitLine"),n=o.getModel("lineStyle"),a=N(a=n.get("color"))?a:[a],s=i.coordinateSystem.getRect(),l=r.isHorizontal(),u=0,h=r.getTicksCoords({tickModel:o}),c=[],p=[],d=n.getLineStyle(),f=0;f<h.length;f++){var g=r.toGlobalCoord(h[f].coord);l?(c[0]=g,c[1]=s.y,p[0]=g,p[1]=s.y+s.height):(c[0]=s.x,c[1]=g,p[0]=s.x+s.width,p[1]=g);var y=u++%a.length,g=h[f].tickValue;e.add(new Bo({anid:null!=g?"line_"+h[f].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:p[0],y2:p[1]},style:A({stroke:a[y]},d),silent:!0}))}},minorSplitLine:function(t,e,n,i){var r=n.axis,n=n.getModel("minorSplitLine").getModel("lineStyle"),o=i.coordinateSystem.getRect(),a=r.isHorizontal(),s=r.getMinorTicksCoords();if(s.length)for(var l=[],u=[],h=n.getLineStyle(),c=0;c<s.length;c++)for(var p=0;p<s[c].length;p++){var d=r.toGlobalCoord(s[c][p].coord);a?(l[0]=d,l[1]=o.y,u[0]=d,u[1]=o.y+o.height):(l[0]=o.x,l[1]=d,u[0]=o.x+o.width,u[1]=d),e.add(new Bo({anid:"minor_line_"+s[c][p].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},splitArea:function(t,e,n,i){!function(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var o=n.getModel("splitArea"),n=o.getModel("areaStyle"),a=n.get("color"),s=i.coordinateSystem.getRect(),l=r.getTicksCoords({tickModel:o,clamp:!0});if(l.length){var u=a.length,h=Px(t).splitAreaColors,c=it(),p=0;if(h)for(var d=0;d<l.length;d++){var f=h.get(l[d].tickValue);if(null!=f){p=(f+(u-1)*d)%u;break}}for(var g=r.toGlobalCoord(l[0].coord),y=n.getAreaStyle(),a=N(a)?a:[a],d=1;d<l.length;d++){var m=r.toGlobalCoord(l[d].coord),v=void 0,_=void 0,x=void 0,b=void 0,g=r.isHorizontal()?(v=g,_=s.y,x=m-v,b=s.height,v+x):(v=s.x,_=g,x=s.width,_+(b=m-_)),m=l[d-1].tickValue;null!=m&&c.set(m,p),e.add(new ko({anid:null!=m?"area_"+m:null,shape:{x:v,y:_,width:x,height:b},style:A({fill:a[p]},y),autoBatch:!0,silent:!0})),p=(p+1)%u}Px(t).splitAreaColors=c}}}(t,e,n,i)}},Fx=(l(Vx,zx=vh),Vx.type="xAxis",Vx);function Vx(){var t=null!==zx&&zx.apply(this,arguments)||this;return t.type=Vx.type,t}var Hx,Sn=(l(Wx,Hx=vh),Wx.type="yAxis",Wx);function Wx(){var t=null!==Hx&&Hx.apply(this,arguments)||this;return t.type=Fx.type,t}function Gx(t,e){return t.get(e.uid)||t.set(e.uid,{condExtent:Ux()})}function Ux(){return[1/0,-1/0]}function Yx(t,e){e<t[0]&&(t[0]=e),e>t[1]&&(t[1]=e)}qd.registerClass(Fx),qd.registerClass(Sn),ym(ql.PROCESSOR.FILTER+10,{getTargetSeries:function(t){var e=it();return t.eachSeries(function(t){kx(t)&&e.set(t.uid,t)}),e},overallReset:function(t,e){var l,u,C,n=[],i=it();l=i,u=n,t.eachSeries(function(t){var e,n,i,r,o,a,s;kx(t)&&(e=(s=Lx(t)).xAxisModel,n=s.yAxisModel,i=e.axis,r=n.axis,o=i.scale.rawExtentInfo,a=r.scale.rawExtentInfo,s=t.getData(),o&&o.frozen||a&&a.frozen||(u.push({seriesModel:t,xAxisModel:e,yAxisModel:n}),yx(Gx(l,e).condExtent,s,i.dim),yx(Gx(l,n).condExtent,s,r.dim)))}),C=i,E(n,function(t){var e=t.xAxisModel,n=t.yAxisModel,i=e.axis,r=n.axis,o=Gx(C,e),a=Gx(C,n);o.rawExtentInfo=sx(i.scale,e,o.condExtent),a.rawExtentInfo=sx(r.scale,n,a.condExtent),o.rawExtentResult=o.rawExtentInfo.calculate(),a.rawExtentResult=a.rawExtentInfo.calculate();var s,l,u=t.seriesModel.getData(),h={},c={};function p(e,t){var n=t.condExtent,t=t.rawExtentResult;"category"===e.type&&(n[0]<t.min||t.max<n[1])&&E(gx(u,e.dim),function(t){ot(h,t)||(h[t]=!0,s=e)})}function d(t,e){var n=e.rawExtentResult;"category"===t.type||n.minFixed&&n.maxFixed||E(gx(u,t.dim),function(t){ot(h,t)||ot(c,t)||(c[t]=!0,l=e)})}p(i,o),p(r,a),d(i,o),d(r,a);var f=R(h),g=R(c),y=O(g,Ux),m=f.length,v=g.length;if(m&&v){var _=1===m?f[0]:null,x=1===v?g[0]:null,b=u.count();if(_&&x)for(var w=0;w<b;w++){var S=u.get(_,w);s.scale.isInExtentRange(S)&&Yx(y[0],u.get(x,w))}else for(w=0;w<b;w++)for(var M=0;M<m;M++){S=u.get(f[M],w);if(s.scale.isInExtentRange(S)){for(var T=0;T<v;T++)Yx(y[T],u.get(g[T],w));break}}E(y,function(t,e){e=g[e];u.setApproximateExtent(t,e);e=l.tarExtent=l.tarExtent||Ux();Yx(e,t[0]),Yx(e,t[1])})}}),i.each(function(t){var e,n=t.tarExtent;n&&(e=t.rawExtentResult,t=t.rawExtentInfo,!e.minFixed&&n[0]>e.min&&t.modifyDataMinMax("min",n[0]),!e.maxFixed&&n[1]<e.max&&t.modifyDataMinMax("max",n[1]))})}});var Xx,vh=(l(qx,Xx=Tc),qx.type="grid",qx.dependencies=["xAxis","yAxis"],qx.layoutMode="box",qx.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},qx);function qx(){return null!==Xx&&Xx.apply(this,arguments)||this}var Zx,jx,Sn=(l(Kx,Zx=qd),Kx.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new ko({shape:t.coordinateSystem.getRect(),style:A({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},Kx.type="grid",Kx);function Kx(){var t=null!==Zx&&Zx.apply(this,arguments)||this;return t.type="grid",t}qd.registerClass(Sn),Tc.registerClass(vh),gm(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),vm((jx=!0,{seriesType:"line",plan:jd(),reset:function(t){var e=t.getData(),h=t.coordinateSystem,n=t.pipelineContext,c=jx||n.large;if(h){var t=O(h.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),p=t.length,n=e.getCalculationInfo("stackResultDimension");sv(e,t[0])&&(t[0]=n),sv(e,t[1])&&(t[1]=n);var n=e.getDimensionInfo(t[0]),t=e.getDimensionInfo(t[1]),d=n&&n.index,f=t&&t.index;return p&&{progress:function(t,e){for(var n=t.end-t.start,i=c&&Cv(n*p),r=[],o=[],a=t.start,s=0;a<t.end;a++){var l,u=void 0;u=1===p?(l=e.getByDimIdx(d,a),h.dataToPoint(l,null,o)):(r[0]=e.getByDimIdx(d,a),r[1]=e.getByDimIdx(f,a),h.dataToPoint(r,null,o)),c?(i[s++]=u[0],i[s++]=u[1]):e.setItemLayout(a,u.slice())}c&&e.setLayout("points",i)}}}}})),ym(ql.PROCESSOR.STATISTIC,i_("line"));$x.prototype.getAxis=function(t){return this._axes[t]},$x.prototype.getAxes=function(){return O(this._dimList,function(t){return this._axes[t]},this)},$x.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),S(this.getAxes(),function(t){return t.scale.type===e})},$x.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},vh=$x;function $x(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}var Qx=["x","y"];function Jx(t){return"interval"===t.type||"time"===t.type}var tb,eb=(l(nb,tb=vh),nb.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t,e,n,i,r=this.getAxis("x").scale,o=this.getAxis("y").scale;Jx(r)&&Jx(o)&&(n=r.getExtent(),i=o.getExtent(),t=this.dataToPoint([n[0],i[0]]),e=this.dataToPoint([n[1],i[1]]),r=n[1]-n[0],o=i[1]-i[0],r&&o&&(r=(e[0]-t[0])/r,o=(e[1]-t[1])/o,n=t[0]-n[0]*r,i=t[1]-i[0]*o,i=this._transform=[r,0,0,o,n,i],this._invTransform=re([],i)))},nb.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},nb.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]))},nb.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},nb.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return gt(n,t,this._transform);var o=this.getAxis("x"),t=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i)),n[1]=t.toGlobalCoord(t.dataToCoord(r)),n},nb.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),n=n.parse(t[0]),t=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),n),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),t),Math.max(o[0],o[1])),e},nb.prototype.pointToData=function(t,e){if(e=e||[],this._invTransform)return gt(e,t,this._invTransform);var n=this.getAxis("x"),i=this.getAxis("y");return e[0]=n.coordToData(n.toLocalCoord(t[0])),e[1]=i.coordToData(i.toLocalCoord(t[1])),e},nb.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},nb.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),t=Math.max(t[0],t[1])-n,e=Math.max(e[0],e[1])-i;return new ln(n,i,t,e)},nb);function nb(){var t=null!==tb&&tb.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=Qx,t}var ib=Il();function rb(t){return"category"===t.type?(r=(e=t).getLabelModel(),o=ab(e,r),!r.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:o.labelCategoryInterval}:o):(t=(n=t).scale.getTicks(),i=cx(n),{labels:O(t,function(t,e){return{formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t.value}})});var n,i,e,r,o}function ob(t,e){return"category"===t.type?function(t,e){var n,i,r=sb(t,"ticks"),o=dx(e),a=lb(r,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);{n=C(o)?cb(t,o,!0):"auto"===o?(e=ab(t,t.getLabelModel()),i=e.labelCategoryInterval,O(e.labels,function(t){return t.tickValue})):hb(t,i=o,!0)}return ub(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:O(t.scale.getTicks(),function(t){return t.value})}}function ab(t,e){var n,i=sb(t,"labels"),r=dx(e),e=lb(i,r);return e||ub(i,r,{labels:C(r)?cb(t,r):hb(t,n="auto"===r?null!=(t=ib(n=t).autoInterval)?t:ib(n).autoInterval=n.calculateCategoryInterval():r),labelCategoryInterval:n})}function sb(t,e){return ib(t)[e]||(ib(t)[e]=[])}function lb(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function ub(t,e,n){return t.push({key:e,value:n}),n}function hb(t,e,n){var i=cx(t),r=t.scale,o=r.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=o[0],e=r.count();0!==u&&1<l&&2<e/l&&(u=Math.round(Math.ceil(u/l)*l));e=fx(t),t=a.get("showMinLabel")||e,e=a.get("showMaxLabel")||e;t&&u!==o[0]&&c(o[0]);for(var h=u;h<=o[1];h+=l)c(h);function c(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return e&&h-l!==o[1]&&c(o[1]),s}function cb(t,i,r){var o=t.scale,a=cx(t),s=[];return E(o.getTicks(),function(t){var e=o.getLabel(t),n=t.value;i(t.value,e)&&s.push(r?n:{formattedLabel:a(t),rawLabel:e,tickValue:n})}),s}var pb=[0,1],vh=(db.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),e=Math.max(e[0],e[1]);return n<=t&&t<=e},db.prototype.containData=function(t){return this.scale.contain(t)},db.prototype.getExtent=function(){return this._extent.slice()},db.prototype.getPixelPrecision=function(t){return e=t||this.scale.getExtent(),n=this._extent,i=Math.log,t=Math.LN10,e=Math.floor(i(e[1]-e[0])/t),t=Math.round(i(Math.abs(n[1]-n[0]))/t),t=Math.min(Math.max(-e+t,0),20),isFinite(t)?t:20;var e,n,i},db.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},db.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&fb(n=n.slice(),i.count()),tl(t,pb,n,e)},db.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&fb(n=n.slice(),i.count());e=tl(t,n,pb,e);return this.scale.scale(e)},db.prototype.pointToData=function(t,e){},db.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=O(ob(this,e).ticks,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawIndex(t):t),tickValue:t}},this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a=t.getExtent();{var s;1===r?(e[0].coord=a[0],o=e[1]={coord:a[0]}):(n=e[r-1].tickValue-e[0].tickValue,s=(e[r-1].coord-e[0].coord)/n,E(e,function(t){t.coord-=s/2}),t=t.scale.getExtent(),t=1+t[1]-e[r-1].tickValue,o={coord:e[r-1].coord+s*t},e.push(o))}var l=a[0]>a[1];u(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift());i&&u(a[0],e[0].coord)&&e.unshift({coord:a[0]});u(a[1],o.coord)&&(i?o.coord=a[1]:e.pop());i&&u(o.coord,a[1])&&e.push({coord:a[1]});function u(t,e){return t=nl(t),e=nl(e),l?e<t:t<e}}(this,n,e.get("alignWithLabel"),t.clamp),n},db.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),O(this.scale.getMinorTicks(t),function(t){return O(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},db.prototype.getViewLabels=function(){return rb(this).labels},db.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},db.prototype.getTickModel=function(){return this.model.getModel("axisTick")},db.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),e=e[1]-e[0]+(this.onBand?1:0);0===e&&(e=1);t=Math.abs(t[1]-t[0]);return Math.abs(t)/e},db.prototype.calculateCategoryInterval=function(){return function(t){var e=(u=(l=t).getLabelModel(),{axisRotate:l.getRotate?l.getRotate():l.isHorizontal&&!l.isHorizontal()?90:0,labelRotate:u.get("rotate")||0,font:u.getFont()}),n=cx(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=(h=t.scale).getExtent(),o=h.count();if(r[1]-r[0]<1)return 0;var a=1;40<o&&(a=Math.max(1,Math.floor(o/40)));for(var s=r[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l*Math.cos(i)),h=Math.abs(l*Math.sin(i)),c=0,p=0;s<=r[1];s+=a)var d=mn(n({value:s}),e.font,"center","top"),f=1.3*d.width,d=1.3*d.height,c=Math.max(c,f,7),p=Math.max(p,d,7);return l=c/u,i=p/h,isNaN(l)&&(l=1/0),isNaN(i)&&(i=1/0),u=Math.max(0,Math.floor(Math.min(l,i))),h=ib(t.model),l=t.getExtent(),i=h.lastAutoInterval,t=h.lastTickCount,null!=i&&null!=t&&Math.abs(i-u)<=1&&Math.abs(t-o)<=1&&u<i&&h.axisExtent0===l[0]&&h.axisExtent1===l[1]?u=i:(h.lastTickCount=o,h.lastAutoInterval=u,h.axisExtent0=l[0],h.axisExtent1=l[1]),u}(this)},db);function db(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}function fb(t,e){e=(t[1]-t[0])/e/2;t[0]+=e,t[1]-=e}var gb,yb=(l(mb,gb=vh),mb.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},mb.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},mb.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},mb.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setCategorySortInfo(t)},mb);function mb(t,e,n,i,r){n=gb.call(this,t,e,n)||this;return n.index=0,n.type=i||"value",n.position=r||"bottom",n}vb.prototype.getRect=function(){return this._rect},vb.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),E(n.x,function(t){hx(t.scale,t.model)}),E(n.y,function(t){hx(t.scale,t.model)});var i={};E(n.x,function(t){xb(n,"y",t,i)}),E(n.y,function(t){xb(n,"x",t,i)}),this.resize(this.model,e)},vb.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),t=!n&&t.get("containLabel"),a=yc(i,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var r=this._axesList;function o(){E(r,function(t){var e,n,i=t.isHorizontal(),r=i?[0,a.width]:[0,a.height],o=t.inverse?1:0;t.setExtent(r[o],r[1-o]),t=t,e=i?a.x:a.y,i=t.getExtent(),n=i[0]+i[1],t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}})}o(),t&&(E(r,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=px(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]),a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i))}),o()),E(this._coordsList,function(t){t.calcAffineTransform()})},vb.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},vb.prototype.getAxes=function(){return this._axesList.slice()},vb.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}V(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===t||r[i].getAxis("y").index===e)return r[i]},vb.prototype.getCartesians=function(){return this._coordsList.slice()},vb.prototype.convertToPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.dataToPoint(n):e.axis?e.axis.toGlobalCoord(e.axis.dataToCoord(n)):null},vb.prototype.convertFromPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.pointToData(n):e.axis?e.axis.coordToData(e.axis.toLocalCoord(n)):null},vb.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,r=t.xAxisModel||i&&i.getReferringComponents("xAxis",Ll).models[0],o=t.yAxisModel||i&&i.getReferringComponents("yAxis",Ll).models[0],a=t.gridModel,t=this._coordsList;return i?L(t,e=i.coordinateSystem)<0&&(e=null):r&&o?e=this.getCartesian(r.componentIndex,o.componentIndex):r?n=this.getAxis("x",r.componentIndex):o?n=this.getAxis("y",o.componentIndex):a&&a.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},vb.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},vb.prototype._initCartesian=function(o,t,e){var a=this,s=this,l={left:!1,right:!1,top:!1,bottom:!1},u={x:{},y:{}},h={x:0,y:0};if(t.eachComponent("xAxis",n("x"),this),t.eachComponent("yAxis",n("y"),this),!h.x||!h.y)return this._axesMap={},void(this._axesList=[]);function n(r){return function(t,e){var n,i;_b(t,o)&&(i=t.get("position"),"x"===r?"top"!==i&&"bottom"!==i&&(i=l.bottom?"top":"bottom"):"left"!==i&&"right"!==i&&(i=l.left?"right":"left"),l[i]=!0,i="category"===(n=new yb(r,function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new M_({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new H_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(f_.getClass(e)||I_)}}(t),[0,0],t.get("type"),i)).type,n.onBand=i&&t.get("boundaryGap"),n.inverse=t.get("inverse"),(t.axis=n).model=t,n.grid=s,n.index=e,s._axesList.push(n),u[r][e]=n,h[r]++)}}E((this._axesMap=u).x,function(i,r){E(u.y,function(t,e){var n="x"+r+"y"+e,e=new eb(n);e.master=a,e.model=o,a._coordsMap[n]=e,a._coordsList.push(e),e.addAxis(i),e.addAxis(t)})})},vb.prototype._updateScale=function(t,i){function r(e,n){E(gx(e,n.dim),function(t){n.scale.unionExtentFromData(e,t)})}E(this._axesList,function(t){var e;t.scale.setExtent(1/0,-1/0),"category"===t.type&&(e=t.model.get("categorySortInfo"),t.scale.setCategorySortInfo(e))}),t.eachSeries(function(t){var e,n;kx(t)&&(n=(e=Lx(t)).xAxisModel,e=e.yAxisModel,_b(n,i)&&_b(e,i)&&(n=this.getCartesian(n.componentIndex,e.componentIndex),e=t.getData(),t=n.getAxis("x"),n=n.getAxis("y"),"list"===e.type&&(r(e,t),r(e,n))))},this)},vb.prototype.getTooltipAxes=function(n){var i=[],r=[];return E(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),t=t.getOtherAxis(e);L(i,e)<0&&i.push(e),L(r,t)<0&&r.push(t)}),{baseAxes:i,otherAxes:r}},vb.create=function(i,r){var o=[];return i.eachComponent("grid",function(t,e){var n=new vb(t,i,r);n.name="grid_"+e,n.resize(t,r,!0),t.coordinateSystem=n,o.push(n)}),i.eachSeries(function(t){var e,n,i;kx(t)&&(e=(i=Lx(t)).xAxisModel,n=i.yAxisModel,i=e.getCoordSysModel().coordinateSystem,t.coordinateSystem=i.getCartesian(e.componentIndex,n.componentIndex))}),o},vb.dimensions=Qx,vh=vb;function vb(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Qx,this._initCartesian(t,e,n),this.model=t}function _b(t,e){return t.getCoordSysModel()===e}function xb(t,e,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,o=t[e],e=n.model,n=e.get(["axisLine","onZero"]),e=e.get(["axisLine","onZeroAxisIndex"]);if(n){if(null!=e)bb(o[e])&&(r=o[e]);else for(var a in o)if(o.hasOwnProperty(a)&&bb(o[a])&&!i[s(o[a])]){r=o[a];break}r&&(i[s(r)]=!0)}function s(t){return t.dim+"_"+t.index}}function bb(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=(t=(e=t).scale.getExtent())[0],t=t[1],!(0<e&&0<t||e<0&&t<0));var e}dp.register("cartesian2d",vh);var wb,Sb=(l(Mb,wb=Bd),Mb.prototype.getInitialData=function(t,e){return lv(this.getSource(),this,{useEncodeDefaulter:!0})},Mb.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),t=i.getLayout("offset"),i=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=t+i/2,n}return[NaN,NaN]},Mb.type="series.__base_bar__",Mb.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},Mb);function Mb(){var t=null!==wb&&wb.apply(this,arguments)||this;return t.type=Mb.type,t}Bd.registerClass(Sb);var Tb,Cb,vh=(l(Db,Tb=Sb),Db.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},Db.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t},Db.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},Db.type="series.bar",Db.dependencies=["grid","polar"],Db.defaultOption=(Cb={clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1},_(_({},Sb.defaultOption,!0),Cb,!0)),Db);function Db(){var t=null!==Tb&&Tb.apply(this,arguments)||this;return t.type=Db.type,t}Bd.registerClass(vh);var Ib,Ab=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},kb=(l(Lb,Ib=Xr),Lb.prototype.getDefaultShape=function(){return new Ab},Lb.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),p=Math.sin(l),d=Math.cos(u),e=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+n,p*r+i),t.arc(c*s+n,p*s+i,a,-Math.PI+l,l,!h)),t.arc(n,i,o,l,u,!h),t.moveTo(d*o+n,e*o+i),t.arc(d*s+n,e*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveTo(c*r+n,e*r+i)),t.closePath()},Lb);function Lb(t){t=Ib.call(this,t)||this;return t.type="sausage",t}var Pb=["itemStyle","borderWidth"],Ob=["itemStyle","borderRadius"],Rb=[0,0],Eb=Math.max,Nb=Math.min;var zb,vh=(l(Bb,zb=Qd),Bb.prototype.render=function(t,e,n,i){this._model=t,this.removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");"cartesian2d"!==r&&"polar"!==r||(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},Bb.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},Bb.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},Bb.prototype._updateDrawMode=function(t){t=t.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},Bb.prototype._renderNormal=function(a,t,e,n){var s,i=this,l=this.group,u=a.getData(),h=this._data,c=a.coordinateSystem,p=c.getBaseAxis();"cartesian2d"===c.type?s=p.isHorizontal():"polar"===c.type&&(s="angle"===p.dim);var d=a.isAnimationEnabled()?a:null,f=p.model,g=a.get("realtimeSort");if(g&&u.count()){if(this._isFirstFrame)return this._initSort(u,s,p,e),void(this._isFirstFrame=!1);this._onRendered=function(){i._updateSort(u,function(t){t=u.getItemGraphicEl(t);if(t){t=t.shape;return(s?t.y+t.height:t.x+t.width)||0}return 0},p,e)},e.getZr().on("rendered",this._onRendered)}var r,o,y,m=a.get("clip",!0)||g,v=(o=u,y=(r=c).getArea&&r.getArea(),Gv(r,"cartesian2d")&&("category"===(r=r.getBaseAxis()).type&&r.onBand||(o=o.getLayout("bandWidth"),r.isHorizontal()?(y.x-=o,y.width+=2*o):(y.y-=o,y.height+=2*o))),y);l.removeClipPath();var _=a.get("roundCap",!0),x=a.get("showBackground",!0),b=a.getModel("backgroundStyle"),w=b.get("borderRadius")||0,S=[],M=this._backgroundEls,T=n&&n.isInitSort,C=n&&"changeAxisOrder"===n.type;function D(t){var e,n,i=Wb[c.type](u,t),i=(e=s,n=i,new("polar"===(i=c).type?_a:ko)({shape:Kb(e,n,i),silent:!0,z2:0}));return i.useStyle(b.getItemStyle()),"cartesian2d"===c.type&&i.setShape("r",w),S[t]=i}u.diff(h).add(function(t){var e,n,i=u.getItemModel(t),r=Wb[c.type](u,t,i);x&&D(t),u.hasValue(t)&&(e=!1,m&&(e=Fb[c.type](v,r)),Gb(n=Vb[c.type](a,u,t,r,s,d,p.model,!1,_),u,t,i,r,a,s,"polar"===c.type),T?n.attr({shape:r}):g?Hb(a,f,d,n,r,t,s,!1,!1):Xu(n,{shape:r},a,t),u.setItemGraphicEl(t,n),l.add(n),n.ignore=e)}).update(function(t,e){var n,i=u.getItemModel(t),r=Wb[c.type](u,t,i);x&&(n=void 0,0===M.length?n=D(e):((n=M[e]).useStyle(b.getItemStyle()),"cartesian2d"===c.type&&n.setShape("r",w),S[t]=n),o=Wb[c.type](u,t),Yu(n,{shape:Kb(s,o,c)},d,t));var o=h.getItemGraphicEl(e);if(!u.hasValue(t))return l.remove(o),void(o=null);e=!1;m&&(e=Fb[c.type](v,r))&&l.remove(o),o=o||Vb[c.type](a,u,t,r,s,d,p.model,!!o,_),C||Gb(o,u,t,i,r,a,s,"polar"===c.type),T?o.attr({shape:r}):g?Hb(a,f,d,o,r,t,s,!0,C):Yu(o,{shape:r},a,t,null),u.setItemGraphicEl(t,o),o.ignore=e,l.add(o)}).remove(function(t){var e=h.getItemGraphicEl(t);e&&ju(e,a,t)}).execute();var I=this._backgroundGroup||(this._backgroundGroup=new fo);I.removeAll();for(var A=0;A<S.length;++A)I.add(S[A]);l.add(I),this._backgroundEls=S,this._data=u},Bb.prototype._renderLarge=function(t,e,n){this._clear(),Zb(t,this.group),this._updateLargeClip(t)},Bb.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),Zb(e,this.group,!0)},Bb.prototype._updateLargeClip=function(t){var e,n,i,r,r=t.get("clip",!0)?(e=t.coordinateSystem,n=!1,t=t,e?"polar"===e.type?Wv(e,n,t):"cartesian2d"===e.type?Hv(e,n,t,i,r):null:null):null;r?this.group.setClipPath(r):this.group.removeClipPath()},Bb.prototype._dataSort=function(t,e){var n=[];t.each(function(t){n.push({mappedValue:e(t),ordinalNumber:t,beforeSortIndex:null})}),n.sort(function(t,e){return e.mappedValue-t.mappedValue});for(var i=0;i<n.length;++i)n[n[i].ordinalNumber].beforeSortIndex=i;return O(n,function(t){return{ordinalNumber:t.ordinalNumber,beforeSortIndex:t.beforeSortIndex}})},Bb.prototype._isDataOrderChanged=function(t,e,n){if((n?n.length:0)!==t.count())return!0;for(var i=Number.MAX_VALUE,r=0;r<n.length;++r){var o=e(n[r].ordinalNumber);if(i<o)return!0;i=o}return!1},Bb.prototype._updateSort=function(t,e,n,i){var r=n.scale.getCategorySortInfo();if(this._isDataOrderChanged(t,e,r))for(var o=this._dataSort(t,e),a=n.scale.getExtent(),s=a[0];s<a[1];++s)if(!r[s]||r[s].ordinalNumber!==o[s].ordinalNumber){this.removeOnRenderedListener(i);var l={type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o};i.dispatchAction(l);break}},Bb.prototype._initSort=function(e,n,t,i){t={type:"changeAxisOrder",componentType:t.dim+"Axis",isInitSort:!0,axisId:t.index,sortInfo:this._dataSort(e,function(t){return parseFloat(e.get(n?"y":"x",t))||0})};i.dispatchAction(t)},Bb.prototype.remove=function(t,e){this._clear(this._model),this.removeOnRenderedListener(e)},Bb.prototype.dispose=function(t,e){this.removeOnRenderedListener(e)},Bb.prototype.removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},Bb.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){ju(t,e,jl(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},Bb.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},Bb.type="bar",Bb);function Bb(){var t=zb.call(this)||this;return t.type=Bb.type,t._isFirstFrame=!0,t}var Fb={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=Eb(e.x,t.x),o=Nb(e.x+e.width,t.x+t.width),a=Eb(e.y,t.y),t=Nb(e.y+e.height,t.y+t.height);e.x=r,e.y=a,e.width=o-r,e.height=t-a;a=e.width<0||e.height<0;return n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),a},polar:function(t,e){var n=e.r0<=e.r?1:-1;n<0&&(i=e.r,e.r=e.r0,e.r0=i);var i,r=Nb(e.r,t.r),t=Eb(e.r0,t.r0),t=(e.r=r)-(e.r0=t)<0;return n<0&&(i=e.r,e.r=e.r0,e.r0=i),t}},Vb={cartesian2d:function(t,e,n,i,r,o,a,s,l){i=new ko({shape:I({},i),z2:1});return i.__dataIndex=n,i.name="item",o&&(i.shape[r?"height":"width"]=0),i},polar:function(t,e,n,i,r,o,a,s,l){var u=i.startAngle<i.endAngle,h=new(!r&&l?kb:_a)({shape:A({clockwise:u},i),z2:1});return h.name="item",o&&(l=r?"r":"endAngle",u={},h.shape[l]=r?0:i.startAngle,u[l]=i[l],(s?Yu:Xu)(h,{shape:u},o)),h}};function Hb(t,e,n,i,r,o,a,s,l){var u;(n||e)&&(n=u=void 0,u=a?(n={x:r.x,width:r.width},{y:r.y,height:r.height}):(n={y:r.y,height:r.height},{x:r.x,width:r.width}),l||(s?Yu:Xu)(i,{shape:u},t,o,null),(s?Yu:Xu)(i,{shape:n},e,o))}var Wb={cartesian2d:function(t,e,n){var i,e=t.getItemLayout(e),i=n?(o=e,i=(r=n).get(Pb)||0,r=isNaN(o.width)?Number.MAX_VALUE:Math.abs(o.width),o=isNaN(o.height)?Number.MAX_VALUE:Math.abs(o.height),Math.min(i,r,o)):0,r=0<e.width?1:-1,o=0<e.height?1:-1;return{x:e.x+r*i/2,y:e.y+o*i/2,width:e.width-r*i,height:e.height-o*i}},polar:function(t,e,n){e=t.getItemLayout(e);return{cx:e.cx,cy:e.cy,r0:e.r0,r:e.r,startAngle:e.startAngle,endAngle:e.endAngle}}};function Gb(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(Ob)||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u),s||(a=a?0<r.height?"bottom":"top":0<r.width?"left":"right",eh(t,h=nh(i),{labelFetcher:o,labelDataIndex:n,defaultText:cv(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:a}),a=t.getTextContent(),a=a,h=h,o=o.getRawValue(n),n=function(t){return pv(e,t)},a&&((a=uh(a)).prevValue=a.value,a.value=o,o=h.normal,a.valueAnimation=o.get("valueAnimation"),a.valueAnimation&&(a.precision=o.get("precision"),a.defaultInterpolatedText=n,a.statesModels=h)));var h=i.getModel(["emphasis"]);Eu(t,h.get("focus"),h.get("blurScope")),Bu(t,i),null!=(r=r).startAngle&&null!=r.endAngle&&r.startAngle===r.endAngle&&(t.style.fill="none",t.style.stroke="none",E(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var Ub,Yb=function(){},Xb=(l(qb,Ub=Xr),qb.prototype.getDefaultShape=function(){return new Yb},qb.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o<n.length;o+=2)i[r]=n[o+r],t.moveTo(i[0],i[1]),t.lineTo(n[o],n[o+1])},qb);function qb(t){t=Ub.call(this,t)||this;return t.type="largeBar",t}function Zb(t,e,n){var i=t.getData(),r=[],o=i.getLayout("valueAxisHorizontal")?1:0;r[1-o]=i.getLayout("valueAxisStart");var a,s,l,u,h=i.getLayout("largeDataIndices"),c=i.getLayout("barWidth"),p=t.getModel("backgroundStyle");t.get("showBackground",!0)&&(u=i.getLayout("largeBackgroundPoints"),(l=[])[1-o]=i.getLayout("backgroundStart"),(a=new Xb({shape:{points:u},incremental:!!n,silent:!0,z2:0})).__startPoint=l,a.__baseDimIdx=o,a.__largeDataIndices=h,a.__barWidth=c,s=a,u=i,p=(l=p).get("borderColor")||l.get("color"),l=l.getItemStyle(),s.useStyle(l),s.style.fill=null,s.style.stroke=p,s.style.lineWidth=u.getLayout("barWidth"),e.add(a));n=new Xb({shape:{points:i.getLayout("largePoints")},incremental:!!n});n.__startPoint=r,n.__baseDimIdx=o,n.__largeDataIndices=h,n.__barWidth=c,e.add(n),c=n,i=(e=i).getVisual("style"),c.useStyle(I({},i)),c.style.fill=null,c.style.stroke=i.fill,c.style.lineWidth=e.getLayout("barWidth"),jl(n).seriesIndex=t.seriesIndex,t.get("silent")||(n.on("mousedown",jb),n.on("mousemove",jb))}var jb=af(function(t){t=function(t,e,n){var i=t.__baseDimIdx,r=1-i,o=t.shape.points,a=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[r];Rb[0]=e,Rb[1]=n;for(var n=Rb[i],u=Rb[1-i],h=n-s,c=n+s,p=0,d=o.length/2;p<d;p++){var f=2*p,g=o[f+i],f=o[f+r];if(h<=g&&g<=c&&(l<=f?l<=u&&u<=f:f<=u&&u<=l))return a[p]}return-1}(this,t.offsetX,t.offsetY);jl(this).dataIndex=0<=t?t:null},30,!1);function Kb(t,e,n){if(Gv(n,"cartesian2d")){var i=e,r=n.getArea();return{x:(t?i:r).x,y:(t?r:i).y,width:(t?i:r).width,height:(t?r:i).height}}return{cx:(r=n.getArea()).cx,cy:r.cy,r0:(t?r:e).r0,r:(t?r:e).r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}}Qd.registerClass(vh),mm({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),vm(ql.VISUAL.LAYOUT,T(function(t,e){var C=E_(e=R_(t,e)),D={};E(e,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=P_(t),o=C[O_(i)][r],a=o.offset,s=o.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;D[r]=D[r]||[],e.setLayout({bandWidth:o.bandWidth,offset:a,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(i.dim),p=sv(e,h),d=l.isHorizontal(),f=F_(0,l),g=0,y=e.count();g<y;g++){var m=e.get(h,g),v=e.get(c,g),_=0<=m?"p":"n",x=f;p&&(D[r][v]||(D[r][v]={p:f,n:f}),x=D[r][v][_]);var b,w=void 0,S=void 0,M=void 0,T=void 0;d?(w=x,S=(b=n.dataToPoint([m,v]))[1]+a,M=b[0]-f,T=s,Math.abs(M)<u&&(M=(M<0?-1:1)*u),isNaN(M)||p&&(D[r][v][_]+=M)):(w=(b=n.dataToPoint([v,m]))[0]+a,S=x,M=s,T=b[1]-f,Math.abs(T)<u&&(T=(T<=0?-1:1)*u),isNaN(T)||p&&(D[r][v][_]+=T)),e.setItemLayout(g,{x:w,y:S,width:M,height:T})}})},"bar")),vm(ql.VISUAL.PROGRESSIVE_LAYOUT,Ac),_m({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}}),ym(ql.PROCESSOR.STATISTIC,i_("bar"));var $b=(Qb.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},Qb.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},Qb.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},Qb.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},Qb);function Qb(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var Jb,Ac=(l(tw,Jb=Bd),tw.prototype.init=function(t){Jb.prototype.init.apply(this,arguments),this.legendVisualProvider=new $b(M(this.getData,this),M(this.getRawData,this)),this._defaultLabelLine(t)},tw.prototype.mergeOption=function(){Jb.prototype.mergeOption.apply(this,arguments)},tw.prototype.getInitialData=function(){return function(t,e,n){e=N(e)?{coordDimensions:e}:I({},e);var i=t.getSource(),e=iv(i,e);return(t=new Qm(e,t)).initData(i,n),t}(this,{coordDimensions:["value"],encodeDefaulter:T(Uc,this)})},tw.prototype.getDataParams=function(t){var e=this.getData(),n=Jb.prototype.getDataParams.call(this,t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=function(t,e,n){if(!t[e])return 0;var i=b(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var r=Math.pow(10,n),t=O(t,function(t){return(isNaN(t)?0:t)/i*r*100}),o=100*r,a=O(t,function(t){return Math.floor(t)}),s=b(a,function(t,e){return t+e},0),l=O(t,function(t,e){return t-a[e]});s<o;){for(var u=Number.NEGATIVE_INFINITY,h=null,c=0,p=l.length;c<p;++c)l[c]>u&&(u=l[c],h=c);++a[h],l[h]=0,++s}return a[e]/r}(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},tw.prototype._defaultLabelLine=function(t){ml(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},tw.type="series.pie",tw.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,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%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},tw);function tw(){var t=null!==Jb&&Jb.apply(this,arguments)||this;return t.useColorPaletteOnData=!0,t}Bd.registerClass(Ac);var ew=Math.PI/180;function nw(t,u,h,c,p,e,n,i,r,o){if(!(t.length<2)){for(var a,s=t.length,l=0;l<s;l++){"outer"===t[l].position&&"labelLine"===t[l].labelAlignTo&&(a=t[l].label.x-o,t[l].linePoints[1][0]+=a,t[l].label.x=o)}sg(t,r,r+n)&&function(t){for(var e,n,i,r,o,a={list:[],maxY:0},s={list:[],maxY:0},l=0;l<t.length;l++){"none"===t[l].labelAlignTo&&(n=(e=t[l]).label.y>h?s:a,(i=Math.abs(e.label.y-h))>n.maxY&&(o=(r=e.label.x-u-e.len2*p)<(o=c+e.len)?Math.sqrt(i*i/(1-r*r/o/o)):o,n.rB=o,n.maxY=i),n.list.push(e))}d(a),d(s)}(t)}function d(t){for(var e=t.rB,n=e*e,i=0;i<t.list.length;i++){var r=t.list[i],o=Math.abs(r.label.y-h),a=c+r.len,a=a*a,a=Math.sqrt((1-Math.abs(o*o/n))*a);r.label.x=u+(a+r.len2)*p}}}function iw(t){return"center"===t.position}function rw(t){var T,C,D=t.getData(),I=[],A=!1,k=(t.get("minShowLabelAngle")||0)*ew,e=D.getLayout("viewRect"),L=D.getLayout("r"),P=e.width,O=e.x,n=e.y,e=e.height;function R(t){t.ignore=!0}D.each(function(t){var e,n,i,r,o,a,s,l,u,h,c=D.getItemGraphicEl(t),p=c.shape,d=c.getTextContent(),f=c.getTextGuideLine(),g=D.getItemModel(t),y=g.getModel("label"),m=y.get("position")||g.get(["emphasis","label","position"]),v=y.get("distanceToLabelLine"),_=y.get("alignTo"),x=el(y.get("edgeDistance"),P),b=y.get("bleedMargin"),w=g.getModel("labelLine"),S=el(S=w.get("length"),P),M=el(M=w.get("length2"),P);if(Math.abs(p.endAngle-p.startAngle)<k)return E(d.states,R),void(d.ignore=!0);!function(t){if(!t.ignore)return 1;for(var e in t.states)if(!1===t.states[e].ignore)return 1}(d)||(h=(p.startAngle+p.endAngle)/2,e=Math.cos(h),n=Math.sin(h),T=p.cx,C=p.cy,i="inside"===m||"inner"===m,l="center"===m?(o=p.cx,a=p.cy,"center"):(o=(r=(i?(p.r+p.r0)/2*e:p.r*e)+T)+3*e,a=(t=(i?(p.r+p.r0)/2*n:p.r*n)+C)+3*n,i||(g=r+e*(S+L-p.r),l=t+n*(S+L-p.r),s=g+(e<0?-1:1)*M,o="edge"===_?e<0?O+x:O+P-x:s+(e<0?-v:v),s=[[r,t],[g,a=l],[s,l]]),i?"center":"edge"===_?0<e?"right":"left":0<e?"left":"right"),h="number"==typeof(y=y.get("rotate"))?y*(Math.PI/180):y?e<0?-h+Math.PI:-h:0,A=!!h,d.x=o,d.y=a,d.rotation=h,d.setStyle({verticalAlign:"middle"}),i?(d.setStyle({align:l}),(u=d.states.select)&&(u.x+=d.x,u.y+=d.y)):((h=d.getBoundingRect().clone()).applyTransform(d.getComputedTransform()),u=(d.style.margin||0)+2.1,h.y-=u/2,h.height+=u,I.push({label:d,labelLine:f,position:m,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new $e(e,n),linePoints:s,textAlign:l,labelDistance:v,labelAlignTo:_,edgeDistance:x,bleedMargin:b,rect:h})),c.setTextConfig({inside:i}))}),!A&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<t.length;p++){var d=t[p].label;iw(t[p])||(d.x<e?(h=Math.min(h,d.x),l.push(t[p])):(c=Math.max(c,d.x),u.push(t[p])))}for(nw(u,e,n,i,1,0,o,0,s,c),nw(l,e,n,i,-1,0,o,0,s,h),p=0;p<t.length;p++){var f,g,y,m,v=t[p],d=v.label;iw(v)||(f=v.linePoints)&&(g="edge"===v.labelAlignTo,y=v.rect.width,m=void 0,(m=g?d.x<e?f[2][0]-v.labelDistance-a-v.edgeDistance:a+r-v.edgeDistance-f[2][0]-v.labelDistance:d.x<e?d.x-a-v.bleedMargin:a+r-d.x-v.bleedMargin)<v.rect.width&&(v.label.style.width=m,"edge"===v.labelAlignTo&&(y=m)),m=f[1][0]-f[2][0],g?d.x<e?f[2][0]=a+v.edgeDistance+y+v.labelDistance:f[2][0]=a+r-v.edgeDistance-y-v.labelDistance:(d.x<e?f[2][0]=d.x+v.labelDistance:f[2][0]=d.x-v.labelDistance,f[1][0]=f[2][0]+m),f[1][1]=f[2][1]=d.y)}}(I,T,C,L,P,e,O,n);for(var i=0;i<I.length;i++){var r,o=I[i],a=o.label,s=o.labelLine,l=isNaN(a.x)||isNaN(a.y);a&&(a.setStyle({align:o.textAlign}),l&&(E(a.states,R),a.ignore=!0),(r=a.states.select)&&(r.x+=a.x,r.y+=a.y)),s&&(r=o.linePoints,l||!r?(E(s.states,R),s.ignore=!0):(eg(r,o.minTurnAngle),function(t,e,n){if(n<=180&&0<n){n=n/180*Math.PI,qf.fromArray(t[0]),Zf.fromArray(t[1]),jf.fromArray(t[2]),$e.sub(Kf,Zf,qf),$e.sub($f,jf,Zf);var i=Kf.len(),r=$f.len();if(!(i<.001||r<.001))if(Kf.scale(1/i),$f.scale(1/r),Kf.dot(e)<Math.cos(n)){i=Gf(Zf.x,Zf.y,jf.x,jf.y,qf.x,qf.y,Jf,!1);tg.fromArray(Jf);r=Math.PI/2,n=r+Math.acos($f.dot(e))-n;if(r<=n)$e.copy(tg,jf);else{tg.scaleAndAdd($f,i/Math.tan(Math.PI/2-n));n=jf.x!==Zf.x?(tg.x-Zf.x)/(jf.x-Zf.x):(tg.y-Zf.y)/(jf.y-Zf.y);if(isNaN(n))return;n<0?$e.copy(tg,Zf):1<n&&$e.copy(tg,jf)}tg.toArray(t[1])}}}(r,o.surfaceNormal,o.maxSurfaceAngle),s.setShape({points:r}),a.__hostTarget.textGuideLineConfig={anchor:new $e(r[0][0],r[0][1])}))}}function ow(t,e){t=t.get("borderRadius");return null==t?null:(N(t)||(t=[t,t]),{innerCornerRadius:bn(t[0],e.r0),cornerRadius:bn(t[1],e.r)})}var aw,sw=(l(lw,aw=_a),lw.prototype.updateData=function(t,e,n,i){var r=this,o=t.hostModel,a=t.getItemModel(e),s=a.getModel("emphasis"),l=t.getItemLayout(e),u=I(ow(a.getModel("itemStyle"),l)||{},l);i?(r.setShape(u),"scale"===o.getShallow("animationType")?(r.shape.r=l.r0,Xu(r,{shape:{r:l.r}},o,e)):null!=n?(r.setShape({startAngle:n,endAngle:n}),Xu(r,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},o,e)):(r.shape.endAngle=l.startAngle,Yu(r,{shape:{endAngle:l.endAngle}},o,e))):Yu(r,{shape:u},o,e),r.useStyle(t.getItemVisual(e,"style")),Bu(r,a);i=(l.startAngle+l.endAngle)/2,n=o.get("selectedOffset"),u=Math.cos(i)*n,i=Math.sin(i)*n,n=a.getShallow("cursor");n&&r.attr("cursor",n),this._updateLabel(o,t,e),r.ensureState("emphasis").shape=h({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},ow(s.getModel("itemStyle"),l)),I(r.ensureState("select"),{x:u,y:i,shape:ow(a.getModel(["select","itemStyle"]),l)}),I(r.ensureState("blur"),{shape:ow(a.getModel(["blur","itemStyle"]),l)});l=r.getTextGuideLine(),r=r.getTextContent();I(l.ensureState("select"),{x:u,y:i}),I(r.ensureState("select"),{x:u,y:i}),Eu(this,s.get("focus"),s.get("blurScope"))},lw.prototype._updateLabel=function(t,e,n){var i=e.getItemModel(n),r=i.getModel("labelLine"),o=e.getItemVisual(n,"style"),a=o&&o.fill,o=o&&o.opacity;eh(this,nh(i),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:o,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)});n=this.getTextContent();this.setTextConfig({position:null,rotation:null}),n.attr({z2:10}),rg(this,og(i),{stroke:a,opacity:q(r.get(["lineStyle","opacity"]),o,1)})},lw);function lw(t,e,n){var i=aw.call(this)||this;i.z2=2;var r=new qo,o=new Ua;return i.setTextGuideLine(r),i.setTextContent(o),i.updateData(t,e,n,!0),i}var uw,Ac=(l(hw,uw=Qd),hw.prototype.init=function(){var t=new fo;this._sectorGroup=t},hw.prototype.render=function(e,t,n,i){var r,o=e.getData(),a=this._data,s=this.group;if(!a&&0<o.count()){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<o.count();++u)l=o.getItemLayout(u);l&&(r=l.startAngle)}o.diff(a).add(function(t){var e=new sw(o,t,r);o.setItemGraphicEl(t,e),s.add(e)}).update(function(t,e){e=a.getItemGraphicEl(e);e.updateData(o,t,r),e.off("click"),s.add(e),o.setItemGraphicEl(t,e)}).remove(function(t){ju(a.getItemGraphicEl(t),e,t)}).execute(),rw(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=o)},hw.prototype.dispose=function(){},hw.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){e=t[0]-n.cx,t=t[1]-n.cy,t=Math.sqrt(e*e+t*t);return t<=n.r&&t>=n.r0}},hw.type="pie",hw);function hw(){var t=null!==uw&&uw.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}Qd.registerClass(Ac);var cw,pw,dw=2*Math.PI,fw=Math.PI/180;pw=mm,E([[(cw="pie")+"ToggleSelect","toggleSelect"],[cw+"Select","select"],[cw+"UnSelect","unselect"]],function(r){pw(r[0],function(t,e,n){var i;t=I({},t),n.dispatchAction(I(t,{type:r[1],seriesIndex:(t=t,i=[],e.eachComponent({mainType:"series",subType:cw,query:t},function(t){i.push(t.seriesIndex)}),i)}))})}),vm(T(function(t,e,D){e.eachSeriesByType(t,function(t){var r=t.getData(),e=r.mapDimension("value"),n=(l=D,yc(t.getBoxLayoutParams(),{width:l.getWidth(),height:l.getHeight()})),i=t.get("center"),o=t.get("radius");N(o)||(o=[0,o]),N(i)||(i=[i,i]);var a=el(n.width,D.getWidth()),s=el(n.height,D.getHeight()),l=Math.min(a,s),u=el(i[0],a)+n.x,h=el(i[1],s)+n.y,c=el(o[0],l/2),p=el(o[1],l/2),d=-t.get("startAngle")*fw,f=t.get("minAngle")*fw,g=0;r.each(e,function(t){isNaN(t)||g++});var y=r.getSum(e),m=Math.PI/(y||g)*2,v=t.get("clockwise"),_=t.get("roseType"),x=t.get("stillShowZeroSum"),b=r.getDataExtent(e);b[0]=0;var w,S=dw,M=0,T=d,C=v?1:-1;r.setLayout({viewRect:n,r:p}),r.each(e,function(t,e){var n,i;isNaN(t)?r.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:u,cy:h,r0:c,r:_?NaN:p}):((n="area"!==_?0===y&&x?m:t*m:dw/g)<f?S-=n=f:M+=t,i=T+C*n,r.setItemLayout(e,{angle:n,startAngle:T,endAngle:i,clockwise:v,cx:u,cy:h,r0:c,r:_?tl(t,b,[c,p]):p}),T=i)}),S<dw&&g&&(S<=.001?(w=dw/g,r.each(e,function(t,e){isNaN(t)||((t=r.getItemLayout(e)).angle=w,t.startAngle=d+C*e*w,t.endAngle=d+C*(e+1)*w)})):(m=S/M,T=d,r.each(e,function(t,e){isNaN(t)||(t=(e=r.getItemLayout(e)).angle===f?f:t*m,e.startAngle=T,e.endAngle=T+C*t,T+=C*t)})))})},"pie")),ym({seriesType:"pie",reset:function(t,e){var i,r=e.findComponents({mainType:"legend"});r&&r.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;n<r.length;n++)if(!r[n].isSelected(e))return!1;return!0})}});var gw={label:{enabled:!0},decal:{show:!1}},yw=Il(),mw={};Ac=ql.VISUAL.ARIA;gm(function(t){var e;t&&t.aria&&(null!=(e=t.aria).show&&(e.enabled=e.show),e.label=e.label||{},E(["description","general","series","data"],function(t){null!=e[t]&&(e.label[t]=e[t])}))}),_m(Ac,function(f,r){var t,o=f.getModel("aria");function g(t,e){if("string"!=typeof t)return t;var n=t;return E(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}o.get("enabled")&&(_((t=D(gw)).label,f.getLocaleModel().get("aria"),!1),_(o.option,t,!1),function(){{var n;o.getModel("decal").get("show")&&(n=it(),f.eachSeries(function(t){var e;t.useColorPaletteOnData&&((e=n.get(t.type))||(e={},n.set(t.type,e)),yw(t).scope=e)}),f.eachRawSeries(function(i){var r,o,a,s,l,t,e;function u(t,e){e=t?I(I({},e),t):e;return e.dirty=!0,e}f.isSeriesFiltered(i)||("function"!=typeof i.enableAriaDecal?(r=i.getData(),i.useColorPaletteOnData?(o=i.getRawData(),a={},s=yw(i).scope,r.each(function(t){var e=r.getRawIndex(t);a[e]=t}),l=o.count(),o.each(function(t){var e=a[t],n=o.getName(t)||t+"",t=ep(i.ecModel,n,s,l),n=r.getItemVisual(e,"decal");r.setItemVisual(e,"decal",u(n,t))})):(t=ep(i.ecModel,i.name,mw,f.getSeriesCount()),e=r.getVisual("decal"),r.setVisual("decal",u(e,t)))):i.enableAriaDecal())}))}}(),function(){var t=f.getLocaleModel().get("aria"),u=o.getModel("label");if(u.option=A(u.option,t),!u.get("enabled"))return;var e=r.getZr().dom;if(u.get("description"))return e.setAttribute("aria-label",u.get("description"));var h=f.getSeriesCount(),c=u.get(["data","maxCount"])||10,n=u.get(["series","maxCount"])||10,p=Math.min(h,n);{var d,i;h<1||(i=function(){var t=f.get("title");t&&t.length&&(t=t[0]);return t&&t.text}(),t=i?g(u.get(["general","withTitle"]),{title:i}):u.get(["general","withoutTitle"]),d=[],n=1<h?u.get(["series","multiple","prefix"]):u.get(["series","single","prefix"]),t+=g(n,{seriesCount:h}),f.eachSeries(function(t,e){if(e<p){var n=void 0,e=t.get("name")?"withName":"withoutName";n=g(n=1<h?u.get(["series","multiple",e]):u.get(["series","single",e]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(e=t.subType,f.getLocaleModel().get(["series","typeNames"])[e]||"自定义图")});var i=t.getData();i.count()>c?n+=g(u.get(["data","partialData"]),{displayCnt:c}):n+=u.get(["data","allData"]);for(var r,o,a,s=[],l=0;l<i.count();l++){l<c&&(r=i.getName(l),o=nd(i,l),a=u.get(["data",r?"withName":"withoutName"]),s.push(g(a,{name:r,value:o})))}e=u.get(["data","separator","middle"]),t=u.get(["data","separator","end"]);n+=s.join(e)+t,d.push(n)}}),i=u.getModel(["series","multiple","separator"]),n=i.get("middle"),i=i.get("end"),t+=d.join(n)+i,e.setAttribute("aria-label",t))}}())}),t.PRIORITY=ql,t.connect=function(e){var t;return N(e)&&(t=e,e=null,ly(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+hm++,ly(t,function(t){t.group=e})),lm[e]=!0,e},t.dataTool={},t.dependencies={zrender:"5.0.1"},t.disConnect=pm,t.disconnect=Bh,t.dispose=function(t){"string"==typeof t?t=sm[t]:t instanceof Uy||(t=dm(t)),t instanceof Uy&&!t.isDisposed()&&t.dispose()},t.extendChartView=function(t){return Qd.extend(t)},t.extendComponentModel=function(t){return Tc.extend(t)},t.extendComponentView=function(t){return qd.extend(t)},t.extendSeriesModel=function(t){return Bd.extend(t)},t.getCoordinateSystemDimensions=function(t){if(t=dp.get(t))return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.getInstanceByDom=dm,t.getInstanceById=function(t){return sm[t]},t.getMap=function(t){return(t=Nf(t))&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.init=function(t,e,n){var i=dm(t);if(i)return i;var r=new Uy(t,e,n);return r.id="ec_"+um++,sm[r.id]=r,Ol(t,cm,r.id),Fy(r),ly(nm,function(t){t(r)}),r},t.registerAction=mm,t.registerCoordinateSystem=function(t,e){dp.register(t,e)},t.registerLayout=vm,t.registerLoading=bm,t.registerLocale=Ph,t.registerMap=function(t,e,n){Ef(t,e,n)},t.registerPostInit=function(t){t&&nm.push(t)},t.registerPostUpdate=function(t){t&&im.push(t)},t.registerPreprocessor=gm,t.registerProcessor=ym,t.registerTheme=fm,t.registerTransform=dh,t.registerVisual=_m,t.setCanvasCreator=function(t){t=t,y["createCanvas"]=t},t.version="5.0.0",Object.defineProperty(t,"__esModule",{value:!0})});