|
|
/*! ***************************************************************************** Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var sl=function(e,t){return sl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},sl(e,t)};function N(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");sl(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var S_=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),x_=function(){function e(){this.browser=new S_,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=typeof window<"u"}return e}(),jr=new x_;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(jr.wxa=!0,jr.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?jr.worker=!0:typeof navigator>"u"?(jr.node=!0,jr.svgSupported=!0):w_(navigator.userAgent,jr);function w_(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),a=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),a&&(r.ie=!0,r.version=a[1]),i&&(r.edge=!0,r.version=i[1],r.newEdge=+i[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}const j=jr;var wf=12,b_="sans-serif",pn=wf+"px "+b_,T_=20,C_=100,M_="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function D_(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var n=String.fromCharCode(r+32),a=(e.charCodeAt(r)-T_)/C_;t[n]=a}return t}var A_=D_(M_),er={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var e,t;return function(r,n){if(!e){var a=er.createCanvas();e=a&&a.getContext("2d")}if(e)return t!==n&&(t=e.font=n||pn),e.measureText(r);r=r||"",n=n||pn;var i=/^([0-9]*?)px$/.exec(n),o=+(i&&i[1])||wf,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var u=0;u<r.length;u++){var l=A_[r[u]];s+=l==null?o:l*o}return{width:s}}}(),loadImage:function(e,t,r){var n=new Image;return n.onload=t,n.onerror=r,n.src=e,n}};function L_(e){for(var t in er)e[t]&&(er[t]=e[t])}var Ap=rr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),Lp=rr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),ea=Object.prototype.toString,us=Array.prototype,I_=us.forEach,P_=us.filter,bf=us.slice,R_=us.map,Oh=function(){}.constructor,Mi=Oh?Oh.prototype:null,Tf="__proto__",E_=2311;function Cf(){return E_++}function ls(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function rt(e){if(e==null||typeof e!="object")return e;var t=e,r=ea.call(e);if(r==="[object Array]"){if(!$n(e)){t=[];for(var n=0,a=e.length;n<a;n++)t[n]=rt(e[n])}}else if(Lp[r]){if(!$n(e)){var i=e.constructor;if(i.from)t=i.from(e);else{t=new i(e.length);for(var n=0,a=e.length;n<a;n++)t[n]=e[n]}}}else if(!Ap[r]&&!$n(e)&&!Za(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==Tf&&(t[o]=rt(e[o]))}return t}function at(e,t,r){if(!W(t)||!W(e))return r?rt(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==Tf){var a=e[n],i=t[n];W(i)&&W(a)&&!B(i)&&!B(a)&&!Za(i)&&!Za(a)&&!ul(i)&&!ul(a)& `),i=a.length;if(i===1)return iv(a[0],t,r,n);for(var o=new tt(0,0,0,0),s=0;s<a.length;s++){var u=iv(a[s],t,r,n);s===0?o.copy(u):o.union(u)}return o}function Ea(e,t,r){return r==="right"?e-=t:r==="center"&&(e-=t/2),e}function Hn(e,t,r){return r==="middle"?e-=t/2:r==="bottom"&&(e-=t),e}function Of(e){return ae("\u56FD",e)}function Cr(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Go(e,t,r){var n=t.position||"inside",a=t.distance!=null?t.distance:5,i=r.height,o=r.width,s=i/2,u=r.x,l=r.y,f="left",h="top";if(n instanceof Array)u+=Cr(n[0],r.width),l+=Cr(n[1],r.height),f=null,h=null;else switch(n){case"left":u-=a,l+=s,f="right",h="middle";break;case"right":u+=a+o,l+=s,h="middle";break;case"top":u+=o/2,l-=a,f="center",h="bottom";break;case"bottom":u+=o/2,l+=i+a,f="center";break;case"inside":u+=o/2,l+=s,f="center",h="middle";break;case"insideLeft":u+=a,l+=s,h="middle";break;case"insideRight":u+=o-a,l+=s,f="right",h="middle";break;case"insideTop":u+=o/2,l+=a,f="center";break;case"insideBottom":u+=o/2,l+=i-a,f="center",h="bottom";break;case"insideTopLeft":u+=a,l+=a;break;case"insideTopRight":u+=o-a,l+=a,f="right";break;case"insideBottomLeft":u+=a,l+=i-a,h="bottom";break;case"insideBottomRight":u+=o-a,l+=i-a,f="right",h="bottom";break}return e=e||{},e.x=u,e.y=l,e.align=f,e.verticalAlign=h,e}var js="__zr_normal__",tu=ti.concat(["ignore"]),uS=rr(ti,function(e,t){return e[t]=!0,e},{ignore:!1}),Dn={},lS=new tt(0,0,0,0),kf=function(){function e(t){this.id=Cf(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=r.innerTransformable,o=void 0,s=void 0,u=!1;i.parent=a?this:null;var l=!1;if(i.copyTransform(r),n.position!=null){var f=lS;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),a||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Dn,n,f):Go(Dn,n,f),i.x=Dn.x,i.y=Dn.y,o=Dn.align,s=Dn.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=Cr(h[0],f.width),v=Cr(h[1],f.height)),l=!0,i.originX=-i.x+c+(a?0:f.x),i.originY=-i.y+v+(a?0:f.y)}}n.rotation!=null&&(i.rotation=n.rotation);var d=n.offset;d&&(i.x+=d[0],i.y+=d[1],l||(i.originX=-d[0],i.originY=-d[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;g&&this.canBeInsideText()?(y=n.insideFill,m=n.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=n.outsideFill,m=n.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==p.fill||m!==p.stroke||_!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(u=!0,p.fill=y,p.stroke=m,p.autoStroke=_,p.align=o,p.verticalAlign=s,r.setDefaultTextStyle(p)),r.__dirty|=ne,u&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Tl:bl},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&Qt(r);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,Ir(n,"rgba")},e.prototype.traverse=f
* ZRender, a high performance 2d drawing library. * * Copyright (c) 2013, Baidu Inc. * All rights reserved. * * LICENSE * https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/var bo={},rn={};function dS(e){delete rn[e]}function pS(e){if(!e)return!1;if(typeof e=="string")return ja(e,1)<wl;if(e.colorStops){for(var t=e.colorStops,r=0,n=t.length,a=0;a<n;a++)r+=ja(t[a].color,1);return r/=n,r<wl}return!1}var gS=function(){function e(t,r,n){var a=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=t;var i=new w1,o=n.renderer||"canvas";bo[o]||(o=ct(bo)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new bo[o](r,i,n,t),u=n.ssr||s.ssrOnly;this.storage=i,this.painter=s;var l=!j.node&&!j.worker&&!u?new aS(s.getViewportRoot(),s.root):null,f=n.useCoarsePointer,h=f==null||f==="auto"?j.touchEventsSupported:!!f,c=44,v;h&&(v=K(n.pointerSize,c)),this.handler=new y1(i,s,l,s.root,v),this.animation=new K1({stage:{update:u?null:function(){return a._flush(!0)}}}),u||this.animation.start()}return e.prototype.add=function(t){!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,r){this.painter.configLayer&&this.painter.configLayer(t,r),this.refresh()},e.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=pS(t)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(t){var r,n=Vn();this._needsRefresh&&(r=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var a=Vn();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},e.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this.handler.off(t,r)},e.prototype.trigger=function(t,r){this.handler.trigger(t,r)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),r=0;r<t.length;r++)t[r]instanceof de&&t[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,dS(this.id)},e}();function Cl(e,t){var r=new gS(Cf(),e,t);return rn[r.id]=r,r}function yS(e){e.dispose()}function mS(){for(var e in rn)rn.hasOwnProperty(e)&&rn[e].dispose();rn={}}function _S(e){return rn[e]}function cg(e,t){bo[e]=t}var SS="5.4.0";const iP=Object.freeze(Object.defineProperty({__proto__:null,init:Cl,dispose:yS,disposeAll:mS,getInstance:_S,registerPainter:cg,version:SS},Symbol.toStringTag,{value:"Module"}));var ov=1e-4,dg=20;function xS(e){return e.replace(/^\s+|\s+$/g,"")}function Ml(e,t,r,n){var a=t `);a=Dg(t,r,n,a);for(var o=0,s=i.length;o<s;o++)i[o]=Ag(i[o],a);return i.join(` `)}function Dg(e,t,r,n){n=n||{};var a=O({},n);a.font=t,r=K(r,"..."),a.maxIterations=K(n.maxIterations,2);var i=a.minChar=K(n.minChar,0);a.cnCharWidth=ae("\u56FD",t);var o=a.ascCharWidth=ae("a",t);a.placeholder=K(n.placeholder,"");for(var s=e=Math.max(0,e-1),u=0;u<i&&s>=o;u++)s-=o;var l=ae(r,t);return l>s&&(r="",l=0),s=e-l,a.ellipsis=r,a.ellipsisWidth=l,a.contentWidth=s,a.containerWidth=e,a}function Ag(e,t){var r=t.containerWidth,n=t.font,a=t.contentWidth;if(!r)return"";var i=ae(e,n);if(i<=r)return e;for(var o=0;;o++){if(i<=a||o>=t.maxIterations){e+=t.ellipsis;break}var s=o===0?ax(e,a,t.ascCharWidth,t.cnCharWidth):i>0?Math.floor(e.length*a/i):0;e=e.substr(0,s),i=ae(e,n)}return e===""&&(e=t.placeholder),e}function ax(e,t,r,n){for(var a=0,i=0,o=e.length;i<o&&a<t;i++){var s=e.charCodeAt(i);a+=0<=s&&s<=127?r:n}return i}function ix(e,t){e!=null&&(e+="");var r=t.overflow,n=t.padding,a=t.font,i=r==="truncate",o=Of(a),s=K(t.lineHeight,o),u=!!t.backgroundColor,l=t.lineOverflow==="truncate",f=t.width,h;f!=null&&(r==="break"||r==="breakAll")?h=e?Lg(e,t.font,f,r==="breakAll",0).lines:[]:h=e?e.split(` `):[];var c=h.length*s,v=K(t.height,c);if(c>v&&l){var d=Math.floor(v/s);h=h.slice(0,d)}if(e&&i&&f!=null)for(var g=Dg(f,a,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),p=0;p<h.length;p++)h[p]=Ag(h[p],g);for(var y=v,m=0,p=0;p<h.length;p++)m=Math.max(ae(h[p],a),m);f==null&&(f=m);var _=m;return n&&(y+=n[0]+n[2],_+=n[1]+n[3],f+=n[1]+n[3]),u&&(_=f),{lines:h,height:v,outerWidth:_,outerHeight:y,lineHeight:s,calculatedLineHeight:o,contentWidth:m,contentHeight:c,width:f}}var ox=function(){function e(){}return e}(),vv=function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e}(),sx=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return e}();function ux(e,t){var r=new sx;if(e!=null&&(e+=""),!e)return r;for(var n=t.width,a=t.height,i=t.overflow,o=(i==="break"||i==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:i==="breakAll"}:null,s=au.lastIndex=0,u;(u=au.exec(e))!=null;){var l=u.index;l>s&&iu(r,e.substring(s,l),t,o),iu(r,u[2],t,o,u[1]),s=au.lastIndex}s<e.length&&iu(r,e.substring(s,e.length),t,o);var f=[],h=0,c=0,v=t.padding,d=i==="truncate",g=t.lineOverflow==="truncate";function p(k,F,H){k.width=F,k.lineHeight=H,h+=H,c=Math.max(c,F)}t:for(var y=0;y<r.lines.length;y++){for(var m=r.lines[y],_=0,S=0,w=0;w<m.tokens.length;w++){var x=m.tokens[w],b=x.styleName&&t.rich[x.styleName]||{},T=x.textPadding=b.padding,C=T?T[1]+T[3]:0,A=x.font=b.font||t.font;x.contentHeight=Of(A);var D=K(b.height,x.contentHeight);if(x.innerHeight=D,T&&(D+=T[0]+T[2]),x.height=D,x.lineHeight=Yn(b.lineHeight,t.lineHeight,D),x.align=b&&b.align||t.align,x.verticalAlign=b&&b.verticalAlign||"middle",g&&a!=null&&h+x.lineHeight>a){w>0?(m.tokens=m.tokens.slice(0,w),p(m,S,_),r.lines=r.lines.slice(0,y+1)):r.lines=r.lines.slice(0,y);break t}var L=b.width,I=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")x.percentWidth=L,f.push(x),x.contentWidth=ae(x.text,A);else{if(I){var P=b.backgroundColor,R=P&&P.image;R&&(R=rx(R),cs(R)&&(x.width=Math.max(x.width,R.width*D/R.height)))}var E=d&&n!=null?n-S:null;E!=null&&E<x.width?!I||E<C?(x.text="",x.width=x.contentWidth=0):(x.text=nx(x.text,E-C,A,t.ellipsis,{minChar:t.truncateMinChar}),x.width=x.contentWidth=ae(x.text,A)):x.contentWidth=ae(x.text,A)}x.width+=C,S+=x.width,b&&(_=Math.max(_,x.lineHeight))}p(m,S,_)}r.outerWidth=r.width=K(n,c),r.outerHeight=r.height=K(a,h),r.contentHeight=h,r.contentWidth=c,v&&(r.outerWidth+=v[1]+v[3],r.outerHeight+=v[0]+v[2]);for(var y=0;y<f.length;y++){var x=f[y],U=x.percentWidth;x.width=parseInt(U,10)/100*r.width}return r}function iu(e,t,r,n,a){var i=t==="",o=a&&r.rich[a]||{},s=e.lines,u=o.font||r.font,l=!1,f,h;if(n){var c=o.padding,v=c?c[1]+c[3]:0;if(o.width!=null&&o.width!=="auto"){var d=Cr(o.width,n.width)+v;s.length>0&&d+n.accumWidth>n.width&&(f=t.split(` `),l=!0),n.accumWidth=d}else{var g=Lg(t,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+v,h=g.linesWidths,f=g.lines}}else f=t.split(` `);for(var p=0;p<f.length;p++){var y=f[p],m=new ox;if(m.styleName=a,m.text=y,m.isLineHolder=!y&&!i,typeof o.width=="number"?m.width=o.width:m.width=h?h[p]:ae(y,u),!p&&!l){var _=(s[s.length-1]||(s[0]=new vv)).tokens,S=_.length;S===1&&_[0].isLineHolder?_[0]=m:(y||!S||i)&&_.push(m)}else s.push(new vv([m]))}}function lx(e){var t=e.charCodeAt(0);return t>=33&&t<=383}var fx=rr(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function hx(e){return lx(e)?!!fx[e]:!0}function Lg(e,t,r,n,a){for(var i=[],o=[],s="",u="",l=0,f=0,h=0;h<e.length;h++){var c=e.charAt(h);if(c===` `){u&&(s+=u,f+=l),i.push(s),o.push(f),s="",u="",l=0,f=0;continue}var v=ae(c,t),d=n?!1:!hx(c);if(i.length?f+v>r:a+f+v>r){f?(s||u)&&(d?(s||(s=u,u="",l=0,f=l),i.push(s),o.push(f-l),u+=c,l+=v,s="",f=l):(u&&(s+=u,u="",l=0),i.push(s),o.push(f),s=c,f=v)):d?(i.push(u),o.push(l),u=c,l=v):(i.push(c),o.push(v));continue}f+=v,d?(u+=c,l+=v):(u&&(s+=u,u="",l=0),s+=c)}return!i.length&&!s&&(s=e,u="",l=0),u&&(s+=u),s&&(i.push(s),o.push(f)),i.length===1&&(f+=a),{accumWidth:f,lines:i,linesWidths:o}}var Ll="__zr_style_"+Math.round(Math.random()*10),fn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ds={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fn[Ll]=!0;var cv=["z","z2","invisible"],vx=["invisible"],cx=function(e){N(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=ct(r),a=0;a<n.length;a++){var i=n[a];i==="style"?this.useStyle(r[i]):e.prototype.attrKV.call(this,i,r[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(r,n,a,i){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&dx(this,r,n)||o&&!o[0]&&!o[3])return!1;if(a&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(i&&this.parent)for(var u=this.parent;u;){if(u.ignore)return!1;u=u.parent}return!0},t.prototype.contain=function(r,n){return this.rectContain(r,n)},t.prototype.traverse=function(r,n){r.call(n,this)},t.prototype.rectContain=function(r,n){var a=this.transformCoordToLocal(r,n),i=this.getBoundingRect();return i.contain(a[0],a[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,a=this.getBoundingRect(),i=this.style,o=i.shadowBlur||0,s=i.shadowOffsetX||0,u=i.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new tt(0,0,0,0)),n?tt.applyTransform(r,a,n):r.copy(a),(o||s||u)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(u),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+u-o));var l=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-l),r.y=Math.floor(r.y-l),r.width=Math.ceil(r.width+1+l*2),r.height=Math.ceil(r.height+1+l*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new tt(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(r){return this.animate("style",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(r,n){r!=="style"?e.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:O(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=Pa,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Pa)},t.prototype.styleUpdated=function(){this.__dirty&=~Pa},t.prototype.createStyle=function(r){return pi(fn,r)},t.prototype.useStyle=function(r){r[Ll]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},t.prototype.isStyleObject=function(r){return r[Ll]},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,cv)},t.prototype._applyStateObj=function(r,n,a,i,o,s){e.prototype._applyStateObj.call(this,r,n,a,i,o,s);var u=!(n&&i),l;if(n&&n.style?o?i?l=n.style:(l=this._mergeStyle(this.createStyle(),a.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:a.style),this._mergeStyle(l,n.style)):u&&(l=a.style),l)if(o){var f=this.style;if
yyyy`);var n=We(t),a=r?"getUTC":"get",i=n[a+"FullYear"](),o=n[a+"Month"]()+1,s=n[a+"Date"](),u=n[a+"Hours"](),l=n[a+"Minutes"](),f=n[a+"Seconds"](),h=n[a+"Milliseconds"]();return e=e.replace("MM",Xt(o,2)).replace("M",o).replace("yyyy",i).replace("yy",Xt(i%100+"",2)).replace("dd",Xt(s,2)).replace("d",s).replace("hh",Xt(u,2)).replace("h",u).replace("mm",Xt(l,2)).replace("m",l).replace("ss",Xt(f,2)).replace("s",f).replace("SSS",Xt(h,3)),e}function SP(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function oi(e,t){return t=t||"transparent",z(e)?e:W(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function ec(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var Do=M,kb=["left","right","top","bottom","width","height"],an=[["width","left","right"],["height","top","bottom"]];function oh(e,t,r,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(u,l){var f=u.getBoundingRect(),h=t.childAt(l+1),c=h&&h.getBoundingRect(),v,d;if(e==="horizontal"){var g=f.width+(c?-c.x+f.x:0);v=i+g,v>n||u.newline?(i=0,v=g,o+=s+r,s=f.height):s=Math.max(s,f.height)}else{var p=f.height+(c?-c.y+f.y:0);d=o+p,d>a||u.newline?(i+=s+r,o=0,d=p,s=f.width):s=Math.max(s,f.width)}u.newline||(u.x=i,u.y=o,u.markRedraw(),e==="horizontal"?i=v+r:o=d+r)})}var Qn=oh;_t(oh,"vertical");_t(oh,"horizontal");function xP(e,t,r){var n=t.width,a=t.height,i=st(e.left,n),o=st(e.top,a),s=st(e.right,n),u=st(e.bottom,a);return(isNaN(i)||isNaN(parseFloat(e.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(e.top)))&&(o=0),(isNaN(u)||isNaN(parseFloat(e.bottom)))&&(u=a),r=bi(r||0),{width:Math.max(s-i-r[1]-r[3],0),height:Math.max(u-o-r[0]-r[2],0)}}function Lr(e,t,r){r=bi(r||0);var n=t.width,a=t.height,i=st(e.left,n),o=st(e.top,a),s=st(e.right,n),u=st(e.bottom,a),l=st(e.width,n),f=st(e.height,a),h=r[2]+r[0],c=r[1]+r[3],v=e.aspect;switch(isNaN(l)&&(l=n-s-c-i),isNaN(f)&&(f=a-u-h-o),v!=null&&(isNaN(l)&&isNaN(f)&&(v>n/a?l=n*.8:f=a*.8),isNaN(l)&&(l=v*f),isNaN(f)&&(f=l/v)),isNaN(i)&&(i=n-s-l-c),isNaN(o)&&(o=a-u-f-h),e.left||e.right){case"center":i=n/2-l/2-r[3];break;case"right":i=n-l-c;break}switch(e.top||e.bottom){case"middle":case"center":o=a/2-f/2-r[0];break;case"bottom":o=a-f-h;break}i=i||0,o=o||0,isNaN(l)&&(l=n-c-i-(s||0)),isNaN(f)&&(f=a-h-o-(u||0));var d=new tt(i+r[3],o+r[0],l,f);return d.margin=r,d}function Bb(e,t,r,n,a,i){var o=!a||!a.hv||a.hv[0],s=!a||!a.hv||a.hv[1],u=a&&a.boundingMode||"all";if(i=i||e,i.x=e.x,i.y=e.y,!o&&!s)return!1;var l;if(u==="raw")l=e.type==="group"?new tt(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var f=e.getLocalTransform();l=l.clone(),l.applyTransform(f)}var h=Lr(Q({width:l.width,height:l.height},t),r,n),c=o?h.x-l.x:0,v=s?h.y-l.y:0;return u==="raw"?(i.x=c,i.y=v):(i.x+=c,i.y+=v),i===e&&e.markRedraw(),!0}function wP(e,t){return e[an[t][0]]!=null||e[an[t][1]]!=null&&e[an[t][2]]!=null}function si(e){var t=e.layoutMode||e.constructor.layoutMode;return W(t)?t:t?{type:t}:null}function jn(e,t,r){var n=r&&r.ignoreSize;!B(n)&&(n=[n,n]);var a=o(an[0],0),i=o(an[1],1);l(an[0],e,a),l(an[1],e,i);function o(f,h){var c={},v=0,d={},g=0,p=2;if(Do(f,function(_){d[_]=e[_]}),Do(f,function(_){s(t,_)&&(c[_]=d[_]=t[_]),u(c,_)&&v++,u(d,_)&&g++}),n[h])return u(t,f[1])?d[f[2]]=null:u(t,f[2])&&(d[f[1]]=null),d;if(g===p||!v)return d;if(v>=p)return c;for(var y=0;y<f.length;y++){var m=f[y];if(!s(c,m)&&s(e,m)){c[m]=e[m];break}}return c}function s(f,h){return f.hasOwnProperty(h)}function u(f,h){return f[h]!=null&&f[h]!=="auto"}function l(f,h,c){Do(f,function(v){h[v]=c[v]})}}function Ds(e){return Nb({},e)}function Nb(e,t){return t&&e&&Do(kb,function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}var Fb=yt(),ia=function(e){N(t,e);function t(r,n,a){var i=e.call(this,r,n,a)||this;return i.uid=xs("ec_cpt_model"),i}return t.prototype.init=function(r,n,a){this.mergeDefaultAndTheme(r,a)},t.prototype.mergeDefaultAndTheme=function(r,n){var a=si(this),i=a?Ds(r):{},o=n.getTheme();at(r,o.get(this.mainType)),at(r,this.getDefaultO
`,`
`,`
`];function li(e,t){return t.type=e,t}function $l(e){return e.type==="section"}function p0(e){return $l(e)?YT:$T}function g0(e){if($l(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return M(e.blocks,function(a){var i=g0(a);i>=t&&(t=i+ +(n&&(!i||$l(a)&&!a.noHeader)))}),t}return 0}function YT(e,t,r,n){var a=t.noHeader,i=XT(g0(t)),o=[],s=t.blocks||[];Ae(!s||B(s)),s=s||[];var u=e.orderMode;if(t.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(Ve(l,u)){var f=new u0(l[u],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else u==="seriesDesc"&&s.reverse()}M(s,function(d,g){var p=t.valueFormatter,y=p0(d)(p?O(O({},e),{valueFormatter:p}):e,d,g>0?i.html:0,n);y!=null&&o.push(y)});var h=e.renderMode==="richText"?o.join(i.richText):Xl(o.join(""),a?r:i.html);if(a)return h;var c=Vl(t.header,"ordinal",e.useUTC),v=d0(n,e.renderMode).nameStyle;return e.renderMode==="richText"?y0(e,c,v)+i.richText+h:Xl('<div style="'+v+";"+c0+';">'+re(c)+"</div>"+h,r)}function $T(e,t,r,n){var a=e.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,u=t.name,l=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(S){return S=B(S)?S:[S],G(S,function(w,x){return Vl(w,B(v)?v[x]:v,l)})};if(!(i&&o)){var h=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),c=i?"":Vl(u,"ordinal",l),v=t.valueType,d=o?[]:f(t.value),g=!s||!i,p=!s&&i,y=d0(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":h)+(i?"":y0(e,c,m))+(o?"":KT(e,d,g,p,_)):Xl((s?"":h)+(i?"":qT(c,!s,m))+(o?"":ZT(d,g,p,_)),r)}}function Cc(e,t,r,n,a,i){if(!!e){var o=p0(e),s={useUTC:a,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,i)}}function XT(e){return{html:WT[e],richText:UT[e]}}function Xl(e,t){var r='<div style="clear:both"></div>',n="margin: "+t+"px 0 0";return'<div style="'+n+";"+c0+';">'+e+r+"</div>"}function qT(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+re(e)+"</span>"}function ZT(e,t,r,n){var a=r?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return e=B(e)?e:[e],'<span style="'+i+";"+n+'">'+G(e,function(o){return re(o)}).join(" ")+"</span>"}function y0(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function KT(e,t,r,n,a){var i=[a],o=n?10:20;return r&&i.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(" "):t,i)}function QT(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return oi(n)}function m0(e,t){var r=e.get("padding");return r!=null?r:t==="richText"?[8,10]:10}var Lu=function(){function e(){this.richTextStyles={},this._nextStyleNameId=mg()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var a=n==="richText"?this._generateStyleName():null,i=Ob({color:r,type:t,renderMode:n,markerId:a});return z(i)?i:(this.richTextStyles[a]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};B(r)?M(r,function(i){return O(n,i)}):O(n,r);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+t+"}"},e}();function JT(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(r),u=B(s),l=QT(t,r),f,h,c,v;if(o>1||u&&!o){var d=jT(s,t,r,i,l);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var g=a.getDimensionInfo(i[0]);v=f=ta(a,r,i[0]),h=g.type}else v=f=u?s[0]:s;var p=Nf(t),y=p&&t.name||"",m=a.getName(r),_=n?y:m;return li("section",{header:y,noHeader:n||!p,sortParam:v,blocks:[li("nameValue",{markerType:"item",markerColor:l,name:_,noName:!be(_),value:f,valueType:h})].concat(c||[])})}function jT(e,t,r,n,a){var i=t.getData(),o=rr(e,function(h,c,v){var d=i.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],u=[],l=[];n.length?M(n,function(h){f(ta(i,r,h),h)}):M(e,f);function f(h,c){var v=i.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?l.push(li("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:h,
`:"<br/>",y=h.join(p);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,l)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,l):this._showTooltipContent(s,y,l,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(r,n,a){var i=this._ecModel,o=lt(n),s=o.seriesIndex,u=i.getSeriesByIndex(s),l=o.dataModel||u,f=o.dataIndex,h=o.dataType,c=l.getData(h),v=this._renderMode,d=r.positionDefault,g=La([c.getItemModel(f),l,u&&(u.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=g.get("trigger");if(!(p!=null&&p!=="item")){var y=l.getDataParams(f,h),m=new Lu;y.marker=m.makeTooltipMarker("item",oi(y.color),v);var _=_c(l.formatTooltip(f,!1,h)),S=g.get("order"),w=g.get("valueFormatter"),x=_.frag,b=x?Cc(w?O({valueFormatter:w},x):x,m,v,S,i.get("useUTC"),g.get("textStyle")):_.text,T="item_"+l.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,b,y,T,r.offsetX,r.offsetY,r.position,r.target,m)}),a({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,a){var i=lt(n),o=i.tooltipConfig,s=o.option||{};if(z(s)){var u=s;s={content:u,formatter:u}}var l=[s],f=this._ecModel.getComponent(i.componentMainType,i.componentIndex);f&&l.push(f),l.push({formatter:s.content});var h=r.positionDefault,c=La(l,this._tooltipModel,h?{position:h}:null),v=c.get("content"),d=Math.random()+"",g=new Lu;this._showOrMove(c,function(){var p=rt(c.get("formatterParams")||{});this._showTooltipContent(c,v,p,d,r.offsetX,r.offsetY,r.position,n,g)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,a,i,o,s,u,l,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var h=this._tooltipContent;h.setEnterable(r.get("enterable"));var c=r.get("formatter");u=u||r.get("position");var v=n,d=this._getNearestPoint([o,s],a,r.get("trigger"),r.get("borderColor")),g=d.color;if(c)if(z(c)){var p=r.ecModel.get("useUTC"),y=B(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=ws(y.axisValue,v,p)),v=Hy(v,a,!0)}else if(q(c)){var _=vt(function(S,w){S===this._ticket&&(h.setContent(w,f,r,g,u),this._updatePosition(r,u,o,s,h,a,l))},this);this._ticket=i,v=c(a,i,_)}else v=c;h.setContent(v,f,r,g,u),h.show(r,g),this._updatePosition(r,u,o,s,h,a,l)}},t.prototype._getNearestPoint=function(r,n,a,i){if(a==="axis"||B(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!B(n))return{color:i||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,a,i,o,s,u){var l=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var h=o.getSize(),c=r.get("align"),v=r.get("verticalAlign"),d=u&&u.getBoundingRect().clone();if(u&&d.applyTransform(u.transform),q(n)&&(n=n([a,i],s,o.el,d,{viewSize:[l,f],contentSize:h.slice()})),B(n))a=st(n[0],l),i=st(n[1],f);else if(W(n)){var g=n;g.width=h[0],g.height=h[1];var p=Lr(g,{width:l,height:f});a=p.x,i=p.y,c=null,v=null}else if(z(n)&&u){var y=E2(n,d,h,r.get("borderWidth"));a=y[0],i=y[1]}else{var y=P2(a,i,o,l,f,c?null:20,v?null:20);a=y[0],i=y[1]}if(c&&(a-=up(c)?h[0]/2:c==="right"?h[0]:0),v&&(i-=up(v)?h[1]/2:v==="bottom"?h[1]:0),a_(r)){var y=R2(a,i,o,l,f);a=y[0],i=y[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===r.length;return o&&M(a,function(s,u){var l=s.dataByAxis||[],f=r[u]||{},h=f.dataByAxis||[];o=o&&l.length===h.length,o&&M(l,function(c,v){var d=h[v]||{},g=c.seriesDataIndices||[],p=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&g.length===p.length,o&&M(g,function(y,m){var _=p[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&M(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){j.node||!n.getDom()||(Zl(this,"_updatePosition"),this._toolti
`)){var p=new co;p.newline=!0,l.add(p);return}var y=a.getSeriesByName(g)[0];if(!f.get(g))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,g,d,v,n,r,_,w,S,h,i);x.on("click",Nn(lp,g,null,i,c)).on("mouseover",Nn(yf,y.name,null,i,c)).on("mouseout",Nn(mf,y.name,null,i,c)),f.set(g,!0)}else a.eachRawSeries(function(b){if(!f.get(g)&&b.legendVisualProvider){var T=b.legendVisualProvider;if(!T.containName(g))return;var C=T.indexOfName(g),A=T.getItemVisual(C,"style"),D=T.getItemVisual(C,"legendIcon"),L=Qt(A.fill);L&&L[3]===0&&(L[3]=.2,A=O(O({},A),{fill:Ir(L,"rgba")}));var I=this._createItem(b,g,d,v,n,r,{},A,D,h,i);I.on("click",Nn(lp,null,g,i,c)).on("mouseover",Nn(yf,null,g,i,c)).on("mouseout",Nn(mf,null,g,i,c)),f.set(g,!0)}},this)},this),o&&this._createSelector(o,n,i,s,u)},t.prototype._createSelector=function(r,n,a,i,o){var s=this.getSelectorGroup();gf(r,function(l){var f=l.type,h=new Vt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);th(h,{normal:c,emphasis:v},{defaultText:l.title}),Bl(h)})},t.prototype._createItem=function(r,n,a,i,o,s,u,l,f,h,c){var v=r.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),p=o.isSelected(n),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=H2(f,i,u,l,v,p,c),w=new co,x=i.getModel("textStyle");if(q(r.getLegendIcon)&&(!_||_==="inherit"))w.add(r.getLegendIcon({itemWidth:d,itemHeight:g,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&r.getData().getVisual("symbol")?y==="inherit"?r.getData().getVisual("symbolRotate"):y:0;w.add(V2({itemWidth:d,itemHeight:g,icon:f,iconRotate:b,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,A=o.get("formatter"),D=n;z(A)&&A?D=A.replace("{name}",n!=null?n:""):q(A)&&(D=A(n));var L=i.get("inactiveColor");w.add(new Vt({style:Ar(x,{text:D,x:T,y:g/2,fill:p?x.getTextColor():L,align:C,verticalAlign:"middle"})}));var I=new Ct({shape:w.getBoundingRect(),invisible:!0}),P=i.getModel("tooltip");return P.get("show")&&Jf({el:I,componentModel:o,itemName:n,itemTooltipOption:P.option}),w.add(I),w.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(w),Bl(w),w.__legendDataIndex=a,w},t.prototype.layoutInner=function(r,n,a,i,o,s){var u=this.getContentGroup(),l=this.getSelectorGroup();Qn(r.get("orient"),u,r.get("itemGap"),a.width,a.height);var f=u.getBoundingRect(),h=[-f.x,-f.y];if(l.markRedraw(),u.markRedraw(),o){Qn("horizontal",l,r.get("selectorItemGap",!0));var c=l.getBoundingRect(),v=[-c.x,-c.y],d=r.get("selectorButtonGap",!0),g=r.getOrient().index,p=g===0?"width":"height",y=g===0?"height":"width",m=g===0?"y":"x";s==="end"?v[g]+=f[p]+d:h[g]+=c[p]+d,v[1-g]+=f[y]/2-c[y]/2,l.x=v[0],l.y=v[1],u.x=h[0],u.y=h[1];var _={x:0,y:0};return _[p]=f[p]+d+c[p],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-g]),_}else return u.x=h[0],u.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Ye);function H2(e,t,r,n,a,i,o){function s(p,y){p.lineWidth==="auto"&&(p.lineWidth=y.lineWidth>0?2:0),gf(p,function(m,_){p[_]==="inherit"&&(p[_]=y[_])})}var u=t.getModel("itemStyle"),l=u.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",h=u.getShallow("decal");l.decal=!h||h==="inherit"?n.decal:tf(h,o),l.fill==="inherit"&&(l.fill=n[a]),l.stroke==="inherit"&&(l.stroke=n[f]),l.opacity==="inherit"&&(l.opacity=(a==="fill"?n:r).opacity),s(l,n);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,r),l.fill==="auto"&&(l.fill=n.fill),l.stroke==="auto"&&(l.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var d=t.get("inactiveBorderWidth"),g=l[f];l.lineWidth=d==="auto"?n.lineWidth>0&&g?2:0:l.lineWidth,l.fill=t.get("inactiveColor"),l.stroke=t.get("inactiveBorderColor"),v
`||l==="")){var f=o.isSelected(l);n.hasOwnProperty(l)?n[l]=n[l]&&f:n[l]=f}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function U2(e){e.registerAction("legendToggleSelect","legendselectchanged",_t(Ia,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",_t(Ia,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",_t(Ia,"inverseSelect")),e.registerAction("legendSelect","legendselected",_t(Ia,"select")),e.registerAction("legendUnSelect","legendunselected",_t(Ia,"unSelect"))}function f_(e){e.registerComponentModel(pf),e.registerComponentView(l_),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,W2),e.registerSubTypeDefaulter("legend",function(){return"plain"}),U2(e)}var Y2=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,a){var i=Ds(r);e.prototype.init.call(this,r,n,a),fp(this,r,i)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),fp(this,this.option,r)},t.type="legend.scroll",t.defaultOption=Ay(pf.defaultOption,{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:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(pf);function fp(e,t,r){var n=e.getOrient(),a=[1,1];a[n.index]=0,jn(t,r,{type:"box",ignoreSize:!!a})}const $2=Y2;var hp=de,el=["width","height"],rl=["x","y"],X2=function(e){N(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new hp),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new hp)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,a,i,o,s,u){var l=this;e.prototype.renderInner.call(this,r,n,a,i,o,s,u);var f=this._controllerGroup,h=n.get("pageIconSize",!0),c=B(h)?h:[h,h];d("pagePrev",0);var v=n.getModel("pageTextStyle");f.add(new Vt({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(g,p){var y=g+"DataIndex",m=Qf(n.get("pageIcons",!0)[n.getOrient().name][p],{onclick:vt(l._pageGo,l,y,n,i)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});m.name=g,f.add(m)}},t.prototype.layoutInner=function(r,n,a,i,o,s){var u=this.getSelectorGroup(),l=r.getOrient().index,f=el[l],h=rl[l],c=el[1-l],v=rl[1-l];o&&Qn("horizontal",u,r.get("selectorItemGap",!0));var d=r.get("selectorButtonGap",!0),g=u.getBoundingRect(),p=[-g.x,-g.y],y=rt(a);o&&(y[f]=a[f]-g[f]-d);var m=this._layoutContentAndController(r,i,y,l,f,c,v,h);if(o){if(s==="end")p[l]+=m[f]+d;else{var _=g[f]+d;p[l]-=_,m[h]-=_}m[f]+=g[f]+d,p[1-l]+=m[v]+m[c]/2-g[c]/2,m[c]=Math.max(m[c],g[c]),m[v]=Math.min(m[v],g[v]+p[1-l]),u.x=p[0],u.y=p[1],u.markRedraw()}return m},t.prototype._layoutContentAndController=function(r,n,a,i,o,s,u,l){var f=this.getContentGroup(),h=this._containerGroup,c=this._controllerGroup;Qn(r.get("orient"),f,r.get("itemGap"),i?a.width:null,i?null:a.height),Qn("horizontal",c,r.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=c.getBoundingRect(),g=this._showController=v[o]>a[o],p=[-v.x,-v.y];n||(p[i]=f[l]);var y=[0,0],m=[-d.x,-d.y],_=K(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(g){var S=r.get("pageButtonPosition",!0);S==="end"?m[i]+=a[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=v[s]/2-d[s]/2,f.setPosition(p),h.setPosition(y),c.setPosition(m);var w={x:0,y:0};if(w[o]=g?a[o]:v[o],w[s]=Math.max(v[s],d[s]),w[u]=Math.min(0,d[u]+m[1-i]),h.__rectSize=a[o],g){var x={x:0,y:0};x[o]=Math
|