2023-07-24 18:07:54 +08:00
|
|
|
/*! *****************************************************************************
|
|
|
|
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 Fs=function(e,t){return Fs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Fs(e,t)};function G(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Fs(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var vg=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),cg=function(){function e(){this.browser=new vg,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}(),xr=new cg;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(xr.wxa=!0,xr.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?xr.worker=!0:typeof navigator>"u"?(xr.node=!0,xr.svgSupported=!0):dg(navigator.userAgent,xr);function dg(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[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 ot=xr;var Ru=12,pg="sans-serif",Br=Ru+"px "+pg,gg=20,yg=100,_g="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function mg(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var n=String.fromCharCode(r+32),i=(e.charCodeAt(r)-gg)/yg;t[n]=i}return t}var Sg=mg(_g),pn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var e,t;return function(r,n){if(!e){var i=pn.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==n&&(t=e.font=n||Br),e.measureText(r);r=r||"",n=n||Br;var a=/^([0-9]*?)px$/.exec(n),o=+(a&&a[1])||Ru,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var u=0;u<r.length;u++){var l=Sg[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}},wv=je(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),bv=je(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),gn=Object.prototype.toString,Ka=Array.prototype,wg=Ka.forEach,bg=Ka.filter,Pu=Ka.slice,Tg=Ka.map,Cl=function(){}.constructor,Mi=Cl?Cl.prototype:null,Au="__proto__",Mg=2311;function Tv(){return Mg++}function Eu(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function j(e){if(e==null||typeof e!="object")return e;var t=e,r=gn.call(e);if(r==="[object Array]"){if(!Xn(e)){t=[];for(var n=0,i=e.length;n<i;n++)t[n]=j(e[n])}}else if(bv[r]){if(!Xn(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}}}else if(!wv[r]&&!Xn(e)&&!Ns(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==Au&&(t[o]=j(e[o]))}return t}function st(e,t,r){if(!B(t)||!B(e))return r?j(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==Au){var i=e[n],a=t[n];B(a)&&B(i)&&!k(a)&&!k(i)&&!Ns(a)&&!Ns(i)&&!xl(a)&&!xl(i)&&!Xn(a)&&!Xn(i)?st(i,a,r):(r||!(n in e))&&(e[n]=j(t[n]))}
|
|
|
|
`),a=i.length;if(a===1)return jl(i[0],t,r,n);for(var o=new K(0,0,0,0),s=0;s<i.length;s++){var u=jl(i[s],t,r,n);s===0?o.copy(u):o.union(u)}return o}function Wn(e,t,r){return r==="right"?e-=t:r==="center"&&(e-=t/2),e}function on(e,t,r){return r==="middle"?e-=t/2:r==="bottom"&&(e-=t),e}function Nu(e){return Wt("\u56FD",e)}function zr(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Zv(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,u=r.x,l=r.y,f="left",h="top";if(n instanceof Array)u+=zr(n[0],r.width),l+=zr(n[1],r.height),f=null,h=null;else switch(n){case"left":u-=i,l+=s,f="right",h="middle";break;case"right":u+=i+o,l+=s,h="middle";break;case"top":u+=o/2,l-=i,f="center",h="bottom";break;case"bottom":u+=o/2,l+=a+i,f="center";break;case"inside":u+=o/2,l+=s,f="center",h="middle";break;case"insideLeft":u+=i,l+=s,h="middle";break;case"insideRight":u+=o-i,l+=s,f="right",h="middle";break;case"insideTop":u+=o/2,l+=i,f="center";break;case"insideBottom":u+=o/2,l+=a-i,f="center",h="bottom";break;case"insideTopLeft":u+=i,l+=i;break;case"insideTopRight":u+=o-i,l+=i,f="right";break;case"insideBottomLeft":u+=i,l+=a-i,h="bottom";break;case"insideBottomRight":u+=o-i,l+=a-i,f="right",h="bottom";break}return e=e||{},e.x=u,e.y=l,e.align=f,e.verticalAlign=h,e}var Wo="__zr_normal__",Uo=si.concat(["ignore"]),Wy=je(si,function(e,t){return e[t]=!0,e},{ignore:!1}),Xr={},Uy=new K(0,0,0,0),zu=function(){function e(t){this.id=Tv(),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 i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[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,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,u=!1;a.parent=i?this:null;var l=!1;if(a.copyTransform(r),n.position!=null){var f=Uy;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Xr,n,f):Zv(Xr,n,f),a.x=Xr.x,a.y=Xr.y,o=Xr.align,s=Xr.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=zr(h[0],f.width),v=zr(h[1],f.height)),l=!0,a.originX=-a.x+c+(i?0:f.x),a.originY=-a.y+v+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var d=n.offset;d&&(a.x+=d[0],a.y+=d[1],l||(a.originX=-d[0],a.originY=-d[1]));var y=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),g=void 0,_=void 0,m=void 0;y&&this.canBeInsideText()?(g=n.insideFill,_=n.insideStroke,(g==null||g==="auto")&&(g=this.getInsideTextFill()),(_==null||_==="auto")&&(_=this.getInsideTextStroke(g),m=!0)):(g=n.outsideFill,_=n.outsideStroke,(g==null||g==="auto")&&(g=this.getOutsideFill()),(_==null||_==="auto")&&(_=this.getOutsideStroke(g),m=!0)),g=g||"#000",(g!==p.fill||_!==p.stroke||m!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(u=!0,p.fill=g,p.stroke=_,p.autoStroke=m,p.align=o,p.verticalAlign=s,r.setDefaultTextStyle(p)),r.__dirty|=Vt,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()?tu:js},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&he(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,mi(n,"rgba")},e.prototype.traverse=fun
|
|
|
|
* 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 ga={},jv={};function Zy(e){delete jv[e]}function Ky(e){if(!e)return!1;if(typeof e=="string")return La(e,1)<Js;if(e.colorStops){for(var t=e.colorStops,r=0,n=t.length,i=0;i<n;i++)r+=La(t[i].color,1);return r/=n,r<Js}return!1}var Qy=function(){function e(t,r,n){var i=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 a=new oy,o=n.renderer||"canvas";ga[o]||(o=nt(ga)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new ga[o](r,a,n,t),u=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var l=!ot.node&&!ot.worker&&!u?new Fy(s.getViewportRoot(),s.root):null;this.handler=new ey(a,s,l,s.root),this.animation=new Ly({stage:{update:u?null:function(){return i._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=Ky(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=sn();this._needsRefresh&&(r=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=sn();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-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 Si&&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,Zy(this.id)},e}();function tf(e,t){var r=new Qy(Tv(),e,t);return jv[r.id]=r,r}function Jy(e,t){ga[e]=t}var ef=1e-4,tc=20;function jy(e){return e.replace(/^\s+|\s+$/g,"")}function rf(e,t,r,n){var i=t[0],a=t[1],o=r[0],s=r[1],u=a-i,l=s-o;if(u===0)return l===0?o:(o+s)/2;if(n)if(u>0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/u*l+o}function vt(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return W(e)?jy(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==nul
|
|
|
|
`);i=cc(t,r,n,i);for(var o=0,s=a.length;o<s;o++)a[o]=dc(a[o],i);return a.join(`
|
|
|
|
`)}function cc(e,t,r,n){n=n||{};var i=O({},n);i.font=t,r=X(r,"..."),i.maxIterations=X(n.maxIterations,2);var a=i.minChar=X(n.minChar,0);i.cnCharWidth=Wt("\u56FD",t);var o=i.ascCharWidth=Wt("a",t);i.placeholder=X(n.placeholder,"");for(var s=e=Math.max(0,e-1),u=0;u<a&&s>=o;u++)s-=o;var l=Wt(r,t);return l>s&&(r="",l=0),s=e-l,i.ellipsis=r,i.ellipsisWidth=l,i.contentWidth=s,i.containerWidth=e,i}function dc(e,t){var r=t.containerWidth,n=t.font,i=t.contentWidth;if(!r)return"";var a=Wt(e,n);if(a<=r)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=o===0?A0(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;e=e.substr(0,s),a=Wt(e,n)}return e===""&&(e=t.placeholder),e}function A0(e,t,r,n){for(var i=0,a=0,o=e.length;a<o&&i<t;a++){var s=e.charCodeAt(a);i+=0<=s&&s<=127?r:n}return a}function E0(e,t){e!=null&&(e+="");var r=t.overflow,n=t.padding,i=t.font,a=r==="truncate",o=Nu(i),s=X(t.lineHeight,o),u=!!t.backgroundColor,l=t.lineOverflow==="truncate",f=t.width,h;f!=null&&(r==="break"||r==="breakAll")?h=e?pc(e,t.font,f,r==="breakAll",0).lines:[]:h=e?e.split(`
|
|
|
|
`):[];var c=h.length*s,v=X(t.height,c);if(c>v&&l){var d=Math.floor(v/s);h=h.slice(0,d)}if(e&&a&&f!=null)for(var y=cc(f,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),p=0;p<h.length;p++)h[p]=dc(h[p],y);for(var g=v,_=0,p=0;p<h.length;p++)_=Math.max(Wt(h[p],i),_);f==null&&(f=_);var m=_;return n&&(g+=n[0]+n[2],m+=n[1]+n[3],f+=n[1]+n[3]),u&&(m=f),{lines:h,height:v,outerWidth:m,outerHeight:g,lineHeight:s,calculatedLineHeight:o,contentWidth:_,contentHeight:c,width:f}}var O0=function(){function e(){}return e}(),lf=function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e}(),k0=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 F0(e,t){var r=new k0;if(e!=null&&(e+=""),!e)return r;for(var n=t.width,i=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=qo.lastIndex=0,u;(u=qo.exec(e))!=null;){var l=u.index;l>s&&Zo(r,e.substring(s,l),t,o),Zo(r,u[2],t,o,u[1]),s=qo.lastIndex}s<e.length&&Zo(r,e.substring(s,e.length),t,o);var f=[],h=0,c=0,v=t.padding,d=a==="truncate",y=t.lineOverflow==="truncate";function p(N,F,U){N.width=F,N.lineHeight=U,h+=U,c=Math.max(c,F)}t:for(var g=0;g<r.lines.length;g++){for(var _=r.lines[g],m=0,S=0,b=0;b<_.tokens.length;b++){var w=_.tokens[b],x=w.styleName&&t.rich[w.styleName]||{},M=w.textPadding=x.padding,C=M?M[1]+M[3]:0,L=w.font=x.font||t.font;w.contentHeight=Nu(L);var D=X(x.height,w.contentHeight);if(w.innerHeight=D,M&&(D+=M[0]+M[2]),w.height=D,w.lineHeight=ua(x.lineHeight,t.lineHeight,D),w.align=x&&x.align||t.align,w.verticalAlign=x&&x.verticalAlign||"middle",y&&i!=null&&h+w.lineHeight>i){b>0?(_.tokens=_.tokens.slice(0,b),p(_,S,m),r.lines=r.lines.slice(0,g+1)):r.lines=r.lines.slice(0,g);break t}var I=x.width,R=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")w.percentWidth=I,f.push(w),w.contentWidth=Wt(w.text,L);else{if(R){var P=x.backgroundColor,E=P&&P.image;E&&(E=R0(E),io(E)&&(w.width=Math.max(w.width,E.width*D/E.height)))}var A=d&&n!=null?n-S:null;A!=null&&A<w.width?!R||A<C?(w.text="",w.width=w.contentWidth=0):(w.text=P0(w.text,A-C,L,t.ellipsis,{minChar:t.truncateMinChar}),w.width=w.contentWidth=Wt(w.text,L)):w.contentWidth=Wt(w.text,L)}w.width+=C,S+=w.width,x&&(m=Math.max(m,w.lineHeight))}p(_,S,m)}r.outerWidth=r.width=X(n,c),r.outerHeight=r.height=X(i,h),r.contentHeight=h,r.contentWidth=c,v&&(r.outerWidth+=v[1]+v[3],r.outerHeight+=v[0]+v[2]);for(var g=0;g<f.length;g++){var w=f[g],q=w.percentWidth;w.width=parseInt(q,10)/100*r.width}return r}function Zo(e,t,r,n,i){var a=t==="",o=i&&r.rich[i]||{},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=zr(o.width,n.width)+v;s.length>0&&d+n.accumWidth>n.width&&(f=t.split(`
|
|
|
|
`),l=!0),n.accumWidth=d}else{var y=pc(t,u,n.width,n.breakAll,n.accumWidth);n.accumWidth=y.accumWidth+v,h=y.linesWidths,f=y.lines}}else f=t.split(`
|
|
|
|
`);for(var p=0;p<f.length;p++){var g=f[p],_=new O0;if(_.styleName=i,_.text=g,_.isLineHolder=!g&&!a,typeof o.width=="number"?_.width=o.width:_.width=h?h[p]:Wt(g,u),!p&&!l){var m=(s[s.length-1]||(s[0]=new lf)).tokens,S=m.length;S===1&&m[0].isLineHolder?m[0]=_:(g||!S||a)&&m.push(_)}else s.push(new lf([_]))}}function B0(e){var t=e.charCodeAt(0);return t>=33&&t<=383}var N0=je(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function z0(e){return B0(e)?!!N0[e]:!0}function pc(e,t,r,n,i){for(var a=[],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),a.push(s),o.push(f),s="",u="",l=0,f=0;continue}var v=Wt(c,t),d=n?!1:!z0(c);if(a.length?f+v>r:i+f+v>r){f?(s||u)&&(d?(s||(s=u,u="",l=0,f=l),a.push(s),o.push(f-l),u+=c,l+=v,s="",f=l):(u&&(s+=u,u="",l=0),a.push(s),o.push(f),s=c,f=v)):d?(a.push(u),o.push(l),u=c,l=v):(a.push(c),o.push(v));continue}f+=v,d?(u+=c,l+=v):(u&&(s+=u,u="",l=0),s+=c)}return!a.length&&!s&&(s=e,u="",l=0),u&&(s+=u),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var ru="__zr_style_"+Math.round(Math.random()*10),kr={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ao={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};kr[ru]=!0;var ff=["z","z2","invisible"],H0=["invisible"],G0=function(e){G(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=nt(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):e.prototype.attrKV.call(this,a,r[a])}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,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&V0(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&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 i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,u=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new K(0,0,0,0)),n?K.applyTransform(r,i,n):r.copy(i),(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 K(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|=Gn,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Gn)},t.prototype.styleUpdated=function(){this.__dirty&=~Gn},t.prototype.createStyle=function(r){return Ja(kr,r)},t.prototype.useStyle=function(r){r[ru]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},t.prototype.isStyleObject=function(r){return r[ru]},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,ff)},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var u=!(n&&a),l;if(n&&n.style?o?a?l=n.style:(l=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(l,n.style)):u&&(l=i.style),l)if(o){var f=this.style;if(th
|
|
|
|
yyyy`);var n=xe(t),i=r?"getUTC":"get",a=n[i+"FullYear"](),o=n[i+"Month"]()+1,s=n[i+"Date"](),u=n[i+"Hours"](),l=n[i+"Minutes"](),f=n[i+"Seconds"](),h=n[i+"Milliseconds"]();return e=e.replace("MM",Ht(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100+"").replace("dd",Ht(s,2)).replace("d",s).replace("hh",Ht(u,2)).replace("h",u).replace("mm",Ht(l,2)).replace("m",l).replace("ss",Ht(f,2)).replace("s",f).replace("SSS",Ht(h,3)),e}function p1(e,t){return t=t||"transparent",W(e)?e:B(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function _C(e,t){if(t==="_blank"||t==="blank"){var r=window.open();r.opener=null,r.location.href=e}else window.open(e,t)}var Sa=T,g1=["left","right","top","bottom","width","height"],Ar=[["width","left","right"],["height","top","bottom"]];function il(e,t,r,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=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 y=f.width+(c?-c.x+f.x:0);v=a+y,v>n||u.newline?(a=0,v=y,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>i||u.newline?(a+=s+r,o=0,d=p,s=f.width):s=Math.max(s,f.width)}u.newline||(u.x=a,u.y=o,u.markRedraw(),e==="horizontal"?a=v+r:o=d+r)})}var mC=il;Or(il,"vertical");Or(il,"horizontal");function SC(e,t,r){var n=t.width,i=t.height,a=vt(e.left,n),o=vt(e.top,i),s=vt(e.right,n),u=vt(e.bottom,i);return(isNaN(a)||isNaN(parseFloat(e.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(e.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(e.top)))&&(o=0),(isNaN(u)||isNaN(parseFloat(e.bottom)))&&(u=i),r=Td(r||0),{width:Math.max(s-a-r[1]-r[3],0),height:Math.max(u-o-r[0]-r[2],0)}}function y1(e,t,r){r=Td(r||0);var n=t.width,i=t.height,a=vt(e.left,n),o=vt(e.top,i),s=vt(e.right,n),u=vt(e.bottom,i),l=vt(e.width,n),f=vt(e.height,i),h=r[2]+r[0],c=r[1]+r[3],v=e.aspect;switch(isNaN(l)&&(l=n-s-c-a),isNaN(f)&&(f=i-u-h-o),v!=null&&(isNaN(l)&&isNaN(f)&&(v>n/i?l=n*.8:f=i*.8),isNaN(l)&&(l=v*f),isNaN(f)&&(f=l/v)),isNaN(a)&&(a=n-s-l-c),isNaN(o)&&(o=i-u-f-h),e.left||e.right){case"center":a=n/2-l/2-r[3];break;case"right":a=n-l-c;break}switch(e.top||e.bottom){case"middle":case"center":o=i/2-f/2-r[0];break;case"bottom":o=i-f-h;break}a=a||0,o=o||0,isNaN(l)&&(l=n-c-a-(s||0)),isNaN(f)&&(f=i-h-o-(u||0));var d=new K(a+r[3],o+r[0],l,f);return d.margin=r,d}function wC(e,t,r,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],u=i&&i.boundingMode||"all";if(a=a||e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(u==="raw")l=e.type==="group"?new K(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=y1(ft({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"?(a.x=c,a.y=v):(a.x+=c,a.y+=v),a===e&&e.markRedraw(),!0}function bC(e,t){return e[Ar[t][0]]!=null||e[Ar[t][1]]!=null&&e[Ar[t][2]]!=null}function Ba(e){var t=e.layoutMode||e.constructor.layoutMode;return B(t)?t:t?{type:t}:null}function Na(e,t,r){var n=r&&r.ignoreSize;!k(n)&&(n=[n,n]);var i=o(Ar[0],0),a=o(Ar[1],1);l(Ar[0],e,i),l(Ar[1],e,a);function o(f,h){var c={},v=0,d={},y=0,p=2;if(Sa(f,function(m){d[m]=e[m]}),Sa(f,function(m){s(t,m)&&(c[m]=d[m]=t[m]),u(c,m)&&v++,u(d,m)&&y++}),n[h])return u(t,f[1])?d[f[2]]=null:u(t,f[2])&&(d[f[1]]=null),d;if(y===p||!v)return d;if(v>=p)return c;for(var g=0;g<f.length;g++){var _=f[g];if(!s(c,_)&&s(e,_)){c[_]=e[_];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){Sa(f,function(v){h[v]=c[v]})}}function Md(e){return _1({},e)}function _1(e,t){return t&&e&&Sa(g1,function(r){t.hasOwnProperty(r)&&(e[r]=t[r])}),e}var m1=ct(),mn=function(e){G(t,e);function t(r,n,i){var a=e.call(this,r,n,i)||this;return a.uid=ho("ec_cpt_model"),a}return t.prototype.init=function(r,n,i){this.mergeDefaultAndTheme(r,i)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Ba(this),a=i?Md(r):{},o=n.getTheme();st(r,o.get(this.mainType)),st(r,this.getDefaultOption()),i&&Na(r,a,i)},t.prototype.mergeOption=function(r,n){st(this.o
|
|
|
|
`,`
|
|
|
|
|
|
|
|
`,`
|
|
|
|
|
|
|
|
|
2023-09-11 21:56:39 +08:00
|
|
|
`];function _u(e,t){return t.type=e,t}function mu(e){return e.type==="section"}function Kd(e){return mu(e)?MS:CS}function Qd(e){if(mu(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return T(e.blocks,function(i){var a=Qd(i);a>=t&&(t=a+ +(n&&(!a||mu(i)&&!i.noHeader)))}),t}return 0}function MS(e,t,r,n){var i=t.noHeader,a=xS(Qd(t)),o=[],s=t.blocks||[];ce(!s||k(s)),s=s||[];var u=e.orderMode;if(t.sortBlocks&&u){s=s.slice();var l={valueAsc:"asc",valueDesc:"desc"};if(Nr(l,u)){var f=new uS(l[u],null);s.sort(function(d,y){return f.evaluate(d.sortParam,y.sortParam)})}else u==="seriesDesc"&&s.reverse()}T(s,function(d,y){var p=t.valueFormatter,g=Kd(d)(p?O(O({},e),{valueFormatter:p}):e,d,y>0?a.html:0,n);g!=null&&o.push(g)});var h=e.renderMode==="richText"?o.join(a.richText):Su(o.join(""),i?r:a.html);if(i)return h;var c=du(t.header,"ordinal",e.useUTC),v=Zd(n,e.renderMode).nameStyle;return e.renderMode==="richText"?Jd(e,c,v)+a.richText+h:Su('<div style="'+v+";"+qd+';">'+Gt(c)+"</div>"+h,r)}function CS(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,u=t.name,l=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(S){return S=k(S)?S:[S],H(S,function(b,w){return du(b,k(v)?v[w]:v,l)})};if(!(a&&o)){var h=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),c=a?"":du(u,"ordinal",l),v=t.valueType,d=o?[]:f(t.value),y=!s||!a,p=!s&&a,g=Zd(n,i),_=g.nameStyle,m=g.valueStyle;return i==="richText"?(s?"":h)+(a?"":Jd(e,c,_))+(o?"":IS(e,d,y,p,m)):Su((s?"":h)+(a?"":DS(c,!s,_))+(o?"":LS(d,y,p,m)),r)}}function IC(e,t,r,n,i,a){if(!!e){var o=Kd(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function xS(e){return{html:bS[e],richText:TS[e]}}function Su(e,t){var r='<div style="clear:both"></div>',n="margin: "+t+"px 0 0";return'<div style="'+n+";"+qd+';">'+e+r+"</div>"}function DS(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Gt(e)+"</span>"}function LS(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=k(e)?e:[e],'<span style="'+a+";"+n+'">'+H(e,function(o){return Gt(o)}).join(" ")+"</span>"}function Jd(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function IS(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(k(t)?t.join(" "):t,a)}function RS(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return p1(n)}function RC(e,t){var r=e.get("padding");return r!=null?r:t==="richText"?[8,10]:10}var PC=function(){function e(){this.richTextStyles={},this._nextStyleNameId=rc()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=d1({color:r,type:t,renderMode:n,markerId:i});return W(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};k(r)?T(r,function(a){return O(n,a)}):O(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function PS(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),u=k(s),l=RS(t,r),f,h,c,v;if(o>1||u&&!o){var d=AS(s,t,r,a,l);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var y=i.getDimensionInfo(a[0]);v=f=za(i,r,a[0]),h=y.type}else v=f=u?s[0]:s;var p=sc(t),g=p&&t.name||"",_=i.getName(r),m=n?g:_;return _u("section",{header:g,noHeader:n||!p,sortParam:v,blocks:[_u("nameValue",{markerType:"item",markerColor:l,name:m,noName:!Oe(m),value:f,valueType:h})].concat(c||[])})}function AS(e,t,r,n,i){var a=t.getData(),o=je(e,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],u=[],l=[];n.length?T(n,function(h){f(za(a,r,h),h)}):T(e,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?l.push(_u("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:h,
|