@circutor/charts 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundler/itic-chart.js +1 -1
- package/dist/charts/charts.esm.js +1 -1
- package/dist/charts/p-7d11d611.entry.js +25 -0
- package/dist/cjs/charts.cjs.js +1 -1
- package/dist/cjs/itic-chart.cjs.entry.js +450 -100
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/itic-chart/index.js +56 -55
- package/dist/collection/components/itic-chart/itic-chart.i18n.js +26 -0
- package/dist/collection/components/itic-chart/itic-chart.options.js +99 -42
- package/dist/collection/components/itic-chart/itic-chart.phases.js +55 -0
- package/dist/components/itic-chart.js +2 -2
- package/dist/esm/charts.js +1 -1
- package/dist/esm/itic-chart.entry.js +450 -100
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/itic-chart/index.d.ts +18 -14
- package/dist/types/components/itic-chart/itic-chart.i18n.d.ts +13 -0
- package/dist/types/components/itic-chart/itic-chart.options.d.ts +32 -17
- package/dist/types/components/itic-chart/itic-chart.phases.d.ts +17 -0
- package/dist/types/components.d.ts +18 -28
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -5
- package/readme.md +138 -73
- package/dist/charts/p-943aa343.entry.js +0 -25
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import{r as t,c as n,h as i,g as r}from"./p-BPCJmLvQ.js";
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},e(t,n)};function o(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var a=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},u=new function(){this.browser=new a,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(u.wxa=!0,u.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?u.worker=!0:!u.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Node.js")>-1?(u.node=!0,u.svgSupported=!0):function(t,n){var i=n.browser,r=t.match(/Firefox\/([\d.]+)/),e=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);if(r&&(i.firefox=!0,i.version=r[1]),e&&(i.ie=!0,i.version=e[1]),o&&(i.edge=!0,i.version=o[1],i.newEdge=+o[1].split(".")[0]>18),a&&(i.weChat=!0),n.svgSupported="undefined"!=typeof SVGRect,n.touchEventsSupported="ontouchstart"in window&&!i.ie&&!i.edge,n.pointerEventsSupported="onpointerdown"in window&&(i.edge||i.ie&&+i.version>=11),n.domSupported="undefined"!=typeof document){var u=document.documentElement.style;n.transform3dSupported=(i.ie&&"transition"in u||i.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in u)&&!("OTransition"in u),n.transformSupported=n.transform3dSupported||i.ie&&+i.version>=9}}(navigator.userAgent,u);var s,f,h="12px sans-serif",l=function(t){var n={};if("undefined"==typeof JSON)return n;for(var i=0;i<95;i++){var r=String.fromCharCode(i+32),e=(t.charCodeAt(i)-20)/100;n[r]=e}return n}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),c={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,n){if(!s){var i=c.createCanvas();s=i&&i.getContext("2d")}if(s)return f!==n&&(f=s.font=n||h),s.measureText(t);t=t||"";var r=/((?:\d+)?\.?\d*)px/.exec(n=n||h),e=r&&+r[1]||12,o=0;if(n.indexOf("mono")>=0)o=e*t.length;else for(var a=0;a<t.length;a++){var u=l[t[a]];o+=null==u?e:u*e}return{width:o}},loadImage:function(t,n,i){var r=new Image;return r.onload=n,r.onerror=i,r.src=t,r},getTime:function(){return Date.now?Date.now():+new Date}},v=P(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,n){return t["[object "+n+"]"]=!0,t}),{}),d=P(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,n){return t["[object "+n+"Array]"]=!0,t}),{}),m=Object.prototype.toString,p=Array.prototype,y=p.forEach,g=p.filter,b=p.slice,w=p.map,x=function(){}.constructor,M=x?x.prototype:null,S="__proto__",k=2311,T=Math.pow(2,53)-1;function A(){return k>=T&&(k=0),k++}function N(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];"undefined"!=typeof console&&console.error.apply(console,t)}function L(t){if(null==t||"object"!=typeof t)return t;var n=t,i=m.call(t);if("[object Array]"===i){if(!st(t)){n=[];for(var r=0,e=t.length;r<e;r++)n[r]=L(t[r])}}else if(d[i]){if(!st(t)){var o=t.constructor;if(o.from)n=o.from(t);else for(n=new o(t.length),r=0,e=t.length;r<e;r++)n[r]=t[r]}}else if(!v[i]&&!st(t)&&!$(t))for(var a in n={},t)t.hasOwnProperty(a)&&a!==S&&(n[a]=L(t[a]));return n}function C(t,n,i){if(!X(n)||!X(t))return i?L(n):t;for(var r in n)if(n.hasOwnProperty(r)&&r!==S){var e=t[r],o=n[r];!X(o)||!X(e)||H(o)||H(e)||$(o)||$(e)||q(o)||q(e)||st(o)||st(e)?!i&&r in t||(t[r]=L(n[r])):C(e,o,i)}return t}function I(t,n){if(Object.assign)Object.assign(t,n);else for(var i in n)n.hasOwnProperty(i)&&i!==S&&(t[i]=n[i]);return t}function O(t,n){for(var i=F(n),r=0,e=i.length;r<e;r++){var o=i[r];null==t[o]&&(t[o]=n[o])}return t}function D(t,n){if(t){if(t.indexOf)return t.indexOf(n);for(var i=0,r=t.length;i<r;i++)if(t[i]===n)return i}return-1}function _(t,n){if(t="prototype"in t?t.prototype:t,n="prototype"in n?n.prototype:n,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(n),r=0;r<i.length;r++){var e=i[r];"constructor"!==e&&null==t[e]&&(t[e]=n[e])}else O(t,n)}function E(t){return!!t&&"string"!=typeof t&&"number"==typeof t.length}function z(t,n,i){if(t&&n)if(t.forEach&&t.forEach===y)t.forEach(n,i);else if(t.length===+t.length)for(var r=0,e=t.length;r<e;r++)n.call(i,t[r],r,t);else for(var o in t)t.hasOwnProperty(o)&&n.call(i,t[o],o,t)}function R(t,n,i){if(!t)return[];if(!n)return it(t);if(t.map&&t.map===w)return t.map(n,i);for(var r=[],e=0,o=t.length;e<o;e++)r.push(n.call(i,t[e],e,t));return r}function P(t,n,i,r){if(t&&n){for(var e=0,o=t.length;e<o;e++)i=n.call(r,i,t[e],e,t);return i}}function B(t,n,i){if(!t)return[];if(!n)return it(t);if(t.filter&&t.filter===g)return t.filter(n,i);for(var r=[],e=0,o=t.length;e<o;e++)n.call(i,t[e],e,t)&&r.push(t[e]);return r}function F(t){if(!t)return[];if(Object.keys)return Object.keys(t);var n=[];for(var i in t)t.hasOwnProperty(i)&&n.push(i);return n}var V=M&&U(M.bind)?M.call.bind(M.bind):function(t,n){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return function(){return t.apply(n,i.concat(b.call(arguments)))}};function W(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return function(){return t.apply(this,n.concat(b.call(arguments)))}}function H(t){return Array.isArray?Array.isArray(t):"[object Array]"===m.call(t)}function U(t){return"function"==typeof t}function G(t){return"string"==typeof t}function j(t){return"[object String]"===m.call(t)}function Y(t){return"number"==typeof t}function X(t){var n=typeof t;return"function"===n||!!t&&"object"===n}function q(t){return!!v[m.call(t)]}function Z(t){return!!d[m.call(t)]}function $(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function K(t){return null!=t.colorStops}function J(t){return t!=t}function Q(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var i=0,r=t.length;i<r;i++)if(null!=t[i])return t[i]}function tt(t,n){return null!=t?t:n}function nt(t,n,i){return null!=t?t:null!=n?n:i}function it(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return b.apply(t,n)}function rt(t){if("number"==typeof t)return[t,t,t,t];var n=t.length;return 2===n?[t[0],t[1],t[0],t[1]]:3===n?[t[0],t[1],t[2],t[1]]:t}function et(t,n){if(!t)throw new Error(n)}function ot(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var at="__ec_primitive__";function ut(t){t[at]=!0}function st(t){return t[at]}var ft=function(){function t(){this.data={}}return t.prototype.delete=function(t){var n=this.has(t);return n&&delete this.data[t],n},t.prototype.has=function(t){return this.data.hasOwnProperty(t)},t.prototype.get=function(t){return this.data[t]},t.prototype.set=function(t,n){return this.data[t]=n,this},t.prototype.keys=function(){return F(this.data)},t.prototype.forEach=function(t){var n=this.data;for(var i in n)n.hasOwnProperty(i)&&t(n[i],i)},t}(),ht="function"==typeof Map,lt=function(){function t(n){var i=H(n);this.data=ht?new Map:new ft;var r=this;function e(t,n){i?r.set(t,n):r.set(n,t)}n instanceof t?n.each(e):n&&z(n,e)}return t.prototype.hasKey=function(t){return this.data.has(t)},t.prototype.get=function(t){return this.data.get(t)},t.prototype.set=function(t,n){return this.data.set(t,n),n},t.prototype.each=function(t,n){this.data.forEach((function(i,r){t.call(n,i,r)}))},t.prototype.keys=function(){var t=this.data.keys();return ht?Array.from(t):t},t.prototype.removeKey=function(t){this.data.delete(t)},t}();function ct(t){return new lt(t)}function vt(t,n){var i;if(Object.create)i=Object.create(t);else{var r=function(){};r.prototype=t,i=new r}return n&&I(i,n),i}function dt(t){var n=t.style;n.webkitUserSelect="none",n.userSelect="none",n.webkitTapHighlightColor="rgba(0,0,0,0)",n["-webkit-touch-callout"]="none"}function mt(t,n){return t.hasOwnProperty(n)}function pt(){}var yt=180/Math.PI;function gt(t,n){return null==t&&(t=0),null==n&&(n=0),[t,n]}function bt(t){return[t[0],t[1]]}function wt(t,n,i){return t[0]=n,t[1]=i,t}function xt(t,n,i){return t[0]=n[0]+i[0],t[1]=n[1]+i[1],t}function Mt(t,n,i){return t[0]=n[0]-i[0],t[1]=n[1]-i[1],t}function St(t,n,i){return t[0]=n[0]*i,t[1]=n[1]*i,t}function kt(t,n){return Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1]))}var Tt=kt,At=function(t,n){return(t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1])};function Nt(t,n,i){var r=n[0],e=n[1];return t[0]=i[0]*r+i[2]*e+i[4],t[1]=i[1]*r+i[3]*e+i[5],t}function Lt(t,n,i){return t[0]=Math.min(n[0],i[0]),t[1]=Math.min(n[1],i[1]),t}function Ct(t,n,i){return t[0]=Math.max(n[0],i[0]),t[1]=Math.max(n[1],i[1]),t}var It=function(t,n){this.target=t,this.topTarget=n&&n.topTarget},Ot=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var n=t.target;n&&!n.draggable;)n=n.parent||n.__hostTarget;n&&(this._draggingTarget=n,n.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new It(n,t),"dragstart",t.event))},t.prototype._drag=function(t){var n=this._draggingTarget;if(n){var i=t.offsetX,r=t.offsetY,e=i-this._x,o=r-this._y;this._x=i,this._y=r,n.drift(e,o,t),this.handler.dispatchToElement(new It(n,t),"drag",t.event);var a=this.handler.findHover(i,r,n).target,u=this._dropTarget;this._dropTarget=a,n!==a&&(u&&a!==u&&this.handler.dispatchToElement(new It(u,t),"dragleave",t.event),a&&a!==u&&this.handler.dispatchToElement(new It(a,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var n=this._draggingTarget;n&&(n.dragging=!1),this.handler.dispatchToElement(new It(n,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new It(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),Dt=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,n,i,r){this._$handlers||(this._$handlers={});var e=this._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!t)return this;var o=this._$eventProcessor;null!=n&&o&&o.normalizeQuery&&(n=o.normalizeQuery(n)),e[t]||(e[t]=[]);for(var a=0;a<e[t].length;a++)if(e[t][a].h===i)return this;var u={h:i,query:n,ctx:r||this,callAtLast:i.zrEventfulCallAtLast},s=e[t].length-1,f=e[t][s];return f&&f.callAtLast?e[t].splice(s,0,u):e[t].push(u),this},t.prototype.isSilent=function(t){var n=this._$handlers;return!n||!n[t]||!n[t].length},t.prototype.off=function(t,n){var i=this._$handlers;if(!i)return this;if(!t)return this._$handlers={},this;if(n){if(i[t]){for(var r=[],e=0,o=i[t].length;e<o;e++)i[t][e].h!==n&&r.push(i[t][e]);i[t]=r}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},t.prototype.trigger=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],e=this._$eventProcessor;if(r)for(var o=n.length,a=r.length,u=0;u<a;u++){var s=r[u];if(!e||!e.filter||null==s.query||e.filter(t,s.query))switch(o){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,n[0]);break;case 2:s.h.call(s.ctx,n[0],n[1]);break;default:s.h.apply(s.ctx,n)}}return e&&e.afterTrigger&&e.afterTrigger(t),this},t.prototype.triggerWithContext=function(t){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[t],e=this._$eventProcessor;if(r)for(var o=n.length,a=n[o-1],u=r.length,s=0;s<u;s++){var f=r[s];if(!e||!e.filter||null==f.query||e.filter(t,f.query))switch(o){case 0:f.h.call(a);break;case 1:f.h.call(a,n[0]);break;case 2:f.h.call(a,n[0],n[1]);break;default:f.h.apply(a,n.slice(1,o-1))}}return e&&e.afterTrigger&&e.afterTrigger(t),this},t}(),_t=Math.log(2);function Et(t,n,i,r,e,o){var a=r+"-"+e,u=t.length;if(o.hasOwnProperty(a))return o[a];if(1===n){var s=Math.round(Math.log((1<<u)-1&~e)/_t);return t[i][s]}for(var f=r|1<<i,h=i+1;r&1<<h;)h++;for(var l=0,c=0,v=0;c<u;c++){var d=1<<c;d&e||(l+=(v%2?-1:1)*t[i][c]*Et(t,n-1,h,f,e|d,o),v++)}return o[a]=l,l}function zt(t,n){var i=[[t[0],t[1],1,0,0,0,-n[0]*t[0],-n[0]*t[1]],[0,0,0,t[0],t[1],1,-n[1]*t[0],-n[1]*t[1]],[t[2],t[3],1,0,0,0,-n[2]*t[2],-n[2]*t[3]],[0,0,0,t[2],t[3],1,-n[3]*t[2],-n[3]*t[3]],[t[4],t[5],1,0,0,0,-n[4]*t[4],-n[4]*t[5]],[0,0,0,t[4],t[5],1,-n[5]*t[4],-n[5]*t[5]],[t[6],t[7],1,0,0,0,-n[6]*t[6],-n[6]*t[7]],[0,0,0,t[6],t[7],1,-n[7]*t[6],-n[7]*t[7]]],r={},e=Et(i,8,0,0,0,r);if(0!==e){for(var o=[],a=0;a<8;a++)for(var u=0;u<8;u++)null==o[u]&&(o[u]=0),o[u]+=((a+u)%2?-1:1)*Et(i,7,0===a?1:0,1<<a,1<<u,r)/e*n[a];return function(t,n,i){var r=n*o[6]+i*o[7]+1;t[0]=(n*o[0]+i*o[1]+o[2])/r,t[1]=(n*o[3]+i*o[4]+o[5])/r}}}var Rt="___zrEVENTSAVED",Pt=[];function Bt(t,n,i,r,e){if(n.getBoundingClientRect&&u.domSupported&&!Ft(n)){var o=n[Rt]||(n[Rt]={}),a=function(t,n){var i=n.markers;if(i)return i;i=n.markers=[];for(var r=["left","right"],e=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),u=o%2,s=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[u]+":0",e[s]+":0",r[1-u]+":auto",e[1-s]+":auto",""].join("!important;"),t.appendChild(a),i.push(a)}return n.clearMarkers=function(){z(i,(function(t){t.parentNode&&t.parentNode.removeChild(t)}))},i}(n,o),s=function(t,n,i){for(var r=i?"invTrans":"trans",e=n[r],o=n.srcCoords,a=[],u=[],s=!0,f=0;f<4;f++){var h=t[f].getBoundingClientRect(),l=2*f,c=h.left,v=h.top;a.push(c,v),s=s&&o&&c===o[l]&&v===o[l+1],u.push(t[f].offsetLeft,t[f].offsetTop)}return s&&e?e:(n.srcCoords=a,n[r]=i?zt(u,a):zt(a,u))}(a,o,e);if(s)return s(t,i,r),!0}return!1}function Ft(t){return"CANVAS"===t.nodeName.toUpperCase()}var Vt=/([&<>"'])/g,Wt={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ht(t){return null==t?"":(t+"").replace(Vt,(function(t,n){return Wt[n]}))}var Ut=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[],jt=u.browser.firefox&&+u.browser.version.split(".")[0]<39;function Yt(t,n,i,r){return i=i||{},r?Xt(t,n,i):jt&&null!=n.layerX&&n.layerX!==n.offsetX?(i.zrX=n.layerX,i.zrY=n.layerY):null!=n.offsetX?(i.zrX=n.offsetX,i.zrY=n.offsetY):Xt(t,n,i),i}function Xt(t,n,i){if(u.domSupported&&t.getBoundingClientRect){var r=n.clientX,e=n.clientY;if(Ft(t)){var o=t.getBoundingClientRect();return i.zrX=r-o.left,void(i.zrY=e-o.top)}if(Bt(Gt,t,r,e))return i.zrX=Gt[0],void(i.zrY=Gt[1])}i.zrX=i.zrY=0}function qt(t){return t||window.event}function Zt(t,n,i){if(null!=(n=qt(n)).zrX)return n;var r=n.type;if(r&&r.indexOf("touch")>=0){var e="touchend"!==r?n.targetTouches[0]:n.changedTouches[0];e&&Yt(t,e,n,i)}else{Yt(t,n,n,i);var o=function(t){var n=t.wheelDelta;if(n)return n;var i=t.deltaX,r=t.deltaY;return null==i||null==r?n:3*(0!==r?Math.abs(r):Math.abs(i))*(r>0?-1:r<0?1:i>0?-1:1)}(n);n.zrDelta=o?o/120:-(n.detail||0)/3}var a=n.button;return null==n.which&&void 0!==a&&Ut.test(n.type)&&(n.which=1&a?1:2&a?3:4&a?2:0),n}var $t=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},Kt=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,n,i){return this._doTrack(t,n,i),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,n,i){var r=t.touches;if(r){for(var e={points:[],touches:[],target:n,event:t},o=0,a=r.length;o<a;o++){var u=r[o],s=Yt(i,u,{});e.points.push([s.zrX,s.zrY]),e.touches.push(u)}this._track.push(e)}},t.prototype._recognize=function(t){for(var n in Qt)if(Qt.hasOwnProperty(n)){var i=Qt[n](this._track,t);if(i)return i}},t}();function Jt(t){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(n*n+i*i)}var Qt={pinch:function(t,n){var i=t.length;if(i){var r,e=(t[i-1]||{}).points,o=(t[i-2]||{}).points||e;if(o&&o.length>1&&e&&e.length>1){var a=Jt(e)/Jt(o);!isFinite(a)&&(a=1),n.pinchScale=a;var u=[((r=e)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return n.pinchX=u[0],n.pinchY=u[1],{type:"pinch",target:t[0].target,event:n}}}}};function tn(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function nn(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function rn(t,n,i){var r=n[1]*i[0]+n[3]*i[1],e=n[0]*i[2]+n[2]*i[3],o=n[1]*i[2]+n[3]*i[3],a=n[0]*i[4]+n[2]*i[5]+n[4],u=n[1]*i[4]+n[3]*i[5]+n[5];return t[0]=n[0]*i[0]+n[2]*i[1],t[1]=r,t[2]=e,t[3]=o,t[4]=a,t[5]=u,t}function en(t,n,i){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4]+i[0],t[5]=n[5]+i[1],t}function on(t,n,i,r){void 0===r&&(r=[0,0]);var e=n[0],o=n[2],a=n[4],u=n[1],s=n[3],f=n[5],h=Math.sin(i),l=Math.cos(i);return t[0]=e*l+u*h,t[1]=-e*h+u*l,t[2]=o*l+s*h,t[3]=-o*h+l*s,t[4]=l*(a-r[0])+h*(f-r[1])+r[0],t[5]=l*(f-r[1])-h*(a-r[0])+r[1],t}function an(t,n){var i=n[0],r=n[2],e=n[4],o=n[1],a=n[3],u=n[5],s=i*a-o*r;return s?(t[0]=a*(s=1/s),t[1]=-o*s,t[2]=-r*s,t[3]=i*s,t[4]=(r*u-a*e)*s,t[5]=(o*e-i*u)*s,t):null}var un=function(){function t(t,n){this.x=t||0,this.y=n||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,n){return this.x=t,this.y=n,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,n){this.x+=t.x*n,this.y+=t.y*n},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var n=this.x-t.x,i=this.y-t.y;return Math.sqrt(n*n+i*i)},t.prototype.distanceSquare=function(t){var n=this.x-t.x,i=this.y-t.y;return n*n+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var n=this.x,i=this.y;return this.x=t[0]*n+t[2]*i+t[4],this.y=t[1]*n+t[3]*i+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,n,i){t.x=n,t.y=i},t.copy=function(t,n){t.x=n.x,t.y=n.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,n){return t.x*n.x+t.y*n.y},t.add=function(t,n,i){t.x=n.x+i.x,t.y=n.y+i.y},t.sub=function(t,n,i){t.x=n.x-i.x,t.y=n.y-i.y},t.scale=function(t,n,i){t.x=n.x*i,t.y=n.y*i},t.scaleAndAdd=function(t,n,i,r){t.x=n.x+i.x*r,t.y=n.y+i.y*r},t.lerp=function(t,n,i,r){var e=1-r;t.x=e*n.x+r*i.x,t.y=e*n.y+r*i.y},t}(),sn=Math.min,fn=Math.max,hn=Math.abs,ln=["x","y"],cn=["width","height"],vn=new un,dn=new un,mn=new un,pn=new un,yn=Cn(),gn=yn.minTv,bn=yn.maxTv,wn=[0,0],xn=function(){function t(t,n,i,r){Mn(this,t,n,i,r)}return t.set=function(t,n,i,r,e){return r<0&&(n+=r,r=-r),e<0&&(i+=e,e=-e),t.x=n,t.y=i,t.width=r,t.height=e,t},t.prototype.union=function(t){var n=sn(t.x,this.x),i=sn(t.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?fn(t.x+t.width,this.x+this.width)-n:t.width,this.height=isFinite(this.y)&&isFinite(this.height)?fn(t.y+t.height,this.y+this.height)-i:t.height,this.x=n,this.y=i},t.prototype.applyTransform=function(n){t.applyTransform(this,this,n)},t.prototype.calculateTransform=function(t){return kn([1,0,0,1,0,0],this,t)},t.prototype.intersect=function(n,i,r){return t.intersect(this,n,i,r)},t.intersect=function(n,i,r,e){r&&un.set(r,0,0);var o=e&&e.outIntersectRect||null,a=e&&e.clamp;if(o&&(o.x=o.y=o.width=o.height=NaN),!n||!i)return!1;n instanceof t||(n=Mn(Tn,n.x,n.y,n.width,n.height)),i instanceof t||(i=Mn(An,i.x,i.y,i.width,i.height));var u=!!r;yn.reset(e,u);var s=yn.touchThreshold,f=n.x+s,h=n.x+n.width-s,l=n.y+s,c=n.y+n.height-s,v=i.x+s,d=i.x+i.width-s,m=i.y+s,p=i.y+i.height-s;if(f>h||l>c||v>d||m>p)return!1;var y=!(h<v||d<f||c<m||p<l);return(u||o)&&(wn[0]=1/0,wn[1]=0,Ln(f,h,v,d,0,u,o,a),Ln(l,c,m,p,1,u,o,a),u&&un.copy(r,y?yn.useDir?yn.dirMinTv:gn:bn)),y},t.contain=function(t,n,i){return n>=t.x&&n<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},t.prototype.contain=function(n,i){return t.contain(this,n,i)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){Sn(this,t)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(n){return new t(n?n.x:0,n?n.y:0,n?n.width:0,n?n.height:0)},t.copy=function(t,n){return t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height,t},t.applyTransform=function(t,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],e=i[3],o=i[5];return t.x=n.x*r+i[4],t.y=n.y*e+o,t.width=n.width*r,t.height=n.height*e,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}vn.x=mn.x=n.x,vn.y=pn.y=n.y,dn.x=pn.x=n.x+n.width,dn.y=mn.y=n.y+n.height,vn.transform(i),pn.transform(i),dn.transform(i),mn.transform(i),t.x=sn(vn.x,dn.x,mn.x,pn.x),t.y=sn(vn.y,dn.y,mn.y,pn.y);var a=fn(vn.x,dn.x,mn.x,pn.x),u=fn(vn.y,dn.y,mn.y,pn.y);t.width=a-t.x,t.height=u-t.y}else t!==n&&Sn(t,n)},t.calculateTransform=function(t,n,i){var r=i.width/n.width,e=i.height/n.height;return en(t=tn(t||[]),t,wt(Nn,-n.x,-n.y)),function(t,n,i){var r=i[0],e=i[1];t[0]=n[0]*r,t[1]=n[1]*e,t[2]=n[2]*r,t[3]=n[3]*e,t[4]=n[4]*r,t[5]=n[5]*e}(t,t,wt(Nn,r,e)),en(t,t,wt(Nn,i.x,i.y)),t},t}(),Mn=xn.set,Sn=xn.copy,kn=xn.calculateTransform,Tn=new xn(0,0,0,0),An=new xn(0,0,0,0),Nn=[];function Ln(t,n,i,r,e,o,a,u){var s=hn(n-i),f=hn(r-t),h=sn(s,f),l=ln[e],c=ln[1-e],v=cn[e];n<i||r<t?s<f?(o&&(bn[l]=-s),u&&(a[l]=n,a[v]=0)):(o&&(bn[l]=f),u&&(a[l]=t,a[v]=0)):(a&&(a[l]=fn(t,i),a[v]=sn(n,r)-a[l]),o&&(h<wn[0]||yn.useDir)&&(wn[0]=sn(h,wn[0]),(s<f||!yn.bidirectional)&&(gn[l]=s,gn[c]=0,yn.useDir&&yn.calcDirMTV()),(s>=f||!yn.bidirectional)&&(gn[l]=-f,gn[c]=0,yn.useDir&&yn.calcDirMTV())))}function Cn(){var t=0,n=new un,i=new un,r={minTv:new un,maxTv:new un,useDir:!1,dirMinTv:new un,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(e,o){r.touchThreshold=0,e&&null!=e.touchThreshold&&(r.touchThreshold=fn(0,e.touchThreshold)),r.negativeSize=!1,o&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,e&&null!=e.direction&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),i.copy(r.minTv),t=e.direction,r.bidirectional=null==e.bidirectional||!!e.bidirectional,r.bidirectional||n.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var o=r.minTv,a=r.dirMinTv,u=o.y*o.y+o.x*o.x,s=Math.sin(t),f=Math.cos(t),h=s*o.y+f*o.x;e(h)?e(o.x)&&e(o.y)&&a.set(0,0):(i.x=u*f/h,i.y=u*s/h,e(i.x)&&e(i.y)?a.set(0,0):(r.bidirectional||n.dot(i)>0)&&i.len()<a.len()&&a.copy(i))}};function e(t){return hn(t)<1e-10}return r}var In="silent";function On(){$t(this.event)}var Dn=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.handler=null,n}return o(n,t),n.prototype.dispose=function(){},n.prototype.setCursor=function(){},n}(Dt),_n=function(t,n){this.x=t,this.y=n},En=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],zn=new xn(0,0,0,0),Rn=function(t){function n(n,i,r,e,o){var a=t.call(this)||this;return a._hovered=new _n(0,0),a.storage=n,a.painter=i,a.painterRoot=e,a._pointerSize=o,r=r||new Dn,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new Ot(a),a}return o(n,t),n.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(z(En,(function(n){t.on&&t.on(n,this[n],this)}),this),t.handler=this),this.proxy=t},n.prototype.mousemove=function(t){var n=t.zrX,i=t.zrY,r=Fn(this,n,i),e=this._hovered,o=e.target;o&&!o.__zr&&(o=(e=this.findHover(e.x,e.y)).target);var a=this._hovered=r?new _n(n,i):this.findHover(n,i),u=a.target,s=this.proxy;s.setCursor&&s.setCursor(u?u.cursor:"default"),o&&u!==o&&this.dispatchToElement(e,"mouseout",t),this.dispatchToElement(a,"mousemove",t),u&&u!==o&&this.dispatchToElement(a,"mouseover",t)},n.prototype.mouseout=function(t){var n=t.zrEventControl;"only_globalout"!==n&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==n&&this.trigger("globalout",{type:"globalout",event:t})},n.prototype.resize=function(){this._hovered=new _n(0,0)},n.prototype.dispatch=function(t,n){var i=this[t];i&&i.call(this,n)},n.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},n.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},n.prototype.dispatchToElement=function(t,n,i){var r=(t=t||{}).target;if(!r||!r.silent){for(var e="on"+n,o=function(t,n,i){return{type:t,event:i,target:n.target,topTarget:n.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:On}}(n,t,i);r&&(r[e]&&(o.cancelBubble=!!r[e].call(r,o)),r.trigger(n,o),r=r.__hostTarget?r.__hostTarget:r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(n,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[e]&&t[e].call(t,o),t.trigger&&t.trigger(n,o)})))}},n.prototype.findHover=function(t,n,i){var r=this.storage.getDisplayList(),e=new _n(t,n);if(Bn(r,e,t,n,i),this._pointerSize&&!e.target){for(var o=[],a=this._pointerSize,u=a/2,s=new xn(t-u,n-u,a,a),f=r.length-1;f>=0;f--){var h=r[f];h===i||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(zn.copy(h.getBoundingRect()),h.transform&&zn.applyTransform(h.transform),zn.intersect(s)&&o.push(h))}if(o.length)for(var l=Math.PI/12,c=2*Math.PI,v=0;v<u;v+=4)for(var d=0;d<c;d+=l)if(Bn(o,e,t+v*Math.cos(d),n+v*Math.sin(d),i),e.target)return e}return e},n.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new Kt);var i=this._gestureMgr;"start"===n&&i.clear();var r=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===n&&i.clear(),r){var e=r.type;t.gestureEvent=e;var o=new _n;o.target=r.target,this.dispatchToElement(o,e,r.event)}},n}(Dt);function Pn(t,n,i){if(t[t.rectHover?"rectContain":"contain"](n,i)){for(var r=t,e=void 0,o=!1;r;){if(r.ignoreClip&&(o=!0),!o){var a=r.getClipPath();if(a&&!a.contain(n,i))return!1}r.silent&&(e=!0);var u=r.__hostTarget;r=u?r.ignoreHostSilent?null:u:r.parent}return!e||In}return!1}function Bn(t,n,i,r,e){for(var o=t.length-1;o>=0;o--){var a=t[o],u=void 0;if(a!==e&&!a.ignore&&(u=Pn(a,i,r))&&(!n.topTarget&&(n.topTarget=a),u!==In)){n.target=a;break}}}function Fn(t,n,i){var r=t.painter;return n<0||n>r.getWidth()||i<0||i>r.getHeight()}function Vn(t,n,i,r){var e=n+1;if(e===i)return 1;if(r(t[e++],t[n])<0){for(;e<i&&r(t[e],t[e-1])<0;)e++;!function(t,n,i){for(i--;n<i;){var r=t[n];t[n++]=t[i],t[i--]=r}}(t,n,e)}else for(;e<i&&r(t[e],t[e-1])>=0;)e++;return e-n}function Wn(t,n,i,r,e){for(r===n&&r++;r<i;r++){for(var o,a=t[r],u=n,s=r;u<s;)e(a,t[o=u+s>>>1])<0?s=o:u=o+1;var f=r-u;switch(f){case 3:t[u+3]=t[u+2];case 2:t[u+2]=t[u+1];case 1:t[u+1]=t[u];break;default:for(;f>0;)t[u+f]=t[u+f-1],f--}t[u]=a}}function Hn(t,n,i,r,e,o){var a=0,u=0,s=1;if(o(t,n[i+e])>0){for(u=r-e;s<u&&o(t,n[i+e+s])>0;)a=s,(s=1+(s<<1))<=0&&(s=u);s>u&&(s=u),a+=e,s+=e}else{for(u=e+1;s<u&&o(t,n[i+e-s])<=0;)a=s,(s=1+(s<<1))<=0&&(s=u);s>u&&(s=u);var f=a;a=e-s,s=e-f}for(a++;a<s;){var h=a+(s-a>>>1);o(t,n[i+h])>0?a=h+1:s=h}return s}function Un(t,n,i,r,e,o){var a=0,u=0,s=1;if(o(t,n[i+e])<0){for(u=e+1;s<u&&o(t,n[i+e-s])<0;)a=s,(s=1+(s<<1))<=0&&(s=u);s>u&&(s=u);var f=a;a=e-s,s=e-f}else{for(u=r-e;s<u&&o(t,n[i+e+s])>=0;)a=s,(s=1+(s<<1))<=0&&(s=u);s>u&&(s=u),a+=e,s+=e}for(a++;a<s;){var h=a+(s-a>>>1);o(t,n[i+h])<0?s=h:a=h+1}return s}function Gn(t,n,i,r){i||(i=0),r||(r=t.length);var e=r-i;if(!(e<2)){var o=0;if(e<32)Wn(t,i,r,i+(o=Vn(t,i,r,n)),n);else{var a=function(t,n){var i,r,e=7,o=0,a=[];function u(u){var s=i[u],f=r[u],h=i[u+1],l=r[u+1];r[u]=f+l,u===o-3&&(i[u+1]=i[u+2],r[u+1]=r[u+2]),o--;var c=Un(t[h],t,s,f,0,n);s+=c,0!=(f-=c)&&0!==(l=Hn(t[s+f-1],t,h,l,l-1,n))&&(f<=l?function(i,r,o,u){var s=0;for(s=0;s<r;s++)a[s]=t[i+s];var f=0,h=o,l=i;if(t[l++]=t[h++],0!=--u)if(1!==r){for(var c,v,d,m=e;;){c=0,v=0,d=!1;do{if(n(t[h],a[f])<0){if(t[l++]=t[h++],v++,c=0,0==--u){d=!0;break}}else if(t[l++]=a[f++],c++,v=0,1==--r){d=!0;break}}while((c|v)<m);if(d)break;do{if(0!==(c=Un(t[h],a,f,r,0,n))){for(s=0;s<c;s++)t[l+s]=a[f+s];if(l+=c,f+=c,(r-=c)<=1){d=!0;break}}if(t[l++]=t[h++],0==--u){d=!0;break}if(0!==(v=Hn(a[f],t,h,u,0,n))){for(s=0;s<v;s++)t[l+s]=t[h+s];if(l+=v,h+=v,0==(u-=v)){d=!0;break}}if(t[l++]=a[f++],1==--r){d=!0;break}m--}while(c>=7||v>=7);if(d)break;m<0&&(m=0),m+=2}if((e=m)<1&&(e=1),1===r){for(s=0;s<u;s++)t[l+s]=t[h+s];t[l+u]=a[f]}else{if(0===r)throw new Error;for(s=0;s<r;s++)t[l+s]=a[f+s]}}else{for(s=0;s<u;s++)t[l+s]=t[h+s];t[l+u]=a[f]}else for(s=0;s<r;s++)t[l+s]=a[f+s]}(s,f,h,l):function(i,r,o,u){var s=0;for(s=0;s<u;s++)a[s]=t[o+s];var f=i+r-1,h=u-1,l=o+u-1,c=0,v=0;if(t[l--]=t[f--],0!=--r)if(1!==u){for(var d=e;;){var m=0,p=0,y=!1;do{if(n(a[h],t[f])<0){if(t[l--]=t[f--],m++,p=0,0==--r){y=!0;break}}else if(t[l--]=a[h--],p++,m=0,1==--u){y=!0;break}}while((m|p)<d);if(y)break;do{if(0!=(m=r-Un(a[h],t,i,r,r-1,n))){for(r-=m,v=1+(l-=m),c=1+(f-=m),s=m-1;s>=0;s--)t[v+s]=t[c+s];if(0===r){y=!0;break}}if(t[l--]=a[h--],1==--u){y=!0;break}if(0!=(p=u-Hn(t[f],a,0,u,u-1,n))){for(u-=p,v=1+(l-=p),c=1+(h-=p),s=0;s<p;s++)t[v+s]=a[c+s];if(u<=1){y=!0;break}}if(t[l--]=t[f--],0==--r){y=!0;break}d--}while(m>=7||p>=7);if(y)break;d<0&&(d=0),d+=2}if((e=d)<1&&(e=1),1===u){for(v=1+(l-=r),c=1+(f-=r),s=r-1;s>=0;s--)t[v+s]=t[c+s];t[l]=a[h]}else{if(0===u)throw new Error;for(c=l-(u-1),s=0;s<u;s++)t[c+s]=a[s]}}else{for(v=1+(l-=r),c=1+(f-=r),s=r-1;s>=0;s--)t[v+s]=t[c+s];t[l]=a[h]}else for(c=l-(u-1),s=0;s<u;s++)t[c+s]=a[s]}(s,f,h,l))}return i=[],r=[],{mergeRuns:function(){for(;o>1;){var t=o-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]<r[t+1]&&t--;else if(r[t]>r[t+1])break;u(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&r[t-1]<r[t+1]&&t--,u(t)}},pushRun:function(t,n){i[o]=t,r[o]=n,o+=1}}}(t,n),u=function(t){for(var n=0;t>=32;)n|=1&t,t>>=1;return t+n}(e);do{if((o=Vn(t,i,r,n))<u){var s=e;s>u&&(s=u),Wn(t,i,i+s,i+o,n),o=s}a.pushRun(i,o),a.mergeRuns(),e-=o,i+=o}while(0!==e);a.forceMergeRuns()}}}z(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Rn.prototype[t]=function(n){var i,r,e=n.zrX,o=n.zrY,a=Fn(this,e,o);if("mouseup"===t&&a||(r=(i=this.findHover(e,o)).target),"mousedown"===t)this._downEl=r,this._downPoint=[n.zrX,n.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Tt(this._downPoint,[n.zrX,n.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,n)}}));var jn=!1;function Yn(){jn||(jn=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Xn(t,n){return t.zlevel===n.zlevel?t.z===n.z?t.z2-n.z2:t.z-n.z:t.zlevel-n.zlevel}var qn,Zn=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Xn}return t.prototype.traverse=function(t,n){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,n)},t.prototype.getDisplayList=function(t,n){n=n||!1;var i=this._displayList;return!t&&i.length||this.updateDisplayList(n),i},t.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var n=this._roots,i=this._displayList,r=0,e=n.length;r<e;r++)this._updateAndAddDisplayable(n[r],null,t);i.length=this._displayListLen,Gn(i,Xn)},t.prototype._updateAndAddDisplayable=function(t,n,i){if(!t.ignore||i){t.beforeUpdate(),t.update(),t.afterUpdate();var r=t.getClipPath(),e=n&&n.length,o=0,a=t.__clipPaths;if(!t.ignoreClip&&(e||r)){if(a||(a=t.__clipPaths=[]),e)for(var u=0;u<n.length;u++)a[o++]=n[u];for(var s=r,f=t;s;)s.parent=f,s.updateTransform(),a[o++]=s,f=s,s=s.getClipPath()}if(a&&(a.length=o),t.childrenRef){for(var h=t.childrenRef(),l=0;l<h.length;l++){var c=h[l];t.__dirty&&(c.__dirty|=1),this._updateAndAddDisplayable(c,a,i)}t.__dirty=0}else{var v=t;isNaN(v.z)&&(Yn(),v.z=0),isNaN(v.z2)&&(Yn(),v.z2=0),isNaN(v.zlevel)&&(Yn(),v.zlevel=0),this._displayList[this._displayListLen++]=v}var d=t.getDecalElement&&t.getDecalElement();d&&this._updateAndAddDisplayable(d,a,i);var m=t.getTextGuideLine();m&&this._updateAndAddDisplayable(m,a,i);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,a,i)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var n=0,i=t.length;n<i;n++)this.delRoot(t[n]);else{var r=D(this._roots,t);r>=0&&this._roots.splice(r,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}();qn=u.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var $n={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 n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4))},elasticOut:function(t){var n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var n,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,n=.1):n=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var n=1.70158;return t*t*((n+1)*t-n)},backOut:function(t){var n=1.70158;return--t*t*((n+1)*t+n)+1},backInOut:function(t){var n=2.5949095;return(t*=2)<1?t*t*((n+1)*t-n)*.5:.5*((t-=2)*t*((n+1)*t+n)+2)},bounceIn:function(t){return 1-$n.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*$n.bounceIn(2*t):.5*$n.bounceOut(2*t-1)+.5}},Kn=Math.pow,Jn=Math.sqrt,Qn=1e-4,ti=Jn(3),ni=1/3,ii=gt(),ri=gt(),ei=gt();function oi(t){return t>-1e-8&&t<1e-8}function ai(t){return t>1e-8||t<-1e-8}function ui(t,n,i,r,e){var o=1-e;return o*o*(o*t+3*e*n)+e*e*(e*r+3*o*i)}function si(t,n,i,r,e){var o=1-e;return 3*(((n-t)*o+2*(i-n)*e)*o+(r-i)*e*e)}function fi(t,n,i,r,e,o){var a=r+3*(n-i)-t,u=3*(i-2*n+t),s=3*(n-t),f=t-e,h=u*u-3*a*s,l=u*s-9*a*f,c=s*s-3*u*f,v=0;if(oi(h)&&oi(l))oi(u)?o[0]=0:(k=-s/u)>=0&&k<=1&&(o[v++]=k);else{var d=l*l-4*h*c;if(oi(d)){var m=l/h,p=-m/2;(k=-u/a+m)>=0&&k<=1&&(o[v++]=k),p>=0&&p<=1&&(o[v++]=p)}else if(d>0){var y=Jn(d),g=h*u+1.5*a*(-l+y),b=h*u+1.5*a*(-l-y);(k=(-u-((g=g<0?-Kn(-g,ni):Kn(g,ni))+(b=b<0?-Kn(-b,ni):Kn(b,ni))))/(3*a))>=0&&k<=1&&(o[v++]=k)}else{var w=(2*h*u-3*a*l)/(2*Jn(h*h*h)),x=Math.acos(w)/3,M=Jn(h),S=Math.cos(x),k=(-u-2*M*S)/(3*a),T=(p=(-u+M*(S+ti*Math.sin(x)))/(3*a),(-u+M*(S-ti*Math.sin(x)))/(3*a));k>=0&&k<=1&&(o[v++]=k),p>=0&&p<=1&&(o[v++]=p),T>=0&&T<=1&&(o[v++]=T)}}return v}function hi(t,n,i,r,e){var o=6*i-12*n+6*t,a=9*n+3*r-3*t-9*i,u=3*n-3*t,s=0;if(oi(a))ai(o)&&(h=-u/o)>=0&&h<=1&&(e[s++]=h);else{var f=o*o-4*a*u;if(oi(f))e[0]=-o/(2*a);else if(f>0){var h,l=Jn(f),c=(-o-l)/(2*a);(h=(-o+l)/(2*a))>=0&&h<=1&&(e[s++]=h),c>=0&&c<=1&&(e[s++]=c)}}return s}function li(t,n,i,r,e,o){var a=(n-t)*e+t,u=(i-n)*e+n,s=(r-i)*e+i,f=(u-a)*e+a,h=(s-u)*e+u,l=(h-f)*e+f;o[0]=t,o[1]=a,o[2]=f,o[3]=l,o[4]=l,o[5]=h,o[6]=s,o[7]=r}function ci(t,n,i,r,e,o,a,u,s){for(var f=t,h=n,l=0,c=1/s,v=1;v<=s;v++){var d=v*c,m=ui(t,i,e,a,d),p=ui(n,r,o,u,d),y=m-f,g=p-h;l+=Math.sqrt(y*y+g*g),f=m,h=p}return l}function vi(t,n,i,r){var e=1-r;return e*(e*t+2*r*n)+r*r*i}function di(t,n,i,r){return 2*((1-r)*(n-t)+r*(i-n))}function mi(t,n,i){var r=t+i-2*n;return 0===r?.5:(t-n)/r}function pi(t,n,i,r,e){var o=(n-t)*r+t,a=(i-n)*r+n,u=(a-o)*r+o;e[0]=t,e[1]=o,e[2]=u,e[3]=u,e[4]=a,e[5]=i}function yi(t,n,i,r,e,o,a){for(var u=t,s=n,f=0,h=1/a,l=1;l<=a;l++){var c=l*h,v=vi(t,i,e,c),d=vi(n,r,o,c),m=v-u,p=d-s;f+=Math.sqrt(m*m+p*p),u=v,s=d}return f}var gi=/cubic-bezier\(([0-9,\.e ]+)\)/;function bi(t){var n=t&&gi.exec(t);if(n){var i=n[1].split(","),r=+ot(i[0]),e=+ot(i[1]),o=+ot(i[2]),a=+ot(i[3]);if(isNaN(r+e+o+a))return;var u=[];return function(t){return t<=0?0:t>=1?1:fi(0,r,o,1,t,u)&&ui(0,e,a,1,u[0])}}}var wi=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||pt,this.ondestroy=t.ondestroy||pt,this.onrestart=t.onrestart||pt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,n){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,r=t-this._startTime-this._pausedTime,e=r/i;e<0&&(e=0),e=Math.min(e,1);var o=this.easingFunc,a=o?o(e):e;if(this.onframe(a),1===e){if(!this.loop)return!0;this._startTime=t-r%i,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=n},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=U(t)?t:$n[t]||bi(t)},t}(),xi=function(t){this.value=t},Mi=function(){function t(){this._len=0}return t.prototype.insert=function(t){var n=new xi(t);return this.insertEntry(n),n},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var n=t.prev,i=t.next;n?n.next=i:this.head=i,i?i.prev=n:this.tail=n,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Si=function(){function t(t){this._list=new Mi,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,n){var i=this._list,r=this._map,e=null;if(null==r[t]){var o=i.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var u=i.head;i.remove(u),delete r[u.key],e=u.value,this._lastRemovedEntry=u}a?a.value=n:a=new xi(n),a.key=t,i.insertEntry(a),r[t]=a}return e},t.prototype.get=function(t){var n=this._map[t],i=this._list;if(null!=n)return n!==i.tail&&(i.remove(n),i.insertEntry(n)),n.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),ki={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 Ti(t){return(t=Math.round(t))<0?0:t>255?255:t}function Ai(t){return t<0?0:t>1?1:t}function Ni(t){var n=t;return n.length&&"%"===n.charAt(n.length-1)?Ti(parseFloat(n)/100*255):Ti(parseInt(n,10))}function Li(t){var n=t;return n.length&&"%"===n.charAt(n.length-1)?Ai(parseFloat(n)/100):Ai(parseFloat(n))}function Ci(t,n,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(n-t)*i*6:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t}function Ii(t,n,i){return t+(n-t)*i}function Oi(t,n,i,r,e){return t[0]=n,t[1]=i,t[2]=r,t[3]=e,t}function Di(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}var _i=new Si(20),Ei=null;function zi(t,n){Ei&&Di(Ei,n),Ei=_i.put(t,Ei||n.slice())}function Ri(t,n){if(t){n=n||[];var i=_i.get(t);if(i)return Di(n,i);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in ki)return Di(n,ki[r]),zi(t,n),n;var e,o=r.length;if("#"===r.charAt(0))return 4===o||5===o?(e=parseInt(r.slice(1,4),16))>=0&&e<=4095?(Oi(n,(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,5===o?parseInt(r.slice(4),16)/15:1),zi(t,n),n):void Oi(n,0,0,0,1):7===o||9===o?(e=parseInt(r.slice(1,7),16))>=0&&e<=16777215?(Oi(n,(16711680&e)>>16,(65280&e)>>8,255&e,9===o?parseInt(r.slice(7),16)/255:1),zi(t,n),n):void Oi(n,0,0,0,1):void 0;var a=r.indexOf("("),u=r.indexOf(")");if(-1!==a&&u+1===o){var s=r.substr(0,a),f=r.substr(a+1,u-(a+1)).split(","),h=1;switch(s){case"rgba":if(4!==f.length)return 3===f.length?Oi(n,+f[0],+f[1],+f[2],1):Oi(n,0,0,0,1);h=Li(f.pop());case"rgb":return f.length>=3?(Oi(n,Ni(f[0]),Ni(f[1]),Ni(f[2]),3===f.length?h:Li(f[3])),zi(t,n),n):void Oi(n,0,0,0,1);case"hsla":return 4!==f.length?void Oi(n,0,0,0,1):(f[3]=Li(f[3]),Pi(f,n),zi(t,n),n);case"hsl":return 3!==f.length?void Oi(n,0,0,0,1):(Pi(f,n),zi(t,n),n);default:return}}Oi(n,0,0,0,1)}}function Pi(t,n){var i=(parseFloat(t[0])%360+360)%360/360,r=Li(t[1]),e=Li(t[2]),o=e<=.5?e*(r+1):e+r-e*r,a=2*e-o;return Oi(n=n||[],Ti(255*Ci(a,o,i+1/3)),Ti(255*Ci(a,o,i)),Ti(255*Ci(a,o,i-1/3)),1),4===t.length&&(n[3]=t[3]),n}function Bi(t,n){var i=Ri(t);if(i){for(var r=0;r<3;r++)i[r]=i[r]*(1-n)|0,i[r]>255?i[r]=255:i[r]<0&&(i[r]=0);return Vi(i,4===i.length?"rgba":"rgb")}}function Fi(t,n,i,r){var e=Ri(t);if(t)return e=function(t){if(t){var n,i,r=t[0]/255,e=t[1]/255,o=t[2]/255,a=Math.min(r,e,o),u=Math.max(r,e,o),s=u-a,f=(u+a)/2;if(0===s)n=0,i=0;else{i=f<.5?s/(u+a):s/(2-u-a);var h=((u-r)/6+s/2)/s,l=((u-e)/6+s/2)/s,c=((u-o)/6+s/2)/s;r===u?n=c-l:e===u?n=1/3+h-c:o===u&&(n=2/3+l-h),n<0&&(n+=1),n>1&&(n-=1)}var v=[360*n,i,f];return null!=t[3]&&v.push(t[3]),v}}(e),null!=i&&(e[1]=Li(U(i)?i(e[1]):i)),null!=r&&(e[2]=Li(U(r)?r(e[2]):r)),Vi(Pi(e),"rgba")}function Vi(t,n){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==n&&"hsva"!==n&&"hsla"!==n||(i+=","+t[3]),n+"("+i+")"}}function Wi(t,n){var i=Ri(t);return i?(.299*i[0]+.587*i[1]+.114*i[2])*i[3]/255+(1-i[3])*n:0}var Hi=new Si(100);function Ui(t){if(G(t)){var n=Hi.get(t);return n||(n=Bi(t,-.1),Hi.put(t,n)),n}if(K(t)){var i=I({},t);return i.colorStops=R(t.colorStops,(function(t){return{offset:t.offset,color:Bi(t.color,-.1)}})),i}return t}"undefined"!=typeof Buffer&&Buffer;var Gi=Array.prototype.slice;function ji(t,n,i){return(n-t)*i+t}function Yi(t,n,i,r){for(var e=n.length,o=0;o<e;o++)t[o]=ji(n[o],i[o],r);return t}function Xi(t,n,i,r){for(var e=n.length,o=0;o<e;o++)t[o]=n[o]+i[o]*r;return t}function qi(t,n,i,r){for(var e=n.length,o=e&&n[0].length,a=0;a<e;a++){t[a]||(t[a]=[]);for(var u=0;u<o;u++)t[a][u]=n[a][u]+i[a][u]*r}return t}function Zi(t,n){for(var i=t.length,r=n.length,e=i>r?n:t,o=Math.min(i,r),a=e[o-1]||{color:[0,0,0,0],offset:0},u=o;u<Math.max(i,r);u++)e.push({offset:a.offset,color:a.color.slice()})}function $i(t,n,i){var r=t,e=n;if(r.push&&e.push){var o=r.length,a=e.length;if(o!==a)if(o>a)r.length=a;else for(var u=o;u<a;u++)r.push(1===i?e[u]:Gi.call(e[u]));var s=r[0]&&r[0].length;for(u=0;u<r.length;u++)if(1===i)isNaN(r[u])&&(r[u]=e[u]);else for(var f=0;f<s;f++)isNaN(r[u][f])&&(r[u][f]=e[u][f])}}function Ki(t){if(E(t)){var n=t.length;if(E(t[0])){for(var i=[],r=0;r<n;r++)i.push(Gi.call(t[r]));return i}return Gi.call(t)}return t}function Ji(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function Qi(t){return 4===t||5===t}function tr(t){return 1===t||2===t}var nr=[0,0,0,0],ir=function(){function t(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,n,i){this._needsSort=!0;var r=this.keyframes,e=r.length,o=!1,a=6,u=n;if(E(n)){var s=function(t){return E(t&&t[0])?2:1}(n);a=s,(1===s&&!Y(n[0])||2===s&&!Y(n[0][0]))&&(o=!0)}else if(Y(n)&&!J(n))a=0;else if(G(n))if(isNaN(+n)){var f=Ri(n);f&&(u=f,a=3)}else a=0;else if(K(n)){var h=I({},u);h.colorStops=R(n.colorStops,(function(t){return{offset:t.offset,color:Ri(t.color)}})),"linear"===n.type?a=4:"radial"===n.type&&(a=5),u=h}0===e?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var l={time:t,value:u,rawValue:n,percent:0};return i&&(l.easing=i,l.easingFunc=U(i)?i:$n[i]||bi(i)),r.push(l),l},t.prototype.prepare=function(t,n){var i=this.keyframes;this._needsSort&&i.sort((function(t,n){return t.time-n.time}));for(var r=this.valType,e=i.length,o=i[e-1],a=this.discrete,u=tr(r),s=Qi(r),f=0;f<e;f++){var h=i[f],l=h.value,c=o.value;h.percent=h.time/t,a||(u&&f!==e-1?$i(l,c,r):s&&Zi(l.colorStops,c.colorStops))}if(!a&&5!==r&&n&&this.needsAnimate()&&n.needsAnimate()&&r===n.valType&&!n._finished){this._additiveTrack=n;var v=i[0].value;for(f=0;f<e;f++)0===r?i[f].additiveValue=i[f].value-v:3===r?i[f].additiveValue=Xi([],i[f].value,v,-1):tr(r)&&(i[f].additiveValue=1===r?Xi([],i[f].value,v,-1):qi([],i[f].value,v,-1))}},t.prototype.step=function(t,n){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i,r,e,o=null!=this._additiveTrack,a=o?"additiveValue":"value",u=this.valType,s=this.keyframes,f=s.length,h=this.propName,l=3===u,c=this._lastFr,v=Math.min;if(1===f)r=e=s[0];else{if(n<0)i=0;else if(n<this._lastFrP){for(i=v(c+1,f-1);i>=0&&!(s[i].percent<=n);i--);i=v(i,f-2)}else{for(i=c;i<f&&!(s[i].percent>n);i++);i=v(i-1,f-2)}e=s[i+1],r=s[i]}if(r&&e){this._lastFr=i,this._lastFrP=n;var d=e.percent-r.percent,m=0===d?1:v((n-r.percent)/d,1);e.easingFunc&&(m=e.easingFunc(m));var p=o?this._additiveValue:l?nr:t[h];if(!tr(u)&&!l||p||(p=this._additiveValue=[]),this.discrete)t[h]=m<1?r.rawValue:e.rawValue;else if(tr(u))1===u?Yi(p,r[a],e[a],m):function(t,n,i,r){for(var e=n.length,o=e&&n[0].length,a=0;a<e;a++){t[a]||(t[a]=[]);for(var u=0;u<o;u++)t[a][u]=ji(n[a][u],i[a][u],r)}}(p,r[a],e[a],m);else if(Qi(u)){var y=r[a],g=e[a],b=4===u;t[h]={type:b?"linear":"radial",x:ji(y.x,g.x,m),y:ji(y.y,g.y,m),colorStops:R(y.colorStops,(function(t,n){var i=g.colorStops[n];return{offset:ji(t.offset,i.offset,m),color:Ji(Yi([],t.color,i.color,m))}})),global:g.global},b?(t[h].x2=ji(y.x2,g.x2,m),t[h].y2=ji(y.y2,g.y2,m)):t[h].r=ji(y.r,g.r,m)}else if(l)Yi(p,r[a],e[a],m),o||(t[h]=Ji(p));else{var w=ji(r[a],e[a],m);o?this._additiveValue=w:t[h]=w}o&&this._addToTarget(t)}}},t.prototype._addToTarget=function(t){var n=this.valType,i=this.propName,r=this._additiveValue;0===n?t[i]=t[i]+r:3===n?(Ri(t[i],nr),Xi(nr,nr,r,1),t[i]=Ji(nr)):1===n?Xi(t[i],t[i],r,1):2===n&&qi(t[i],t[i],r,1)},t}(),rr=function(){function t(t,n,i,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=n,n&&r?N("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=i)}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,n,i){return this.whenWithKeys(t,n,F(n),i)},t.prototype.whenWithKeys=function(t,n,i,r){for(var e=this._tracks,o=0;o<i.length;o++){var a=i[o],u=e[a];if(!u){u=e[a]=new ir(a);var s=void 0,f=this._getAdditiveTrack(a);if(f){var h=f.keyframes,l=h[h.length-1];s=l&&l.value,3===f.valType&&s&&(s=Ji(s))}else s=this._target[a];if(null==s)continue;t>0&&u.addKeyframe(0,Ki(s),r),this._trackKeys.push(a)}u.addKeyframe(t,Ki(n[a]),r)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var n=t.length,i=0;i<n;i++)t[i].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,n=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,n)for(var i=0;i<n.length;i++)n[i].call(this)},t.prototype._setTracksFinished=function(){for(var t=this._tracks,n=this._trackKeys,i=0;i<n.length;i++)t[n[i]].setFinished()},t.prototype._getAdditiveTrack=function(t){var n,i=this._additiveAnimators;if(i)for(var r=0;r<i.length;r++){var e=i[r].getTrack(t);e&&(n=e)}return n},t.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var n=this,i=[],r=this._maxTime||0,e=0;e<this._trackKeys.length;e++){var o=this._trackKeys[e],a=this._tracks[o],u=this._getAdditiveTrack(o),s=a.keyframes,f=s.length;if(a.prepare(r,u),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var h=s[f-1];h&&(n._target[a.propName]=h.rawValue),a.setFinished()}else i.push(a)}if(i.length||this._force){var l=new wi({life:r,loop:this._loop,delay:this._delay||0,onframe:function(t){n._started=2;var r=n._additiveAnimators;if(r){for(var e=!1,o=0;o<r.length;o++)if(r[o]._clip){e=!0;break}e||(n._additiveAnimators=null)}for(o=0;o<i.length;o++)i[o].step(n._target,t);var a=n._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](n._target,t)},ondestroy:function(){n._doneCallback()}});this._clip=l,this.animation&&this.animation.addClip(l),t&&l.setEasing(t)}else this._doneCallback();return this}},t.prototype.stop=function(t){this._clip&&(t&&this._clip.onframe(1),this._abortedCallback())},t.prototype.delay=function(t){return this._delay=t,this},t.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},t.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},t.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(t){return this._tracks[t]},t.prototype.getTracks=function(){var t=this;return R(this._trackKeys,(function(n){return t._tracks[n]}))},t.prototype.stopTracks=function(t,n){if(!t.length||!this._clip)return!0;for(var i=this._tracks,r=this._trackKeys,e=0;e<t.length;e++){var o=i[t[e]];o&&!o.isFinished()&&(n?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(e=0;e<r.length;e++)if(!i[r[e]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveTo=function(t,n,i){if(t){n=n||this._trackKeys;for(var r=0;r<n.length;r++){var e=n[r],o=this._tracks[e];if(o&&!o.isFinished()){var a=o.keyframes,u=a[i?0:a.length-1];u&&(t[e]=Ki(u.rawValue))}}}},t.prototype.__changeFinalValue=function(t,n){n=n||F(t);for(var i=0;i<n.length;i++){var r=n[i],e=this._tracks[r];if(e){var o=e.keyframes;if(o.length>1){var a=o.pop();e.addKeyframe(a.time,t[r]),e.prepare(this._maxTime,e.getAdditiveTrack())}}}},t}();function er(){return(new Date).getTime()}var or,ar,ur=function(t){function n(n){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,i.stage=(n=n||{}).stage||{},i}return o(n,t),n.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},n.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},n.prototype.removeClip=function(t){if(t.animation){var n=t.prev,i=t.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},n.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},n.prototype.update=function(t){for(var n=er()-this._pausedTime,i=n-this._time,r=this._head;r;){var e=r.next;r.step(n,i)?(r.ondestroy(),this.removeClip(r),r=e):r=e}this._time=n,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},n.prototype._startLoop=function(){var t=this;this._running=!0,qn((function n(){t._running&&(qn(n),!t._paused&&t.update())}))},n.prototype.start=function(){this._running||(this._time=er(),this._pausedTime=0,this._startLoop())},n.prototype.stop=function(){this._running=!1},n.prototype.pause=function(){this._paused||(this._pauseStart=er(),this._paused=!0)},n.prototype.resume=function(){this._paused&&(this._pausedTime+=er()-this._pauseStart,this._paused=!1)},n.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},n.prototype.isFinished=function(){return null==this._head},n.prototype.animate=function(t,n){n=n||{},this.start();var i=new rr(t,n.loop);return this.addAnimator(i),i},n}(Dt),sr=u.domSupported,fr=(ar={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:or=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:R(or,(function(t){var n=t.replace("mouse","pointer");return ar.hasOwnProperty(n)?n:t}))}),hr=["mousemove","mouseup"],lr=["pointermove","pointerup"],cr=!1;function vr(t){var n=t.pointerType;return"pen"===n||"touch"===n}function dr(t){t&&(t.zrByTouch=!0)}function mr(t,n){for(var i=n,r=!1;i&&9!==i.nodeType&&!(r=i.domBelongToZr||i!==n&&i===t.painterRoot);)i=i.parentNode;return r}var pr=function(t,n){this.stopPropagation=pt,this.stopImmediatePropagation=pt,this.preventDefault=pt,this.type=n.type,this.target=this.currentTarget=t.dom,this.pointerType=n.pointerType,this.clientX=n.clientX,this.clientY=n.clientY},yr={mousedown:function(t){t=Zt(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Zt(this.dom,t);var n=this.__mayPointerCapture;!n||t.zrX===n[0]&&t.zrY===n[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Zt(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){mr(this,(t=Zt(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){cr=!0,t=Zt(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){cr||(t=Zt(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){dr(t=Zt(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),yr.mousemove.call(this,t),yr.mousedown.call(this,t)},touchmove:function(t){dr(t=Zt(this.dom,t)),this.handler.processGesture(t,"change"),yr.mousemove.call(this,t)},touchend:function(t){dr(t=Zt(this.dom,t)),this.handler.processGesture(t,"end"),yr.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&yr.click.call(this,t)},pointerdown:function(t){yr.mousedown.call(this,t)},pointermove:function(t){vr(t)||yr.mousemove.call(this,t)},pointerup:function(t){yr.mouseup.call(this,t)},pointerout:function(t){vr(t)||yr.mouseout.call(this,t)}};z(["click","dblclick","contextmenu"],(function(t){yr[t]=function(n){n=Zt(this.dom,n),this.trigger(t,n)}}));var gr={pointermove:function(t){vr(t)||gr.mousemove.call(this,t)},pointerup:function(t){gr.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var n=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),n&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function br(t,n,i,r){t.mounted[n]=i,t.listenerOpts[n]=r,function(t,n,i,r){t.addEventListener(n,i,r)}(t.domTarget,n,i,r)}function wr(t){var n=t.mounted;for(var i in n)n.hasOwnProperty(i)&&t.domTarget.removeEventListener(i,n[i],t.listenerOpts[i]);t.mounted={}}var xr=function(t,n){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=n},Mr=function(t){function n(n,i){var r,e,o,a=t.call(this)||this;return a.__pointerCapturing=!1,a.dom=n,a.painterRoot=i,a._localHandlerScope=new xr(n,yr),sr&&(a._globalHandlerScope=new xr(document,gr)),r=a,o=(e=a._localHandlerScope).domHandlers,u.pointerEventsSupported?z(fr.pointer,(function(t){br(e,t,(function(n){o[t].call(r,n)}))})):(u.touchEventsSupported&&z(fr.touch,(function(t){br(e,t,(function(n){o[t].call(r,n),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),z(fr.mouse,(function(t){br(e,t,(function(n){n=qt(n),e.touching||o[t].call(r,n)}))}))),a}return o(n,t),n.prototype.dispose=function(){wr(this._localHandlerScope),sr&&wr(this._globalHandlerScope)},n.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},n.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,sr&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?function(t,n){function i(i){br(n,i,(function(r){r=qt(r),mr(t,r.target)||(r=function(t,n){return Zt(t.dom,new pr(t,n),!0)}(t,r),n.domHandlers[i].call(t,r))}),{capture:!0})}u.pointerEventsSupported?z(lr,i):u.touchEventsSupported||z(hr,i)}(this,n):wr(n)}},n}(Dt),Sr=1;u.hasGlobalWindow&&(Sr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var kr=Sr,Tr="#333",Ar="#ccc",Nr=tn;function Lr(t){return t>5e-5||t<-5e-5}var Cr,Ir=[],Or=[],Dr=[1,0,0,1,0,0],_r=Math.abs,Er=function(){function t(){}var n;return t.prototype.getLocalTransform=function(t){return zr(this,t)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Lr(this.rotation)||Lr(this.x)||Lr(this.y)||Lr(this.scaleX-1)||Lr(this.scaleY-1)||Lr(this.skewX)||Lr(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,n=this.needLocalTransform(),i=this.transform;n||t?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):Nr(i),t&&(n?rn(i,t,i):nn(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i),this.invTransform=this.invTransform||[1,0,0,1,0,0],an(this.invTransform,i)):i&&(Nr(i),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var n=this.globalScaleRatio;if(null!=n&&1!==n){this.getGlobalScale(Ir);var i=Ir[0]<0?-1:1,r=Ir[1]<0?-1:1,e=((Ir[0]-i)*n+i)/Ir[0]||0,o=((Ir[1]-r)*n+r)/Ir[1]||0;t[0]*=e,t[1]*=e,t[2]*=o,t[3]*=o}},t.prototype.getComputedTransform=function(){for(var t=this,n=[];t;)n.push(t),t=t.parent;for(;t=n.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var n=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),e=Math.PI/2+r-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(e),n=Math.sqrt(n),this.skewX=e,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,n=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],rn(Or,t.invTransform,n),n=Or);var i=this.originX,r=this.originY;(i||r)&&(Dr[4]=i,Dr[5]=r,rn(Or,n,Dr),Or[4]-=i,Or[5]-=r,n=Or),this.setLocalTransform(n)}},t.prototype.getGlobalScale=function(t){var n=this.transform;return t=t||[],n?(t[0]=Math.sqrt(n[0]*n[0]+n[1]*n[1]),t[1]=Math.sqrt(n[2]*n[2]+n[3]*n[3]),n[0]<0&&(t[0]=-t[0]),n[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,n){var i=[t,n],r=this.invTransform;return r&&Nt(i,i,r),i},t.prototype.transformCoordToGlobal=function(t,n){var i=[t,n],r=this.transform;return r&&Nt(i,i,r),i},t.prototype.getLineScale=function(){var t=this.transform;return t&&_r(t[0]-1)>1e-10&&_r(t[3]-1)>1e-10?Math.sqrt(_r(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){Pr(this,t)},t.getLocalTransform=function(t,n){n=n||[];var i=t.originX||0,r=t.originY||0,e=t.scaleX,o=t.scaleY,a=t.anchorX,u=t.anchorY,s=t.rotation||0,f=t.x,h=t.y,l=t.skewX?Math.tan(t.skewX):0,c=t.skewY?Math.tan(-t.skewY):0;if(i||r||a||u){var v=i+a,d=r+u;n[4]=-v*e-l*d*o,n[5]=-d*o-c*v*e}else n[4]=n[5]=0;return n[0]=e,n[3]=o,n[1]=c*e,n[2]=l*o,s&&on(n,n,s),n[4]+=i+f,n[5]+=r+h,n},t.initDefaultProps=((n=t.prototype).scaleX=n.scaleY=n.globalScaleRatio=1,void(n.x=n.y=n.originX=n.originY=n.skewX=n.skewY=n.rotation=n.anchorX=n.anchorY=0)),t}(),zr=Er.getLocalTransform,Rr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Pr(t,n){return function(t,n,i){t=t||{};for(var r=0;r<i.length;r++){var e=i[r];t[e]=n[e]}return t}(t,n,Rr)}function Br(t){Cr||(Cr=new Si(100));var n=Cr.get(t=t||h);return n||(n={font:t,strWidthCache:new Si(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:c.measureText("国",t).width,asciiCharWidth:c.measureText("a",t).width},Cr.put(t,n)),n}var Fr=0;function Vr(t,n){return t.asciiWidthMapTried||(t.asciiWidthMap=function(t){if(!(Fr>=5)){t=t||h;for(var n=[],i=+new Date,r=0;r<=127;r++)n[r]=c.measureText(String.fromCharCode(r),t).width;var e=+new Date-i;return e>16?Fr=5:e>2&&Fr++,n}}(t.font),t.asciiWidthMapTried=!0),0<=n&&n<=127?null!=t.asciiWidthMap?t.asciiWidthMap[n]:t.asciiCharWidth:t.stWideCharWidth}function Wr(t,n){var i=t.strWidthCache,r=i.get(n);return null==r&&(r=c.measureText(n,t.font).width,i.put(n,r)),r}function Hr(t,n,i,r){var e=Wr(Br(n),t),o=Yr(n),a=Gr(0,e,i),u=jr(0,o,r);return new xn(a,u,e,o)}function Ur(t,n,i,r){var e=((t||"")+"").split("\n");if(1===e.length)return Hr(e[0],n,i,r);for(var o=new xn(0,0,0,0),a=0;a<e.length;a++){var u=Hr(e[a],n,i,r);0===a?o.copy(u):o.union(u)}return o}function Gr(t,n,i,r){return"right"===i?r?t+=n:t-=n:"center"===i&&(r?t+=n/2:t-=n/2),t}function jr(t,n,i,r){return"middle"===i?r?t+=n/2:t-=n/2:"bottom"===i&&(r?t+=n:t-=n),t}function Yr(t){return Br(t).stWideCharWidth}function Xr(t,n){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*n:parseFloat(t):t}function qr(t,n,i){var r=n.position||"inside",e=null!=n.distance?n.distance:5,o=i.height,a=i.width,u=o/2,s=i.x,f=i.y,h="left",l="top";if(r instanceof Array)s+=Xr(r[0],i.width),f+=Xr(r[1],i.height),h=null,l=null;else switch(r){case"left":s-=e,f+=u,h="right",l="middle";break;case"right":s+=e+a,f+=u,l="middle";break;case"top":s+=a/2,f-=e,h="center",l="bottom";break;case"bottom":s+=a/2,f+=o+e,h="center";break;case"inside":s+=a/2,f+=u,h="center",l="middle";break;case"insideLeft":s+=e,f+=u,l="middle";break;case"insideRight":s+=a-e,f+=u,h="right",l="middle";break;case"insideTop":s+=a/2,f+=e,h="center";break;case"insideBottom":s+=a/2,f+=o-e,h="center",l="bottom";break;case"insideTopLeft":s+=e,f+=e;break;case"insideTopRight":s+=a-e,f+=e,h="right";break;case"insideBottomLeft":s+=e,f+=o-e,l="bottom";break;case"insideBottomRight":s+=a-e,f+=o-e,h="right",l="bottom"}return(t=t||{}).x=s,t.y=f,t.align=h,t.verticalAlign=l,t}var Zr="__zr_normal__",$r=Rr.concat(["ignore"]),Kr=P(Rr,(function(t,n){return t[n]=!0,t}),{ignore:!1}),Jr={},Qr=new xn(0,0,0,0),te=[],ne=function(){function t(t){this.id=A(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,n){switch(this.draggable){case"horizontal":n=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=n,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var n=this._textContent;if(n&&(!n.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,r=i.local,e=n.innerTransformable,o=void 0,a=void 0,u=!1;e.parent=r?this:null;var s=!1;e.copyTransform(n);var f=null!=i.position,h=i.autoOverflowArea,l=void 0;if((h||f)&&((l=Qr).copy(i.layoutRect?i.layoutRect:this.getBoundingRect()),r||l.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(Jr,i,l):qr(Jr,i,l),e.x=Jr.x,e.y=Jr.y,o=Jr.align,a=Jr.verticalAlign;var c=i.origin;if(c&&null!=i.rotation){var v=void 0,d=void 0;"center"===c?(v=.5*l.width,d=.5*l.height):(v=Xr(c[0],l.width),d=Xr(c[1],l.height)),s=!0,e.originX=-e.x+v+(r?0:l.x),e.originY=-e.y+d+(r?0:l.y)}}null!=i.rotation&&(e.rotation=i.rotation);var m=i.offset;m&&(e.x+=m[0],e.y+=m[1],s||(e.originX=-m[0],e.originY=-m[1]));var p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var y=p.overflowRect=p.overflowRect||new xn(0,0,0,0);e.getLocalTransform(te),an(te,te),xn.copy(y,l),y.applyTransform(te)}else p.overflowRect=null;var g=void 0,b=void 0,w=void 0;(null==i.inside?"string"==typeof i.position&&i.position.indexOf("inside")>=0:i.inside)&&this.canBeInsideText()?(b=i.insideStroke,null!=(g=i.insideFill)&&"auto"!==g||(g=this.getInsideTextFill()),null!=b&&"auto"!==b||(b=this.getInsideTextStroke(g),w=!0)):(b=i.outsideStroke,null!=(g=i.outsideFill)&&"auto"!==g||(g=this.getOutsideFill()),null!=b&&"auto"!==b||(b=this.getOutsideStroke(g),w=!0)),(g=g||"#000")===p.fill&&b===p.stroke&&w===p.autoStroke&&o===p.align&&a===p.verticalAlign||(u=!0,p.fill=g,p.stroke=b,p.autoStroke=w,p.align=o,p.verticalAlign=a,n.setDefaultTextStyle(p)),n.__dirty|=1,u&&n.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ar:Tr},t.prototype.getOutsideStroke=function(){var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&Ri(t);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),e=0;e<3;e++)n[e]=n[e]*i+(r?0:255)*(1-i);return n[3]=1,Vi(n,"rgba")},t.prototype.traverse=function(){},t.prototype.attrKV=function(t,n){"textConfig"===t?this.setTextConfig(n):"textContent"===t?this.setTextContent(n):"clipPath"===t?this.setClipPath(n):"extra"===t?(this.extra=this.extra||{},I(this.extra,n)):this[t]=n},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,n){if("string"==typeof t)this.attrKV(t,n);else if(X(t))for(var i=F(t),r=0;r<i.length;r++){var e=i[r];this.attrKV(e,t[e])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var n=this._normalState,i=0;i<this.animators.length;i++){var r=this.animators[i],e=r.__fromStateTransition;if(!(r.getLoop()||e&&e!==Zr)){var o=r.targetName;r.saveTo(o?n[o]:n)}}},t.prototype._innerSaveToNormal=function(t){var n=this._normalState;n||(n=this._normalState={}),t.textConfig&&!n.textConfig&&(n.textConfig=this.textConfig),this._savePrimaryToNormal(t,n,$r)},t.prototype._savePrimaryToNormal=function(t,n,i){for(var r=0;r<i.length;r++){var e=i[r];null==t[e]||e in n||(n[e]=this[e])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var n=this.states;return n[t]||(n[t]={}),n[t]},t.prototype.clearStates=function(t){this.useState(Zr,!1,t)},t.prototype.useState=function(t,n,i,r){var e=t===Zr;if(this.hasState()||!e){var o=this.currentStates,a=this.stateTransition;if(!(D(o,t)>=0)||!n&&1!==o.length){var u;if(this.stateProxy&&!e&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),u||e){e||this.saveCurrentToNormalState(u);var s=this._textContent,f=ae(this,s,u,r);f&&!this.__inHover&&(this.__inHover=f),this._applyStateObj(t,u,this._normalState,n,se(this,i,a),a);var h=this._textGuide;return s&&s.useState(t,n,i,!!f),h&&h.useState(t,n,i,!!f),e?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),u}N("State "+t+" not exists.")}}},t.prototype.useStates=function(t,n,i){if(t.length){var r=[],e=this.currentStates,o=t.length,a=o===e.length;if(a)for(var u=0;u<o;u++)if(t[u]!==e[u]){a=!1;break}if(a)return;for(u=0;u<o;u++){var s=t[u],f=void 0;this.stateProxy&&(f=this.stateProxy(s,t)),f||(f=this.states[s]),f&&r.push(f)}var h=this._textContent,l=ae(this,h,r[o-1],i);l&&!this.__inHover&&(this.__inHover=l);var c=this._mergeStates(r),v=this.stateTransition;this.saveCurrentToNormalState(c),this._applyStateObj(t.join(","),c,this._normalState,!1,se(this,n,v),v);var d=this._textGuide;h&&h.useStates(t,n,!!l),d&&d.useStates(t,n,!!l),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var n=t.__hostTarget;t=n?t.ignoreHostSilent?null:n:t.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var n=this.animators[t];n.targetName&&n.changeTarget(this[n.targetName])}},t.prototype.removeState=function(t){var n=D(this.currentStates,t);if(n>=0){var i=this.currentStates.slice();i.splice(n,1),this.useStates(i)}},t.prototype.replaceState=function(t,n,i){var r=this.currentStates.slice(),e=D(r,t),o=D(r,n)>=0;e>=0?o?r.splice(e,1):r[e]=n:i&&!o&&r.push(n),this.useStates(r)},t.prototype.toggleState=function(t,n){n?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var n,i={},r=0;r<t.length;r++){var e=t[r];I(i,e),e.textConfig&&I(n=n||{},e.textConfig)}return n&&(i.textConfig=n),i},t.prototype._applyStateObj=function(t,n,i,r,e,o){if(1!==this.__inHover){var a=!(n&&r);n&&n.textConfig?(this.textConfig=I({},r?this.textConfig:i.textConfig),I(this.textConfig,n.textConfig)):a&&i.textConfig&&(this.textConfig=i.textConfig);for(var u={},s=!1,f=0;f<$r.length;f++){var h=$r[f],l=e&&Kr[h];n&&null!=n[h]?l?(s=!0,u[h]=n[h]):this[h]=n[h]:a&&null!=i[h]&&(l?(s=!0,u[h]=i[h]):this[h]=i[h])}if(!e)for(f=0;f<this.animators.length;f++){var c=this.animators[f],v=c.targetName;c.getLoop()||c.__changeFinalValue(v?(n||i)[v]:n||i)}s&&this._transitionState(t,u,o)}},t.prototype._attachComponent=function(t){if((!t.__zr||t.__hostTarget)&&t!==this){var n=this.__zr;n&&t.addSelfToZr(n),t.__zr=n,t.__hostTarget=this}},t.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},t.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(t){var n=this._textContent;n!==t&&(n&&n!==t&&this.removeTextContent(),t.innerTransformable=new Er,this._attachComponent(t),this._textContent=t,this.markRedraw())},t.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),I(this.textConfig,t),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=1;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var n=this.animators;if(n)for(var i=0;i<n.length;i++)t.animation.addAnimator(n[i]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},t.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var n=this.animators;if(n)for(var i=0;i<n.length;i++)t.animation.removeAnimator(n[i]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},t.prototype.animate=function(t,n,i){var r=new rr(t?this[t]:this,n,i);return t&&(r.targetName=t),this.addAnimator(r,t),r},t.prototype.addAnimator=function(t,n){var i=this.__zr,r=this;t.during((function(){r.updateDuringAnimation(n)})).done((function(){var n=r.animators,i=D(n,t);i>=0&&n.splice(i,1)})),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(){this.markRedraw()},t.prototype.stopAnimation=function(t,n){for(var i=this.animators,r=i.length,e=[],o=0;o<r;o++){var a=i[o];t&&t!==a.scope?e.push(a):a.stop(n)}return this.animators=e,this},t.prototype.animateTo=function(t,n,i){ie(this,t,n,i)},t.prototype.animateFrom=function(t,n,i){ie(this,t,n,i,!0)},t.prototype._transitionState=function(t,n,i,r){for(var e=ie(this,n,i,r),o=0;o<e.length;o++)e[o].__fromStateTransition=t},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=function(){var n=t.prototype;function i(t,i,r,e){function o(t,n){Object.defineProperty(n,0,{get:function(){return t[r]},set:function(n){t[r]=n}}),Object.defineProperty(n,1,{get:function(){return t[e]},set:function(n){t[e]=n}})}Object.defineProperty(n,t,{get:function(){return this[i]||o(this,this[i]=[]),this[i]},set:function(t){this[r]=t[0],this[e]=t[1],this[i]=t,o(this,t)}})}n.type="element",n.name="",n.ignore=n.silent=n.ignoreHostSilent=n.isGroup=n.draggable=n.dragging=n.ignoreClip=!1,n.__inHover=0,n.__dirty=1,Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))}(),t}();function ie(t,n,i,r,e){var o=[];oe(t,"",t,n,i=i||{},r,o,e);var a=o.length,u=!1,s=i.done,f=i.aborted,h=function(){u=!0,--a<=0&&(u?s&&s():f&&f())},l=function(){--a<=0&&(u?s&&s():f&&f())};a||s&&s(),o.length>0&&i.during&&o[0].during((function(t,n){i.during(n)}));for(var c=0;c<o.length;c++){var v=o[c];h&&v.done(h),l&&v.aborted(l),i.force&&v.duration(i.duration),v.start(i.easing)}return o}function re(t,n,i){for(var r=0;r<i;r++)t[r]=n[r]}function ee(t,n,i){if(E(n[i]))if(E(t[i])||(t[i]=[]),Z(n[i])){var r=n[i].length;t[i].length!==r&&(t[i]=new n[i].constructor(r),re(t[i],n[i],r))}else{var e=n[i],o=t[i],a=e.length;if(E(e[0]))for(var u=e[0].length,s=0;s<a;s++)o[s]?re(o[s],e[s],u):o[s]=Array.prototype.slice.call(e[s]);else re(o,e,a);o.length=e.length}else t[i]=n[i]}function oe(t,n,i,r,e,o,a,u){for(var s=F(r),f=e.duration,h=e.delay,l=e.additive,c=e.setToFinal,v=!X(o),d=t.animators,m=[],p=0;p<s.length;p++){var y=r[T=s[p]];if(null!=y&&null!=i[T]&&(v||o[T]))if(!X(y)||E(y)||K(y))m.push(T);else{if(n){u||(i[T]=y,t.updateDuringAnimation(n));continue}oe(t,T,i[T],y,e,o&&o[T],a,u)}else u||(i[T]=y,t.updateDuringAnimation(n),m.push(T))}var g=m.length;if(!l&&g)for(var b=0;b<d.length;b++)if((x=d[b]).targetName===n&&x.stopTracks(m)){var w=D(d,x);d.splice(w,1)}if(e.force||(m=B(m,(function(t){return!((n=r[t])===(e=i[t])||E(n)&&E(e)&&function(t,n){var i=t.length;if(i!==n.length)return!1;for(var r=0;r<i;r++)if(t[r]!==n[r])return!1;return!0}(n,e));var n,e})),g=m.length),g>0||e.force&&!a.length){var x,M=void 0,S=void 0,k=void 0;if(u)for(S={},c&&(M={}),b=0;b<g;b++)S[T=m[b]]=i[T],c?M[T]=r[T]:i[T]=r[T];else if(c)for(k={},b=0;b<g;b++){var T;k[T=m[b]]=Ki(i[T]),ee(i,r,T)}(x=new rr(i,!1,!1,l?B(d,(function(t){return t.targetName===n})):null)).targetName=n,e.scope&&(x.scope=e.scope),c&&M&&x.whenWithKeys(0,M,m),k&&x.whenWithKeys(0,k,m),x.whenWithKeys(null==f?500:f,u?S:r,m).delay(h||0),t.addAnimator(x,n),a.push(x)}}function ae(t,n,i,r){return!(i&&i.hoverLayer||r)||ue(t)||n&&ue(n)?0:1}function ue(t){return"text"===t.type||"tspan"===t.type}function se(t,n,i){return!n&&!t.__inHover&&i&&i.duration>0}_(ne,Dt),_(ne,Er);var fe=function(t){function n(n){var i=t.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(n),i}return o(n,t),n.prototype.childrenRef=function(){return this._children},n.prototype.children=function(){return this._children.slice()},n.prototype.childAt=function(t){return this._children[t]},n.prototype.childOfName=function(t){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===t)return n[i]},n.prototype.childCount=function(){return this._children.length},n.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},n.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var i=this._children,r=i.indexOf(n);r>=0&&(i.splice(r,0,t),this._doAdd(t))}return this},n.prototype.replace=function(t,n){var i=D(this._children,t);return i>=0&&this.replaceAt(n,i),this},n.prototype.replaceAt=function(t,n){var i=this._children,r=i[n];if(t&&t!==this&&t.parent!==this&&t!==r){i[n]=t,r.parent=null;var e=this.__zr;e&&r.removeSelfFromZr(e),this._doAdd(t)}return this},n.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},n.prototype.remove=function(t){var n=this.__zr,i=this._children,r=D(i,t);return r<0||(i.splice(r,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh()),this},n.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,i=0;i<t.length;i++){var r=t[i];n&&r.removeSelfFromZr(n),r.parent=null}return t.length=0,this},n.prototype.eachChild=function(t,n){for(var i=this._children,r=0;r<i.length;r++)t.call(n,i[r],r);return this},n.prototype.traverse=function(t,n){for(var i=0;i<this._children.length;i++){var r=this._children[i],e=t.call(n,r);r.isGroup&&!e&&r.traverse(t,n)}return this},n.prototype.addSelfToZr=function(n){t.prototype.addSelfToZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].addSelfToZr(n)},n.prototype.removeSelfFromZr=function(n){t.prototype.removeSelfFromZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].removeSelfFromZr(n)},n.prototype.getBoundingRect=function(t){for(var n=new xn(0,0,0,0),i=t||this._children,r=[],e=null,o=0;o<i.length;o++){var a=i[o];if(!a.ignore&&!a.invisible){var u=a.getBoundingRect(),s=a.getLocalTransform(r);s?(xn.applyTransform(n,u,s),(e=e||n.clone()).union(n)):(e=e||u.clone()).union(u)}}return e||n},n}(ne);fe.prototype.type="group";
|
|
16
|
+
/*!
|
|
17
|
+
* ZRender, a high performance 2d drawing library.
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) 2013, Baidu Inc.
|
|
20
|
+
* All rights reserved.
|
|
21
|
+
*
|
|
22
|
+
* LICENSE
|
|
23
|
+
* https://github.com/ecomfe/zrender/blob/master/LICENSE
|
|
24
|
+
*/
|
|
25
|
+
var he={},le=function(){function t(t,n,i){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,i=i||{},this.dom=n,this.id=t;var e=new Zn,o=i.renderer||"canvas";he[o]||(o=F(he)[0]),i.useDirtyRect=null!=i.useDirtyRect&&i.useDirtyRect;var a=new he[o](n,e,i,t),s=i.ssr||a.ssrOnly;this.storage=e,this.painter=a;var f,h=u.node||u.worker||s?null:new Mr(a.getViewportRoot(),a.root),l=i.useCoarsePointer;(null==l||"auto"===l?u.touchEventsSupported:!!l)&&(f=tt(i.pointerSize,44)),this.handler=new Rn(e,a,h,a.root,f),this.animation=new ur({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return t.prototype.add=function(t){!this._disposed&&t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},t.prototype.remove=function(t){!this._disposed&&t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(t,n){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,n),this.refresh())},t.prototype.setBackgroundColor=function(t){this._disposed||(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 Wi(t,1)<.4;if(t.colorStops){for(var n=t.colorStops,i=0,r=n.length,e=0;e<r;e++)i+=Wi(n[e].color,1);return(i/=r)<.4}return!1}(t))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(t){this._darkMode=t},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(t){this._disposed||this._refresh({animUpdate:!t,refresh:!0,refreshHover:!1})},t.prototype._refresh=function(t){t.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:t.refresh,refreshHover:t.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!0)},t.prototype._flush=function(t){var n,i=er(),r=this._needsRefresh,e=this._needsRefreshHover;(r||e)&&(n=!0,this._refresh({animUpdate:t,refresh:r,refreshHover:e}));var o=er();n?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:o-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},t.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,n){if(!this._disposed)return this.handler.findHover(t,n)},t.prototype.on=function(t,n,i){return this._disposed||this.handler.on(t,n,i),this},t.prototype.off=function(t,n){this._disposed||this.handler.off(t,n)},t.prototype.trigger=function(t,n){this._disposed||this.handler.trigger(t,n)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),n=0;n<t.length;n++)t[n]instanceof fe&&t[n].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0)},t}();function ce(t,n){return new le(A(),t,n)}var ve=Math.min,de=Math.max,me=Math.abs,pe=Math.round,ye=Math.floor,ge=Math.ceil,be=Math.pow,we=Math.log,xe=Math.LN10,Me=Math.PI,Se=Math.random;function ke(t,n,i,r){var e=n[0],o=n[1],a=i[0],u=i[1],s=o-e,f=u-a;if(0===s)return 0===f?a:(a+u)/2;if(r)if(s>0){if(t<=e)return a;if(t>=o)return u}else{if(t>=e)return a;if(t<=o)return u}else{if(t===e)return a;if(t===o)return u}return(t-e)/s*f+a}var Te=function(t,n,i){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return Ae(t,n,i)};function Ae(t,n,i){return G(t)?function(t){return!!(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/);var n}(t)?parseFloat(t)/100*n+(i||0):parseFloat(t):null==t?NaN:+t}function Ne(t,n,i){return isNaN(n)?i?""+t:+t:(n=ve(de(0,n),20),t=(+t).toFixed(n),i?t:+t)}function Le(t){return t.sort((function(t,n){return t-n})),t}function Ce(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var n=1,i=0;i<15;i++,n*=10)if(pe(t*n)/n===t)return i;return function(t){var n=t.toString().toLowerCase(),i=n.indexOf("e"),r=i>0?+n.slice(i+1):0,e=i>0?i:n.length,o=n.indexOf(".");return de(0,(o<0?0:e-1-o)-r)}(t)}function Ie(t,n){var i=de(Ce(t),Ce(n)),r=t+n;return i>20?r:Ne(r,i)}var Oe=be(2,53)-1;function De(t){var n=2*Me;return(t%n+n)%n}function _e(t){return t>-1e-4&&t<1e-4}var Ee=/^(?:(\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 ze(t){if(t instanceof Date)return t;if(G(t)){var n=Ee.exec(t);if(!n)return new Date(NaN);if(n[8]){var i=+n[4]||0;return"Z"!==n[8].toUpperCase()&&(i-=+n[8].slice(0,3)),new Date(Date.UTC(+n[1],+(n[2]||1)-1,+n[3]||1,i,+(n[5]||0),+n[6]||0,n[7]?+n[7].substring(0,3):0))}return new Date(+n[1],+(n[2]||1)-1,+n[3]||1,+n[4]||0,+(n[5]||0),+n[6]||0,n[7]?+n[7].substring(0,3):0)}return null==t?new Date(NaN):new Date(pe(t))}function Re(t){return be(10,Pe(t))}function Pe(t){if(0===t)return 0;var n=ye(we(t)/xe);return t/be(10,n)>=10&&n++,n}function Be(t,n){var i=Pe(t),r=be(10,i),e=t/r;return Ne(t=(2===n?1:n?e<1.5?1:e<2.5?2:e<4?3:e<7?5:10:e<1?1:e<2?2:e<3?3:e<5?5:10)*r,-i)}function Fe(t){var n=parseFloat(t);return n==t&&(0!==n||!G(t)||t.indexOf("x")<=0)?n:NaN}function Ve(){return pe(9*Se())}function We(t,n){return 0===n?t:We(n,t%n)}function He(t,n){return null==t?n:null==n?t:t*n/We(t,n)}function Ue(t){return null!=t&&isFinite(t)}var Ge="undefined"!=typeof console&&console.warn&&console.log;function je(t){!function(t,n){Ge&&console.error("[ECharts] "+n)}(0,t)}function Ye(t){throw new Error(t)}function Xe(t,n,i){return(n-t)*i+t}var qe="series\0";function Ze(t){return t instanceof Array?t:null==t?[]:[t]}function $e(t,n,i){if(t){t[n]=t[n]||{},t.emphasis=t.emphasis||{},t.emphasis[n]=t.emphasis[n]||{};for(var r=0,e=i.length;r<e;r++){var o=i[r];!t.emphasis[n].hasOwnProperty(o)&&t[n].hasOwnProperty(o)&&(t.emphasis[n][o]=t[n][o])}}}var Ke=["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 Je(t){return!X(t)||H(t)||t instanceof Date?t:t.value}function Qe(t){return X(t)&&!(t instanceof Array)}function to(t,n,i){var r=io(n[t],null),e=io(i[t],null);return null!=r&&null!=e&&r===e}function no(t){return io(t,"")}function io(t,n){return null==t?n:G(t)?t:Y(t)||j(t)?t+"":n}function ro(t){var n=t.name;return!(!n||!n.indexOf(qe))}function eo(t){return t&&null!=t.id&&0===no(t.id).indexOf("\0_ec_\0")}function oo(t,n){return null!=n.dataIndexInside?n.dataIndexInside:null!=n.dataIndex?H(n.dataIndex)?R(n.dataIndex,(function(n){return t.indexOfRawIndex(n)})):t.indexOfRawIndex(n.dataIndex):null!=n.name?H(n.name)?R(n.name,(function(n){return t.indexOfName(n)})):t.indexOfName(n.name):void 0}function ao(){var t="__ec_inner_"+uo++;return function(n){return n[t]||(n[t]={})}}var uo=Ve();function so(t,n,i){var r=fo(n,i),e=r.queryOptionMap,o=r.others,a=i?i.defaultMainType:null;return!r.mainTypeSpecified&&a&&e.set(a,{}),e.each((function(n,r){var e=lo(t,r,n,{useDefault:a===r,enableAll:!i||null==i.enableAll||i.enableAll,enableNone:!i||null==i.enableNone||i.enableNone});o[r+"Models"]=e.models,o[r+"Model"]=e.models[0]})),o}function fo(t,n){var i;if(G(t)){var r={};r[t+"Index"]=0,i=r}else i=t;var e=ct(),o={},a=!1;return z(i,(function(t,i){if("dataIndex"!==i&&"dataIndexInside"!==i){var r=i.match(/^(\w+)(Index|Id|Name)$/)||[],u=r[1],s=(r[2]||"").toLowerCase();!u||!s||n&&n.includeMainTypes&&D(n.includeMainTypes,u)<0||(a=a||!!u,(e.get(u)||e.set(u,{}))[s]=t)}else o[i]=t})),{mainTypeSpecified:a,queryOptionMap:e,others:o}}var ho={useDefault:!0,enableAll:!1,enableNone:!1};function lo(t,n,i,r){r=r||ho;var e=i.index,o=i.id,a=i.name,u={models:null,specified:null!=e||null!=o||null!=a};if(!u.specified){var s=void 0;return u.models=r.useDefault&&(s=t.getComponent(n))?[s]:[],u}if("none"===e||!1===e){if(r.enableNone)return u.models=[],u;e=-1}return"all"===e&&(e=r.enableAll?o=a=null:-1),u.models=t.queryComponents({mainType:n,index:e,id:o,name:a}),u}function co(t,n,i){t.setAttribute?t.setAttribute(n,i):t[n]=i}function vo(t,n){yo(n)&&(n<t[0]&&(t[0]=n),n>t[1]&&(t[1]=n))}function mo(t,n){yo(n)&&n<t[0]&&(t[0]=n)}function po(t,n){yo(n)&&n>t[1]&&(t[1]=n)}function yo(t){return null!=t&&isFinite(t)}function go(t,n){return yo(t)&&yo(n)&&t<=n}function bo(t,n,i){var r=ct(),e=0;z(t,(function(o){var a=n(o),u=r.get(a)||0;i&&i(o,u),u||i||(t[e++]=o),r.set(a,u+1)})),i||(t.length=e)}function wo(t){return t.value+""}function xo(t){return t+""}function Mo(t){return{overallReset:t}}var So="___EC__COMPONENT__CONTAINER___",ko="___EC__EXTENDED_CLASS___";function To(t){var n={main:"",sub:""};if(t){var i=t.split(".");n.main=i[0]||"",n.sub=i[1]||""}return n}function Ao(t){t.$constructor=t,t.extend=function(t){var n,i,r=this;return U(i=r)&&/^class\s/.test(Function.prototype.toString.call(i))?n=function(t){function n(){return t.apply(this,arguments)||this}return o(n,t),n}(r):(n=function(){(t.$constructor||r).apply(this,arguments)},function(t,n){var i=t.prototype;function r(){}for(var e in r.prototype=n.prototype,t.prototype=new r,i)i.hasOwnProperty(e)&&(t.prototype[e]=i[e]);t.prototype.constructor=t,t.superClass=n}(n,this)),I(n.prototype,t),n[ko]=!0,n.extend=this.extend,n.superCall=Co,n.superApply=Io,n.superClass=r,n}}function No(t,n){t.extend=n.extend}var Lo=Math.round(10*Math.random());function Co(t,n){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];return this.superClass.prototype[n].apply(t,i)}function Io(t,n,i){return this.superClass.prototype[n].apply(t,i)}function Oo(t){var n={};t.registerClass=function(t){var i,r=t.type||t.prototype.type;if(r){et(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(i=r),'componentType "'+i+'" illegal'),t.prototype.type=r;var e=To(r);if(e.sub){if(e.sub!==So){var o=function(t){var i=n[t.main];return i&&i[So]||((i=n[t.main]={})[So]=!0),i}(e);o[e.sub]=t}}else n[e.main]=t}return t},t.getClass=function(t,i,r){var e=n[t];if(e&&e[So]&&(e=i?e[i]:null),r&&!e)throw new Error(i?"Component "+t+"."+(i||"")+" is used but not imported.":t+".type should be specified.");return e},t.getClassesByMainType=function(t){var i=To(t),r=[],e=n[i.main];return e&&e[So]?z(e,(function(t,n){n!==So&&r.push(t)})):r.push(e),r},t.hasClass=function(t){var i=To(t);return!!n[i.main]},t.getAllClassMainTypes=function(){var t=[];return z(n,(function(n,i){t.push(i)})),t},t.hasSubTypes=function(t){var i=To(t),r=n[i.main];return r&&r[So]}}function Do(t,n){for(var i=0;i<t.length;i++)t[i][1]||(t[i][1]=t[i][0]);return n=n||!1,function(i,r,e){for(var o={},a=0;a<t.length;a++){var u=t[a][1];if(!(r&&D(r,u)>=0||e&&D(e,u)<0)){var s=i.getShallow(u,n);null!=s&&(o[t[a][0]]=s)}}return o}}var _o=Do([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Eo=function(){function t(){}return t.prototype.getAreaStyle=function(t,n){return _o(this,t,n)},t}(),zo=new Si(50);function Ro(t){if("string"==typeof t){var n=zo.get(t);return n&&n.image}return t}function Po(t,n,i,r,e){if(t){if("string"==typeof t){if(n&&n.__zrImageSrc===t||!i)return n;var o=zo.get(t),a={hostEl:i,cb:r,cbPayload:e};return o?!Fo(n=o.image)&&o.pending.push(a):((n=c.loadImage(t,Bo,Bo)).__zrImageSrc=t,zo.put(t,n.__cachedImgObj={image:n,pending:[a]})),n}return t}return n}function Bo(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var n=0;n<t.pending.length;n++){var i=t.pending[n],r=i.cb;r&&r(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Fo(t){return t&&t.width&&t.height}var Vo=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Wo(t,n,i,r,e,o){if(!i)return t.text="",void(t.isTruncated=!1);var a=(n+"").split("\n");o=Ho(i,r,e,o);for(var u=!1,s={},f=0,h=a.length;f<h;f++)Uo(s,a[f],o),a[f]=s.textLine,u=u||s.isTruncated;t.text=a.join("\n"),t.isTruncated=u}function Ho(t,n,i,r){var e=I({},r=r||{});i=tt(i,"..."),e.maxIterations=tt(r.maxIterations,2);var o=e.minChar=tt(r.minChar,0),a=e.fontMeasureInfo=Br(n),u=a.asciiCharWidth;e.placeholder=tt(r.placeholder,"");for(var s=t=Math.max(0,t-1),f=0;f<o&&s>=u;f++)s-=u;var h=Wr(a,i);return h>s&&(i="",h=0),s=t-h,e.ellipsis=i,e.ellipsisWidth=h,e.contentWidth=s,e.containerWidth=t,e}function Uo(t,n,i){var r=i.containerWidth,e=i.contentWidth,o=i.fontMeasureInfo;if(!r)return t.textLine="",void(t.isTruncated=!1);var a=Wr(o,n);if(a<=r)return t.textLine=n,void(t.isTruncated=!1);for(var u=0;;u++){if(a<=e||u>=i.maxIterations){n+=i.ellipsis;break}var s=0===u?Go(n,e,o):a>0?Math.floor(n.length*e/a):0;a=Wr(o,n=n.substr(0,s))}""===n&&(n=i.placeholder),t.textLine=n,t.isTruncated=!0}function Go(t,n,i){for(var r=0,e=0,o=t.length;e<o&&r<n;e++)r+=Vr(i,t.charCodeAt(e));return e}var jo=function(){},Yo=function(t){this.tokens=[],t&&(this.tokens=t)},Xo=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function qo(t,n,i,r,e){var o,a,u=""===n,s=e&&i.rich[e]||{},f=t.lines,h=s.font||i.font,l=!1;if(r){var c=s.padding,v=c?c[1]+c[3]:0;if(null!=s.width&&"auto"!==s.width){var d=Xr(s.width,r.width)+v;f.length>0&&d+r.accumWidth>r.width&&(o=n.split("\n"),l=!0),r.accumWidth=d}else{var m=Ko(n,h,r.width,r.breakAll,r.accumWidth);r.accumWidth=m.accumWidth+v,a=m.linesWidths,o=m.lines}}o||(o=n.split("\n"));for(var p=Br(h),y=0;y<o.length;y++){var g=o[y],b=new jo;if(b.styleName=e,b.text=g,b.isLineHolder=!g&&!u,b.width="number"==typeof s.width?s.width:a?a[y]:Wr(p,g),y||l)f.push(new Yo([b]));else{var w=(f[f.length-1]||(f[0]=new Yo)).tokens,x=w.length;1===x&&w[0].isLineHolder?w[0]=b:(g||!x||u)&&w.push(b)}}}var Zo=P(",&?/;] ".split(""),(function(t,n){return t[n]=!0,t}),{});function $o(t){return!function(t){var n=t.charCodeAt(0);return n>=32&&n<=591||n>=880&&n<=4351||n>=4608&&n<=5119||n>=7680&&n<=8303}(t)||!!Zo[t]}function Ko(t,n,i,r,e){for(var o=[],a=[],u="",s="",f=0,h=0,l=Br(n),c=0;c<t.length;c++){var v=t.charAt(c);if("\n"!==v){var d=Vr(l,v.charCodeAt(0)),m=!r&&!$o(v);(o.length?h+d>i:e+h+d>i)?h?(u||s)&&(m?(u||(u=s,s="",h=f=0),o.push(u),a.push(h-f),s+=v,u="",h=f+=d):(s&&(u+=s,s="",f=0),o.push(u),a.push(h),u=v,h=d)):m?(o.push(s),a.push(f),s=v,f=d):(o.push(v),a.push(d)):(h+=d,m?(s+=v,f+=d):(s&&(u+=s,s="",f=0),u+=v))}else s&&(u+=s,h+=f),o.push(u),a.push(h),u="",s="",f=0,h=0}return s&&(u+=s),u&&(o.push(u),a.push(h)),1===o.length&&(h+=e),{accumWidth:h,lines:o,linesWidths:a}}function Jo(t,n,i,r,e,o){if(t.baseX=i,t.baseY=r,t.outerWidth=t.outerHeight=null,n){var a=2*n.width,u=2*n.height;xn.set(Qo,Gr(i,a,e),jr(r,u,o),a,u),xn.intersect(n,Qo,null,ta);var s=ta.outIntersectRect;t.outerWidth=s.width,t.outerHeight=s.height,t.baseX=Gr(s.x,s.width,e,!0),t.baseY=jr(s.y,s.height,o,!0)}}var Qo=new xn(0,0,0,0),ta={outIntersectRect:{},clamp:!0};function na(t){return null!=t?t+="":t=""}function ia(t,n,i,r){var e=new xn(Gr(t.x||0,n,t.textAlign),jr(t.y||0,i,t.textBaseline),n,i),o=null!=r?r:ra(t)?t.lineWidth:0;return o>0&&(e.x-=o/2,e.y-=o/2,e.width+=o,e.height+=o),e}function ra(t){var n=t.stroke;return null!=n&&"none"!==n&&t.lineWidth>0}var ea="__zr_style_"+Math.round(10*Math.random()),oa={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},aa={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};oa[ea]=!0;var ua=["z","z2","invisible"],sa=["invisible"],fa=function(t){function n(n){return t.call(this,n)||this}var i;return o(n,t),n.prototype._init=function(n){for(var i=F(n),r=0;r<i.length;r++){var e=i[r];"style"===e?this.useStyle(n[e]):t.prototype.attrKV.call(this,e,n[e])}this.style||this.useStyle({})},n.prototype.beforeBrush=function(){},n.prototype.afterBrush=function(){},n.prototype.innerBeforeBrush=function(){},n.prototype.innerAfterBrush=function(){},n.prototype.shouldBePainted=function(t,n,i,r){var e,o,a,u=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&(o=t,a=n,ha.copy((e=this).getBoundingRect()),e.transform&&ha.applyTransform(e.transform),la.width=o,la.height=a,!ha.intersect(la))||u&&!u[0]&&!u[3])return!1;if(i&&this.__clipPaths&&this.__clipPaths.length)for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1;if(r&&this.parent)for(var f=this.parent;f;){if(f.ignore)return!1;f=f.parent}return!0},n.prototype.contain=function(t,n){return this.rectContain(t,n)},n.prototype.traverse=function(t,n){t.call(n,this)},n.prototype.rectContain=function(t,n){var i=this.transformCoordToLocal(t,n);return this.getBoundingRect().contain(i[0],i[1])},n.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),r=this.style,e=r.shadowBlur||0,o=r.shadowOffsetX||0,a=r.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new xn(0,0,0,0)),n?xn.applyTransform(t,i,n):t.copy(i),(e||o||a)&&(t.width+=2*e+Math.abs(o),t.height+=2*e+Math.abs(a),t.x=Math.min(t.x,t.x+o-e),t.y=Math.min(t.y,t.y+a-e));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+2*u),t.height=Math.ceil(t.height+1+2*u))}return t},n.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new xn(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},n.prototype.getPrevPaintRect=function(){return this._prevPaintRect},n.prototype.animateStyle=function(t){return this.animate("style",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},n.prototype.attrKV=function(n,i){"style"!==n?t.prototype.attrKV.call(this,n,i):this.style?this.setStyle(i):this.useStyle(i)},n.prototype.setStyle=function(t,n){return"string"==typeof t?this.style[t]=n:I(this.style,t),this.dirtyStyle(),this},n.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},n.prototype.dirty=function(){this.dirtyStyle()},n.prototype.styleChanged=function(){return!!(2&this.__dirty)},n.prototype.styleUpdated=function(){this.__dirty&=-3},n.prototype.createStyle=function(t){return vt(oa,t)},n.prototype.useStyle=function(t){t[ea]||(t=this.createStyle(t)),this.style=t,this.dirtyStyle()},n.prototype._useHoverStyle=function(t){this.__hoverStyle=t},n.prototype.isStyleObject=function(t){return t[ea]},n.prototype._innerSaveToNormal=function(n){t.prototype._innerSaveToNormal.call(this,n);var i=this._normalState;n.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(n,i,ua)},n.prototype._applyStateObj=function(n,i,r,e,o,a){t.prototype._applyStateObj.call(this,n,i,r,e,o,a);var u,s=!(i&&e),f=1===this.__inHover;if(i&&i.style?o?e?u=i.style:(u=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),e?this.style:r.style),this._mergeStyle(u,i.style)):s&&(u=r.style),u)if(o){var h=this.style;if(this.style=this.createStyle(s?{}:h),s)for(var l=F(h),c=0;c<l.length;c++)(m=l[c])in u&&(u[m]=u[m],this.style[m]=h[m]);var v=F(u);for(c=0;c<v.length;c++)this.style[m=v[c]]=this.style[m];this._transitionState(n,{style:u},a,this.getAnimationStyleProps())}else f?this._useHoverStyle(u):this.useStyle(u);if(!f){var d=this.__inHover?sa:ua;for(c=0;c<d.length;c++){var m=d[c];i&&null!=i[m]?this[m]=i[m]:s&&null!=r[m]&&(this[m]=r[m])}}},n.prototype._mergeStates=function(n){for(var i,r=t.prototype._mergeStates.call(this,n),e=0;e<n.length;e++){var o=n[e];o.style&&this._mergeStyle(i=i||{},o.style)}return i&&(r.style=i),r},n.prototype._mergeStyle=function(t,n){return I(t,n),t},n.prototype.getAnimationStyleProps=function(){return aa},n.initDefaultProps=((i=n.prototype).type="displayable",i.invisible=!1,i.z=0,i.z2=0,i.zlevel=0,i.culling=!1,i.cursor="pointer",i.rectHover=!1,i.incremental=0,i._rect=null,i.dirtyRectTolerance=0,void(i.__dirty=3)),n}(ne),ha=new xn(0,0,0,0),la=new xn(0,0,0,0),ca=Math.min,va=Math.max,da=Math.sin,ma=Math.cos,pa=2*Math.PI,ya=gt(),ga=gt(),ba=gt();function wa(t,n,i,r,e,o){e[0]=ca(t,i),e[1]=ca(n,r),o[0]=va(t,i),o[1]=va(n,r)}var xa=[],Ma=[];function Sa(t,n,i,r,e,o,a,u,s,f){var h=hi,l=ui,c=h(t,i,e,a,xa);s[0]=1/0,s[1]=1/0,f[0]=-1/0,f[1]=-1/0;for(var v=0;v<c;v++){var d=l(t,i,e,a,xa[v]);s[0]=ca(d,s[0]),f[0]=va(d,f[0])}for(c=h(n,r,o,u,Ma),v=0;v<c;v++){var m=l(n,r,o,u,Ma[v]);s[1]=ca(m,s[1]),f[1]=va(m,f[1])}s[0]=ca(t,s[0]),f[0]=va(t,f[0]),s[0]=ca(a,s[0]),f[0]=va(a,f[0]),s[1]=ca(n,s[1]),f[1]=va(n,f[1]),s[1]=ca(u,s[1]),f[1]=va(u,f[1])}function ka(t,n,i,r,e,o,a,u){var s=mi,f=vi,h=va(ca(s(t,i,e),1),0),l=va(ca(s(n,r,o),1),0),c=f(t,i,e,h),v=f(n,r,o,l);a[0]=ca(t,e,c),a[1]=ca(n,o,v),u[0]=va(t,e,c),u[1]=va(n,o,v)}function Ta(t,n,i,r,e,o,a,u,s){var f=Lt,h=Ct,l=Math.abs(e-o);if(l%pa<1e-4&&l>1e-4)return u[0]=t-i,u[1]=n-r,s[0]=t+i,void(s[1]=n+r);if(ya[0]=ma(e)*i+t,ya[1]=da(e)*r+n,ga[0]=ma(o)*i+t,ga[1]=da(o)*r+n,f(u,ya,ga),h(s,ya,ga),(e%=pa)<0&&(e+=pa),(o%=pa)<0&&(o+=pa),e>o&&!a?o+=pa:e<o&&a&&(e+=pa),a){var c=o;o=e,e=c}for(var v=0;v<o;v+=Math.PI/2)v>e&&(ba[0]=ma(v)*i+t,ba[1]=da(v)*r+n,f(u,ba,u),h(s,ba,s))}var Aa={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Na=[],La=[],Ca=[],Ia=[],Oa=[],Da=[],_a=Math.min,Ea=Math.max,za=Math.cos,Ra=Math.sin,Pa=Math.abs,Ba=Math.PI,Fa=2*Ba,Va="undefined"!=typeof Float32Array,Wa=[];function Ha(t){return Math.round(t/Ba*1e8)/1e8%2*Ba}var Ua=function(){function t(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}var n;return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(t,n,i){(i=i||0)>0&&(this._ux=Pa(i/kr/t)||0,this._uy=Pa(i/kr/n)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,n){return this._drawPendingPt(),this.addData(Aa.M,t,n),this._ctx&&this._ctx.moveTo(t,n),this._x0=t,this._y0=n,this._xi=t,this._yi=n,this},t.prototype.lineTo=function(t,n){var i=Pa(t-this._xi),r=Pa(n-this._yi),e=i>this._ux||r>this._uy;if(this.addData(Aa.L,t,n),this._ctx&&e&&this._ctx.lineTo(t,n),e)this._xi=t,this._yi=n,this._pendingPtDist=0;else{var o=i*i+r*r;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=n,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,n,i,r,e,o){return this._drawPendingPt(),this.addData(Aa.C,t,n,i,r,e,o),this._ctx&&this._ctx.bezierCurveTo(t,n,i,r,e,o),this._xi=e,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,n,i,r){return this._drawPendingPt(),this.addData(Aa.Q,t,n,i,r),this._ctx&&this._ctx.quadraticCurveTo(t,n,i,r),this._xi=i,this._yi=r,this},t.prototype.arc=function(t,n,i,r,e,o){return this._drawPendingPt(),Wa[0]=r,Wa[1]=e,function(t,n){var i=Ha(t[0]);i<0&&(i+=Fa);var r=t[1];r+=i-t[0],!n&&r-i>=Fa?r=i+Fa:n&&i-r>=Fa?r=i-Fa:!n&&i>r?r=i+(Fa-Ha(i-r)):n&&i<r&&(r=i-(Fa-Ha(r-i))),t[0]=i,t[1]=r}(Wa,o),this.addData(Aa.A,t,n,i,i,r=Wa[0],(e=Wa[1])-r,0,o?0:1),this._ctx&&this._ctx.arc(t,n,i,r,e,o),this._xi=za(e)*i+t,this._yi=Ra(e)*i+n,this},t.prototype.arcTo=function(t,n,i,r,e){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,n,i,r,e),this},t.prototype.rect=function(t,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,n,i,r),this.addData(Aa.R,t,n,i,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Aa.Z);var t=this._ctx,n=this._x0,i=this._y0;return t&&t.closePath(),this._xi=n,this._yi=i,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){if(this._saveData){var n=t.length;this.data&&this.data.length===n||!Va||(this.data=new Float32Array(n));for(var i=0;i<n;i++)this.data[i]=t[i];this._len=n}},t.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var n=t.length,i=0,r=this._len,e=0;e<n;e++)i+=t[e].len();var o=this.data;if(Va&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(r+i),r>0&&o))for(var a=0;a<r;a++)this.data[a]=o[a];for(e=0;e<n;e++){var u=t[e].data;for(a=0;a<u.length;a++)this.data[r++]=u[a]}this._len=r}},t.prototype.addData=function(t,n,i,r,e,o,a,u,s){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var h=0;h<arguments.length;h++)f[this._len++]=arguments[h]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],n=0;n<this._len;n++)t[n]=this.data[n];this.data=t}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,Va&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){Ca[0]=Ca[1]=Oa[0]=Oa[1]=Number.MAX_VALUE,Ia[0]=Ia[1]=Da[0]=Da[1]=-Number.MAX_VALUE;var t,n=this.data,i=0,r=0,e=0,o=0;for(t=0;t<this._len;){var a=n[t++],u=1===t;switch(u&&(e=i=n[t],o=r=n[t+1]),a){case Aa.M:i=e=n[t++],r=o=n[t++],Oa[0]=e,Oa[1]=o,Da[0]=e,Da[1]=o;break;case Aa.L:wa(i,r,n[t],n[t+1],Oa,Da),i=n[t++],r=n[t++];break;case Aa.C:Sa(i,r,n[t++],n[t++],n[t++],n[t++],n[t],n[t+1],Oa,Da),i=n[t++],r=n[t++];break;case Aa.Q:ka(i,r,n[t++],n[t++],n[t],n[t+1],Oa,Da),i=n[t++],r=n[t++];break;case Aa.A:var s=n[t++],f=n[t++],h=n[t++],l=n[t++],c=n[t++],v=n[t++]+c;t+=1;var d=!n[t++];u&&(e=za(c)*h+s,o=Ra(c)*l+f),Ta(s,f,h,l,c,v,d,Oa,Da),i=za(v)*h+s,r=Ra(v)*l+f;break;case Aa.R:wa(e=i=n[t++],o=r=n[t++],e+n[t++],o+n[t++],Oa,Da);break;case Aa.Z:i=e,r=o}Lt(Ca,Ca,Oa),Ct(Ia,Ia,Da)}return 0===t&&(Ca[0]=Ca[1]=Ia[0]=Ia[1]=0),new xn(Ca[0],Ca[1],Ia[0]-Ca[0],Ia[1]-Ca[1])},t.prototype._calculateLength=function(){var t=this.data,n=this._len,i=this._ux,r=this._uy,e=0,o=0,a=0,u=0;this._pathSegLen||(this._pathSegLen=[]);for(var s=this._pathSegLen,f=0,h=0,l=0;l<n;){var c=t[l++],v=1===l;v&&(a=e=t[l],u=o=t[l+1]);var d=-1;switch(c){case Aa.M:e=a=t[l++],o=u=t[l++];break;case Aa.L:var m=t[l++],p=(b=t[l++])-o;(Pa(C=m-e)>i||Pa(p)>r||l===n-1)&&(d=Math.sqrt(C*C+p*p),e=m,o=b);break;case Aa.C:var y=t[l++],g=t[l++],b=(m=t[l++],t[l++]),w=t[l++],x=t[l++];d=ci(e,o,y,g,m,b,w,x,10),e=w,o=x;break;case Aa.Q:d=yi(e,o,y=t[l++],g=t[l++],m=t[l++],b=t[l++],10),e=m,o=b;break;case Aa.A:var M=t[l++],S=t[l++],k=t[l++],T=t[l++],A=t[l++],N=t[l++],L=N+A;l+=1,v&&(a=za(A)*k+M,u=Ra(A)*T+S),d=Ea(k,T)*_a(Fa,Math.abs(N)),e=za(L)*k+M,o=Ra(L)*T+S;break;case Aa.R:a=e=t[l++],u=o=t[l++],d=2*t[l++]+2*t[l++];break;case Aa.Z:var C=a-e;p=u-o,d=Math.sqrt(C*C+p*p),e=a,o=u}d>=0&&(s[h++]=d,f+=d)}return this._pathLen=f,f},t.prototype.rebuildPath=function(t,n){var i,r,e,o,a,u,s,f,h,l,c=this.data,v=this._ux,d=this._uy,m=this._len,p=n<1,y=0,g=0,b=0;if(!p||(this._pathSegLen||this._calculateLength(),s=this._pathSegLen,f=n*this._pathLen))t:for(var w=0;w<m;){var x=c[w++],M=1===w;switch(M&&(i=e=c[w],r=o=c[w+1]),x!==Aa.L&&b>0&&(t.lineTo(h,l),b=0),x){case Aa.M:i=e=c[w++],r=o=c[w++],t.moveTo(e,o);break;case Aa.L:a=c[w++],u=c[w++];var S=Pa(a-e),k=Pa(u-o);if(S>v||k>d){if(p){if(y+(X=s[g++])>f){t.lineTo(e*(1-(q=(f-y)/X))+a*q,o*(1-q)+u*q);break t}y+=X}t.lineTo(a,u),e=a,o=u,b=0}else{var T=S*S+k*k;T>b&&(h=a,l=u,b=T)}break;case Aa.C:var A=c[w++],N=c[w++],L=c[w++],C=c[w++],I=c[w++],O=c[w++];if(p){if(y+(X=s[g++])>f){li(e,A,L,I,q=(f-y)/X,Na),li(o,N,C,O,q,La),t.bezierCurveTo(Na[1],La[1],Na[2],La[2],Na[3],La[3]);break t}y+=X}t.bezierCurveTo(A,N,L,C,I,O),e=I,o=O;break;case Aa.Q:if(A=c[w++],N=c[w++],L=c[w++],C=c[w++],p){if(y+(X=s[g++])>f){pi(e,A,L,q=(f-y)/X,Na),pi(o,N,C,q,La),t.quadraticCurveTo(Na[1],La[1],Na[2],La[2]);break t}y+=X}t.quadraticCurveTo(A,N,L,C),e=L,o=C;break;case Aa.A:var D=c[w++],_=c[w++],E=c[w++],z=c[w++],R=c[w++],P=c[w++],B=c[w++],F=!c[w++],V=E>z?E:z,W=Pa(E-z)>.001,H=R+P,U=!1;if(p&&(y+(X=s[g++])>f&&(H=R+P*(f-y)/X,U=!0),y+=X),W&&t.ellipse?t.ellipse(D,_,E,z,B,R,H,F):t.arc(D,_,V,R,H,F),U)break t;M&&(i=za(R)*E+D,r=Ra(R)*z+_),e=za(H)*E+D,o=Ra(H)*z+_;break;case Aa.R:i=e=c[w],r=o=c[w+1],a=c[w++],u=c[w++];var G=c[w++],j=c[w++];if(p){if(y+(X=s[g++])>f){var Y=f-y;t.moveTo(a,u),t.lineTo(a+_a(Y,G),u),(Y-=G)>0&&t.lineTo(a+G,u+_a(Y,j)),(Y-=j)>0&&t.lineTo(a+Ea(G-Y,0),u+j),(Y-=G)>0&&t.lineTo(a,u+Ea(j-Y,0));break t}y+=X}t.rect(a,u,G,j);break;case Aa.Z:if(p){var X;if(y+(X=s[g++])>f){var q;t.lineTo(e*(1-(q=(f-y)/X))+i*q,o*(1-q)+r*q);break t}y+=X}t.closePath(),e=i,o=r}}},t.prototype.clone=function(){var n=new t,i=this.data;return n.data=i.slice?i.slice():Array.prototype.slice.call(i),n._len=this._len,n},t.prototype.canSave=function(){return!!this._saveData},t.CMD=Aa,t.initDefaultProps=((n=t.prototype)._saveData=!0,n._ux=0,n._uy=0,n._pendingPtDist=0,void(n._version=0)),t}();function Ga(t,n,i,r,e,o,a){if(0===e)return!1;var u,s=e;if(a>n+s&&a>r+s||a<n-s&&a<r-s||o>t+s&&o>i+s||o<t-s&&o<i-s)return!1;if(t===i)return Math.abs(o-t)<=s/2;var f=(u=(n-r)/(t-i))*o-a+(t*r-i*n)/(t-i);return f*f/(u*u+1)<=s/2*s/2}function ja(t,n,i,r,e,o,a,u,s,f,h){if(0===s)return!1;var l=s;if(h>n+l&&h>r+l&&h>o+l&&h>u+l||h<n-l&&h<r-l&&h<o-l&&h<u-l||f>t+l&&f>i+l&&f>e+l&&f>a+l||f<t-l&&f<i-l&&f<e-l&&f<a-l)return!1;var c=function(t,n,i,r,e,o,a,u,s,f){var h,l,c,v,d,m=.005,p=1/0;ii[0]=s,ii[1]=f;for(var y=0;y<1;y+=.05)ri[0]=ui(t,i,e,a,y),ri[1]=ui(n,r,o,u,y),(v=At(ii,ri))<p&&(h=y,p=v);p=1/0;for(var g=0;g<32&&!(m<Qn);g++)c=h+m,ri[0]=ui(t,i,e,a,l=h-m),ri[1]=ui(n,r,o,u,l),v=At(ri,ii),l>=0&&v<p?(h=l,p=v):(ei[0]=ui(t,i,e,a,c),ei[1]=ui(n,r,o,u,c),d=At(ei,ii),c<=1&&d<p?(h=c,p=d):m*=.5);return Jn(p)}(t,n,i,r,e,o,a,u,f,h);return c<=l/2}function Ya(t,n,i,r,e,o,a,u,s){if(0===a)return!1;var f=a;if(s>n+f&&s>r+f&&s>o+f||s<n-f&&s<r-f&&s<o-f||u>t+f&&u>i+f&&u>e+f||u<t-f&&u<i-f&&u<e-f)return!1;var h=function(t,n,i,r,e,o,a,u){var s,f=.005,h=1/0;ii[0]=a,ii[1]=u;for(var l=0;l<1;l+=.05)ri[0]=vi(t,i,e,l),ri[1]=vi(n,r,o,l),(m=At(ii,ri))<h&&(s=l,h=m);h=1/0;for(var c=0;c<32&&!(f<Qn);c++){var v=s-f,d=s+f;ri[0]=vi(t,i,e,v),ri[1]=vi(n,r,o,v);var m=At(ri,ii);if(v>=0&&m<h)s=v,h=m;else{ei[0]=vi(t,i,e,d),ei[1]=vi(n,r,o,d);var p=At(ei,ii);d<=1&&p<h?(s=d,h=p):f*=.5}}return Jn(h)}(t,n,i,r,e,o,u,s);return h<=f/2}var Xa=2*Math.PI;function qa(t){return(t%=Xa)<0&&(t+=Xa),t}var Za=2*Math.PI;function $a(t,n,i,r,e,o,a,u,s){if(0===a)return!1;var f=a;u-=t,s-=n;var h=Math.sqrt(u*u+s*s);if(h-f>i||h+f<i)return!1;if(Math.abs(r-e)%Za<1e-4)return!0;if(o){var l=r;r=qa(e),e=qa(l)}else r=qa(r),e=qa(e);r>e&&(e+=Za);var c=Math.atan2(s,u);return c<0&&(c+=Za),c>=r&&c<=e||c+Za>=r&&c+Za<=e}function Ka(t,n,i,r,e,o){if(o>n&&o>r||o<n&&o<r)return 0;if(r===n)return 0;var a=(o-n)/(r-n),u=r<n?1:-1;1!==a&&0!==a||(u=r<n?.5:-.5);var s=a*(i-t)+t;return s===e?1/0:s>e?u:0}var Ja=Ua.CMD,Qa=2*Math.PI,tu=[-1,-1,-1],nu=[-1,-1];function iu(t,n,i,r,e,o,a,u,s,f){if(f>n&&f>r&&f>o&&f>u||f<n&&f<r&&f<o&&f<u)return 0;var h,l=fi(n,r,o,u,f,tu);if(0===l)return 0;for(var c=0,v=-1,d=void 0,m=void 0,p=0;p<l;p++){var y=tu[p],g=0===y||1===y?.5:1;ui(t,i,e,a,y)<s||(v<0&&(v=hi(n,r,o,u,nu),nu[1]<nu[0]&&v>1&&(void 0,h=nu[0],nu[0]=nu[1],nu[1]=h),d=ui(n,r,o,u,nu[0]),v>1&&(m=ui(n,r,o,u,nu[1]))),c+=2===v?y<nu[0]?d<n?g:-g:y<nu[1]?m<d?g:-g:u<m?g:-g:y<nu[0]?d<n?g:-g:u<d?g:-g)}return c}function ru(t,n,i,r,e,o,a,u){if(u>n&&u>r&&u>o||u<n&&u<r&&u<o)return 0;var s=function(t,n,i,r,e){var o=t-2*n+i,a=2*(n-t),u=t-r,s=0;if(oi(o))ai(a)&&(h=-u/a)>=0&&h<=1&&(e[s++]=h);else{var f=a*a-4*o*u;if(oi(f))(h=-a/(2*o))>=0&&h<=1&&(e[s++]=h);else if(f>0){var h,l=Jn(f),c=(-a-l)/(2*o);(h=(-a+l)/(2*o))>=0&&h<=1&&(e[s++]=h),c>=0&&c<=1&&(e[s++]=c)}}return s}(n,r,o,u,tu);if(0===s)return 0;var f=mi(n,r,o);if(f>=0&&f<=1){for(var h=0,l=vi(n,r,o,f),c=0;c<s;c++){var v=0===tu[c]||1===tu[c]?.5:1;vi(t,i,e,tu[c])<a||(h+=tu[c]<f?l<n?v:-v:o<l?v:-v)}return h}return v=0===tu[0]||1===tu[0]?.5:1,vi(t,i,e,tu[0])<a?0:o<n?v:-v}function eu(t,n,i,r,e,o,a,u){if((u-=n)>i||u<-i)return 0;var s=Math.sqrt(i*i-u*u);tu[0]=-s,tu[1]=s;var f=Math.abs(r-e);if(f<1e-4)return 0;if(f>=Qa-1e-4){r=0,e=Qa;var h=o?1:-1;return a>=tu[0]+t&&a<=tu[1]+t?h:0}if(r>e){var l=r;r=e,e=l}r<0&&(r+=Qa,e+=Qa);for(var c=0,v=0;v<2;v++){var d=tu[v];if(d+t>a){var m=Math.atan2(u,d);h=o?1:-1,m<0&&(m=Qa+m),(m>=r&&m<=e||m+Qa>=r&&m+Qa<=e)&&(m>Math.PI/2&&m<1.5*Math.PI&&(h=-h),c+=h)}}return c}function ou(t,n,i,r,e){for(var o,a,u=t.data,s=t.len(),f=0,h=0,l=0,c=0,v=0,d=0;d<s;){var m=u[d++],p=1===d;switch(m===Ja.M&&d>1&&(i||(f+=Ka(h,l,c,v,r,e))),p&&(c=h=u[d],v=l=u[d+1]),m){case Ja.M:h=c=u[d++],l=v=u[d++];break;case Ja.L:if(i){if(Ga(h,l,u[d],u[d+1],n,r,e))return!0}else f+=Ka(h,l,u[d],u[d+1],r,e)||0;h=u[d++],l=u[d++];break;case Ja.C:if(i){if(ja(h,l,u[d++],u[d++],u[d++],u[d++],u[d],u[d+1],n,r,e))return!0}else f+=iu(h,l,u[d++],u[d++],u[d++],u[d++],u[d],u[d+1],r,e)||0;h=u[d++],l=u[d++];break;case Ja.Q:if(i){if(Ya(h,l,u[d++],u[d++],u[d],u[d+1],n,r,e))return!0}else f+=ru(h,l,u[d++],u[d++],u[d],u[d+1],r,e)||0;h=u[d++],l=u[d++];break;case Ja.A:var y=u[d++],g=u[d++],b=u[d++],w=u[d++],x=u[d++],M=u[d++];d+=1;var S=!!(1-u[d++]);o=Math.cos(x)*b+y,a=Math.sin(x)*w+g,p?(c=o,v=a):f+=Ka(h,l,o,a,r,e);var k=(r-y)*w/b+y;if(i){if($a(y,g,w,x,x+M,S,n,k,e))return!0}else f+=eu(y,g,w,x,x+M,S,k,e);h=Math.cos(x+M)*b+y,l=Math.sin(x+M)*w+g;break;case Ja.R:if(c=h=u[d++],v=l=u[d++],o=c+u[d++],a=v+u[d++],i){if(Ga(c,v,o,v,n,r,e)||Ga(o,v,o,a,n,r,e)||Ga(o,a,c,a,n,r,e)||Ga(c,a,c,v,n,r,e))return!0}else f+=Ka(o,v,o,a,r,e),f+=Ka(c,a,c,v,r,e);break;case Ja.Z:if(i){if(Ga(h,l,c,v,n,r,e))return!0}else f+=Ka(h,l,c,v,r,e);h=c,l=v}}return i||Math.abs(l-v)<1e-4||(f+=Ka(h,l,c,v,r,e)||0),0!==f}var au=O({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},oa),uu={style:O({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},aa.style)},su=Rr.concat(["invisible","culling","z","z2","zlevel","parent"]),fu=function(t){function n(n){return t.call(this,n)||this}var i;return o(n,t),n.prototype.update=function(){var i=this;t.prototype.update.call(this);var r=this.style;if(r.decal){var e=this._decalEl=this._decalEl||new n;e.buildPath===n.prototype.buildPath&&(e.buildPath=function(t){i.buildPath(t,i.shape)}),e.silent=!0;var o=e.style;for(var a in r)o[a]!==r[a]&&(o[a]=r[a]);o.fill=r.fill?r.decal:null,o.decal=null,o.shadowColor=null,r.strokeFirst&&(o.stroke=null);for(var u=0;u<su.length;++u)e[su[u]]=this[su[u]];e.__dirty|=1}else this._decalEl&&(this._decalEl=null)},n.prototype.getDecalElement=function(){return this._decalEl},n.prototype._init=function(n){var i=F(n);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var e=0;e<i.length;e++){var o=i[e],a=n[o];"style"===o?this.style?I(this.style,a):this.useStyle(a):"shape"===o?I(this.shape,a):t.prototype.attrKV.call(this,o,a)}this.style||this.useStyle({})},n.prototype.getDefaultStyle=function(){return null},n.prototype.getDefaultShape=function(){return{}},n.prototype.canBeInsideText=function(){return this.hasFill()},n.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(G(t)){var n=Wi(t,0);return n>.5?Tr:n>.2?"#eee":Ar}if(t)return Ar}return Tr},n.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(G(n)){var i=this.__zr;if(!(!i||!i.isDarkMode())==Wi(t,0)<.4)return n}},n.prototype.buildPath=function(){},n.prototype.pathUpdated=function(){this.__dirty&=-5},n.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},n.prototype.createPathProxy=function(){this.path=new Ua(!1)},n.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(null==n||"none"===n||!(t.lineWidth>0))},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var e=this.path;(r||4&this.__dirty)&&(e.beginPath(),this.buildPath(e,this.shape,!1),this.pathUpdated()),t=e.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var s=this.strokeContainThreshold;u=Math.max(u,null==s?4:s)}a>1e-10&&(o.width+=u/a,o.height+=u/a,o.x-=u/a/2,o.y-=u/a/2)}return o}return t},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),r=this.getBoundingRect(),e=this.style;if(r.contain(t=i[0],n=i[1])){var o=this.path;if(this.hasStroke()){var a=e.lineWidth,u=e.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,n,i,r){return ou(t,n,!0,i,r)}(o,a/u,t,n)))return!0}if(this.hasFill())return function(t,n,i){return ou(t,0,!1,n,i)}(o,t,n)}return!1},n.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},n.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},n.prototype.animateShape=function(t){return this.animate("shape",t)},n.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},n.prototype.attrKV=function(n,i){"shape"===n?this.setShape(i):t.prototype.attrKV.call(this,n,i)},n.prototype.setShape=function(t,n){var i=this.shape;return i||(i=this.shape={}),"string"==typeof t?i[t]=n:I(i,t),this.dirtyShape(),this},n.prototype.shapeChanged=function(){return!!(4&this.__dirty)},n.prototype.createStyle=function(t){return vt(au,t)},n.prototype._innerSaveToNormal=function(n){t.prototype._innerSaveToNormal.call(this,n);var i=this._normalState;n.shape&&!i.shape&&(i.shape=I({},this.shape))},n.prototype._applyStateObj=function(n,i,r,e,o,a){if(t.prototype._applyStateObj.call(this,n,i,r,e,o,a),1!==this.__inHover){var u,s=!(i&&e);if(i&&i.shape?o?e?u=i.shape:(u=I({},r.shape),I(u,i.shape)):(u=I({},e?this.shape:r.shape),I(u,i.shape)):s&&(u=r.shape),u)if(o){this.shape=I({},this.shape);for(var f={},h=F(u),l=0;l<h.length;l++){var c=h[l];"object"==typeof u[c]?this.shape[c]=u[c]:f[c]=u[c]}this._transitionState(n,{shape:f},a)}else this.shape=u,this.dirtyShape()}},n.prototype._mergeStates=function(n){for(var i,r=t.prototype._mergeStates.call(this,n),e=0;e<n.length;e++){var o=n[e];o.shape&&this._mergeStyle(i=i||{},o.shape)}return i&&(r.shape=i),r},n.prototype.getAnimationStyleProps=function(){return uu},n.prototype.isZeroArea=function(){return!1},n.extend=function(t){var i=function(n){function i(i){var r=n.call(this,i)||this;return t.init&&t.init.call(r,i),r}return o(i,n),i.prototype.getDefaultStyle=function(){return L(t.style)},i.prototype.getDefaultShape=function(){return L(t.shape)},i}(n);for(var r in t)"function"==typeof t[r]&&(i.prototype[r]=t[r]);return i},n.initDefaultProps=((i=n.prototype).type="path",i.strokeContainThreshold=5,i.segmentIgnoreThreshold=0,i.subPixelOptimize=!1,i.autoBatch=!1,void(i.__dirty=7)),n}(fa),hu=O({strokeFirst:!0,font:h,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},au),lu=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.hasStroke=function(){return ra(this.style)},n.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},n.prototype.createStyle=function(t){return vt(hu,t)},n.prototype.setBoundingRect=function(t){this._rect=t},n.prototype.getBoundingRect=function(){var t,n,i;return this._rect||(this._rect=(n=na((t=this.style).text),ia(t,Wr(Br(i=t.font),n),Yr(i),null))),this._rect},n.initDefaultProps=void(n.prototype.dirtyRectTolerance=10),n}(fa);lu.prototype.type="tspan";var cu=O({x:0,y:0},oa),vu={style:O({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},aa.style)},du=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.createStyle=function(t){return vt(cu,t)},n.prototype._getSize=function(t){var n=this.style,i=n[t];if(null!=i)return i;var r,e=(r=n.image)&&"string"!=typeof r&&r.width&&r.height?n.image:this.__image;if(!e)return 0;var o="width"===t?"height":"width",a=n[o];return null==a?e[t]:e[t]/e[o]*a},n.prototype.getWidth=function(){return this._getSize("width")},n.prototype.getHeight=function(){return this._getSize("height")},n.prototype.getAnimationStyleProps=function(){return vu},n.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new xn(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},n}(fa);du.prototype.type="image";var mu=Math.round;function pu(t,n,i){if(n){var r=n.x1,e=n.x2,o=n.y1,a=n.y2;t.x1=r,t.x2=e,t.y1=o,t.y2=a;var u=i&&i.lineWidth;return u?(mu(2*r)===mu(2*e)&&(t.x1=t.x2=gu(r,u,!0)),mu(2*o)===mu(2*a)&&(t.y1=t.y2=gu(o,u,!0)),t):t}}function yu(t,n,i){if(n){var r=n.x,e=n.y,o=n.width,a=n.height;t.x=r,t.y=e,t.width=o,t.height=a;var u=i&&i.lineWidth;return u?(t.x=gu(r,u,!0),t.y=gu(e,u,!0),t.width=Math.max(gu(r+o,u,!1)-t.x,0===o?0:1),t.height=Math.max(gu(e+a,u,!1)-t.y,0===a?0:1),t):t}}function gu(t,n,i){if(!n)return t;var r=mu(2*t);return(r+mu(n))%2==0?r/2:(r+(i?1:-1))/2}var bu=function(){this.x=0,this.y=0,this.width=0,this.height=0},wu={},xu=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultShape=function(){return new bu},n.prototype.buildPath=function(t,n){var i,r,e,o;if(this.subPixelOptimize){var a=yu(wu,n,this.style);i=a.x,r=a.y,e=a.width,o=a.height,a.r=n.r,n=a}else i=n.x,r=n.y,e=n.width,o=n.height;n.r?function(t,n){var i,r,e,o,a,u=n.x,s=n.y,f=n.width,h=n.height,l=n.r;f<0&&(u+=f,f=-f),h<0&&(s+=h,h=-h),"number"==typeof l?i=r=e=o=l:l instanceof Array?1===l.length?i=r=e=o=l[0]:2===l.length?(i=e=l[0],r=o=l[1]):3===l.length?(i=l[0],r=o=l[1],e=l[2]):(i=l[0],r=l[1],e=l[2],o=l[3]):i=r=e=o=0,i+r>f&&(i*=f/(a=i+r),r*=f/a),e+o>f&&(e*=f/(a=e+o),o*=f/a),r+e>h&&(r*=h/(a=r+e),e*=h/a),i+o>h&&(i*=h/(a=i+o),o*=h/a),t.moveTo(u+i,s),t.lineTo(u+f-r,s),0!==r&&t.arc(u+f-r,s+r,r,-Math.PI/2,0),t.lineTo(u+f,s+h-e),0!==e&&t.arc(u+f-e,s+h-e,e,0,Math.PI/2),t.lineTo(u+o,s+h),0!==o&&t.arc(u+o,s+h-o,o,Math.PI/2,Math.PI),t.lineTo(u,s+i),0!==i&&t.arc(u+i,s+i,i,Math.PI,1.5*Math.PI),t.closePath()}(t,n):t.rect(i,r,e,o)},n.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},n}(fu);xu.prototype.type="rect";var Mu={fill:"#000"},Su={},ku={style:O({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},aa.style)},Tu=function(t){function n(n){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Mu,i.attr(n),i}return o(n,t),n.prototype.childrenRef=function(){return this._children},n.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var n=0;n<this._children.length;n++){var i=this._children[n];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},n.prototype.updateTransform=function(){var n=this.innerTransformable;n?(n.updateTransform(),n.transform&&(this.transform=n.transform)):t.prototype.updateTransform.call(this)},n.prototype.getLocalTransform=function(n){var i=this.innerTransformable;return i?i.getLocalTransform(n):t.prototype.getLocalTransform.call(this,n)},n.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},n.prototype._updateSubTexts=function(){var t;this._childCursor=0,Iu(t=this.style),z(t.rich,Iu),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},n.prototype.addSelfToZr=function(n){t.prototype.addSelfToZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].__zr=n},n.prototype.removeSelfFromZr=function(n){t.prototype.removeSelfFromZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},n.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new xn(0,0,0,0),n=this._children,i=[],r=null,e=0;e<n.length;e++){var o=n[e],a=o.getBoundingRect(),u=o.getLocalTransform(i);u?(t.copy(a),t.applyTransform(u),(r=r||t.clone()).union(t)):(r=r||a.clone()).union(a)}this._rect=r||t}return this._rect},n.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Mu},n.prototype.setTextContent=function(){},n.prototype._mergeStyle=function(t,n){if(!n)return t;var i=n.rich,r=t.rich||i&&{};return I(t,n),i&&r?(this._mergeRich(r,i),t.rich=r):r&&(t.rich=r),t},n.prototype._mergeRich=function(t,n){for(var i=F(n),r=0;r<i.length;r++){var e=i[r];t[e]=t[e]||{},I(t[e],n[e])}},n.prototype.getAnimationStyleProps=function(){return ku},n.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return n&&n instanceof t||(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},n.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||h,i=t.padding,r=this._defaultStyle,e=t.x||0,o=t.y||0,a=t.align||r.align||"left",u=t.verticalAlign||r.verticalAlign||"top";Jo(Su,r.overflowRect,e,o,a,u),e=Su.baseX,o=Su.baseY;var s=function(t,n,i,r){var e=na(t),o=n.overflow,a=n.padding,u=a?a[1]+a[3]:0,s=a?a[0]+a[2]:0,f=n.font,h="truncate"===o,l=Yr(f),c=tt(n.lineHeight,l),v="truncate"===n.lineOverflow,d=!1,m=n.width;null==m&&null!=i&&(m=i-u);var p,y=n.height;null==y&&null!=r&&(y=r-s);var g=(p=null==m||"break"!==o&&"breakAll"!==o?e?e.split("\n"):[]:e?Ko(e,n.font,m,"breakAll"===o,0).lines:[]).length*c;if(null==y&&(y=g),g>y&&v){var b=Math.floor(y/c);d=d||p.length>b,g=(p=p.slice(0,b)).length*c}if(e&&h&&null!=m)for(var w=Ho(m,f,n.ellipsis,{minChar:n.truncateMinChar,placeholder:n.placeholder}),x={},M=0;M<p.length;M++)Uo(x,p[M],w),p[M]=x.textLine,d=d||x.isTruncated;var S=y,k=0,T=Br(f);for(M=0;M<p.length;M++)k=Math.max(Wr(T,p[M]),k);null==m&&(m=k);var A=m;return{lines:p,height:y,outerWidth:A+=u,outerHeight:S+=s,lineHeight:c,calculatedLineHeight:l,contentWidth:k,contentHeight:g,width:m,isTruncated:d}}(Eu(t),t,Su.outerWidth,Su.outerHeight),f=zu(t),l=!!t.backgroundColor,c=s.outerHeight,v=s.outerWidth,d=s.lines,m=s.lineHeight;this.isTruncated=!!s.isTruncated;var p=e,y=jr(o,s.contentHeight,u);if(f||i){var g=Gr(e,v,a),b=jr(o,c,u);f&&this._renderBackground(t,t,g,b,v,c)}y+=m/2,i&&(p=_u(e,a,i),"top"===u?y+=i[0]:"bottom"===u&&(y-=i[2]));for(var w=0,x=!1,M=!1,S=(Du("fill"in t?t.fill:(M=!0,r.fill))),k=(Ou("stroke"in t?t.stroke:l||r.autoStroke&&!M?null:(w=2,x=!0,r.stroke))),T=t.textShadowBlur>0,A=0;A<d.length;A++){var N=this._getOrCreateChild(lu),L=N.createStyle();N.useStyle(L),L.text=d[A],L.x=p,L.y=y,L.textAlign=a,L.textBaseline="middle",L.opacity=t.opacity,L.strokeFirst=!0,T&&(L.shadowBlur=t.textShadowBlur||0,L.shadowColor=t.textShadowColor||"transparent",L.shadowOffsetX=t.textShadowOffsetX||0,L.shadowOffsetY=t.textShadowOffsetY||0),L.stroke=k,L.fill=S,k&&(L.lineWidth=t.lineWidth||w,L.lineDash=t.lineDash,L.lineDashOffset=t.lineDashOffset||0),L.font=n,Cu(L,t),y+=m,N.setBoundingRect(ia(L,s.contentWidth,s.calculatedLineHeight,x?0:null))}},n.prototype._updateRichTexts=function(){var t=this.style,n=this._defaultStyle,i=t.align||n.align,r=t.verticalAlign||n.verticalAlign,e=t.x||0,o=t.y||0;Jo(Su,n.overflowRect,e,o,i,r),e=Su.baseX,o=Su.baseY;var a=function(t,n,i,r,e){var o=new Xo,a=na(t);if(!a)return o;var u=n.padding,s=u?u[1]+u[3]:0,f=u?u[0]+u[2]:0,h=n.width;null==h&&null!=i&&(h=i-s);var l=n.height;null==l&&null!=r&&(l=r-f);for(var c,v=n.overflow,d="break"!==v&&"breakAll"!==v||null==h?null:{width:h,accumWidth:0,breakAll:"breakAll"===v},m=Vo.lastIndex=0;null!=(c=Vo.exec(a));){var p=c.index;p>m&&qo(o,a.substring(m,p),n,d),qo(o,c[2],n,d,c[1]),m=Vo.lastIndex}m<a.length&&qo(o,a.substring(m,a.length),n,d);var y=[],g=0,b=0,w="truncate"===v,x="truncate"===n.lineOverflow,M={};function S(t,n,i){t.width=n,t.lineHeight=i,g+=i,b=Math.max(b,n)}t:for(var k=0;k<o.lines.length;k++){for(var T=o.lines[k],A=0,N=0,L=0;L<T.tokens.length;L++){var C=(V=T.tokens[L]).styleName&&n.rich[V.styleName]||{},I=V.textPadding=C.padding,O=I?I[1]+I[3]:0,D=V.font=C.font||n.font;V.contentHeight=Yr(D);var _=tt(C.height,V.contentHeight);if(V.innerHeight=_,I&&(_+=I[0]+I[2]),V.height=_,V.lineHeight=nt(C.lineHeight,n.lineHeight,_),V.align=C&&C.align||e,V.verticalAlign=C&&C.verticalAlign||"middle",x&&null!=l&&g+V.lineHeight>l){var E=o.lines.length;L>0?(T.tokens=T.tokens.slice(0,L),S(T,N,A),o.lines=o.lines.slice(0,k+1)):o.lines=o.lines.slice(0,k),o.isTruncated=o.isTruncated||o.lines.length<E;break t}var z=C.width,R=null==z||"auto"===z;if("string"==typeof z&&"%"===z.charAt(z.length-1))V.percentWidth=z,y.push(V),V.contentWidth=Wr(Br(D),V.text);else{if(R){var P=C.backgroundColor,B=P&&P.image;B&&Fo(B=Ro(B))&&(V.width=Math.max(V.width,B.width*_/B.height))}var F=w&&null!=h?h-N:null;null!=F&&F<V.width?!R||F<O?(V.text="",V.width=V.contentWidth=0):(Wo(M,V.text,F-O,D,n.ellipsis,{minChar:n.truncateMinChar}),V.text=M.text,o.isTruncated=o.isTruncated||M.isTruncated,V.width=V.contentWidth=Wr(Br(D),V.text)):V.contentWidth=Wr(Br(D),V.text)}V.width+=O,N+=V.width,C&&(A=Math.max(A,V.lineHeight))}S(T,N,A)}for(o.outerWidth=o.width=tt(h,b),o.outerHeight=o.height=tt(l,g),o.contentHeight=g,o.contentWidth=b,o.outerWidth+=s,o.outerHeight+=f,k=0;k<y.length;k++){var V;(V=y[k]).width=parseInt(V.percentWidth,10)/100*o.width}return o}(Eu(t),t,Su.outerWidth,Su.outerHeight,i),u=a.width,s=a.outerWidth,f=a.outerHeight,h=t.padding;this.isTruncated=!!a.isTruncated;var l=Gr(e,s,i),c=jr(o,f,r),v=l,d=c;h&&(v+=h[3],d+=h[0]);var m=v+u;zu(t)&&this._renderBackground(t,t,l,c,s,f);for(var p=!!t.backgroundColor,y=0;y<a.lines.length;y++){for(var g=a.lines[y],b=g.tokens,w=b.length,x=g.lineHeight,M=g.width,S=0,k=v,T=m,A=w-1,N=void 0;S<w&&(!(N=b[S]).align||"left"===N.align);)this._placeToken(N,t,x,d,k,"left",p),M-=N.width,k+=N.width,S++;for(;A>=0&&"right"===(N=b[A]).align;)this._placeToken(N,t,x,d,T,"right",p),M-=N.width,T-=N.width,A--;for(k+=(u-(k-v)-(m-T)-M)/2;S<=A;)this._placeToken(N=b[S],t,x,d,k+N.width/2,"center",p),k+=N.width,S++;d+=x}},n.prototype._placeToken=function(t,n,i,r,e,o,a){var u=n.rich[t.styleName]||{};u.text=t.text;var s=t.verticalAlign,f=r+i/2;"top"===s?f=r+t.height/2:"bottom"===s&&(f=r+i-t.height/2),!t.isLineHolder&&zu(u)&&this._renderBackground(u,n,"right"===o?e-t.width:"center"===o?e-t.width/2:e,f-t.height/2,t.width,t.height);var l=!!u.backgroundColor,c=t.textPadding;c&&(e=_u(e,o,c),f-=t.height/2-c[0]-t.innerHeight/2);var v=this._getOrCreateChild(lu),d=v.createStyle();v.useStyle(d);var m=this._defaultStyle,p=!1,y=0,g=!1,b=Du("fill"in u?u.fill:"fill"in n?n.fill:(p=!0,m.fill)),w=Ou("stroke"in u?u.stroke:"stroke"in n?n.stroke:l||a||m.autoStroke&&!p?null:(y=2,g=!0,m.stroke)),x=u.textShadowBlur>0||n.textShadowBlur>0;d.text=t.text,d.x=e,d.y=f,x&&(d.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,d.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",d.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,d.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),d.textAlign=o,d.textBaseline="middle",d.font=t.font||h,d.opacity=nt(u.opacity,n.opacity,1),Cu(d,u),w&&(d.lineWidth=nt(u.lineWidth,n.lineWidth,y),d.lineDash=tt(u.lineDash,n.lineDash),d.lineDashOffset=n.lineDashOffset||0,d.stroke=w),b&&(d.fill=b),v.setBoundingRect(ia(d,t.contentWidth,t.contentHeight,g?0:null))},n.prototype._renderBackground=function(t,n,i,r,e,o){var a,u,s,f=t.backgroundColor,h=t.borderWidth,l=t.borderColor,c=f&&f.image,v=f&&!c,d=t.borderRadius,m=this;if(v||t.lineHeight||h&&l){(a=this._getOrCreateChild(xu)).useStyle(a.createStyle()),a.style.fill=null;var p=a.shape;p.x=i,p.y=r,p.width=e,p.height=o,p.r=d,a.dirtyShape()}if(v)(s=a.style).fill=f||null,s.fillOpacity=tt(t.fillOpacity,1);else if(c){(u=this._getOrCreateChild(du)).onload=function(){m.dirtyStyle()};var y=u.style;y.image=f.image,y.x=i,y.y=r,y.width=e,y.height=o}h&&l&&((s=a.style).lineWidth=h,s.stroke=l,s.strokeOpacity=tt(t.strokeOpacity,1),s.lineDash=t.borderDash,s.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(s.strokeFirst=!0,s.lineWidth*=2));var g=(a||u).style;g.shadowBlur=t.shadowBlur||0,g.shadowColor=t.shadowColor||"transparent",g.shadowOffsetX=t.shadowOffsetX||0,g.shadowOffsetY=t.shadowOffsetY||0,g.opacity=nt(t.opacity,n.opacity,1)},n.makeFont=function(t){var n,i="";return function(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}(t)&&(i=[t.fontStyle,t.fontWeight,(n=t.fontSize,"string"!=typeof n||-1===n.indexOf("px")&&-1===n.indexOf("rem")&&-1===n.indexOf("em")?isNaN(+n)?"12px":n+"px":n),t.fontFamily||"sans-serif"].join(" ")),i&&ot(i)||t.textFont||t.font},n}(fa),Au={left:!0,right:1,center:1},Nu={top:1,bottom:1,middle:1},Lu=["fontStyle","fontWeight","fontSize","fontFamily"];function Cu(t,n){for(var i=0;i<Lu.length;i++){var r=Lu[i],e=n[r];null!=e&&(t[r]=e)}}function Iu(t){if(t){t.font=Tu.makeFont(t);var n=t.align;"middle"===n&&(n="center"),t.align=null==n||Au[n]?n:"left";var i=t.verticalAlign;"center"===i&&(i="middle"),t.verticalAlign=null==i||Nu[i]?i:"top",t.padding&&(t.padding=rt(t.padding))}}function Ou(t,n){return null==t||n<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Du(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function _u(t,n,i){return"right"===n?t-i[1]:"center"===n?t+i[3]/2-i[1]/2:t+i[3]}function Eu(t){var n=t.text;return null!=n&&(n+=""),n}function zu(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var Ru=ao(),Pu="undefined",Bu="series",Fu=ct(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Vu="original",Wu="arrayRows",Hu="objectRows",Uu="keyedColumns",Gu="typedArray",ju="unknown",Yu="column",Xu="row",qu=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],Zu=function(t){z(qu,(function(n){this[n]=V(t[n],t)}),this)},$u=1,Ku={},Ju=ao(),Qu=ao(),ts=["emphasis","blur","select"],ns=["normal","emphasis","blur","select"],is="highlight",rs="downplay",es="select",os="unselect",as="toggleSelect",us="selectchanged";function ss(t){return null!=t&&"none"!==t}function fs(t,n,i){t.onHoverStateChange&&(t.hoverState||0)!==i&&t.onHoverStateChange(n),t.hoverState=i}function hs(t){fs(t,"emphasis",2)}function ls(t){2===t.hoverState&&fs(t,"normal",0)}function cs(t){fs(t,"blur",1)}function vs(t){1===t.hoverState&&fs(t,"normal",0)}function ds(t){t.selected=!0}function ms(t){t.selected=!1}function ps(t,n,i){n(t,i)}function ys(t,n,i){ps(t,n,i),t.isGroup&&t.traverse((function(t){ps(t,n,i)}))}function gs(t,n){switch(n){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function bs(t,n){var i=this.states[t];if(this.style){if("emphasis"===t)return function(t,n,i,r){var e=i&&D(i,"select")>=0,o=!1;if(t instanceof fu){var a=Ju(t),u=e&&a.selectFill||a.normalFill,s=e&&a.selectStroke||a.normalStroke;if(ss(u)||ss(s)){var f=(r=r||{}).style||{};"inherit"===f.fill?(o=!0,r=I({},r),(f=I({},f)).fill=u):!ss(f.fill)&&ss(u)?(o=!0,r=I({},r),(f=I({},f)).fill=Ui(u)):!ss(f.stroke)&&ss(s)&&(o||(r=I({},r),f=I({},f)),f.stroke=Ui(s)),r.style=f}}if(r&&null==r.z2){o||(r=I({},r));var h=t.z2EmphasisLift;r.z2=t.z2+(null!=h?h:10)}return r}(this,0,n,i);if("blur"===t)return function(t,n,i){var r=D(t.currentStates,n)>=0,e=t.style.opacity,o=r?null:function(t,n,i,r){for(var e=t.style,o={},a=0;a<n.length;a++){var u=n[a],s=e[u];o[u]=null==s?r&&r[u]:s}for(a=0;a<t.animators.length;a++){var f=t.animators[a];f.__fromStateTransition&&f.__fromStateTransition.indexOf(i)<0&&"style"===f.targetName&&f.saveTo(o,n)}return o}(t,["opacity"],n,{opacity:1}),a=(i=i||{}).style||{};return null==a.opacity&&(i=I({},i),a=I({opacity:r?e:.1*o.opacity},a),i.style=a),i}(this,t,i);if("select"===t)return function(t,n,i){if(i&&null==i.z2){i=I({},i);var r=t.z2SelectLift;i.z2=t.z2+(null!=r?r:9)}return i}(this,0,i)}return i}function ws(t){t.stateProxy=bs;var n=t.getTextContent(),i=t.getTextGuideLine();n&&(n.stateProxy=bs),i&&(i.stateProxy=bs)}function xs(t,n){!Ls(t,n)&&!t.__highByOuter&&ys(t,hs)}function Ms(t,n){!Ls(t,n)&&!t.__highByOuter&&ys(t,ls)}function Ss(t,n){t.__highByOuter|=1<<(n||0),ys(t,hs)}function ks(t,n){!(t.__highByOuter&=~(1<<(n||0)))&&ys(t,ls)}function Ts(t){ys(t,vs)}function As(t){ys(t,ds)}function Ns(t){ys(t,ms)}function Ls(t,n){return t.__highDownSilentOnTouch&&n.zrByTouch}function Cs(t){var n=t.getModel(),i=[],r=[];n.eachComponent((function(n,e){var o=Qu(e),a=function(t,n){return n.mainType===Bu?t.getViewOfSeriesModel(n):t.getViewOfComponentModel(n)}(t,e),u="series"===n;!u&&r.push(a),o.isBlured&&(a.group.traverse((function(t){vs(t)})),u&&i.push(e)),o.isBlured=!1})),z(r,(function(t){t&&t.toggleBlurSeries&&t.toggleBlurSeries(i,!1,n)}))}function Is(t,n,i,r){var e=r.getModel();function o(t,n){for(var i=0;i<n.length;i++){var r=t.getItemGraphicEl(n[i]);r&&Ts(r)}}if(i=i||"coordinateSystem",null!=t&&n&&"none"!==n){var a=e.getSeriesByIndex(t),u=a.coordinateSystem;u&&u.master&&(u=u.master);var s=[];e.eachSeries((function(t){var e=a===t,f=t.coordinateSystem;if(f&&f.master&&(f=f.master),!("series"===i&&!e||"coordinateSystem"===i&&!(f&&u?f===u:e)||"series"===n&&e)){if(r.getViewOfSeriesModel(t).group.traverse((function(t){t.__highByOuter&&e&&"self"===n||cs(t)})),E(n))o(t.getData(),n);else if(X(n))for(var h=F(n),l=0;l<h.length;l++)o(t.getData(h[l]),n[h[l]]);s.push(t),Qu(t).isBlured=!0}})),e.eachComponent((function(t,n){if("series"!==t){var i=r.getViewOfComponentModel(n);i&&i.toggleBlurSeries&&i.toggleBlurSeries(s,!0,e)}}))}}function Os(t,n,i){if(null!=t&&null!=n){var r=i.getModel().getComponent(t,n);if(r){Qu(r).isBlured=!0;var e=i.getViewOfComponentModel(r);e&&e.focusBlurEnabled&&e.group.traverse((function(t){cs(t)}))}}}function Ds(t,n,i,r){var e={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==n||null==i)return e;var o=r.getModel().getComponent(t,n);if(!o)return e;var a=r.getViewOfComponentModel(o);if(!a||!a.findHighDownDispatchers)return e;for(var u,s=a.findHighDownDispatchers(i),f=0;f<s.length;f++)if("self"===Ru(s[f]).focus){u=!0;break}return{focusSelf:u,dispatchers:s}}function _s(t){z(t.getAllData(),(function(n){var i=n.type;n.data.eachItemGraphicEl((function(n,r){t.isSelected(r,i)?As(n):Ns(n)}))}))}function Es(t){var n=[];return t.eachSeries((function(t){z(t.getAllData(),(function(i){var r=i.type,e=t.getSelectedDataIndices();if(e.length>0){var o={dataIndex:e,seriesIndex:t.seriesIndex};null!=r&&(o.dataType=r),n.push(o)}}))})),n}function zs(t,n,i){Vs(t,!0),ys(t,ws),function(t,n,i){var r=Ru(t);null!=n?(r.focus=n,r.blurScope=i):r.focus&&(r.focus=null)}(t,n,i)}function Rs(t,n,i,r){r?function(t){Vs(t,!1)}(t):zs(t,n,i)}var Ps=["emphasis","blur","select"],Bs={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Fs(t,n,i){i=i||"itemStyle";for(var r=0;r<Ps.length;r++){var e=Ps[r],o=n.getModel([e,i]);t.ensureState(e).style=o[Bs[i]]()}}function Vs(t,n){var i=!1===n,r=t;t.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=t.highDownSilentOnTouch),i&&!r.__highDownDispatcher||(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!i)}function Ws(t){return!(!t||!t.__highDownDispatcher)}function Hs(t){var n=t.type;return n===es||n===os||n===as}function Us(t){var n=t.type;return n===is||n===rs}var Gs=Ua.CMD,js=[[],[],[]],Ys=Math.sqrt,Xs=Math.atan2,qs=Math.sqrt,Zs=Math.sin,$s=Math.cos,Ks=Math.PI;function Js(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Qs(t,n){return(t[0]*n[0]+t[1]*n[1])/(Js(t)*Js(n))}function tf(t,n){return(t[0]*n[1]<t[1]*n[0]?-1:1)*Math.acos(Qs(t,n))}function nf(t,n,i,r,e,o,a,u,s,f,h){var l=s*(Ks/180),c=$s(l)*(t-i)/2+Zs(l)*(n-r)/2,v=-1*Zs(l)*(t-i)/2+$s(l)*(n-r)/2,d=c*c/(a*a)+v*v/(u*u);d>1&&(a*=qs(d),u*=qs(d));var m=(e===o?-1:1)*qs((a*a*(u*u)-a*a*(v*v)-u*u*(c*c))/(a*a*(v*v)+u*u*(c*c)))||0,p=m*a*v/u,y=m*-u*c/a,g=(t+i)/2+$s(l)*p-Zs(l)*y,b=(n+r)/2+Zs(l)*p+$s(l)*y,w=tf([1,0],[(c-p)/a,(v-y)/u]),x=[(c-p)/a,(v-y)/u],M=[(-1*c-p)/a,(-1*v-y)/u],S=tf(x,M);if(Qs(x,M)<=-1&&(S=Ks),Qs(x,M)>=1&&(S=0),S<0){var k=Math.round(S/Ks*1e6)/1e6;S=2*Ks+k%2*Ks}h.addData(f,g,b,a,u,w,S,l,o)}var rf=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,ef=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,of=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.applyTransform=function(){},n}(fu);function af(t){return null!=t.setData}function uf(t,n){var i=function(t){var n=new Ua;if(!t)return n;var i,r=0,e=0,o=r,a=e,u=Ua.CMD,s=t.match(rf);if(!s)return n;for(var f=0;f<s.length;f++){for(var h=s[f],l=h.charAt(0),c=void 0,v=h.match(ef)||[],d=v.length,m=0;m<d;m++)v[m]=parseFloat(v[m]);for(var p=0;p<d;){var y=void 0,g=void 0,b=void 0,w=void 0,x=void 0,M=void 0,S=void 0,k=r,T=e,A=void 0,N=void 0;switch(l){case"l":r+=v[p++],e+=v[p++],n.addData(c=u.L,r,e);break;case"L":r=v[p++],e=v[p++],n.addData(c=u.L,r,e);break;case"m":r+=v[p++],e+=v[p++],n.addData(c=u.M,r,e),o=r,a=e,l="l";break;case"M":r=v[p++],e=v[p++],n.addData(c=u.M,r,e),o=r,a=e,l="L";break;case"h":r+=v[p++],n.addData(c=u.L,r,e);break;case"H":r=v[p++],n.addData(c=u.L,r,e);break;case"v":e+=v[p++],n.addData(c=u.L,r,e);break;case"V":e=v[p++],n.addData(c=u.L,r,e);break;case"C":n.addData(c=u.C,v[p++],v[p++],v[p++],v[p++],v[p++],v[p++]),r=v[p-2],e=v[p-1];break;case"c":n.addData(c=u.C,v[p++]+r,v[p++]+e,v[p++]+r,v[p++]+e,v[p++]+r,v[p++]+e),r+=v[p-2],e+=v[p-1];break;case"S":y=r,g=e,A=n.len(),N=n.data,i===u.C&&(y+=r-N[A-4],g+=e-N[A-3]),k=v[p++],T=v[p++],r=v[p++],e=v[p++],n.addData(c=u.C,y,g,k,T,r,e);break;case"s":y=r,g=e,A=n.len(),N=n.data,i===u.C&&(y+=r-N[A-4],g+=e-N[A-3]),k=r+v[p++],T=e+v[p++],r+=v[p++],e+=v[p++],n.addData(c=u.C,y,g,k,T,r,e);break;case"Q":k=v[p++],T=v[p++],r=v[p++],e=v[p++],n.addData(c=u.Q,k,T,r,e);break;case"q":k=v[p++]+r,T=v[p++]+e,r+=v[p++],e+=v[p++],n.addData(c=u.Q,k,T,r,e);break;case"T":y=r,g=e,A=n.len(),N=n.data,i===u.Q&&(y+=r-N[A-4],g+=e-N[A-3]),r=v[p++],e=v[p++],n.addData(c=u.Q,y,g,r,e);break;case"t":y=r,g=e,A=n.len(),N=n.data,i===u.Q&&(y+=r-N[A-4],g+=e-N[A-3]),r+=v[p++],e+=v[p++],n.addData(c=u.Q,y,g,r,e);break;case"A":b=v[p++],w=v[p++],x=v[p++],M=v[p++],S=v[p++],nf(k=r,T=e,r=v[p++],e=v[p++],M,S,b,w,x,c=u.A,n);break;case"a":b=v[p++],w=v[p++],x=v[p++],M=v[p++],S=v[p++],nf(k=r,T=e,r+=v[p++],e+=v[p++],M,S,b,w,x,c=u.A,n)}}"z"!==l&&"Z"!==l||(n.addData(c=u.Z),r=o,e=a),i=c}return n.toStatic(),n}(t),r=I({},n);return r.buildPath=function(t){var n,r=af(t);r&&t.canSave()?(t.appendPath(i),(n=t.getContext())&&t.rebuildPath(n,1)):(n=r?t.getContext():t)&&i.rebuildPath(n,1)},r.applyTransform=function(t){!function(t,n){if(n){var i,r,e,o,a,u,s=t.data,f=t.len(),h=Gs.M,l=Gs.C,c=Gs.L,v=Gs.R,d=Gs.A,m=Gs.Q;for(e=0,o=0;e<f;){switch(i=s[e++],o=e,r=0,i){case h:case c:r=1;break;case l:r=3;break;case m:r=2;break;case d:var p=n[4],y=n[5],g=Ys(n[0]*n[0]+n[1]*n[1]),b=Ys(n[2]*n[2]+n[3]*n[3]),w=Xs(-n[1]/b,n[0]/g);s[e]*=g,s[e++]+=p,s[e]*=b,s[e++]+=y,s[e++]*=g,s[e++]*=b,s[e++]+=w,s[e++]+=w,o=e+=2;break;case v:u[0]=s[e++],u[1]=s[e++],Nt(u,u,n),s[o++]=u[0],s[o++]=u[1],u[0]+=s[e++],u[1]+=s[e++],Nt(u,u,n),s[o++]=u[0],s[o++]=u[1]}for(a=0;a<r;a++){var x=js[a];x[0]=s[e++],x[1]=s[e++],Nt(x,x,n),s[o++]=x[0],s[o++]=x[1]}}t.increaseVersion()}}(i,t),this.dirtyShape()},r}var sf=function(){this.cx=0,this.cy=0,this.r=0},ff=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultShape=function(){return new sf},n.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,2*Math.PI)},n}(fu);ff.prototype.type="circle";var hf=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},lf=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultShape=function(){return new hf},n.prototype.buildPath=function(t,n){var i=.5522848,r=n.cx,e=n.cy,o=n.rx,a=n.ry,u=o*i,s=a*i;t.moveTo(r-o,e),t.bezierCurveTo(r-o,e-s,r-u,e-a,r,e-a),t.bezierCurveTo(r+u,e-a,r+o,e-s,r+o,e),t.bezierCurveTo(r+o,e+s,r+u,e+a,r,e+a),t.bezierCurveTo(r-u,e+a,r-o,e+s,r-o,e),t.closePath()},n}(fu);lf.prototype.type="ellipse";var cf=Math.PI,vf=2*cf,df=Math.sin,mf=Math.cos,pf=Math.acos,yf=Math.atan2,gf=Math.abs,bf=Math.sqrt,wf=Math.max,xf=Math.min,Mf=1e-4;function Sf(t,n,i,r,e,o,a){var u=t-i,s=n-r,f=(a?o:-o)/bf(u*u+s*s),h=f*s,l=-f*u,c=t+h,v=n+l,d=i+h,m=r+l,p=(c+d)/2,y=(v+m)/2,g=d-c,b=m-v,w=g*g+b*b,x=e-o,M=c*m-d*v,S=(b<0?-1:1)*bf(wf(0,x*x*w-M*M)),k=(M*b-g*S)/w,T=(-M*g-b*S)/w,A=(M*b+g*S)/w,N=(-M*g+b*S)/w,L=k-p,C=T-y,I=A-p,O=N-y;return L*L+C*C>I*I+O*O&&(k=A,T=N),{cx:k,cy:T,x0:-h,y0:-l,x1:k*(e/x-1),y1:T*(e/x-1)}}var kf=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},Tf=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultShape=function(){return new kf},n.prototype.buildPath=function(t,n){!function(t,n){var i,r=wf(n.r,0),e=wf(n.r0||0,0),o=r>0;if(o||e>0){if(o||(r=e,e=0),e>r){var a=r;r=e,e=a}var u=n.startAngle,s=n.endAngle;if(!isNaN(u)&&!isNaN(s)){var f=n.cx,h=n.cy,l=!!n.clockwise,c=gf(s-u),v=c>vf&&c%vf;if(v>Mf&&(c=v),r>Mf)if(c>vf-Mf)t.moveTo(f+r*mf(u),h+r*df(u)),t.arc(f,h,r,u,s,!l),e>Mf&&(t.moveTo(f+e*mf(s),h+e*df(s)),t.arc(f,h,e,s,u,l));else{var d=void 0,m=void 0,p=void 0,y=void 0,g=void 0,b=void 0,w=void 0,x=void 0,M=void 0,S=void 0,k=void 0,T=void 0,A=void 0,N=void 0,L=void 0,C=void 0,I=r*mf(u),O=r*df(u),D=e*mf(s),_=e*df(s),E=c>Mf;if(E){var z=n.cornerRadius;z&&(d=(i=function(t){var n;if(H(t)){var i=t.length;if(!i)return t;n=1===i?[t[0],t[0],0,0]:2===i?[t[0],t[0],t[1],t[1]]:3===i?t.concat(t[2]):t}else n=[t,t,t,t];return n}(z))[0],m=i[1],p=i[2],y=i[3]);var R=gf(r-e)/2;if(g=xf(R,p),b=xf(R,y),w=xf(R,d),x=xf(R,m),k=M=wf(g,b),T=S=wf(w,x),(M>Mf||S>Mf)&&(A=r*mf(s),N=r*df(s),L=e*mf(u),C=e*df(u),c<cf)){var P=function(t,n,i,r,e,o,a,u){var s=i-t,f=r-n,h=a-e,l=u-o,c=l*s-h*f;if(!(c*c<Mf))return[t+(c=(h*(n-o)-l*(t-e))/c)*s,n+c*f]}(I,O,L,C,A,N,D,_);if(P){var B=I-P[0],F=O-P[1],V=A-P[0],W=N-P[1],U=1/df(pf((B*V+F*W)/(bf(B*B+F*F)*bf(V*V+W*W)))/2),G=bf(P[0]*P[0]+P[1]*P[1]);k=xf(M,(r-G)/(U+1)),T=xf(S,(e-G)/(U-1))}}}if(E)if(k>Mf){var j=xf(p,k),Y=xf(y,k),X=Sf(L,C,I,O,r,j,l),q=Sf(A,N,D,_,r,Y,l);t.moveTo(f+X.cx+X.x0,h+X.cy+X.y0),k<M&&j===Y?t.arc(f+X.cx,h+X.cy,k,yf(X.y0,X.x0),yf(q.y0,q.x0),!l):(j>0&&t.arc(f+X.cx,h+X.cy,j,yf(X.y0,X.x0),yf(X.y1,X.x1),!l),t.arc(f,h,r,yf(X.cy+X.y1,X.cx+X.x1),yf(q.cy+q.y1,q.cx+q.x1),!l),Y>0&&t.arc(f+q.cx,h+q.cy,Y,yf(q.y1,q.x1),yf(q.y0,q.x0),!l))}else t.moveTo(f+I,h+O),t.arc(f,h,r,u,s,!l);else t.moveTo(f+I,h+O);e>Mf&&E?T>Mf?(j=xf(d,T),X=Sf(D,_,A,N,e,-(Y=xf(m,T)),l),q=Sf(I,O,L,C,e,-j,l),t.lineTo(f+X.cx+X.x0,h+X.cy+X.y0),T<S&&j===Y?t.arc(f+X.cx,h+X.cy,T,yf(X.y0,X.x0),yf(q.y0,q.x0),!l):(Y>0&&t.arc(f+X.cx,h+X.cy,Y,yf(X.y0,X.x0),yf(X.y1,X.x1),!l),t.arc(f,h,e,yf(X.cy+X.y1,X.cx+X.x1),yf(q.cy+q.y1,q.cx+q.x1),l),j>0&&t.arc(f+q.cx,h+q.cy,j,yf(q.y1,q.x1),yf(q.y0,q.x0),!l))):(t.lineTo(f+D,h+_),t.arc(f,h,e,s,u,l)):t.lineTo(f+D,h+_)}else t.moveTo(f,h);t.closePath()}}}(t,n)},n.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},n}(fu);Tf.prototype.type="sector";var Af=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Nf=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultShape=function(){return new Af},n.prototype.buildPath=function(t,n){var i=n.cx,r=n.cy,e=2*Math.PI;t.moveTo(i+n.r,r),t.arc(i,r,n.r,0,e,!1),t.moveTo(i+n.r0,r),t.arc(i,r,n.r0,0,e,!0)},n}(fu);function Lf(t,n,i){var r=n.smooth,e=n.points;if(e&&e.length>=2){if(r){var o=function(t,n,i,r){var e,o,a,u,s=[],f=[],h=[],l=[];if(r){a=[1/0,1/0],u=[-1/0,-1/0];for(var c=0,v=t.length;c<v;c++)Lt(a,a,t[c]),Ct(u,u,t[c]);Lt(a,a,r[0]),Ct(u,u,r[1])}for(c=0,v=t.length;c<v;c++){var d=t[c];if(i)e=t[c?c-1:v-1],o=t[(c+1)%v];else{if(0===c||c===v-1){s.push(bt(t[c]));continue}e=t[c-1],o=t[c+1]}Mt(f,o,e),St(f,f,n);var m=kt(d,e),p=kt(d,o),y=m+p;0!==y&&(m/=y,p/=y),St(h,f,-m),St(l,f,p);var g=xt([],d,h),b=xt([],d,l);r&&(Ct(g,g,a),Lt(g,g,u),Ct(b,b,a),Lt(b,b,u)),s.push(g),s.push(b)}return i&&s.push(s.shift()),s}(e,r,i,n.smoothConstraint);t.moveTo(e[0][0],e[0][1]);for(var a=e.length,u=0;u<(i?a:a-1);u++){var s=o[2*u],f=o[2*u+1],h=e[(u+1)%a];t.bezierCurveTo(s[0],s[1],f[0],f[1],h[0],h[1])}}else{t.moveTo(e[0][0],e[0][1]),u=1;for(var l=e.length;u<l;u++)t.lineTo(e[u][0],e[u][1])}i&&t.closePath()}}Nf.prototype.type="ring";var Cf=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},If=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultShape=function(){return new Cf},n.prototype.buildPath=function(t,n){Lf(t,n,!0)},n}(fu);If.prototype.type="polygon";var Of=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},Df=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Of},n.prototype.buildPath=function(t,n){Lf(t,n,!1)},n}(fu);Df.prototype.type="polyline";var _f={},Ef=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},zf=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Ef},n.prototype.buildPath=function(t,n){var i,r,e,o;if(this.subPixelOptimize){var a=pu(_f,n,this.style);i=a.x1,r=a.y1,e=a.x2,o=a.y2}else i=n.x1,r=n.y1,e=n.x2,o=n.y2;var u=n.percent;0!==u&&(t.moveTo(i,r),u<1&&(e=i*(1-u)+e*u,o=r*(1-u)+o*u),t.lineTo(e,o))},n.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},n}(fu);zf.prototype.type="line";var Rf=[],Pf=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function Bf(t,n,i){return null!=t.cpx2||null!=t.cpy2?[(i?si:ui)(t.x1,t.cpx1,t.cpx2,t.x2,n),(i?si:ui)(t.y1,t.cpy1,t.cpy2,t.y2,n)]:[(i?di:vi)(t.x1,t.cpx1,t.x2,n),(i?di:vi)(t.y1,t.cpy1,t.y2,n)]}var Ff=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Pf},n.prototype.buildPath=function(t,n){var i=n.x1,r=n.y1,e=n.x2,o=n.y2,a=n.cpx1,u=n.cpy1,s=n.cpx2,f=n.cpy2,h=n.percent;0!==h&&(t.moveTo(i,r),null==s||null==f?(h<1&&(pi(i,a,e,h,Rf),a=Rf[1],e=Rf[2],pi(r,u,o,h,Rf),u=Rf[1],o=Rf[2]),t.quadraticCurveTo(a,u,e,o)):(h<1&&(li(i,a,s,e,h,Rf),a=Rf[1],s=Rf[2],e=Rf[3],li(r,u,f,o,h,Rf),u=Rf[1],f=Rf[2],o=Rf[3]),t.bezierCurveTo(a,u,s,f,e,o)))},n.prototype.pointAt=function(t){return Bf(this.shape,t,!1)},n.prototype.tangentAt=function(t){var n=Bf(this.shape,t,!0);return function(t,n){var i=function(t){return Math.sqrt(function(t){return t[0]*t[0]+t[1]*t[1]}(t))}(n);return 0===i?(t[0]=0,t[1]=0):(t[0]=n[0]/i,t[1]=n[1]/i),t}(n,n)},n}(fu);Ff.prototype.type="bezier-curve";var Vf=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Wf=function(t){function n(n){return t.call(this,n)||this}return o(n,t),n.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},n.prototype.getDefaultShape=function(){return new Vf},n.prototype.buildPath=function(t,n){var i=n.cx,r=n.cy,e=Math.max(n.r,0),o=n.startAngle,a=n.endAngle,u=n.clockwise,s=Math.cos(o),f=Math.sin(o);t.moveTo(s*e+i,f*e+r),t.arc(i,r,e,o,a,!u)},n}(fu);Wf.prototype.type="arc";var Hf=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="compound",n}return o(n,t),n.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),i=0;i<t.length;i++)n=n||t[i].shapeChanged();n&&this.dirtyShape()},n.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(n[0],n[1],t[i].segmentIgnoreThreshold)},n.prototype.buildPath=function(t,n){for(var i=n.paths||[],r=0;r<i.length;r++)i[r].buildPath(t,i[r].shape,!0)},n.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},n.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),fu.prototype.getBoundingRect.call(this)},n}(fu),Uf=function(){function t(t){this.colorStops=t||[]}return t.prototype.addColorStop=function(t,n){this.colorStops.push({offset:t,color:n})},t}(),Gf=function(t){function n(n,i,r,e,o,a){var u=t.call(this,o)||this;return u.x=null==n?0:n,u.y=null==i?0:i,u.x2=null==r?1:r,u.y2=null==e?0:e,u.type="linear",u.global=a||!1,u}return o(n,t),n}(Uf),jf=function(t){function n(n,i,r,e,o){var a=t.call(this,e)||this;return a.x=null==n?.5:n,a.y=null==i?.5:i,a.r=null==r?.5:r,a.type="radial",a.global=o||!1,a}return o(n,t),n}(Uf),Yf=Math.min,Xf=Math.max,qf=Math.abs,Zf=[0,0],$f=[0,0],Kf=Cn(),Jf=Kf.minTv,Qf=Kf.maxTv,th=function(){function t(t,n){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new un;for(i=0;i<2;i++)this._axes[i]=new un;t&&this.fromBoundingRect(t,n)}return t.prototype.fromBoundingRect=function(t,n){var i=this._corners,r=this._axes,e=t.x,o=t.y,a=e+t.width,u=o+t.height;if(i[0].set(e,o),i[1].set(a,o),i[2].set(a,u),i[3].set(e,u),n)for(var s=0;s<4;s++)i[s].transform(n);for(un.sub(r[0],i[1],i[0]),un.sub(r[1],i[3],i[0]),r[0].normalize(),r[1].normalize(),s=0;s<2;s++)this._origin[s]=r[s].dot(i[0])},t.prototype.intersect=function(t,n,i){var r=!0,e=!n;return n&&un.set(n,0,0),Kf.reset(i,!e),!this._intersectCheckOneSide(this,t,e,1)&&(r=!1,e)||!this._intersectCheckOneSide(t,this,e,-1)&&(r=!1,e)||e||Kf.negativeSize||un.copy(n,r?Kf.useDir?Kf.dirMinTv:Jf:Qf),r},t.prototype._intersectCheckOneSide=function(t,n,i,r){for(var e=!0,o=0;o<2;o++){var a=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,Zf),t._getProjMinMaxOnAxis(o,n._corners,$f),Kf.negativeSize||Zf[1]<$f[0]||Zf[0]>$f[1]){if(e=!1,Kf.negativeSize||i)return e;var u=qf($f[0]-Zf[1]),s=qf(Zf[0]-$f[1]);Yf(u,s)>Qf.len()&&un.scale(Qf,a,u<s?-u*r:s*r)}else i||(u=qf($f[0]-Zf[1]),s=qf(Zf[0]-$f[1]),(Kf.useDir||Yf(u,s)<Jf.len())&&((u<s||!Kf.bidirectional)&&(un.scale(Jf,a,u*r),Kf.useDir&&Kf.calcDirMTV()),(u>=s||!Kf.bidirectional)&&(un.scale(Jf,a,-s*r),Kf.useDir&&Kf.calcDirMTV())))}return e},t.prototype._getProjMinMaxOnAxis=function(t,n,i){for(var r=this._axes[t],e=this._origin,o=n[0].dot(r)+e[t],a=o,u=o,s=1;s<n.length;s++){var f=n[s].dot(r)+e[t];a=Yf(f,a),u=Xf(f,u)}i[0]=a+Kf.touchThreshold,i[1]=u-Kf.touchThreshold,Kf.negativeSize=i[1]<i[0]},t}(),nh=[],ih=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.notClear=!0,n.incremental=1,n._displayables=[],n._temporaryDisplayables=[],n._cursor=0,n}return o(n,t),n.prototype.traverse=function(t,n){t.call(n,this)},n.prototype.useStyle=function(){this.style={}},n.prototype._useHoverStyle=function(){this.__hoverStyle=null},n.prototype.getCursor=function(){return this._cursor},n.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},n.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},n.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},n.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},n.prototype.addDisplayables=function(t,n){n=n||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],n)},n.prototype.getDisplayables=function(){return this._displayables},n.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},n.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},n.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(n=this._displayables[t]).parent=this,n.update(),n.parent=null;for(t=0;t<this._temporaryDisplayables.length;t++){var n;(n=this._temporaryDisplayables[t]).parent=this,n.update(),n.parent=null}},n.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new xn(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],r=i.getBoundingRect().clone();i.needLocalTransform()&&r.applyTransform(i.getLocalTransform(nh)),t.union(r)}this._rect=t}return this._rect},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n);if(this.getBoundingRect().contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(t,n))return!0;return!1},n}(fa),rh=ao();function eh(t,n,i,r,e,o,a){var u,s=!1;U(e)?(a=o,o=e,e=null):X(e)&&(o=e.cb,a=e.during,s=e.isFrom,u=e.removeOpt,e=e.dataIndex);var f="leave"===t;f||n.stopAnimation("leave");var h=function(t,n,i,r,e){var o;if(n&&n.ecModel){var a=n.ecModel.getUpdatePayload();o=a&&a.animation}var u="update"===t;if(n&&n.isAnimationEnabled()){var s=void 0,f=void 0,h=void 0;return r?(s=tt(r.duration,200),f=tt(r.easing,"cubicOut"),h=0):(s=n.getShallow(u?"animationDurationUpdate":"animationDuration"),f=n.getShallow(u?"animationEasingUpdate":"animationEasing"),h=n.getShallow(u?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(s=o.duration),null!=o.easing&&(f=o.easing),null!=o.delay&&(h=o.delay)),U(h)&&(h=h(i,e)),U(s)&&(s=s(i)),{duration:s||0,delay:h,easing:f}}return null}(t,r,e,f?u||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(n,e):null);if(h&&h.duration>0){var l={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,setToFinal:!f,scope:t,during:a};s?n.animateFrom(i,l):n.animateTo(i,l)}else n.stopAnimation(),!s&&n.attr(i),a&&a(1),o&&o()}function oh(t,n,i,r,e,o){eh("update",t,n,i,r,e,o)}function ah(t,n,i,r,e,o){eh("enter",t,n,i,r,e,o)}function uh(t){if(!t.__zr)return!0;for(var n=0;n<t.animators.length;n++)if("leave"===t.animators[n].scope)return!0;return!1}function sh(t,n,i,r,e,o){uh(t)||eh("leave",t,n,i,r,e,o)}function fh(t,n,i,r){t.removeTextContent(),t.removeTextGuideLine(),sh(t,{style:{opacity:0}},n,i,r)}var hh={},lh=["x","y"],ch=["width","height"];function vh(t,n){hh[t]=n}function dh(t,n,i,r){var e=function(t,n){return new of(uf(t,n))}(t,n);return i&&("center"===r&&(i=ph(i,e.getBoundingRect())),yh(e,i)),e}function mh(t,n,i){var r=new du({style:{image:t,x:n.x,y:n.y,width:n.width,height:n.height},onload:function(t){"center"===i&&r.setStyle(ph(n,{width:t.width,height:t.height}))}});return r}function ph(t,n){var i,r=n.width/n.height,e=t.height*r;return i=e<=t.width?t.height:(e=t.width)/r,{x:t.x+t.width/2-e/2,y:t.y+t.height/2-i/2,width:e,height:i}}function yh(t,n){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(n);t.applyTransform(i)}}function gh(t,n){return pu(t,t,{lineWidth:n}),t}var bh=gu;function wh(t,n,i){return n&&!E(n)&&(n=Er.getLocalTransform(n)),i&&(n=an([],n)),Nt([],t,n)}function xh(t){return!t.isGroup}function Mh(t,n,i){if(t&&n){var r,e=(r={},t.traverse((function(t){xh(t)&&t.anid&&(r[t.anid]=t)})),r);n.traverse((function(t){if(xh(t)&&t.anid){var n=e[t.anid];if(n){var r=o(t);t.attr(o(n)),oh(t,r,i,Ru(t).dataIndex)}}}))}function o(t){var n={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(n.shape=L(t.shape)),n}}function Sh(t,n,i){var r=I({rectHover:!0},n),e=r.style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(e.image=t.slice(8),O(e,i),new du(r)):dh(t.replace("path://",""),r,i,"center")}function kh(t,n,i,r,e,o,a,u){var s,f=i-t,h=r-n,l=a-e,c=u-o,v=Th(l,c,f,h);if((s=v)<=1e-6&&s>=-1e-6)return!1;var d=t-e,m=n-o,p=Th(d,m,f,h)/v;if(p<0||p>1)return!1;var y=Th(d,m,l,c)/v;return!(y<0||y>1)}function Th(t,n,i,r){return t*r-i*n}function Ah(t,n,i,r,e){return null==n||(Y(n)?Nh[0]=Nh[1]=Nh[2]=Nh[3]=n:(Nh[0]=n[0],Nh[1]=n[1],Nh[2]=n[2],Nh[3]=n[3]),r&&(Nh[0]=de(0,Nh[0]),Nh[1]=de(0,Nh[1]),Nh[2]=de(0,Nh[2]),Nh[3]=de(0,Nh[3])),i&&(Nh[0]=-Nh[0],Nh[1]=-Nh[1],Nh[2]=-Nh[2],Nh[3]=-Nh[3]),Lh(t,Nh,"x","width",3,1,e&&e[0]||0),Lh(t,Nh,"y","height",0,2,e&&e[1]||0)),t}var Nh=[0,0,0,0];function Lh(t,n,i,r,e,o,a){var u=n[o]+n[e],s=t[r];t[r]+=u,a=de(0,ve(a,s)),t[r]<a?(t[r]=a,t[i]+=n[e]>=0?-n[e]:n[o]>=0?s+n[o]:me(u)>1e-8?(s-a)*n[e]/u:0):t[i]-=n[e]}function Ch(t){var n=t.itemTooltipOption,i=t.componentModel,r=t.itemName,e=G(n)?{formatter:n}:n,o=i.mainType,a=i.componentIndex,u={componentType:o,name:r,$vars:["name"]};u[o+"Index"]=a;var s=t.formatterParamsExtra;s&&z(F(s),(function(t){mt(u,t)||(u[t]=s[t],u.$vars.push(t))}));var f=Ru(t.el);f.componentMainType=o,f.componentIndex=a,f.tooltipConfig={name:r,option:O({content:r,encodeHTMLContent:!0,formatterParams:u},e)}}function Ih(t,n){var i;t.isGroup&&(i=n(t)),i||t.traverse(n)}function Oh(t,n){if(t)if(H(t))for(var i=0;i<t.length;i++)Ih(t[i],n);else Ih(t,n)}function Dh(t){return!t||me(t[1])<_h&&me(t[2])<_h||me(t[0])<_h&&me(t[3])<_h}var _h=1e-5;function Eh(t,n){return t?xn.copy(t,n):n.clone()}function zh(t,n){return n?nn(t||[1,0,0,1,0,0],n):void 0}function Rh(t){return{z:t.get("z")||0,zlevel:t.get("zlevel")||0}}function Ph(t,n,i){Bh(t,n,i,-1/0)}function Bh(t,n,i,r){if(t.ignoreModelZ)return r;var e=t.getTextContent(),o=t.getTextGuideLine();if(t.isGroup)for(var a=t.childrenRef(),u=0;u<a.length;u++)r=de(Bh(a[u],n,i,r),r);else t.z=n,t.zlevel=i,r=de(t.z2||0,r);if(e&&(e.z=n,e.zlevel=i,isFinite(r)&&(e.z2=r+2)),o){var s=t.textGuideLineConfig;o.z=n,o.zlevel=i,isFinite(r)&&(o.z2=r+(s&&s.showAbove?1:-1))}return r}var Fh=new Er;Fh.transform=[1,0,0,1,0,0],vh("circle",ff),vh("ellipse",lf),vh("sector",Tf),vh("ring",Nf),vh("polygon",If),vh("polyline",Df),vh("rect",xu),vh("line",zf),vh("bezierCurve",Ff),vh("arc",Wf);var Vh=Object.freeze({__proto__:null,Arc:Wf,BezierCurve:Ff,BoundingRect:xn,Circle:ff,CompoundPath:Hf,Ellipse:lf,Group:fe,HOVER_LAYER_FOR_INCREMENTAL:2,HOVER_LAYER_FROM_THRESHOLD:1,HOVER_LAYER_NO:0,Image:du,IncrementalDisplayable:ih,Line:zf,LinearGradient:Gf,OrientedBoundingRect:th,Path:fu,Point:un,Polygon:If,Polyline:Df,RadialGradient:jf,Rect:xu,Ring:Nf,Sector:Tf,Text:Tu,WH:ch,XY:lh,applyTransform:wh,calcZ2Range:function(t){var n=-1/0,i=1/0;function r(t){if(t&&!t.isGroup){var n=t.currentStates;if(n.length)for(var i=0;i<n.length;i++)e(t.states[n[i]]);e(t)}}function e(t){if(t){var r=t.z2;r>n&&(n=r),r<i&&(i=r)}}return Ih(t,(function(t){r(t),r(t.getTextContent()),r(t.getTextGuideLine())})),i>n&&(i=n=0),{min:i,max:n}},clipPointsByRect:function(t,n){return R(t,(function(t){var i=t[0];i=de(i,n.x),i=ve(i,n.x+n.width);var r=t[1];return r=de(r,n.y),[i,r=ve(r,n.y+n.height)]}))},clipRectByRect:function(t,n){var i=de(t.x,n.x),r=ve(t.x+t.width,n.x+n.width),e=de(t.y,n.y),o=ve(t.y+t.height,n.y+n.height);if(r>=i&&o>=e)return{x:i,y:e,width:r-i,height:o-e}},createIcon:Sh,decomposeTransform:function(t,n){return n?nn(Fh.transform,n):tn(Fh.transform),Fh.decomposeTransform(),Pr(t,Fh),t},ensureCopyRect:Eh,ensureCopyTransform:zh,expandOrShrinkRect:Ah,extendPath:function(t,n){return i=uf(t,n),function(t){function n(n){var r=t.call(this,n)||this;return r.applyTransform=i.applyTransform,r.buildPath=i.buildPath,r}return o(n,t),n}(of);var i},extendShape:function(t){return fu.extend(t)},getCurrentCanvasPainter:function(t){var n=t.getZr().painter;return"canvas"===n.getType()?n:null},getShapeClass:function(t){if(hh.hasOwnProperty(t))return hh[t]},getTransform:function(t,n){for(var i=tn([]);t&&t!==n;)rn(i,t.getLocalTransform(),i),t=t.parent;return i},groupTransition:Mh,initProps:ah,isBoundingRectAxisAligned:Dh,isElementRemoved:uh,lineLineIntersect:kh,linePolygonIntersect:function(t,n,i,r,e){for(var o=0,a=e[e.length-1];o<e.length;o++){var u=e[o];if(kh(t,n,i,r,u[0],u[1],a[0],a[1]))return!0;a=u}},makeImage:mh,makePath:dh,mergePath:function(t,n){for(var i=[],r=t.length,e=0;e<r;e++)i.push(t[e].getUpdatedPathProxy(!0));var o=new fu(n);return o.createPathProxy(),o.buildPath=function(t){if(af(t)){t.appendPath(i);var n=t.getContext();n&&t.rebuildPath(n,1)}},o},payloadDisableAnimation:function(t){return t.animation={duration:0},t},registerShape:vh,removeElement:sh,removeElementWithFadeOut:function(t,n,i){function r(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||fh(t,n,i,r)})):fh(t,n,i,r)},resizePath:yh,retrieveZInfo:Rh,setTooltipConfig:Ch,subPixelOptimize:bh,subPixelOptimizeLine:gh,subPixelOptimizeRect:function(t,n){return yu(t,t,n),t},transformDirection:function(t,n,i){var r=0===n[4]||0===n[5]||0===n[0]?1:me(2*n[4]/n[0]),e=0===n[4]||0===n[5]||0===n[2]?1:me(2*n[4]/n[2]),o=["left"===t?-r:"right"===t?r:0,"top"===t?-e:"bottom"===t?e:0];return o=wh(o,n,i),me(o[0])>me(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"},traverseElements:Oh,traverseUpdateZ:Ph,updateProps:oh}),Wh={};function Hh(t,n,i){var r,e=t.labelFetcher,o=t.labelDataIndex,a=t.labelDimIndex,u=n.normal;e&&(r=e.getFormattedLabel(o,"normal",null,a,u&&u.get("formatter"),null!=i?{interpolatedValue:i}:null)),null==r&&(r=U(t.defaultText)?t.defaultText(o,t,i):t.defaultText);for(var s={normal:r},f=0;f<ts.length;f++){var h=ts[f],l=n[h];s[h]=tt(e?e.getFormattedLabel(o,h,null,a,l&&l.get("formatter")):null,r)}return s}function Uh(t,n,i,r){i=i||Wh;for(var e=t instanceof Tu,o=!1,a=0;a<ns.length;a++)if((c=n[ns[a]])&&c.getShallow("show")){o=!0;break}var u=e?t:t.getTextContent();if(o){e||(u||(u=new Tu,t.setTextContent(u)),t.stateProxy&&(u.stateProxy=t.stateProxy));var s=Hh(i,n),f=n.normal,h=!!f.getShallow("show"),l=jh(f,r&&r.normal,i,!1,!e);for(l.text=s.normal,e||t.setTextConfig(Yh(f,i,!1)),a=0;a<ts.length;a++){var c,v=ts[a];if(c=n[v]){var d=u.ensureState(v),m=!!tt(c.getShallow("show"),h);m!==h&&(d.ignore=!m),d.style=jh(c,r&&r[v],i,!0,!e),d.style.text=s[v],e||(t.ensureState(v).textConfig=Yh(c,i,!0))}}u.silent=!!f.getShallow("silent"),null!=u.style.x&&(l.x=u.style.x),null!=u.style.y&&(l.y=u.style.y),u.ignore=!h,u.useStyle(l),u.dirty(),i.enableTextSetter&&(Qh(u).setLabelText=function(t){var r=Hh(i,n,t);!function(t,n){for(var i=0;i<ts.length;i++){var r=ts[i],e=n[r],o=t.ensureState(r);o.style=o.style||{},o.style.text=e}var a=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:n.normal}),t.useStates(a,!0)}(u,r)})}else u&&(u.ignore=!0);t.dirty()}function Gh(t,n){for(var i={normal:t.getModel(n=n||"label")},r=0;r<ts.length;r++){var e=ts[r];i[e]=t.getModel([e,n])}return i}function jh(t,n,i,r,e){var o={};return function(t,n,i,r,e){i=i||Wh;var o,a=n.ecModel,u=a&&a.option.textStyle,s=function(t){for(var n;t&&t!==t.ecModel;){var i=(t.option||Wh).rich;if(i){n=n||{};for(var r=F(i),e=0;e<r.length;e++)n[r[e]]=1}t=t.parentModel}return n}(n);if(s){o={};var f="richInheritPlainLabel",h=tt(n.get(f),a?a.get(f):void 0);for(var l in s)if(s.hasOwnProperty(l)){var c=n.getModel(["rich",l]);$h(o[l]={},c,u,n,h,i,r,e,!1,!0)}}o&&(t.rich=o);var v=n.get("overflow");v&&(t.overflow=v);var d=n.get("lineOverflow");d&&(t.lineOverflow=d);var m=t,p=n.get("minMargin");if(null!=p)p=Y(p)?p/2:0,m.margin=[p,p,p,p],m.__marginType=tl.minMargin;else{var y=n.get("textMargin");null!=y&&(m.margin=rt(y),m.__marginType=tl.textMargin)}$h(t,n,u,null,null,i,r,e,!0,!1)}(o,t,i,r,e),n&&I(o,n),o}function Yh(t,n,i){n=n||{};var r,e={},o=t.getShallow("rotate"),a=tt(t.getShallow("distance"),i?null:5),u=t.getShallow("offset");return"outside"===(r=t.getShallow("position")||(i?null:"inside"))&&(r=n.defaultOutsidePosition||"top"),null!=r&&(e.position=r),null!=u&&(e.offset=u),null!=o&&(o*=Math.PI/180,e.rotation=o),null!=a&&(e.distance=a),e.outsideFill="inherit"===t.get("color")?n.inheritColor||null:"auto",null!=n.autoOverflowArea&&(e.autoOverflowArea=n.autoOverflowArea),null!=n.layoutRect&&(e.layoutRect=n.layoutRect),e}var Xh=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],qh=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Zh=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function $h(t,n,i,r,e,o,a,u,s,f){i=!a&&i||Wh;var h=o&&o.inheritColor,l=n.getShallow("color"),c=n.getShallow("textBorderColor"),v=tt(n.getShallow("opacity"),i.opacity);"inherit"!==l&&"auto"!==l||(l=h||null),"inherit"!==c&&"auto"!==c||(c=h||null),u||(l=l||i.color,c=c||i.textBorderColor),null!=l&&(t.fill=l),null!=c&&(t.stroke=c);var d=tt(n.getShallow("textBorderWidth"),i.textBorderWidth);null!=d&&(t.lineWidth=d);var m=tt(n.getShallow("textBorderType"),i.textBorderType);null!=m&&(t.lineDash=m);var p=tt(n.getShallow("textBorderDashOffset"),i.textBorderDashOffset);null!=p&&(t.lineDashOffset=p),a||null!=v||f||(v=o&&o.defaultOpacity),null!=v&&(t.opacity=v),a||u||null==t.fill&&o.inheritColor&&(t.fill=o.inheritColor);for(var y=0;y<Xh.length;y++){var g=Xh[y];null!=(w=!1!==e&&r?nt(n.getShallow(g),r.getShallow(g),i[g]):tt(n.getShallow(g),i[g]))&&(t[g]=w)}for(y=0;y<qh.length;y++)null!=(w=n.getShallow(g=qh[y]))&&(t[g]=w);if(null==t.verticalAlign){var b=n.getShallow("baseline");null!=b&&(t.verticalAlign=b)}if(!s||!o.disableBox){for(y=0;y<Zh.length;y++){var w;null!=(w=n.getShallow(g=Zh[y]))&&(t[g]=w)}var x=n.getShallow("borderType");null!=x&&(t.borderDash=x),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!h||(t.backgroundColor=h),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!h||(t.borderColor=h)}}var Kh,Jh,Qh=ao(),tl={minMargin:1,textMargin:2},nl=["textStyle","color"],il=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],rl=new Tu,el=function(){function t(){}return t.prototype.getTextColor=function(t){var n=this.ecModel;return this.getShallow("color")||(!t&&n?n.get(nl):null)},t.prototype.getFont=function(){return t={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},i=(n=this.ecModel)&&n.getModel("textStyle"),ot([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "));var t,n,i},t.prototype.getTextRect=function(t){for(var n={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<il.length;i++)n[il[i]]=this.getShallow(il[i]);return rl.useStyle(n),rl.update(),rl.getBoundingRect()},t}(),ol=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],al=Do(ol),ul=function(){function t(){}return t.prototype.getLineStyle=function(t){return al(this,t)},t}(),sl=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],fl=Do(sl),hl=function(){function t(){}return t.prototype.getItemStyle=function(t,n){return fl(this,t,n)},t}(),ll=function(){function t(t,n,i){this.parentModel=n,this.ecModel=i,this.option=t}return t.prototype.init=function(){},t.prototype.mergeOption=function(t){C(this.option,t,!0)},t.prototype.get=function(t,n){return null==t?this.option:this._doGet(this.parsePath(t),!n&&this.parentModel)},t.prototype.getShallow=function(t,n){var i=this.option,r=null==i?i:i[t];if(null==r&&!n){var e=this.parentModel;e&&(r=e.getShallow(t))}return r},t.prototype.getModel=function(n,i){var r=null!=n,e=r?this.parsePath(n):null;return new t(r?this._doGet(e):this.option,i=i||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(e)),this.ecModel)},t.prototype.isEmpty=function(){return null==this.option},t.prototype.restoreData=function(){},t.prototype.clone=function(){return new(0,this.constructor)(L(this.option))},t.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},t.prototype.resolveParentPath=function(t){return t},t.prototype.isAnimationEnabled=function(){if(!u.node&&this.option){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(t,n){var i=this.option;if(!t)return i;for(var r=0;r<t.length&&(!t[r]||null!=(i=i&&"object"==typeof i?i[t[r]]:null));r++);return null==i&&n&&(i=n._doGet(this.resolveParentPath(t),n.parentModel)),i},t}();Ao(ll),Kh=ll,Jh=["__\0is_clz",Lo++].join("_"),Kh.prototype[Jh]=!0,Kh.isInstance=function(t){return!(!t||!t[Jh])},_(ll,ul),_(ll,hl),_(ll,Eo),_(ll,el);var cl=Math.round(10*Math.random());function vl(t){return[t||"",cl++].join("_")}var dl="ZH",ml="EN",pl=ml,yl={},gl={},bl=u.domSupported&&(document.documentElement.lang||navigator.language||navigator.browserLanguage||pl).toUpperCase().indexOf(dl)>-1?dl:pl;function wl(t,n){t=t.toUpperCase(),gl[t]=new ll(n),yl[t]=n}function xl(t,n){var i=n.breakParsed;return i}function Ml(t){var n=t.brk;return n?n.breaks:[]}function Sl(t){var n=t.brk;return!!n&&n.hasBreaks()}wl(ml,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),wl(dl,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var kl=36e5,Tl=864e5,Al=31536e6,Nl={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Ll={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Cl="{yyyy}-{MM}-{dd}",Il={year:"{yyyy}",month:"{yyyy}-{MM}",day:Cl,hour:Cl+" "+Ll.hour,minute:Cl+" "+Ll.minute,second:Cl+" "+Ll.second,millisecond:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Ol=["year","month","day","hour","minute","second","millisecond"],Dl=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function _l(t,n){return"0000".substr(0,n-(t+="").length)+t}function El(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 zl(t,n,i,r){var e=ze(t),o=e[Bl(i)](),a=e[Fl(i)]()+1,u=Math.floor((a-1)/3)+1,s=e[Vl(i)](),f=e["get"+(i?"UTC":"")+"Day"](),h=e[Wl(i)](),l=(h-1)%12+1,c=e[Hl(i)](),v=e[Ul(i)](),d=e[Gl(i)](),m=h>=12?"pm":"am",p=m.toUpperCase(),y=r instanceof ll?r:function(t){return gl[t]}(r||bl)||gl[pl],g=y.getModel("time"),b=g.get("month"),w=g.get("monthAbbr"),x=g.get("dayOfWeek"),M=g.get("dayOfWeekAbbr");return(n||"").replace(/{a}/g,m+"").replace(/{A}/g,p+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,_l(o%100+"",2)).replace(/{Q}/g,u+"").replace(/{MMMM}/g,b[a-1]).replace(/{MMM}/g,w[a-1]).replace(/{MM}/g,_l(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,_l(s,2)).replace(/{d}/g,s+"").replace(/{eeee}/g,x[f]).replace(/{ee}/g,M[f]).replace(/{e}/g,f+"").replace(/{HH}/g,_l(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,_l(l+"",2)).replace(/{h}/g,l+"").replace(/{mm}/g,_l(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,_l(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,_l(d,3)).replace(/{S}/g,d+"")}function Rl(t,n){var i=ze(t),r=i[Fl(n)]()+1,e=i[Vl(n)](),o=i[Wl(n)](),a=i[Hl(n)](),u=i[Ul(n)](),s=0===i[Gl(n)](),f=s&&0===u,h=f&&0===a,l=h&&0===o,c=l&&1===e;return c&&1===r?"year":c?"month":l?"day":h?"hour":f?"minute":s?"second":"millisecond"}function Pl(t,n,i){switch(n){case"year":t[Yl(i)](0);case"month":t[Xl(i)](1);case"day":t[ql(i)](0);case"hour":t[Zl(i)](0);case"minute":t[$l(i)](0);case"second":t[Kl(i)](0)}return t}function Bl(t){return t?"getUTCFullYear":"getFullYear"}function Fl(t){return t?"getUTCMonth":"getMonth"}function Vl(t){return t?"getUTCDate":"getDate"}function Wl(t){return t?"getUTCHours":"getHours"}function Hl(t){return t?"getUTCMinutes":"getMinutes"}function Ul(t){return t?"getUTCSeconds":"getSeconds"}function Gl(t){return t?"getUTCMilliseconds":"getMilliseconds"}function jl(t){return t?"setUTCFullYear":"setFullYear"}function Yl(t){return t?"setUTCMonth":"setMonth"}function Xl(t){return t?"setUTCDate":"setDate"}function ql(t){return t?"setUTCHours":"setHours"}function Zl(t){return t?"setUTCMinutes":"setMinutes"}function $l(t){return t?"setUTCSeconds":"setSeconds"}function Kl(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Jl(t){if(isNaN(Fe(t)))return G(t)?t:"-";var n=(t+"").split(".");return n[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(n.length>1?"."+n[1]:"")}function Ql(t,n){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,n){return n.toUpperCase()})),n&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var tc=rt;function nc(t,n,i){function r(t){return t&&ot(t)?t:"-"}function e(t){return Ue(t)}var o="time"===n,a=t instanceof Date;if(o||a){var u=o?ze(t):t;if(!isNaN(+u))return zl(u,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",i);if(a)return"-"}if("ordinal"===n)return j(t)?r(t):Y(t)&&e(t)?t+"":"-";var s=Fe(t);return e(s)?Jl(s):j(t)?r(t):"boolean"==typeof t?t+"":"-"}var ic=["a","b","c","d","e","f","g"],rc=function(t,n){return"{"+t+(null==n?"":n)+"}"};function ec(t,n,i){H(n)||(n=[n]);var r=n.length;if(!r)return"";for(var e=n[0].$vars||[],o=0;o<e.length;o++){var a=ic[o];t=t.replace(rc(a),rc(a,0))}for(var u=0;u<r;u++)for(var s=0;s<e.length;s++){var f=n[u][e[s]];t=t.replace(rc(ic[s],u),i?Ht(f):f)}return t}function oc(t,n){return n=n||"transparent",G(t)?t:X(t)&&t.colorStops&&(t.colorStops[0]||{}).color||n}var ac={},uc={},sc=function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(t,n){function i(i){var r=[];return z(i,(function(i){var e=i.create(t,n);r=r.concat(e||[])})),r}this._nonSeriesBoxMasterList=i(ac),this._normalMasterList=i(uc)},t.prototype.update=function(t,n){z(this._normalMasterList,(function(i){i.update&&i.update(t,n)}))},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(t,n){"matrix"!==t&&"calendar"!==t?uc[t]=n:ac[t]=n},t.get=function(t){return uc[t]||ac[t]},t}(),fc=ct();function hc(t){var n=t.getShallow("coord",!0),i=1;if(null==n){var r=fc.get(t.type);r&&r.getCoord2&&(i=2,n=r.getCoord2(t))}return{coord:n,from:i}}var lc=z,cc=["left","right","top","bottom","width","height"],vc=[["width","left","right"],["height","top","bottom"]];function dc(t,n,i,r,e){var o=0,a=0;null==r&&(r=1/0),null==e&&(e=1/0);var u=0;n.eachChild((function(s,f){var h,l,c=s.getBoundingRect(),v=n.childAt(f+1),d=v&&v.getBoundingRect();if("horizontal"===t){var m=c.width+(d?-d.x+c.x:0);(h=o+m)>r||s.newline?(o=0,h=m,a+=u+i,u=c.height):u=Math.max(u,c.height)}else{var p=c.height+(d?-d.y+c.y:0);(l=a+p)>e||s.newline?(o+=u+i,a=0,l=p,u=c.width):u=Math.max(u,c.width)}s.newline||(s.x=o,s.y=a,s.markRedraw(),"horizontal"===t?o=h+i:a=l+i)}))}var mc=dc;function pc(t,n,i){i=tc(i||0);var r=n.width,e=n.height,o=Te(t.left,r),a=Te(t.top,e),u=Te(t.right,r),s=Te(t.bottom,e),f=Te(t.width,r),h=Te(t.height,e),l=i[2]+i[0],c=i[1]+i[3],v=t.aspect;switch(isNaN(f)&&(f=r-u-c-o),isNaN(h)&&(h=e-s-l-a),null!=v&&(isNaN(f)&&isNaN(h)&&(v>r/e?f=.8*r:h=.8*e),isNaN(f)&&(f=v*h),isNaN(h)&&(h=f/v)),isNaN(o)&&(o=r-u-f-c),isNaN(a)&&(a=e-s-h-l),t.left||t.right){case"center":o=r/2-f/2-i[3];break;case"right":o=r-f-c}switch(t.top||t.bottom){case"middle":case"center":a=e/2-h/2-i[0];break;case"bottom":a=e-h-l}o=o||0,a=a||0,isNaN(f)&&(f=r-c-o-(u||0)),isNaN(h)&&(h=e-l-a-(s||0));var d=new xn((n.x||0)+o+i[3],(n.y||0)+a+i[0],f,h);return d.margin=i,d}W(dc,"vertical"),W(dc,"horizontal");function yc(t,n){var i,r,e,o,a=t.boxCoordinateSystem;if(a){var u=hc(t);if(a.dataToLayout){e=1,o=u.from;var s=a.dataToLayout(u.coord);i=s.contentRect||s.rect}}return null==e&&(e=1),1===e&&(i||(i={x:0,y:0,width:n.getWidth(),height:n.getHeight()}),r=[i.x+i.width/2,i.y+i.height/2]),{type:e,refContainer:i,refPoint:r,boxCoordFrom:o}}function gc(t){var n=t.layoutMode||t.constructor.layoutMode;return X(n)?n:n?{type:n}:null}function bc(t,n,i){var r=i&&i.ignoreSize;!H(r)&&(r=[r,r]);var e=a(vc[0],0),o=a(vc[1],1);function a(i,e){var o={},a=0,s={},f=0;if(lc(i,(function(n){s[n]=t[n]})),lc(i,(function(t){mt(n,t)&&(o[t]=s[t]=n[t]),u(o,t)&&a++,u(s,t)&&f++})),r[e])return u(n,i[1])?s[i[2]]=null:u(n,i[2])&&(s[i[1]]=null),s;if(2!==f&&a){if(a>=2)return o;for(var h=0;h<i.length;h++){var l=i[h];if(!mt(o,l)&&mt(t,l)){o[l]=t[l];break}}return o}return s}function u(t,n){return null!=t[n]&&"auto"!==t[n]}function s(t,n,i){lc(t,(function(t){n[t]=i[t]}))}s(vc[0],t,e),s(vc[1],t,o)}function wc(t){return function(t,n){return n&&t&&lc(cc,(function(i){mt(n,i)&&(t[i]=n[i])})),t}({},t)}var xc=ao(),Mc=function(t){function n(n,i,r){var e=t.call(this,n,i,r)||this;return e.uid=vl("ec_cpt_model"),e}var i;return o(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},n.prototype.mergeDefaultAndTheme=function(t,n){var i=gc(this),r=i?wc(t):{};C(t,n.getTheme().get(this.mainType)),C(t,this.getDefaultOption()),i&&bc(t,r,i)},n.prototype.mergeOption=function(t){C(this.option,t,!0);var n=gc(this);n&&bc(this.option,t,n)},n.prototype.optionUpdated=function(){},n.prototype.getDefaultOption=function(){var t=this.constructor;if(!function(t){return!(!t||!t[ko])}(t))return t.defaultOption;var n=xc(this);if(!n.defaultOption){for(var i=[],r=t;r;){var e=r.prototype.defaultOption;e&&i.push(e),r=r.superClass}for(var o={},a=i.length-1;a>=0;a--)o=C(o,i[a],!0);n.defaultOption=o}return n.defaultOption},n.prototype.getReferringComponents=function(t,n){var i=t+"Id";return lo(this.ecModel,t,{index:this.get(t+"Index",!0),id:this.get(i,!0)},n)},n.prototype.getBoxLayoutParams=function(){return{left:(t=this).getShallow("left",n=!1),top:t.getShallow("top",n),right:t.getShallow("right",n),bottom:t.getShallow("bottom",n),width:t.getShallow("width",n),height:t.getShallow("height",n)};var t,n},n.prototype.getZLevelKey=function(){return""},n.prototype.setZLevel=function(t){this.option.zlevel=t},n.protoInitialize=((i=n.prototype).type="component",i.id="",i.name="",i.mainType="",i.subType="",void(i.componentIndex=0)),n}(ll);No(Mc,ll),Oo(Mc),function(t){var n={};t.registerSubTypeDefaulter=function(t,i){var r=To(t);n[r.main]=i},t.determineSubType=function(i,r){var e=r.type;if(!e){var o=To(i).main;t.hasSubTypes(i)&&n[o]&&(e=n[o](r))}return e}}(Mc),function(){function t(t,n){return t[n]||(t[n]={predecessor:[],successor:[]}),t[n]}Mc.topologicalTravel=function(n,i,r,e){if(n.length){var o=function(n){var i={},r=[];return z(n,(function(e){var o,a,u=t(i,e),s=function(t,n){var i=[];return z(t,(function(t){D(n,t)>=0&&i.push(t)})),i}(u.originalDeps=(a=[],z(Mc.getClassesByMainType(o=e),(function(t){a=a.concat(t.dependencies||t.prototype.dependencies||[])})),a=R(a,(function(t){return To(t).main})),"dataset"!==o&&D(a,"dataset")<=0&&a.unshift("dataset"),a),n);u.entryCount=s.length,0===u.entryCount&&r.push(e),z(s,(function(n){D(u.predecessor,n)<0&&u.predecessor.push(n);var r=t(i,n);D(r.successor,n)<0&&r.successor.push(e)}))})),{graph:i,noEntryList:r}}(i),a=o.graph,u=o.noEntryList,s={};for(z(n,(function(t){s[t]=!0}));u.length;){var f=u.pop(),h=a[f],l=!!s[f];l&&(r.call(e,f,h.originalDeps.slice()),delete s[f]),z(h.successor,l?v:c)}z(s,(function(){throw new Error("")}))}function c(t){a[t].entryCount--,0===a[t].entryCount&&u.push(t)}function v(t){s[t]=!0,c(t)}}}();var Sc={color:{},darkColor:{},size:{}},kc=Sc.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};for(var Tc in I(kc,{primary:kc.neutral80,secondary:kc.neutral70,tertiary:kc.neutral60,quaternary:kc.neutral50,disabled:kc.neutral20,border:kc.neutral30,borderTint:kc.neutral20,borderShade:kc.neutral40,background:kc.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:kc.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:kc.neutral70,axisLineTint:kc.neutral40,axisTick:kc.neutral70,axisTickMinor:kc.neutral60,axisLabel:kc.neutral70,axisSplitLine:kc.neutral15,axisMinorSplitLine:kc.neutral05}),kc)if(kc.hasOwnProperty(Tc)){var Ac=kc[Tc];"theme"===Tc?Sc.darkColor.theme=kc.theme.slice():"highlight"===Tc?Sc.darkColor.highlight="rgba(255,231,130,0.4)":Sc.darkColor[Tc]=0===Tc.indexOf("accent")?Fi(Ac,0,(function(t){return.5*t}),(function(t){return Math.min(1,1.3-t)})):Fi(Ac,0,(function(t){return.9*t}),(function(t){return 1-Math.pow(t,1.5)}))}Sc.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Nc="";"undefined"!=typeof navigator&&(Nc=navigator.platform||"");var Lc="rgba(0, 0, 0, 0.2)",Cc=Sc.color.theme[0],Ic=Fi(Cc,0,null,.9),Oc={darkMode:"auto",colorBy:"series",color:Sc.color.theme,gradientColor:[Ic,Cc],aria:{decal:{decals:[{color:Lc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Lc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Lc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Lc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Lc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Lc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Nc.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},Dc=ao();function _c(t,n,i){var r={},e=Ec(n);if(!e||!t)return r;var o,a,u=[],s=[],f=Dc(n.ecModel).datasetMap,h=e.uid+"_"+i.seriesLayoutBy;z(t=t.slice(),(function(n,i){var e=X(n)?n:t[i]={name:n};"ordinal"===e.type&&null==o&&(o=i,a=v(e)),r[e.name]=[]}));var l=f.get(h)||f.set(h,{categoryWayDim:a,valueWayDim:0});function c(t,n,i){for(var r=0;r<i;r++)t.push(n+r)}function v(t){var n=t.dimsDef;return n?n.length:1}return z(t,(function(t,n){var i=t.name,e=v(t);if(null==o)c(r[i],a=l.valueWayDim,e),c(s,a,e),l.valueWayDim+=e;else if(o===n)c(r[i],0,e),c(u,0,e);else{var a;c(r[i],a=l.categoryWayDim,e),c(s,a,e),l.categoryWayDim+=e}})),u.length&&(r.itemName=u),s.length&&(r.seriesName=s),r}function Ec(t){if(!t.get("data",!0))return lo(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},ho).models[0]}function zc(t,n){return function(t,n,i,r,e,o){var a,u,s;if(Z(t))return 3;if(r){var f=r[o];X(f)?(u=f.name,s=f.type):G(f)&&(u=f)}if(null!=s)return"ordinal"===s?1:3;if(n===Wu){var h=t;if(i===Xu){for(var l=h[o],c=0;c<(l||[]).length&&c<5;c++)if(null!=(a=g(l[e+c])))return a}else for(c=0;c<h.length&&c<5;c++){var v=h[e+c];if(v&&null!=(a=g(v[o])))return a}}else if(n===Hu){var d=t;if(!u)return 3;for(c=0;c<d.length&&c<5;c++)if((p=d[c])&&null!=(a=g(p[u])))return a}else if(n===Uu){if(!u)return 3;if(!(l=t[u])||Z(l))return 3;for(c=0;c<l.length&&c<5;c++)if(null!=(a=g(l[c])))return a}else if(n===Vu){var m=t;for(c=0;c<m.length&&c<5;c++){var p,y=Je(p=m[c]);if(!H(y))return 3;if(null!=(a=g(y[o])))return a}}function g(t){var n=G(t);return null!=t&&isFinite(Number(t))&&""!==t?n?2:3:n&&"-"!==t?1:void 0}return 3}(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,n)}var Rc=ct(),Pc=ao();ao();var Bc,Fc,Vc,Wc=function(){function t(){}return t.prototype.getColorFromPalette=function(t,n,i){return function(t,n,i,r,e,o,a){var u=Pc(o=o||t),s=u.paletteIdx||0,f=u.paletteNameMap=u.paletteNameMap||{};if(f.hasOwnProperty(e))return f[e];var h=null!=a&&r?function(t,n){for(var i=t.length,r=0;r<i;r++)if(t[r].length>n)return t[r];return t[i-1]}(r,a):i;if((h=h||i)&&h.length){var l=h[s];return e&&(f[e]=l),u.paletteIdx=(s+1)%h.length,l}}(this,0,Ze(this.get("color",!0)),this.get("colorLayer",!0),t,n,i)},t.prototype.clearColorPalette=function(){!function(t,n){n(t).paletteIdx=0,n(t).paletteNameMap={}}(this,Pc)},t}(),Hc="\0_ec_inner",Uc=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.init=function(t,n,i,r,e,o){r=r||{},this.option=null,this._theme=new ll(r),this._locale=new ll(e),this._optionManager=o},n.prototype.setOption=function(t,n,i){var r=Yc(n);this._optionManager.setOption(t,i,r),this._resetOption(null,r)},n.prototype.resetOption=function(t,n){return this._resetOption(t,Yc(n))},n.prototype._resetOption=function(t,n){var i=!1,r=this._optionManager;if(!t||"recreate"===t){var e=r.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(e,n)):Vc(this,e),i=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=r.getTimelineOption(this);o&&(i=!0,this._mergeOption(o,n))}if(!t||"recreate"===t||"media"===t){var a=r.getMediaOption(this);a.length&&z(a,(function(t){i=!0,this._mergeOption(t,n)}),this)}return i},n.prototype.mergeOption=function(t){this._mergeOption(t,null)},n.prototype._mergeOption=function(t,n){var i=this.option,r=this._componentsMap,e=this._componentsCount,o=[],a=ct(),u=n&&n.replaceMergeMainTypeMap;Dc(this).datasetMap=ct(),z(t,(function(t,n){null!=t&&(Mc.hasClass(n)?n&&(o.push(n),a.set(n,!0)):i[n]=null==i[n]?L(t):C(i[n],t,!0))})),u&&u.each((function(t,n){Mc.hasClass(n)&&!a.get(n)&&(o.push(n),a.set(n,!0))})),Mc.topologicalTravel(o,Mc.getAllClassMainTypes(),(function(n){var o=function(t,n,i){var r=Rc.get(n);if(!r)return i;var e=r(t);return e?i.concat(e):i}(this,n,Ze(t[n])),a=r.get(n),s=function(t,n,i){var r="normalMerge"===i,e="replaceMerge"===i,o="replaceAll"===i;t=t||[],n=(n||[]).slice();var a=ct();z(n,(function(t,i){X(t)||(n[i]=null)}));var u,s,f=function(t,n,i){var r=[];if("replaceAll"===i)return r;for(var e=0;e<t.length;e++){var o=t[e];o&&null!=o.id&&n.set(o.id,e),r.push({existing:"replaceMerge"===i||eo(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(t,a,i);return(r||e)&&function(t,n,i,r){z(r,(function(e,o){if(e&&null!=e.id){var a=no(e.id),u=i.get(a);if(null!=u){var s=t[u];et(!s.newOption,'Duplicated option on id "'+a+'".'),s.newOption=e,s.existing=n[u],r[o]=null}}}))}(f,t,a,n),r&&function(t,n){z(n,(function(i,r){if(i&&null!=i.name)for(var e=0;e<t.length;e++){var o=t[e].existing;if(!t[e].newOption&&o&&(null==o.id||null==i.id)&&!eo(i)&&!eo(o)&&to("name",o,i))return t[e].newOption=i,void(n[r]=null)}}))}(f,n),r||e?function(t,n,i){z(n,(function(n){if(n){for(var r,e=0;(r=t[e])&&(r.newOption||eo(r.existing)||r.existing&&null!=n.id&&!to("id",n,r.existing));)e++;r?(r.newOption=n,r.brandNew=i):t.push({newOption:n,brandNew:i,existing:null,keyInfo:null}),e++}}))}(f,n,e):o&&function(t,n){z(n,(function(n){t.push({newOption:n,brandNew:!0,existing:null,keyInfo:null})}))}(f,n),u=f,s=ct(),z(u,(function(t){var n=t.existing;n&&s.set(n.id,t)})),z(u,(function(t){var n=t.newOption;et(!n||null==n.id||!s.get(n.id)||s.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&s.set(n.id,t),!t.keyInfo&&(t.keyInfo={})})),z(u,(function(t,n){var i=t.existing,r=t.newOption,e=t.keyInfo;if(X(r)){if(e.name=null!=r.name?no(r.name):i?i.name:qe+n,i)e.id=no(i.id);else if(null!=r.id)e.id=no(r.id);else{var o=0;do{e.id="\0"+e.name+"\0"+o++}while(s.get(e.id))}s.set(e.id,t)}})),f}(a,o,a?u&&u.get(n)?"replaceMerge":"normalMerge":"replaceAll");(function(t,n,i){z(t,(function(t){var r=t.newOption;X(r)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,n,i,r){return n.type?n.type:i?i.subType:r.determineSubType(t,n)}(n,r,t.existing,i))}))})(s,n,Mc),i[n]=null,r.set(n,null),e.set(n,0);var f,h=[],l=[],c=0;z(s,(function(t,i){var r=t.existing,e=t.newOption;if(e){var o=Mc.getClass(n,t.keyInfo.subType,!("series"===n));if(!o)return;if("tooltip"===n){if(f)return;f=!0}if(r&&r.constructor===o)r.name=t.keyInfo.name,r.mergeOption(e,this),r.optionUpdated(e,!1);else{var a=I({componentIndex:i},t.keyInfo);I(r=new o(e,this,this,a),a),t.brandNew&&(r.__requireNewView=!0),r.init(e,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(h.push(r.option),l.push(r),c++):(h.push(void 0),l.push(void 0))}),this),i[n]=h,r.set(n,l),e.set(n,c),"series"===n&&Bc(this)}),this),this._seriesIndices||Bc(this)},n.prototype.getOption=function(){var t=L(this.option);return z(t,(function(n,i){if(Mc.hasClass(i)){for(var r=Ze(n),e=r.length,o=!1,a=e-1;a>=0;a--)r[a]&&!eo(r[a])?o=!0:(r[a]=null,!o&&e--);r.length=e,t[i]=r}})),delete t[Hc],t},n.prototype.setTheme=function(t){this._theme=new ll(t),this._resetOption("recreate",null)},n.prototype.getTheme=function(){return this._theme},n.prototype.getLocaleModel=function(){return this._locale},n.prototype.setUpdatePayload=function(t){this._payload=t},n.prototype.getUpdatePayload=function(){return this._payload},n.prototype.getComponent=function(t,n){var i=this._componentsMap.get(t);if(i){var r=i[n||0];if(r)return r;if(null==n)for(var e=0;e<i.length;e++)if(i[e])return i[e]}},n.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var i,r=t.index,e=t.id,o=t.name,a=this._componentsMap.get(n);return a&&a.length?(null!=r?(i=[],z(Ze(r),(function(t){a[t]&&i.push(a[t])}))):i=null!=e?Gc("id",e,a):null!=o?Gc("name",o,a):B(a,(function(t){return!!t})),jc(i,t)):[]},n.prototype.findComponents=function(t){var n,i,r,e,o,a=t.mainType,u=(i=a+"Index",r=a+"Id",e=a+"Name",!(n=t.query)||null==n[i]&&null==n[r]&&null==n[e]?null:{mainType:a,index:n[i],id:n[r],name:n[e]});return o=jc(u?this.queryComponents(u):B(this._componentsMap.get(a),(function(t){return!!t})),t),t.filter?B(o,t.filter):o},n.prototype.eachComponent=function(t,n,i){var r=this._componentsMap;if(U(t)){var e=n,o=t;r.each((function(t,n){for(var i=0;t&&i<t.length;i++){var r=t[i];r&&o.call(e,n,r,r.componentIndex)}}))}else for(var a=G(t)?r.get(t):X(t)?this.findComponents(t):null,u=0;a&&u<a.length;u++){var s=a[u];s&&n.call(i,s,s.componentIndex)}},n.prototype.getSeriesByName=function(t){var n=io(t,null);return B(this._componentsMap.get("series"),(function(t){return!!t&&null!=n&&t.name===n}))},n.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},n.prototype.getSeriesByType=function(t){return B(this._componentsMap.get("series"),(function(n){return!!n&&n.subType===t}))},n.prototype.getSeries=function(){return B(this._componentsMap.get("series"),(function(t){return!!t}))},n.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},n.prototype.eachSeries=function(t,n){Fc(this),z(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];t.call(n,r,i)}),this)},n.prototype.eachRawSeries=function(t,n){z(this._componentsMap.get("series"),(function(i){i&&t.call(n,i,i.componentIndex)}))},n.prototype.eachSeriesByType=function(t,n,i){Fc(this),z(this._seriesIndices,(function(r){var e=this._componentsMap.get("series")[r];e.subType===t&&n.call(i,e,r)}),this)},n.prototype.eachRawSeriesByType=function(t,n,i){return z(this.getSeriesByType(t),n,i)},n.prototype.isSeriesFiltered=function(t){return Fc(this),null==this._seriesIndicesMap.get(t.componentIndex)},n.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},n.prototype.filterSeries=function(t,n){Fc(this);var i=[];z(this._seriesIndices,(function(r){var e=this._componentsMap.get("series")[r];t.call(n,e,r)&&i.push(r)}),this),this._seriesIndices=i,this._seriesIndicesMap=ct(i)},n.prototype.restoreData=function(t){Bc(this);var n=this._componentsMap,i=[];n.each((function(t,n){Mc.hasClass(n)&&i.push(n)})),Mc.topologicalTravel(i,Mc.getAllClassMainTypes(),(function(i){z(n.get(i),(function(n){!n||"series"===i&&function(t,n){if(n){var i=n.seriesIndex,r=n.seriesId,e=n.seriesName;return null!=i&&t.componentIndex!==i||null!=r&&t.id!==r||null!=e&&t.name!==e}}(n,t)||n.restoreData()}))}))},n.internalField=(Bc=function(t){var n=t._seriesIndices=[];z(t._componentsMap.get("series"),(function(t){t&&n.push(t.componentIndex)})),t._seriesIndicesMap=ct(n)},Fc=function(){},void(Vc=function(t,n){t.option={},t.option[Hc]=1,t._componentsMap=ct({series:[]}),t._componentsCount=ct();var i=n.aria;X(i)&&null==i.enabled&&(i.enabled=!0),function(t,n){var i=t.color&&!t.colorLayer;z(n,(function(n,r){"colorLayer"===r&&i||"color"===r&&t.color||Mc.hasClass(r)||("object"==typeof n?t[r]=t[r]?C(t[r],n,!1):L(n):null==t[r]&&(t[r]=n))}))}(n,t._theme.option),C(n,Oc,!1),t._mergeOption(n,null)})),n}(ll);function Gc(t,n,i){if(H(n)){var r=ct();return z(n,(function(t){null!=t&&null!=io(t,null)&&r.set(t,!0)})),B(i,(function(n){return n&&r.get(n[t])}))}var e=io(n,null);return B(i,(function(n){return n&&null!=e&&n[t]===e}))}function jc(t,n){return n.hasOwnProperty("subType")?B(t,(function(t){return t&&t.subType===n.subType})):t}function Yc(t){var n=ct();return t&&z(Ze(t.replaceMerge),(function(t){n.set(t,!0)})),{replaceMergeMainTypeMap:n}}_(Uc,Wc);var Xc=/^(min|max)?(.+)$/,qc=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,n){t&&(z(Ze(t.series),(function(t){t&&t.data&&Z(t.data)&&ut(t.data)})),z(Ze(t.dataset),(function(t){t&&t.source&&Z(t.source)&&ut(t.source)}))),t=L(t);var i=this._optionBackup,r=function(t,n,i){var r,e,o=[],a=t.baseOption,u=t.timeline,s=t.options,f=t.media,h=!!t.media,l=!!(s||u||a&&a.timeline);function c(t){z(n,(function(n){n(t,i)}))}return a?(e=a).timeline||(e.timeline=u):((l||h)&&(t.options=t.media=null),e=t),h&&H(f)&&z(f,(function(t){t&&t.option&&(t.query?o.push(t):r||(r=t))})),c(e),z(s,(function(t){return c(t)})),z(o,(function(t){return c(t.option)})),{baseOption:e,timelineOptions:s||[],mediaDefault:r,mediaList:o}}(t,n,!i);this._newBaseOption=r.baseOption,i?(r.timelineOptions.length&&(i.timelineOptions=r.timelineOptions),r.mediaList.length&&(i.mediaList=r.mediaList),r.mediaDefault&&(i.mediaDefault=r.mediaDefault)):this._optionBackup=r},t.prototype.mountOption=function(t){var n=this._optionBackup;return this._timelineOptions=n.timelineOptions,this._mediaList=n.mediaList,this._mediaDefault=n.mediaDefault,this._currentMediaIndices=[],L(t?n.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var n,i=this._timelineOptions;if(i.length){var r=t.getComponent("timeline");r&&(n=L(i[r.getCurrentIndex()]))}return n},t.prototype.getMediaOption=function(){var t,n=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,e=this._mediaDefault,o=[],a=[];if(!r.length&&!e)return a;for(var u=0,s=r.length;u<s;u++)Zc(r[u].query,n,i)&&o.push(u);return!o.length&&e&&(o=[-1]),o.length&&(t=this._currentMediaIndices,o.join(",")!==t.join(","))&&(a=R(o,(function(t){return L(-1===t?e.option:r[t].option)}))),this._currentMediaIndices=o,a},t}();function Zc(t,n,i){var r={width:n,height:i,aspectratio:n/i},e=!0;return z(t,(function(t,n){var i=n.match(Xc);if(i&&i[1]&&i[2]){var o=i[1],a=i[2].toLowerCase();(function(t,n,i){return"min"===i?t>=n:"max"===i?t<=n:t===n})(r[a],t,o)||(e=!1)}})),e}var $c=z,Kc=X,Jc=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Qc(t){var n=t&&t.itemStyle;if(n)for(var i=0,r=Jc.length;i<r;i++){var e=Jc[i],o=n.normal,a=n.emphasis;o&&o[e]&&(t[e]=t[e]||{},t[e].normal?C(t[e].normal,o[e]):t[e].normal=o[e],o[e]=null),a&&a[e]&&(t[e]=t[e]||{},t[e].emphasis?C(t[e].emphasis,a[e]):t[e].emphasis=a[e],a[e]=null)}}function tv(t,n,i){if(t&&t[n]&&(t[n].normal||t[n].emphasis)){var r=t[n].normal,e=t[n].emphasis;r&&(i?(t[n].normal=t[n].emphasis=null,O(t[n],r)):t[n]=r),e&&(t.emphasis=t.emphasis||{},t.emphasis[n]=e,e.focus&&(t.emphasis.focus=e.focus),e.blurScope&&(t.emphasis.blurScope=e.blurScope))}}function nv(t){tv(t,"itemStyle"),tv(t,"lineStyle"),tv(t,"areaStyle"),tv(t,"label"),tv(t,"labelLine"),tv(t,"upperLabel"),tv(t,"edgeLabel")}function iv(t,n){var i=Kc(t)&&t[n],r=Kc(i)&&i.textStyle;if(r)for(var e=0,o=Ke.length;e<o;e++){var a=Ke[e];r.hasOwnProperty(a)&&(i[a]=r[a])}}function rv(t){t&&(nv(t),iv(t,"label"),t.emphasis&&iv(t.emphasis,"label"))}function ev(t){return H(t)?t:t?[t]:[]}function ov(t){return(H(t)?t[0]:t)||{}}function av(t){t&&z(uv,(function(n){n[0]in t&&!(n[1]in t)&&(t[n[1]]=t[n[0]])}))}var uv=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],sv=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],fv=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function hv(t){var n=t&&t.itemStyle;if(n)for(var i=0;i<fv.length;i++){var r=fv[i][1];null!=n[r]&&(n[fv[i][0]]=n[r])}}function lv(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(t.edgeDistance=t.margin)}function cv(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function vv(t,n){if(t)for(var i=0;i<t.length;i++)n(t[i]),t[i]&&vv(t[i].children,n)}function dv(t,n){(function(t,n){$c(ev(t.series),(function(t){Kc(t)&&function(t){if(Kc(t)){Qc(t),nv(t),iv(t,"label"),iv(t,"upperLabel"),iv(t,"edgeLabel"),t.emphasis&&(iv(t.emphasis,"label"),iv(t.emphasis,"upperLabel"),iv(t.emphasis,"edgeLabel"));var n=t.markPoint;n&&(Qc(n),rv(n));var i=t.markLine;i&&(Qc(i),rv(i));var r=t.markArea;r&&rv(r);var e=t.data;if("graph"===t.type){e=e||t.nodes;var o=t.links||t.edges;if(o&&!Z(o))for(var a=0;a<o.length;a++)rv(o[a]);z(t.categories,(function(t){nv(t)}))}if(e&&!Z(e))for(a=0;a<e.length;a++)rv(e[a]);if((n=t.markPoint)&&n.data){var u=n.data;for(a=0;a<u.length;a++)rv(u[a])}if((i=t.markLine)&&i.data){var s=i.data;for(a=0;a<s.length;a++)H(s[a])?(rv(s[a][0]),rv(s[a][1])):rv(s[a])}"gauge"===t.type?(iv(t,"axisLabel"),iv(t,"title"),iv(t,"detail")):"treemap"===t.type?(tv(t.breadcrumb,"itemStyle"),z(t.levels,(function(t){nv(t)}))):"tree"===t.type&&nv(t.leaves)}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];n&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),$c(i,(function(n){$c(ev(t[n]),(function(t){t&&(iv(t,"axisLabel"),iv(t.axisPointer,"label"))}))})),$c(ev(t.parallel),(function(t){var n=t&&t.parallelAxisDefault;iv(n,"axisLabel"),iv(n&&n.axisPointer,"label")})),$c(ev(t.calendar),(function(t){tv(t,"itemStyle"),iv(t,"dayLabel"),iv(t,"monthLabel"),iv(t,"yearLabel")})),$c(ev(t.radar),(function(t){iv(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)})),$c(ev(t.geo),(function(t){Kc(t)&&(rv(t),$c(ev(t.regions),(function(t){rv(t)})))})),$c(ev(t.timeline),(function(t){rv(t),tv(t,"label"),tv(t,"itemStyle"),tv(t,"controlStyle",!0);var n=t.data;H(n)&&z(n,(function(t){X(t)&&(tv(t,"label"),tv(t,"itemStyle"))}))})),$c(ev(t.toolbox),(function(t){tv(t,"iconStyle"),$c(t.feature,(function(t){tv(t,"iconStyle")}))})),iv(ov(t.axisPointer),"label"),iv(ov(t.tooltip).axisPointer,"label")})(t,n),t.series=Ze(t.series),z(t.series,(function(t){if(X(t)){var n=t.type;if("line"===n)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===n||"gauge"===n){if(null!=t.clockWise&&(t.clockwise=t.clockWise),lv(t.label),(e=t.data)&&!Z(e))for(var i=0;i<e.length;i++)lv(e[i]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===n){var r=function(t){for(var n="pointer.color".split(","),i=t,r=0;r<n.length&&null!=(i=i&&i[n[r]]);r++);return i}(t);null!=r&&function(t,n,i){for(var r,e="itemStyle.color".split(","),o=t,a=0;a<e.length-1;a++)null==o[r=e[a]]&&(o[r]={}),o=o[r];null==o[e[a]]&&(o[e[a]]=i)}(t,0,r)}else if("bar"===n){var e;if(hv(t),hv(t.backgroundStyle),hv(t.emphasis),(e=t.data)&&!Z(e))for(i=0;i<e.length;i++)"object"==typeof e[i]&&(hv(e[i]),hv(e[i]&&e[i].emphasis))}else if("sunburst"===n){var o=t.highlightPolicy;o&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=o)),cv(t),vv(t.data,cv)}else"graph"===n||"sankey"===n?function(t){t&&null!=t.focusNodeAdjacency&&(t.emphasis=t.emphasis||{},null==t.emphasis.focus&&(t.emphasis.focus="adjacency"))}(t):"map"===n&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&O(t,t.mapLocation));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(t.emphasis.scale=t.hoverAnimation)),av(t)}})),t.dataRange&&(t.visualMap=t.dataRange),z(sv,(function(n){var i=t[n];i&&(H(i)||(i=[i]),z(i,(function(t){av(t)})))}))}var mv,pv,yv,gv,bv,wv,xv=Mo((function(t){var n=ct();t.eachSeries((function(t){var i=t.get("stack");if(i){var r=n.get(i)||n.set(i,[]),e=t.getData(),o={stackResultDimension:e.getCalculationInfo("stackResultDimension"),stackedOverDimension:e.getCalculationInfo("stackedOverDimension"),stackedDimension:e.getCalculationInfo("stackedDimension"),stackedByDimension:e.getCalculationInfo("stackedByDimension"),isStackedByIndex:e.getCalculationInfo("isStackedByIndex"),data:e,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.push(o)}})),n.each((function(t){0!==t.length&&("seriesDesc"===(t[0].seriesModel.get("stackOrder")||"seriesAsc")&&t.reverse(),z(t,(function(n,i){n.data.setCalculationInfo("stackedOnSeries",i>0?t[i-1].seriesModel:null)})),function(t){z(t,(function(n,i){var r=[],e=[NaN,NaN],o=[n.stackResultDimension,n.stackedOverDimension],a=n.data,u=n.isStackedByIndex,s=n.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,f,h){var l,c,v=a.get(n.stackedDimension,h);if(isNaN(v))return e;u?c=a.getRawIndex(h):l=a.get(n.stackedByDimension,h);for(var d=NaN,m=i-1;m>=0;m--){var p=t[m];if(u||(c=p.data.rawIndexOf(p.stackedByDimension,l)),c>=0){var y=p.data.getByRawIndex(p.stackResultDimension,c);if("all"===s||"positive"===s&&y>0||"negative"===s&&y<0||"samesign"===s&&v>=0&&y>0||"samesign"===s&&v<=0&&y<0){v=Ie(v,y),d=y;break}}}return r[0]=v,r[1]=d,r}))}))}(t))}))})),Mv=function(t){this.data=t.data||(t.sourceFormat===Uu?{}:[]),this.sourceFormat=t.sourceFormat||ju,this.seriesLayoutBy=t.seriesLayoutBy||Yu,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var n=this.dimensionsDefine=t.dimensionsDefine;if(n)for(var i=0;i<n.length;i++){var r=n[i];null==r.type&&1===zc(this,i)&&(r.type="ordinal")}};function Sv(t){return t instanceof Mv}function kv(t,n,i){i=i||Av(t);var r=n.seriesLayoutBy,e=function(t,n,i,r,e){var o,a;if(!t)return{dimensionsDefine:Nv(e),startIndex:a,dimensionsDetectedCount:o};if(n===Wu){var u=t;"auto"===r||null==r?Lv((function(t){null!=t&&"-"!==t&&(G(t)?null==a&&(a=1):a=0)}),i,u,10):a=Y(r)?r:r?1:0,e||1!==a||(e=[],Lv((function(t,n){e[n]=null!=t?t+"":""}),i,u,1/0)),o=e?e.length:i===Xu?u.length:u[0]?u[0].length:null}else if(n===Hu)e||(e=function(t){for(var n,i=0;i<t.length&&!(n=t[i++]););if(n)return F(n)}(t));else if(n===Uu)e||(e=[],z(t,(function(t,n){e.push(n)})));else if(n===Vu){var s=Je(t[0]);o=H(s)&&s.length||1}return{startIndex:a,dimensionsDefine:Nv(e),dimensionsDetectedCount:o}}(t,i,r,n.sourceHeader,n.dimensions);return new Mv({data:t,sourceFormat:i,seriesLayoutBy:r,dimensionsDefine:e.dimensionsDefine,startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount,metaRawOption:L(n)})}function Tv(t){return new Mv({data:t,sourceFormat:Z(t)?Gu:Vu})}function Av(t){var n=ju;if(Z(t))n=Gu;else if(H(t)){0===t.length&&(n=Wu);for(var i=0,r=t.length;i<r;i++){var e=t[i];if(null!=e){if(H(e)||Z(e)){n=Wu;break}if(X(e)){n=Hu;break}}}}else if(X(t))for(var o in t)if(mt(t,o)&&E(t[o])){n=Uu;break}return n}function Nv(t){if(t){var n=ct();return R(t,(function(t){var i={name:(t=X(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==i.name)return i;i.name+="",null==i.displayName&&(i.displayName=i.name);var r=n.get(i.name);return r?i.name+="-"+r.count++:n.set(i.name,{count:1}),i}))}}function Lv(t,n,i,r){if(n===Xu)for(var e=0;e<i.length&&e<r;e++)t(i[e]?i[e][0]:null,e);else{var o=i[0]||[];for(e=0;e<o.length&&e<r;e++)t(o[e],e)}}var Cv=function(){function t(t,n){var i=Sv(t)?t:Tv(t);this._source=i;var r=this._data=i.data;i.sourceFormat===Gu&&(this._offset=0,this._dimSize=n,this._data=r),wv(this,r,i)}var n;return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(){},t.prototype.appendData=function(){},t.prototype.clean=function(){},t.protoInitialize=((n=t.prototype).pure=!1,void(n.persistent=!0)),t.internalField=function(){var t;wv=function(t,e,o){var a=o.sourceFormat,u=o.seriesLayoutBy,s=o.startIndex,f=o.dimensionsDefine;if(I(t,bv[Vv(a,u)]),a===Gu)t.getItem=n,t.count=r,t.fillStorage=i;else{var h=_v(a,u);t.getItem=V(h,null,e,s,f);var l=Rv(a,u);t.count=V(l,null,e,s,f)}};var n=function(t,n){n=n||[];for(var i=this._data,r=this._dimSize,e=r*(t-=this._offset),o=0;o<r;o++)n[o]=i[e+o];return n},i=function(t,n,i,r){for(var e=this._data,o=this._dimSize,a=0;a<o;a++){for(var u=r[a],s=null==u[0]?1/0:u[0],f=null==u[1]?-1/0:u[1],h=n-t,l=i[a],c=0;c<h;c++){var v=e[c*o+a];l[t+c]=v,v<s&&(s=v),v>f&&(f=v)}u[0]=s,u[1]=f}},r=function(){return this._data?this._data.length/this._dimSize:0};function e(t){for(var n=0;n<t.length;n++)this._data.push(t[n])}(t={})[Wu+"_"+Yu]={pure:!0,appendData:e},t[Wu+"_"+Xu]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Hu]={pure:!0,appendData:e},t[Uu]={pure:!0,appendData:function(t){var n=this._data;z(t,(function(t,i){for(var r=n[i]||(n[i]=[]),e=0;e<(t||[]).length;e++)r.push(t[e])}))}},t[Vu]={appendData:e},t[Gu]={persistent:!1,pure:!0,appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},bv=t}(),t}(),Iv=function(t){H(t)||je("series.data or dataset.source must be an array.")};(mv={})[Wu+"_"+Yu]=Iv,mv[Wu+"_"+Xu]=Iv,mv[Hu]=Iv,mv[Uu]=function(t,n){for(var i=0;i<n.length;i++)null==n[i].name&&je("dimension name must not be null/undefined.")},mv[Vu]=Iv;var Ov=function(t,n,i,r){return t[r]},Dv=((pv={})[Wu+"_"+Yu]=function(t,n,i,r){return t[r+n]},pv[Wu+"_"+Xu]=function(t,n,i,r,e){r+=n;for(var o=e||[],a=t,u=0;u<a.length;u++){var s=a[u];o[u]=s?s[r]:null}return o},pv[Hu]=Ov,pv[Uu]=function(t,n,i,r,e){for(var o=e||[],a=0;a<i.length;a++){var u=i[a].name,s=null!=u?t[u]:null;o[a]=s?s[r]:null}return o},pv[Vu]=Ov,pv);function _v(t,n){return Dv[Vv(t,n)]}var Ev=function(t){return t.length},zv=((yv={})[Wu+"_"+Yu]=function(t,n){return Math.max(0,t.length-n)},yv[Wu+"_"+Xu]=function(t,n){var i=t[0];return i?Math.max(0,i.length-n):0},yv[Hu]=Ev,yv[Uu]=function(t,n,i){var r=i[0].name,e=null!=r?t[r]:null;return e?e.length:0},yv[Vu]=Ev,yv);function Rv(t,n){return zv[Vv(t,n)]}var Pv=function(t,n){return t[n]},Bv=((gv={})[Wu]=Pv,gv[Hu]=function(t,n,i){return t[i]},gv[Uu]=Pv,gv[Vu]=function(t,n){var i=Je(t);return i instanceof Array?i[n]:i},gv[Gu]=Pv,gv);function Fv(t){return Bv[t]}function Vv(t,n){return t===Wu?t+"_"+n:t}function Wv(t,n,i){if(t){var r=t.getRawDataItem(n);if(null!=r){var e=t.getStore(),o=e.getSource().sourceFormat;if(null!=i){var a=t.getDimensionIndex(i),u=e.getDimensionProperty(a);return Fv(o)(r,a,u)}var s=r;return o===Vu&&(s=Je(r)),s}}}var Hv=/\{@(.+?)\}/g,Uv=function(){function t(){}return t.prototype.getDataParams=function(t,n){var i=this.getData(n),r=this.getRawValue(t,n),e=i.getRawIndex(t),o=i.getName(t),a=i.getRawDataItem(t),u=i.getItemVisual(t,"style"),s=u&&u[i.getItemVisual(t,"drawType")||"fill"],f=u&&u.stroke,h=this.mainType,l="series"===h,c=i.userOutput&&i.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:l?this.subType:null,seriesIndex:this.seriesIndex,seriesId:l?this.id:null,seriesName:l?this.name:null,name:o,dataIndex:e,data:a,dataType:n,value:r,color:s,borderColor:f,dimensionNames:c?c.fullDimensions:null,encode:c?c.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(t,n,i,r,e,o){n=n||"normal";var a=this.getData(i),u=this.getDataParams(t,i);return o&&(u.value=o.interpolatedValue),null!=r&&H(u.value)&&(u.value=u.value[r]),e||(e=a.getItemModel(t).get("normal"===n?["label","formatter"]:[n,"label","formatter"])),U(e)?(u.status=n,u.dimensionIndex=r,e(u)):G(e)?ec(e,u).replace(Hv,(function(n,i){var r=i.length,e=i;"["===e.charAt(0)&&"]"===e.charAt(r-1)&&(e=+e.slice(1,r-1));var u=Wv(a,t,e);if(o&&H(o.interpolatedValue)){var s=a.getDimensionIndex(e);s>=0&&(u=o.interpolatedValue[s])}return null!=u?u+"":""})):void 0},t.prototype.getRawValue=function(t,n){return Wv(this.getData(n),t)},t.prototype.formatTooltip=function(){},t}();function Gv(t){var n,i;return X(t)?t.type&&(i=t):n=t,{text:n,frag:i}}function jv(t){return new Yv(t)}var Yv=function(){function t(t){this._reset=(t=t||{}).reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var n,i=this._upstream,r=t&&t.skip;if(this._dirty&&i){var e=this.context;e.data=e.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(n=this._plan(this.context));var o,a=h(this._modBy),u=this._modDataCount||0,s=h(t&&t.modBy),f=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}a===s&&u===f||(n="reset"),(this._dirty||"reset"===n)&&(this._dirty=!1,o=this._doReset(r)),this._modBy=s,this._modDataCount=f;var l=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,v=Math.min(null!=l?this._dueIndex+l:1/0,this._dueEnd);if(!r&&(o||c<v)){var d=this._progress;if(H(d))for(var m=0;m<d.length;m++)this._doProgress(d[m],c,v,s,f);else this._doProgress(d,c,v,s,f)}this._dueIndex=v,this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:v}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(t,n,i,r,e){Xv.reset(n,i,r,e),this._callingProgress=t,this._callingProgress({start:n,end:i,count:i-n,next:Xv.next},this.context)},t.prototype._doReset=function(t){var n,i;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((n=this._reset(this.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),H(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),i},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},t}(),Xv=function(){var t,n,i,r,e,o={reset:function(s,f,h,l){n=s,t=f,i=h,r=l,e=Math.ceil(r/i),o.next=i>1&&r>0?u:a}};return o;function a(){return n<t?n++:null}function u(){var o=n%e*i+Math.ceil(n/e),a=n>=t?null:o<r?o:n;return n++,a}}();function qv(t,n){var i=n&&n.type;return"ordinal"===i?t:("time"!==i||Y(t)||null==t||"-"===t||(t=+ze(t)),null==t||""===t?NaN:Number(t))}ct({number:function(t){return parseFloat(t)},time:function(t){return+ze(t)},trim:function(t){return G(t)?ot(t):t}});var Zv=function(){function t(t,n){var i="desc"===t;this._resultLT=i?1:-1,null==n&&(n=i?"min":"max"),this._incomparable="min"===n?-1/0:1/0}return t.prototype.evaluate=function(t,n){var i=Y(t)?t:Fe(t),r=Y(n)?n:Fe(n),e=isNaN(i),o=isNaN(r);if(e&&(i=this._incomparable),o&&(r=this._incomparable),e&&o){var a=G(t),u=G(n);a&&(i=u?t:0),u&&(r=a?n:0)}return i<r?this._resultLT:i>r?-this._resultLT:0},t}();function $v(t,n){return n>t.g&&n>=t.ge&&n<t.l&&n<=t.le}var Kv=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(){},t.prototype.retrieveValueFromItem=function(){},t.prototype.convertValue=function(t,n){return qv(t,n)},t}();function Jv(t){return ed(t.sourceFormat)||Ye(""),t.data}function Qv(t){var n=t.sourceFormat,i=t.data;if(ed(n)||Ye(""),n===Wu){for(var r=[],e=0,o=i.length;e<o;e++)r.push(i[e].slice());return r}if(n===Hu){for(r=[],e=0,o=i.length;e<o;e++)r.push(I({},i[e]));return r}}function td(t,n,i){if(null!=i)return Y(i)||!isNaN(i)&&!mt(n,i)?t[i]:mt(n,i)?n[i]:void 0}function nd(t){return L(t)}var id=ct();function rd(t,n){n.length||Ye(""),X(t)||Ye("");var i=id.get(t.type);i||Ye("");var r=R(n,(function(t){return function(t,n){var i=new Kv,r=t.data,e=i.sourceFormat=t.sourceFormat,o=t.startIndex;t.seriesLayoutBy!==Yu&&Ye("");var a=[],u={},s=t.dimensionsDefine;if(s)z(s,(function(t,n){var i=t.name,r={index:n,name:i,displayName:t.displayName};a.push(r),null!=i&&(mt(u,i)&&Ye(""),u[i]=r)}));else for(var f=0;f<t.dimensionsDetectedCount;f++)a.push({index:f});var h=_v(e,Yu);n.__isBuiltIn&&(i.getRawDataItem=function(t){return h(r,o,a,t)},i.getRawData=V(Jv,null,t)),i.cloneRawData=V(Qv,null,t);var l=Rv(e,Yu);i.count=V(l,null,r,o,a);var c=Fv(e);i.retrieveValue=function(t,n){var i=h(r,o,a,t);return v(i,n)};var v=i.retrieveValueFromItem=function(t,n){if(null!=t){var i=a[n];return i?c(t,n,i.name):void 0}};return i.getDimensionInfo=V(td,null,a,u),i.cloneAllDimensionInfo=V(nd,null,a),i}(t,i)}));return R(Ze(i.transform({upstream:r[0],upstreamList:r,config:L(t.config)})),(function(t,i){var r;X(t)||Ye(""),t.data||Ye(""),ed(Av(t.data))||Ye("");var e=n[0];if(e&&0===i&&!t.dimensions){var o=e.startIndex;o&&(t.data=e.data.slice(0,o).concat(t.data)),r={seriesLayoutBy:Yu,sourceHeader:o,dimensions:e.metaRawOption.dimensions}}else r={seriesLayoutBy:Yu,sourceHeader:0,dimensions:t.dimensions};return kv(t.data,r,null)}))}function ed(t){return t===Wu||t===Hu}var od,ad=typeof Uint32Array===Pu?Array:Uint32Array,ud=typeof Uint16Array===Pu?Array:Uint16Array,sd=typeof Int32Array===Pu?Array:Int32Array,fd=typeof Float64Array===Pu?Array:Float64Array,hd={float:fd,int:sd,ordinal:Array,number:Array,time:fd};function ld(t){return t>65535?ad:ud}function cd(t,n,i,r,e){var o=hd[i||"float"];if(e){var a=t[n],u=a&&a.length;if(u!==r){for(var s=new o(r),f=0;f<u;f++)s[f]=a[f];t[n]=s}}else t[n]=new o(r)}var vd=function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=ct()}return t.prototype.initData=function(t,n,i){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=t.getSource(),e=this.defaultDimValueGetter=od[r.sourceFormat];this._dimValueGetter=i||e,this._rawExtent=[],this._dimensions=R(n,(function(t){return{type:t.type,property:t.property}})),this._initDataFromProvider(0,t.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(t,n){var i=this._calcDimNameToIdx,r=this._dimensions,e=i.get(t);if(null!=e){if(r[e].type===n)return e}else e=r.length;return r[e]={type:n},i.set(t,e),this._chunks[e]=new hd[n||"float"](this._rawCount),this._rawExtent[e]=[1/0,-1/0],e},t.prototype.collectOrdinalMeta=function(t,n){var i=this._chunks[t],r=this._dimensions[t],e=this._rawExtent,o=r.ordinalOffset||0,a=i.length;0===o&&(e[t]=[1/0,-1/0]);for(var u=e[t],s=o;s<a;s++){var f=i[s]=n.parseAndCollect(i[s]);isNaN(f)||(u[0]=Math.min(f,u[0]),u[1]=Math.max(f,u[1]))}r.ordinalMeta=n,r.ordinalOffset=a,r.type="ordinal"},t.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},t.prototype.getDimensionProperty=function(t){var n=this._dimensions[t];return n&&n.property},t.prototype.appendData=function(t){var n=this._provider,i=this.count();n.appendData(t);var r=n.count();return n.persistent||(r+=i),i<r&&this._initDataFromProvider(i,r,!0),[i,r]},t.prototype.appendValues=function(t,n){for(var i=this._chunks,r=this._dimensions,e=r.length,o=this._rawExtent,a=this.count(),u=a+Math.max(t.length,n||0),s=0;s<e;s++)cd(i,s,r[s].type,u,!0);for(var f=[],h=a;h<u;h++)for(var l=h-a,c=0;c<e;c++){var v=od.arrayRows.call(this,t[l]||f,r[c].property,l,c);i[c][h]=v;var d=o[c];v<d[0]&&(d[0]=v),v>d[1]&&(d[1]=v)}return this._rawCount=this._count=u,{start:a,end:u}},t.prototype._initDataFromProvider=function(t,n,i){for(var r=this._provider,e=this._chunks,o=this._dimensions,a=o.length,u=this._rawExtent,s=R(o,(function(t){return t.property})),f=0;f<a;f++){var h=o[f];u[f]||(u[f]=[1/0,-1/0]),cd(e,f,h.type,n,i)}if(r.fillStorage)r.fillStorage(t,n,e,u);else for(var l=[],c=t;c<n;c++){l=r.getItem(c,l);for(var v=0;v<a;v++){var d=e[v],m=this._dimValueGetter(l,s[v],c,v);d[c]=m;var p=u[v];m<p[0]&&(p[0]=m),m>p[1]&&(p[1]=m)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=n,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,n){if(!(n>=0&&n<this._count))return NaN;var i=this._chunks[t];return i?i[this.getRawIndex(n)]:NaN},t.prototype.getValues=function(t,n){var i=[],r=[];if(null==n){n=t,t=[];for(var e=0;e<this._dimensions.length;e++)r.push(e)}else r=t;e=0;for(var o=r.length;e<o;e++)i.push(this.get(r[e],n));return i},t.prototype.getByRawIndex=function(t,n){if(!(n>=0&&n<this._rawCount))return NaN;var i=this._chunks[t];return i?i[n]:NaN},t.prototype.getSum=function(t){var n=0;if(this._chunks[t])for(var i=0,r=this.count();i<r;i++){var e=this.get(t,i);isNaN(e)||(n+=e)}return n},t.prototype.getMedian=function(t){var n=[];this.each([t],(function(t){isNaN(t)||n.push(t)})),Le(n);var i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},t.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var n=this._indices,i=n[t];if(null!=i&&i<this._count&&i===t)return t;for(var r=0,e=this._count-1;r<=e;){var o=(r+e)/2|0;if(n[o]<t)r=o+1;else{if(!(n[o]>t))return o;e=o-1}}return-1},t.prototype.getIndices=function(){var t,n=this._indices;if(n){var i=this._count;if((e=n.constructor)===Array){t=new e(i);for(var r=0;r<i;r++)t[r]=n[r]}else t=new e(n.buffer,0,i)}else{var e;for(t=new(e=ld(this._rawCount))(this.count()),r=0;r<t.length;r++)t[r]=r}return t},t.prototype.filter=function(t,n){if(!this._count)return this;for(var i=this.clone(),r=i.count(),e=new(ld(i._rawCount))(r),o=[],a=t.length,u=0,s=t[0],f=i._chunks,h=0;h<r;h++){var l=void 0,c=i.getRawIndex(h);if(0===a)l=n(h);else if(1===a)l=n(f[s][c],h);else{for(var v=0;v<a;v++)o[v]=f[t[v]][c];o[v]=h,l=n.apply(null,o)}l&&(e[u++]=c)}return u<r&&(i._indices=e),i._count=u,i._extent=[],i._updateGetRawIdx(),i},t.prototype.selectRange=function(t){var n=this.clone(),i=n._count;if(!i)return this;var r=F(t),e=r.length;if(!e)return this;var o=n.count(),a=new(ld(n._rawCount))(o),u=0,s=r[0],f=t[s][0],h=t[s][1],l=n._chunks,c=!1;if(!n._indices){var v=0;if(1===e){for(var d=l[r[0]],m=0;m<i;m++)((S=d[m])>=f&&S<=h||isNaN(S))&&(a[u++]=v),v++;c=!0}else if(2===e){d=l[r[0]];var p=l[r[1]],y=t[r[1]][0],g=t[r[1]][1];for(m=0;m<i;m++){var b=p[m];((S=d[m])>=f&&S<=h||isNaN(S))&&(b>=y&&b<=g||isNaN(b))&&(a[u++]=v),v++}c=!0}}if(!c)if(1===e)for(m=0;m<o;m++){var w=n.getRawIndex(m);((S=l[r[0]][w])>=f&&S<=h||isNaN(S))&&(a[u++]=w)}else for(m=0;m<o;m++){for(var x=!0,M=(w=n.getRawIndex(m),0);M<e;M++){var S,k=r[M];((S=l[k][w])<t[k][0]||S>t[k][1])&&(x=!1)}x&&(a[u++]=n.getRawIndex(m))}return u<o&&(n._indices=a),n._count=u,n._extent=[],n._updateGetRawIdx(),n},t.prototype.map=function(t,n){var i=this.clone(t);return this._updateDims(i,t,n),i},t.prototype.modify=function(t,n){this._updateDims(this,t,n)},t.prototype._updateDims=function(t,n,i){for(var r=t._chunks,e=[],o=n.length,a=t.count(),u=[],s=t._rawExtent,f=0;f<n.length;f++)s[n[f]]=[1/0,-1/0];for(var h=0;h<a;h++){for(var l=t.getRawIndex(h),c=0;c<o;c++)u[c]=r[n[c]][l];u[o]=h;var v=i&&i.apply(null,u);if(null!=v)for("object"!=typeof v&&(e[0]=v,v=e),f=0;f<v.length;f++){var d=n[f],m=v[f],p=s[d],y=r[d];y&&(y[l]=m),m<p[0]&&(p[0]=m),m>p[1]&&(p[1]=m)}}},t.prototype.lttbDownSample=function(t,n){var i,r,e,o=this.clone([t],!0),a=o._chunks[t],u=this.count(),s=0,f=Math.floor(1/n),h=this.getRawIndex(0),l=new(ld(this._rawCount))(Math.min(2*(Math.ceil(u/f)+2),u));l[s++]=h;for(var c=1;c<u-1;c+=f){for(var v=Math.min(c+f,u-1),d=Math.min(c+2*f,u),m=(d+v)/2,p=0,y=v;y<d;y++){var g=a[T=this.getRawIndex(y)];isNaN(g)||(p+=g)}p/=d-v;var b=c,w=Math.min(c+f,u),x=c-1,M=a[h];i=-1,e=b;var S=-1,k=0;for(y=b;y<w;y++){var T;g=a[T=this.getRawIndex(y)],isNaN(g)?(k++,S<0&&(S=T)):(r=Math.abs((x-m)*(g-M)-(x-y)*(p-M)))>i&&(i=r,e=T)}k>0&&k<w-b&&(l[s++]=Math.min(S,e),e=Math.max(S,e)),l[s++]=e,h=e}return l[s++]=this.getRawIndex(u-1),o._count=s,o._indices=l,o.getRawIndex=this._getRawIdx,o},t.prototype.minmaxDownSample=function(t,n){for(var i=this.clone([t],!0),r=i._chunks,e=Math.floor(1/n),o=r[t],a=this.count(),u=new(ld(this._rawCount))(2*Math.ceil(a/e)),s=0,f=0;f<a;f+=e){var h=f,l=o[this.getRawIndex(h)],c=f,v=o[this.getRawIndex(c)],d=e;f+e>a&&(d=a-f);for(var m=0;m<d;m++){var p=o[this.getRawIndex(f+m)];p<l&&(l=p,h=f+m),p>v&&(v=p,c=f+m)}var y=this.getRawIndex(h),g=this.getRawIndex(c);h<c?(u[s++]=y,u[s++]=g):(u[s++]=g,u[s++]=y)}return i._count=s,i._indices=u,i._updateGetRawIdx(),i},t.prototype.downSample=function(t,n,i,r){for(var e=this.clone([t],!0),o=e._chunks,a=[],u=Math.floor(1/n),s=o[t],f=this.count(),h=e._rawExtent[t]=[1/0,-1/0],l=new(ld(this._rawCount))(Math.ceil(f/u)),c=0,v=0;v<f;v+=u){u>f-v&&(a.length=u=f-v);for(var d=0;d<u;d++){var m=this.getRawIndex(v+d);a[d]=s[m]}var p=i(a),y=this.getRawIndex(Math.min(v+r(a,p)||0,f-1));s[y]=p,p<h[0]&&(h[0]=p),p>h[1]&&(h[1]=p),l[c++]=y}return e._count=c,e._indices=l,e._updateGetRawIdx(),e},t.prototype.each=function(t,n){if(this._count)for(var i=t.length,r=this._chunks,e=0,o=this.count();e<o;e++){var a=this.getRawIndex(e);switch(i){case 0:n(e);break;case 1:n(r[t[0]][a],e);break;case 2:n(r[t[0]][a],r[t[1]][a],e);break;default:for(var u=0,s=[];u<i;u++)s[u]=r[t[u]][a];s[u]=e,n.apply(null,s)}}},t.prototype.getDataExtent=function(t,n){var i=this._chunks[t],r=[1/0,-1/0];if(!i)return r;var e=this.count();if(!this._indices&&!n)return this._rawExtent[t].slice();var o=this._extent,a=o[t]||(o[t]={}),u=function(t){var n="",i=-1/0,r=-1/0,e=1/0,o=1/0;return t&&(null!=t.g&&(n+="G"+t.g,i=t.g),null!=t.ge&&(n+="GE"+t.ge,r=t.ge),null!=t.l&&(n+="L"+t.l,e=t.l),null!=t.le&&(n+="LE"+t.le,o=t.le)),{key:n,g:i,ge:r,l:e,le:o}}(n),s=u.key,f=a[s];if(f)return f.slice();for(var h=r[0],l=r[1],c=0;c<e;c++){var v=i[this.getRawIndex(c)];n&&!$v(u,v)||(v<h&&(h=v),v>l&&(l=v))}return a[s]=[h,l]},t.prototype.getRawDataItem=function(t){var n=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(n);for(var i=[],r=this._chunks,e=0;e<r.length;e++)i.push(r[e][n]);return i},t.prototype.clone=function(n,i){var r,e,o=new t,a=this._chunks,u=n&&P(n,(function(t,n){return t[n]=!0,t}),{});if(u)for(var s=0;s<a.length;s++)o._chunks[s]=u[s]?(e=void 0,(e=(r=a[s]).constructor)===Array?r.slice():new e(r)):a[s];else o._chunks=a;return this._copyCommonProps(o),i||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},t.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=L(this._extent),t._rawExtent=L(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,n=void 0;if(t===Array){var i=this._indices.length;n=new t(i);for(var r=0;r<i;r++)n[r]=this._indices[r]}else n=new t(this._indices);return n}return null},t.prototype._getRawIdxIdentity=function(t){return t},t.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,n,i,r){return qv(t[r],this._dimensions[r])}od={arrayRows:t,objectRows:function(t,n,i,r){return qv(t[n],this._dimensions[r])},keyedColumns:t,original:function(t,n,i,r){var e=t&&(null==t.value?t:t.value);return qv(e instanceof Array?e[r]:e,this._dimensions[r])},typedArray:function(t,n,i,r){return t[r]}}}(),t}(),dd=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,n){this._sourceList=t,this._upstreamSignList=n,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,n,i=this._sourceHost,r=this._getUpstreamSourceManagers(),e=!!r.length;if(md(i)){var o=i,a=void 0,u=void 0,s=void 0;if(e){var f=r[0];f.prepareSource(),a=(s=f.getSource()).data,u=s.sourceFormat,n=[f._getVersionSign()]}else u=Z(a=o.get("data",!0))?Gu:Vu,n=[];var h=this._getSourceMetaRawOption()||{},l=s&&s.metaRawOption||{},c=tt(h.seriesLayoutBy,l.seriesLayoutBy)||null,v=tt(h.sourceHeader,l.sourceHeader),d=tt(h.dimensions,l.dimensions);t=c!==l.seriesLayoutBy||!!v!=!!l.sourceHeader||d?[kv(a,{seriesLayoutBy:c,sourceHeader:v,dimensions:d},u)]:[]}else{var m=i;if(e){var p=this._applyTransform(r);t=p.sourceList,n=p.upstreamSignList}else t=[kv(m.get("source",!0),this._getSourceMetaRawOption(),null)],n=[]}this._setLocalSource(t,n)},t.prototype._applyTransform=function(t){var n,i=this._sourceHost,r=i.get("transform",!0),e=i.get("fromTransformResult",!0);null!=e&&1!==t.length&&pd("");var o,a=[],u=[];return z(t,(function(t){t.prepareSource();var n=t.getSource(e||0);null==e||n||pd(""),a.push(n),u.push(t._getVersionSign())})),r?n=function(t,n){var i=Ze(t),r=i.length;r||Ye("");for(var e=0,o=r;e<o;e++)n=rd(i[e],n),e!==o-1&&(n.length=Math.max(n.length,1));return n}(r,a):null!=e&&(n=[(o=a[0],new Mv({data:o.data,sourceFormat:o.sourceFormat,seriesLayoutBy:o.seriesLayoutBy,dimensionsDefine:L(o.dimensionsDefine),startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount}))]),{sourceList:n,upstreamSignList:u}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),n=0;n<t.length;n++){var i=t[n];if(i._isDirty()||this._upstreamSignList[n]!==i._getVersionSign())return!0}},t.prototype.getSource=function(t){var n=this._sourceList[t=t||0];if(!n){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(t)}return n},t.prototype.getSharedDataStore=function(t){var n=t.makeStoreSchema();return this._innerGetDataStore(n.dimensions,t.source,n.hash)},t.prototype._innerGetDataStore=function(t,n,i){var r=this._storeList,e=r[0];e||(e=r[0]={});var o=e[i];if(!o){var a=this._getUpstreamSourceManagers()[0];md(this._sourceHost)&&a?o=a._innerGetDataStore(t,n,i):(o=new vd).initData(new Cv(n,t.length),t),e[i]=o}return o},t.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(md(t)){var n=Ec(t);return n?[n.getSourceManager()]:[]}return R(function(t){return t.get("transform",!0)||t.get("fromTransformResult",!0)?lo(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},ho).models:[]}(t),(function(t){return t.getSourceManager()}))},t.prototype._getSourceMetaRawOption=function(){var t,n,i,r=this._sourceHost;if(md(r))t=r.get("seriesLayoutBy",!0),n=r.get("sourceHeader",!0),i=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var e=r;t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:i}},t}();function md(t){return"series"===t.mainType}function pd(t){throw new Error(t)}function yd(t){var n=t.lineHeight;return null==n?"line-height:1":"line-height:"+Ht(n+"")+"px"}function gd(t,n){var i=t.color||Sc.color.tertiary,r=t.fontSize||12,e=t.fontWeight||"400",o=t.color||Sc.color.secondary,a=t.fontSize||14,u=t.fontWeight||"900";return"html"===n?{nameStyle:"font-size:"+Ht(r+"")+"px;color:"+Ht(i)+";font-weight:"+Ht(e+""),valueStyle:"font-size:"+Ht(a+"")+"px;color:"+Ht(o)+";font-weight:"+Ht(u+"")}:{nameStyle:{fontSize:r,fill:i,fontWeight:e},valueStyle:{fontSize:a,fill:o,fontWeight:u}}}var bd=[0,10,20,30],wd=["","\n","\n\n","\n\n\n"];function xd(t,n){return n.type=t,n}function Md(t){return"section"===t.type}function Sd(t){return Md(t)?Td:Ad}function kd(t){if(Md(t)){var n=0,i=t.blocks.length,r=i>1||i>0&&!t.noHeader;return z(t.blocks,(function(t){var i=kd(t);i>=n&&(n=i+ +(r&&(!i||Md(t)&&!t.noHeader)))})),n}return 0}function Td(t,n,i,r){var e,o=n.noHeader,a=(e=kd(n),{html:bd[e],richText:wd[e]}),u=[],s=n.blocks||[];et(!s||H(s)),s=s||[];var f=t.orderMode;if(n.sortBlocks&&f){s=s.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(mt(h,f)){var l=new Zv(h[f],null);s.sort((function(t,n){return l.evaluate(t.sortParam,n.sortParam)}))}else"seriesDesc"===f&&s.reverse()}z(s,(function(i,e){var o=n.valueFormatter,s=Sd(i)(o?I(I({},t),{valueFormatter:o}):t,i,e>0?a.html:0,r);null!=s&&u.push(s)}));var c="richText"===t.renderMode?u.join(a.richText):Ld(r,u.join(""),o?i:a.html);if(o)return c;var v=nc(n.header,"ordinal",t.useUTC),d=gd(r,t.renderMode).nameStyle,m=yd(r);return"richText"===t.renderMode?Cd(t,v,d)+a.richText+c:Ld(r,'<div style="'+d+";"+m+';">'+Ht(v)+"</div>"+c,i)}function Ad(t,n,i,r){var e=t.renderMode,o=n.noName,a=n.noValue,u=!n.markerType,s=n.name,f=t.useUTC,h=n.valueFormatter||t.valueFormatter||function(t){return R(t=H(t)?t:[t],(function(t,n){return nc(t,H(v)?v[n]:v,f)}))};if(!o||!a){var l=u?"":t.markupStyleCreator.makeTooltipMarker(n.markerType,n.markerColor||Sc.color.secondary,e),c=o?"":nc(s,"ordinal",f),v=n.valueType,d=a?[]:h(n.value,n.rawDataIndex),m=!u||!o,p=!u&&o,y=gd(r,e),g=y.nameStyle,b=y.valueStyle;return"richText"===e?(u?"":l)+(o?"":Cd(t,c,g))+(a?"":function(t,n,i,r,e){var o=[e];return i&&o.push({padding:[0,0,0,r?10:20],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(H(n)?n.join(" "):n,o)}(t,d,m,p,b)):Ld(r,(u?"":l)+(o?"":function(t,n,i){return'<span style="'+i+";"+(n?"margin-left:2px":"")+'">'+Ht(t)+"</span>"}(c,!u,g))+(a?"":function(t,n,i,r){return'<span style="'+(n?"float:right;margin-left:"+(i?"10px":"20px"):"")+";"+r+'">'+R(t=H(t)?t:[t],(function(t){return Ht(t)})).join(" ")+"</span>"}(d,m,p,b)),i)}}function Nd(t,n,i,r,e,o){if(t)return Sd(t)({useUTC:e,renderMode:i,orderMode:r,markupStyleCreator:n,valueFormatter:t.valueFormatter},t,0,o)}function Ld(t,n,i){return'<div style="margin: '+i+"px 0 0;"+yd(t)+';">'+n+'<div style="clear:both"></div></div>'}function Cd(t,n,i){return t.markupStyleCreator.wrapRichTextStyle(n,i)}function Id(t,n){var i=t.get("padding");return null!=i?i:"richText"===n?[8,10]:10}var Od=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Ve()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,n,i){var r="richText"===i?this._generateStyleName():null,e=function(t,n){var i=G(t)?{color:t,extraCssText:n}:t||{},r=i.color,e=i.type;n=i.extraCssText;var o=i.renderMode||"html";return r?"html"===o?"subItem"===e?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Ht(r)+";"+(n||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Ht(r)+";"+(n||"")+'"></span>':{renderMode:o,content:"{"+(i.markerId||"markerX")+"|} ",style:"subItem"===e?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}({color:n,type:t,renderMode:i,markerId:r});return G(e)?e:(this.richTextStyles[r]=e.style,e.content)},t.prototype.wrapRichTextStyle=function(t,n){var i={};H(n)?z(n,(function(t){return I(i,t)})):I(i,n);var r=this._generateStyleName();return this.richTextStyles[r]=i,"{"+r+"|"+t+"}"},t}();var Dd=ao();function _d(t,n){return t.getName(n)||t.getId(n)}var Ed=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._selectedDataIndicesMap={},n}var i;return o(n,t),n.prototype.init=function(t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=jv({count:Rd,reset:Pd}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),(Dd(this).sourceManager=new dd(this)).prepareSource();var r=this.getInitialData(t,i);Fd(r,this),this.dataTask.context.data=r,Dd(this).dataBeforeProcessed=r,zd(this),this._initSelectedMapFromData(r)},n.prototype.mergeDefaultAndTheme=function(t,n){var i=gc(this),r=i?wc(t):{},e=this.subType;Mc.hasClass(e)&&(e+="Series"),C(t,n.getTheme().get(this.subType)),C(t,this.getDefaultOption()),$e(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&bc(t,r,i)},n.prototype.mergeOption=function(t,n){t=C(this.option,t,!0),this.fillDataTextStyle(t.data);var i=gc(this);i&&bc(this.option,t,i);var r=Dd(this).sourceManager;r.dirty(),r.prepareSource();var e=this.getInitialData(t,n);Fd(e,this),this.dataTask.dirty(),this.dataTask.context.data=e,Dd(this).dataBeforeProcessed=e,zd(this),this._initSelectedMapFromData(e)},n.prototype.fillDataTextStyle=function(t){if(t&&!Z(t))for(var n=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&$e(t[i],"label",n)},n.prototype.getInitialData=function(){},n.prototype.appendData=function(t){this.getRawData().appendData(t.data)},n.prototype.getData=function(t){var n=Wd(this);if(n){var i=n.context.data;return null!=t&&i.getLinkedData?i.getLinkedData(t):i}return Dd(this).data},n.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},n.prototype.setData=function(t){var n=Wd(this);if(n){var i=n.context;i.outputData=t,n!==this.dataTask&&(i.data=t)}Dd(this).data=t},n.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return ct(t)},n.prototype.getSourceManager=function(){return Dd(this).sourceManager},n.prototype.getSource=function(){return this.getSourceManager().getSource()},n.prototype.getRawData=function(){return Dd(this).dataBeforeProcessed},n.prototype.getColorBy=function(){return this.get("colorBy")||"series"},n.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},n.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},n.prototype.indicesOfNearest=function(t,n,i,r){var e=this.getData(),o=this.coordinateSystem,a=o&&o.getAxis(t);if(!o||!a)return[];var u=a.dataToCoord(i);null==r&&(r=1/0);for(var s=[],f=1/0,h=-1,l=0,c=e.getDimensionIndex(n),v=e.getStore(),d=0,m=v.count();d<m;d++){var p=v.get(c,d),y=u-a.dataToCoord(p),g=Math.abs(y);g<=r&&((g<f||g===f&&y>=0&&h<0)&&(f=g,h=y,l=0),y===h&&(s[l++]=d))}return s.length=l,s},n.prototype.formatTooltip=function(t,n){return function(t){var n,i,r,e,o=t.series,a=t.dataIndex,u=t.multipleSeries,s=o.getData(),f=s.mapDimensionsAll("defaultedTooltip"),h=f.length,l=o.getRawValue(a),c=H(l),v=function(t,n){return oc(t.getData().getItemVisual(n,"style")[t.visualDrawType])}(o,a);if(h>1||c&&!h){var d=function(t,n,i,r,e){var o=n.getData(),a=P(t,(function(t,n,i){var r=o.getDimensionInfo(i);return t||r&&!1!==r.tooltip&&null!=r.displayName}),!1),u=[],s=[],f=[];function h(t,n){var i=o.getDimensionInfo(n);i&&!1!==i.otherDims.tooltip&&(a?f.push(xd("nameValue",{markerType:"subItem",markerColor:e,name:i.displayName,value:t,valueType:i.type})):(u.push(t),s.push(i.type)))}return r.length?z(r,(function(t){h(Wv(o,i,t),t)})):z(t,h),{inlineValues:u,inlineValueTypes:s,blocks:f}}(l,o,a,f,v);n=d.inlineValues,i=d.inlineValueTypes,r=d.blocks,e=d.inlineValues[0]}else if(h){var m=s.getDimensionInfo(f[0]);e=n=Wv(s,a,f[0]),i=m.type}else e=n=c?l[0]:l;var p=ro(o),y=p&&o.name||"",g=s.getName(a),b=u?y:g;return xd("section",{header:y,noHeader:u||!p,sortParam:e,blocks:[xd("nameValue",{markerType:"item",markerColor:v,name:b,noName:!ot(b),value:n,valueType:i,rawDataIndex:s.getRawIndex(a)})].concat(r||[])})}({series:this,dataIndex:t,multipleSeries:n})},n.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(u.node&&(!t||!t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},n.prototype.restoreData=function(){this.dataTask.dirty()},n.prototype.getColorFromPalette=function(t,n,i){var r=this.ecModel,e=Wc.prototype.getColorFromPalette.call(this,t,n,i);return e||(e=r.getColorFromPalette(t,n,i)),e},n.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},n.prototype.getProgressive=function(){return this.get("progressive")},n.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},n.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},n.prototype.unselect=function(t,n){var i=this.option.selectedMap;if(i){var r=this.option.selectedMode,e=this.getData(n);if("series"===r||"all"===i)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o<t.length;o++){var a=_d(e,t[o]);i[a]=!1,this._selectedDataIndicesMap[a]=-1}}},n.prototype.toggleSelect=function(t,n){for(var i=[],r=0;r<t.length;r++)i[0]=t[r],this.isSelected(t[r],n)?this.unselect(i,n):this.select(i,n)},n.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=F(t),i=[],r=0;r<n.length;r++){var e=t[n[r]];e>=0&&i.push(e)}return i},n.prototype.isSelected=function(t,n){var i=this.option.selectedMap;if(!i)return!1;var r=this.getData(n);return("all"===i||i[_d(r,t)])&&!r.getItemModel(t).get(["select","disabled"])},n.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},n.prototype._innerSelect=function(t,n){var i,r,e=this.option,o=e.selectedMode,a=n.length;if(o&&a)if("series"===o)e.selectedMap="all";else if("multiple"===o){X(e.selectedMap)||(e.selectedMap={});for(var u=e.selectedMap,s=0;s<a;s++){var f=n[s];u[l=_d(t,f)]=!0,this._selectedDataIndicesMap[l]=t.getRawIndex(f)}}else if("single"===o||!0===o){var h=n[a-1],l=_d(t,h);e.selectedMap=((i={})[l]=!0,i),this._selectedDataIndicesMap=((r={})[l]=t.getRawIndex(h),r)}},n.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each((function(i){var r=t.getRawDataItem(i);r&&r.selected&&n.push(i)})),n.length>0&&this._innerSelect(t,n)}},n.registerClass=function(t){return Mc.registerClass(t)},n.protoInitialize=((i=n.prototype).type="series.__base__",i.seriesIndex=0,i.ignoreStyleOnData=!1,i.hasSymbolVisual=!1,i.defaultSymbol="circle",i.visualStyleAccessPath="itemStyle",void(i.visualDrawType="fill")),n}(Mc);function zd(t){var n=t.name;ro(t)||(t.name=function(t){var n=t.getRawData(),i=n.mapDimensionsAll("seriesName"),r=[];return z(i,(function(t){var i=n.getDimensionInfo(t);i.displayName&&r.push(i.displayName)})),r.join(" ")}(t)||n)}function Rd(t){return t.model.getRawData().count()}function Pd(t){var n=t.model;return n.setData(n.getRawData().cloneShallow()),Bd}function Bd(t,n){n.outputData&&t.end>n.outputData.count()&&n.model.getRawData().cloneShallow(n.outputData)}function Fd(t,n){z(function(t,n){for(var i=new t.constructor(t.length+n.length),r=0;r<t.length;r++)i[r]=t[r];var e=t.length;for(r=0;r<n.length;r++)i[r+e]=n[r];return i}(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(i){t.wrapMethod(i,W(Vd,n))}))}function Vd(t,n){var i=Wd(t);return i&&i.setOutputEnd((n||this).count()),n}function Wd(t){var n=(t.ecModel||{}).scheduler,i=n&&n.getPipeline(t.uid);if(i){var r=i.currentTask;if(r){var e=r.agentStubMap;e&&(r=e.get(t.uid))}return r}}_(Ed,Uv),_(Ed,Wc),No(Ed,Mc);var Hd=function(){function t(){this.group=new fe,this.uid=vl("viewComponent")}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.dispose=function(){},t.prototype.updateView=function(){},t.prototype.updateLayout=function(){},t.prototype.updateVisual=function(){},t.prototype.toggleBlurSeries=function(){},t.prototype.eachRendered=function(t){var n=this.group;n&&n.traverse(t)},t}();function Ud(){var t=ao();return function(n){var i=t(n),r=n.pipelineContext,e=!!i.large,o=!!i.progressiveRender,a=i.large=!(!r||!r.large),u=i.progressiveRender=!(!r||!r.progressiveRender);return!(e===a&&o===u)&&"reset"}}Ao(Hd),Oo(Hd);var Gd=ao(),jd=Ud(),Yd=function(){function t(){this.group=new fe,this.uid=vl("viewChart"),this.renderTask=jv({plan:Zd,reset:$d}),this.renderTask.context={view:this}}return t.prototype.init=function(){},t.prototype.render=function(){},t.prototype.highlight=function(t,n,i,r){var e=t.getData(r&&r.dataType);e&&qd(e,r,"emphasis")},t.prototype.downplay=function(t,n,i,r){var e=t.getData(r&&r.dataType);e&&qd(e,r,"normal")},t.prototype.remove=function(){this.group.removeAll()},t.prototype.dispose=function(){},t.prototype.updateView=function(t,n,i,r){this.render(t,n,i,r)},t.prototype.updateVisual=function(t,n,i,r){this.render(t,n,i,r)},t.prototype.eachRendered=function(t){Oh(this.group,t)},t.markUpdateMethod=function(t,n){Gd(t).updateMethod=n},t.protoInitialize=void(t.prototype.type="chart"),t}();function Xd(t,n,i){t&&Ws(t)&&("emphasis"===n?Ss:ks)(t,i)}function qd(t,n,i){var r=oo(t,n),e=n&&null!=n.highlightKey?function(t){var n=Ku[t];return null==n&&$u<=32&&(n=Ku[t]=$u++),n}(n.highlightKey):null;null!=r?z(Ze(r),(function(n){Xd(t.getItemGraphicEl(n),i,e)})):t.eachItemGraphicEl((function(t){Xd(t,i,e)}))}function Zd(t){return jd(t.model)}function $d(t){var n=t.model,i=t.ecModel,r=t.api,e=t.payload,o=n.pipelineContext.progressiveRender,a=t.view,u=e&&Gd(e).updateMethod,s=o?"incrementalPrepareRender":u&&a[u]?u:"render";return"render"!==s&&a[s](n,i,r,e),Kd[s]}Ao(Yd),Oo(Yd);var Kd={incrementalPrepareRender:{progress:function(t,n){n.view.incrementalRender(t,n.model,n.ecModel,n.api,n.payload)}},render:{forceFirstProgress:!0,progress:function(t,n){n.view.render(n.model,n.ecModel,n.api,n.payload)}}},Jd="\0__throttleOriginMethod",Qd="\0__throttleRate",tm="\0__throttleType";function nm(t,n,i){var r,e,o,a,u,s=0,f=0,h=null;function l(){f=(new Date).getTime(),h=null,t.apply(o,a||[])}n=n||0;var c=function(){for(var t=[],c=0;c<arguments.length;c++)t[c]=arguments[c];r=(new Date).getTime(),o=this,a=t;var v=u||n,d=u||i;u=null,e=r-(d?s:f)-v,clearTimeout(h),d?h=setTimeout(l,v):e>=0?l():h=setTimeout(l,-e),s=r};return c.clear=function(){h&&(clearTimeout(h),h=null)},c.debounceNextCall=function(t){u=t},c}function im(t,n,i,r){var e=t[n];if(e){var o=e[Jd]||e;if(e[Qd]!==i||e[tm]!==r){if(null==i||!r)return t[n]=o;(e=t[n]=nm(o,i,"debounce"===r))[Jd]=o,e[tm]=r,e[Qd]=i}return e}}function rm(t,n){var i=t[n];i&&i[Jd]&&(i.clear&&i.clear(),t[n]=i[Jd])}var em=ao(),om={itemStyle:Do(sl,!0),lineStyle:Do(ol,!0)},am={lineStyle:"stroke",itemStyle:"fill"};function um(t,n){return t.visualStyleMapper||om[n]||(console.warn("Unknown style type '"+n+"'."),om.itemStyle)}function sm(t,n){return t.visualDrawType||am[n]||(console.warn("Unknown style type '"+n+"'."),"fill")}var fm={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){var i=t.getData(),r=t.visualStyleAccessPath||"itemStyle",e=t.getModel(r),o=um(t,r)(e),a=e.getShallow("decal");a&&(i.setVisual("decal",a),a.dirty=!0);var u=sm(t,r),s=o[u],f=U(s)?s:null;if(!o[u]||f||"auto"===o.fill||"auto"===o.stroke){var h=t.getColorFromPalette(t.name,null,n.getSeriesCount());o[u]||(o[u]=h,i.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||U(o.fill)?h:o.fill,o.stroke="auto"===o.stroke||U(o.stroke)?h:o.stroke}if(i.setVisual("style",o),i.setVisual("drawType",u),!n.isSeriesFiltered(t)&&f)return i.setVisual("colorFromPalette",!1),{dataEach:function(n,i){var r=t.getDataParams(i),e=I({},o);e[u]=f(r),n.setItemVisual(i,"style",e)}}}},hm=new ll,lm={createOnAllSeries:!0,reset:function(t){if(!t.ignoreStyleOnData){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=um(t,i),e=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,n){var o=t.getRawDataItem(n);if(o&&o[i]){hm.option=o[i];var a=r(hm);I(t.ensureUniqueItemVisual(n,"style"),a),hm.option.decal&&(t.setItemVisual(n,"decal",hm.option.decal),hm.option.decal.dirty=!0),e in a&&t.setItemVisual(n,"colorFromPalette",!1)}}:null}}}},cm={performRawSeries:!0,overallReset:function(t){var n=ct();t.eachSeries((function(t){if(!t.isColorBySeries()){var i=t.type+"-"+t.getColorBy();em(t).scope=n.get(i)||n.set(i,{})}})),t.eachSeries((function(t){if(!t.isColorBySeries()){var n=t.getRawData(),i={},r=t.getData(),e=em(t).scope,o=sm(t,t.visualStyleAccessPath||"itemStyle");r.each((function(t){var n=r.getRawIndex(t);i[n]=t})),n.each((function(a){var u=i[a];if(r.getItemVisual(u,"colorFromPalette")){var s=r.ensureUniqueItemVisual(u,"style"),f=n.getName(a)||a+"",h=n.count();s[o]=t.getColorFromPalette(f,e,h)}}))}}))}},vm=Math.PI,dm=function(){function t(t,n,i,r){this._stageTaskMap=ct(),this.ecInstance=t,this.api=n,i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=i.concat(r)}return t.prototype.restoreData=function(t,n){t.restoreData(n),this._stageTaskMap.each((function(t){var n=t.overallTask;n&&n.dirty()}))},t.prototype.getPerformArgs=function(t,n){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),r=i.context,e=!n&&i.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,o=r&&r.modDataCount;return{step:e,modBy:null!=o?Math.ceil(o/e):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,n){var i=this._pipelineMap.get(t.uid),r=t.__preparePipelineContext?t.__preparePipelineContext(n,i):function(t,n,i){var r=t.getData().count();return{progressiveRender:i.progressiveEnabled&&n.incrementalPrepareRender&&r>=i.threshold,large:t.get("large")&&r>=t.get("largeThreshold"),modDataCount:"mod"===t.get("progressiveChunkMode")?t.getData().count():null}}(t,n,i);t.pipelineContext=i.context=r},t.prototype.restorePipelines=function(t,n){var i=this,r=i._pipelineMap=ct();n.eachSeries((function(n){var e="canvas"===t.painter.type&&n.getProgressive(),o=n.uid;r.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:e&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(n,n.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,n=this.api.getModel(),i=this.api;z(this._allHandlers,(function(r){var e=t.get(r.uid)||t.set(r.uid,{});et(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,e,n,i),r.overallReset&&this._createOverallStageTask(r,e,n,i)}),this)},t.prototype.prepareView=function(t,n,i,r){var e=t.renderTask,o=e.context;o.model=n,o.ecModel=i,o.api=r,e.__block=!t.incrementalPrepareRender,this._pipe(n,e)},t.prototype.performDataProcessorTasks=function(t,n){this._performStageTasks(this._dataProcessorHandlers,t,n,{block:!0})},t.prototype.performVisualTasks=function(t,n,i){this._performStageTasks(this._visualHandlers,t,n,i)},t.prototype._performStageTasks=function(t,n,i,r){r=r||{};var e=!1,o=this;function a(t,n){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(n.__pipeline.id))}z(t,(function(t){if(!r.visualType||r.visualType===t.visualType){var u=o._stageTaskMap.get(t.uid),s=u.seriesTaskMap,f=u.overallTask;if(f){var h,l=f.agentStubMap;l.each((function(t){a(r,t)&&(t.dirty(),h=!0)})),h&&f.dirty(),o.updatePayload(f,i);var c=o.getPerformArgs(f,r.block);l.each((function(t){t.perform(c)})),f.perform(c)&&(e=!0)}else s&&s.each((function(u){a(r,u)&&u.dirty();var s=o.getPerformArgs(u,r.block);s.skip=!t.performRawSeries&&n.isSeriesFiltered(u.context.model),o.updatePayload(u,i),u.perform(s)&&(e=!0)}))}})),this.unfinished=e||this.unfinished},t.prototype.performSeriesTasks=function(t){var n;t.eachSeries((function(t){n=t.dataTask.perform()||n})),this.unfinished=n||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var n=t.tail;do{if(n.__block){t.blockIndex=n.__idxInPipeline;break}n=n.getUpstream()}while(n)}))},t.prototype.updatePayload=function(t,n){"remain"!==n&&(t.context.payload=n)},t.prototype._createSeriesStageTask=function(t,n,i,r){var e=this,o=n.seriesTaskMap,a=n.seriesTaskMap=ct(),u=t.seriesType,s=t.getTargetSeries;function f(n){var u=n.uid,s=a.set(u,o&&o.get(u)||jv({plan:bm,reset:wm,count:Sm}));s.context={model:n,ecModel:i,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},e._pipe(n,s)}t.createOnAllSeries?i.eachRawSeries(f):u?i.eachRawSeriesByType(u,f):s&&s(i,r).each(f)},t.prototype._createOverallStageTask=function(t,n,i,r){var e=this,o=n.overallTask=n.overallTask||jv({reset:mm});o.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:e};var a=o.agentStubMap,u=o.agentStubMap=ct(),s=t.seriesType,f=t.getTargetSeries,h=t.dirtyOnOverallProgress,l=!1;function c(t){var n=t.uid,i=u.set(n,a&&a.get(n)||(l=!0,jv({reset:pm,onDirty:gm})));i.context={model:t,dirtyOnOverallProgress:h},i.agent=o,i.__block=h,e._pipe(t,i)}et(!t.createOnAllSeries,""),s?i.eachRawSeriesByType(s,c):f?f(i,r).each(c):z(i.getSeries(),c),l&&o.dirty()},t.prototype._pipe=function(t,n){var i=this._pipelineMap.get(t.uid);!i.head&&(i.head=n),i.tail&&i.tail.pipe(n),i.tail=n,n.__idxInPipeline=i.count++,n.__pipeline=i},t.wrapStageHandler=function(t,n){return U(t)&&(t={overallReset:t,seriesType:km(t)}),t.uid=vl("stageHandler"),n&&(t.visualType=n),t},t}();function mm(t){t.overallReset(t.ecModel,t.api,t.payload)}function pm(t){return t.dirtyOnOverallProgress&&ym}function ym(){this.agent.dirty(),this.getDownstream().dirty()}function gm(){this.agent&&this.agent.dirty()}function bm(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function wm(t){t.useClearVisual&&t.data.clearAllVisual();var n=t.resetDefines=Ze(t.reset(t.model,t.ecModel,t.api,t.payload));return n.length>1?R(n,(function(t,n){return Mm(n)})):xm}var xm=Mm(0);function Mm(t){return function(n,i){var r=i.data,e=i.resetDefines[t];if(e&&e.dataEach)for(var o=n.start;o<n.end;o++)e.dataEach(r,o);else e&&e.progress&&e.progress(n,r)}}function Sm(t){return t.data.count()}function km(t){Tm=null;try{t(Am,Nm)}catch(t){}return Tm}var Tm,Am={},Nm={};function Lm(t,n){for(var i in n.prototype)t[i]=pt}Lm(Am,Uc),Lm(Nm,Zu),Am.eachSeriesByType=Am.eachRawSeriesByType=function(t){Tm=t},Am.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Tm=t.subType)};var Cm,Im=Sc.darkColor,Om=Im.background,Dm=function(){return{axisLine:{lineStyle:{color:Im.axisLine}},splitLine:{lineStyle:{color:Im.axisSplitLine}},splitArea:{areaStyle:{color:[Im.backgroundTint,Im.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:Im.axisMinorSplitLine}},axisLabel:{color:Im.axisLabel},axisName:{}}},_m={label:{color:Im.secondary},itemStyle:{borderColor:Im.borderTint},dividerLineStyle:{color:Im.border}},Em={darkMode:!0,color:Im.theme,backgroundColor:Om,axisPointer:{lineStyle:{color:Im.border},crossStyle:{color:Im.borderShade},label:{color:Im.tertiary}},legend:{textStyle:{color:Im.secondary},pageTextStyle:{color:Im.tertiary}},textStyle:{color:Im.secondary},title:{textStyle:{color:Im.primary},subtextStyle:{color:Im.quaternary}},toolbox:{iconStyle:{borderColor:Im.accent50},feature:{dataView:{backgroundColor:Om,textColor:Im.primary,textareaColor:Im.background,textareaBorderColor:Im.border,buttonColor:Im.accent50,buttonTextColor:Im.neutral00}}},tooltip:{backgroundColor:Im.neutral20,defaultBorderColor:Im.border,textStyle:{color:Im.tertiary}},dataZoom:{borderColor:Im.accent10,textStyle:{color:Im.tertiary},brushStyle:{color:Im.backgroundTint},handleStyle:{color:Im.neutral00,borderColor:Im.accent20},moveHandleStyle:{color:Im.accent40},emphasis:{handleStyle:{borderColor:Im.accent50}},dataBackground:{lineStyle:{color:Im.accent30},areaStyle:{color:Im.accent20}},selectedDataBackground:{lineStyle:{color:Im.accent50},areaStyle:{color:Im.accent30}}},visualMap:{textStyle:{color:Im.secondary},handleStyle:{borderColor:Im.neutral30}},timeline:{lineStyle:{color:Im.accent10},label:{color:Im.tertiary},controlStyle:{color:Im.accent30,borderColor:Im.accent30}},calendar:{itemStyle:{color:Im.neutral00,borderColor:Im.neutral20},dayLabel:{color:Im.tertiary},monthLabel:{color:Im.secondary},yearLabel:{color:Im.secondary}},matrix:{x:_m,y:_m,backgroundColor:{borderColor:Im.axisLine},body:{itemStyle:{borderColor:Im.borderTint}}},timeAxis:Dm(),logAxis:Dm(),valueAxis:Dm(),categoryAxis:Dm(),line:{symbol:"circle"},graph:{color:Im.theme},gauge:{title:{color:Im.secondary},axisLine:{lineStyle:{color:[[1,Im.neutral05]]}},axisLabel:{color:Im.axisLabel},detail:{color:Im.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:Im.background}},radar:(Cm=Dm(),Cm.axisName={color:Im.axisLabel},Cm.axisLine.lineStyle.color=Im.neutral20,Cm),treemap:{breadcrumb:{itemStyle:{color:Im.neutral20,textStyle:{color:Im.secondary}},emphasis:{itemStyle:{color:Im.neutral30}}}},sunburst:{itemStyle:{borderColor:Im.background}},map:{itemStyle:{borderColor:Im.border,areaColor:Im.neutral10},label:{color:Im.tertiary},emphasis:{label:{color:Im.primary},itemStyle:{areaColor:Im.highlight}},select:{label:{color:Im.primary},itemStyle:{areaColor:Im.highlight}}},geo:{itemStyle:{borderColor:Im.border,areaColor:Im.neutral10},emphasis:{label:{color:Im.primary},itemStyle:{areaColor:Im.highlight}},select:{label:{color:Im.primary},itemStyle:{color:Im.highlight}}}};Em.categoryAxis.splitLine.show=!1;var zm=function(){function t(){}return t.prototype.normalizeQuery=function(t){var n={},i={},r={};if(G(t)){var e=To(t);n.mainType=e.main||null,n.subType=e.sub||null}else{var o=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};z(t,(function(t,e){for(var u=!1,s=0;s<o.length;s++){var f=o[s],h=e.lastIndexOf(f);if(h>0&&h===e.length-f.length){var l=e.slice(0,h);"data"!==l&&(n.mainType=l,n[f.toLowerCase()]=t,u=!0)}}a.hasOwnProperty(e)&&(i[e]=t,u=!0),u||(r[e]=t)}))}return{cptQuery:n,dataQuery:i,otherQuery:r}},t.prototype.filter=function(t,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,e=i.packedEvent,o=i.model,a=i.view;if(!o||!a)return!0;var u=n.cptQuery,s=n.dataQuery;return f(u,o,"mainType")&&f(u,o,"subType")&&f(u,o,"index","componentIndex")&&f(u,o,"name")&&f(u,o,"id")&&f(s,e,"name")&&f(s,e,"dataIndex")&&f(s,e,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,n.otherQuery,r,e));function f(t,n,i,r){return null==t[i]||n[r||i]===t[i]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Rm=["symbol","symbolSize","symbolRotate","symbolOffset"],Pm=Rm.concat(["symbolKeepAspect"]),Bm={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){var i=t.getData();if(t.legendIcon&&i.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var r={},e={},o=!1,a=0;a<Rm.length;a++){var u=Rm[a],s=t.get(u);U(s)?(o=!0,e[u]=s):r[u]=s}if(r.symbol=r.symbol||t.defaultSymbol,i.setVisual(I({legendIcon:t.legendIcon||r.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},r)),!n.isSeriesFiltered(t)){var f=F(e);return{dataEach:o?function(n,i){for(var r=t.getRawValue(i),o=t.getDataParams(i),a=0;a<f.length;a++){var u=f[a];n.setItemVisual(i,u,e[u](r,o))}}:null}}}}},Fm={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,n){if(t.hasSymbolVisual&&!n.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,n){for(var i=t.getItemModel(n),r=0;r<Pm.length;r++){var e=Pm[r],o=i.getShallow(e,!0);null!=o&&t.setItemVisual(n,e,o)}}:null}}};function Vm(t,n,i,r,e){var o=t+n;i.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var n=t.seriesIndex,r=t.option.selectedMap,a=e.selected,u=0;u<a.length;u++)if(a[u].seriesIndex===n){var s=t.getData(),f=oo(s,e.fromActionPayload);i.trigger(o,{type:o,seriesId:t.id,name:H(f)?s.getName(f[0]):s.getName(f),selected:G(r)?r:I({},r)})}}))}function Wm(t,n,i){for(var r;t&&(!n(t)||(r=t,!i));)t=t.__hostTarget||t.parent;return r}var Hm=new Dt,Um={},Gm=ao();function jm(t){return Gm(t).fullUpdate}var Ym=Math.round(9*Math.random()),Xm="function"==typeof Object.defineProperty,qm=function(){function t(){this._id="__ec_inner_"+Ym++}return t.prototype.get=function(t){return this._guard(t)[this._id]},t.prototype.set=function(t,n){var i=this._guard(t);return Xm?Object.defineProperty(i,this._id,{value:n,enumerable:!1,configurable:!0}):i[this._id]=n,this},t.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},t.prototype.has=function(t){return!!this._guard(t)[this._id]},t.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},t}(),Zm=fu.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,n){var i=n.cx,r=n.cy,e=n.width/2,o=n.height/2;t.moveTo(i,r-o),t.lineTo(i+e,r+o),t.lineTo(i-e,r+o),t.closePath()}}),$m=fu.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,n){var i=n.cx,r=n.cy,e=n.width/2,o=n.height/2;t.moveTo(i,r-o),t.lineTo(i+e,r),t.lineTo(i,r+o),t.lineTo(i-e,r),t.closePath()}}),Km=fu.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,n){var i=n.x,r=n.y,e=n.width/5*3,o=Math.max(e,n.height),a=e/2,u=a*a/(o-a),s=r-o+a+u,f=Math.asin(u/a),h=Math.cos(f)*a,l=Math.sin(f),c=Math.cos(f),v=.6*a,d=.7*a;t.moveTo(i-h,s+u),t.arc(i,s,a,Math.PI-f,2*Math.PI+f),t.bezierCurveTo(i+h-l*v,s+u+c*v,i,r-d,i,r),t.bezierCurveTo(i,r-d,i-h+l*v,s+u+c*v,i-h,s+u),t.closePath()}}),Jm=fu.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,n){var i=n.height,r=n.x,e=n.y,o=n.width/3*2;t.moveTo(r,e),t.lineTo(r+o,e+i),t.lineTo(r,e+i/4*3),t.lineTo(r-o,e+i),t.lineTo(r,e),t.closePath()}}),Qm={line:function(t,n,i,r,e){e.x1=t,e.y1=n+r/2,e.x2=t+i,e.y2=n+r/2},rect:function(t,n,i,r,e){e.x=t,e.y=n,e.width=i,e.height=r},roundRect:function(t,n,i,r,e){e.x=t,e.y=n,e.width=i,e.height=r,e.r=Math.min(i,r)/4},square:function(t,n,i,r,e){var o=Math.min(i,r);e.x=t,e.y=n,e.width=o,e.height=o},circle:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.r=Math.min(i,r)/2},diamond:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.width=i,e.height=r},pin:function(t,n,i,r,e){e.x=t+i/2,e.y=n+r/2,e.width=i,e.height=r},arrow:function(t,n,i,r,e){e.x=t+i/2,e.y=n+r/2,e.width=i,e.height=r},triangle:function(t,n,i,r,e){e.cx=t+i/2,e.cy=n+r/2,e.width=i,e.height=r}},tp={};z({line:zf,rect:xu,roundRect:xu,square:xu,circle:ff,diamond:$m,pin:Km,arrow:Jm,triangle:Zm},(function(t,n){tp[n]=new t}));var np=fu.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,n,i){var r=qr(t,n,i),e=this.shape;return e&&"pin"===e.symbolType&&"inside"===n.position&&(r.y=i.y+.4*i.height),r},buildPath:function(t,n,i){var r=n.symbolType;if("none"!==r){var e=tp[r];e||(e=tp[r="rect"]),Qm[r](n.x,n.y,n.width,n.height,e.shape),e.buildPath(t,e.shape,i)}}});function ip(t,n){if("image"!==this.type){var i=this.style;this.__isEmptyBrush?(i.stroke=t,i.fill=n||Sc.color.neutral00,i.lineWidth=2):"line"===this.shape.symbolType?i.stroke=t:i.fill=t,this.markRedraw()}}function rp(t,n,i,r,e,o,a){var u,s=0===t.indexOf("empty");return s&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(u=0===t.indexOf("image://")?mh(t.slice(8),new xn(n,i,r,e),a?"center":"cover"):0===t.indexOf("path://")?dh(t.slice(7),{},new xn(n,i,r,e),a?"center":"cover"):new np({shape:{symbolType:t,x:n,y:i,width:r,height:e}})).__isEmptyBrush=s,u.setColor=ip,o&&u.setColor(o),u}function ep(t,n){if(null!=t)return H(t)||(t=[t,t]),[Te(t[0],n[0])||0,Te(tt(t[1],t[0]),n[1])||0]}function op(t){return isFinite(t)}function ap(t,n,i){for(var r="radial"===n.type?function(t,n,i){var r=i.width,e=i.height,o=Math.min(r,e),a=null==n.x?.5:n.x,u=null==n.y?.5:n.y,s=null==n.r?.5:n.r;return n.global||(a=a*r+i.x,u=u*e+i.y,s*=o),a=op(a)?a:.5,u=op(u)?u:.5,s=s>=0&&op(s)?s:.5,t.createRadialGradient(a,u,0,a,u,s)}(t,n,i):function(t,n,i){var r=null==n.x?0:n.x,e=null==n.x2?1:n.x2,o=null==n.y?0:n.y,a=null==n.y2?0:n.y2;return n.global||(r=r*i.width+i.x,e=e*i.width+i.x,o=o*i.height+i.y,a=a*i.height+i.y),r=op(r)?r:0,e=op(e)?e:1,o=op(o)?o:0,a=op(a)?a:0,t.createLinearGradient(r,o,e,a)}(t,n,i),e=n.colorStops,o=0;o<e.length;o++)r.addColorStop(e[o].offset,e[o].color);return r}function up(t){return parseInt(t,10)}function sp(t,n,i){var r=["width","height"][n],e=["clientWidth","clientHeight"][n],o=["paddingLeft","paddingTop"][n],a=["paddingRight","paddingBottom"][n];if(null!=i[r]&&"auto"!==i[r])return parseFloat(i[r]);var u=document.defaultView.getComputedStyle(t);return(t[e]||up(u[r])||up(t.style[r]))-(up(u[o])||0)-(up(u[a])||0)||0}function fp(t){var n,i,r=t.style,e=r.lineDash&&r.lineWidth>0&&(i=r.lineWidth,(n=r.lineDash)&&"solid"!==n&&i>0?"dashed"===n?[4*i,2*i]:"dotted"===n?[i]:Y(n)?[n]:H(n)?n:null:null),o=r.lineDashOffset;if(e){var a=r.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(e=R(e,(function(t){return t/a})),o/=a)}return[e,o]}var hp=new Ua(!0);function lp(t){var n=t.stroke;return!(null==n||"none"===n||!(t.lineWidth>0))}function cp(t){return"string"==typeof t&&"none"!==t}function vp(t){var n=t.fill;return null!=n&&"none"!==n}function dp(t,n){if(null!=n.fillOpacity&&1!==n.fillOpacity){var i=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=i}else t.fill()}function mp(t,n){if(null!=n.strokeOpacity&&1!==n.strokeOpacity){var i=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=i}else t.stroke()}function pp(t,n,i){var r=Po(n.image,n.__image,i);if(Fo(r)){var e=t.createPattern(r,n.repeat||"repeat");if("function"==typeof DOMMatrix&&e&&e.setTransform){var o=new DOMMatrix;o.translateSelf(n.x||0,n.y||0),o.rotateSelf(0,0,(n.rotation||0)*yt),o.scaleSelf(n.scaleX||1,n.scaleY||1),e.setTransform(o)}return e}}var yp=["shadowBlur","shadowOffsetX","shadowOffsetY"],gp=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function bp(t,n,i,r,e){var o=!1;if(!r&&n===(i=i||{}))return!1;if(r||n.opacity!==i.opacity){Mp(t,e),o=!0;var a=Math.max(Math.min(n.opacity,1),0);t.globalAlpha=isNaN(a)?oa.opacity:a}(r||n.blend!==i.blend)&&(o||(Mp(t,e),o=!0),t.globalCompositeOperation=n.blend||oa.blend);for(var u=0;u<yp.length;u++){var s=yp[u];(r||n[s]!==i[s])&&(o||(Mp(t,e),o=!0),t[s]=t.dpr*(n[s]||0))}return(r||n.shadowColor!==i.shadowColor)&&(o||(Mp(t,e),o=!0),t.shadowColor=n.shadowColor||oa.shadowColor),o}function wp(t,n,i,r,e){var o=n.style,a=r?null:i&&i.style||{};if(o===a)return!1;var u=bp(t,o,a,r,e);if((r||o.fill!==a.fill)&&(u||(Mp(t,e),u=!0),cp(o.fill)&&(t.fillStyle=o.fill)),(r||o.stroke!==a.stroke)&&(u||(Mp(t,e),u=!0),cp(o.stroke)&&(t.strokeStyle=o.stroke)),(r||o.opacity!==a.opacity)&&(u||(Mp(t,e),u=!0),t.globalAlpha=null==o.opacity?1:o.opacity),n.hasStroke()){var s=o.lineWidth/(o.strokeNoScale&&n.getLineScale?n.getLineScale():1);t.lineWidth!==s&&(u||(Mp(t,e),u=!0),t.lineWidth=s)}for(var f=0;f<gp.length;f++){var h=gp[f],l=h[0];(r||o[l]!==a[l])&&(u||(Mp(t,e),u=!0),t[l]=o[l]||h[1])}return u}function xp(t,n){var i=n.transform,r=t.dpr||1;i?t.setTransform(r*i[0],r*i[1],r*i[2],r*i[3],r*i[4],r*i[5]):t.setTransform(r,0,0,r,0,0)}function Mp(t,n){n.batchFill&&(n.batchFill=!1,t.fill()),n.batchStroke&&(n.batchStroke=!1,t.stroke())}function Sp(t,n){var i={viewWidth:0,viewHeight:0,beforeBrushParam:{}};kp(t,n,i),Tp(t,i)}function kp(t,n,i){var r=n.transform;if(!n.shouldBePainted(i.viewWidth,i.viewHeight,!1,!1))return n.__dirty&=-2,void(n.__isRendered=!1);var e=n.__clipPaths,o=i.prevElClipPaths,a=n.style,u=!1,s=!1;if(o&&!function(t,n){if(t===n||!t&&!n)return!1;if(!t||!n||t.length!==n.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==n[i])return!0;return!1}(e,o)||(o&&(Mp(t,i),t.restore(),s=u=!0,i.prevElClipPaths=null,i.allClipped=!1,i.prevEl=null),e&&e.length&&(Mp(t,i),t.save(),function(t,n,i){for(var r=!1,e=0;e<t.length;e++){var o=t[e];r=r||o.isZeroArea(),xp(n,o),n.beginPath(),o.buildPath(n,o.shape),n.clip()}i.allClipped=r}(e,t,i),u=!0,i.prevElClipPaths=e)),i.allClipped)return n.__dirty&=-2,void(n.__isRendered=!1);n.beforeBrush&&n.beforeBrush(i.beforeBrushParam),n.innerBeforeBrush();var f=i.prevEl;f||(s=u=!0);var l,c,v=n instanceof fu&&n.autoBatch&&function(t){var n=vp(t),i=lp(t);return!(t.lineDash||!(+n^+i)||n&&"string"!=typeof t.fill||i&&"string"!=typeof t.stroke||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}(a);u||(c=f.transform,(l=r)&&c?l[0]!==c[0]||l[1]!==c[1]||l[2]!==c[2]||l[3]!==c[3]||l[4]!==c[4]||l[5]!==c[5]:l||c)?(Mp(t,i),xp(t,n)):v||Mp(t,i),n instanceof fu?(1!==i.lastDrawType&&(s=!0,i.lastDrawType=1),wp(t,n,f,s,i),v&&(i.batchFill||i.batchStroke)||t.beginPath(),function(t,n,i,r,e){var o,a=lp(i),u=vp(i),s=i.strokePercent,f=s<1,h=!n.path;n.silent&&!f||!h||n.createPathProxy();var l=n.path||hp,c=n.__dirty;if(!r){var v=i.fill,d=i.stroke,m=u&&!!v.colorStops,p=a&&!!d.colorStops,y=u&&!!v.image,g=a&&!!d.image,b=void 0,w=void 0,x=void 0,M=void 0,S=void 0;(m||p)&&(S=n.getBoundingRect()),m&&(b=c?ap(t,v,S):n.__canvasFillGradient,n.__canvasFillGradient=b),p&&(w=c?ap(t,d,S):n.__canvasStrokeGradient,n.__canvasStrokeGradient=w),y&&(x=c||!n.__canvasFillPattern?pp(t,v,n):n.__canvasFillPattern,n.__canvasFillPattern=x),g&&(M=c||!n.__canvasStrokePattern?pp(t,d,n):n.__canvasStrokePattern,n.__canvasStrokePattern=M),m?t.fillStyle=b:y&&(x?t.fillStyle=x:u=!1),p?t.strokeStyle=w:g&&(M?t.strokeStyle=M:a=!1)}var k,T,A=n.getGlobalScale();l.setScale(A[0],A[1],n.segmentIgnoreThreshold),t.setLineDash&&i.lineDash&&(k=(o=fp(n))[0],T=o[1]);var N=!0;(h||4&c)&&(l.setDPR(t.dpr),f?l.setContext(null):(l.setContext(t),N=!1),l.reset(),n.buildPath(l,n.shape,r),l.toStatic(),n.pathUpdated()),N&&l.rebuildPath(t,f?s:1),k&&(t.setLineDash(k),t.lineDashOffset=T),r?(e.batchFill=u,e.batchStroke=a):i.strokeFirst?(a&&mp(t,i),u&&dp(t,i)):(u&&dp(t,i),a&&mp(t,i)),k&&t.setLineDash([])}(t,n,a,v,i)):n instanceof lu?(3!==i.lastDrawType&&(s=!0,i.lastDrawType=3),wp(t,n,f,s,i),function(t,n,i){var r,e=i.text;if(null!=e&&(e+=""),e){t.font=i.font||h,t.textAlign=i.textAlign,t.textBaseline=i.textBaseline;var o=void 0,a=void 0;t.setLineDash&&i.lineDash&&(o=(r=fp(n))[0],a=r[1]),o&&(t.setLineDash(o),t.lineDashOffset=a),i.strokeFirst?(lp(i)&&t.strokeText(e,i.x,i.y),vp(i)&&t.fillText(e,i.x,i.y)):(vp(i)&&t.fillText(e,i.x,i.y),lp(i)&&t.strokeText(e,i.x,i.y)),o&&t.setLineDash([])}}(t,n,a)):n instanceof du?(2!==i.lastDrawType&&(s=!0,i.lastDrawType=2),function(t,n,i,r,e){bp(t,n.style,i&&i.style,r,e)}(t,n,f,s,i),function(t,n,i){var r=n.__image=Po(i.image,n.__image,n,n.onload);if(r&&Fo(r)){var e=i.x||0,o=i.y||0,a=n.getWidth(),u=n.getHeight(),s=r.width/r.height;if(null==a&&null!=u?a=u*s:null==u&&null!=a?u=a/s:null==a&&null==u&&(a=r.width,u=r.height),i.sWidth&&i.sHeight)t.drawImage(r,f=i.sx||0,h=i.sy||0,i.sWidth,i.sHeight,e,o,a,u);else if(i.sx&&i.sy){var f,h;t.drawImage(r,f=i.sx,h=i.sy,a-f,u-h,e,o,a,u)}else t.drawImage(r,e,o,a,u)}}(t,n,a)):n.getTemporalDisplayables&&(4!==i.lastDrawType&&(s=!0,i.lastDrawType=4),function(t,n,i){var r=n.getDisplayables(),e=n.getTemporalDisplayables();t.save();var o,a,u={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:i.viewWidth,viewHeight:i.viewHeight,beforeBrushParam:{}};for(o=n.getCursor(),a=r.length;o<a;o++)(h=r[o]).beforeBrush&&h.beforeBrush(i.beforeBrushParam),h.innerBeforeBrush(),kp(t,h,u),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),u.prevEl=h;Tp(t,u);for(var s=0,f=e.length;s<f;s++){var h;(h=e[s]).beforeBrush&&h.beforeBrush(i.beforeBrushParam),h.innerBeforeBrush(),kp(t,h,u),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),u.prevEl=h}Tp(t,u),n.clearTemporalDisplayables(),n.notClear=!0,t.restore()}(t,n,i)),n.innerAfterBrush(),n.afterBrush&&(v&&Mp(t,i),n.afterBrush()),i.prevEl=n,n.__dirty=0,n.__isRendered=!0}function Tp(t,n){Mp(t,n),n.prevElClipPaths&&t.restore()}var Ap=new qm,Np=new Si(100),Lp=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function Cp(t,n){if("none"===t)return null;var i=n.getDevicePixelRatio(),r=n.getZr(),e="svg"===r.painter.type;t.dirty&&Ap.delete(t);var o=Ap.get(t);if(o)return o;var a=O(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===a.backgroundColor&&(a.backgroundColor=null);var u={repeat:"repeat"};return function(t){for(var n,o=[i],u=!0,s=0;s<Lp.length;++s){var f=a[Lp[s]];if(null!=f&&!H(f)&&!G(f)&&!Y(f)&&"boolean"!=typeof f){u=!1;break}o.push(f)}if(u){n=o.join(",")+(e?"-svg":"");var h=Np.get(n);h&&(e?t.svgElement=h:t.image=h)}var l,v=Op(a.dashArrayX),d=function(t){if(!t||"object"==typeof t&&0===t.length)return[0,0];if(Y(t)){var n=Math.ceil(t);return[n,n]}var i=R(t,(function(t){return Math.ceil(t)}));return t.length%2?i.concat(i):i}(a.dashArrayY),m=Ip(a.symbol),p=R(v,(function(t){return Dp(t)})),y=Dp(d),g=!e&&c.createCanvas(),b=e&&{tag:"g",attrs:{},key:"dcl",children:[]},w=function(){for(var t=1,n=0,i=p.length;n<i;++n)t=He(t,p[n]);var r=1;for(n=0,i=m.length;n<i;++n)r=He(r,m[n].length);t*=r;var e=y*p.length*m.length;return{width:Math.max(1,Math.min(t,a.maxTileWidth)),height:Math.max(1,Math.min(e,a.maxTileHeight))}}();g&&(g.width=w.width*i,g.height=w.height*i,l=g.getContext("2d")),function(){l&&(l.clearRect(0,0,g.width,g.height),a.backgroundColor&&(l.fillStyle=a.backgroundColor,l.fillRect(0,0,g.width,g.height)));for(var t=0,n=0;n<d.length;++n)t+=d[n];if(!(t<=0))for(var o=-y,u=0,s=0,f=0;o<w.height;){if(u%2==0){for(var h=s/2%m.length,c=0,p=0,x=0;c<2*w.width;){var M=0;for(n=0;n<v[f].length;++n)M+=v[f][n];if(M<=0)break;if(p%2==0){var S=.5*(1-a.symbolSize);k(c+v[f][p]*S,o+d[u]*S,v[f][p]*a.symbolSize,d[u]*a.symbolSize,m[h][x/2%m[h].length])}c+=v[f][p],++x,++p===v[f].length&&(p=0)}++f===v.length&&(f=0)}o+=d[u],++s,++u===d.length&&(u=0)}function k(t,n,o,u,s){var f=e?1:i,h=rp(s,t*f,n*f,o*f,u*f,a.color,a.symbolKeepAspect);if(e){var c=r.painter.renderOneToVNode(h);c&&b.children.push(c)}else Sp(l,h)}}(),u&&Np.put(n,g||b),t.image=g,t.svgElement=b,t.svgWidth=w.width,t.svgHeight=w.height}(u),u.rotation=a.rotation,u.scaleX=u.scaleY=e?1:1/i,Ap.set(t,u),t.dirty=!1,u}function Ip(t){if(!t||0===t.length)return[["rect"]];if(G(t))return[[t]];for(var n=!0,i=0;i<t.length;++i)if(!G(t[i])){n=!1;break}if(n)return Ip([t]);var r=[];for(i=0;i<t.length;++i)G(t[i])?r.push([t[i]]):r.push(t[i]);return r}function Op(t){if(!t||0===t.length)return[[0,0]];if(Y(t))return[[e=Math.ceil(t),e]];for(var n=!0,i=0;i<t.length;++i)if(!Y(t[i])){n=!1;break}if(n)return Op([t]);var r=[];for(i=0;i<t.length;++i)if(Y(t[i])){var e=Math.ceil(t[i]);r.push([e,e])}else e=R(t[i],(function(t){return Math.ceil(t)})),r.push(e.length%2==1?e.concat(e):e);return r}function Dp(t){for(var n=0,i=0;i<t.length;++i)n+=t[i];return t.length%2==1?2*n:n}var _p=Mo((function(t,n){t.eachRawSeries((function(i){if(!t.isSeriesFiltered(i)){var r=i.getData();r.hasItemVisual()&&r.each((function(t){var i=r.getItemVisual(t,"decal");i&&(r.ensureUniqueItemVisual(t,"style").decal=Cp(i,n))}));var e=r.getVisual("decal");e&&(r.getVisual("style").decal=Cp(e,n))}}))})),Ep=2e3,zp=4500,Rp={PROCESSOR:{SERIES_FILTER:800,AXIS_STATISTICS:920,FILTER:1e3,STATISTIC:5e3,STATISTICS:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:Ep,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:zp,ARIA:6e3,DECAL:7e3}},Pp="__flagInMainProcess",Bp="__mainProcessVersion",Fp="__pendingUpdate",Vp="__needsUpdateStatus",Wp=/^[a-zA-Z0-9_]+$/,Hp="__connectUpdateStatus";function Up(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];if(!this.isDisposed())return jp(this,t,n)}}function Gp(t){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return jp(this,t,n)}}function jp(t,n,i){return i[0]=i[0]&&i[0].toLowerCase(),Dt.prototype[n].apply(t,i)}var Yp,Xp,qp,Zp,$p,Kp,Jp,Qp,ty,ny,iy,ry,ey,oy,ay,uy,sy,fy,hy,ly=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n}(Dt),cy=ly.prototype;cy.on=Gp("on"),cy.off=Gp("off");var vy=function(t){function n(n,i,r){var e=t.call(this,new zm)||this;e._chartsViews=[],e._chartsMap={},e._componentsViews=[],e._componentsMap={},e._pendingActions=[],r=r||{},e.__v_skip=!0,e._dom=n,e[Bp]=1;var o=e._zr=ce(n,{renderer:r.renderer||"canvas",devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:tt(r.useDirtyRect,!1),useCoarsePointer:tt(r.useCoarsePointer,"auto"),pointerSize:r.pointerSize});e._ssr=r.ssr,e._throttledZrFlush=nm(V(o.flush,o),17),e._updateTheme(i),e._locale=function(t){if(G(t)){var n=yl[t.toUpperCase()]||{};return t===dl||t===ml?L(n):C(L(n),L(yl[pl]),!1)}return C(L(t),L(yl[pl]),!1)}(r.locale||bl),e._coordSysMgr=new sc;var a=e._api=ay(e);function u(t,n){return t.__prio-n.__prio}return Gn(xy,u),Gn(by,u),e._scheduler=new dm(e,a,by,xy),e._messageCenter=new ly,e._initEvents(),e.resize=V(e.resize,e),o.animation.on("frame",e._onframe,e),ny(o,e),iy(o,e),ut(e),e}return o(n,t),n.prototype._onframe=function(){if(!this._disposed){var t=this._scheduler,n=this._model,i=this._api;if(fy(this),this[Fp]){var r=this[Fp].silent;this[Pp]=!0,hy(this);try{Yp(this),Zp.update.call(this,null,this[Fp].updateParams)}catch(t){throw this[Pp]=!1,this[Fp]=null,t}this._zr.flush(),this[Pp]=!1,this[Fp]=null,Qp.call(this,r),ty.call(this,r)}else if(t.unfinished){var e=1;do{t.unfinished=!1;var o=c.getTime();t.performSeriesTasks(n),t.performDataProcessorTasks(n),Kp(this,n),t.performVisualTasks(n),oy(this,this._model,i,"remain",{}),e-=c.getTime()-o}while(e>0&&t.unfinished);t.unfinished||this._zr.flush()}}},n.prototype.getDom=function(){return this._dom},n.prototype.getId=function(){return this.id},n.prototype.getZr=function(){return this._zr},n.prototype.isSSR=function(){return this._ssr},n.prototype.setOption=function(t,n,i){if(!this[Pp]&&!this._disposed){var r,e,o;if(X(n)&&(i=n.lazyUpdate,r=n.silent,e=n.replaceMerge,o=n.transition,n=n.notMerge),this[Pp]=!0,hy(this),!this._model||n){var a=new qc(this._api),u=this._theme,s=this._model=new Uc;s.scheduler=this._scheduler,s.ssr=this._ssr,s.init(null,null,null,u,this._locale,a)}this._model.setOption(t,{replaceMerge:e},wy);var f={seriesTransition:o,optionChanged:!0};if(i)this[Fp]={silent:r,updateParams:f},this[Pp]=!1,this.getZr().wakeUp();else{try{Yp(this),Zp.update.call(this,null,f)}catch(t){throw this[Fp]=null,this[Pp]=!1,t}this._ssr||this._zr.flush(),this[Fp]=null,this[Pp]=!1,Qp.call(this,r),ty.call(this,r)}}},n.prototype.setTheme=function(t,n){if(!this[Pp]&&!this._disposed){var i=this._model;if(i){var r=n&&n.silent,e=null;this[Fp]&&(null==r&&(r=this[Fp].silent),e=this[Fp].updateParams,this[Fp]=null),this[Pp]=!0,hy(this);try{this._updateTheme(t),i.setTheme(this._theme),Yp(this),Zp.update.call(this,{type:"setTheme"},e)}catch(t){throw this[Pp]=!1,t}this[Pp]=!1,Qp.call(this,r),ty.call(this,r)}}},n.prototype._updateTheme=function(t){G(t)&&(t=My[t]),t&&((t=L(t))&&dv(t,!0),this._theme=t)},n.prototype.getModel=function(){return this._model},n.prototype.getOption=function(){return this._model&&this._model.getOption()},n.prototype.getWidth=function(){return this._zr.getWidth()},n.prototype.getHeight=function(){return this._zr.getHeight()},n.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||u.hasGlobalWindow&&window.devicePixelRatio||1},n.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},n.prototype.renderToCanvas=function(t){return this._zr.painter.getRenderedCanvas({backgroundColor:(t=t||{}).backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},n.prototype.renderToSVGString=function(t){return this._zr.painter.renderToString({useViewBox:(t=t||{}).useViewBox})},n.prototype.getSvgDataURL=function(){var t=this._zr;return z(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()},n.prototype.getDataURL=function(t){if(!this._disposed){var n=this._model,i=[],r=this;z((t=t||{}).excludeComponents,(function(t){n.eachComponent({mainType:t},(function(t){var n=r._componentsMap[t.__viewId];n.group.ignore||(i.push(n),n.group.ignore=!0)}))}));var e="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return z(i,(function(t){t.group.ignore=!1})),e}},n.prototype.getConnectedDataURL=function(t){if(!this._disposed){var n="svg"===t.type,i=this.group,r=Math.min,e=Math.max,o=1/0;if(Ty[i]){var a=o,u=o,s=-1/0,f=-1/0,h=[],l=t&&t.pixelRatio||this.getDevicePixelRatio();z(ky,(function(o){if(o.group===i){var l=n?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(L(t)),c=o.getDom().getBoundingClientRect();a=r(c.left,a),u=r(c.top,u),s=e(c.right,s),f=e(c.bottom,f),h.push({dom:l,left:c.left,top:c.top})}}));var v=(s*=l)-(a*=l),d=(f*=l)-(u*=l),m=c.createCanvas(),p=ce(m,{renderer:n?"svg":"canvas"});if(p.resize({width:v,height:d}),n){var y="";return z(h,(function(t){y+='<g transform="translate('+(t.left-a)+","+(t.top-u)+')">'+t.dom+"</g>"})),p.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&p.painter.setBackgroundColor(t.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}return t.connectedBackgroundColor&&p.add(new xu({shape:{x:0,y:0,width:v,height:d},style:{fill:t.connectedBackgroundColor}})),z(h,(function(t){var n=new du({style:{x:t.left*l-a,y:t.top*l-u,image:t.dom}});p.add(n)})),p.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},n.prototype.convertToPixel=function(t,n,i){return $p(this,"convertToPixel",t,n,i)},n.prototype.convertToLayout=function(t,n,i){return $p(this,"convertToLayout",t,n,i)},n.prototype.convertFromPixel=function(t,n,i){return $p(this,"convertFromPixel",t,n,i)},n.prototype.containPixel=function(t,n){var i;if(!this._disposed)return z(so(this._model,t),(function(t,r){r.indexOf("Models")>=0&&z(t,(function(t){var e=t.coordinateSystem;if(e&&e.containPoint)i=i||!!e.containPoint(n);else if("seriesModels"===r){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i=i||o.containPoint(n,t))}}),this)}),this),!!i},n.prototype.getVisual=function(t,n){var i=so(this._model,t,{defaultMainType:"series"}),r=i.seriesModel.getData(),e=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?r.indexOfRawIndex(i.dataIndex):null;return null!=e?function(t,n,i){switch(i){case"color":return t.getItemVisual(n,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(n,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(n,i)}}(r,e,n):function(t,n){switch(n){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(n)}}(r,n)},n.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},n.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},n.prototype._initEvents=function(){var t=this;z(my,(function(n){var i=function(i){var r,e=t.getModel(),o=i.target;if("globalout"===n?r={}:o&&Wm(o,(function(t){var n=Ru(t);if(n&&null!=n.dataIndex){var i=n.dataModel||e.getSeriesByIndex(n.seriesIndex);return r=i&&i.getDataParams(n.dataIndex,n.dataType,o)||{},!0}if(n.eventData)return r=I({},n.eventData),!0}),!0),r){var a=r.componentType,u=r.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",u=r.seriesIndex);var s=a&&null!=u&&e.getComponent(a,u),f=s&&t["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];r.event=i,r.type=n,t._$eventProcessor.eventInfo={targetEl:o,packedEvent:r,model:s,view:f},t.trigger(n,r)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)}));var n=this._messageCenter;z(gy,(function(i,r){n.on(r,(function(n){t.trigger(r,n)}))})),function(t,n,i){t.on("selectchanged",(function(t){var r=i.getModel();t.isFromClick?(Vm("map","selectchanged",n,r,t),Vm("pie","selectchanged",n,r,t)):"select"===t.fromAction?(Vm("map","selected",n,r,t),Vm("pie","selected",n,r,t)):"unselect"===t.fromAction&&(Vm("map","unselected",n,r,t),Vm("pie","unselected",n,r,t))}))}(n,this,this._api)},n.prototype.isDisposed=function(){return this._disposed},n.prototype.clear=function(){this._disposed||this.setOption({series:[]},!0)},n.prototype.dispose=function(){if(!this._disposed){this._disposed=!0,this.getDom()&&co(this.getDom(),Ny,"");var t=this,n=t._api,i=t._model;z(t._componentsViews,(function(t){t.dispose(i,n)})),z(t._chartsViews,(function(t){t.dispose(i,n)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete ky[t.id]}},n.prototype.resize=function(t){if(!this[Pp]&&!this._disposed){this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),n){var i=n.resetOption("media"),r=t&&t.silent;this[Fp]&&(null==r&&(r=this[Fp].silent),i=!0,this[Fp]=null),this[Pp]=!0,hy(this);try{i&&Yp(this),Zp.update.call(this,{type:"resize",animation:I({duration:0},t&&t.animation)})}catch(t){throw this[Pp]=!1,t}this[Pp]=!1,Qp.call(this,r),ty.call(this,r)}}},n.prototype.showLoading=function(t,n){if(!this._disposed&&(X(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),Sy[t])){var i=Sy[t](this._api,n),r=this._zr;this._loadingFX=i,r.add(i)}},n.prototype.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},n.prototype.makeActionFromEvent=function(t){var n=I({},t);return n.type=yy[t.type],n},n.prototype.dispatchAction=function(t,n){if(!this._disposed&&(X(n)||(n={silent:!!n}),py[t.type]&&this._model))if(this[Pp])this._pendingActions.push(t);else{var i=n.silent;Jp.call(this,t,i);var r=n.flush;r?this._zr.flush():!1!==r&&u.browser.weChat&&this._throttledZrFlush(),Qp.call(this,i),ty.call(this,i)}},n.prototype.updateLabelLayout=function(){Hm.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},n.prototype.appendData=function(t){if(!this._disposed){var n=t.seriesIndex;this.getModel().getSeriesByIndex(n).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},n.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function n(t){for(var n=[],i=t.currentStates,r=0;r<i.length;r++){var e=i[r];"emphasis"!==e&&"blur"!==e&&"select"!==e&&n.push(e)}t.selected&&t.states.select&&n.push("select"),2===t.hoverState&&t.states.emphasis?n.push("emphasis"):1===t.hoverState&&t.states.blur&&n.push("blur"),t.useStates(n)}function i(t,n){if(!t.preventAutoZ){var i=Rh(t);n.eachRendered((function(t){return Ph(t,i.z,i.zlevel),!0}))}}function r(t,n){n.eachRendered((function(t){if(!uh(t)){var n=t.getTextContent(),i=t.getTextGuideLine();t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),i&&i.stateTransition&&(i.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null)}}))}function e(t,i){var r=t.getModel("stateAnimation"),e=t.isAnimationEnabled(),o=r.get("duration"),a=o>0?{duration:o,delay:r.get("delay"),easing:r.get("easing")}:null;i.eachRendered((function(t){if(t.states&&t.states.emphasis){if(uh(t))return;if(t instanceof fu&&function(t){var n=Ju(t);n.normalFill=t.style.fill,n.normalStroke=t.style.stroke;var i=t.states.select||{};n.selectFill=i.style&&i.style.fill||null,n.selectStroke=i.style&&i.style.stroke||null}(t),t.__dirty){var i=t.prevStates;i&&t.useStates(i)}if(e){t.stateTransition=a;var r=t.getTextContent(),o=t.getTextGuideLine();r&&(r.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&n(t)}}))}Yp=function(t){Gm(t._model).prepare={};var n=t._scheduler;n.restorePipelines(t._zr,t._model),n.prepareStageTasks(),Xp(t,!0),Xp(t,!1),n.plan()},Xp=function(t,n){for(var i=t._model,r=t._scheduler,e=n?t._componentsViews:t._chartsViews,o=n?t._componentsMap:t._chartsMap,a=t._zr,u=t._api,s=0;s<e.length;s++)e[s].__alive=!1;function f(t){var s=t.__requireNewView;t.__requireNewView=!1;var f="_ec_"+t.id+"_"+t.type,h=!s&&o[f];if(!h){var l=To(t.type);(h=new(n?Hd.getClass(l.main,l.sub):Yd.getClass(l.sub))).init(i,u),o[f]=h,e.push(h),a.add(h.group)}t.__viewId=h.__id=f,h.__alive=!0,h.__model=t,h.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},!n&&r.prepareView(h,t,i,u)}for(n?i.eachComponent((function(t,n){"series"!==t&&f(n)})):i.eachSeries(f),s=0;s<e.length;){var h=e[s];h.__alive?s++:(!n&&h.renderTask.dispose(),a.remove(h.group),h.dispose(i,u),e.splice(s,1),o[h.__id]===h&&delete o[h.__id],h.__id=h.group.__ecComponentInfo=null)}},qp=function(t,n,i,r,e){var o=t._model;if(o.setUpdatePayload(i),r){var a,u=function(t,n,i){var r={};r[n+"Id"]=t[n+"Id"],r[n+"Index"]=t[n+"Index"],r[n+"Name"]=t[n+"Name"];var e={mainType:n,query:r};return i&&(e.subType=i),e}(i,r,e),s=i.excludeSeriesId;null!=s&&(a=ct(),z(Ze(s),(function(t){var n=io(t,null);null!=n&&a.set(n,!0)}))),o&&o.eachComponent(u,(function(n){if(!a||null==a.get(n.id))if(Us(i))if(n instanceof Ed)i.type!==is||i.notBlur||n.get(["emphasis","disabled"])||function(t,n,i){var r=t.seriesIndex,e=t.getData(n.dataType);if(e){var o=oo(e,n);o=(H(o)?o[0]:o)||0;var a=e.getItemGraphicEl(o);if(!a)for(var u=e.count(),s=0;!a&&s<u;)a=e.getItemGraphicEl(s++);if(a){var f=Ru(a);Is(r,f.focus,f.blurScope,i)}else{var h=t.get(["emphasis","focus"]),l=t.get(["emphasis","blurScope"]);null!=h&&Is(r,h,l,i)}}}(n,i,t._api);else{var r=Ds(n.mainType,n.componentIndex,i.name,t._api),e=r.dispatchers;i.type===is&&r.focusSelf&&!i.notBlur&&Os(n.mainType,n.componentIndex,t._api),e&&z(e,(function(t){i.type===is?Ss(t):ks(t)}))}else Hs(i)&&n instanceof Ed&&(function(t,n){if(Hs(n)){var i=n.dataType,r=oo(t.getData(i),n);H(r)||(r=[r]),t[n.type===as?"toggleSelect":n.type===es?"select":"unselect"](r,i)}}(n,i),_s(n),sy(t))}),t),o&&o.eachComponent(u,(function(n){a&&null!=a.get(n.id)||f(t["series"===r?"_chartsMap":"_componentsMap"][n.__viewId])}),t)}else z([].concat(t._componentsViews).concat(t._chartsViews),f);function f(r){r&&r.__alive&&r[n]&&r[n](r.__model,o,t._api,i)}},Zp={prepareAndUpdate:function(t){Yp(this),Zp.update.call(this,t,t&&{optionChanged:null!=t.newOption})},update:function(n,i){var r=this._model,e=this._api,o=this._zr,a=this._coordSysMgr,u=this._scheduler;if(r){!function(t){Gm(t).fullUpdate={}}(r),r.setUpdatePayload(n),u.restoreData(r,n),u.performSeriesTasks(r),a.create(r,e),Hm.trigger("coordsys:aftercreate",r,e),u.performDataProcessorTasks(r,n),Kp(this,r),a.update(r,e),t(r),u.performVisualTasks(r,n);var s=r.get("backgroundColor")||"transparent";o.setBackgroundColor(s);var f=r.get("darkMode");null!=f&&"auto"!==f&&o.setDarkMode(f),ry(this,r,e,n,i),Hm.trigger("afterupdate",r,e)}},updateTransform:function(t){var n=this,i=n._model,r=n._api;if(i){i.setUpdatePayload(t),i.eachComponent((function(e,o){if(e!==Bu){var a=n.getViewOfComponentModel(o);a&&a.__alive&&a.updateTransform&&a.updateTransform(o,i,r,t)}}));var e=ct();i.eachSeries((function(o){var a=n._chartsMap[o.__viewId];if(a.updateTransform&&!o.pipelineContext.progressiveRender){var u=a.updateTransform(o,i,r,t);u&&u.update&&e.set(o.uid,1)}else e.set(o.uid,1)})),n._scheduler.performVisualTasks(i,t,{setDirty:!0,dirtyMap:e}),oy(n,i,r,t,{},e),Hm.trigger("afterupdate",i,r)}},updateView:function(n){var i=this._model;i&&(i.setUpdatePayload(n),Yd.markUpdateMethod(n,"updateView"),t(i),this._scheduler.performVisualTasks(i,n,{setDirty:!0}),ry(this,i,this._api,n,{}),Hm.trigger("afterupdate",i,this._api))},updateVisual:function(n){var i=this,r=this._model;r&&(r.setUpdatePayload(n),r.eachSeries((function(t){t.getData().clearAllVisual()})),Yd.markUpdateMethod(n,"updateVisual"),t(r),this._scheduler.performVisualTasks(r,n,{visualType:"visual",setDirty:!0}),r.eachComponent((function(t,e){if("series"!==t){var o=i.getViewOfComponentModel(e);o&&o.__alive&&o.updateVisual(e,r,i._api,n)}})),r.eachSeries((function(t){i._chartsMap[t.__viewId].updateVisual(t,r,i._api,n)})),Hm.trigger("afterupdate",r,this._api))},updateLayout:function(t){Zp.update.call(this,t)}},$p=function(t,n,i,r,e){if(!t._disposed)for(var o,a=t._model,u=t._coordSysMgr.getCoordinateSystems(),s=so(a,i),f=0;f<u.length;f++){var h=u[f];if(h[n]&&null!=(o=h[n](a,s,r,e)))return o}},Kp=function(t,n){var i=t._chartsMap,r=t._scheduler;n.eachSeries((function(t){r.updateStreamModes(t,i[t.__viewId])}))},Jp=function(t,n){var i=this,r=this.getModel(),e=t.escapeConnect,o=py[t.type],a=(o.update||"update").split(":"),u=a.pop(),s=null!=a[0]&&To(a[0]);this[Pp]=!0,hy(this);var f=[t],h=!1;t.batch&&(h=!0,f=R(t.batch,(function(n){return(n=O(I({},n),t)).batch=null,n})));var l,c=[],v=[],d=o.nonRefinedEventType,m=Hs(t),p=Us(t);if(p&&Cs(this._api),z(f,(function(n){var e=o.action(n,r,i._api);if(o.refineEvent?v.push(e):l=e,(l=l||I({},n)).type=d,c.push(l),p){var a=fo(t),f=a.mainTypeSpecified?a.queryOptionMap.keys()[0]:"series";qp(i,u,n,f),sy(i)}else m?(qp(i,u,n,"series"),sy(i)):s&&qp(i,u,n,s.main,s.sub)})),"none"!==u&&!p&&!m&&!s)try{this[Fp]?(Yp(this),Zp.update.call(this,t),this[Fp]=null):Zp[u].call(this,t)}catch(t){throw this[Pp]=!1,t}if(l=h?{type:d,escapeConnect:e,batch:c}:c[0],this[Pp]=!1,!n){var y=void 0;if(o.refineEvent){var g=o.refineEvent(v,t,r,this._api).eventContent;et(X(g)),(y=O({type:o.refinedEventType},g)).fromAction=t.type,y.fromActionPayload=t,y.escapeConnect=!0}var b=this._messageCenter;b.trigger(l.type,l),y&&b.trigger(y.type,y)}},Qp=function(t){for(var n=this._pendingActions;n.length;){var i=n.shift();Jp.call(this,i,t)}},ty=function(t){!t&&this.trigger("updated")},ny=function(t,n){t.on("rendered",(function(i){n.trigger("rendered",i),!t.animation.isFinished()||n[Fp]||n._scheduler.unfinished||n._pendingActions.length?t.refresh():n.trigger("finished")}))},iy=function(t,n){t.on("mouseover",(function(t){var i=Wm(t.target,Ws);i&&(function(t,n,i){var r=Ru(t),e=Ds(r.componentMainType,r.componentIndex,r.componentHighDownName,i),o=e.dispatchers;o?(e.focusSelf&&Os(r.componentMainType,r.componentIndex,i),z(o,(function(t){return xs(t,n)}))):(Is(r.seriesIndex,r.focus,r.blurScope,i),"self"===r.focus&&Os(r.componentMainType,r.componentIndex,i),xs(t,n))}(i,t,n._api),sy(n))})).on("mouseout",(function(t){var i=Wm(t.target,Ws);i&&(function(t,n,i){Cs(i);var r=Ru(t),e=Ds(r.componentMainType,r.componentIndex,r.componentHighDownName,i).dispatchers;e?z(e,(function(t){return Ms(t,n)})):Ms(t,n)}(i,t,n._api),sy(n))})).on("click",(function(t){var i=Wm(t.target,(function(t){return null!=Ru(t).dataIndex}),!0);if(i){var r=i.selected?"unselect":"select",e=Ru(i);n._api.dispatchAction({type:r,dataType:e.dataType,dataIndexInside:e.dataIndex,seriesIndex:e.seriesIndex,isFromClick:!0})}}))},ry=function(t,n,i,r,e){!function(t){var n=[],i=[],r=!1;if(t.eachComponent((function(t,e){var o=e.get("zlevel")||0,a=e.get("z")||0,u=e.getZLevelKey();r=r||!!u,("series"===t?i:n).push({zlevel:o,z:a,idx:e.componentIndex,type:t,key:u})})),r){var e,o,a=n.concat(i);Gn(a,(function(t,n){return t.zlevel===n.zlevel?t.z-n.z:t.zlevel-n.zlevel})),z(a,(function(n){var i=t.getComponent(n.type,n.idx),r=n.zlevel,a=n.key;null!=e&&(r=Math.max(e,r)),a?(r===e&&a!==o&&r++,o=a):o&&(r===e&&r++,o=""),e=r,i.setZLevel(r)}))}}(n),ey(t,n,i,r,e),z(t._chartsViews,(function(t){t.__alive=!1})),oy(t,n,i,r,e),z(t._chartsViews,(function(t){t.__alive||t.remove(n,i)}))},ey=function(t,n,o,a,u,s){z(s||t._componentsViews,(function(t){var u=t.__model;r(0,t),t.render(u,n,o,a),i(u,t),e(u,t)}))},oy=function(t,n,o,a,s,f){var h=t._scheduler;s=I(s||{},{updatedSeries:n.getSeries()}),Hm.trigger("series:beforeupdate",n,o,s);var l=!1;n.eachSeries((function(n){var i=t._chartsMap[n.__viewId];i.__alive=!0;var e=i.renderTask;h.updatePayload(e,a),r(0,i),f&&f.get(n.uid)&&e.dirty(),e.perform(h.getPerformArgs(e))&&(l=!0),i.group.silent=!!n.get("silent"),function(t,n){var i=t.get("blendMode")||null;n.eachRendered((function(t){t.isGroup||(t.style.blend=i)}))}(n,i),_s(n)})),h.unfinished=l||h.unfinished,Hm.trigger("series:layoutlabels",n,o,s),Hm.trigger("series:transition",n,o,s),n.eachSeries((function(n){var r=t._chartsMap[n.__viewId];i(n,r),e(n,r)})),function(t,n){var i=t._zr;if("canvas"===i.painter.type){var r=0;i.storage.traverse((function(t){t.isGroup||r++}));var e=r>tt(n.get("hoverLayerThreshold"),Oc.hoverLayerThreshold)&&!u.node&&!u.worker;(t._usingTHL||e)&&(n.eachSeries((function(n){if(!n.preventUsingHoverLayer){var i=t._chartsMap[n.__viewId];i.__alive&&i.eachRendered((function(t){var n=t.states.emphasis;n&&2!==n.hoverLayer&&(n.hoverLayer=e?1:0)}))}})),t._usingTHL=e)}}(t,n),Hm.trigger("series:afterupdate",n,o,s)},sy=function(t){t[Vp]=!0,t.getZr().wakeUp()},hy=function(t){t[Bp]=(t[Bp]+1)%1e6},fy=function(t){t[Vp]&&(t.getZr().storage.traverse((function(t){uh(t)||n(t)})),t[Vp]=!1)},ay=function(t){return new(function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return o(i,n),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(n){for(;n;){var i=n.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);n=n.parent}},i.prototype.enterEmphasis=function(n,i){Ss(n,i),sy(t)},i.prototype.leaveEmphasis=function(n,i){ks(n,i),sy(t)},i.prototype.enterBlur=function(n){!function(t){ys(t,cs)}(n),sy(t)},i.prototype.leaveBlur=function(n){Ts(n),sy(t)},i.prototype.enterSelect=function(n){As(n),sy(t)},i.prototype.leaveSelect=function(n){Ns(n),sy(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(n){return t.getViewOfComponentModel(n)},i.prototype.getViewOfSeriesModel=function(n){return t.getViewOfSeriesModel(n)},i.prototype.getECUpdateCycleVersion=function(){return t[Bp]},i.prototype.usingTHL=function(){return t._usingTHL},i}(Zu))(t)},uy=function(t){function n(t,n){for(var i=0;i<t.length;i++)t[i][Hp]=n}z(yy,(function(i,r){t._messageCenter.on(r,(function(i){if(Ty[t.group]&&0!==t[Hp]){if(i&&i.escapeConnect)return;var r=t.makeActionFromEvent(i),e=[];z(ky,(function(n){n!==t&&n.group===t.group&&e.push(n)})),n(e,0),z(e,(function(t){1!==t[Hp]&&t.dispatchAction(r)})),n(e,2)}}))}))}}(),n}(Dt),dy=vy.prototype;dy.on=Up("on"),dy.off=Up("off"),dy.one=function(t,n,i){var r=this;this.on.call(this,t,(function i(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];n&&n.apply&&n.apply(this,e),r.off(t,i)}),i)};var my=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"],py={},yy={},gy={},by=[],wy=[],xy=[],My={},Sy={},ky={},Ty={},Ay=+new Date-0,Ny="_echarts_instance_";function Ly(t,n){My[t]=n}function Cy(t){D(wy,t)<0&&wy.push(t)}function Iy(t,n){zy(by,t,n,2e3)}function Oy(t,n){Hm.on(t,n)}function Dy(t,n,i){var r,e,o,a,u;function s(t){return t.toLowerCase()}U(n)&&(i=n,n=""),X(t)?(r=t.type,e=t.event,a=t.update,u=t.publishNonRefinedEvent,i||(i=t.action),o=t.refineEvent):(r=t,e=n),e=s(e||r);var f=o?s(r):e;py[r]||(et(Wp.test(r)&&Wp.test(e)),o&&et(e!==r),py[r]={actionType:r,refinedEventType:e,nonRefinedEventType:f,update:a,action:i,refineEvent:o},gy[e]=1,o&&u&&(gy[f]=1),yy[f]=r)}function _y(t,n){zy(xy,t,n,3e3,"visual")}var Ey=[];function zy(t,n,i,r,e){if((U(n)||X(n))&&(i=n,n=r),!(D(Ey,i)>=0)){Ey.push(i);var o=dm.wrapStageHandler(i,e);o.__prio=n,o.__raw=i,t.push(o)}}function Ry(t,n){Sy[t]=n}function Py(t,n,i){return{eventContent:{selected:Es(i),isFromClick:n.isFromClick||!1}}}function By(t){return null==t?0:t.length||1}function Fy(t){return t}_y(Ep,fm),_y(zp,lm),_y(zp,cm),_y(Ep,Bm),_y(zp,Fm),_y(7e3,_p),Cy(dv),Iy(900,xv),Ry("default",(function(t,n){O(n=n||{},{text:"loading",textColor:Sc.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:Sc.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var i=new fe,r=new xu({style:{fill:n.maskColor},zlevel:n.zlevel,z:1e4});i.add(r);var e,o=new Tu({style:{text:n.text,fill:n.textColor,fontSize:n.fontSize,fontWeight:n.fontWeight,fontStyle:n.fontStyle,fontFamily:n.fontFamily},zlevel:n.zlevel,z:10001}),a=new xu({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:n.zlevel,z:10001});return i.add(a),n.showSpinner&&((e=new Wf({shape:{startAngle:-vm/2,endAngle:-vm/2+.1,r:n.spinnerRadius},style:{stroke:n.color,lineCap:"round",lineWidth:n.lineWidth},zlevel:n.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*vm/2}).start("circularInOut"),e.animateShape(!0).when(1e3,{startAngle:3*vm/2}).delay(300).start("circularInOut"),i.add(e)),i.resize=function(){var i=o.getBoundingRect().width,u=n.showSpinner?n.spinnerRadius:0,s=(t.getWidth()-2*u-(n.showSpinner&&i?10:0)-i)/2-(n.showSpinner&&i?0:5+i/2)+(n.showSpinner?0:i/2)+(i?0:u),f=t.getHeight()/2;n.showSpinner&&e.setShape({cx:s,cy:f}),a.setShape({x:s-u,y:f-u,width:2*u,height:2*u}),r.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i})),Dy({type:is,event:is,update:is},pt),Dy({type:rs,event:rs,update:rs},pt),Dy({type:es,event:us,update:es,action:pt,refineEvent:Py,publishNonRefinedEvent:!0}),Dy({type:os,event:us,update:os,action:pt,refineEvent:Py,publishNonRefinedEvent:!0}),Dy({type:as,event:us,update:as,action:pt,refineEvent:Py,publishNonRefinedEvent:!0}),Ly("default",{}),Ly("dark",Em);var Vy=function(){function t(t,n,i,r,e,o){this._old=t,this._new=n,this._oldKeyGetter=i||Fy,this._newKeyGetter=r||Fy,this.context=e,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,n=this._new,i={},r=new Array(t.length),e=new Array(n.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(n,i,e,"_newKeyGetter");for(var o=0;o<t.length;o++){var a=r[o],u=i[a],s=By(u);if(s>1){var f=u.shift();1===u.length&&(i[a]=u[0]),this._update&&this._update(f,o)}else 1===s?(i[a]=null,this._update&&this._update(u,o)):this._remove&&this._remove(o)}this._performRestAdd(e,i)},t.prototype._executeMultiple=function(){var t=this._new,n={},i={},r=[],e=[];this._initIndexMap(this._old,n,r,"_oldKeyGetter"),this._initIndexMap(t,i,e,"_newKeyGetter");for(var o=0;o<r.length;o++){var a=r[o],u=n[a],s=i[a],f=By(u),h=By(s);if(f>1&&1===h)this._updateManyToOne&&this._updateManyToOne(s,u),i[a]=null;else if(1===f&&h>1)this._updateOneToMany&&this._updateOneToMany(s,u),i[a]=null;else if(1===f&&1===h)this._update&&this._update(s,u),i[a]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(s,u),i[a]=null;else if(f>1)for(var l=0;l<f;l++)this._remove&&this._remove(u[l]);else this._remove&&this._remove(u)}this._performRestAdd(e,i)},t.prototype._performRestAdd=function(t,n){for(var i=0;i<t.length;i++){var r=t[i],e=n[r],o=By(e);if(o>1)for(var a=0;a<o;a++)this._add&&this._add(e[a]);else 1===o&&this._add&&this._add(e);n[r]=null}},t.prototype._initIndexMap=function(t,n,i,r){for(var e=this._diffModeMultiple,o=0;o<t.length;o++){var a="_ec_"+this[r](t[o],o);if(e||(i[o]=a),n){var u=n[a],s=By(u);0===s?(n[a]=o,e&&i.push(a)):1===s?n[a]=[u,o]:u.push(o)}}},t}(),Wy=function(){function t(t,n){this._encode=t,this._schema=n}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t}();function Hy(t,n){return t.hasOwnProperty(n)||(t[n]=[]),t[n]}var Uy=function(t){this.otherDims={},null!=t&&I(this,t)},Gy=ao(),jy={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Yy=function(){function t(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=Zy(this.source)))},t.prototype.getSourceDimensionIndex=function(t){return tt(this._dimNameMap.get(t),-1)},t.prototype.getSourceDimension=function(t){var n=this.source.dimensionsDefine;if(n)return n[t]},t.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,n=function(t){var n=t.sourceFormat;return n===Hu||n===Uu}(this.source),i=!$y(t),r="",e=[],o=0,a=0;o<t;o++){var u=void 0,s=void 0,f=void 0,h=this.dimensions[a];if(h&&h.storeDimIndex===o)u=n?h.name:null,s=h.type,f=h.ordinalMeta,a++;else{var l=this.getSourceDimension(o);l&&(u=n?l.name:null,s=l.type)}e.push({property:u,type:s,ordinalMeta:f}),!n||null==u||h&&h.isCalculationCoord||(r+=i?u.replace(/\`/g,"`1").replace(/\$/g,"`2"):u),r+="$",r+=jy[s]||"f",f&&(r+=f.uid),r+="$"}var c=this.source;return{dimensions:e,hash:[c.seriesLayoutBy,c.startIndex,r].join("$$")}},t.prototype.makeOutputDimensionNames=function(){for(var t=[],n=0,i=0;n<this._fullDimCount;n++){var r=void 0,e=this.dimensions[i];if(e&&e.storeDimIndex===n)e.isCalculationCoord||(r=e.name),i++;else{var o=this.getSourceDimension(n);o&&(r=o.name)}t.push(r)}return t},t.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t}();function Xy(t){return t instanceof Yy}function qy(t){for(var n=ct(),i=0;i<(t||[]).length;i++){var r=t[i],e=X(r)?r.name:r;null!=e&&null==n.get(e)&&n.set(e,i)}return n}function Zy(t){var n=Gy(t);return n.dimNameMap||(n.dimNameMap=qy(t.dimensionsDefine))}function $y(t){return t>30}var Ky,Jy,Qy,tg,ng,ig,rg,eg=X,og=R,ag="undefined"==typeof Int32Array?Array:Int32Array,ug=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],sg=["_approximateExtent"],fg=function(){function t(t,n){var i;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r=!1;Xy(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,i=t),i=i||["x","y"];for(var e={},o=[],a={},u=!1,s={},f=0;f<i.length;f++){var h=i[f],l=G(h)?new Uy({name:h}):h instanceof Uy?h:new Uy(h),c=l.name;l.type=l.type||"float",l.coordDim||(l.coordDim=c,l.coordDimIndex=0);var v=l.otherDims=l.otherDims||{};o.push(c),e[c]=l,null!=s[c]&&(u=!0),l.createInvertedIndices&&(a[c]=[]),r&&(l.storeDimIndex=f),0===v.itemName&&(this._nameDimIdx=l.storeDimIndex),0===v.itemId&&(this._idDimIdx=l.storeDimIndex)}if(this.dimensions=o,this._dimInfos=e,this._initGetDimensionInfo(u),this.hostModel=n,this._invertedIndicesMap=a,this._dimOmitted){var d=this._dimIdxToName=ct();z(o,(function(t){d.set(e[t].storeDimIndex,t)}))}}return t.prototype.getDimension=function(t){var n=this._recognizeDimIndex(t);if(null==n)return t;if(n=t,!this._dimOmitted)return this.dimensions[n];var i=this._dimIdxToName.get(n);if(null!=i)return i;var r=this._schema.getSourceDimension(n);return r?r.name:void 0},t.prototype.getDimensionIndex=function(t){var n=this._recognizeDimIndex(t);if(null!=n)return n;if(null==t)return-1;var i=this._getDimInfo(t);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},t.prototype._recognizeDimIndex=function(t){if(Y(t)||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},t.prototype._getStoreDimIndex=function(t){return this.getDimensionIndex(t)},t.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},t.prototype._initGetDimensionInfo=function(t){var n=this._dimInfos;this._getDimInfo=t?function(t){return n.hasOwnProperty(t)?n[t]:void 0}:function(t){return n[t]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(t,n){var i=this._dimSummary;if(null==n)return i.encodeFirstDimNotExtra[t];var r=i.encode[t];return r?r[n]:null},t.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(t,n,i){var r,e=this;if(t instanceof vd&&(r=t),!r){var o=this.dimensions,a=Sv(t)||E(t)?new Cv(t,o.length):t;r=new vd;var u=og(o,(function(t){return{type:e._dimInfos[t].type,property:t}}));r.initData(a,u,i)}this._store=r,this._nameList=(n||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(t,n){var i={},r=i.encode={},e=ct(),o=[],a=[],u={};z(t.dimensions,(function(n){var i,s=t.getDimensionInfo(n),f=s.coordDim;if(f){var h=s.coordDimIndex;Hy(r,f)[h]=n,s.isExtraCoord||(e.set(f,1),"ordinal"!==(i=s.type)&&"time"!==i&&(o[0]=n),Hy(u,f)[h]=t.getDimensionIndex(s.name)),s.defaultTooltip&&a.push(n)}Fu.each((function(t,n){var i=Hy(r,n),e=s.otherDims[n];null!=e&&!1!==e&&(i[e]=s.name)}))}));var s=[],f={};e.each((function(t,n){var i=r[n];f[n]=i[0],s=s.concat(i)})),i.dataDimsOnCoord=s,i.dataDimIndicesOnCoord=R(s,(function(n){return t.getDimensionInfo(n).storeDimIndex})),i.encodeFirstDimNotExtra=f;var h=r.label;h&&h.length&&(o=h.slice());var l=r.tooltip;return l&&l.length?a=l.slice():a.length||(a=o.slice()),r.defaultedLabel=o,r.defaultedTooltip=a,i.userOutput=new Wy(u,n),i}(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(t){var n=this._store.appendData(t);this._doInit(n[0],n[1])},t.prototype.appendValues=function(t,n){var i=this._store.appendValues(t,n&&n.length),r=i.start,e=i.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),n)for(var a=r;a<e;a++)this._nameList[a]=n[a-r],o&&rg(this,a)},t.prototype._updateOrdinalMeta=function(){for(var t=this._store,n=this.dimensions,i=0;i<n.length;i++){var r=this._dimInfos[n[i]];r.ordinalMeta&&t.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&t.getSource().sourceFormat!==Gu&&!t.fillStorage},t.prototype._doInit=function(t,n){if(!(t>=n)){var i=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,e=this._idList;if(i.getSource().sourceFormat===Vu&&!i.pure)for(var o=[],a=t;a<n;a++){var u=i.getItem(a,o);if(!this.hasItemOption&&Qe(u)&&(this.hasItemOption=!0),u){var s=u.name;null==r[a]&&null!=s&&(r[a]=io(s,null));var f=u.id;null==e[a]&&null!=f&&(e[a]=io(f,null))}}if(this._shouldMakeIdFromName())for(a=t;a<n;a++)rg(this,a);Ky(this)}},t.prototype.getApproximateExtent=function(t,n){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t),n)},t.prototype.setApproximateExtent=function(t,n){n=this.getDimension(n),this._approximateExtent[n]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,n){eg(t)?I(this._calculationInfo,t):this._calculationInfo[t]=n},t.prototype.getName=function(t){var n=this.getRawIndex(t),i=this._nameList[n];return null==i&&null!=this._nameDimIdx&&(i=Qy(this,this._nameDimIdx,n)),null==i&&(i=""),i},t.prototype._getCategory=function(t,n){var i=this._store.get(t,n),r=this._store.getOrdinalMeta(t);return r?r.categories[i]:i},t.prototype.getId=function(t){return Jy(this,this.getRawIndex(t))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(t,n){var i=this._dimInfos[t];if(i)return this._store.get(i.storeDimIndex,n)},t.prototype.getByRawIndex=function(t,n){var i=this._dimInfos[t];if(i)return this._store.getByRawIndex(i.storeDimIndex,n)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t),null)},t.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},t.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},t.prototype.getValues=function(t,n){var i=this,r=this._store;return H(t)?r.getValues(og(t,(function(t){return i._getStoreDimIndex(t)})),n):r.getValues(t)},t.prototype.hasValue=function(t){for(var n=this._dimSummary.dataDimIndicesOnCoord,i=0,r=n.length;i<r;i++)if(isNaN(this._store.get(n[i],t)))return!1;return!0},t.prototype.indexOfName=function(t){for(var n=0,i=this._store.count();n<i;n++)if(this.getName(n)===t)return n;return-1},t.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},t.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},t.prototype.rawIndexOf=function(t,n){var i=t&&this._invertedIndicesMap[t],r=i&&i[n];return null==r||isNaN(r)?-1:r},t.prototype.each=function(t,n,i){U(t)&&(i=n,n=t,t=[]);var r=i||this,e=og(tg(t),this._getStoreDimIndex,this);this._store.each(e,r?V(n,r):n)},t.prototype.filterSelf=function(t,n,i){U(t)&&(i=n,n=t,t=[]);var r=i||this,e=og(tg(t),this._getStoreDimIndex,this);return this._store=this._store.filter(e,r?V(n,r):n),this},t.prototype.selectRange=function(t){var n=this,i={};return z(F(t),(function(r){var e=n._getStoreDimIndex(r);i[e]=t[r]})),this._store=this._store.selectRange(i),this},t.prototype.mapArray=function(t,n,i){U(t)&&(i=n,n=t,t=[]);var r=[];return this.each(t,(function(){r.push(n&&n.apply(this,arguments))}),i=i||this),r},t.prototype.map=function(t,n,i,r){var e=i||r||this,o=og(tg(t),this._getStoreDimIndex,this),a=ig(this);return a._store=this._store.map(o,e?V(n,e):n),a},t.prototype.modify=function(t,n,i,r){var e=i||r||this,o=og(tg(t),this._getStoreDimIndex,this);this._store.modify(o,e?V(n,e):n)},t.prototype.downSample=function(t,n,i,r){var e=ig(this);return e._store=this._store.downSample(this._getStoreDimIndex(t),n,i,r),e},t.prototype.minmaxDownSample=function(t,n){var i=ig(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),n),i},t.prototype.lttbDownSample=function(t,n){var i=ig(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(t),n),i},t.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},t.prototype.getItemModel=function(t){var n=this.hostModel,i=this.getRawDataItem(t);return new ll(i,n,n&&n.ecModel)},t.prototype.diff=function(t){var n=this;return new Vy(t?t.getStore().getIndices():[],this.getStore().getIndices(),(function(n){return Jy(t,n)}),(function(t){return Jy(n,t)}))},t.prototype.getVisual=function(t){var n=this._visual;return n&&n[t]},t.prototype.setVisual=function(t,n){this._visual=this._visual||{},eg(t)?I(this._visual,t):this._visual[t]=n},t.prototype.getItemVisual=function(t,n){var i=this._itemVisuals[t],r=i&&i[n];return null==r?this.getVisual(n):r},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,n){var i=this._itemVisuals,r=i[t];r||(r=i[t]={});var e=r[n];return null==e&&(H(e=this.getVisual(n))?e=e.slice():eg(e)&&(e=I({},e)),r[n]=e),e},t.prototype.setItemVisual=function(t,n,i){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,eg(n)?I(r,n):r[n]=i},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,n){eg(t)?I(this._layout,t):this._layout[t]=n},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,n,i){this._itemLayouts[t]=i?I(this._itemLayouts[t]||{},n):n},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,n){!function(t,n,i,r){if(r){var e=Ru(r);e.dataIndex=i,e.dataType=n,e.seriesIndex=t,e.ssrType="chart","group"===r.type&&r.traverse((function(r){var e=Ru(r);e.seriesIndex=t,e.dataIndex=i,e.dataType=n,e.ssrType="chart"}))}}(this.hostModel&&this.hostModel.seriesIndex,this.dataType,t,n),this._graphicEls[t]=n},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,n){z(this._graphicEls,(function(i,r){i&&t&&t.call(n,i,r)}))},t.prototype.cloneShallow=function(n){return n||(n=new t(this._schema?this._schema:og(this.dimensions,this._getDimInfo,this),this.hostModel)),ng(n,this),n._store=this._store,n},t.prototype.wrapMethod=function(t,n){var i=this[t];U(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return n.apply(this,[t].concat(it(arguments)))})},t.internalField=(Ky=function(t){var n=t._invertedIndicesMap;z(n,(function(i,r){var e=t._dimInfos[r],o=e.ordinalMeta,a=t._store;if(o){i=n[r]=new ag(o.categories.length);for(var u=0;u<i.length;u++)i[u]=-1;for(u=0;u<a.count();u++)i[a.get(e.storeDimIndex,u)]=u}}))},Qy=function(t,n,i){return io(t._getCategory(n,i),null)},Jy=function(t,n){var i=t._idList[n];return null==i&&null!=t._idDimIdx&&(i=Qy(t,t._idDimIdx,n)),null==i&&(i="e\0\0"+n),i},tg=function(t){return H(t)||(t=null!=t?[t]:[]),t},ig=function(n){var i=new t(n._schema?n._schema:og(n.dimensions,n._getDimInfo,n),n.hostModel);return ng(i,n),i},ng=function(t,n){z(ug.concat(n.__wrappedMethods||[]),(function(i){n.hasOwnProperty(i)&&(t[i]=n[i])})),t.__wrappedMethods=n.__wrappedMethods,z(sg,(function(i){t[i]=L(n[i])})),t._calculationInfo=I({},n._calculationInfo)},void(rg=function(t,n){var i=t._nameList,r=t._idList,e=t._nameDimIdx,o=t._idDimIdx,a=i[n],u=r[n];if(null==a&&null!=e&&(i[n]=a=Qy(t,e,n)),null==u&&null!=o&&(r[n]=u=Qy(t,o,n)),null==u&&null!=a){var s=t._nameRepeatCount,f=s[a]=(s[a]||0)+1;u=a,f>1&&(u+="__ec__"+f),r[n]=u}})),t}();function hg(t,n,i){if(i||n.hasKey(t)){for(var r=0;n.hasKey(t+r);)r++;t+=r}return n.set(t,!0),t}var lg=function(t){this.coordSysDims=[],this.axisMap=ct(),this.categoryAxisMap=ct(),this.coordSysName=t},cg={cartesian2d:function(t,n,i,r){var e=t.getReferringComponents("xAxis",ho).models[0],o=t.getReferringComponents("yAxis",ho).models[0];n.coordSysDims=["x","y"],i.set("x",e),i.set("y",o),vg(e)&&(r.set("x",e),n.firstCategoryDimIndex=0),vg(o)&&(r.set("y",o),null==n.firstCategoryDimIndex&&(n.firstCategoryDimIndex=1))},singleAxis:function(t,n,i,r){var e=t.getReferringComponents("singleAxis",ho).models[0];n.coordSysDims=["single"],i.set("single",e),vg(e)&&(r.set("single",e),n.firstCategoryDimIndex=0)},polar:function(t,n,i,r){var e=t.getReferringComponents("polar",ho).models[0],o=e.findAxisModel("radiusAxis"),a=e.findAxisModel("angleAxis");n.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",a),vg(o)&&(r.set("radius",o),n.firstCategoryDimIndex=0),vg(a)&&(r.set("angle",a),null==n.firstCategoryDimIndex&&(n.firstCategoryDimIndex=1))},geo:function(t,n){n.coordSysDims=["lng","lat"]},parallel:function(t,n,i,r){var e=t.ecModel,o=e.getComponent("parallel",t.get("parallelIndex")),a=n.coordSysDims=o.dimensions.slice();z(o.parallelAxisIndex,(function(t,o){var u=e.getComponent("parallelAxis",t),s=a[o];i.set(s,u),vg(u)&&(r.set(s,u),null==n.firstCategoryDimIndex&&(n.firstCategoryDimIndex=o))}))},matrix:function(t,n,i,r){var e=t.getReferringComponents("matrix",ho).models[0];n.coordSysDims=["x","y"];var o=e.getDimensionModel("x"),a=e.getDimensionModel("y");i.set("x",o),i.set("y",a),r.set("x",o),r.set("y",a)}};function vg(t){return"category"===t.get("type")}function dg(t,n){return!!n&&n===t.getCalculationInfo("stackedDimension")}function mg(t,n,i){i=i||{};var r,e,o=n.getSourceManager();e=(r=o.getSource()).sourceFormat===Vu;var a=function(t){var n=t.get("coordinateSystem"),i=new lg(n),r=cg[n];if(r)return r(t,i,i.axisMap,i.categoryAxisMap),i}(n),u=function(t,n){var i,r=t.get("coordinateSystem"),e=sc.get(r);return n&&n.coordSysDims&&(i=R(n.coordSysDims,(function(t){var i={name:t},r=n.axisMap.get(t);if(r){var e=r.get("type");i.type=function(t){return"category"===t?"ordinal":"time"===t?"time":"float"}(e)}return i}))),i||(i=e&&(e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice())||["x","y"]),i}(n,a),s=i.useEncodeDefaulter,f=U(s)?s:s?W(_c,u,n):null,h=function(t,n){Sv(t)||(t=Tv(t));var i=(n=n||{}).coordDimensions||[],r=n.dimensionsDefine||t.dimensionsDefine||[],e=ct(),o=[],a=function(t,n,i,r){var e=Math.max(t.dimensionsDetectedCount||1,n.length,i.length,r||0);return z(n,(function(t){var n;X(t)&&(n=t.dimsDef)&&(e=Math.max(e,n.length))})),e}(t,i,r,n.dimensionsCount),u=n.canOmitUnusedDimensions&&$y(a),s=r===t.dimensionsDefine,f=s?Zy(t):qy(r),h=n.encodeDefine;!h&&n.encodeDefaulter&&(h=n.encodeDefaulter(t,a));for(var l=ct(h),c=new sd(a),v=0;v<c.length;v++)c[v]=-1;function d(t){var n=c[t];if(n<0){var i=r[t],e=X(i)?i:{name:i},a=new Uy,u=e.name;return null!=u&&null!=f.get(u)&&(a.name=a.displayName=u),null!=e.type&&(a.type=e.type),null!=e.displayName&&(a.displayName=e.displayName),c[t]=o.length,a.storeDimIndex=t,o.push(a),a}return o[n]}if(!u)for(v=0;v<a;v++)d(v);l.each((function(t,n){var i=Ze(t).slice();if(1===i.length&&!G(i[0])&&i[0]<0)l.set(n,!1);else{var r=l.set(n,[]);z(i,(function(t,i){var e=G(t)?f.get(t):t;null!=e&&e<a&&(r[i]=e,p(d(e),n,i))}))}}));var m=0;function p(t,n,i){null!=Fu.get(n)?t.otherDims[n]=i:(t.coordDim=n,t.coordDimIndex=i,e.set(n,!0))}z(i,(function(t){var n,i,r,e;if(G(t))n=t,e={};else{n=(e=t).name;var o=e.ordinalMeta;e.ordinalMeta=null,(e=I({},e)).ordinalMeta=o,i=e.dimsDef,r=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}var u=l.get(n);if(!1!==u){if(!(u=Ze(u)).length)for(var f=0;f<(i&&i.length||1);f++){for(;m<a&&null!=d(m).coordDim;)m++;m<a&&u.push(m++)}z(u,(function(t,o){var a=d(t);if(s&&null!=e.type&&(a.type=e.type),p(O(a,e),n,o),null==a.name&&i){var u=i[o];!X(u)&&(u={name:u}),a.name=a.displayName=u.name,a.defaultTooltip=u.defaultTooltip}r&&O(a.otherDims,r)}))}}));var y=n.generateCoord,g=n.generateCoordCount,b=null!=g;g=y?g||1:0;var w=y||"value";function x(t){null==t.name&&(t.name=t.coordDim)}if(u)z(o,(function(t){x(t)})),o.sort((function(t,n){return t.storeDimIndex-n.storeDimIndex}));else for(var M=0;M<a;M++){var S=d(M);null==S.coordDim&&(S.coordDim=hg(w,e,b),S.coordDimIndex=0,(!y||g<=0)&&(S.isExtraCoord=!0),g--),x(S),null!=S.type||1!==zc(t,M)&&(!S.isExtraCoord||null==S.otherDims.itemName&&null==S.otherDims.seriesName)||(S.type="ordinal")}return bo(o,(function(t){return t.name}),(function(t,n){n>0&&(t.name=t.name+(n-1))})),new Yy({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:u})}(r,{coordDimensions:u,generateCoord:i.generateCoord,encodeDefine:n.getEncode(),encodeDefaulter:f,canOmitUnusedDimensions:!e}),l=function(t,n,i){var r,e;return i&&z(t,(function(t,o){var a=i.categoryAxisMap.get(t.coordDim);a&&(null==r&&(r=o),t.ordinalMeta=a.getOrdinalMeta(),n&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(e=!0)})),e||null==r||(t[r].otherDims.itemName=0),r}(h.dimensions,i.createInvertedIndices,a),c=e?null:o.getSharedDataStore(h),v=function(t,n,i){var r,e,o,a=(i=i||{}).byIndex,u=i.stackedCoordDimension;!function(t){return!Xy(t.schema)}(n)?(r=(e=n.schema).dimensions,o=n.store):r=n;var s,f,h,l,c=!(!t||!t.get("stack")),v=!0;function d(t){return"ordinal"!==t.type&&"time"!==t.type}if(z(r,(function(t,n){G(t)&&(r[n]=t={name:t}),d(t)||(v=!1)})),z(r,(function(t){c&&!t.isExtraCoord&&(a||s||!t.ordinalMeta||(s=t),f||!d(t)||v&&("x"===t.coordDim||"angle"===t.coordDim)||u&&u!==t.coordDim||(f=t))})),!f||a||s||(a=!0),f){h="__\0ecstackresult_"+t.id,l="__\0ecstackedover_"+t.id,s&&(s.createInvertedIndices=!0);var m=f.coordDim,p=f.type,y=0;z(r,(function(t){t.coordDim===m&&y++}));var g={name:h,coordDim:m,coordDimIndex:y,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},b={name:l,coordDim:l,coordDimIndex:y+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};e?(o&&(g.storeDimIndex=o.ensureCalculationDimension(l,p),b.storeDimIndex=o.ensureCalculationDimension(h,p)),e.appendCalculationDimension(g),e.appendCalculationDimension(b)):(r.push(g),r.push(b))}return{stackedDimension:f&&f.name,stackedByDimension:s&&s.name,isStackedByIndex:a,stackedOverDimension:l,stackResultDimension:h}}(n,{schema:h,store:c}),d=new fg(h,n);d.setCalculationInfo(v);var m=null!=l&&function(t){if(t.sourceFormat===Vu)return!H(Je(function(t){for(var n=0;n<t.length&&null==t[n];)n++;return t[n]}(t.data||[])))}(r)?function(t,n,i,r){return r===l?i:this.defaultDimValueGetter(t,n,i,r)}:null;return d.hasItemOption=!1,d.initData(e?r:c,null,m),d}var pg=function(){function t(){}return t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();Oo(pg);var yg=0,gg=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++yg,this._onCollect=t.onCollect}return t.createByAxisModel=function(n){var i=n.option,r=i.data,e=r&&R(r,bg);return new t({categories:e,needCollect:!e,deduplication:!1!==i.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var n,i=this._needCollect;if(!G(t)&&!i)return t;if(i&&!this._deduplication)return this.categories[n=this.categories.length]=t,this._onCollect&&this._onCollect(t,n),n;var r=this._getOrCreateMap();return null==(n=r.get(t))&&(i?(this.categories[n=this.categories.length]=t,r.set(t,n),this._onCollect&&this._onCollect(t,n)):n=NaN),n},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ct(this.categories))},t}();function bg(t){return X(t)&&null!=t.value?t.value:t+""}var wg=F({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function xg(t,n,i){return function(t,n){var i=t||{},r=[];i._extents=r,r[0]=n?n.slice():[1/0,-1/0],I(i,Ng)}(t=t||{},i),{brk:void 0,mapper:t}}function Mg(t,n){z(wg,(function(i){t[i]=n[i]}))}function Sg(t){t.freeze=pt}function kg(t){return t.getExtentUnsafe(0,2)}function Tg(t,n){return t.getExtentUnsafe(1,n)||t.getExtentUnsafe(0,n)}function Ag(t){var n=t.getExtentUnsafe(0,3);return n[1]-n[0]}var Ng={needTransform:function(){return!1},normalize:function(t){var n=this._extents[1]||this._extents[0];return n[1]===n[0]?.5:(t-n[0])/(n[1]-n[0])},scale:function(t){var n=this._extents[1]||this._extents[0];return t*(n[1]-n[0])+n[0]},transformIn:function(t){return t},transformOut:function(t){return t},contain:function(t){var n=Tg(this,null);return t>=n[0]&&t<=n[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(t){return this._extents[t]},setExtent:function(t,n){Lg(this._extents,0,t,n)},setExtent2:function(t,n,i){var r=this._extents;r[t]||(r[t]=r[0].slice()),Lg(r,t,n,i)},freeze:function(){}};function Lg(t,n,i,r){go(i,r)&&(t[n][0]=i,t[n][1]=r)}function Cg(t){return Ig(t)||Dg(t)}function Ig(t){return"interval"===t.type}function Og(t){return"time"===t.type}function Dg(t){return"log"===t.type}function _g(t){return"ordinal"===t.type}function Eg(t){return Ce(t)+2}function zg(t,n){return we(t)/we(n)}function Rg(t,n,i){var r=i&&i.lookup;if(r)for(var e=0;e<r.from.length;e++)if(t===r.from[e])return r.to[e];return be(n,t)}function Pg(t,n,i){var r=t.slice();if(r[0]===r[1]){var e=i&&i.ctnShp;if(0!==r[0]){var o=me(r[0]);n[1]||(r[1]+=o/2),r[0]-=o/2}else e?(r[0]=-1,r[1]=1):r[1]=1}return yo(r[0])&&yo(r[1])||(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function Bg(t,n){return pe(de(t=t||n,1))}function Fg(t,n,i){var r=kg(t),e=r[0],o=t.count(),a=Math.max((n||0)+1,1);0!==e&&a>1&&o/a>2&&(e=Math.round(Math.ceil(e/a)*a)),e!==r[0]&&s(r[0],!0,!0);for(var u=e;u<=r[1];u+=a)s(u,!1,u===r[0]||u===r[1]);function s(t,n,r){i({value:t,offInterval:n},r)}u-a!==r[1]&&s(r[1],!0,!0)}var Vg=function(t){function n(i){var r=t.call(this)||this;r.type="ordinal",r.parse=n.parse,Mg(r,n.decoratedMethods);var e=i.ordinalMeta;e||(e=new gg({})),H(e)&&(e=new gg({categories:R(e,(function(t){return X(t)?t.value:t}))})),r._ordinalMeta=e;var o=xg(null,0,i.extent||[0,e.categories.length-1]);return r._mapper=o.mapper,Sg(r),r}return o(n,t),n.parse=function(t){return null==t?t=NaN:G(t)?null==(t=this._ordinalMeta.getOrdinal(t))&&(t=NaN):t=pe(t),t},n.prototype.getTicks=function(){var t=[];return Fg(this,0,(function(n){t.push(n)})),t},n.prototype.getMinorTicks=function(){},n.prototype.setSortInfo=function(t){if(null!=t){for(var n=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],e=0,o=this._ordinalMeta.categories.length,a=ve(o,n.length);e<a;++e)r[i[e]=n[e]]=e;for(var u=0;e<o;++e){for(;null!=r[u];)u++;i[e]=u,r[u]=e}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},n.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},n.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},n.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[n];return null==i?"":i+""}},n.prototype.count=function(){var t=kg(this._mapper);return t[1]-t[0]+1},n.prototype.getOrdinalMeta=function(){return this._ordinalMeta},n.type="ordinal",n.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(t){return this._mapper.contain(this._getTickNumber(t))&&t>=0&&t<this._ordinalMeta.categories.length},normalize:function(t){return this._mapper.normalize(this._getTickNumber(t))},scale:function(t){return this.getRawOrdinalNumber(pe(this._mapper.scale(t)))},transformIn:function(t,n){return this._mapper.transformIn(this._getTickNumber(t),n)},transformOut:function(t,n){return this.getRawOrdinalNumber(this._mapper.transformOut(t,n))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(t,n){return this._mapper.getExtentUnsafe(t,n)},setExtent:function(t,n){return this._mapper.setExtent(t,n)},setExtent2:function(t,n,i){return this._mapper.setExtent2(t,n,i)}},n}(pg);function Wg(t,n){for(var i=t.getTicks({expandToNicedExtent:!0}),r=[],e=t.getExtent(),o=1;o<i.length;o++){var a=i[o],u=i[o-1];if(!u.break&&!a.break){for(var s=0,f=[],h=(a.value-u.value)/n,l=Eg(h);s<n-1;){var c=Ne(u.value+(s+1)*h,l);c>e[0]&&c<e[1]&&f.push(c),s++}r.push(f)}}return r}pg.registerClass(Vg);var Hg=function(t){function n(i){var r=t.call(this)||this;r.type="interval",r.parse=n.parse,xl(0,i=i||{});var e=xg(r,0,null);return r.brk=e.brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return o(n,t),n.parse=function(t){return null==t||""===t?NaN:Number(t)},n.prototype.getConfig=function(){return L(this._cfg)},n.prototype.setConfig=function(t){var n=kg(this);this._cfg=t=L(t),null==t.niceExtent&&(t.niceExtent=n.slice()),null==t.intervalPrecision&&(t.intervalPrecision=Eg(t.interval))},n.prototype.getTicks=function(t){t=t||{};var n=this._cfg,i=n.interval,r=kg(this),e=n.niceExtent,o=n.intervalPrecision,a=this.brk,u=[];if(!i)return u;r[0]<e[0]&&u.push({value:t.expandToNicedExtent?Ne(e[0]-i,o):r[0]});for(var s=function(t,n){return pe((n-t)/i)},f=n.intervalCount,h=e[0],l=0;;l++){if(null==f){if(h>e[1]||!isFinite(h)||!isFinite(e[1]))break}else{if(l>f)break;h=ve(h,e[1]),l===f&&(h=e[1])}if(u.push({value:h}),h=Ne(h+i,o),a){var c=a.calcNiceTickMultiple(h,s);c>=0&&(h=Ne(h+c*i,o))}if(u.length>0&&h===u[u.length-1].value)break;if(u.length>3e3)return[]}var v=u.length?u[u.length-1].value:e[1];return r[1]>v&&u.push({value:t.expandToNicedExtent?Ne(v+i,o):r[1]}),u},n.prototype.getMinorTicks=function(t){return Wg(this,t,Ml(this))},n.prototype.getLabel=function(t,n){if(null==t)return"";var i=n&&n.precision;return null==i?i=Ce(t.value)||0:"auto"===i&&(i=this._cfg.intervalPrecision),Jl(Ne(t.value,i,!0))},n.type="interval",n}(pg);pg.registerClass(Hg);var Ug=function(t){function n(i){var r=t.call(this)||this;r.type="time",r.parse=n.parse,r._locale=i.locale,r._useUTC=i.useUTC,r._interval=0,xl(0,i);var e=xg(r,0,null);return r.brk=e.brk,r}return o(n,t),n.prototype.getLabel=function(t){return zl(t.value,Il[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(El(this._minLevelUnit))]||Il.second,this._useUTC,this._locale)},n.prototype.getFormattedLabel=function(t,n,i){return function(t,n,i,r,e){var o=null;if(G(i))o=i;else if(U(i)){var a={time:t.time,level:t.time?t.time.level:0};o=i(t.value,n,a)}else{var u=t.time;if(u){var s=i[u.lowerTimeUnit][u.upperTimeUnit];o=s[Math.min(u.level,s.length-1)]||""}else{var f=Rl(t.value,e);o=i[f][f][0]}}return zl(new Date(t.value),o,e,r)}(t,n,i,this._locale,this._useUTC)},n.prototype.getTicks=function(){var t=this._interval,n=kg(this),i=this.brk,r=[];if(!t)return r;r=function(t,n,i,r,e,o){var a,u=Dl,s=0;function f(t,n,i,e,a,u,f){for(var h=function(t,n){var i=new Date(0);i[t](1);var r=i.getTime();i[t](1+n);var e=i.getTime()-r;return function(t,n){return Math.max(0,Math.round((n-t)/e))}}(a,t),l=n,c=new Date(l);l<i&&l<=r[1]&&(f.push({value:l}),!(s++>3e3));)if(c[a](c[e]()+t),l=c.getTime(),o){var v=o.calcNiceTickMultiple(l,h);v>0&&(c[a](c[e]()+v*t),l=c.getTime())}f.push({value:l,notAdd:l>r[1]})}function h(t,e,o){var a=[],u=!e.length;if(!function(t,n,i,r){return Pl(new Date(n),t,r).getTime()===Pl(new Date(i),t,r).getTime()}(El(t),r[0],r[1],i)){u&&(e=[{value:$g(r[0],t,i)},{value:r[1]}]);for(var s=0;s<e.length-1;s++){var h=e[s].value,l=e[s+1].value;if(h!==l){var c=void 0,v=void 0,d=void 0;switch(t){case"year":c=Math.max(1,Math.round(n/Tl/365)),v=Bl(i),d=jl(i);break;case"half-year":case"quarter":case"month":c=Yg(n),v=Fl(i),d=Yl(i);break;case"week":case"half-week":case"day":c=jg(n),v=Vl(i),d=Xl(i);break;case"half-day":case"quarter-day":case"hour":c=Xg(n),v=Wl(i),d=ql(i);break;case"minute":c=qg(n,!0),v=Hl(i),d=Zl(i);break;case"second":c=qg(n,!1),v=Ul(i),d=$l(i);break;case"millisecond":c=Zg(n),v=Gl(i),d=Kl(i)}l>=r[0]&&h<=r[1]&&f(c,h,l,v,d,0,a),"year"===t&&o.length>1&&0===s&&o.unshift({value:o[0].value-c})}}for(s=0;s<a.length;s++)o.push(a[s])}}for(var l=[],c=[],v=0,d=0,m=0;m<u.length;++m){var p=El(u[m]);if((a=u[m])===El(a)&&(h(u[m],l[l.length-1]||[],c),p!==(u[m+1]?El(u[m+1]):null))){if(c.length){d=v,c.sort((function(t,n){return t.value-n.value}));for(var y=[],g=0;g<c.length;++g){var b=c[g].value;0!==g&&c[g-1].value===b||(y.push(c[g]),b>=r[0]&&b<=r[1]&&v++)}var w=e/n;if(v>1.5*w&&d>w/1.5)break;if(l.push(y),v>w||t===u[m])break}c=[]}}var x=B(R(l,(function(t){return B(t,(function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd}))})),(function(t){return t.length>0})),M=x.length-1,S=[];for(m=0;m<x.length;++m)for(var k=x[m],T=0;T<k.length;++T){var A=Rl(k[T].value,i);S.push({value:k[T].value,time:{level:M-m,upperTimeUnit:A,lowerTimeUnit:A}})}bo(S,wo,null),S.sort((function(t,n){return t.value-n.value}));var N=S[0],L=S[S.length-1],C=Rl(r[0],i),I=Rl(r[1],i);return(!N||N.value>r[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:C,lowerTimeUnit:C},notNice:!0}),(!L||L.value<r[1])&&S.push({value:r[1],time:{level:0,upperTimeUnit:I,lowerTimeUnit:I},notNice:!0}),S}(this._minLevelUnit,this._approxInterval,this._useUTC,n,Ag(this),i);var e=Ol.length-1;return z(r,(function(t){t.time&&(e=Math.min(e,D(Ol,t.time.upperTimeUnit)))})),r},n.prototype.getMinorTicks=function(t){return Wg(this,t,Ml(this))},n.prototype.setTimeInterval=function(t){this._interval=t.interval,this._approxInterval=t.approxInterval,this._minLevelUnit=t.minLevelUnit},n.parse=function(t){return Y(t)?Math.round(t):+ze(t)},n.type="time",n}(pg),Gg=[["second",1e3],["minute",6e4],["hour",kl],["quarter-day",216e5],["half-day",432e5],["day",10368e4],["half-week",3024e5],["week",6048e5],["month",26784e5],["quarter",8208e6],["half-year",Al/2],["year",Al]];function jg(t){return(t/=Tl)>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Yg(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function Xg(t){return(t/=kl)>12?12:t>6?6:t>3.5?4:t>2?2:1}function qg(t,n){return(t/=n?6e4:1e3)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Zg(t){return de(Be(t,!0),1)}function $g(t,n,i){var r=Math.max(0,D(Ol,n)-1);return Pl(new Date(t),Ol[r],i).getTime()}pg.registerClass(Ug);var Kg=function(t){function n(i){var r=t.call(this)||this;r.type="log",r.parse=Hg.parse,r.base=i.logBase||10;var e=[],o=[];r._lookup={from:e,to:o},e[0]=e[1]=o[0]=o[1]=NaN,Mg(r,n.mapperMethods);var a={};return r.powStub=new Hg({breakParsed:a.original}),r.intervalStub=new Hg({breakParsed:a.transformed}),Sg(r),r}return o(n,t),n.prototype.getTicks=function(t){var n=this.base,i=this.powStub,r=this.intervalStub,e={lookup:{from:r.getExtent(),to:i.getExtent()}};return R(r.getTicks(t||{}),(function(t){return{value:Rg(t.value,n,e),break:void 0}}),this)},n.prototype.getMinorTicks=function(t){return Wg(this,t,Ml(this.powStub),this.intervalStub.getConfig())},n.prototype.getLabel=function(t,n){return this.intervalStub.getLabel(t,n)},n.type="log",n.mapperMethods={needTransform:function(){return!0},normalize:function(t){return this.intervalStub.normalize(zg(t,this.base))},scale:function(t){return Rg(this.intervalStub.scale(t),this.base,null)},transformIn:function(t,n){return t=zg(t,this.base),n&&2===n.depth?t:this.intervalStub.transformIn(t,n)},transformOut:function(t,n){var i=n?n.depth:null;return Jg.depth=i,Qg.lookup=this._lookup,Rg(2===i?t:this.intervalStub.transformOut(t,Jg),this.base,Qg)},contain:function(t){return this.powStub.contain(t)},setExtent:function(t,n){this.setExtent2(0,t,n)},setExtent2:function(t,n,i){if(!(!go(n,i)||n<=0||i<=0)){var r=tb,e=tb;if(0===t){var o=this._lookup;r=o.to,e=o.from}this.powStub.setExtent2(t,r[0]=n,r[1]=i);var a=this.base;this.intervalStub.setExtent2(t,e[0]=zg(n,a),e[1]=zg(i,a))}},getFilter:function(){return{g:0}},sanitize:function(t,n){return go(n[0],n[1])&&Ue(t)&&t<=0&&(t=n[0]),t},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(t,n){return null===n?this.powStub.getExtentUnsafe(t,null):this.intervalStub.getExtentUnsafe(t,n)}},n}(pg);pg.registerClass(Kg);var Jg={},Qg={},tb=[],nb={value:1,category:1,time:1,log:1},ib=ao();function rb(t){var n,i=t.getLabelModel().get("formatter");if("time"===t.type){var r=G(n=i)||U(n)?n:function(t){t=t||{};var n={},i=!0;return z(Ol,(function(n){i&&(i=null==t[n])})),z(Ol,(function(r,e){var o=t[r];n[r]={};for(var a=null,u=e;u>=0;u--){var s=Ol[u],f=X(o)&&!H(o)?o[s]:o,h=void 0;H(f)?a=(h=f.slice())[0]||"":G(f)?h=[a=f]:(null==a?a=Ll[r]:Nl[s].test(a)||(a=n[s][s][0]+" "+a),h=[a],i&&(h[1]="{primary|"+a+"}")),n[r][s]=h}})),n}(n);return function(n,i){return t.scale.getFormattedLabel(n,i,r)}}if(G(i))return function(n){var r=t.scale.getLabel(n);return i.replace("{value}",null!=r?r:"")};if(U(i)){if("category"===t.type)return function(n){return i(eb(t,n),n.value-t.scale.getExtent()[0],null)};return function(n,r){var e=null;return i(eb(t,n),r,e)}}return function(n){return t.scale.getLabel(n)}}function eb(t,n){var i=t.scale;return _g(i)?i.getLabel(n):n.value}function ob(t){var n=t.get("interval");return null==n?"auto":n}function ab(t){return"middle"===t||"center"===t}function ub(t){return t.getShallow("show")}function sb(t,n,i,r,e,o){var a,u,s=Dg(t),f=s?t.intervalStub:t;if(f.setExtent(r[0],r[1]),s){var h=t.powStub,l={depth:2},c=t.transformOut(r[0],l),v=t.transformOut(r[1],l),d=[(a=i)[0]!==(u=r)[0],a[1]!==u[1]];n[0]&&!d[0]&&(c=e[0]),n[1]&&!d[1]&&(v=e[1]),h.setExtent(c,v)}f.setConfig(o)}function fb(t,n){return _g(t)?t.getRawOrdinalNumber(n.value):n.value}function hb(t,n){return _g(t)&&!!n.get("boundaryGap")}var lb=function(){function t(){}return t.prototype.needIncludeZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}(),cb=ao();function vb(t,n){return db(function(t,n){var i=t.model,r=cb(jm(i.ecModel)).keyed,e=r&&r.get(n);return e&&e.get(i.uid)}(t,n))}function db(t){return{liPosMinGap:t?t.liPosMinGap:void 0}}function mb(t,n){var i=t.model,r=cb(jm(i.ecModel)).keys;r&&z(r.get(i.uid),(function(t){n(t)}))}function pb(t,n,i){if(t){var r=cb(jm(n.ecModel)),e=t.model.uid,o=r.axSer||(r.axSer=ct());(o.get(e)||o.set(e,[])).push(n);var a=n.subType,u=n.getBaseAxis()===t,s=gb.get(yb(a,u,i))||gb.get(yb(a,u,null));if(s){var f=r.keyed||(r.keyed=ct()),h=r.keys||(r.keys=ct()),l=s.key,c=f.get(l)||f.set(l,ct()),v=c.get(e);v||((v=c.set(e,{axis:t,sers:[],serByIdx:[]})).metrics=s.getMetrics(t),(h.get(e)||h.set(e,[])).push(l)),v.sers.push(n),v.serByIdx[n.seriesIndex]=n}}}function yb(t,n,i){return t+"|&"+tt(n,!0)+"|&"+(i||"")}ao();var gb=ct(),bb=ao(),wb=function(){function t(t,n,i,r,e){var o,a=_g(t),u=a?n.getCategories().length:null;if(a){var s=n.getCategories(!0);o=s&&!s.length}var f=i.slice();(Ig(t)||Dg(t)||Og(t))&&(mo(f,Mb(t,n.get("dataMin",!0))),po(f,Mb(t,n.get("dataMax",!0)))),function(t){var n=t[1]-t[0];return isFinite(n)&&n>=0}(f)||(f[0]=f[1]=NaN);var h=[],l=[!1,!1],c=n.get("min",!0);"dataMin"===c?(h[0]=f[0],l[0]=!0):(h[0]=Mb(t,U(c)?c({min:f[0],max:f[1]}):c),l[0]=null!=h[0]);var v=n.get("max",!0);"dataMax"===v?(h[1]=f[1],l[1]=!0):(h[1]=Mb(t,U(v)?v({min:f[0],max:f[1]}):v),l[1]=null!=h[1]);var d=function(t,n){var i;if(_g(t))i=[0,0];else{var r=n.get("boundaryGap");"boolean"==typeof r&&(r=null),i=H(r)?r:[r,r]}return[Sb(i[0]),Sb(i[1])]}(t,n),m=a?null:f[1]-f[0]||Math.abs(f[0]);null==h[0]&&(h[0]=a?o?f[0]:u?0:NaN:f[0]-d[0]*m),null==h[1]&&(h[1]=a?o?f[1]:u?u-1:NaN:f[1]+d[1]*m),!yo(h[0])&&(h[0]=NaN),!yo(h[1])&&(h[1]=NaN);var p=o||J(h[0])||J(h[1])||a&&!u,y=Ig(t),g=y&&n.needIncludeZero&&n.needIncludeZero();g&&(h[0]>0&&h[1]>0&&!l[0]&&(h[0]=0),h[0]<0&&h[1]<0&&!l[1]&&(h[1]=0));var b=!1;h[0]>h[1]&&(h.reverse(),b=!0);var w=Mb(t,n.get("startValue",!0)),x=null!=w;!Ue(w)&&r&&(w=t.getDefaultStartValue?t.getDefaultStartValue():0),Ue(w)&&(x||!y||g)&&(w<h[0]&&!l[0]?(h[0]=w,l[0]=!0):w>h[1]&&!l[1]&&(h[1]=w,l[1]=!0)),xb(this._i={scale:t,dataMM:f,noZoomEffMM:h,zoomMM:[],fixMM:l,zoomFixMM:[!1,!1],startValue:w,isBlank:p,incl0:g,tggAxInv:b,ctnShp:e},h)}return t.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},t.prototype.makeFinal=function(){var t=this._i,n=t.zoomMM,i=t.zoomFixMM,r=t.fixMM,e={fixMM:r,zoomFixMM:i,isBlank:t.isBlank,incl0:t.incl0,tggAxInv:t.tggAxInv,ctnShp:t.ctnShp,effMM:t.noZoomEffMM.slice()},o=e.effMM;return null!=n[0]&&(o[0]=n[0],r[0]=i[0]=!0),null!=n[1]&&(o[1]=n[1],r[1]=i[1]=!0),xb(t,o),e},t.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},t.prototype.setZoomMM=function(t,n){this._i.zoomMM[t]=n},t}();function xb(t,n){var i,r=t.scale,e=t.dataMM;r.sanitize&&(n[0]=r.sanitize(n[0],e),n[1]=r.sanitize(n[1],e),go((i=n)[0],i[1])&&i[0]>i[1]&&(i[0]=i[1]))}function Mb(t,n){return null==n?null:J(n)?NaN:t.parse(n)}function Sb(t){return Xr("boolean"==typeof t?0:t,1)||0}function kb(t){var n=bb(t.scale);return n.extent||(n.extent=[1/0,-1/0]),n}function Tb(t,n){var i=t.scale;i.rawExtentInfo||function(t,n,i,r,e){var o=kb(n),a=o.extent,u=!1;!function(t,n){var i=t.model.ecModel,r=cb(jm(i)).axSer;r&&function(t,n,i){if(n)for(var r=0;r<n.length;r++){var e=n[r];t.isSeriesFiltered(e)||i(e)}}(i,r.get(t.model.uid),n)}(n,(function(r){if(r.boxCoordinateSystem){var e=hc(r).coord,s=o.dimIdxInCoord;if(s>=0&&H(e)){var f=e[s];null==f||H(f)||vo(a,t.parse(f))}}else if(r.coordinateSystem){var h=r.getData();if(h){var l=t.getFilter?t.getFilter():null;z(function(t,n){var i={};return z(t.mapDimensionsAll(n),(function(n){i[function(t,n){return dg(t,n)?t.getCalculationInfo("stackResultDimension"):n}(t,n)]=!0})),F(i)}(h,i),(function(t){var n,i;n=a,go((i=h.getApproximateExtent(t,l))[0],i[1])&&(i[0]<n[0]&&(n[0]=i[0]),i[1]>n[1]&&(n[1]=i[1]))}))}r.__requireStartValue&&r.__requireStartValue(n)&&(u=!0)}}));var s=function(t,n,i){var r=hb(t,i),e=i.get("containShape",!0);if(null!=e||r||(e=!0),!e)return!1;var o=!1;return mb(n,(function(t){o=!!Nb.get(t)||o})),o}(t,n,r),f=new wb(t,r,a,u,s);Ab(t,f,e),o.extent=null}(i,t,t.dim,t.model,n)}function Ab(t,n,i){t.rawExtentInfo=n,n.from=i}var Nb=ct();function Lb(t,n,i,r){t.rawExtentInfo||function(t){var n=t.scale;Ab(n,new wb(n,t.model,[1/0,-1/0],!1,!1),3)}({scale:t,model:n});var e=t.rawExtentInfo.makeFinal(),o=e.effMM;return t.setExtent(o[0],o[1]),t.setBlank(e.isBlank),r&&e.tggAxInv&&i&&!i.get("legacyMinMaxDontInverseAxis")&&(r.inverse=!r.inverse),e}function Cb(t,n){var i=Dg(t),r=i?t.intervalStub:t,e=n.fixMinMax||[],o=i?t.getExtent():null,a=r.getExtent(),u=Pg(a,e,n.rawExtentResult);r.setExtent(u[0],u[1]),u=r.getExtent();var s=i?function(t,n){var i=Bg(n.splitNumber,10),r=t.getExtent(),e=Ag(t),o=de(Re(e),1);i/e*o<=.5&&(o*=10);var a=Eg(o);return{intervalPrecision:a,interval:o,niceExtent:[Ne(ge(r[0]/o)*o,a),Ne(ye(r[1]/o)*o,a)]}}(r,n):function(t,n){var i=Bg(n.splitNumber,5),r=Ag(t),e=n.minInterval,o=n.maxInterval,a=Be(r/i,!0);null!=e&&a<e&&(a=e),null!=o&&a>o&&(a=o);var u=Eg(a),s=t.getExtent();return{interval:a,intervalPrecision:u,niceExtent:[Ne(ge(s[0]/a)*a,u),Ne(ye(s[1]/a)*a,u)]}}(r,n),f=s.intervalPrecision,h=s.interval,l=n.userInterval;null!=l&&(s.interval=l,s.intervalPrecision=Eg(l)),e[0]||(u[0]=Ne(ye(u[0]/h)*h,f)),e[1]||(u[1]=Ne(ge(u[1]/h)*h,f)),null!=l&&(s.niceExtent=u.slice()),sb(t,e,a,u,o,s)}function Ib(t){var n=t.model;!function(t,n,i,r){var e=Lb(t,n,r,i),o=Ig(t)||Og(t);(function(t,n){Ob[t.type](t,n)})(t,{splitNumber:n.get("splitNumber"),fixMinMax:e.fixMM,userInterval:n.get("interval"),minInterval:o?n.get("minInterval"):null,maxInterval:o?n.get("maxInterval"):null,rawExtentResult:e}),i&&r&&function(t,n,i,r){var e;if(i.ctnShp&&(mb(t,(function(n){var i=Nb.get(n);if(i){var o=i(t,r);o&&(mo(e=e||[0,0],o[0]),po(e,o[1]),function(t){ib(t).noOnMyZero=!0}(t))}})),e)){var o=n.getExtent();if(_g(n))t.onBand||n.setExtent2(1,ve(o[0],o[0]+e[0]),de(o[1],o[1]+e[1]));else{var a=o.slice();i.zoomFixMM[0]||(a[0]=ve(a[0],n.transformOut(n.transformIn(a[0],null)+e[0],null))),i.zoomFixMM[1]||(a[1]=de(a[1],n.transformOut(n.transformIn(a[1],null)+e[1],null))),(a[0]<o[0]||a[1]>o[1])&&n.setExtent2(1,a[0],a[1])}}}(i,t,e,r)}(t.scale,n,n.axis,n.ecModel)}var Ob={interval:Cb,log:Cb,time:function(t,n){var i=t.getExtent();if(i[0]===i[1]&&(i[0]-=Tl,i[1]+=Tl),i[1]===-1/0&&i[0]===1/0){var r=new Date;i[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),i[0]=i[1]-Tl}t.setExtent(i[0],i[1]);var e=Bg(n.splitNumber,10),o=Ag(t)/e,a=n.minInterval,u=n.maxInterval;null!=a&&o<a&&(o=a),null!=u&&o>u&&(o=u);var s=Gg.length,f=Math.min(function(t,n,i,r){for(;i<r;){var e=i+r>>>1;t[e][1]<n?i=e+1:r=e}return i}(Gg,o,0,s),s-1),h=Gg[f][1],l=Gg[Math.max(f-1,0)][0];t.setTimeInterval({approxInterval:o,interval:h,minLevelUnit:l})},ordinal:pt},Db=[],_b={registerPreprocessor:Cy,registerProcessor:Iy,registerPostInit:function(t){Oy("afterinit",t)},registerPostUpdate:function(t){Oy("afterupdate",t)},registerUpdateLifecycle:Oy,registerAction:Dy,registerCoordinateSystem:function(t,n){sc.register(t,n)},registerLayout:function(t,n){zy(xy,t,n,1e3,"layout")},registerVisual:_y,registerTransform:function(t){var n=(t=L(t)).type;n||Ye("");var i=n.split(":");2!==i.length&&Ye("");var r=!1;"echarts"===i[0]&&(n=i[1],r=!0),t.__isBuiltIn=r,id.set(n,t)},registerLoading:Ry,registerMap:function(t,n,i){var r=Um.registerMap;r&&r(t,n,i)},registerImpl:function(t,n){Um[t]=n},PRIORITY:Rp,ComponentModel:Mc,ComponentView:Hd,SeriesModel:Ed,ChartView:Yd,registerComponentModel:function(t){Mc.registerClass(t)},registerComponentView:function(t){Hd.registerClass(t)},registerSeriesModel:function(t){Ed.registerClass(t)},registerChartView:function(t){Yd.registerClass(t)},registerCustomSeries:function(){},registerSubTypeDefaulter:function(t,n){Mc.registerSubTypeDefaulter(t,n)},registerPainter:function(t,n){he[t]=n}};function Eb(t){H(t)?z(t,(function(t){Eb(t)})):D(Db,t)>=0||(Db.push(t),U(t)&&(t={install:t}),t.install(_b))}var zb=ao(),Rb=ao();function Pb(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function Bb(t,n){var i=n.getExtent(),r=[];return z(t,(function(t){(t=n.parse(t))>=i[0]&&t<=i[1]&&r.push(t)})),bo(r,xo,null),Le(r),R(r,(function(t){return{value:t}}))}function Fb(t,n,i){var r,e,o=Wb(t),a=ob(n),u=1===i.kind;if(!u){var s=Ub(o,a);if(s)return s}U(a)?r=Xb(t,a,!1):(e="auto"===a?function(t,n){if(1===n.kind){var i=t.calculateCategoryInterval(n);return n.out.noPxChangeTryDetermine.push((function(){return Rb(t).autoInterval=i,!0})),i}var r=Rb(t).autoInterval;return null!=r?r:Rb(t).autoInterval=t.calculateCategoryInterval(n)}(t,i):a,r=Xb(t,e,!1));var f={labels:r,labelCategoryInterval:e};return u?i.out.noPxChangeTryDetermine.push((function(){return Gb(o,a,f),!0})):Gb(o,a,f),f}var Vb=Hb("axisTick"),Wb=Hb("axisLabel");function Hb(t){return function(n){return Rb(n)[t]||(Rb(n)[t]={list:[]})}}function Ub(t,n){for(var i=0;i<t.list.length;i++)if(t.list[i].key===n)return t.list[i].value}function Gb(t,n,i){return t.list.push({key:n,value:i}),i}function jb(t,n,i){return null==Yb(t,n,i)}function Yb(t,n,i){var r=zb(t.model),e=t.getExtent(),o=r.lastAutoInterval,a=r.lastTickCount;if(null!=o&&null!=a&&Math.abs(o-n)<=1&&Math.abs(a-i)<=1&&o>n&&r.axisExtent0===e[0]&&r.axisExtent1===e[1])return o;r.lastTickCount=i,r.lastAutoInterval=n,r.axisExtent0=e[0],r.axisExtent1=e[1]}function Xb(t,n,i){var r=rb(t),e=t.scale,o=[],a=U(n);return Fg(e,a?0:n,(function(t,u){var s=e.getLabel(t);if(a){var f=!!n(t.value,s);if(t.offInterval=!f,!f&&!u)return}o.push(i?t:{formattedLabel:r(t),rawLabel:s,tick:t})})),o}function qb(t,n){var i,r={w:NaN,w2:NaN},e=t.scale,o=(n=n||{}).fromStat,a=n.min,u=(i=Tg(e,3))[1]-i[0];Ue(u)||(u=NaN);var s=t.getExtent(),f=me(s[1]-s[0]);return _g(e)?function(t,n,i,r){var e=n.onBand,o=i+(e?1:0);0===o&&(o=1),t.w=r/o,!e&&i&&r&&(t.w2=t.w*i/r)}(r,t,u,f):o&&function(t,n,i,r,e){var o=!1,a=-1/0;z(e.key?[vb(n,e.key)]:function(t,n){var i,r,e=[];return i=function(t){for(var i=0;i<n.length;i++)n[i]&&t.serByIdx[n[i].seriesIndex]&&e.push(db(t))},(r=cb(jm(t.model.ecModel)).keyed)&&r.each((function(t){t.each((function(t){i(t)}))})),e}(n,e.sers||[]),(function(t){var n=t.liPosMinGap;null!=n&&(n>0?(n>a&&(a=n),o=!1):-2===n&&(o=!0))})),Ue(i)&&i>0&&Ue(a)?(t.w=r/i*a,t.w2=a):o&&(t.w=.8*r,t.w2=t.w*i/r)}(r,t,u,f,o),null!=a&&(r.w=Ue(r.w)?de(a,r.w):a),r}var Zb=[0,1],$b=function(){function t(t,n,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=n,this._extent=i||[0,0]}return t.prototype.contain=function(t){var n=this._extent,i=Math.min(n[0],n[1]),r=Math.max(n[0],n[1]);return t>=i&&t<=r},t.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,n){var i=this._extent;i[0]=t,i[1]=n},t.prototype.dataToCoord=function(t,n){var i=this.scale;return ke(t=i.normalize(i.parse(t)),Zb,Kb(this),n)},t.prototype.coordToData=function(t,n){var i=ke(t,Kb(this),Zb,n);return this.scale.scale(i)},t.prototype.pointToData=function(){},t.prototype.getTicksCoords=function(t){var n=(t=t||{}).tickModel||this.getTickModel(),i=R(function(t,n,i){var r=t.scale,e=t.getTickModel().get("customValues");return e?{ticks:Bb(e,r)}:"category"===t.type?function(t,n){var i,r,e=Vb(t),o=ob(n),a=Ub(e,o);if(a)return a;if(n.get("show")&&!t.scale.isBlank()||(i=[]),U(o))i=Xb(t,o,!0);else if("auto"===o){var u=Fb(t,t.getLabelModel(),Pb(2));r=u.labelCategoryInterval,i=R(u.labels,(function(t){return t.tick}))}else i=Xb(t,r=o,!0);return Gb(e,o,{ticks:i,tickCategoryInterval:r})}(t,n):{ticks:r.getTicks(i)}}(this,n,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}).ticks,(function(t){return{coord:this.dataToCoord(fb(this.scale,t)),tick:t}}),this),r=function(t,n,i){var r=n.length;if(!t.onBand||i||!r)return!1;var e=qb(t).w;if(!e)return!1;z(n,(function(t){t.coord-=e/2}));var o=t.scale.getExtent(),a=n[r-1];return a.tick.offInterval&&n.pop(),n.push({coord:a.coord+e,tick:{value:o[1]+1}}),!0}(this,i,n.get("alignWithLabel"));return R(i,(function(t){return{coord:t.coord,tickValue:t.tick.value,onBand:r}}))},t.prototype.getMinorTicksCoords=function(){if(_g(this.scale))return[];var t=this.model.getModel("minorTick").get("splitNumber");return t>0&&t<100||(t=5),R(this.scale.getMinorTicks(t),(function(t){return R(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(t){return function(t,n){var i=t.getLabelModel().get("customValues");if(i){var r=t.scale;return{labels:R(Bb(i,r),(function(n,i){return{formattedLabel:rb(t)(n,i),rawLabel:r.getLabel(n),tick:n}}))}}return"category"===t.type?function(t,n){var i=t.getLabelModel(),r=Fb(t,i,n);return!i.get("show")||t.scale.isBlank()?{labels:[]}:r}(t,n):function(t){var n=t.scale.getTicks(),i=rb(t);return{labels:R(n,(function(n,r){return{formattedLabel:i(n,r),rawLabel:t.scale.getLabel(n),tick:n}}))}}(t)}(this,t=t||Pb(2)).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){return qb(this,{min:1}).w},t.prototype.calculateCategoryInterval=function(t){return function(t,n){var i=n.kind,r=function(t){var n=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:n.get("rotate")||0,font:n.getFont()}}(t),e=rb(t),o=(r.axisRotate-r.labelRotate)/180*Math.PI,a=t.scale,u=a.getExtent(),s=a.count();if(u[1]-u[0]<1)return 0;var f=1;s>40&&(f=Math.max(1,Math.floor(s/40)));for(var h=u[0],l=t.dataToCoord(h+1)-t.dataToCoord(h),c=Math.abs(l*Math.cos(o)),v=Math.abs(l*Math.sin(o)),d=0,m=0;h<=u[1];h+=f){var p,y=Ur(e({value:h}),r.font,"center","top");p=1.3*y.height,d=Math.max(d,1.3*y.width,7),m=Math.max(m,p,7)}var g=d/c,b=m/v;isNaN(g)&&(g=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(g,b)));if(1===i)return n.out.noPxChangeTryDetermine.push(V(jb,null,t,w,s)),w;var x=Yb(t,w,s);return null!=x?x:w}(this,t=t||Pb(2))},t}();function Kb(t){var n=t.getExtent();if(t.onBand){var i=(n[1]-n[0])/t.scale.count()/2;n[0]+=i,n[1]-=i}return n}var Jb=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"];function Qb(t,n,i){i=i||3,n?t.dirty|=i:t.dirty&=~i}function tw(t,n){return n=n||3,null==t.dirty||!!(t.dirty&n)}function nw(t){if(t)return tw(t)&&function(t,n,i){var r=n.getComputedTransform();t.transform=zh(t.transform,r);var e=t.localRect=Eh(t.localRect,n.getBoundingRect()),o=n.style,a=o.margin,u=i&&i.marginForce,s=i&&i.minMarginForce,f=i&&i.marginDefault,h=o.__marginType;null==h&&f&&(a=f,h=tl.textMargin);for(var l=0;l<4;l++)iw[l]=h===tl.minMargin&&s&&null!=s[l]?s[l]:u&&null!=u[l]?u[l]:a?a[l]:0;h===tl.textMargin&&Ah(e,iw,!1,!1);var c=t.rect=Eh(t.rect,e);r&&c.applyTransform(r),h===tl.minMargin&&Ah(c,iw,!1,!1),t.axisAligned=Dh(r),(t.label=t.label||{}).ignore=n.ignore,Qb(t,!1),Qb(t,!0,2)}(t,t.label,t),t}var iw=[0,0,0,0];function rw(t,n){for(var i=0;i<Jb.length;i++){var r=Jb[i];null==t[r]&&(t[r]=n[r])}return nw(t)}function ew(t){var n=t.obb;return n&&!tw(t,2)||(t.obb=n=n||new th,n.fromBoundingRect(t.localRect,t.transform),Qb(t,!1,2)),n}function ow(t,n,i,r){return!(!t||!n)&&!(t.label&&t.label.ignore||n.label&&n.label.ignore)&&!!t.rect.intersect(n.rect,i,r)&&(!(!t.axisAligned||!n.axisAligned)||ew(t).intersect(ew(n),i,r))}var aw=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.hasSymbolVisual=!0,i}return o(n,t),n.prototype.getInitialData=function(){return mg(0,this,{useEncodeDefaulter:!0})},n.prototype.getLegendIcon=function(t){var n=new fe,i=rp("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(i),i.setStyle(t.lineStyle);var r=this.getData().getVisual("symbol"),e=this.getData().getVisual("symbolRotate"),o="none"===r?"circle":r,a=.8*t.itemHeight,u=rp(o,(t.itemWidth-a)/2,(t.itemHeight-a)/2,a,a,t.itemStyle.fill);return n.add(u),u.setStyle(t.itemStyle),u.rotation=("inherit"===t.iconRotate?e:t.iconRotate||0)*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),o.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=Sc.color.neutral00,u.style.lineWidth=2),n},n.type="series.line",n.dependencies=["grid","polar"],n.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1,triggerEvent:!1},n}(Ed);function uw(t,n){var i=t.mapDimensionsAll("defaultedLabel"),r=i.length;if(1===r){var e=Wv(t,n,i[0]);return null!=e?e+"":null}if(r){for(var o=[],a=0;a<i.length;a++)o.push(Wv(t,n,i[a]));return o.join(" ")}}var sw=function(t){function n(n,i,r,e){var o=t.call(this)||this;return o.updateData(n,i,r,e),o}return o(n,t),n.prototype._createSymbol=function(t,n,i,r,e,o){this.removeAll();var a=rp(t,-1,-1,2,2,null,o);a.attr({z2:tt(e,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),a.drift=fw,this._symbolType=t,this.add(a)},n.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},n.prototype.getSymbolType=function(){return this._symbolType},n.prototype.getSymbolPath=function(){return this.childAt(0)},n.prototype.highlight=function(){Ss(this.childAt(0))},n.prototype.downplay=function(){ks(this.childAt(0))},n.prototype.setZ=function(t,n){var i=this.childAt(0);i.zlevel=t,i.z=n},n.prototype.setDraggable=function(t,n){var i=this.childAt(0);i.draggable=t,i.cursor=!n&&t?"move":i.cursor},n.prototype.updateData=function(t,i,r,e){this.silent=!1;var o,a=t.getItemVisual(i,"symbol")||"circle",u=t.hostModel,s=n.getSymbolSize(t,i),f=n.getSymbolZ2(t,i),h=a!==this._symbolType,l=e&&e.disableAnimation;if(h){var c=t.getItemVisual(i,"symbolKeepAspect");this._createSymbol(a,t,i,s,f,c)}else{(d=this.childAt(0)).silent=!1;var v={scaleX:s[0]/2,scaleY:s[1]/2};l?d.attr(v):oh(d,v,u,i),rh(o=d).oldStyle=o.style}if(this._updateCommon(t,i,s,r,e),h){var d=this.childAt(0);l||(v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}},d.scaleX=d.scaleY=0,d.style.opacity=0,ah(d,v,u,i))}l&&this.childAt(0).stopAnimation("leave")},n.prototype._updateCommon=function(t,n,i,r,e){var o,a,u,s,f,h,l,c,v,d=this.childAt(0),m=t.hostModel;if(r&&(o=r.emphasisItemStyle,a=r.blurItemStyle,u=r.selectItemStyle,s=r.focus,f=r.blurScope,l=r.labelStatesModels,c=r.hoverScale,v=r.cursorStyle,h=r.emphasisDisabled),!r||t.hasItemOption){var p=r&&r.itemModel?r.itemModel:t.getItemModel(n),y=p.getModel("emphasis");o=y.getModel("itemStyle").getItemStyle(),u=p.getModel(["select","itemStyle"]).getItemStyle(),a=p.getModel(["blur","itemStyle"]).getItemStyle(),s=y.get("focus"),f=y.get("blurScope"),h=y.get("disabled"),l=Gh(p),c=y.getShallow("scale"),v=p.getShallow("cursor")}var g=t.getItemVisual(n,"symbolRotate");d.attr("rotation",(g||0)*Math.PI/180||0);var b=ep(t.getItemVisual(n,"symbolOffset"),i);b&&(d.x=b[0],d.y=b[1]),v&&d.attr("cursor",v);var w=t.getItemVisual(n,"style"),x=w.fill;if(d instanceof du){var M=d.style;d.useStyle(I({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},w))}else d.useStyle(d.__isEmptyBrush?I({},w):w),d.style.decal=null,d.setColor(x,e&&e.symbolInnerColor),d.style.strokeNoScale=!0;var S=t.getItemVisual(n,"liftZ"),k=this._z2;null!=S?null==k&&(this._z2=d.z2,d.z2+=S):null!=k&&(d.z2=k,this._z2=null);var T=e&&e.useNameLabel;Uh(d,l,{labelFetcher:m,labelDataIndex:n,defaultText:function(n){return T?t.getName(n):uw(t,n)},inheritColor:x,defaultOpacity:w.opacity}),this._sizeX=i[0]/2,this._sizeY=i[1]/2;var A=d.ensureState("emphasis");A.style=o,d.ensureState("select").style=u,d.ensureState("blur").style=a;var N=null==c||!0===c?Math.max(1.1,3/this._sizeY):isFinite(c)&&c>0?+c:1;A.scaleX=this._sizeX*N,A.scaleY=this._sizeY*N,this.setSymbolScale(1),Rs(this,s,f,h)},n.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},n.prototype.fadeOut=function(t,n,i){var r=this.childAt(0),e=Ru(this).dataIndex,o=i&&i.animation;if(this.silent=r.silent=!0,i&&i.fadeLabel){var a=r.getTextContent();a&&sh(a,{style:{opacity:0}},n,{dataIndex:e,removeOpt:o,cb:function(){r.removeTextContent()}})}else r.removeTextContent();sh(r,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:e,cb:t,removeOpt:o})},n.getSymbolSize=function(t,n){return H(i=t.getItemVisual(n,"symbolSize"))||(i=[+i,+i]),[i[0]||0,i[1]||0];var i},n.getSymbolZ2=function(t,n){return t.getItemVisual(n,"z2")},n}(fe);function fw(t,n){this.parent.drift(t,n)}function hw(t,n,i,r){return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(r&&r.isIgnore&&r.isIgnore(i))&&!(r&&r.clipShape&&!r.clipShape.contain(n[0],n[1]))&&"none"!==t.getItemVisual(i,"symbol")}function lw(t){return null==t||X(t)||(t={isIgnore:t}),t||{}}function cw(t){var n=t.hostModel,i=n.getModel("emphasis");return{emphasisItemStyle:i.getModel("itemStyle").getItemStyle(),blurItemStyle:n.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:n.getModel(["select","itemStyle"]).getItemStyle(),focus:i.get("focus"),blurScope:i.get("blurScope"),emphasisDisabled:i.get("disabled"),hoverScale:i.get("scale"),labelStatesModels:Gh(n),cursorStyle:n.get("cursor")}}function vw(t,n,i,r,e,o,a){var u=new t(n,i,r,e);return u.setPosition(o),n.setItemGraphicEl(i,u),a.add(u),u}var dw=function(){function t(t){this.group=new fe,this._SymbolCtor=t||sw}return t.prototype.updateData=function(t,n){this._progressiveEls=null,n=lw(n);var i=this.group,r=t.hostModel,e=this._data,o=this._SymbolCtor,a=n.disableAnimation,u=this._seriesScope=cw(t),s={disableAnimation:a},f=n.getSymbolPoint||function(n){return t.getItemLayout(n)};e||i.removeAll(),t.diff(e).add((function(r){var e=f(r);hw(t,e,r,n)&&vw(o,t,r,u,s,e,i)})).update((function(h,l){var c=e.getItemGraphicEl(l),v=f(h);if(hw(t,v,h,n)){var d=t.getItemVisual(h,"symbol")||"circle",m=c&&c.getSymbolType&&c.getSymbolType();if(!c||m&&m!==d)i.remove(c),(c=new o(t,h,u,s)).setPosition(v);else{c.updateData(t,h,u,s);var p={x:v[0],y:v[1]};a?c.attr(p):oh(c,p,r)}i.add(c),t.setItemGraphicEl(h,c)}else i.remove(c)})).remove((function(t){var n=e.getItemGraphicEl(t);n&&n.fadeOut((function(){i.remove(n)}),r)})).execute(),this._getSymbolPoint=f,this._data=t},t.prototype.updateLayout=function(t){var n=this._data;if(n)for(var i=this,r=0,e=n.getStore().count();r<e;r++){var o=n.getItemGraphicEl(r),a=i._getSymbolPoint(r);hw(n,a,r,t)?((o=o||vw(i._SymbolCtor,n,r,i._seriesScope,{disableAnimation:!0},a,i.group)).stopAnimation(),o.setPosition(a),o.markRedraw()):o&&(i.group.remove(o),n.setItemGraphicEl(r,null))}},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=cw(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,n,i,r){function e(t){t.isGroup||(t.incremental=i,t.ensureState("emphasis").hoverLayer=2)}this._progressiveEls=[],r=lw(r);for(var o=t.start;o<t.end;o++){var a=n.getItemLayout(o);if(hw(n,a,o,r)){var u=new this._SymbolCtor(n,o,this._seriesScope);u.traverse(e),u.setPosition(a),this.group.add(u),n.setItemGraphicEl(o,u),this._progressiveEls.push(u)}}},t.prototype.eachRendered=function(t){Oh(this._progressiveEls||this.group,t)},t.prototype.remove=function(t){var n=this.group,i=this._data;i&&t?i.eachItemGraphicEl((function(t){t.fadeOut((function(){n.remove(t)}),i.hostModel)})):n.removeAll()},t}();function mw(t,n,i){var r=t.getBaseAxis(),e=t.getOtherAxis(r),o=function(t,n){var i=0,r=t.scale.getExtent();return"start"===n?i=r[0]:"end"===n?i=r[1]:Y(n)&&!isNaN(n)?i=n:r[0]>0?i=r[0]:r[1]<0&&(i=r[1]),i}(e,i),a=r.dim,u=e.dim,s=n.mapDimension(u),f=n.mapDimension(a),h="x"===u||"radius"===u?1:0,l=R(t.dimensions,(function(t){return n.mapDimension(t)})),c=!1,v=n.getCalculationInfo("stackResultDimension");return dg(n,l[0])&&(c=!0,l[0]=v),dg(n,l[1])&&(c=!0,l[1]=v),{dataDimsForPoint:l,valueStart:o,valueAxisDim:u,baseAxisDim:a,stacked:!!c,valueDim:s,baseDim:f,baseDataOffset:h,stackedOverDimension:n.getCalculationInfo("stackedOverDimension")}}function pw(t,n,i,r){var e=NaN;t.stacked&&(e=i.get(i.getCalculationInfo("stackedOverDimension"),r)),isNaN(e)&&(e=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=i.get(t.baseDim,r),a[1-o]=e,n.dataToPoint(a)}function yw(t,n){return!isFinite(t)||!isFinite(n)}var gw=typeof Float32Array!==Pu?Float32Array:void 0;function bw(t){return function(t,n){var i=t.arr,r=t.ctor;if(n>Oe&&(n=Oe),!i||t.typed&&i.length<n){var e=void 0;if(r)try{e=new r(n),t.typed=!0,i&&e.set(i)}catch(t){}if(!e&&(e=[],t.typed=!1,i))for(var o=0,a=i.length;o<a;o++)e[o]=i[o];t.arr=e}return t}({ctor:gw},t).arr}var ww=Math.min,xw=Math.max;function Mw(t,n,i,r,e,o,a,u,s){for(var f,h,l,c,v,d,m=i,p=0;p<r;p++){var y=n[2*m],g=n[2*m+1];if(m>=e||m<0)break;if(yw(y,g)){if(s){m+=o;continue}break}if(m===i)t[o>0?"moveTo":"lineTo"](y,g),l=y,c=g;else{var b=y-f,w=g-h;if(b*b+w*w<.5){m+=o;continue}if(a>0){for(var x=m+o,M=n[2*x],S=n[2*x+1];M===y&&S===g&&p<r;)p++,M=n[2*(x+=o)],S=n[2*x+1],b=(y=n[2*(m+=o)])-f,w=(g=n[2*m+1])-h;var k=p+1;if(s)for(;yw(M,S)&&k<r;)k++,M=n[2*(x+=o)],S=n[2*x+1];var T=.5,A=0,N=0,L=void 0,C=void 0;if(k>=r||yw(M,S))v=y,d=g;else{A=M-f,N=S-h;var I=y-f,O=M-y,D=g-h,_=S-g,E=void 0,z=void 0;if("x"===u){var R=A>0?1:-1;v=y-R*(E=Math.abs(I))*a,d=g,L=y+R*(z=Math.abs(O))*a,C=g}else if("y"===u){var P=N>0?1:-1;v=y,d=g-P*(E=Math.abs(D))*a,L=y,C=g+P*(z=Math.abs(_))*a}else E=Math.sqrt(I*I+D*D),v=y-A*a*(1-(T=(z=Math.sqrt(O*O+_*_))/(z+E))),d=g-N*a*(1-T),C=g+N*a*T,L=ww(L=y+A*a*T,xw(M,y)),C=ww(C,xw(S,g)),L=xw(L,ww(M,y)),d=g-(N=(C=xw(C,ww(S,g)))-g)*E/z,v=ww(v=y-(A=L-y)*E/z,xw(f,y)),d=ww(d,xw(h,g)),L=y+(A=y-(v=xw(v,ww(f,y))))*z/E,C=g+(N=g-(d=xw(d,ww(h,g))))*z/E}t.bezierCurveTo(l,c,v,d,y,g),l=L,c=C}else t.lineTo(y,g)}f=y,h=g,m+=o}return p}var Sw=function(){this.smooth=0,this.smoothConstraint=!0},kw=function(t){function n(n){var i=t.call(this,n)||this;return i.type="ec-polyline",i}return o(n,t),n.prototype.getDefaultStyle=function(){return{stroke:Sc.color.neutral99,fill:null}},n.prototype.getDefaultShape=function(){return new Sw},n.prototype.buildPath=function(t,n){var i=n.points,r=0,e=i.length/2;if(n.connectNulls){for(;e>0&&yw(i[2*e-2],i[2*e-1]);e--);for(;r<e&&yw(i[2*r],i[2*r+1]);r++);}for(;r<e;)r+=Mw(t,i,r,e,e,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},n.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i,r,e=this.path.data,o=Ua.CMD,a="x"===n,u=[],s=0;s<e.length;){var f=void 0,h=void 0,l=void 0,c=void 0,v=void 0,d=void 0,m=void 0;switch(e[s++]){case o.M:i=e[s++],r=e[s++];break;case o.L:if(f=e[s++],h=e[s++],(m=a?(t-i)/(f-i):(t-r)/(h-r))<=1&&m>=0){var p=a?(h-r)*m+r:(f-i)*m+i;return a?[t,p]:[p,t]}i=f,r=h;break;case o.C:f=e[s++],h=e[s++],l=e[s++],c=e[s++],v=e[s++],d=e[s++];var y=a?fi(i,f,l,v,t,u):fi(r,h,c,d,t,u);if(y>0)for(var g=0;g<y;g++){var b=u[g];if(b<=1&&b>=0)return p=a?ui(r,h,c,d,b):ui(i,f,l,v,b),a?[t,p]:[p,t]}i=v,r=d}}},n}(fu),Tw=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n}(Sw),Aw=function(t){function n(n){var i=t.call(this,n)||this;return i.type="ec-polygon",i}return o(n,t),n.prototype.getDefaultShape=function(){return new Tw},n.prototype.buildPath=function(t,n){var i=n.points,r=n.stackedOnPoints,e=0,o=i.length/2,a=n.smoothMonotone;if(n.connectNulls){for(;o>0&&yw(i[2*o-2],i[2*o-1]);o--);for(;e<o&&yw(i[2*e],i[2*e+1]);e++);}for(;e<o;){var u=Mw(t,i,e,o,o,1,n.smooth,a,n.connectNulls);Mw(t,r,e+u-1,u,o,-1,n.stackedOnSmooth,a,n.connectNulls),e+=u+1,t.closePath()}},n}(fu);function Nw(t){var n=t.coordinateSystem;if(t.get("clip",!0)&&n&&(!n.shouldClip||n.shouldClip()))return n.getArea&&n.getArea(.1)}function Lw(t,n){if(t.length===n.length){for(var i=0;i<t.length;i++)if(t[i]!==n[i])return;return!0}}function Cw(t){for(var n=[1/0,-1/0],i=[1/0,-1/0],r=0;r<t.length;){var e=t[r++],o=t[r++];yw(e,o)||(vo(n,e),vo(i,o))}return[n,i]}function Iw(t,n){var i=Cw(t),r=i[0],e=i[1],o=Cw(n),a=o[0],u=o[1];return Math.max(Math.abs(r[0]-a[0]),Math.abs(e[0]-u[0]),Math.abs(r[1]-a[1]),Math.abs(e[1]-u[1]))}function Ow(t){return Y(t)?t:t?.5:0}function Dw(t,n,i,r,e){var o=i.getBaseAxis(),a="x"===o.dim||"radius"===o.dim?0:1,u=[],s=0,f=[],h=[],l=[],c=[];if(e){for(s=0;s<t.length;s+=2){var v=n||t;yw(v[s],v[s+1])||c.push(t[s],t[s+1])}t=c}for(s=0;s<t.length-2;s+=2)switch(l[0]=t[s+2],l[1]=t[s+3],h[0]=t[s],h[1]=t[s+1],u.push(h[0],h[1]),r){case"end":f[a]=l[a],f[1-a]=h[1-a],u.push(f[0],f[1]);break;case"middle":var d=[];f[a]=d[a]=(h[a]+l[a])/2,f[1-a]=h[1-a],d[1-a]=l[1-a],u.push(f[0],f[1]),u.push(d[0],d[1]);break;default:f[a]=h[a],f[1-a]=l[1-a],u.push(f[0],f[1])}return u.push(t[s++],t[s++]),u}function _w(t,n){return[t[2*n],t[2*n+1]]}function Ew(t){if(t.get(["endLabel","show"]))return!0;for(var n=0;n<ts.length;n++)if(t.get([ts[n],"endLabel","show"]))return!0;return!1}function zw(t,n,i,r){if(function(t){return"cartesian2d"===t.type}(n)){var e=r.getModel("endLabel"),o=e.get("valueAnimation"),a=r.getData(),u={lastFrameIndex:0},s=Ew(r)?function(i,r){t._endLabelOnDuring(i,r,a,u,o,e,n)}:null,f=n.getBaseAxis().isHorizontal(),h=function(t,n,i,r,e){var o=t.getArea(),a=o.x,u=o.y,s=o.width,f=o.height,h=i.get(["lineStyle","width"])||0;a-=h/2,u-=h/2,s+=h,f+=h,s=Math.ceil(s),a!==Math.floor(a)&&(a=Math.floor(a),s++);var l=new xu({shape:{x:a,y:u,width:s,height:f}});if(n){var c=t.getBaseAxis(),v=c.isHorizontal(),d=c.inverse;v?(d&&(l.shape.x+=s),l.shape.width=0):(d||(l.shape.y+=f),l.shape.height=0);var m=U(e)?function(t){e(t,l)}:null;ah(l,{shape:{width:s,height:f,x:a,y:u}},i,null,r,m)}return l}(n,i,r,(function(){var n=t._endLabel;n&&i&&null!=u.originalX&&n.attr({x:u.originalX,y:u.originalY})}),s);if(!r.get("clip",!0)){var l=h.shape,c=Math.max(l.width,l.height);f?(l.y-=c,l.height+=2*c):(l.x-=c,l.width+=2*c)}return s&&s(1,h),h}return function(t,n,i){var r=t.getArea(),e=Ne(r.r0,1),o=Ne(r.r,1),a=new Tf({shape:{cx:Ne(t.cx,1),cy:Ne(t.cy,1),r0:e,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return n&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=e,ah(a,{shape:{endAngle:r.endAngle,r:o}},i)),a}(n,i,r)}var Rw=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.init=function(){var t=new fe,n=new dw;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=V(this._changePolyState,this)},n.prototype.render=function(t,n,i){var r=t.coordinateSystem,e=this.group,o=t.getData(),a=t.getModel("lineStyle"),u=t.getModel("areaStyle"),s=o.getLayout("points")||[],f="polar"===r.type,h=this._coordSys,l=this._symbolDraw,c=this._polyline,v=this._polygon,d=this._lineGroup,m=!n.ssr&&t.get("animation"),p=!u.isEmpty(),y=u.get("origin"),g=mw(r,o,y),b=p&&function(t,n,i){if(null==i.valueDim)return[];for(var r=n.count(),e=bw(2*r),o=0;o<r;o++){var a=pw(i,t,n,o);e[2*o]=a[0],e[2*o+1]=a[1]}return e}(r,o,g),w=t.get("showSymbol"),x=t.get("connectNulls"),M=w&&!f&&function(t,n,i){var r=t.get("showAllSymbol"),e="auto"===r;if(!r||e){var o=i.getAxesByScale("ordinal")[0];if(o&&(!e||!function(t,n){var i=t.getExtent(),r=Math.abs(i[1]-i[0])/t.scale.count();isNaN(r)&&(r=0);for(var e=n.count(),o=Math.max(1,Math.round(e/5)),a=0;a<e;a+=o)if(1.5*sw.getSymbolSize(n,a)[t.isHorizontal()?1:0]>r)return!1;return!0}(o,n))){var a=n.mapDimension(o.dim),u={};return z(o.getViewLabels(),(function(t){t.tick.offInterval||(u[fb(o.scale,t.tick)]=1)})),function(t){return!u.hasOwnProperty(n.get(a,t))}}}}(t,o,r),S=this._data;S&&S.eachItemGraphicEl((function(t,n){t.__temp&&(e.remove(t),S.setItemGraphicEl(n,null))})),w||l.remove(),e.add(d);var k,T=!f&&t.get("step");r&&r.getArea&&t.get("clip",!0)&&(null!=(k=r.getArea()).width?(k.x-=.1,k.y-=.1,k.width+=.2,k.height+=.2):k.r0&&(k.r0-=.5,k.r+=.5)),this._clipShapeForSymbol=k;var A=function(t,n,i){var r=t.getVisual("visualMeta");if(r&&r.length&&t.count()&&"cartesian2d"===n.type){for(var e,o,a=r.length-1;a>=0;a--){var u=t.getDimensionInfo(r[a].dimension);if("x"===(e=u&&u.coordDim)||"y"===e){o=r[a];break}}if(o){var s=n.getAxis(e),f=R(o.stops,(function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}})),h=f.length,l=o.outerColors.slice();h&&f[0].coord>f[h-1].coord&&(f.reverse(),l.reverse());var c=function(t,n){var i,r,e=[],o=t.length;function a(t,n,i){var r=t.coord;return{coord:i,color:function(t,n){if(n&&n.length&&t>=0&&t<=1){var i=t*(n.length-1),r=Math.floor(i),e=Math.ceil(i),o=Ri(n[r]),a=Ri(n[e]),u=i-r;return Vi([Ti(Ii(o[0],a[0],u)),Ti(Ii(o[1],a[1],u)),Ti(Ii(o[2],a[2],u)),Ai(Ii(o[3],a[3],u))],"rgba")}}((i-r)/(n.coord-r),[t.color,n.color])}}for(var u=0;u<o;u++){var s=t[u],f=s.coord;if(f<0)i=s;else{if(f>n){r?e.push(a(r,s,n)):i&&e.push(a(i,s,0),a(i,s,n));break}i&&(e.push(a(i,s,0)),i=null),e.push(s),r=s}}return e}(f,"x"===e?i.getWidth():i.getHeight()),v=c.length;if(!v&&h)return f[0].coord<0?l[1]?l[1]:f[h-1].color:l[0]?l[0]:f[0].color;var d=c[0].coord-10,m=c[v-1].coord+10,p=m-d;if(p<.001)return"transparent";z(c,(function(t){t.offset=(t.coord-d)/p})),c.push({offset:v?c[v-1].offset:.5,color:l[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:l[0]||"transparent"});var y=new Gf(0,0,0,0,c,!0);return y[e]=d,y[e+"2"]=m,y}}}(o,r,i)||o.getVisual("style")[o.getVisual("drawType")];if(c&&h.type===r.type&&T===this._step){p&&!v?v=this._newPolygon(s,b):v&&!p&&(d.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(t,r,oc(A));var N=d.getClipPath();N?ah(N,{shape:zw(this,r,!1,t).shape},t):d.setClipPath(zw(this,r,!0,t)),w&&l.updateData(o,{isIgnore:M,clipShape:k,disableAnimation:!0,getSymbolPoint:function(t){return[s[2*t],s[2*t+1]]}}),Lw(this._stackedOnPoints,b)&&Lw(this._points,s)||(m?this._doUpdateAnimation(o,b,r,i,T,y,x):(T&&(b&&(b=Dw(b,s,r,T,x)),s=Dw(s,null,r,T,x)),c.setShape({points:s}),v&&v.setShape({points:s,stackedOnPoints:b})))}else w&&l.updateData(o,{isIgnore:M,clipShape:k,disableAnimation:!0,getSymbolPoint:function(t){return[s[2*t],s[2*t+1]]}}),m&&this._initSymbolLabelAnimation(o,r,k),T&&(b&&(b=Dw(b,s,r,T,x)),s=Dw(s,null,r,T,x)),c=this._newPolyline(s),p?v=this._newPolygon(s,b):v&&(d.remove(v),v=this._polygon=null),f||this._initOrUpdateEndLabel(t,r,oc(A)),d.setClipPath(zw(this,r,!0,t));var L=t.getModel("emphasis"),C=L.get("focus"),I=L.get("blurScope"),D=L.get("disabled");c.useStyle(O(a.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),Fs(c,t,"lineStyle"),c.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(c.getState("emphasis").style.lineWidth=+c.style.lineWidth+1),Ru(c).seriesIndex=t.seriesIndex,Rs(c,C,I,D);var _=Ow(t.get("smooth")),E=t.get("smoothMonotone");if(c.setShape({smooth:_,smoothMonotone:E,connectNulls:x}),v){var P=o.getCalculationInfo("stackedOnSeries"),B=0;v.useStyle(O(u.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:o.getVisual("style").decal})),P&&(B=Ow(P.get("smooth"))),v.setShape({smooth:_,stackedOnSmooth:B,smoothMonotone:E,connectNulls:x}),Fs(v,t,"areaStyle"),Ru(v).seriesIndex=t.seriesIndex,Rs(v,C,I,D)}var F=this._changePolyState;o.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=F)})),this._polyline.onHoverStateChange=F,this._data=o,this._coordSys=r,this._stackedOnPoints=b,this._points=s,this._step=T,this._valueOrigin=y;var V=t.get("triggerEvent"),W=t.get("triggerLineEvent"),H=!0===W||!0===V||"area"===V;this.packEventData(t,c,!0===W||!0===V||"line"===V),v&&this.packEventData(t,v,H)},n.prototype.packEventData=function(t,n,i){Ru(n).eventData=i?{componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line",selfType:n===this._polygon?"area":"line"}:null},n.prototype.highlight=function(t,n,i,r){var e=t.getData(),o=oo(e,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=e.getLayout("points"),u=e.getItemGraphicEl(o);if(!u){var s=a[2*o],f=a[2*o+1];if(yw(s,f))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s,f))return;var h=t.get("zlevel")||0,l=t.get("z")||0;(u=new sw(e,o)).x=s,u.y=f,u.setZ(h,l);var c=u.getSymbolPath().getTextContent();c&&(c.zlevel=h,c.z=l,c.z2=this._polyline.z2+1),u.__temp=!0,e.setItemGraphicEl(o,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Yd.prototype.highlight.call(this,t,n,i,r)},n.prototype.downplay=function(t,n,i,r){var e=t.getData(),o=oo(e,r);if(this._changePolyState("normal"),null!=o&&o>=0){var a=e.getItemGraphicEl(o);a&&(a.__temp?(e.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Yd.prototype.downplay.call(this,t,n,i,r)},n.prototype._changePolyState=function(t){var n=this._polygon;gs(this._polyline,t),n&&gs(n,t)},n.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new kw({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},n.prototype._newPolygon=function(t,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Aw({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},n.prototype._initSymbolLabelAnimation=function(t,n,i){var r,e,o=n.getBaseAxis(),a=o.inverse;"cartesian2d"===n.type?(r=o.isHorizontal(),e=!1):"polar"===n.type&&(r="angle"===o.dim,e=!0);var u=t.hostModel,s=u.get("animationDuration");U(s)&&(s=s(null));var f=u.get("animationDelay")||0,h=U(f)?f(null):f;t.eachItemGraphicEl((function(t,o){var u=t;if(u){var l=void 0,c=void 0,v=void 0;if(i)if(e){var d=i,m=n.pointToCoord([t.x,t.y]);r?(l=d.startAngle,c=d.endAngle,v=-m[1]/180*Math.PI):(l=d.r0,c=d.r,v=m[0])}else r?(l=i.x,c=i.x+i.width,v=t.x):(l=i.y+i.height,c=i.y,v=t.y);var p=c===l?0:(v-l)/(c-l);a&&(p=1-p);var y=U(f)?f(o):s*p+h,g=u.getSymbolPath(),b=g.getTextContent();u.attr({scaleX:0,scaleY:0}),u.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:y}),g.disableLabelAnimation=!0}}))},n.prototype._initOrUpdateEndLabel=function(t,n,i){var r=t.getModel("endLabel");if(Ew(t)){var e=t.getData(),o=this._polyline,a=e.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var u=this._endLabel;u||((u=this._endLabel=new Tu({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var s=function(t){for(var n=t.length/2;n>0&&yw(t[2*n-2],t[2*n-1]);n--);return n-1}(a);s>=0&&(Uh(o,Gh(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:s,defaultText:function(t,n,i){return null!=i?function(t,n){var i=t.mapDimensionsAll("defaultedLabel");if(!H(n))return n+"";for(var r=[],e=0;e<i.length;e++){var o=t.getDimensionIndex(i[e]);o>=0&&r.push(n[o])}return r.join(" ")}(e,i):uw(e,t)},enableTextSetter:!0},function(t,n){var i=n.getBaseAxis(),r=i.isHorizontal(),e=i.inverse,o=r?e?"right":"left":"center",a=r?"middle":e?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(r,n)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},n.prototype._endLabelOnDuring=function(t,n,i,r,e,o,a){var u=this._endLabel,s=this._polyline;if(u){t<1&&null==r.originalX&&(r.originalX=u.x,r.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,l=h.get("connectNulls"),c=o.get("precision"),v=o.get("distance")||0,d=a.getBaseAxis(),m=d.isHorizontal(),p=d.inverse,y=n.shape,g=p?m?y.x:y.y+y.height:m?y.x+y.width:y.y,b=(m?v:0)*(p?-1:1),w=(m?0:-v)*(p?-1:1),x=m?"x":"y",M=function(t,n,i){for(var r,e,o=t.length/2,a="x"===i?0:1,u=0,s=-1,f=0;f<o;f++)if(!yw(e=t[2*f+a],t[2*f+1-a]))if(0!==f){if(r<=n&&e>=n||r>=n&&e<=n){s=f;break}u=f,r=e}else r=e;return{range:[u,s],t:(n-r)/(e-r)}}(f,g,x),S=M.range,k=S[1]-S[0],T=void 0;if(k>=1){if(k>1&&!l){var A=_w(f,S[0]);u.attr({x:A[0]+b,y:A[1]+w}),e&&(T=h.getRawValue(S[0]))}else{(A=s.getPointOn(g,x))&&u.attr({x:A[0]+b,y:A[1]+w});var N=h.getRawValue(S[0]),L=h.getRawValue(S[1]);e&&(T=function(t,n,i,r,e){var o=null==n||"auto"===n;if(null==r)return r;if(Y(r))return Ne(d=Xe(i||0,r,e),o?Math.max(Ce(i||0),Ce(r)):n);if(G(r))return e<1?i:r;for(var a=[],u=i,s=r,f=Math.max(u?u.length:0,s.length),h=0;h<f;++h){var l=t.getDimensionInfo(h);if(l&&"ordinal"===l.type)a[h]=(e<1&&u?u:s)[h];else{var c=u&&u[h]?u[h]:0,v=s[h],d=Xe(c,v,e);a[h]=Ne(d,o?Math.max(Ce(c),Ce(v)):n)}}return a}(i,c,N,L,M.t))}r.lastFrameIndex=S[0]}else{var C=1===t||r.lastFrameIndex>0?S[0]:0;A=_w(f,C),e&&(T=h.getRawValue(C)),u.attr({x:A[0]+b,y:A[1]+w})}if(e){var I=Qh(u);"function"==typeof I.setLabelText&&I.setLabelText(T)}}},n.prototype._doUpdateAnimation=function(t,n,i,r,e,o,a){var u=this._polyline,s=this._polygon,f=t.hostModel,h=function(t,n,i,r,e,o,a){for(var u=function(t,n){var i=[];return n.diff(t).add((function(t){i.push({cmd:"+",idx:t})})).update((function(t,n){i.push({cmd:"=",idx:n,idx1:t})})).remove((function(t){i.push({cmd:"-",idx:t})})).execute(),i}(t,n),s=[],f=[],h=[],l=[],c=[],v=[],d=[],m=mw(e,n,a),p=t.getLayout("points")||[],y=n.getLayout("points")||[],g=0;g<u.length;g++){var b=u[g],w=!0,x=void 0,M=void 0;switch(b.cmd){case"=":var S=p[x=2*b.idx],k=p[x+1],T=y[M=2*b.idx1],A=y[M+1];(isNaN(S)||isNaN(k))&&(S=T,k=A),s.push(S,k),f.push(T,A),h.push(i[x],i[x+1]),l.push(r[M],r[M+1]),d.push(n.getRawIndex(b.idx1));break;case"+":var N=b.idx,L=m.dataDimsForPoint,C=e.dataToPoint([n.get(L[0],N),n.get(L[1],N)]);M=2*N,s.push(C[0],C[1]),f.push(y[M],y[M+1]);var I=pw(m,e,n,N);h.push(I[0],I[1]),l.push(r[M],r[M+1]),d.push(n.getRawIndex(N));break;case"-":w=!1}w&&(c.push(b),v.push(v.length))}v.sort((function(t,n){return d[t]-d[n]}));var O=s.length,D=bw(O),_=bw(O),E=bw(O),z=bw(O),R=[];for(g=0;g<v.length;g++){var P=v[g],B=2*g,F=2*P;D[B]=s[F],D[B+1]=s[F+1],_[B]=f[F],_[B+1]=f[F+1],E[B]=h[F],E[B+1]=h[F+1],z[B]=l[F],z[B+1]=l[F+1],R[g]=c[P]}return{current:D,next:_,stackedOnCurrent:E,stackedOnNext:z,status:R}}(this._data,t,this._stackedOnPoints,n,this._coordSys,0,this._valueOrigin),l=h.current,c=h.stackedOnCurrent,v=h.next,d=h.stackedOnNext;if(e&&(c=Dw(h.stackedOnCurrent,h.current,i,e,a),l=Dw(h.current,null,i,e,a),d=Dw(h.stackedOnNext,h.next,i,e,a),v=Dw(h.next,null,i,e,a)),Iw(l,v)>3e3||s&&Iw(c,d)>3e3)return u.stopAnimation(),u.setShape({points:v}),void(s&&(s.stopAnimation(),s.setShape({points:v,stackedOnPoints:d})));u.shape.__points=h.current,u.shape.points=l;var m={shape:{points:v}};h.current!==l&&(m.shape.__points=h.next),u.stopAnimation(),oh(u,m,f),s&&(s.setShape({points:l,stackedOnPoints:c}),s.stopAnimation(),oh(s,{shape:{stackedOnPoints:d}},f),u.shape.points!==s.shape.points&&(s.shape.points=u.shape.points));for(var p=[],y=h.status,g=0;g<y.length;g++)if("="===y[g].cmd){var b=t.getItemGraphicEl(y[g].idx1);b&&p.push({el:b,ptIdx:g})}u.animators&&u.animators.length&&u.animators[0].during((function(){s&&s.dirtyShape();for(var t=u.shape.__points,n=0;n<p.length;n++){var i=p[n].el,r=2*p[n].ptIdx;i.x=t[r],i.y=t[r+1],i.markRedraw()}}))},n.prototype.remove=function(){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(i,r){i.__temp&&(t.remove(i),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},n.type="line",n}(Yd);function Pw(t,n){return{seriesType:t,plan:Ud(),reset:function(t){var i=t.getData(),r=t.coordinateSystem,e=n||t.pipelineContext.large;if(r){var o=R(r.dimensions,(function(t){return i.mapDimension(t)})).slice(0,2),a=o.length,u=i.getCalculationInfo("stackResultDimension");dg(i,o[0])&&(o[0]=u),dg(i,o[1])&&(o[1]=u);var s=i.getStore(),f=i.getDimensionIndex(o[0]),h=i.getDimensionIndex(o[1]);return a&&{progress:function(t,n){for(var i=e&&bw((t.end-t.start)*a),o=[],u=[],l=t.start,c=0;l<t.end;l++){var v=void 0;if(1===a){var d=s.get(f,l);v=r.dataToPoint(d,null,u)}else o[0]=s.get(f,l),o[1]=s.get(h,l),v=r.dataToPoint(o,null,u);e?(i[c++]=v[0],i[c++]=v[1]):n.setItemLayout(l,v.slice())}e&&(n.setLayout("points",i),n.setLayout("pointsRange",{start:t.start,end:t.end}))}}}}}}var Bw={average:function(t){for(var n=0,i=0,r=0;r<t.length;r++)isNaN(t[r])||(n+=t[r],i++);return 0===i?NaN:n/i},sum:function(t){for(var n=0,i=0;i<t.length;i++)n+=t[i]||0;return n},max:function(t){for(var n=-1/0,i=0;i<t.length;i++)t[i]>n&&(n=t[i]);return isFinite(n)?n:NaN},min:function(t){for(var n=1/0,i=0;i<t.length;i++)t[i]<n&&(n=t[i]);return isFinite(n)?n:NaN},nearest:function(t){return t[0]}},Fw=function(t){return Math.round(t.length/2)},Vw=function(t){function n(n,i,r,e,o){var a=t.call(this,n,i,r)||this;return a.index=0,a.type=e||"value",a.position=o||"bottom",a}return o(n,t),n.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},n.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},n.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),n)},n.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},n}($b),Ww=Math.PI,Hw=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Uw=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Gw=ao(),jw=ao(),Yw=function(){function t(t){this.recordMap={},this.resolveAxisNameOverlap=t}return t.prototype.ensureRecord=function(t){var n=t.axis.dim,i=t.componentIndex,r=this.recordMap,e=r[n]||(r[n]=[]);return e[i]||(e[i]={ready:{}})},t}(),Xw=[1,0,0,1,0,0],qw=new xn(0,0,0,0),Zw=function(t,n,i,r,e,o){if(ab(t.nameLocation)){var a=o.stOccupiedRect;a&&$w(function(t,n,i){return t.transform=zh(t.transform,i),t.localRect=Eh(t.localRect,n),t.rect=Eh(t.rect,n),i&&t.rect.applyTransform(i),t.axisAligned=Dh(i),t.obb=void 0,(t.label=t.label||{}).ignore=!1,t}({},a,o.transGroup.transform),r,e)}else Kw(o.labelInfoList,o.dirVec,r,e)};function $w(t,n,i){var r=new un;ow(t,n,r,{direction:Math.atan2(i.y,i.x),bidirectional:!1,touchThreshold:.05})&&function(t,n){if(t){t.label.x+=n.x,t.label.y+=n.y,t.label.markRedraw();var i=t.transform;i&&(i[4]+=n.x,i[5]+=n.y);var r=t.rect;r&&(r.x+=n.x,r.y+=n.y);var e=t.obb;e&&e.fromBoundingRect(t.localRect,i)}}(n,r)}function Kw(t,n,i,r){for(var e=un.dot(r,n)>=0,o=0,a=t.length;o<a;o++){var u=t[e?o:a-1-o];u.label.ignore||$w(u,i,r)}}var Jw=function(){function t(t,n,i,r){this.group=new fe,this._axisModel=t,this._api=n,this._local={},this._shared=r||new Yw(Zw),this._resetCfgDetermined(i)}return t.prototype.updateCfg=function(t){var n=this._cfg.raw;n.position=t.position,n.labelOffset=t.labelOffset,this._resetCfgDetermined(n)},t.prototype.__getRawCfg=function(){return this._cfg.raw},t.prototype._resetCfgDetermined=function(t){var n=this._axisModel,i=n.getDefaultOption?n.getDefaultOption():{},r=tt(t.axisName,n.get("name")),e=n.get("nameMoveOverlap");null!=e&&"auto"!==e||(e=tt(t.defaultNameMoveOverlap,!0));var o={raw:t,position:t.position,rotation:t.rotation,nameDirection:tt(t.nameDirection,1),tickDirection:tt(t.tickDirection,1),labelDirection:tt(t.labelDirection,1),labelOffset:tt(t.labelOffset,0),silent:tt(t.silent,!0),axisName:r,nameLocation:nt(n.get("nameLocation"),i.nameLocation,"end"),shouldNameMoveOverlap:fx(r)&&e,optionHideOverlap:n.get(["axisLabel","hideOverlap"]),showMinorTicks:n.get(["minorTick","show"])};this._cfg=o;var a=new fe({x:o.position[0],y:o.position[1],rotation:o.rotation});a.updateTransform(),this._transformGroup=a;var u=this._shared.ensureRecord(n);u.transGroup=this._transformGroup,u.dirVec=new un(Math.cos(-o.rotation),Math.sin(-o.rotation))},t.prototype.build=function(t,n){var i=this;return t||(t={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),z(Qw,(function(r){t[r]&&tx[r](i._cfg,i._local,i._shared,i._axisModel,i.group,i._transformGroup,i._api,n||{})})),this},t.innerTextLayout=function(t,n,i){var r,e,o=De(n-t);return _e(o)?(e=i>0?"top":"bottom",r="center"):_e(o-Ww)?(e=i>0?"bottom":"top",r="center"):(e="middle",r=o>0&&o<Ww?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:r,textVerticalAlign:e}},t.makeAxisEventDataBase=function(t){var n={componentType:t.mainType,componentIndex:t.componentIndex};return n[t.mainType+"Index"]=t.componentIndex,n},t.isLabelSilent=function(t){var n=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||n&&n.show)},t}(),Qw=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],tx={axisLine:function(t,n,i,r,e,o){var a=r.get(["axisLine","show"]);if("auto"===a&&(a=!0,null!=t.raw.axisLineAutoShow&&(a=!!t.raw.axisLineAutoShow)),a){var u=r.axis.getExtent(),s=o.transform,f=[u[0],0],h=[u[1],0],l=f[0]>h[0];s&&(Nt(f,f,s),Nt(h,h,s));var c=I({lineCap:"round"},r.getModel(["axisLine","lineStyle"]).getLineStyle()),v={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:c};if(r.get(["axisLine","breakLine"])&&Sl(r.axis.scale))null.buildAxisBreakLine(r,e,o,v);else{var d=new zf(I({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},v));gh(d.shape,d.style.lineWidth),d.anid="line",e.add(d)}var m=r.get(["axisLine","symbol"]);if(null!=m){var p=r.get(["axisLine","symbolSize"]);G(m)&&(m=[m,m]),(G(p)||Y(p))&&(p=[p,p]);var y=ep(r.get(["axisLine","symbolOffset"])||0,p),g=p[0],b=p[1];z([{rotate:t.rotation+Math.PI/2,offset:y[0],r:0},{rotate:t.rotation-Math.PI/2,offset:y[1],r:Math.sqrt((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],(function(n,i){if("none"!==m[i]&&null!=m[i]){var r=rp(m[i],-g/2,-b/2,g,b,c.stroke,!0),o=n.r+n.offset,a=l?h:f;r.attr({rotation:n.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),e.add(r)}}))}}},axisTickLabelEstimate:function(t,n,i,r,e,o,a,u){ex(n,e,u)&&nx(t,n,i,r,e,o,a,1)},axisTickLabelDetermine:function(t,n,i,r,e,o,a,u){ex(n,e,u)&&nx(t,n,i,r,e,o,a,2);var s=function(t,n,i,r){var e=r.axis,o=r.getModel("axisTick"),a=o.get("show");if("auto"===a&&(a=!0,null!=t.raw.axisTickAutoShow&&(a=!!t.raw.axisTickAutoShow)),!a||e.scale.isBlank())return[];for(var u=o.getModel("lineStyle"),s=t.tickDirection*o.get("length"),f=rx(e.getTicksCoords(),i.transform,s,O(u.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<f.length;h++)n.add(f[h]);return f}(t,e,o,r);!function(t,n,i){t.showMinorTicks||z(n,(function(t){if(t&&t.label.ignore)for(var n=0;n<i.length;n++){var r=i[n],e=jw(r),o=Gw(t.label);if(null!=e.tickValue&&!e.onBand&&e.tickValue===o.labelInfo.tick.value)return void ix(r)}}))}(t,n.labelLayoutList,s),function(t,n,i,r,e){var o=r.axis,a=r.getModel("minorTick");if(t.showMinorTicks&&!o.scale.isBlank()){var u=o.getMinorTicksCoords();if(u.length)for(var s=a.getModel("lineStyle"),f=e*a.get("length"),h=O(s.getLineStyle(),O(r.getModel("axisTick").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})),l=0;l<u.length;l++)for(var c=rx(u[l],i.transform,f,h,"minorticks_"+l),v=0;v<c.length;v++)n.add(c[v])}}(t,e,o,r,t.tickDirection)},axisName:function(t,n,i,r,e,o,a,u){var s=i.ensureRecord(r);n.nameEl&&(e.remove(n.nameEl),n.nameEl=s.nameLayout=s.nameLocation=null);var f=t.axisName;if(fx(f)){var h=t.nameLocation,l=t.nameDirection,c=r.getModel("nameTextStyle"),v=r.get("nameGap")||0,d=r.axis.getExtent(),m=r.axis.inverse?-1:1,p=new un(0,0),y=new un(0,0);"start"===h?(p.x=d[0]-m*v,y.x=-m):"end"===h?(p.x=d[1]+m*v,y.x=m):(p.x=(d[0]+d[1])/2,p.y=t.labelOffset+l*v,y.y=l);var g=[1,0,0,1,0,0];y.transform(on(g,g,t.rotation));var b,w,x=r.get("nameRotate");null!=x&&(x=x*Ww/180),ab(h)?b=Jw.innerTextLayout(t.rotation,null!=x?x:t.rotation,l):(b=function(t,n,i,r){var e,o,a=De(i-t),u=r[0]>r[1],s="start"===n&&!u||"start"!==n&&u;return _e(a-Ww/2)?(o=s?"bottom":"top",e="center"):_e(a-1.5*Ww)?(o=s?"top":"bottom",e="center"):(o="middle",e=a<1.5*Ww&&a>Ww/2?s?"left":"right":s?"right":"left"),{rotation:a,textAlign:e,textVerticalAlign:o}}(t.rotation,h,x||0,d),null!=(w=t.raw.axisNameAvailableWidth)&&(w=Math.abs(w/Math.sin(b.rotation)),!isFinite(w)&&(w=null)));var M=c.getFont(),S=r.get("nameTruncate",!0)||{},k=S.ellipsis,T=Q(t.raw.nameTruncateMaxWidth,S.maxWidth,w),A=u.nameMarginLevel||0,N=new Tu({x:p.x,y:p.y,rotation:b.rotation,silent:Jw.isLabelSilent(r),style:jh(c,{text:f,font:M,overflow:"truncate",width:T,ellipsis:k,fill:c.getTextColor()||r.get(["axisLine","lineStyle","color"]),align:c.get("align")||b.textAlign,verticalAlign:c.get("verticalAlign")||b.textVerticalAlign}),z2:1});if(Ch({el:N,componentModel:r,itemName:f}),N.__fullText=f,N.anid="name",r.get("triggerEvent")){var L=Jw.makeAxisEventDataBase(r);L.targetType="axisName",L.name=f,Ru(N).eventData=L}o.add(N),N.updateTransform(),n.nameEl=N;var C=s.nameLayout=nw({label:N,priority:N.z2,defaultAttr:{ignore:N.ignore},marginDefault:ab(h)?Hw[A]:Uw[A]});if(s.nameLocation=h,e.add(N),N.decomposeTransform(),t.shouldNameMoveOverlap&&C){var I=i.ensureRecord(r);i.resolveAxisNameOverlap(t,i,r,C,y,I)}}}};function nx(t,n,i,r,e,o,a,u){ox(n)||function(t,n,i,r,e,o){var a=e.axis,u=Q(t.raw.axisLabelShow,e.get(["axisLabel","show"])),s=new fe;i.add(s);var f=Pb(r);if(u&&!a.scale.isBlank()){var h=e.getModel("axisLabel"),l=a.getViewLabels(f),c=(Q(t.raw.labelRotate,h.get("rotate"))||0)*Ww/180,v=Jw.innerTextLayout(t.rotation,c,t.labelDirection),d=e.getCategories&&e.getCategories(!0),m=[],p=e.get("triggerEvent"),y=1/0,g=-1/0;z(l,(function(t,n){var i,r=t.tick,u=t.formattedLabel,f=t.rawLabel,c=h,b=fb(a.scale,r);if(d&&d[b]){var w=d[b];X(w)&&w.textStyle&&(c=new ll(w.textStyle,h,e.ecModel))}var x=c.getTextColor()||e.get(["axisLine","lineStyle","color"]),M=c.getShallow("align",!0)||v.textAlign,S=tt(c.getShallow("alignMinLabel",!0),M),k=tt(c.getShallow("alignMaxLabel",!0),M),T=c.getShallow("verticalAlign",!0)||c.getShallow("baseline",!0)||v.textVerticalAlign,A=tt(c.getShallow("verticalAlignMinLabel",!0),T),N=tt(c.getShallow("verticalAlignMaxLabel",!0),T),L=10+((null===(i=r.time)||void 0===i?void 0:i.level)||0);y=Math.min(y,L),g=Math.max(g,L);var C=new Tu({x:0,y:0,rotation:0,silent:Jw.isLabelSilent(e),z2:L,style:jh(c,{text:u,align:0===n?S:n===l.length-1?k:M,verticalAlign:0===n?A:n===l.length-1?N:T,fill:U(x)?x("category"===a.type?f:"value"===a.type?b+"":b,n):x})});C.anid="label_"+b;var I=Gw(C);if(I.labelInfo=t,I.layoutRotation=v.rotation,Ch({el:C,componentModel:e,itemName:u,formatterParamsExtra:{isTruncated:function(){return C.isTruncated},value:f,tickIndex:n}}),p){var O=Jw.makeAxisEventDataBase(e);O.targetType="axisLabel",O.value=f,O.tickIndex=n;var D=t.tick.break;if(D){var _=D.parsedBreak;O.break={start:_.vmin,end:_.vmax}}"category"===a.type&&(O.dataIndex=b),Ru(C).eventData=O,D&&function(t,n,i,r){i.on("click",(function(){var i={type:"expandAxisBreak",breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[t.axis.dim+"AxisIndex"]=t.componentIndex,n.dispatchAction(i)}))}(e,o,C,D)}m.push(C),s.add(C)})),ax(n,R(m,(function(t){return{label:t,priority:Gw(t).labelInfo.tick.break?t.z2+(g-y+1):t.z2,defaultAttr:{ignore:t.ignore}}})),s,f)}else ax(n,[],s,f)}(t,n,e,u,r,a);var s=n.labelLayoutList;!function(t,n,i,r){var e=n.get(["axisLabel","margin"]);z(i,(function(i){var o=nw(i);if(o){var a=o.label,u=Gw(a);o.suggestIgnore=a.ignore,a.ignore=!1,Pr(ux,sx);var s=n.axis;ux.x=s.dataToCoord(fb(s.scale,u.labelInfo.tick)),ux.y=t.labelOffset+t.labelDirection*e,ux.rotation=u.layoutRotation,r.add(ux),ux.updateTransform(),r.remove(ux),ux.decomposeTransform(),Pr(a,ux),a.markRedraw(),Qb(o,!0),nw(o)}}))}(t,r,s,o);var f=t.optionHideOverlap;!function(t,n,i){var r=t.axis,e=t.get(["axisLabel","customValues"]);if(!function(t){return"category"===t.type&&0===ob(t.getLabelModel())}(r)){var o=t.get(["axisLabel","showMinLabel"]),a=t.get(["axisLabel","showMaxLabel"]),u=n.length;s(o,0,1),s(a,u-1,u-2)}function s(t,o,a){var u=nw(n[o]),s=nw(n[a]),f=r.scale;if(u&&s){if(null==t){if(!i&&e)return;var h=Gw(u.label).labelInfo.tick;if(Og(f)&&h.notNice||_g(f)&&h.offInterval)return void ix(u.label)}if(!1===t||u.suggestIgnore)ix(u.label);else if(s.suggestIgnore)ix(s.label);else{if(!i){var l=[0,0,0,0];u=rw({marginForce:l},u),s=rw({marginForce:l},s)}ow(u,s,null,{touchThreshold:.1})&&ix(t?s.label:u.label)}}}}(r,s,f),f&&function(t){var n=[];function i(t){if(!t.ignore){var n=t.ensureState("emphasis");null==n.ignore&&(n.ignore=!1)}t.ignore=!0}t.sort((function(t,n){return(n.suggestIgnore?1:0)-(t.suggestIgnore?1:0)||n.priority-t.priority}));for(var r=0;r<t.length;r++){var e=nw(t[r]);if(!e.label.ignore){for(var o=e.label,a=e.labelLine,u=!1,s=0;s<n.length;s++)if(ow(e,n[s],null,{touchThreshold:.05})){u=!0;break}u?(i(o),a&&i(a)):n.push(e)}}}(B(s,(function(t){return t&&!t.label.ignore}))),function(t,n,i,r){var e,o=i.axis,a=n.ensureRecord(i),u=[],s=fx(t.axisName)&&ab(t.nameLocation);z(r,(function(t){var n=nw(t);if(n&&!n.label.ignore){u.push(n);var i=a.transGroup;s&&(i.transform?an(Xw,i.transform):tn(Xw),n.transform&&rn(Xw,Xw,n.transform),xn.copy(qw,n.localRect),qw.applyTransform(Xw),e?e.union(qw):xn.copy(e=new xn(0,0,0,0),qw))}}));var f=Math.abs(a.dirVec.x)>.1?"x":"y",h=a.transGroup[f];if(u.sort((function(t,n){return Math.abs(t.label[f]-h)-Math.abs(n.label[f]-h)})),s&&e){var l=o.getExtent(),c=Math.min(l[0],l[1]),v=Math.max(l[0],l[1])-c;e.union(new xn(c,0,v,1))}a.stOccupiedRect=e,a.labelInfoList=u}(t,i,r,s)}function ix(t){t&&(t.ignore=!0)}function rx(t,n,i,r,e){for(var o=[],a=[],u=[],s=0;s<t.length;s++){var f=t[s].coord;a[0]=f,a[1]=0,u[0]=f,u[1]=i,n&&(Nt(a,a,n),Nt(u,u,n));var h=new zf({shape:{x1:a[0],y1:a[1],x2:u[0],y2:u[1]},style:r,z2:2,autoBatch:!0,silent:!0});gh(h.shape,h.style.lineWidth),h.anid=e+"_"+t[s].tickValue,o.push(h);var l=jw(h);l.onBand=!!t[s].onBand,l.tickValue=t[s].tickValue}return o}function ex(t,n,i){if(ox(t)){var r=t.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(i.noPxChange){for(var e=!0,o=0;o<r.length;o++)e=e&&r[o]();if(e)return!1}r.length&&(n.remove(t.labelGroup),ax(t,null,null,null))}return!0}function ox(t){return!!t.labelLayoutList}function ax(t,n,i,r){t.labelLayoutList=n,t.labelGroup=i,t.axisLabelsCreationContext=r}var ux=new xu,sx=new xu;function fx(t){return!!t}function hx(t,n,i){i=i||{};var r=n.axis,e={},o=r.getAxesOnZeroOf()[0],a=r.position,u=o?"onZero":a,s=r.dim,f=[t.x,t.x+t.width,t.y,t.y+t.height],h={left:0,right:1,top:0,bottom:1,onZero:2},l=n.get("offset")||0,c="x"===s?[f[2]-l,f[3]+l]:[f[0]-l,f[1]+l];if(o){var v=o.toGlobalCoord(o.dataToCoord(0));c[h.onZero]=Math.max(Math.min(v,c[1]),c[0])}e.position=["y"===s?c[h[u]]:f[0],"x"===s?c[h[u]]:f[3]],e.rotation=Math.PI/2*("x"===s?0:1),e.labelDirection=e.tickDirection=e.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],e.labelOffset=o?c[h[a]]-c[h.onZero]:0,n.get(["axisTick","inside"])&&(e.tickDirection=-e.tickDirection),Q(i.labelInside,n.get(["axisLabel","inside"]))&&(e.labelDirection=-e.labelDirection);var d=n.get(["axisLabel","rotate"]);return e.labelRotate="top"===u?-d:d,e.z2=1,e}var lx={left:0,right:0,top:0,bottom:0},cx=["25%","25%"],vx="cartesian2d",dx=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.mergeDefaultAndTheme=function(n,i){var r=wc(n.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&n.outerBounds&&bc(n.outerBounds,r)},n.prototype.mergeOption=function(n,i){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&n.outerBounds&&bc(this.option.outerBounds,n.outerBounds)},n.type="grid",n.dependencies=["xAxis","yAxis"],n.layoutMode="box",n.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:lx,outerBoundsContain:"all",outerBoundsClampWidth:cx[0],outerBoundsClampHeight:cx[1],backgroundColor:Sc.color.transparent,borderWidth:1,borderColor:Sc.color.neutral30},n}(Mc),mx=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.hasSymbolVisual=!0,i}return o(n,t),n.prototype.getInitialData=function(){return mg(0,this,{useEncodeDefaulter:!0})},n.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},n.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},n.prototype.brushSelector=function(t,n,i){return i.point(n.getItemLayout(t))},n.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},n.type="series.scatter",n.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],n.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Sc.color.primary}},universalTransition:{divideShape:"clone"}},n}(Ed),px=function(){},yx=function(t){function n(n){var i=t.call(this,n)||this;return i._off=0,i.hoverDataIdx=-1,i}return o(n,t),n.prototype.getDefaultShape=function(){return new px},n.prototype.reset=function(){this.notClear=!1,this._off=0},n.prototype.beforeBrush=function(t){t&&!t.contentRetained&&this.reset()},n.prototype.buildPath=function(t,n){var i,r=n.points,e=n.size,o=this.symbolProxy,a=o.shape,u=t.getContext?t.getContext():t,s=this.softClipShape;if(u&&e[0]<4)this._ctx=u;else{for(this._ctx=null,i=this._off;i<r.length;){var f=r[i++],h=r[i++];isNaN(f)||isNaN(h)||s&&!s.contain(f,h)||(a.x=f-e[0]/2,a.y=h-e[1]/2,a.width=e[0],a.height=e[1],o.buildPath(t,a,!0))}this.incremental&&(this._off=i,this.notClear=!0)}},n.prototype.afterBrush=function(){var t,n=this.shape,i=n.points,r=n.size,e=this._ctx,o=this.softClipShape;if(e){for(t=this._off;t<i.length;){var a=i[t++],u=i[t++];isNaN(a)||isNaN(u)||o&&!o.contain(a,u)||e.fillRect(a-r[0]/2,u-r[1]/2,r[0],r[1])}this.incremental&&(this._off=t,this.notClear=!0)}},n.prototype.findDataIndex=function(t,n){for(var i=this.shape,r=i.points,e=i.size,o=Math.max(e[0],4),a=Math.max(e[1],4),u=r.length/2-1;u>=0;u--){var s=2*u,f=r[s]-o/2,h=r[s+1]-a/2;if(t>=f&&n>=h&&t<=f+o&&n<=h+a)return u}return-1},n.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n);return this.getBoundingRect().contain(t=i[0],n=i[1])?(this.hoverDataIdx=this.findDataIndex(t,n))>=0:(this.hoverDataIdx=-1,!1)},n.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,i=n.points,r=n.size,e=r[0],o=r[1],a=1/0,u=1/0,s=-1/0,f=-1/0,h=0;h<i.length;){var l=i[h++],c=i[h++];a=Math.min(l,a),s=Math.max(l,s),u=Math.min(c,u),f=Math.max(c,f)}t=this._rect=new xn(a-e/2,u-o/2,s-a+e,f-u+o)}return t},n}(fu),gx=function(){function t(){this.group=new fe}return t.prototype.updateData=function(t,n){this._clear(),this._data=t;var i=this._create();i.setShape({points:t.getLayout("points")}),this._setCommon(i,t,n)},t.prototype.updateLayout=function(){var t=this._data;if(t){var n=t.getLayout("points");this.group.eachChild((function(t){null!=t.startIndex&&(n=new Float32Array(n.buffer,4*t.startIndex*2,2*(t.endIndex-t.startIndex))),t.setShape("points",n),t.reset(),t.stopAnimation()}))}},t.prototype.incrementalPrepareUpdate=function(){this._clear()},t.prototype.incrementalUpdate=function(t,n,i,r){var e=this._newAdded[0],o=n.getLayout("points"),a=e&&e.shape.points;if(a&&a.length<2e4){var u=a.length,s=new Float32Array(u+o.length);s.set(a),s.set(o,u),e.endIndex=t.end,e.setShape({points:s})}else{this._newAdded=[];var f=this._create();f.startIndex=t.start,f.endIndex=t.end,f.incremental=i,f.setShape({points:o}),this._setCommon(f,n,r)}},t.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},t.prototype._create=function(){var t=new yx({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},t.prototype._setCommon=function(t,n,i){var r=n.hostModel;i=i||{};var e=n.getVisual("symbolSize");t.setShape("size",e instanceof Array?e:[e,e]),t.softClipShape=i.clipShape||null,t.symbolProxy=rp(n.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var a=n.getVisual("style"),u=a&&a.fill;u&&t.setColor(u);var s=Ru(t);s.seriesIndex=r.seriesIndex,t.on("mousemove",(function(){s.dataIndex=null;var n=t.hoverDataIdx;n>=0&&(s.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),bx=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return o(n,t),n.prototype.render=function(t){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,xx(t)),this._finished=!0},n.prototype.incrementalPrepareRender=function(t){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},n.prototype.incrementalRender=function(t,n){this._symbolDraw.incrementalUpdate(t,n.getData(),function(t){return tt(void 0,!0)?t.seriesIndex+2:0}(n),xx(n)),this._finished=t.end===n.getData().count()},n.prototype.updateTransform=function(t,n,i){var r=t.getData();if(this.group.dirty(),!this._finished)return{update:!0};var e=Pw("").reset(t,n,i);e.progress&&e.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(xx(t))},n.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},n.prototype._updateSymbolDraw=function(t,n){var i=this._symbolDraw,r=n.pipelineContext.large;return i&&r===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=r?new gx:new dw,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},n.prototype.remove=function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},n.prototype.dispose=function(){},n.type="scatter",n}(Yd);function xx(t){return{clipShape:Nw(t)}}var Mx=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ho).models[0]},n.type="cartesian2dAxis",n}(Mc);_(Mx,lb);var Sx={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:"auto",onZeroAxisIndex:null,lineStyle:{color:Sc.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Sc.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Sc.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[Sc.color.backgroundTint,Sc.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Sc.color.neutral00,borderColor:Sc.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},kx=C({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},Sx),Tx=C({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Sc.color.axisMinorSplitLine,width:1}}},Sx),Ax={category:kx,value:Tx,time:C({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Tx),log:O({logBase:10},Tx)};function Nx(t,n,i,r){z(nb,(function(e,a){var u=C(C({},Ax[a],!0),r,!0),s=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n+"Axis."+a,i}return o(i,t),i.prototype.mergeDefaultAndTheme=function(t,n){var i=gc(this),r=i?wc(t):{};C(t,n.getTheme().get(a+"Axis")),C(t,this.getDefaultOption()),t.type=Lx(t),i&&bc(t,r,i)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=gg.createByAxisModel(this))},i.prototype.getCategories=function(t){var n=this.option;if("category"===n.type)return t?n.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.prototype.updateAxisBreaks=function(){return{breaks:[]}},i.type=n+"Axis."+a,i.defaultOption=u,i}(i);t.registerComponentModel(s)})),t.registerSubTypeDefaulter(n+"Axis",Lx)}function Lx(t){return t.type||(t.data?"category":"value")}var Cx=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return R(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),B(this.getAxes(),(function(n){return n.scale.type===t}))},t.prototype.addAxis=function(t){var n=t.dim;this._axes[n]=t,this._dimList.push(n)},t}(),Ix=["x","y"];function Ox(t){return("interval"===t.type||"time"===t.type)&&!Sl(t)}var Dx=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=vx,n.dimensions=Ix,n}return o(n,t),n.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(Ox(t)&&Ox(n)){var i=Tg(t,null),r=Tg(n,null),e=this.dataToPoint([i[0],r[0]]),o=this.dataToPoint([i[1],r[1]]),a=i[1]-i[0],u=r[1]-r[0];if(a&&u){var s=(o[0]-e[0])/a,f=(o[1]-e[1])/u,h=this._transform=[s,0,0,f,e[0]-i[0]*s,e[1]-r[0]*f];this._invTransform=an([],h)}}},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},n.prototype.containPoint=function(t){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},n.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},n.prototype.containZone=function(t,n){var i=this.dataToPoint(t),r=this.dataToPoint(n),e=this.getArea(),o=new xn(i[0],i[1],r[0]-i[0],r[1]-i[1]);return e.intersect(o)},n.prototype.dataToPoint=function(t,n,i){i=i||[];var r=t[0],e=t[1];if(this._transform&&null!=r&&isFinite(r)&&null!=e&&isFinite(e))return Nt(i,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return i[0]=o.toGlobalCoord(o.dataToCoord(r,n)),i[1]=a.toGlobalCoord(a.dataToCoord(e,n)),i},n.prototype.clampData=function(t,n){var i=this.getAxis("x").scale,r=this.getAxis("y").scale,e=i.getExtent(),o=r.getExtent(),a=i.parse(t[0]),u=r.parse(t[1]);return(n=n||[])[0]=Math.min(Math.max(Math.min(e[0],e[1]),a),Math.max(e[0],e[1])),n[1]=Math.min(Math.max(Math.min(o[0],o[1]),u),Math.max(o[0],o[1])),n},n.prototype.pointToData=function(t,n,i){if(i=i||[],this._invTransform)return Nt(i,t,this._invTransform);var r=this.getAxis("x"),e=this.getAxis("y");return i[0]=r.coordToData(r.toLocalCoord(t[0]),n),i[1]=e.coordToData(e.toLocalCoord(t[1]),n),i},n.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},n.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),r=Math.min(n[0],n[1])-t,e=Math.min(i[0],i[1])-t,o=Math.max(n[0],n[1])-r+t,a=Math.max(i[0],i[1])-e+t;return new xn(r,e,o,a)},n}(Cx);var _x=[[3,1],[0,2]],Ex=function(){function t(t,n,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Ix,this._initCartesian(t,n,i),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,n){var i=this._axesMap;function r(t){for(var n=F(t),i=[],r=n.length-1;r>=0;r--){var e=t[+n[r]];e.__alignTo?i.push(e):Ib(e)}z(i,(function(t){var n;n=t.__alignTo,Sl(t.scale)||Sl(n.scale)||n.scale.getTicks().length<2?Ib(t):function(t,n){var i,r,e,o=t.scale,a=t.model,u=Lb(o,a,a.ecModel,t),s=Dg(o),f=Dg(n)?n.intervalStub:n,h=s?o.intervalStub:o,l=o.base,c=f.getTicks(),v=f.getTicks({expandToNicedExtent:!0}),d=c.length-1;if(1===d)i=r=0,e=1;else if(2===d){var m=me(c[0].value-c[1].value),p=me(c[1].value-c[2].value);i=r=0,m===p?e=2:(e=1,m<p?i=m/p:r=p/m)}else{var y=f.getConfig().interval;e=d-((i=(1-(c[0].value-v[0].value)/y)%1)?1:0)-((r=(1-(v[d].value-c[d].value)/y)%1)?1:0)}var g,b,w,x,M,S,k=u.zoomFixMM,T=k[0]||k[1],A=[u.fixMM[0]||T,u.fixMM[1]||T],N=o.getExtent(),L=h.getExtent(),C=Pg(L,A);function I(t){for(var n,i,r,e,o=0;o<50&&!t();o++)w=s?w*de(l,2):(e=void 0,i=Pe(n=w),r=be(10,i),(e=pe(n/r))?2===e?e=3:3===e?e=5:e*=2:e=1,Ne(e*r,-i)),x=Eg(w)}function O(){g=Ne(S-w*i,x)}function D(){b=Ne(M+w*r,x)}function _(){S=i?Ne(g+w*i,x):g}function E(){M=r?Ne(b-w*r,x):b}if(A[0]&&A[1]){w=((b=C[1])-(g=C[0]))/(e+i+r);var z=t.getExtent(),R=me(z[1]-z[0]);x=function(t,n,i){var r=me(t[1]-t[0]);if(!isFinite(r)||0===r)return NaN;var e=we(2*me(i||1)*me(r))/xe,o=we(me(n))/xe,a=de(0,ge(-e+o));return isFinite(a)||(a=NaN),a}([b,g],R,.5/e),_(),E(),Ue(x)&&(w=Ne(w,x))}else{var P=C[1]-C[0];w=s?de(Re(P),1):Be(P/e,2),x=Eg(w),A[0]?(g=C[0],I((function(){if(_(),M=Ne(S+w*e,x),D(),b>=C[1])return!0}))):A[1]?(b=C[1],I((function(){if(E(),S=Ne(M-w*e,x),O(),g<=C[0])return!0}))):I((function(){S=Ne(ge(C[0]/w)*w,x),M=Ne(ye(C[1]/w)*w,x);var t=pe((M-S)/w);if(t<=e){var n=e-t,i=void 0,r=u.incl0||s;if(r&&0===C[0])i=[0,n];else if(r&&0===C[1])i=[n,0];else{var o=ye(n/2);i=n%2==0?[o,o]:g+b<C[0]+C[1]?[o,o+1]:[o+1,o]}if(S=Ne(S-w*i[0],x),M=Ne(M+w*i[1],x),O(),D(),g<=C[0]&&b>=C[1])return!0}}))}sb(o,A,L,[g,b],N,{interval:w,intervalCount:e,intervalPrecision:x,niceExtent:[S,M]})}(t,t.__alignTo.scale)}))}z(this._axesList,(function(t){Tb(t,1);var n=t.scale;_g(n)&&n.setSortInfo(t.model.get("categorySortInfo"))})),r(i.x),r(i.y);var e={};z(i.x,(function(t){zx(i,"y",t,e)})),z(i.y,(function(t){zx(i,"x",t,e)})),this.resize(this.model,n)},t.prototype.resize=function(t,n,i){var r=yc(t,n),e=this._rect=pc(t.getBoxLayoutParams(),r.refContainer),o=this._axesMap,a=this._coordsList,u=t.get("containLabel");if(Bx(o,e),!i){var s=function(t,n,i,r,e){var o=new Yw(Hx);return z(i,(function(i){return z(i,(function(i){ub(i.model)&&(i.axisBuilder=function(t,n,i,r,e,o){for(var a=hx(t,i),u=!1,s=!1,f=0;f<n.length;f++)Cg(n[f].getOtherAxis(i.axis).scale)&&(u=s=!0,"category"===i.axis.type&&i.axis.onBand&&(s=!1));return a.axisLineAutoShow=u,a.axisTickAutoShow=s,a.defaultNameMoveOverlap=o,new Jw(i,r,a,e)}(t,n,i.model,e,o,!r))}))})),o}(e,a,o,u,n),f=void 0;if(u)f=Vx(e.clone(),"axisLabel",null,e,o,s,r);else{var h=function(t,n,i){var r,e=t.get("outerBoundsMode",!0);"same"===e?r=n.clone():null!=e&&"auto"!==e||(r=pc(t.get("outerBounds",!0)||lx,i.refContainer));var o=t.get("outerBoundsContain",!0);return{outerBoundsRect:r,parsedOuterBoundsContain:null==o||"auto"===o||D(["all","axisLabel"],o)<0?"all":o,outerBoundsClamp:[Ae(tt(t.get("outerBoundsClampWidth",!0),cx[0]),n.width),Ae(tt(t.get("outerBoundsClampHeight",!0),cx[1]),n.height)]}}(t,e,r),l=h.outerBoundsRect;l&&(f=Vx(l,h.parsedOuterBoundsContain,h.outerBoundsClamp,e,o,s,r))}Wx(e,o,2,null,f,r),z(this._coordsList,(function(t){t.calcAffineTransform()}))}},t.prototype.getAxis=function(t,n){var i=this._axesMap[t];if(null!=i)return i[n||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(t,n){if(null!=t&&null!=n)return this._coordsMap["x"+t+"y"+n];X(t)&&(n=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===n)return r[i]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(t,n,i){var r=this._findConvertTarget(n);return r.cartesian?r.cartesian.dataToPoint(i):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(i)):null},t.prototype.convertFromPixel=function(t,n,i){var r=this._findConvertTarget(n);return r.cartesian?r.cartesian.pointToData(i):r.axis?r.axis.coordToData(r.axis.toLocalCoord(i)):null},t.prototype._findConvertTarget=function(t){var n,i,r=t.seriesModel,e=t.xAxisModel||r&&r.getReferringComponents("xAxis",ho).models[0],o=t.yAxisModel||r&&r.getReferringComponents("yAxis",ho).models[0],a=t.gridModel;return r?D(this._coordsList,n=r.coordinateSystem)<0&&(n=null):e&&o?n=this.getCartesian(e.componentIndex,o.componentIndex):e?i=this.getAxis("x",e.componentIndex):o?i=this.getAxis("y",o.componentIndex):a&&a.coordinateSystem===this&&(n=this._coordsList[0]),{cartesian:n,axis:i}},t.prototype.containPoint=function(t){var n=this._coordsList[0];if(n)return n.containPoint(t)},t.prototype._initCartesian=function(t,n){var i=this,r=this,e={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},a={x:0,y:0};if(n.eachComponent("xAxis",u("x"),this),n.eachComponent("yAxis",u("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);function u(n){return function(i,u){if(function(t,n){return t.getCoordSysModel()===n}(i,t)){var s=i.get("position");"x"===n?"top"!==s&&"bottom"!==s&&(s=e.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=e.left?"right":"left"),e[s]=!0;var f,h=(null!=(f=i.get("type"))&&(mt(nb,f)||pg.getClass(f))||(f="value"),f),l=new Vw(n,function(t,n){var i;switch(n){case"category":return new Vg({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Ug({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC"),breakOption:i});case"log":return new Kg({logBase:t.get("logBase"),breakOption:i});case"value":return new Hg({breakOption:i});default:return new(pg.getClass(n)||Hg)({})}}(i,h),[0,0],h,s);l.onBand=hb(l.scale,i),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=r,l.index=u,r._axesList.push(l),o[n][u]=l,a[n]++}}}this._axesMap=o,z(o.x,(function(n,r){z(o.y,(function(e,o){var a="x"+r+"y"+o,u=new Dx(a);u.master=i,u.model=t,i._coordsMap[a]=u,i._coordsList.push(u),u.addAxis(n),u.addAxis(e)}))})),Px(o.x),Px(o.y)},t.prototype.getTooltipAxes=function(t){var n=[],i=[];return z(this.getCartesians(),(function(r){var e=null!=t&&"auto"!==t?r.getAxis(t):r.getBaseAxis(),o=r.getOtherAxis(e);D(n,e)<0&&n.push(e),D(i,o)<0&&i.push(o)})),{baseAxes:n,otherAxes:i}},t.create=function(n,i){var r=[];return n.eachComponent("grid",(function(e,o){var a=new t(e,n,i);a.name="grid_"+o,a.resize(e,i,!0),e.coordinateSystem=a,r.push(a),z(a._axesList,(function(n){var i,r;r=t.dimIdxMap,kb(i=n).dimIdxInCoord=r.get(i.dim)}))})),n.eachSeries((function(t){var n,i;!function(t){var n=t.targetModel,i=t.coordSysType,r=t.coordSysProvider,e=t.isDefaultDataCoordSys,o=function(t){var n=t.getShallow("coordinateSystem"),i=t.getShallow("coordinateSystemUsage",!0),r=0;if(n){var e="series"===t.mainType;null==i&&(i=e?"data":"box"),"data"===i?(r=1,e||(r=0)):"box"===i&&(r=2,e||function(t){return!!ac[t]}(n)||(r=0))}return{coordSysType:n,kind:r}}(n),a=o.kind,u=o.coordSysType;if(e&&1!==a&&(a=1,u=i),0===a||u!==i)return 0;var s=r(i,n);s&&(1===a?n.coordinateSystem=s:n.boxCoordinateSystem=s)}({targetModel:t,coordSysType:vx,coordSysProvider:function(){var r=function(t){var n={xAxisModel:null,yAxisModel:null};return z(n,(function(i,r){var e=r.replace(/Model$/,""),o=t.getReferringComponents(e,ho).models[0];n[r]=o})),n}(t),e=r.xAxisModel,o=r.yAxisModel;return n=e.axis,i=o.axis,e.getCoordSysModel().coordinateSystem.getCartesian(e.componentIndex,o.componentIndex)}}),n&&i&&(pb(n,t,vx),pb(i,t,vx))}),this),r},t.dimensions=Ix,t.dimIdxMap=qy(Ix),t}();function zx(t,n,i,r){i.getAxesOnZeroOf=function(){return e?[e]:[]};var e,o=t[n],a=i.model,u=a.get(["axisLine","onZero"]),s=a.get(["axisLine","onZeroAxisIndex"]);if(u){if(null!=s)Rx(u,o[s])&&(e=o[s]);else for(var f in o)if(mt(o,f)&&Rx(u,o[f])&&!r[h(o[f])]){e=o[f];break}e&&(r[h(e)]=!0)}function h(t){return t.dim+"_"+t.index}}function Rx(t,n){if(!n)return!1;var i=function(t){var n=t.getExtentUnsafe(0,null),i=n[0],r=n[1];return go(i,r)?0===i||0===r?2:i<0&&r>0?1:3:3}(n.scale),r=n&&"category"!==n.type&&"time"!==n.type&&3!==i;return r&&"auto"===t&&function(t){return ib(t).noOnMyZero}(n)&&(r=!1),r}function Px(t){for(var n,i=F(t),r=[],e=i.length-1;e>=0;e--){var o=t[+i[e]];Cg(o.scale)&&null==void o.model.get("breaks",!0)&&(o.model.get("alignTicks")&&null==o.model.get("interval")?r.push(o):n=o)}n||(n=r.pop()),n&&z(r,(function(t){t.__alignTo=n}))}function Bx(t,n){z(t.x,(function(t){return Fx(t,n.x,n.width)})),z(t.y,(function(t){return Fx(t,n.y,n.height)}))}function Fx(t,n,i){var r=[0,i],e=t.inverse?1:0;t.setExtent(r[e],r[1-e]),function(t,n){var i=t.getExtent(),r=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+n}:function(t){return r-t+n},t.toLocalCoord="x"===t.dim?function(t){return t-n}:function(t){return r-t+n}}(t,n)}function Vx(t,n,i,r,e,o,a){Wx(r,e,1,n,!1,a);var u=[0,0,0,0];f(0),f(1),h(r,0,NaN),h(r,1,NaN);var s=null==function(t,n){if(t&&n)for(var i=0,r=t.length;i<r;i++)if(n.call(undefined,t[i],i,t))return t[i]}(u,(function(t){return t>0}));return Ah(r,u,!0,!0,i),Bx(e,r),s;function f(t){z(e[lh[t]],(function(n){if(ub(n.model)){var i=o.ensureRecord(n.model),r=i.labelInfoList;if(r)for(var e=0;e<r.length;e++){var a=r[e],u=n.scale.normalize(fb(n.scale,Gw(a.label).labelInfo.tick));h(a.rect,t,u=1===t?1-u:u),h(a.rect,1-t,NaN)}var s=i.nameLayout;s&&(u=ab(i.nameLocation)?.5:NaN,h(s.rect,t,u),h(s.rect,1-t,NaN))}}))}function h(n,i,r){var e=t[lh[i]]-n[lh[i]],o=n[ch[i]]+n[lh[i]]-(t[ch[i]]+t[lh[i]]);e=l(e,1-r),o=l(o,r);var a=_x[i][0],s=_x[i][1];u[a]=de(u[a],e),u[s]=de(u[s],o)}function l(t,n){return t>0&&!J(n)&&n>1e-4&&(t/=n),t}}function Wx(t,n,i,r,e,o){var a=2===i;z(n,(function(n){return z(n,(function(n){ub(n.model)&&(function(t,n,i){var r=hx(n,i);t.updateCfg(r)}(n.axisBuilder,t,n.model),n.axisBuilder.build(a?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:e}))}))}));var u={x:0,y:0};function s(n){u[lh[1-n]]=t[ch[n]]<=.5*o.refContainer[ch[n]]?0:1-n==1?2:1}s(0),s(1),z(n,(function(t,n){return z(t,(function(t){ub(t.model)&&(("all"===r||a)&&t.axisBuilder.build({axisName:!0},{nameMarginLevel:u[n]}),a&&t.axisBuilder.build({axisLine:!0}))}))}))}var Hx=function(t,n,i,r,e,o){var a="x"===i.axis.dim?"y":"x";Zw(t,0,0,r,e,o),ab(t.nameLocation)||z(n.recordMap[a],(function(t){t&&t.labelInfoList&&t.dirVec&&Kw(t.labelInfoList,t.dirVec,r,e)}))};function Ux(t,n){return"all"===t||H(t)&&D(t,n)>=0||t===n}function Gx(t){var n=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return n&&n.axesInfo[Yx(t)]}function jx(t){return!!t.get(["handle","show"])}function Yx(t){return t.type+"||"+t.id}var Xx={},qx=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return o(n,t),n.prototype.render=function(n,i,r,e){this.axisPointerClass&&function(t){var n=Gx(t);if(n){var i=n.axisPointerModel,r=n.axis.scale,e=i.option,o=i.get("status"),a=i.get("value");null!=a&&(a=r.parse(a));var u=jx(i);null==o&&(e.status=u?"show":"hide");var s=r.getExtent();(null==a||a>s[1])&&(a=s[1]),a<s[0]&&(a=s[0]),e.value=a,u&&(e.status=n.axis.scale.isBlank()?"hide":"show")}}(n),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(n,r,!0)},n.prototype.updateAxisPointer=function(t,n,i){this._doUpdateAxisPointerClass(t,i,!1)},n.prototype.remove=function(t,n){var i=this._axisPointer;i&&i.remove(n)},n.prototype.dispose=function(n,i){this._disposeAxisPointer(i),t.prototype.dispose.apply(this,arguments)},n.prototype._doUpdateAxisPointerClass=function(t,i,r){var e=n.getAxisPointerClass(this.axisPointerClass);if(e){var o=function(t){var n=Gx(t);return n&&n.axisPointerModel}(t);o?(this._axisPointer||(this._axisPointer=new e)).render(t,o,i,r):this._disposeAxisPointer(i)}},n.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},n.registerAxisPointerClass=function(t,n){Xx[t]=n},n.getAxisPointerClass=function(t){return t&&Xx[t]},n.type="axis",n}(Hd),Zx=ao(),$x=["splitArea","splitLine","minorSplitLine","breakArea"],Kx=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.axisPointerClass="CartesianAxisPointer",i}return o(n,t),n.prototype.render=function(n,i,r,e){this.group.removeAll();var o=this._axisGroup;this._axisGroup=new fe,this.group.add(this._axisGroup),ub(n)&&(this._axisGroup.add(n.axis.axisBuilder.group),z($x,(function(t){n.get([t,"show"])&&Jx[t](this,this._axisGroup,n,n.getCoordSysModel(),r)}),this),e&&"changeAxisOrder"===e.type&&e.isInitSort||Mh(o,this._axisGroup,n),t.prototype.render.call(this,n,i,r,e))},n.prototype.remove=function(){Zx(this).splitAreaColors=null},n.type="cartesianAxis",n}(qx),Jx={splitLine:function(t,n,i,r){var e=i.axis;if(!e.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),u=a.get("color"),s=!1!==o.get("showMinLine"),f=!1!==o.get("showMaxLine");u=H(u)?u:[u];for(var h=r.coordinateSystem.getRect(),l=e.isHorizontal(),c=0,v=e.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),d=[],m=[],p=a.getLineStyle(),y=0;y<v.length;y++){var g=e.toGlobalCoord(v[y].coord);if((0!==y||s)&&(y!==v.length-1||f)){var b=v[y].tickValue;l?(d[0]=g,d[1]=h.y,m[0]=g,m[1]=h.y+h.height):(d[0]=h.x,d[1]=g,m[0]=h.x+h.width,m[1]=g);var w=c++%u.length,x=new zf({anid:null!=b?"line_"+b:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:m[0],y2:m[1]},style:O({stroke:u[w]},p),silent:!0});gh(x.shape,p.lineWidth),n.add(x)}}}},minorSplitLine:function(t,n,i,r){var e=i.axis,o=i.getModel("minorSplitLine").getModel("lineStyle"),a=r.coordinateSystem.getRect(),u=e.isHorizontal(),s=e.getMinorTicksCoords();if(s.length)for(var f=[],h=[],l=o.getLineStyle(),c=0;c<s.length;c++)for(var v=0;v<s[c].length;v++){var d=e.toGlobalCoord(s[c][v].coord);u?(f[0]=d,f[1]=a.y,h[0]=d,h[1]=a.y+a.height):(f[0]=a.x,f[1]=d,h[0]=a.x+a.width,h[1]=d);var m=new zf({anid:"minor_line_"+s[c][v].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:l,silent:!0});gh(m.shape,l.lineWidth),n.add(m)}},splitArea:function(t,n,i,r){!function(t,n,i,r){var e=i.axis;if(!e.scale.isBlank()){var o=i.getModel("splitArea"),a=o.getModel("areaStyle"),u=a.get("color"),s=r.coordinateSystem.getRect(),f=e.getTicksCoords({tickModel:o,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(f.length){var h=u.length,l=Zx(t).splitAreaColors,c=ct(),v=0;if(l)for(var d=0;d<f.length;d++){var m=l.get(f[d].tickValue);if(null!=m){v=(m+(h-1)*d)%h;break}}var p=e.toGlobalCoord(f[0].coord),y=a.getAreaStyle();for(u=H(u)?u:[u],d=1;d<f.length;d++){var g=e.toGlobalCoord(f[d].coord),b=void 0,w=void 0,x=void 0,M=void 0;e.isHorizontal()?(w=s.y,M=s.height,p=(b=p)+(x=g-b)):(b=s.x,x=s.width,p=(w=p)+(M=g-w));var S=f[d-1].tickValue;null!=S&&c.set(S,v),n.add(new xu({anid:null!=S?"area_"+S:null,shape:{x:b,y:w,width:x,height:M},style:O({fill:u[v]},y),autoBatch:!0,silent:!0})),v=(v+1)%h}Zx(t).splitAreaColors=c}}}(t,n,i,r)},breakArea:function(){}},Qx=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return o(n,t),n.type="xAxis",n}(Kx),tM=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=Qx.type,n}return o(n,t),n.type="yAxis",n}(Kx),nM=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type="grid",n}return o(n,t),n.prototype.render=function(t){this.group.removeAll(),t.get("show")&&this.group.add(new xu({shape:t.coordinateSystem.getRect(),style:O({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},n.type="grid",n}(Hd),iM={offset:0};function rM(t){t.registerComponentView(nM),t.registerComponentModel(dx),t.registerCoordinateSystem("cartesian2d",Ex),Nx(t,"x",Mx,iM),Nx(t,"y",Mx,iM),t.registerComponentView(Qx),t.registerComponentView(tM),t.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}))}var eM=ao(),oM=L,aM=V,uM=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,n,i,r){var e=n.get("value"),o=n.get("status");if(this._axisModel=t,this._axisPointerModel=n,this._api=i,r||this._lastValue!==e||this._lastStatus!==o){this._lastValue=e,this._lastStatus=o;var a=this._group,u=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(u&&u.hide());a&&a.show(),u&&u.show();var s={};this.makeElOption(s,e,t,n,i);var f=s.graphicKey;f!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,n);if(a){var l=W(sM,n,h);this.updatePointerEl(a,s,l),this.updateLabelEl(a,s,l,n)}else a=this._group=new fe,this.createPointerEl(a,s,t,n),this.createLabelEl(a,s,t,n),i.getZr().add(a);cM(a,n,!0),this._renderHandle(e)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,n){var i=n.get("animation"),r=t.axis,e="category"===r.type,o=n.get("snap");if(!o&&!e)return!1;if("auto"===i||null==i){var a=this.animationThreshold;if(e&&qb(r).w>a)return!0;if(o){var u=Gx(t).seriesDataCount,s=r.getExtent();return Math.abs(s[0]-s[1])/u>a}return!1}return!0===i},t.prototype.makeElOption=function(){},t.prototype.createPointerEl=function(t,n){var i=n.pointer;if(i){var r=eM(t).pointerEl=new Vh[i.type](oM(n.pointer));t.add(r)}},t.prototype.createLabelEl=function(t,n,i,r){if(n.label){var e=eM(t).labelEl=new Tu(oM(n.label));t.add(e),hM(e,r)}},t.prototype.updatePointerEl=function(t,n,i){var r=eM(t).pointerEl;r&&n.pointer&&(r.setStyle(n.pointer.style),i(r,{shape:n.pointer.shape}))},t.prototype.updateLabelEl=function(t,n,i,r){var e=eM(t).labelEl;e&&(e.setStyle(n.label.style),i(e,{x:n.label.x,y:n.label.y}),hM(e,r))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var n,i=this._axisPointerModel,r=this._api.getZr(),e=this._handle,o=i.getModel("handle"),a=i.get("status");if(!o.get("show")||!a||"hide"===a)return e&&r.remove(e),void(this._handle=null);this._handle||(n=!0,e=this._handle=Sh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){$t(t.event)},onmousedown:aM(this._onHandleDragMove,this,0,0),drift:aM(this._onHandleDragMove,this),ondragend:aM(this._onHandleDragEnd,this)}),r.add(e)),cM(e,i,!1),e.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var u=o.get("size");H(u)||(u=[u,u]),e.scaleX=u[0]/2,e.scaleY=u[1]/2,im(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,n)}},t.prototype._moveHandleToValue=function(t,n){sM(this._axisPointerModel,!n&&this._moveAnimation,this._handle,lM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,n){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(lM(i),[t,n],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(lM(r)),eM(i).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var n=t.getZr(),i=this._group,r=this._handle;n&&i&&(this._lastGraphicKey=null,i&&n.remove(i),r&&n.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),rm(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,n,i){return{x:t[i=i||0],y:t[1-i],width:n[i],height:n[1-i]}},t}();function sM(t,n,i,r){fM(eM(i).lastProp,r)||(eM(i).lastProp=r,n?oh(i,r,t):(i.stopAnimation(),i.attr(r)))}function fM(t,n){if(X(t)&&X(n)){var i=!0;return z(n,(function(n,r){i=i&&fM(t[r],n)})),!!i}return t===n}function hM(t,n){t[n.get(["label","show"])?"show":"hide"]()}function lM(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function cM(t,n,i){var r=n.get("z"),e=n.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=r&&(t.z=r),null!=e&&(t.zlevel=e),t.silent=i)}))}function vM(t,n,i,r,e){t=n.scale.parse(t);var o=n.scale.getLabel({value:t},{precision:e.precision}),a=e.formatter;if(a){var u={value:eb(n,{value:t}),axisDimension:n.dim,axisIndex:n.index,seriesData:[]};z(r,(function(t){var n=i.getSeriesByIndex(t.seriesIndex),r=n&&n.getDataParams(t.dataIndexInside);r&&u.seriesData.push(r)})),G(a)?o=a.replace("{value}",o):U(a)&&(o=a(u))}return o}function dM(t,n,i){var r=[1,0,0,1,0,0];return on(r,r,i.rotation),en(r,r,i.position),wh([t.dataToCoord(n),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],r)}var mM=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.prototype.makeElOption=function(t,n,i,r,e){var o=i.axis,a=o.grid,u=r.get("type"),s=o.getGlobalExtent(),f=pM(a,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(n,!0));if(u&&"none"!==u){var l=function(t){var n,i=t.get("type"),r=t.getModel(i+"Style");return"line"===i?(n=r.getLineStyle()).fill=null:"shadow"===i&&((n=r.getAreaStyle()).stroke=null),n}(r),c=yM[u](o,h,s,f,r.get("seriesDataIndices"),r.ecModel);c.style=l,t.graphicKey=c.type,t.pointer=c}!function(t,n,i,r,e,o){var a=Jw.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=e.get(["label","margin"]),function(t,n,i,r,e){var o=vM(i.get("value"),n.axis,n.ecModel,i.get("seriesDataIndices"),{precision:i.get(["label","precision"]),formatter:i.get(["label","formatter"])}),a=i.getModel("label"),u=tc(a.get("padding")||0),s=a.getFont(),f=Ur(o,s),h=e.position,l=f.width+u[1]+u[3],c=f.height+u[0]+u[2],v=e.align;"right"===v&&(h[0]-=l),"center"===v&&(h[0]-=l/2);var d=e.verticalAlign;"bottom"===d&&(h[1]-=c),"middle"===d&&(h[1]-=c/2),function(t,n,i,r){var e=r.getWidth(),o=r.getHeight();t[0]=Math.min(t[0]+n,e)-n,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,l,c,r);var m=a.get("backgroundColor");m&&"auto"!==m||(m=n.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:jh(a,{text:o,font:s,fill:a.getTextColor(),padding:u,backgroundColor:m}),z2:10}}(n,r,e,o,{position:dM(r.axis,t,i),align:a.textAlign,verticalAlign:a.textVerticalAlign})}(n,t,hx(a.getRect(),i),i,r,e)},n.prototype.getHandleTransform=function(t,n,i){var r=hx(n.axis.grid.getRect(),n,{labelInside:!1});r.labelMargin=i.get(["handle","margin"]);var e=dM(n.axis,t,r);return{x:e[0],y:e[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},n.prototype.updateHandleTransform=function(t,n,i){var r=i.axis,e=r.grid,o=r.getGlobalExtent(!0),a=pM(e,r).getOtherAxis(r).getGlobalExtent(),u="x"===r.dim?0:1,s=[t.x,t.y];s[u]+=n[u],s[u]=ve(o[1],s[u]),s[u]=de(o[0],s[u]);var f=(a[1]+a[0])/2,h=[f,f];return h[u]=s[u],{x:s[0],y:s[1],rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][u]}},n}(uM);function pM(t,n){var i={};return i[n.dim+"AxisIndex"]=n.index,t.getCartesian(i)}var yM={line:function(t,n,i,r){var e,o,a;return{type:"Line",subPixelOptimize:!0,shape:(e=[n,r[0]],o=[n,r[1]],a=gM(t),{x1:e[a=a||0],y1:e[1-a],x2:o[a],y2:o[1-a]})}},shadow:function(t,n,i,r,e,o){var a,u,s,f=function(t,n,i){return qb(t,{fromStat:{sers:R(n,(function(t){return i.getSeriesByIndex(t.seriesIndex)}))},min:1}).w}(t,e,o),h=r[1]-r[0],l=function(t,n,i){return[de(ve(n[0],n[1]),t-i/2),ve(t+i/2,de(n[0],n[1]))]}(n,i,f),c=l[0];return{type:"Rect",shape:(a=[c,r[0]],u=[l[1]-c,h],s=gM(t),{x:a[s=s||0],y:a[1-s],width:u[s],height:u[1-s]})}}};function gM(t){return"x"===t.dim?0:1}var bM=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return o(n,t),n.type="axisPointer",n.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Sc.color.border,width:1,type:"dashed"},shadowStyle:{color:Sc.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:Sc.color.neutral00,padding:[5,7,5,7],backgroundColor:Sc.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:Sc.color.accent40,throttle:40}},n}(Mc),wM=ao(),xM=z;function MM(t,n,i){if(!u.node){var r=n.getZr();wM(r).records||(wM(r).records={}),function(t,n){function i(i,r){t.on(i,(function(i){var e=function(t){var n={showTip:[],hideTip:[]},i=function(r){var e=n[r.type];e?e.push(r):(r.dispatchAction=i,t.dispatchAction(r))};return{dispatchAction:i,pendings:n}}(n);xM(wM(t).records,(function(t){t&&r(t,i,e.dispatchAction)})),function(t,n){var i,r=t.showTip.length,e=t.hideTip.length;r?i=t.showTip[r-1]:e&&(i=t.hideTip[e-1]),i&&(i.dispatchAction=null,n.dispatchAction(i))}(e.pendings,n)}))}wM(t).initialized||(wM(t).initialized=!0,i("click",W(kM,"click")),i("mousemove",W(kM,"mousemove")),i("mousewheel",W(kM,"mousewheel")),i("globalout",SM))}(r,n),(wM(r).records[t]||(wM(r).records[t]={})).handler=i}}function SM(t,n,i){t.handler("leave",null,i)}function kM(t,n,i,r){n.handler(t,i,r)}function TM(t,n){if(!u.node){var i=n.getZr();(wM(i).records||{})[t]&&(wM(i).records[t]=null)}}var AM=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return o(n,t),n.prototype.render=function(t,n,i){var r=n.getComponent("tooltip"),e=t.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click|mousewheel";MM("axisPointer",i,(function(t,n,i){"none"!==e&&("leave"===t||e.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:n&&n.offsetX,y:n&&n.offsetY})}))},n.prototype.remove=function(t,n){TM("axisPointer",n)},n.prototype.dispose=function(t,n){TM("axisPointer",n)},n.type="axisPointer",n}(Hd);function NM(t,n){var i,r=[],e=t.seriesIndex;if(null==e||!(i=n.getSeriesByIndex(e)))return{point:[]};var o=i.getData(),a=oo(o,t);if(null==a||a<0||H(a))return{point:[]};var u=o.getItemGraphicEl(a),s=i.coordinateSystem;if(i.getTooltipPosition)r=i.getTooltipPosition(a)||[];else if(s&&s.dataToPoint)if(t.isStacked){var f=s.getBaseAxis(),h=s.getOtherAxis(f).dim,l="x"===h||"radius"===h?1:0,c=o.mapDimension(f.dim),v=[];v[l]=o.get(c,a),v[1-l]=o.get(o.getCalculationInfo("stackResultDimension"),a),r=s.dataToPoint(v)||[]}else r=s.dataToPoint(o.getValues(R(s.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(u){var d=u.getBoundingRect().clone();d.applyTransform(u.transform),r=[d.x+d.width/2,d.y+d.height/2]}return{point:r,el:u}}var LM=ao();function CM(t,n,i){var r=t.currTrigger,e=[t.x,t.y],o=t,a=t.dispatchAction||V(i.dispatchAction,i),u=n.getComponent("axisPointer").coordSysAxesInfo;if(u){EM(e)&&(e=NM({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},n).point);var s=EM(e),f=o.axesInfo,h=u.axesInfo,l="leave"===r||EM(e),c={},v={},d={list:[],map:{}},m={showPointer:W(OM,v),showTooltip:W(DM,d)};z(u.coordSysMap,(function(t,n){var i=s||t.containPoint(e);z(u.coordSysAxesInfo[n],(function(t){var n=t.axis,r=function(t,n){for(var i=0;i<(t||[]).length;i++){var r=t[i];if(n.axis.dim===r.axisDim&&n.axis.model.componentIndex===r.axisIndex)return r}}(f,t);if(!l&&i&&(!f||r)){var o=r&&r.value;null!=o||s||(o=n.pointToData(e)),null!=o&&IM(t,o,m,!1,c)}}))}));var p={};return z(h,(function(t,n){var i=t.linkGroup;i&&!v[n]&&z(i.axesInfo,(function(n,r){var e=v[r];if(n!==t&&e){var o=e.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,_M(n),_M(t)))),p[t.key]=o}}))})),z(p,(function(t,n){IM(h[n],t,m,!0,c)})),function(t,n,i){var r=i.axesInfo=[];z(n,(function(n,i){var e=n.axisPointerModel.option,o=t[i];o?(!n.useHandle&&(e.status="show"),e.value=o.value,e.seriesDataIndices=(o.payloadBatch||[]).slice()):!n.useHandle&&(e.status="hide"),"show"===e.status&&r.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:e.value})}))}(v,h,c),function(t,n,i,r){if(!EM(n)&&t.list.length){var e=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:n[0],y:n[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:e.dataIndexInside,dataIndex:e.dataIndex,seriesIndex:e.seriesIndex,dataByCoordSys:t.list})}else r({type:"hideTip"})}(d,e,t,a),function(t,n,i){var r=i.getZr(),e="axisPointerLastHighlights",o=LM(r)[e]||{},a=LM(r)[e]={};z(t,(function(t){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&z(n.seriesDataIndices,(function(t){a[t.seriesIndex+"|"+t.dataIndex]=t}))}));var u=[],s=[];function f(t){return{seriesIndex:t.seriesIndex,dataIndex:t.dataIndex}}z(o,(function(t,n){!a[n]&&s.push(f(t))})),z(a,(function(t,n){!o[n]&&u.push(f(t))})),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),u.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:u})}(h,0,i),c}}function IM(t,n,i,r,e){var o=t.axis;if(!o.scale.isBlank()&&o.containData(n))if(t.involveSeries){var a=function(t,n){var i=n.axis,r=i.dim,e=t,o=[],a=Number.MAX_VALUE,u=-1;return z(n.seriesModels,(function(n){var s,f,h=n.getData().mapDimensionsAll(r);if(n.getAxisTooltipData){var l=n.getAxisTooltipData(h,t,i);f=l.dataIndices,s=l.nestestValue}else{if(!(f=n.indicesOfNearest(r,h[0],t,"category"===i.type?.5:null)).length)return;s=n.getData().get(h[0],f[0])}if(Ue(s)){var c=t-s,v=Math.abs(c);v<=a&&((v<a||c>=0&&u<0)&&(a=v,u=c,e=s,o.length=0),z(f,(function(t){o.push({seriesIndex:n.seriesIndex,dataIndexInside:t,dataIndex:n.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:e}}(n,t),u=a.payloadBatch,s=a.snapToValue;u[0]&&null==e.seriesIndex&&I(e,u[0]),!r&&t.snap&&o.containData(s)&&null!=s&&(n=s),i.showPointer(t,n,u),i.showTooltip(t,a,s)}else i.showPointer(t,n)}function OM(t,n,i,r){t[n.key]={value:i,payloadBatch:r}}function DM(t,n,i,r){var e=i.payloadBatch,o=n.axis,a=o.model,u=n.axisPointerModel;if(n.triggerTooltip&&e.length){var s=n.coordSys.model,f=Yx(s),h=t.map[f];h||(h=t.map[f]={coordSysId:s.id,coordSysIndex:s.componentIndex,coordSysType:s.type,coordSysMainType:s.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:r,valueLabelOpt:{precision:u.get(["label","precision"]),formatter:u.get(["label","formatter"])},seriesDataIndices:e.slice()})}}function _M(t){var n=t.axis.model,i={},r=i.axisDim=t.axis.dim;return i.axisIndex=i[r+"AxisIndex"]=n.componentIndex,i.axisName=i[r+"AxisName"]=n.name,i.axisId=i[r+"AxisId"]=n.id,i}function EM(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function zM(t){qx.registerAxisPointerClass("CartesianAxisPointer",mM),t.registerComponentModel(bM),t.registerComponentView(AM),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var n=t.axisPointer.link;n&&!H(n)&&(t.axisPointer.link=[n])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(t,n){t.getComponent("axisPointer").coordSysAxesInfo=function(t,n){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,n,i){var r=n.getComponent("tooltip"),e=n.getComponent("axisPointer"),o=e.get("link",!0)||[],a=[];z(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var u=Yx(i.model),s=t.coordSysAxesInfo[u]={};t.coordSysMap[u]=i;var f=i.model.getModel("tooltip",r);if(z(i.getAxes(),W(v,!1,null)),i.getTooltipAxes&&r&&f.get("show")){var h="axis"===f.get("trigger"),l="cross"===f.get(["axisPointer","type"]),c=i.getTooltipAxes(f.get(["axisPointer","axis"]));(h||l)&&z(c.baseAxes,W(v,!l||"cross",h)),l&&z(c.otherAxes,W(v,"cross",!1))}}function v(r,u,h){var l=h.model.getModel("axisPointer",e),c=l.get("show");if(c&&("auto"!==c||r||jx(l))){null==u&&(u=l.get("triggerTooltip")),l=r?function(t,n,i,r,e,o){var a=n.getModel("axisPointer"),u={};z(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){u[t]=L(a.get(t))})),u.snap="category"!==t.type&&!!o,"cross"===a.get("type")&&(u.type="line");var s=u.label||(u.label={});if(null==s.show&&(s.show=!1),"cross"===e){var f=a.get(["label","show"]);if(s.show=null==f||f,!o){var h=u.lineStyle=a.get("crossStyle");h&&O(s,h.textStyle)}}return t.model.getModel("axisPointer",new ll(u,i,r))}(h,f,e,n,r,u):l;var v=l.get("snap"),d=l.get("triggerEmphasis"),m=Yx(h.model),p=u||v||"category"===h.type,y=t.axesInfo[m]={key:m,axis:h,coordSys:i,axisPointerModel:l,triggerTooltip:u,triggerEmphasis:d,involveSeries:p,snap:v,useHandle:jx(l),seriesModels:[],linkGroup:null};s[m]=y,t.seriesInvolved=t.seriesInvolved||p;var g=function(t,n){for(var i=n.model,r=n.dim,e=0;e<t.length;e++){var o=t[e]||{};if(Ux(o[r+"AxisId"],i.id)||Ux(o[r+"AxisIndex"],i.componentIndex)||Ux(o[r+"AxisName"],i.name))return e}}(o,h);if(null!=g){var b=a[g]||(a[g]={axesInfo:{}});b.axesInfo[m]=y,b.mapper=o[g].mapper,y.linkGroup=b}}}}))}(i,t,n),i.seriesInvolved&&function(t,n){n.eachSeries((function(n){var i=n.coordinateSystem,r=n.get(["tooltip","trigger"],!0),e=n.get(["tooltip","show"],!0);i&&i.model&&"none"!==r&&!1!==r&&"item"!==r&&!1!==e&&!1!==n.get(["axisPointer","show"],!0)&&z(t.coordSysAxesInfo[Yx(i.model)],(function(t){var r=t.axis;i.getAxis(r.dim)===r&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())}))}))}(i,t),i}(t,n)}}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},CM)}var RM=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return o(n,t),n.type="tooltip",n.dependencies=["axisPointer"],n.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click|mousewheel",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Sc.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Sc.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:Sc.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:Sc.color.tertiary,fontSize:14}},n}(Mc);function PM(t){var n=t.get("confine");return null!=n?!!n:"richText"===t.get("renderMode")}function BM(t){if(u.domSupported)for(var n=document.documentElement.style,i=0,r=t.length;i<r;i++)if(t[i]in n)return t[i]}var FM=BM(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function VM(t,n){if(!t)return n;n=Ql(n,!0);var i=t.indexOf(n);return(t=-1===i?n:"-"+t.slice(0,i)+"-"+n).toLowerCase()}var WM=VM(BM(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),HM=VM(FM,"transform"),UM="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(u.transform3dSupported?"will-change:transform;":"");function GM(t,n,i){var r=t.toFixed(0)+"px",e=n.toFixed(0)+"px";if(!u.transformSupported)return i?"top:"+e+";left:"+r+";":[["top",e],["left",r]];var o=u.transform3dSupported,a="translate"+(o?"3d":"")+"("+r+","+e+(o?",0":"")+")";return i?"top:0;left:0;"+HM+":"+a+";":[["top",0],["left",0],[FM,a]]}function jM(t,n,i,r,e){var o=n&&n.painter;if(i){var a=o&&o.getViewportRoot();a&&function(t,n,i,r,e){Bt(Pt,n,r,e,!0)&&Bt(t,i,Pt[0],Pt[1])}(t,a,i,r,e)}else{t[0]=r,t[1]=e;var u=o&&o.getViewportRootOffset();u&&(t[0]+=u.offsetLeft,t[1]+=u.offsetTop)}t[2]=t[0]/n.getWidth(),t[3]=t[1]/n.getHeight()}var YM=function(){function t(t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,u.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=t.getZr(),e=n.appendTo,o=e&&(G(e)?document.querySelector(e):$(e)?e:U(e)&&e(t.getDom()));jM(this._styleCoord,r,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!a._enterable){var n=r.handler;Zt(r.painter.getViewportRoot(),t,!0),n.dispatch("mousemove",t)}},i.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(t){if(!this._container){var n=this._api.getDom(),i=(o=(e=n).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e))?o.position:null,r=n.style;"absolute"!==r.position&&"absolute"!==i&&(r.position="relative")}var e,o,a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},t.prototype.show=function(t,n){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,r=i.style,e=this._styleCoord;i.innerHTML?r.cssText=UM+function(t,n,i,r){var e=[],o=t.get("transitionDuration"),a=t.get("backgroundColor"),s=t.get("shadowBlur"),f=t.get("shadowColor"),h=t.get("shadowOffsetX"),l=t.get("shadowOffsetY"),c=t.getModel("textStyle"),v=Id(t,"html");return e.push("box-shadow:"+h+"px "+l+"px "+s+"px "+f),n&&o>0&&e.push(function(t,n,i){var r="cubic-bezier(0.23,1,0.32,1)",e="",o="";return i&&(o="opacity"+(e=" "+t/2+"s "+r)+",visibility"+e),n||(e=" "+t+"s "+r,o+=(o.length?",":"")+(u.transformSupported?""+HM+e:",left"+e+",top"+e)),WM+":"+o}(o,i,r)),a&&e.push("background-color:"+a),z(["width","color","radius"],(function(n){var i="border-"+n,r=Ql(i),o=t.get(r);null!=o&&e.push(i+":"+o+("color"===n?"":"px"))})),e.push(function(t){var n=[],i=t.get("fontSize"),r=t.getTextColor();r&&n.push("color:"+r),n.push("font:"+t.getFont());var e=tt(t.get("lineHeight"),Math.round(3*i/2));i&&n.push("line-height:"+e+"px");var o=t.get("textShadowColor"),a=t.get("textShadowBlur")||0,u=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return o&&a&&n.push("text-shadow:"+u+"px "+s+"px "+a+"px "+o),z(["decoration","align"],(function(i){var r=t.get(i);r&&n.push("text-"+i+":"+r)})),n.join(";")}(c)),null!=v&&e.push("padding:"+tc(v).join("px ")+"px"),e.join(";")+";"}(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+GM(e[0],e[1],!0)+"border-color:"+oc(n)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,n,i,r,e){var o=this.el;if(null!=t){var a="";if(G(e)&&"item"===i.get("trigger")&&!PM(i)&&(a=function(t,n,i){if(!G(i)||"inside"===i)return"";var r=t.get("backgroundColor"),e=t.get("borderWidth");n=oc(n);var o,a,u="left"===(o=i)?"right":"right"===o?"left":"top"===o?"bottom":"top",s=Math.max(1.5*Math.round(e),6),f="",h=HM+":";D(["left","right"],u)>-1?(f+="top:50%",h+="translateY(-50%) rotate("+(a="left"===u?-225:-45)+"deg)"):(f+="left:50%",h+="translateX(-50%) rotate("+(a="top"===u?225:45)+"deg)");var l=a*Math.PI/180,c=s+e,v=c*Math.abs(Math.cos(l))+c*Math.abs(Math.sin(l)),d=n+" solid "+e+"px;";return'<div style="'+["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",(f+=";"+u+":-"+Math.round(100*((v-Math.SQRT2*e)/2+Math.SQRT2*e-(v-c)/2))/100+"px")+";"+h+";","border-bottom:"+d,"border-right:"+d,"background-color:"+r+";"].join("")+'"></div>'}(i,r,e)),G(t))o.innerHTML=t+a;else if(t){o.innerHTML="",H(t)||(t=[t]);for(var u=0;u<t.length;u++)$(t[u])&&t[u].parentNode!==o&&o.appendChild(t[u]);if(a&&o.childNodes.length){var s=document.createElement("div");s.innerHTML=a,o.appendChild(s)}}}else o.innerHTML=""},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},t.prototype.moveTo=function(t,n){if(this.el){var i=this._styleCoord;if(jM(i,this._zr,this._container,t,n),null!=i[0]&&null!=i[1]){var r=this.el.style;z(GM(i[0],i[1]),(function(t){r[t[0]]=t[1]}))}}},t.prototype._moveIfResized=function(){var t=this._styleCoord[3];this.moveTo(this._styleCoord[2]*this._zr.getWidth(),t*this._zr.getHeight())},t.prototype.hide=function(){var t=this,n=this.el.style;this._enableDisplayTransition?(n.visibility="hidden",n.opacity="0"):n.display="none",u.transform3dSupported&&(n.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return t._longHide=!0}),500)},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(V(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this._zr;!function(t,n){function i(t){var n=t[Rt];n&&(n.clearMarkers&&n.clearMarkers(),delete t[Rt])}t&&i(t),n&&i(n)}(t&&t.painter&&t.painter.getViewportRoot(),this._container);var n=this.el;if(n){n.onmouseenter=n.onmousemove=n.onmouseleave=null;var i=n.parentNode;i&&i.removeChild(n)}this.el=this._container=null},t}(),XM=function(){function t(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),$M(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return t.prototype.update=function(t){var n=t.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(t,n,i,r){var e=this;X(t)&&Ye(""),this.el&&this._zr.remove(this.el);var o=i.getModel("textStyle");this.el=new Tu({style:{rich:n.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:Id(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),z(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(t){e.el.style[t]=i.get(t)})),z(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(t){e.el.style[t]=o.get(t)||0})),this._zr.add(this.el);var a=this;this.el.on("mouseover",(function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0})),this.el.on("mouseout",(function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}))},t.prototype.setEnterable=function(t){this._enterable=t},t.prototype.getSize=function(){var t=this.el,n=this.el.getBoundingRect(),i=ZM(t.style);return[n.width+i.left+i.right,n.height+i.top+i.bottom]},t.prototype.moveTo=function(t,n){var i=this.el;if(i){var r=this._styleCoord;$M(r,this._zr,t,n),t=r[0],n=r[1];var e=i.style,o=qM(e.borderWidth||0),a=ZM(e);i.x=t+o+a.left,i.y=n+o+a.top,i.markRedraw()}},t.prototype._moveIfResized=function(){var t=this._styleCoord[3];this.moveTo(this._styleCoord[2]*this._zr.getWidth(),t*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(V(this.hide,this),t)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t}();function qM(t){return Math.max(0,t)}function ZM(t){var n=qM(t.shadowBlur||0),i=qM(t.shadowOffsetX||0),r=qM(t.shadowOffsetY||0);return{left:qM(n-i),right:qM(n+i),top:qM(n-r),bottom:qM(n+r)}}function $M(t,n,i,r){t[0]=i,t[1]=r,t[2]=t[0]/n.getWidth(),t[3]=t[1]/n.getHeight()}var KM=new xu({shape:{x:-1,y:-1,width:2,height:2}}),JM=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}return o(n,t),n.prototype.init=function(t,n){if(!u.node&&n.getDom()){var i,r=t.getComponent("tooltip"),e=this._renderMode="auto"===(i=r.get("renderMode"))?u.domSupported?"html":"richText":i||"html";this._tooltipContent="richText"===e?new XM(n):new YM(n,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},n.prototype.render=function(t,n,i){if(!u.node&&i.getDom()){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=i;var r=this._tooltipContent;r.update(t),r.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&t.get("transitionDuration")?im(this,"_updatePosition",50,"fixRate"):rm(this,"_updatePosition")}},n.prototype._initGlobalListener=function(){var t=this._tooltipModel.get("triggerOn");MM("itemTooltip",this._api,V((function(n,i,r){"none"!==t&&(t.indexOf(n)>=0?this._tryShow(i,r):"leave"===n&&this._hide(r))}),this))},n.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,i=this._api,r=t.get("triggerOn");if("axis"!==t.get("trigger")&&(this._lastDataByCoordSys=null,this._cbParamsList=null),null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var e=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&e.manuallyShowTip(t,n,i,{x:e._lastX,y:e._lastY,dataByCoordSys:e._lastDataByCoordSys})}))}},n.prototype.manuallyShowTip=function(t,n,i,r){if(r.from!==this.uid&&!u.node&&i.getDom()){var e=tS(r,i);this._ticket="";var o=r.dataByCoordSys,a=function(t,n,i){var r=fo(t).queryOptionMap,e=r.keys()[0];if(e&&"series"!==e){var o,a=lo(n,e,r.get(e),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a)return i.getViewOfComponentModel(a).group.traverse((function(n){var i=Ru(n).tooltipConfig;if(i&&i.name===t.name)return o=n,!0})),o?{componentMainType:e,componentIndex:a.componentIndex,el:o}:void 0}}(r,n,i);if(a){var s=a.el.getBoundingRect().clone();s.applyTransform(a.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:a.el,position:r.position,positionDefault:"bottom"},e)}else if(r.tooltip&&null!=r.x&&null!=r.y){var f=KM;f.x=r.x,f.y=r.y,f.update(),Ru(f).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:f},e)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},e);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(t,n,i,r))return;var h=NM(r,n),l=h.point[0],c=h.point[1];null!=l&&null!=c&&this._tryShow({offsetX:l,offsetY:c,target:h.el,position:r.position,positionDefault:"bottom"},e)}else null!=r.x&&null!=r.y&&(i.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:i.getZr().findHover(r.x,r.y).target},e))}},n.prototype.manuallyHideTip=function(t,n,i,r){this._tooltipModel&&this._tooltipContent.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(tS(r,i))},n.prototype._manuallyAxisShowTip=function(t,n,i,r){var e=r.seriesIndex,o=r.dataIndex,a=n.getComponent("axisPointer").coordSysAxesInfo;if(null!=e&&null!=o&&null!=a){var u=n.getSeriesByIndex(e);if(u&&"axis"===QM([u.getData().getItemModel(o),u,(u.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:e,dataIndex:o,position:r.position}),!0}},n.prototype._tryShow=function(t,n){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,t);else if(i){var e,o;if("legend"===Ru(i).ssrType)return;this._lastDataByCoordSys=null,this._cbParamsList=null,Wm(i,(function(t){if(t.tooltipDisabled)return e=o=null,!0;e||o||(null!=Ru(t).dataIndex?e=t:null!=Ru(t).tooltipConfig&&(o=t))}),!0),e?this._showSeriesItemTooltip(t,e,n):o?this._showComponentItemTooltip(t,o,n):this._hide(n)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(n)}},n.prototype._showOrMove=function(t,n){var i=t.get("showDelay");n=V(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},n.prototype._showAxisTooltip=function(t,n){var i=this._ecModel,r=this._tooltipModel,e=[n.offsetX,n.offsetY],o=QM([n.tooltipOption],r),a=this._renderMode,u=[],s=xd("section",{blocks:[],noHeader:!0}),f=[],h=new Od;z(t,(function(t){z(t.dataByAxis,(function(t){var n=i.getComponent(t.axisDim+"Axis",t.axisIndex),e=t.value,o=n.axis,l=o.scale.parse(e);if(n&&null!=e){var c=vM(e,o,i,t.seriesDataIndices,t.valueLabelOpt),v=xd("section",{header:c,noHeader:!ot(c),sortBlocks:!0,blocks:[]});s.blocks.push(v),z(t.seriesDataIndices,(function(e){var o=i.getSeriesByIndex(e.seriesIndex),s=e.dataIndexInside,d=o.getDataParams(s);if(!(d.dataIndex<0)){d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=eb(n.axis,{value:l}),d.axisValueLabel=c,d.marker=h.makeTooltipMarker("item",oc(d.color),a);var m=Gv(o.formatTooltip(s,!0,null)),p=m.frag;if(p){var y=QM([o],r).get("valueFormatter");v.blocks.push(y?I({valueFormatter:y},p):p)}m.text&&f.push(m.text),u.push(d)}}))}}))})),s.blocks.reverse(),f.reverse();var l=n.position,c=o.get("order"),v=Nd(s,h,a,c,i.get("useUTC"),o.get("textStyle"));v&&f.unshift(v);var d=f.join("richText"===a?"\n\n":"<br/>");this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(o,l,e[0],e[1],this._tooltipContent,u):this._showTooltipContent(o,d,u,Math.random()+"",e[0],e[1],l,null,h)}))},n.prototype._showSeriesItemTooltip=function(t,n,i){var r=this._ecModel,e=Ru(n),o=e.seriesIndex,a=r.getSeriesByIndex(o),u=e.dataModel||a,s=e.dataIndex,f=e.dataType,h=u.getData(f),l=this._renderMode,c=t.positionDefault,v=QM([h.getItemModel(s),u,a&&(a.coordinateSystem||{}).model],this._tooltipModel,c?{position:c}:null),d=v.get("trigger");if(null==d||"item"===d){var m=u.getDataParams(s,f),p=new Od;m.marker=p.makeTooltipMarker("item",oc(m.color),l);var y=Gv(u.formatTooltip(s,!1,f)),g=v.get("order"),b=v.get("valueFormatter"),w=y.frag,x=w?Nd(b?I({valueFormatter:b},w):w,p,l,g,r.get("useUTC"),v.get("textStyle")):y.text,M="item_"+u.name+"_"+s;this._showOrMove(v,(function(){this._showTooltipContent(v,x,m,M,t.offsetX,t.offsetY,t.position,t.target,p)})),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:o,from:this.uid})}},n.prototype._showComponentItemTooltip=function(t,n,i){var r="html"===this._renderMode,e=Ru(n),o=e.tooltipConfig.option||{},a=o.encodeHTMLContent;G(o)&&(o={content:o,formatter:o},a=!0),a&&r&&o.content&&((o=L(o)).content=Ht(o.content));var u=[o],s=this._ecModel.getComponent(e.componentMainType,e.componentIndex);s&&u.push(s),u.push({formatter:o.content});var f=t.positionDefault,h=QM(u,this._tooltipModel,f?{position:f}:null),l=h.get("content"),c=Math.random()+"",v=new Od;this._showOrMove(h,(function(){var i=L(h.get("formatterParams")||{});this._showTooltipContent(h,l,i,c,t.offsetX,t.offsetY,t.position,n,v)})),i({type:"showTip",from:this.uid})},n.prototype._showTooltipContent=function(t,n,i,r,e,o,a,u,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var l=n,c=this._getNearestPoint([e,o],i,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)).color;if(h)if(G(h)){var v=t.ecModel.get("useUTC"),d=H(i)?i[0]:i;l=h,d&&d.axisType&&d.axisType.indexOf("time")>=0&&(l=zl(d.axisValue,l,v)),l=ec(l,i,!0)}else if(U(h)){var m=V((function(n,r){n===this._ticket&&(f.setContent(r,s,t,c,a),this._updatePosition(t,a,e,o,f,i,u))}),this);this._ticket=r,l=h(i,r,m)}else l=h;f.setContent(l,s,t,c,a),f.show(t,c),this._updatePosition(t,a,e,o,f,i,u)}},n.prototype._getNearestPoint=function(t,n,i,r,e){return"axis"===i||H(n)?{color:r||e}:H(n)?void 0:{color:r||n.color||n.borderColor}},n.prototype._updatePosition=function(t,n,i,r,e,o,a){var u=this._api.getWidth(),s=this._api.getHeight();n=n||t.get("position");var f=e.getSize(),h=t.get("align"),l=t.get("verticalAlign"),c=a&&a.getBoundingRect().clone();if(a&&c.applyTransform(a.transform),U(n)&&(n=n([i,r],o,e.el,c,{viewSize:[u,s],contentSize:f.slice()})),H(n))i=Te(n[0],u),r=Te(n[1],s);else if(X(n)){var v=n;v.width=f[0],v.height=f[1];var d=pc(v,{width:u,height:s});i=d.x,r=d.y,h=null,l=null}else if(G(n)&&a){var m=function(t,n,i,r){var e=i[0],o=i[1],a=Math.ceil(Math.SQRT2*r)+8,u=0,s=0,f=n.width,h=n.height;switch(t){case"inside":u=n.x+f/2-e/2,s=n.y+h/2-o/2;break;case"top":u=n.x+f/2-e/2,s=n.y-o-a;break;case"bottom":u=n.x+f/2-e/2,s=n.y+h+a;break;case"left":u=n.x-e-a,s=n.y+h/2-o/2;break;case"right":u=n.x+f+a,s=n.y+h/2-o/2}return[u,s]}(n,c,f,t.get("borderWidth"));i=m[0],r=m[1]}else m=function(t,n,i,r,e,o,a){var u=i.getSize(),s=u[0],f=u[1];return null!=o&&(t+s+o+2>r?t-=s+o:t+=o),null!=a&&(n+f+a>e?n-=f+a:n+=a),[t,n]}(i,r,e,u,s,h?null:20,l?null:20),i=m[0],r=m[1];h&&(i-=nS(h)?f[0]/2:"right"===h?f[0]:0),l&&(r-=nS(l)?f[1]/2:"bottom"===l?f[1]:0),PM(t)&&(m=function(t,n,i,r,e){var o=i.getSize(),a=o[0],u=o[1];return t=Math.min(t+a,r)-a,n=Math.min(n+u,e)-u,[t=Math.max(t,0),n=Math.max(n,0)]}(i,r,e,u,s),i=m[0],r=m[1]),e.moveTo(i,r)},n.prototype._updateContentNotChangedOnAxis=function(t,n){var i=this._lastDataByCoordSys,r=this._cbParamsList,e=!!i&&i.length===t.length;return e&&z(i,(function(i,o){var a=i.dataByAxis||[],u=(t[o]||{}).dataByAxis||[];(e=e&&a.length===u.length)&&z(a,(function(t,i){var o=u[i]||{},a=t.seriesDataIndices||[],s=o.seriesDataIndices||[];(e=e&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===s.length)&&z(a,(function(t,n){var i=s[n];e=e&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})),r&&z(t.seriesDataIndices,(function(t){var i=t.seriesIndex,o=n[i],a=r[i];o&&a&&a.data!==o.data&&(e=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=n,!!e},n.prototype._hide=function(t){this._lastDataByCoordSys=null,this._cbParamsList=null,t({type:"hideTip",from:this.uid})},n.prototype.dispose=function(t,n){!u.node&&n.getDom()&&(rm(this,"_updatePosition"),this._tooltipContent.dispose(),TM("itemTooltip",n),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},n.type="tooltip",n}(Hd);function QM(t,n,i){var r,e=n.ecModel;i?(r=new ll(i,e,e),r=new ll(n.option,r,e)):r=n;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof ll&&(a=a.get("tooltip",!0)),G(a)&&(a={formatter:a}),a&&(r=new ll(a,r,e)))}return r}function tS(t,n){return t.dispatchAction||V(n.dispatchAction,n)}function nS(t){return"center"===t||"middle"===t}var iS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.layoutMode={type:"box",ignoreSize:!0},i}return o(n,t),n.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},n.prototype.mergeOption=function(n,i){t.prototype.mergeOption.call(this,n,i),this._updateSelector(n)},n.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;!0===n&&(n=t.selector=["all","inverse"]),H(n)&&z(n,(function(t,r){G(t)&&(t={type:t}),n[r]=C(t,function(t,n){return"all"===n?{type:"all",title:t.getLocaleModel().get(["legend","selector","all"])}:"inverse"===n?{type:"inverse",title:t.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(i,t.type))}))},n.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var n=!1,i=0;i<t.length;i++){var r=t[i].get("name");if(this.isSelected(r)){this.select(r),n=!0;break}}!n&&this.select(t[0].get("name"))}},n.prototype._updateData=function(t){var n=[],i=[];t.eachRawSeries((function(r){var e;if(i.push(r.name),r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();t.isSeriesFiltered(r)||(i=i.concat(o)),o.length?n=n.concat(o):e=!0}else e=!0;e&&ro(r)&&n.push(r.name)})),this._availableNames=i;var r=this.get("data")||n,e=ct(),o=R(r,(function(t){return(G(t)||Y(t))&&(t={name:t}),e.get(t.name)?null:(e.set(t.name,!0),new ll(t,this,this.ecModel))}),this);this._data=B(o,(function(t){return!!t}))},n.prototype.getData=function(){return this._data},n.prototype.select=function(t){var n=this.option.selected;"single"===this.get("selectedMode")&&z(this._data,(function(t){n[t.get("name")]=!1})),n[t]=!0},n.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},n.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},n.prototype.allSelect=function(){var t=this.option.selected;z(this._data,(function(n){t[n.get("name",!0)]=!0}))},n.prototype.inverseSelect=function(){var t=this.option.selected;z(this._data,(function(n){var i=n.get("name",!0);t.hasOwnProperty(i)||(t[i]=!0),t[i]=!t[i]}))},n.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&D(this._availableNames,t)>=0},n.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},n.type="legend.plain",n.dependencies=["series"],n.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:Sc.size.m,align:"auto",backgroundColor:Sc.color.transparent,borderColor:Sc.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:Sc.color.disabled,inactiveBorderColor:Sc.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:Sc.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:Sc.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:Sc.color.tertiary,borderWidth:1,borderColor:Sc.color.border},emphasis:{selectorLabel:{show:!0,color:Sc.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},n}(Mc),rS=W,eS=z,oS=fe,aS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.newlineDisabled=!1,i}return o(n,t),n.prototype.init=function(){this.group.add(this._contentGroup=new oS),this.group.add(this._selectorGroup=new oS),this._isFirstRender=!0},n.prototype.getContentGroup=function(){return this._contentGroup},n.prototype.getSelectorGroup=function(){return this._selectorGroup},n.prototype.render=function(t,n,i){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var e=t.get("align"),o=t.get("orient");e&&"auto"!==e||(e="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),u=t.get("selectorPosition",!0);!a||u&&"auto"!==u||(u="horizontal"===o?"end":"start"),this.renderInner(e,t,n,i,a,o,u);var s=yc(t,i).refContainer,f=t.getBoxLayoutParams(),h=t.get("padding"),l=pc(f,s,h),c=this.layoutInner(t,e,l,r,a,u),v=pc(O({width:c.width,height:c.height},f),s,h);this.group.x=v.x-c.x,this.group.y=v.y-c.y,this.group.markRedraw(),this.group.add(this._backgroundEl=function(t,n){var i=tc(n.get("padding")),r=n.getItemStyle(["color","opacity"]);return r.fill=n.get("backgroundColor"),new xu({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:n.get("borderRadius")},style:r,silent:!0,z2:-1})}(c,t))}},n.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},n.prototype.renderInner=function(t,n,i,r,e,o,a){var u=this.getContentGroup(),s=ct(),f=n.get("selectedMode"),h=n.get("triggerEvent"),l=[];i.eachRawSeries((function(t){!t.get("legendHoverLink")&&l.push(t.id)})),eS(n.getData(),(function(e,o){var a=this,c=e.get("name");if(!this.newlineDisabled&&(""===c||"\n"===c)){var v=new oS;return v.newline=!0,void u.add(v)}var d=i.getSeriesByName(c)[0];if(!s.get(c))if(d){var m=d.getData(),p=m.getVisual("legendLineStyle")||{},y=m.getVisual("legendIcon"),g=m.getVisual("style"),b=this._createItem(d,c,o,e,n,t,p,g,y,f,r);b.on("click",rS(uS,c,null,r,l)).on("mouseover",rS(sS,d.name,null,r,l)).on("mouseout",rS(fS,d.name,null,r,l)),i.ssr&&b.eachChild((function(t){var n=Ru(t);n.seriesIndex=d.seriesIndex,n.dataIndex=o,n.ssrType="legend"})),h&&b.eachChild((function(t){a.packEventData(t,n,d,o,c)})),s.set(c,!0)}else i.eachRawSeries((function(a){var u=this;if(!s.get(c)&&a.legendVisualProvider){var v=a.legendVisualProvider;if(!v.containName(c))return;var d=v.indexOfName(c),m=v.getItemVisual(d,"style"),p=v.getItemVisual(d,"legendIcon"),y=Ri(m.fill);y&&0===y[3]&&(y[3]=.2,m=I(I({},m),{fill:Vi(y,"rgba")}));var g=this._createItem(a,c,o,e,n,t,{},m,p,f,r);g.on("click",rS(uS,null,c,r,l)).on("mouseover",rS(sS,null,c,r,l)).on("mouseout",rS(fS,null,c,r,l)),i.ssr&&g.eachChild((function(t){var n=Ru(t);n.seriesIndex=a.seriesIndex,n.dataIndex=o,n.ssrType="legend"})),h&&g.eachChild((function(t){u.packEventData(t,n,a,o,c)})),s.set(c,!0)}}),this)}),this),e&&this._createSelector(e,n,r,o,a)},n.prototype.packEventData=function(t,n,i,r,e){var o={componentType:"legend",componentIndex:n.componentIndex,dataIndex:r,value:e,seriesIndex:i.seriesIndex};Ru(t).eventData=o},n.prototype._createSelector=function(t,n,i){var r=this.getSelectorGroup();eS(t,(function(t){var e=t.type,o=new Tu({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});r.add(o),Uh(o,{normal:n.getModel("selectorLabel"),emphasis:n.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),zs(o)}))},n.prototype._createItem=function(t,n,i,r,e,o,a,u,s,f,h){var l,c,v,d=t.visualDrawType,m=e.get("itemWidth"),p=e.get("itemHeight"),y=e.isSelected(n),g=r.get("symbolRotate"),b=r.get("symbolKeepAspect"),w=r.get("icon"),x=function(t,n,i,r,e,o,a){function u(t,n){"auto"===t.lineWidth&&(t.lineWidth=n.lineWidth>0?2:0),eS(t,(function(i,r){"inherit"===t[r]&&(t[r]=n[r])}))}var s=n.getModel("itemStyle"),f=s.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",l=s.getShallow("decal");f.decal=l&&"inherit"!==l?Cp(l,a):r.decal,"inherit"===f.fill&&(f.fill=r[e]),"inherit"===f.stroke&&(f.stroke=r[h]),"inherit"===f.opacity&&(f.opacity=("fill"===e?r:i).opacity),u(f,r);var c=n.getModel("lineStyle"),v=c.getLineStyle();if(u(v,i),"auto"===f.fill&&(f.fill=r.fill),"auto"===f.stroke&&(f.stroke=r.fill),"auto"===v.stroke&&(v.stroke=r.fill),!o){var d=n.get("inactiveBorderWidth");f.lineWidth="auto"===d?r.lineWidth>0&&f[h]?2:0:f.lineWidth,f.fill=n.get("inactiveColor"),f.stroke=n.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:f,lineStyle:v}}(s=w||s||"roundRect",r,a,u,d,y,h),M=new oS,S=r.getModel("textStyle");if(!U(t.getLegendIcon)||w&&"inherit"!==w){var k="inherit"===w&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;M.add(((v=rp(c=(l={itemWidth:m,itemHeight:p,icon:s,iconRotate:k,itemStyle:x.itemStyle,symbolKeepAspect:b}).icon||"roundRect",0,0,l.itemWidth,l.itemHeight,l.itemStyle.fill,l.symbolKeepAspect)).setStyle(l.itemStyle),v.rotation=(l.iconRotate||0)*Math.PI/180,v.setOrigin([l.itemWidth/2,l.itemHeight/2]),c.indexOf("empty")>-1&&(v.style.stroke=v.style.fill,v.style.fill=Sc.color.neutral00,v.style.lineWidth=2),v))}else M.add(t.getLegendIcon({itemWidth:m,itemHeight:p,icon:s,iconRotate:g,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:b}));var T="left"===o?m+5:-5,A=o,N=e.get("formatter"),L=n;G(N)&&N?L=N.replace("{name}",null!=n?n:""):U(N)&&(L=N(n));var C=y?S.getTextColor():r.get("inactiveColor");M.add(new Tu({style:jh(S,{text:L,x:T,y:p/2,fill:C,align:A,verticalAlign:"middle"},{inheritColor:C})}));var I=new xu({shape:M.getBoundingRect(),style:{fill:"transparent"}}),O=r.getModel("tooltip");return O.get("show")&&Ch({el:I,componentModel:e,itemName:n,itemTooltipOption:O.option}),M.add(I),M.eachChild((function(t){t.silent=!0})),I.silent=!f,this.getContentGroup().add(M),zs(M),M.__legendDataIndex=i,M},n.prototype.layoutInner=function(t,n,i,r,e,o){var a=this.getContentGroup(),u=this.getSelectorGroup();mc(t.get("orient"),a,t.get("itemGap"),i.width,i.height);var s=a.getBoundingRect(),f=[-s.x,-s.y];if(u.markRedraw(),a.markRedraw(),e){mc("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),l=[-h.x,-h.y],c=t.get("selectorButtonGap",!0),v=t.getOrient().index,d=0===v?"width":"height",m=0===v?"height":"width",p=0===v?"y":"x";"end"===o?l[v]+=s[d]+c:f[v]+=h[d]+c,l[1-v]+=s[m]/2-h[m]/2,u.x=l[0],u.y=l[1],a.x=f[0],a.y=f[1];var y={x:0,y:0};return y[d]=s[d]+c+h[d],y[m]=Math.max(s[m],h[m]),y[p]=Math.min(0,h[p]+l[1-v]),y}return a.x=f[0],a.y=f[1],this.group.getBoundingRect()},n.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},n.type="legend.plain",n}(Hd);function uS(t,n,i,r){fS(t,n,i,r),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:n}),sS(t,n,i,r)}function sS(t,n,i,r){i.usingTHL()||i.dispatchAction({type:"highlight",seriesName:t,name:n,excludeSeriesId:r})}function fS(t,n,i,r){i.usingTHL()||i.dispatchAction({type:"downplay",seriesName:t,name:n,excludeSeriesId:r})}function hS(t,n,i){var r="allSelect"===t||"inverseSelect"===t,e={},o=[];i.eachComponent({mainType:"legend",query:n},(function(i){r?i[t]():i[t](n.name),lS(i,e),o.push(i.componentIndex)}));var a={};return i.eachComponent("legend",(function(t){z(e,(function(n,i){t[n?"select":"unSelect"](i)})),lS(t,a)})),r?{selected:a,legendIndex:o}:{name:n.name,selected:a}}function lS(t,n){var i=n||{};return z(t.getData(),(function(n){var r=n.get("name");if("\n"!==r&&""!==r){var e=t.isSelected(r);i[r]=mt(i,r)?i[r]&&e:e}})),i}var cS=Mo((function(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries((function(t){for(var i=0;i<n.length;i++)if(!n[i].isSelected(t.name))return!1;return!0}))}));function vS(t){t.registerComponentModel(iS),t.registerComponentView(aS),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,cS),t.registerSubTypeDefaulter("legend",(function(){return"plain"})),function(t){t.registerAction("legendToggleSelect","legendselectchanged",W(hS,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",W(hS,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",W(hS,"inverseSelect")),t.registerAction("legendSelect","legendselected",W(hS,"select")),t.registerAction("legendUnSelect","legendunselected",W(hS,"unSelect"))}(t)}var dS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i}var i;return o(n,t),n.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},n.prototype.init=function(n,i,r){var e=wc(n);t.prototype.init.call(this,n,i,r),mS(this,n,e)},n.prototype.mergeOption=function(n,i){t.prototype.mergeOption.call(this,n,i),mS(this,this.option,n)},n.type="legend.scroll",n.defaultOption=(i={scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:Sc.color.accent50,pageIconInactiveColor:Sc.color.accent10,pageIconSize:15,pageTextStyle:{color:Sc.color.tertiary},animationDurationUpdate:800},C(C({},iS.defaultOption,!0),i,!0)),n}(iS);function mS(t,n,i){var r=[1,1];r[t.getOrient().index]=0,bc(n,i,{type:"box",ignoreSize:!!r})}var pS=fe,yS=["width","height"],gS=["x","y"],bS=function(t){function n(){var i=null!==t&&t.apply(this,arguments)||this;return i.type=n.type,i.newlineDisabled=!0,i._currentIndex=0,i}return o(n,t),n.prototype.init=function(){t.prototype.init.call(this),this.group.add(this._containerGroup=new pS),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new pS)},n.prototype.resetInner=function(){t.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},n.prototype.renderInner=function(n,i,r,e,o,a,u){var s=this;t.prototype.renderInner.call(this,n,i,r,e,o,a,u);var f=this._controllerGroup,h=i.get("pageIconSize",!0),l=H(h)?h:[h,h];v("pagePrev",0);var c=i.getModel("pageTextStyle");function v(t,n){var r=t+"DataIndex",o=Sh(i.get("pageIcons",!0)[i.getOrient().name][n],{onclick:V(s._pageGo,s,r,i,e)},{x:-l[0]/2,y:-l[1]/2,width:l[0],height:l[1]});o.name=t,f.add(o)}f.add(new Tu({name:"pageText",style:{text:"xx/xx",fill:c.getTextColor(),font:c.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1)},n.prototype.layoutInner=function(t,n,i,r,e,o){var a=this.getSelectorGroup(),u=t.getOrient().index,s=yS[u],f=gS[u],h=yS[1-u],l=gS[1-u];e&&mc("horizontal",a,t.get("selectorItemGap",!0));var c=t.get("selectorButtonGap",!0),v=a.getBoundingRect(),d=[-v.x,-v.y],m=L(i);e&&(m[s]=i[s]-v[s]-c);var p=this._layoutContentAndController(t,r,m,u,s,h,l,f);if(e){if("end"===o)d[u]+=p[s]+c;else{var y=v[s]+c;d[u]-=y,p[f]-=y}p[s]+=v[s]+c,d[1-u]+=p[l]+p[h]/2-v[h]/2,p[h]=Math.max(p[h],v[h]),p[l]=Math.min(p[l],v[l]+d[1-u]),a.x=d[0],a.y=d[1],a.markRedraw()}return p},n.prototype._layoutContentAndController=function(t,n,i,r,e,o,a,u){var s=this.getContentGroup(),f=this._containerGroup,h=this._controllerGroup;mc(t.get("orient"),s,t.get("itemGap"),r?i.width:null,r?null:i.height),mc("horizontal",h,t.get("pageButtonItemGap",!0));var l=s.getBoundingRect(),c=h.getBoundingRect(),v=this._showController=l[e]>i[e],d=[-l.x,-l.y];n||(d[r]=s[u]);var m=[0,0],p=[-c.x,-c.y],y=tt(t.get("pageButtonGap",!0),t.get("itemGap",!0));v&&("end"===t.get("pageButtonPosition",!0)?p[r]+=i[e]-c[e]:m[r]+=c[e]+y),p[1-r]+=l[o]/2-c[o]/2,s.setPosition(d),f.setPosition(m),h.setPosition(p);var g={x:0,y:0};if(g[e]=v?i[e]:l[e],g[o]=Math.max(l[o],c[o]),g[a]=Math.min(0,c[a]+p[1-r]),f.__rectSize=i[e],v){var b={x:0,y:0};b[e]=Math.max(i[e]-c[e]-y,0),b[o]=g[o],f.setClipPath(new xu({shape:b})),f.__rectSize=b[e]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var w=this._getPageInfo(t);return null!=w.pageIndex&&oh(s,{x:w.contentPosition[0],y:w.contentPosition[1]},v?t:null),this._updatePageInfoView(t,w),g},n.prototype._pageGo=function(t,n,i){var r=this._getPageInfo(n)[t];null!=r&&i.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:n.id})},n.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;z(["pagePrev","pageNext"],(function(r){var e=null!=n[r+"DataIndex"],o=i.childOfName(r);o&&(o.setStyle("fill",t.get(e?"pageIconColor":"pageIconInactiveColor",!0)),o.cursor=e?"pointer":"default")}));var r=i.childOfName("pageText"),e=t.get("pageFormatter"),o=n.pageIndex,a=null!=o?o+1:0,u=n.pageCount;r&&e&&r.setStyle("text",G(e)?e.replace("{current}",null==a?"":a+"").replace("{total}",null==u?"":u+""):e({current:a,total:u}))},n.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),i=this.getContentGroup(),r=this._containerGroup.__rectSize,e=t.getOrient().index,o=yS[e],a=gS[e],u=this._findTargetItemIndex(n),s=i.children(),f=s[u],h=s.length,l=h?1:0,c={contentPosition:[i.x,i.y],pageCount:l,pageIndex:l-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return c;var v=g(f);c.contentPosition[e]=-v.s;for(var d=u+1,m=v,p=v,y=null;d<=h;++d)(!(y=g(s[d]))&&p.e>m.s+r||y&&!b(y,m.s))&&(m=p.i>m.i?p:y)&&(null==c.pageNextDataIndex&&(c.pageNextDataIndex=m.i),++c.pageCount),p=y;for(d=u-1,m=v,p=v,y=null;d>=-1;--d)(y=g(s[d]))&&b(p,y.s)||!(m.i<p.i)||(p=m,null==c.pagePrevDataIndex&&(c.pagePrevDataIndex=m.i),++c.pageCount,++c.pageIndex),m=y;return c;function g(t){if(t){var n=t.getBoundingRect(),i=n[a]+t[a];return{s:i,e:i+n[o],i:t.__legendDataIndex}}}function b(t,n){return t.e>=n&&t.s<=n+r}},n.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(r,e){var o=r.__legendDataIndex;null==i&&null!=o&&(i=e),o===t&&(n=e)})),null!=n?n:i):0;var n,i},n.type="legend.scroll",n}(aS);function wS(t){Eb(vS),t.registerComponentModel(dS),t.registerComponentView(bS),function(t){t.registerAction("legendScroll","legendscroll",(function(t,n){var i=t.scrollDataIndex;null!=i&&n.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))}))}(t)}function xS(t,n,i){var r=c.createCanvas(),e=n.getWidth(),o=n.getHeight(),a=r.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=e+"px",a.height=o+"px",r.setAttribute("data-zr-dom-id",t)),r.width=e*i,r.height=o*i,r}function MS(t){return!t.__cursors.get(0)}function SS(t){var n=t.__cursors.get(0);return{startIdx:n?n.startIdx:0,endIdx:n?n.endIdx:0}}var kS=function(t){function n(n,i,r){var e,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.zlevel=0,o.zlevel2=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__prevIdx={startIdx:0,endIdx:0},r=r||kr,"string"==typeof n?e=xS(n,i,r):X(n)&&(n=(e=n).id),o.id=n,o.dom=e;var a=e.style;return a&&(dt(e),e.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=i,o.dpr=r,o}return o(n,t),n.prototype.afterBrush=function(){this.__prevIdx=SS(this)},n.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},n.prototype.setUnpainted=function(){this.__firstTimePaint=!0},n.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=xS("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},n.prototype.createRepaintRects=function(t,n,i,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var e=[],o=this.maxRepaintRectCount,a=!1,u=new xn(0,0,0,0);function s(t){if(t.isFinite()&&!t.isZero())if(0===e.length)(n=new xn(0,0,0,0)).copy(t),e.push(n);else{for(var n,i=!1,r=1/0,s=0,f=0;f<e.length;++f){var h=e[f];if(h.intersect(t)){var l=new xn(0,0,0,0);l.copy(h),l.union(t),e[f]=l,i=!0;break}if(a){u.copy(t),u.union(h);var c=u.width*u.height-t.width*t.height-h.width*h.height;c<r&&(r=c,s=f)}}a&&(e[s].union(t),i=!0),i||((n=new xn(0,0,0,0)).copy(t),e.push(n)),a||(a=e.length>=o)}}for(var f=SS(this),h=f.startIdx;h<f.endIdx;++h)if(m=t[h]){var l=m.shouldBePainted(i,r,!0,!0);(p=m.__isRendered&&(1&m.__dirty||!l)?m.getPrevPaintRect():null)&&s(p);var c=l&&(1&m.__dirty||!m.__isRendered)?m.getPaintRect():null;c&&s(c)}var v,d=this.__prevIdx;for(h=d.startIdx;h<d.endIdx;++h){var m,p;l=(m=n[h])&&m.shouldBePainted(i,r,!0,!0),!m||l&&m.__zr||!m.__isRendered||(p=m.getPrevPaintRect())&&s(p)}do{for(v=!1,h=0;h<e.length;)if(e[h].isZero())e.splice(h,1);else{for(var y=h+1;y<e.length;)e[h].intersect(e[y])?(v=!0,e[h].union(e[y]),e.splice(y,1)):y++;h++}}while(v);return this._paintRects=e,e},n.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},n.prototype.resize=function(t,n){var i=this.dpr,r=this.dom,e=r.style,o=this.domBack;e&&(e.width=t+"px",e.height=n+"px"),r.width=t*i,r.height=n*i,o&&(o.width=t*i,o.height=n*i,1!==i&&this.ctxBack.scale(i,i))},n.prototype.clear=function(t,n,i){var r=this.dom,e=this.ctx,o=r.width,a=r.height;n=n||this.clearColor;var u=this.motionBlur&&!t,s=this.lastFrameAlpha,f=this.dpr,h=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/f,a/f));var l=this.domBack;function c(t,i,r,o){if(e.clearRect(t,i,r,o),n&&"transparent"!==n){var a=void 0;K(n)?(a=(n.global||n.__width===r&&n.__height===o)&&n.__canvasGradient||ap(e,n,{x:0,y:0,width:r,height:o}),n.__canvasGradient=a,n.__width=r,n.__height=o):null!=n.image&&(n.scaleX=n.scaleX||f,n.scaleY=n.scaleY||f,a=pp(e,n,{dirty:function(){h.setUnpainted(),h.painter.refresh()}})),e.save(),e.fillStyle=a||n,e.fillRect(t,i,r,o),e.restore()}u&&(e.save(),e.globalAlpha=s,e.drawImage(l,t,i,r,o),e.restore())}!i||u?c(0,0,o,a):i.length&&z(i,(function(t){c(t.x*f,t.y*f,t.width*f,t.height*f)}))},n}(Dt),TS=1e5,AS=314159,NS=void 0;function LS(t,n,i,r){var e=new kS(t,n,n.dpr);return e.zlevel=i,e.zlevel2=r,e.__builtin__=!0,CS(e),e}function CS(t){t.__cursorStack=[],t.__cursors=ct()}function IS(t,n){for(var i=t.__cursorStack,r=0;r<i.length;r++)n(t.__cursors.get(i[r]))}function OS(t,n){var i=t.layers;return i[n]||(i[n]=new Array(3))}function DS(t,n,i){for(var r=t.layerStack,e=0;e<r.length;e++){var o=r[e].zl,a=r[e].zl2,u=t.layers[o][a];i&&(i&_S&&!u.__builtin__||i&ES&&u.__builtin__||i&zS&&u===t.hoverlayer)||n(u,o,a,e)}}var _S=1,ES=2,zS=4,RS=_S|zS,PS=function(){function t(t,n,i){this.type="canvas",this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas",this._i={layerStack:[],layers:[]};var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();if(this._opts=i=I({},i||{}),this.dpr=i.devicePixelRatio||kr,this._singleCanvas=r,this.root=t,t.style&&(dt(t),t.innerHTML=""),this.storage=n,this._prevDisplayList=[],r){var e=t,o=e.width,a=e.height;null!=i.width&&(o=i.width),null!=i.height&&(a=i.height),this.dpr=i.devicePixelRatio||1,e.width=o*this.dpr,e.height=a*this.dpr,this._width=o,this._height=a;var u=LS(e,this,AS,0);u.initContext(),this._insertLayer(u,AS,0,!0),this._domRoot=t}else{this._width=sp(t,0,i),this._height=sp(t,1,i);var s=this._domRoot=function(t,n){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+n+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(s)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(t){var n,i=tt((n=t&&!X(t)?{paintAll:!!t}:t||{}).refresh,!0),r=tt(n.refreshHover,!1);if(r&&(this._hoverLayerDirty=2),!i)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var e=this.storage.getDisplayList(!0);this._updateLayerStatus(e,n.paintAll),this._redrawId=Math.random(),this._paintList(e,this._prevDisplayList,this._redrawId);var o=this._backgroundColor;return DS(this._i,(function(t,n,i,r){t.refresh&&t.refresh(0===r?o:null)}),ES),this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},t.prototype._paintHoverList=function(t){var n=this._i.hoverlayer,i=this._hoverLayerDirty;if(this._hoverLayerDirty=NS,i!==NS&&(n||2!==i||(n=this._i.hoverlayer=this._ensureLayer(TS)),n)){n.clear();for(var r,e={viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=0,a=t.length;o<a;o++){var u=t[o];if(u.__inHover){r||(r=n.ctx).save();var s=u.__hoverStyle,f=void 0;s&&(f=u.style,u.style=s),kp(r,u,e),s&&(u.style=f)}}r&&(Tp(r,e),r.restore())}},t.prototype.getHoverLayer=function(){return this._ensureLayer(TS)},t.prototype.paintOne=function(t,n){Sp(t,n)},t.prototype._paintList=function(t,n,i){if(this._redrawId===i){var r=this._doPaintList(t,n);if(this._needsManuallyCompositing&&this._compositeManually(),r)DS(this._i,(function(t){t.afterBrush&&t.afterBrush()}),RS),this._paintHoverList(t);else{var e=this;qn((function(){e._paintList(t,n,i)}))}}},t.prototype._compositeManually=function(){var t=this._ensureLayer(AS).ctx,n=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,n,i),DS(this._i,(function(r){r.virtual&&t.drawImage(r.dom,0,0,n,i)}),_S)},t.prototype._doPaintList=function(t,n){var i=this,r=!0;return DS(this._i,(function(e){var o=!1;if(IS(e,(function(t){(t.drawIdx<t.endIdx||t.notClearIdx>=0)&&(o=!0)})),o||e.__dirty){var a=i._opts.useDirtyRect&&!MS(e)?e.createRepaintRects(t,n,i._width,i._height):null,u=i._i.layerStack[0],s=!0;e.__dirty&&(s=!1,e.__dirty=!1,e.clear(!1,e.zlevel===u.zl&&e.zlevel2===u.zl2?i._backgroundColor:null,a)),IS(e,(function(n){var o=i._paintPerCursor(e,n,t,a,s);r=r&&o}))}}),RS),u.wxa&&DS(this._i,(function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()})),r},t.prototype._paintPerCursor=function(t,n,i,r,e){var o=t.ctx;if(r)if(r.length)for(var a=this.dpr,u=0;u<r.length;++u){var s=r[u];o.save(),o.beginPath(),o.rect(s.x*a,s.y*a,s.width*a,s.height*a),o.clip(),this._paintPerCursorInRect(t,n,i,s,e),o.restore()}else n.drawIdx=n.endIdx;else o.save(),this._paintPerCursorInRect(t,n,i,null,e),o.restore();return n.drawIdx>=n.endIdx},t.prototype._paintPerCursorInRect=function(t,n,i,r,e){for(var o={allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:e}},a=t.ctx,u=MS(t),s=u&&c.getTime(),f=n.drawIdx,h=n.notClearIdx,l=h>=0?Math.min(h,f):f;l<n.endIdx;l++){var v=i[l];if(!(l<f)||v.notClear){if(v.__inHover&&(this._hoverLayerDirty=2),null!=r){var d=v.getPaintRect();d&&d.intersect(r)&&(kp(a,v,o),v.setPrevPaintRect(d))}else kp(a,v,o);if(u&&c.getTime()-s>15){l++;break}}}Tp(a,o),n.drawIdx=Math.max(l,f)},t.prototype.getLayer=function(t,n){return this._ensureLayer(t,0,n)},t.prototype._ensureLayer=function(t,n,i){n=n||0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(t=AS,n=0);var e=OS(this._i,t)[n];return e||(e=LS("zr_"+t+"."+n,this,t,n),this._layerConfig[t]&&C(e,this._layerConfig[t],!0),(i||r&&t!==AS)&&(e.virtual=!0),this._insertLayer(e,t,n,!1),e.initContext()),e},t.prototype.insertLayer=function(t,n){this._insertLayer(n,t,0,!1)},t.prototype._insertLayer=function(t,n,i,r){var e=this._i,o=e.layers,a=e.layerStack,u=this._domRoot,s=null;if((!o[n]||!o[n][i])&&function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(t)){for(var f=a.length,h=0;h<f&&(a[h].zl<n||a[h].zl===n&&a[h].zl2<i);)h++;if(h>0&&(s=OS(e,a[h-1].zl)[a[h-1].zl2]),a.splice(h,0,{zl:n,zl2:i}),OS(e,n)[i]=t,!r&&!t.virtual)if(s){var l=s.dom;l.nextSibling?u.insertBefore(t.dom,l.nextSibling):u.appendChild(t.dom)}else u.firstChild?u.insertBefore(t.dom,u.firstChild):u.appendChild(t.dom);t.painter||(t.painter=this)}},t.prototype.eachLayer=function(t,n){return DS(this._i,(function(i,r){t.call(n,i,r)}))},t.prototype.eachBuiltinLayer=function(t,n){return DS(this._i,(function(i,r){t.call(n,i,r)}),_S)},t.prototype.eachOtherLayer=function(t,n){return DS(this._i,(function(i,r){t.call(n,i,r)}),ES)},t.prototype.getLayers=function(){var t={};return DS(this._i,(function(n){t[n.id]=n})),t},t.prototype._updateLayerStatus=function(t,n){var i,r=this;if(r._singleCanvas)for(var e=1;e<t.length;e++)if((d=t[e]).zlevel!==t[e-1].zlevel||d.incremental){r._needsManuallyCompositing=!0;break}DS(r._i,(function(t){t.__dirty=!1,IS(t,(function(t){t.used=!1,t.endIdxNew=0,t.notClearIdx=-1}))}),RS);for(var o,a,u,s,f=null,h=null,l=!1,c=0,v=t.length;c<v;c++){var d,m=(d=t[c]).zlevel,p=d.incremental,y=void 0;if(i!==m&&(i=m,l=!1),p?(l=!0,y=1):y=l?2:0,f&&m===f.zlevel&&y===f.zlevel2||(h=null,(f=r._ensureLayer(m,y)).__builtin__)){if(!(h&&p===h.key||(a=void 0,u=void 0,void 0,(h=(u=(o=f).__cursors).get(s=+p)||(o.__cursorStack.push(s),u.set(s,((a={key:s}).startIdx=a.drawIdx=a.endIdx=a.endIdxNew=0,a.used=!1,a.first=a.last=NaN,a.notClearIdx=-1,a)))).used)))if(h.used=!0,n||h.first!==d.id)f.__dirty=!0,h.first=d.id,h.startIdx=h.drawIdx=c,h.endIdx=c+1;else{var g=c-h.startIdx;h.startIdx=c,h.drawIdx+=g,h.endIdx+=g}h.endIdxNew=c+1,1&d.__dirty&&!d.__inHover&&((!p||!d.notClear&&c<h.drawIdx)&&(f.__dirty=!0),p&&d.notClear&&h.notClearIdx<0&&(h.notClearIdx=c))}else N("ZLevel "+m+" has been used by unknown layer "+f.id)}DS(r._i,(function(n){for(var i=n.__cursorStack,e=n.__cursors,o=i.length-1;o>=0;o--){var a=e.get(i[o]);if(a.used){var u=a.endIdxNew;(MS(n)?u<a.drawIdx:u!==a.endIdx||!u||t[u-1].id!==a.last)&&(n.__dirty=!0),a.endIdx=a.endIdxNew,a.last=u?t[u-1].id:NaN}else n.__dirty=!0,e.removeKey(i[o]),i.splice(o,1)}n.__dirty&&(IS(n,(function(t){t.drawIdx=t.startIdx})),r._hoverLayerDirty===NS&&(r._hoverLayerDirty=1))}),RS)},t.prototype.clear=function(){return DS(this._i,(function(t){t.clear(),CS(t)}),_S),this},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,DS(this._i,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,n){if(n){var i=this._layerConfig;i[t]?C(i[t],n,!0):i[t]=n,DS(this._i,(function(t,n){C(t,i[n],!0)}))}},t.prototype.delLayer=function(t){for(var n=this._i.layerStack,i=this._i.layers,r=n.length-1;r>=0;r--){var e=n[r];if(e.zl===t){var o=i[t][e.zl2];if(o.__builtin__)continue;if(n.splice(r,1),i[t][e.zl2]=void 0,!o.virtual){var a=o.dom.parentNode;a&&a.removeChild(o.dom)}}}},t.prototype.resize=function(t,n){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts,e=this.root;null!=t&&(r.width=t),null!=n&&(r.height=n),t=sp(e,0,r),n=sp(e,1,r),i.style.display="",this._width===t&&n===this._height||(i.style.width=t+"px",i.style.height=n+"px",DS(this._i,(function(i){i.resize(t,n)})),this.refresh({paintAll:!0})),this._width=t,this._height=n}else{if(null==t||null==n)return;this._width=t,this._height=n,this._ensureLayer(AS).resize(t,n)}return this},t.prototype.clearLayer=function(t){z(this._i.layers[t],(function(t){t&&!t.__builtin__&&t.clear()}))},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},t.prototype.getRenderedCanvas=function(t){if(this._singleCanvas&&!this._compositeManually)return this._i.layers[314159][0].dom;var n=new kS("image",this,(t=t||{}).pixelRatio||this.dpr);n.initContext(),n.clear(!1,t.backgroundColor||this._backgroundColor);var i=n.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var r=n.dom.width,e=n.dom.height;DS(this._i,(function(t){t.__builtin__?i.drawImage(t.dom,0,0,r,e):t.renderToCanvas&&(i.save(),t.renderToCanvas(i),i.restore())}))}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},a=this.storage.getDisplayList(!0),u=0,s=a.length;u<s;u++)kp(i,a[u],o);Tp(i,o)}return n.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t}();const BS=["ca","de","en","es","fr","pt"],FS={ca:{ariaLabel:"Corba ITIC",xAxisName:"Durada (ms)",yAxisName:"Voltatge (% del voltatge nominal)",tooltip:{asset:"Actiu",date:"Data",eventType:"Esdeveniment",duration:"Durada",voltage:"Voltatge",status:"Estat",phase:"Fase",min:"Mín.",max:"Màx."},eventTypes:{VOLTAGE_DIP:"Buit de tensió",VOLTAGE_SWELL:"Augment de tensió",POWER_INTERRUPT:"Interrupció",VOLTAGE_TRANSIENT:"Transitori de voltatge",VOLTAGE_VARIATION:"Variació de voltatge",OVER_VOLTAGE:"Sobretensió",SUB_VOLTAGE:"Subtensió"},phases:{ALL:"Totes",NONE:""}},de:{ariaLabel:"ITIC-Diagramm",xAxisName:"Dauer (ms)",yAxisName:"Spannung (% der Nennspannung)",tooltip:{asset:"Vermögenswert",date:"Datum",eventType:"Ereignis",duration:"Dauer",voltage:"Spannung",status:"Status",phase:"Phase",min:"Min.",max:"Max."},eventTypes:{VOLTAGE_DIP:"Spannungseinbruch",VOLTAGE_SWELL:"Spannungserhöhung",POWER_INTERRUPT:"Stromunterbrechung",VOLTAGE_TRANSIENT:"Spannungstransient",VOLTAGE_VARIATION:"Spannungsschwankung",OVER_VOLTAGE:"Überspannung",SUB_VOLTAGE:"Unterspannung"},phases:{ALL:"Alle",NONE:""}},en:{ariaLabel:"ITIC chart",xAxisName:"Duration (ms)",yAxisName:"Voltage (% of nominal voltage)",tooltip:{asset:"Asset",date:"Date",eventType:"Event",duration:"Duration",voltage:"Voltage",status:"Status",phase:"Phase",min:"Min",max:"Max"},eventTypes:{VOLTAGE_DIP:"Voltage dip",VOLTAGE_SWELL:"Voltage swell",POWER_INTERRUPT:"Power interruption",VOLTAGE_TRANSIENT:"Voltage transient",VOLTAGE_VARIATION:"Voltage variation",OVER_VOLTAGE:"Overvoltage",SUB_VOLTAGE:"Subvoltage"},phases:{ALL:"All",NONE:""}},es:{ariaLabel:"Curva ITIC",xAxisName:"Duración (ms)",yAxisName:"Voltaje (% del voltaje nominal)",tooltip:{asset:"Activo",date:"Fecha",eventType:"Evento",duration:"Duración",voltage:"Voltaje",status:"Estado",phase:"Fase",min:"Mín.",max:"Máx."},eventTypes:{VOLTAGE_DIP:"Hueco de tensión",VOLTAGE_SWELL:"Aumento de tensión",POWER_INTERRUPT:"Interrupción",VOLTAGE_TRANSIENT:"Transitorio de voltaje",VOLTAGE_VARIATION:"Variación de voltaje",OVER_VOLTAGE:"Sobretensión",SUB_VOLTAGE:"Subtensión"},phases:{ALL:"Todas",NONE:""}},fr:{ariaLabel:"Courbe ITIC",xAxisName:"Durée (ms)",yAxisName:"Tension (% de la tension nominale)",tooltip:{asset:"Dispositif",date:"Date",eventType:"Événement",duration:"Durée",voltage:"Tension",status:"Statut",phase:"Phase",min:"Min.",max:"Max."},eventTypes:{VOLTAGE_DIP:"Creux de tension",VOLTAGE_SWELL:"Augmentation de tension",POWER_INTERRUPT:"Interruption",VOLTAGE_TRANSIENT:"Tension transitoire",VOLTAGE_VARIATION:"Variation de tension",OVER_VOLTAGE:"Surtension",SUB_VOLTAGE:"Sous-tension"},phases:{ALL:"Toutes",NONE:""}},pt:{ariaLabel:"Curva ITIC",xAxisName:"Duração (ms)",yAxisName:"Tensão (% da tensão nominal)",tooltip:{asset:"Ativo",date:"Data",eventType:"Evento",duration:"Duração",voltage:"Tensão",status:"Status",phase:"Fase",min:"Mín.",max:"Máx."},eventTypes:{VOLTAGE_DIP:"Queda de tensão",VOLTAGE_SWELL:"Aumento de tensão",POWER_INTERRUPT:"Interrupção",VOLTAGE_TRANSIENT:"Tensão transitória",VOLTAGE_VARIATION:"Variação de tensão",OVER_VOLTAGE:"Sobretensão",SUB_VOLTAGE:"Subtensão"},phases:{ALL:"Todas",NONE:""}}};function VS(t){const n=String(null!=t?t:"").split(/[-_]/)[0].toLowerCase();return BS.includes(n)?n:"en"}const WS=t=>FS[t],HS=(t,n)=>Object.prototype.hasOwnProperty.call(t,n);function US(t,n){return HS(t.eventTypes,n)?t.eventTypes[n]:n}function GS(t,n){return HS(t.phases,n)?t.phases[n]:void 0}const jS="#a67c52",YS="#20262C",XS="#B9BDC0",qS="#00B388",ZS={AN:{name:"L1",color:jS},BN:{name:"L2",color:YS},CN:{name:"L3",color:XS},AB:{name:"L1",color:jS},BC:{name:"L2",color:YS},CA:{name:"L3",color:XS},"AN,BN,CN":{name:"L1,L2,L3",color:qS},"AB,BC,CA":{name:"L1,L2,L3",color:qS},ALL:{name:"",color:"#4C5CC5"},A:{name:"L1"},B:{name:"L2"},C:{name:"L3"},"AN,BN":{name:"L1,L2"},"AN,CN":{name:"L1,L3"},"BN,CN":{name:"L2,L3"},"AB,BC":{name:"L1,L2"},"AB,CA":{name:"L1,L3"},"BC,CA":{name:"L2,L3"},NONE:{name:""}},$S=t=>null==t?"":String(t),KS=t=>Object.prototype.hasOwnProperty.call(ZS,t)?ZS[t]:{name:t};function JS(t,n){var i;const r=$S(t),e=KS(r);return Object.assign(Object.assign({},e),{name:null!==(i=GS(n,r))&&void 0!==i?i:e.name})}const QS=t=>"ALL"===t?2:"NONE"===t?1:0;function tk(t){return t.map((t=>{const n=$S(t.phase);return{group:t,code:n,rank:QS(n),name:KS(n).name}})).sort(((t,n)=>t.rank-n.rank||nk(t.name,n.name)||nk(t.code,n.code))).map((({group:t})=>t))}const nk=(t,n)=>t<n?-1:t>n?1:0,ik={locale:"en"},rk=t=>null==t||""===t;function ek(t){const n=new Intl.NumberFormat(t);return t=>n.format(t)}const ok=t=>!1!==t.clickable;const ak=[[.167,500],[1,200],[3,140],[3,120],[500,120],[500,110],[1e5,110]],uk=[[20,0],[20,70],[500,70],[500,80],[1e4,80],[1e4,90],[1e5,90]],sk={animation:!1,grid:{right:"20px",left:"60px"},legend:{top:0},tooltip:{appendTo:"body"},textStyle:{fontFamily:"CDS-Regular, Arial"},xAxis:{type:"log",min:1,max:1e5,nameGap:30,nameLocation:"middle",nameTextStyle:{fontSize:16,fontWeight:"bold"}},yAxis:{type:"value",min:0,max:200,nameTextStyle:{fontSize:16,fontWeight:"bold"},nameRotate:90,nameGap:40,nameLocation:"middle"}},fk=[{type:"line",data:ak,areaStyle:{origin:"end",color:"#FFEDEA"},lineStyle:{color:"#000"},silent:!0,showSymbol:!1,emphasis:{disabled:!0}},{type:"line",data:uk,areaStyle:{origin:"start",color:"#FFF5DF"},silent:!0,showSymbol:!1,lineStyle:{color:"#000"},emphasis:{disabled:!0}},{type:"line",data:uk,areaStyle:{origin:100,color:"#DDFAF1"},silent:!0,showSymbol:!1,lineStyle:{color:"#000"},emphasis:{disabled:!0}},{type:"line",data:ak,areaStyle:{origin:100,color:"#DDFAF1"},silent:!0,showSymbol:!1,lineStyle:{color:"#000"},emphasis:{disabled:!0}},{type:"line",data:[[.1,500],[.167,500]],areaStyle:{origin:100,color:"#DDFAF1"},silent:!0,showSymbol:!1,lineStyle:{color:"transparent"},emphasis:{disabled:!0}},{type:"line",data:[[.1,0],[20,0]],areaStyle:{origin:100,color:"#DDFAF1"},silent:!0,showSymbol:!1,lineStyle:{color:"transparent"},emphasis:{disabled:!0}}];Eb([function(t){t.registerChartView(Rw),t.registerSeriesModel(aw),t.registerLayout(Pw("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var n=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=n.getVisual("style").fill),n.setVisual("legendLineStyle",i)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,{seriesType:"line",reset:function(t,n,i){var r=t.getData(),e=t.get("sampling"),o=t.coordinateSystem,a=r.count();if(a>10&&"cartesian2d"===o.type&&e){var u=o.getBaseAxis(),s=o.getOtherAxis(u),f=u.getExtent(),h=i.getDevicePixelRatio(),l=Math.abs(f[1]-f[0])*(h||1),c=Math.round(a/l);if(isFinite(c)&&c>1){"lttb"===e?t.setData(r.lttbDownSample(r.mapDimension(s.dim),1/c)):"minmax"===e&&t.setData(r.minmaxDownSample(r.mapDimension(s.dim),1/c));var v=void 0;G(e)?v=Bw[e]:U(e)&&(v=e),v&&t.setData(r.downSample(r.mapDimension(s.dim),1/c,v,Fw))}}}})},function(t){Eb(rM),t.registerSeriesModel(mx),t.registerChartView(bx),t.registerLayout(Pw("scatter"))},function(){Eb(rM),Eb(zM)},function(){Eb(vS),Eb(wS)},function(t){Eb(zM),t.registerComponentModel(RM),t.registerComponentView(JM),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},pt),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},pt)},function(t){t.registerPainter("canvas",PS)}]);const hk=class{constructor(i){t(this,i),this.pointClick=n(this,"pointClick"),this.locale="en",this.parsedGroups=[]}onGroupsChange(){this.updateChart()}onLocaleChange(){this.updateAriaLabel(),this.updateChart()}onTimeZoneChange(){this.validateTimeZone(),this.updateChart()}connectedCallback(){this.el.hasAttribute("role")||this.el.setAttribute("role","img"),this.updateAriaLabel(),this.initChart()}componentWillLoad(){this.validateTimeZone()}componentDidLoad(){this.initChart()}disconnectedCallback(){var t,n;null===(t=this.resizeObserver)||void 0===t||t.disconnect(),this.resizeObserver=void 0,null===(n=this.chart)||void 0===n||n.dispose(),this.chart=void 0}updateAriaLabel(){const t=this.el.getAttribute("aria-label");null!==t&&t!==this.defaultAriaLabel||(this.defaultAriaLabel=WS(VS(this.locale)).ariaLabel,this.el.setAttribute("aria-label",this.defaultAriaLabel))}validateTimeZone(){this.validTimeZone=void 0,this.timeZone&&(function(){try{return!0}catch(t){return!1}}()?this.validTimeZone=this.timeZone:console.error(`[itic-chart] Invalid "timeZone" prop: "${this.timeZone}". Using the browser's time zone.`))}initChart(){this.container&&!this.chart&&(this.chart=function(t,n,i){var r=function(t){return ky[function(t,n){return t.getAttribute?t.getAttribute(n):t[n]}(t,Ny)]}(t);if(r)return r;var e=new vy(t,n,i);return e.id="ec_"+Ay++,ky[e.id]=e,co(t,Ny,e.id),uy(e),Hm.trigger("afterinit",e),e}(this.container),this.chart.on("click",(t=>{const n=function(t,{componentType:n,seriesIndex:i,dataIndex:r}){if("series"!==n||null==i||null==r)return;const e=tk(t)[i-fk.length],o=null==e?void 0:e.points[r];return o&&ok(o)?{point:o,group:e}:void 0}(this.parsedGroups,t);n&&this.pointClick.emit(n)})),"undefined"!=typeof ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>{var t;return null===(t=this.chart)||void 0===t?void 0:t.resize()})),this.resizeObserver.observe(this.container)),this.updateChart())}updateChart(){if(!this.chart)return;this.parsedGroups=[];try{this.parsedGroups=function(t){if(null==t||""===t)return[];const n="string"==typeof t?JSON.parse(t):t;if(!Array.isArray(n))throw new TypeError('"groups" must be an array of point groups');return n}(this.groups)}catch(t){console.error('[itic-chart] Invalid "groups" prop:',t)}const t=function(t,n=ik){const i=WS(n.locale),r=function({locale:t,timeZone:n}){const i=WS(t),r=new Intl.DateTimeFormat(t,{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hourCycle:"h23",timeZone:n}),e=new Intl.NumberFormat(t,{style:"unit",unit:"millisecond",maximumFractionDigits:3}),o=new Intl.NumberFormat(t,{style:"percent",maximumFractionDigits:1}),a=new Intl.NumberFormat(t,{minimumFractionDigits:2,maximumFractionDigits:2}),u=t=>{const n=new Date(t);return Number.isNaN(n.getTime())?String(null!=t?t:""):r.format(n)},s=t=>Number(t)?`${a.format(Number(t))} V`:void 0;return(t,n)=>[["asset",rk(n.assetName)?void 0:String(n.assetName)],["date",u(t.ts)],["eventType",rk(t.eventType)?void 0:US(i,String(t.eventType))],["duration",e.format(Number(t.duration))],["voltage",o.format(Number(t.voltage)/100)],["status",rk(t.status)?void 0:String(t.status)],["phase",JS(n.phase,i).name||"-"],["min",s(t.min)],["max",s(t.max)]].filter((t=>void 0!==t[1])).map((([t,n])=>` <strong>${i.tooltip[t]}</strong>: ${function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}(n)}`)).join("<br/>")}(n),e={formatter:ek(n.locale)};return Object.assign(Object.assign({},sk),{xAxis:Object.assign(Object.assign({},sk.xAxis),{name:i.xAxisName,axisLabel:e}),yAxis:Object.assign(Object.assign({},sk.yAxis),{name:i.yAxisName,axisLabel:e}),series:[...fk,...tk(t).map((t=>{const{name:n,color:e}=JS(t.phase,i);return{type:"scatter",name:n,data:t.points.map((t=>({value:[t.duration,t.voltage],cursor:ok(t)?"pointer":"default"}))),symbolSize:12,z:4,itemStyle:e?{color:e,opacity:1}:{opacity:1},tooltip:{formatter:n=>r(t.points[n.dataIndex],t)}}}))]})}(this.parsedGroups,{locale:VS(this.locale),timeZone:this.validTimeZone});this.chart.setOption(t,{notMerge:!0})}render(){return i("div",{key:"2bb964d590a36c9c9501761c3f848ad364a29030",class:"chart",ref:t=>this.container=t})}get el(){return r(this)}static get watchers(){return{groups:[{onGroupsChange:0}],locale:[{onLocaleChange:0}],timeZone:[{onTimeZoneChange:0}]}}};hk.style=":host{display:block;height:400px;background:var(--itic-chart-background, transparent)}.chart{width:100%;height:100%}";export{hk as itic_chart}
|